Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Create dropdown menu in toolbar(Create dropdown menu in toolbar)
Create dropdown menu in toolbar [message #761515] Tue, 06 December 2011 15:13 Go to next message
zippo29 is currently offline zippo29Friend
Messages: 4
Registered: December 2011
Junior Member
Hi

I am trying to create a drop down menu in a toolbar in a pure e4 application. I tried the old way via menuContributions but it does not work.

I tried Alt+Shift+F9 to see how it is done in eclipse but I can't manage to unbderstand how it is done.

There is a bug about this and it seems fixed. Am i missing something ?

Thanks in advance
Re: Create dropdown menu in toolbar [message #761620 is a reply to message #761515] Tue, 06 December 2011 18:57 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You should create a MToolItem and then set it's MMenu attribute.

PW


Re: Create dropdown menu in toolbar [message #762117 is a reply to message #761620] Wed, 07 December 2011 15:14 Go to previous messageGo to next message
zippo29 is currently offline zippo29Friend
Messages: 4
Registered: December 2011
Junior Member
Thanks for your answer but that's if I want to create the gui programatically , am I wrong ?

Is there a way to do it the declarative way via the Application.e4xmi ?
Re: Create dropdown menu in toolbar [message #762163 is a reply to message #762117] Wed, 07 December 2011 16:27 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

In the Application.e4xmi, create the model toolitem and then create a model menu and menu structure underneath it.

PW


Re: Create dropdown menu in toolbar [message #762576 is a reply to message #762163] Thu, 08 December 2011 10:31 Go to previous messageGo to next message
zippo29 is currently offline zippo29Friend
Messages: 4
Registered: December 2011
Junior Member
In the version I have of eclipse 4.1, in my Application.e4xmi I can't do that. I created a ToolbarItem by adding a WindowTrim but I can't find a Menu Child.
Re: Create dropdown menu in toolbar [message #762699 is a reply to message #762576] Thu, 08 December 2011 14:24 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Are you using the EMF SDK and the reflective editor? Or you mean with the e4xmi editor from e4?

The e4xmi editor does not yet support that child element. Please open a bug at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=E4&component=UI

PW


Re: Create dropdown menu in toolbar [message #762804 is a reply to message #762699] Thu, 08 December 2011 16:34 Go to previous message
zippo29 is currently offline zippo29Friend
Messages: 4
Registered: December 2011
Junior Member
Thanks for your answer

I tried several ways:
-I first used the default e4xmi editor. I does not allow to add menus to a handled item in a toolbar.
-Then I tried to add it manuelly in the xmi code => an arrow was displayed on the handled item but nothing happens when I click on it
-Then I tried via menu contributions in the plugin.xml
-Then I tried programatically by adding a menu to the toolbar item (setMenu method) => an arrow was displayed on the handled item but nothing happens when I click on it
-Reading your answer I tried the reflective editor. It creates the same xmi code I wrote in my first trials. I noticed though that the parent property of the menu added to the toolbar item is not updated and can't be assigned to the toolbar item.

There is a bug about drop down problems already. Can i reopen it ?

I am just wondering how did they manage to do it in eclipse ide. I tried looking up the source code but du the size of the code I never managed to get where it is done.
Previous Topic:How to setup a pure e4 Target Definition
Next Topic:Bug persistance model Part
Goto Forum:
  


Current Time: Fri Apr 26 11:20:51 GMT 2024

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

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

Back to the top