plugin.xml - <add-to-group .. /> attributes ?

Is there any place where I can see the possible attributes of 'add-to-group' tag in plugin.xml ? And their allowed values as well ?

IDEA/doc/openapi/ActionManager.xml gives me the names for all possible groups ("HelpMenu", "GoToMenu", etc). This solves the problem of 'group-id' attribute. What stops me is possible values of 'anchor' attribute - it can be one of either "first", "last", "before" or "after". If I use either "before" or "after" - how do I specify the further information ? In fact, all I currently need is to put my entry after "Go To -> Line" menu entry, but more general information would be highly uppreciated.

Thank you !

0
10 comments

Well, "Do something wrong and watch the Exception" is our friend ! The attribute required is 'relative-to-action'.

Kudos to the author of Exceptions thrown - they're very helpful.

0
Avatar
Permanently deleted user

There was a plugin.xml DTD URL somewhere. Looking around, but cannot
find the URL, yet. Perhaps someone remembers the URL.
r.


Evgeny Goldin wrote:

Well, "Do something wrong and watch the Exception" is our friend ! The
attribute required is 'relative-to-action'.

Kudos to the author of Exceptions thrown - they're very helpful.

0
Avatar
Permanently deleted user

Richard Nemec wrote:

There was a plugin.xml DTD URL somewhere.



You'll find it here :
http://plugins.intellij.net/help/dtds

Alain

0

Great, thank's a lot !

0

Does anyone have an updated answer? (I would be interested in PHPStorm, IntelliJ and AppCode!)

0

<add-to-group group-id="someGroupId" relative-to-action="someActionId" anchor="first/last/before someActionOrGroupId/after someActionOrGroupId"/>

0

Thanks, but I was actually looking for a list of all possible values for "someGroupId" and "someActionId".

0

Use for example New > Action for that - in dialog You have listed groups and actions (see attachments)



Attachment(s):
scr2.png
scr.png
0

Great, many thanks :)

0

The following webpage has the current description of what the plugin.xml elements are is here:

https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html

and the action/add-to-group element here:

https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html#idea-plugin__actions__action__add-to-group

In there is says that the group-id attribute needs to be an instance of com.intellij.openapi.actionSystem.DefaultActionGroup. If you search for the class in a plugin project and look at the subclasses you will find around 97 of them as of today.

0

Please sign in to leave a comment.