use of org.eclipse.wst.server.ui.internal.actions.NewServerWizardAction in project webtools.servertools by eclipse.
the class ServerActionProvider method addTopSection.
protected void addTopSection(IMenuManager menu, IServer server, IModule[] module) {
MenuManager newMenu = new MenuManager(Messages.actionNew, NEW_MENU_ID);
IAction newServerAction = new NewServerWizardAction();
newServerAction.setText(Messages.actionNewServer);
newMenu.add(newServerAction);
menu.add(newMenu);
// open action
if (server != null && module == null) {
menu.add(openAction);
String text = Messages.actionShowIn;
final IWorkbench workbench = PlatformUI.getWorkbench();
final IBindingService bindingService = (IBindingService) workbench.getAdapter(IBindingService.class);
final TriggerSequence[] activeBindings = bindingService.getActiveBindingsFor(SHOW_IN_MENU_ID);
if (activeBindings.length > 0) {
text += "\t" + activeBindings[0].format();
}
MenuManager showInMenu = new MenuManager(text, SHOW_IN_MENU_ID);
showInMenu.add(showInConsoleAction);
showInMenu.add(showInDebugAction);
menu.add(showInMenu);
}
}
Aggregations