Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to add a separator to MenuManager in RCP?
How to add a separator to MenuManager in RCP? [message #249326] Fri, 04 June 2004 12:20 Go to next message
Eclipse UserFriend
Originally posted by: dengrongjun.harbournetworks.com

In my Rcp application,I want to add a separator for a
MenuManager,What
can I do?Follow is the source snippet.

private MenuManager createFileMenu(IWorkbenchWindow window){
MenuManager menu = new MenuManager("File",
IWorkbenchActionConstants.M_FILE);
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
menu.add(ActionFactory.OPEN_NEW_WINDOW.create(window));
menu.add(ActionFactory.SAVE.create(window));
menu.add(ActionFactory.SAVE_ALL.create(window));
menu.add(ActionFactory.SAVE_AS.create(window));
//I want add a separator between SAVE_AS and QUIT
// menu.add(new MenuItem(menu.getMenu(), SWT.SEPARATOR));
menu.add(ActionFactory.QUIT.create(window));
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
return menu;
}
Re: How to add a separator to MenuManager in RCP? [message #249612 is a reply to message #249326] Fri, 04 June 2004 15:36 Go to previous message
Michael Keppler is currently offline Michael KepplerFriend
Messages: 164
Registered: July 2009
Senior Member
Rodger schrieb:

> In my Rcp application,I want to add a separator for a
> MenuManager,What

menu.add(new Separator());
Previous Topic:whether this feature is in eclipse CVS
Next Topic:Can we disable back button on Wizard Page?
Goto Forum:
  


Current Time: Fri Nov 08 23:00:57 GMT 2024

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

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

Back to the top