|
Re: Insert command toolbar button to action set [message #520663 is a reply to message #520582] |
Sat, 13 March 2010 22:40 |
Sandip Chitale Messages: 27 Registered: July 2009 Location: California, USA |
Junior Member |
|
|
<extension
point="org.eclipse.ui.commands">
<command
defaultHandler="mypackage.MyHandler"
id="my.command"
name="My Command">
</command>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
id="org.eclipse.debug.ui.launchActionSet">
</toolbar>
</menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.debug.ui.launchActionSet">
<command
commandId="my.command"
icon="IMG_TOOL_UP"
style="push">
<visibleWhen
checkEnabled="true">
</visibleWhen>
</command>
</menuContribution>
</extension>
I was able to use the above to get my command inside the debug toolbar. The debug toolbar results from a action set defined in org.eclipse.debug.ui plugin. I found out the action set id that generates the debug toolbar using the Plug-in Spy functionality available in Eclipse PDE. I found out that it was org.eclipse.debug.ui.launchActionSet. So in my pluing.xml I created a toolbar with same id and then added my command to same toolbar. At this point my command appeared as the first command in the debug toolbar. I was not able to further control the position of my command. This is probably not something that is officially supported though. I am using Eclipse 3.5.2.
--
Sandip
[Updated on: Sat, 13 March 2010 22:43] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05471 seconds