Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Dropdown in Toolbar(A Toolbar Dropdown is generated but no Menu is shown)
Dropdown in Toolbar [message #736876] Fri, 14 October 2011 12:26
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 10
Registered: September 2011
Junior Member
I want to create a Toolbar Dropdown like the "New" Dropdown in Eclipse. The Dropdown should be contributed via a Processor. The Dropdown Menu, a Button with a small arrow on the right, is generated but if I click on the arrow, there is no menu. this is my code:

MDirectMenuItem menuItem = MMenuFactory.INSTANCE.createDirectMenuItem();
MToolBar elem=(MToolBar)eservice.find("toolbar:org.eclipse.ui.main.toolbar",application);
MMenu toolMenu = MMenuFactory.INSTANCE.createMenu();
MDirectToolItem toolItem=MMenuFactory.INSTANCE.createDirectToolItem();

There is a bug report 356309 stating that a static Dropdown Menu isnt shown, is the dynamic menu not shown for the same reason?

In the bug report a workaround "force the rendering engine to create the widget for the menu" is mentioned, how do I this? A snippet would be very helpfull.


Previous Topic:Correct use EModelService.findElements?
Next Topic:Making the e4 pojo programming model accessible from org.eclipse.ui extension points
Goto Forum:

Current Time: Fri Jan 24 14:04:23 GMT 2020

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

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

Back to the top