| Insert command toolbar button to action set [message #520582] |
Fri, 12 March 2010 16:54  |
Eugene Ostroukhov Messages: 66 Registered: July 2009 |
Member |
|
|
What should I use as locationURI to insert a button to the debug toolbar (i.e. next to run/debug/profile)? Is it even possible using the org.eclipse.ui.menus extension point?
I can easily do it using actionSets extension point using toolbarPath="debug"
|
|
|
| Re: Insert command toolbar button to action set [message #520663 is a reply to message #520582] |
Sat, 13 March 2010 17: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 17:43] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06171 seconds