< prev index next >

application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/ApplicationActionBarAdvisor.java

Print this page




 236                 MenuManager newMenu = new MenuManager(newText, newId);
 237                 newMenu.add(new Separator(newId));
 238                 newMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
 239                 menu.add(newMenu);
 240                 menu.add(openAction);
 241                 menu.add(saveAction);
 242                 menu.add(saveAsAction);
 243                 createDebug(menu);
 244 
 245                 menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
 246                 menu.add(new Separator());
 247                 menu.add(closeAction);
 248                 menu.add(closeAllAction);
 249                 menu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));
 250                 menu.add(new Separator());
 251                 menu.add(ActionFactory.EXPORT.create(window));
 252                 menu.add(ActionFactory.IMPORT.create(window));
 253                 menu.add(new GroupMarker(IWorkbenchActionConstants.IMPORT_EXT));
 254                 menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
 255 
 256                 // these three lines create the list of "recent" files
 257                 menu.add(ContributionItemFactory.REOPEN_EDITORS.create(window));
 258                 menu.add(new GroupMarker(IWorkbenchActionConstants.MRU));






 259                 menu.add(new Separator());
 260 
 261                 menu.add(getAction(ActionFactory.QUIT.getId()));
 262                 menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
 263                 return menu;
 264         }
 265 
 266         private MenuManager createNavigateMenu(IWorkbenchWindow window) {
 267                 MenuManager menu = new MenuManager(Messages.ApplicationActionBarAdvisor_MENU_NAVIGATE_TEXT,
 268                                 IWorkbenchActionConstants.M_NAVIGATE);
 269                 menu.add(backwardAction);
 270                 menu.add(forwardAction);
 271                 return menu;
 272         }
 273 }


 236                 MenuManager newMenu = new MenuManager(newText, newId);
 237                 newMenu.add(new Separator(newId));
 238                 newMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
 239                 menu.add(newMenu);
 240                 menu.add(openAction);
 241                 menu.add(saveAction);
 242                 menu.add(saveAsAction);
 243                 createDebug(menu);
 244 
 245                 menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
 246                 menu.add(new Separator());
 247                 menu.add(closeAction);
 248                 menu.add(closeAllAction);
 249                 menu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));
 250                 menu.add(new Separator());
 251                 menu.add(ActionFactory.EXPORT.create(window));
 252                 menu.add(ActionFactory.IMPORT.create(window));
 253                 menu.add(new GroupMarker(IWorkbenchActionConstants.IMPORT_EXT));
 254                 menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
 255 
 256                 // this is where OPEN_CONNECTION is placed via plugin.xml from org.openjdk.jmc.browser
 257                 menu.add(new Separator());
 258 
 259                 // create a submenu for the list of Recent Files
 260                 MenuManager recentMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_MENU_RECENT_FILES_TEXT,
 261                                 ContributionItemFactory.REOPEN_EDITORS.getId());
 262                 recentMenu.add(ContributionItemFactory.REOPEN_EDITORS.create(window));
 263                 recentMenu.add(new GroupMarker(IWorkbenchActionConstants.MRU));
 264                 menu.add(recentMenu);
 265                 menu.add(new Separator());
 266 
 267                 menu.add(getAction(ActionFactory.QUIT.getId()));
 268                 menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
 269                 return menu;
 270         }
 271 
 272         private MenuManager createNavigateMenu(IWorkbenchWindow window) {
 273                 MenuManager menu = new MenuManager(Messages.ApplicationActionBarAdvisor_MENU_NAVIGATE_TEXT,
 274                                 IWorkbenchActionConstants.M_NAVIGATE);
 275                 menu.add(backwardAction);
 276                 menu.add(forwardAction);
 277                 return menu;
 278         }
 279 }
< prev index next >