Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to contribute to main toolbar using Eclipse 4?(E4 Eclipse4 Toolbar ToolItem ToolbarContribution)
How to contribute to main toolbar using Eclipse 4? [message #1781324] Tue, 06 February 2018 05:53
Jash Dave is currently offline Jash DaveFriend
Messages: 2
Registered: February 2018
Junior Member
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>
Previous Topic:Drag a tree view node from one JavaFX part to another part of an eclipse E4 RCP application
Next Topic:Preferences in ConfigurationScope are not written
Goto Forum:
  


Current Time: Tue Sep 25 18:33:24 GMT 2018

Powered by FUDForum. Page generated in 0.01714 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top