The plugin-dev-package ( idea6913-dev.zip or something like that ) which must be downloaded separately, contains an example on how to create new menus and how to add actions to them. See examples/actions. Note: menus are called ActionsGroups and defined by group-tags in plugin.xml and menu items are Actions and are defined by action-tags in plugin.xml
Besides that, the plugins directory of the said package contains many plugin sources and most of them provide actions in some menus.
Or maybe I misunderstood you. In that case: Can you be a bit more specific what exactly you want to achieve.
The tutorial at link supplied shows how to register an action via plugin.xml. Search for 'add-to-group group-id="ToolsMenu"' there and just replace "ToolsMenu" with "MainMenu". Anchor information like "after" attribute must also change accordigly.
I'm facing the same issue, able to add to existing menu but not creating a new one .. . following is the xml content
<actions>
<group class="actions.CustomMenuGroup" id="CustomMenuGroup" text="Custom Menu" description="Group with test actions" popup="true"> <action id="VssIntegration.TestAction" class="actions.TestAction" text="My Test Action" description="My test action"/> <separator/>
Hi,
The plugin-dev-package ( idea6913-dev.zip or something like that ) which must be downloaded separately, contains an example on how to create new menus and how to add actions to them. See examples/actions.
Note: menus are called ActionsGroups and defined by group-tags in plugin.xml and menu items are Actions and are defined by action-tags in plugin.xml
Besides that, the plugins directory of the said package contains many plugin sources and most of them provide actions in some menus.
Or maybe I misunderstood you. In that case: Can you be a bit more specific what exactly you want to achieve.
Cheers,
Robert
Thanks for the link.
The Intellij helppage http://www.jetbrains.com/idea/plugins/action_system.html contains details on how to an existing menu but not how to add a new main menu.
MArkee
Main menu is just a regular existing menu with id="MainMenu", which you may want to add new group to.
So if I have the actions fooOpen and fooClose and want to add them to the new main menu option foo as menu items, how do I do this?
MArkee
The tutorial at link supplied shows how to register an action via plugin.xml.
Search for 'add-to-group group-id="ToolsMenu"' there and just replace "ToolsMenu" with "MainMenu". Anchor information like "after" attribute must also change accordigly.
Example in IDEA examples showed how to do this. I have not realised Text is the main menu entry.
I've been writing aa plugin for Eclipse as well - its nice to be back in IDEA ;)
MArkee
Hi !
I'm facing the same issue, able to add to existing menu but not creating a new one .. . following is the xml content
while
<action id="reader" class="actions.reader" text="reader">
works fine..
Would appreciate the help
Why are you setting popup="true" for your group? Try removing it.
i did set it to false but it does'nt reflect any changes.
Dimitry, Thank you
Resolved the issue, was assigning a class for the group which was not needed.