How to contribute to main toolbar using Eclipse 4? [message #1781324] |
Tue, 06 February 2018 00:53  |
Eclipse User |
|
|
|
How to add toolitem to main toolbar (eclipses toolbar) using Eclipse 4 (Application.e4xmi/Fragment.e4xmi)?
I am trying to add a toolbar button using Eclipse 4 but I cannot figure out how to do it. I searched a lot and I could only find examples on RCP toolbar.
I tried many combinations of Extended Element ID (org.eclipse.ui.main.toolbar, org.eclipse.e4.legacy.ide.application) and Feature (children, menuContributions), also tried giving parent ID to Menu Contribution but nothing works. Can anybody please help me? Thanks in advance.
I am using Version: Neon.3 (4.6.3) Build id: M20170301-0400
In eclipse 3 I did it with
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
id="com.example.toolbar">
<command
commandId="com.example.mycommand"
icon="src/main/resources/icons/toolbar.png"
style="push"
tooltip="MyToolTip">
</command>
</toolbar>
</menuContribution>
</extension>
|
|
|
|
Powered by
FUDForum. Page generated in 0.25367 seconds