Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Run Menu order
Run Menu order [message #491274] Tue, 13 October 2009 22:11 Go to next message
VincentL is currently offline VincentL
Messages: 88
Registered: July 2009
Member
Hi,

I'm developing an RCP application with a large set of plugins from the Eclipse IDE.

To simplify the usability of our interface, we provides some activities and capabilities
to filter the menu items and toolbars.

Here is my problem:

When we activate some capabilities that contains reference to the org.eclipse.debug.ui
plugin, the org.eclipse.debug.ui plugin makes contribution to our main menu by adding the
"Run" menu item. Moreover the item appears at the end of the menu as the last item (after
the window and help menu). Since my rcp doesn't provide any contribution item in the run
menu (no command, no action), I don't know how to force this menu to appear before the
window menu.

I tried to add the following code in my applicationActionBarAdvisor but it doesnt work:

...
final MenuManager runMenuManager = new MenuManager("&Run", "org.eclipse.ui.run");
menuBar.add(runMenuManager);
runMenuManager.setActionDefinitionId("org.eclipse.ui.run");
runMenuManager.add(new Separator(ICommonMenuConstants.GROUP_TOP));
runMenuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));

// WINDOW
final MenuManager windowMenuManager = new MenuManager(
"&Window",IWorkbenchActionConstants.M_WINDOW);
menuBar.add(windowMenuManager);
...

Any idea?

Thanks
Re: Run Menu order [message #491416 is a reply to message #491274] Wed, 14 October 2009 13:24 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

What if you put an MB_ADDITIONS group marker in the top level menu (the one that contains File, Window, and Help)?

PW


Re: Run Menu order [message #491421 is a reply to message #491416] Wed, 14 October 2009 13:34 Go to previous message
VincentL is currently offline VincentL
Messages: 88
Registered: July 2009
Member
Hi Paul,

It works now.

Thanks.

Vincent
Previous Topic:Calling ANT programatically
Next Topic:Logging and Tracing?
Goto Forum:
  


Current Time: Tue Sep 23 16:24:34 GMT 2014

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

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