How to add a toggle button to main toolbar (not menu)?

Hello,

I can already successfully add a toggle menu item to main IDE menu bar by doing the following in plugin.xml:

]]>

where the java class Foo extends ToggleAction.

But now I would like to add a button with a custom icon to the toolbar, not the menu. Is this possible?

Thanks in advanced!

2 comments
Comment actions Permalink

Hello JoeNearBoston,

I can already successfully add a toggle menu item to main IDE menu bar
by doing the following in plugin.xml:

<action id="My Menu Name" text="Text">
<add-to-group group-id="ToolsMenu" anchor="first"/>
</action>
where the java class Foo extends ToggleAction.

But now I would like to add a button with a custom icon to the
toolbar, not the menu. Is this possible?


Yes, of course. Just add the same action to MainToolBar group, and specify
the icon in the "icon" attribute.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks, that worked!

0

Please sign in to leave a comment.