use of com.cubrid.cubridmanager.ui.common.action.QuitAction in project cubrid-manager by CUBRID.
the class ApplicationActionBarAdvisor method makeActions.
/**
* Instantiates the actions used in the fill methods.
*
* @see org.eclipse.ui.application.ActionBarAdvisor#makeActions(org.eclipse
* .ui.IWorkbenchWindow)
*
* @param window the window containing the action bars
*/
protected void makeActions(IWorkbenchWindow window) {
ActionManager manager = ActionManager.getInstance();
CubridActionBuilder.init();
serviceDashboardAction = (ServiceDashboardAction) manager.getAction(ServiceDashboardAction.ID);
if (serviceDashboardAction != null) {
serviceDashboardAction.setText(com.cubrid.common.ui.spi.Messages.serviceDashboardActionName);
register(serviceDashboardAction);
}
// customized actions for CUBRID Manager
//common action
preferenceAction = new OpenPreferenceAction(window.getShell(), Messages.openPreferenceActionName, null);
register(preferenceAction);
// It must be needed to use a Preferences Menu of an Application Menu on Mac.
preferenceAction.setId("preferences");
manager.registerAction(preferenceAction);
quitAction = new QuitAction(Messages.exitActionName);
cubridOnlineForumAction = new CubridOnlineForumAction(Messages.cubridOnlineForumActionName);
cubridProjectSiteAction = new CubridProjectSiteAction(Messages.cubridProjectSiteActionName);
aboutAction = new AboutAction(Messages.aboutActionName, Version.productName, Version.buildVersionId, CubridManagerAppPlugin.getImageDescriptor("icons/cubridmanager16.gif"), CubridManagerAppPlugin.getImageDescriptor("icons/about.gif"));
// It must be needed to use a About Menu of an Application Menu on Mac.
aboutAction.setId("about");
clientVersionAction = new AboutAction(Messages.clientVersionActionName, Version.productName, Version.buildVersionId, CubridManagerAppPlugin.getImageDescriptor("icons/cubridmanager16.gif"), CubridManagerAppPlugin.getImageDescriptor("icons/about.gif"));
newFeatureAction = new NewFeaturesAction(com.cubrid.common.ui.common.Messages.msgNewFeatures);
reportBugAction = (ReportBugAction) manager.getAction(ReportBugAction.ID);
reportBugAction.setCurrentVersion(Version.buildVersionId);
}
use of com.cubrid.cubridmanager.ui.common.action.QuitAction in project cubrid-manager by CUBRID.
the class ActionAdvisor method init.
private void init() {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
ActionManager manager = ActionManager.getInstance();
// standard actions provided by the workbench
closeAction = ActionFactory.CLOSE.create(window);
closeAction.setText(Messages.closeActionName);
// register(closeAction);
closeAllAction = ActionFactory.CLOSE_ALL.create(window);
closeAllAction.setText(Messages.closeAllActionName);
// register(closeAllAction);
saveAction = ActionFactory.SAVE.create(window);
saveAction.setText(Messages.saveActionName);
// register(saveAction);
saveasAction = ActionFactory.SAVE_AS.create(window);
saveasAction.setText(Messages.saveAsActionName);
// register(saveasAction);
saveAllAction = ActionFactory.SAVE_ALL.create(window);
saveAllAction.setText(Messages.saveAllActionName);
// register(saveAllAction);
// retarget actions provided by the workbench
undoRetargetAction = ActionFactory.UNDO.create(window);
undoRetargetAction.setText(com.cubrid.common.ui.spi.Messages.undoActionName);
// register(undoRetargetAction);
redoRetargetAction = ActionFactory.REDO.create(window);
redoRetargetAction.setText(com.cubrid.common.ui.spi.Messages.redoActionName);
// register(redoRetargetAction);
copyRetargetAction = ActionFactory.COPY.create(window);
copyRetargetAction.setText(com.cubrid.common.ui.spi.Messages.copyActionName);
// register(copyRetargetAction);
cutRetargetAction = ActionFactory.CUT.create(window);
cutRetargetAction.setText(com.cubrid.common.ui.spi.Messages.cutActionName);
// register(cutRetargetAction);
pasteRetargetAction = ActionFactory.PASTE.create(window);
pasteRetargetAction.setText(com.cubrid.common.ui.spi.Messages.pasteActionName);
// register(pasteRetargetAction);
findRetargetAction = ActionFactory.FIND.create(window);
findRetargetAction.setText(com.cubrid.common.ui.spi.Messages.findReplaceActionName);
// register(findRetargetAction);
serviceDashboardAction = (ServiceDashboardAction) manager.getAction(ServiceDashboardAction.ID);
if (serviceDashboardAction != null) {
serviceDashboardAction.setText(com.cubrid.common.ui.spi.Messages.serviceDashboardActionName);
// register(serviceDashboardAction);
}
// customized actions for CUBRID Manager
// common action
preferenceAction = new OpenPreferenceAction(window.getShell(), Messages.openPreferenceActionName, null);
// register(preferenceAction);
// It must be needed to use a
preferenceAction.setId("preferences");
// Preferences Menu of an
// Application Menu on Mac.
manager.registerAction(preferenceAction);
quitAction = new QuitAction(Messages.exitActionName);
reportBugAction = (ReportBugAction) manager.getAction(ReportBugAction.ID);
reportBugAction.setCurrentVersion(Version.buildVersionId);
}
}
Aggregations