Add separator to group of actions in menu

I've added some actions to the "NewGroup" group. This works fine but i'd like to add a separator in the menu so that my actions are separated from the other actions, just like the devKit actions for example. I've looked at the devKit source but couldn't find how the separator is added.

How can i do this ?

Thanks

3 comments

Just add a <separator/> line to the <add-to-group> specification in the plugin.xml. Not sure how to do so otherwise, but that's always been enough for me.

--Dave Griffith

1

Hello Hugo,

HP> I've added some actions to the "NewGroup" group. This works fine but
HP> i'd like to add a separator in the menu so that my actions are
HP> separated from the other actions, just like the devKit actions for
HP> example. I've looked at the devKit source but couldn't find how the
HP> separator is added.
HP>
HP> How can i do this ?

See Dave's reply for the way to do it through plugin.xml. To do this programmatically,
simply add an instance of com.intellij.openapi.actionSystem.Separator to
the group.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Thanks for both replies. Got it working.

0

Please sign in to leave a comment.