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 !
请先登录再写评论。
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.
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:
Richard Nemec wrote:
You'll find it here :
http://plugins.intellij.net/help/dtds
Alain
Great, thank's a lot !
Does anyone have an updated answer? (I would be interested in PHPStorm, IntelliJ and AppCode!)
Thanks, but I was actually looking for a list of all possible values for "someGroupId" and "someActionId".
Use for example New > Action for that - in dialog You have listed groups and actions (see attachments)
Attachment(s):
scr2.png
scr.png
Great, many thanks :)
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.