How to add a separator to MenuManager in RCP? [message #249326] |
Fri, 04 June 2004 12:20 |
Eclipse User |
|
|
|
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;
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.02830 seconds