use of com.cubrid.common.ui.common.action.OpenPreferenceAction in project cubrid-manager by CUBRID.
the class ActionAdvisor method init.
private void init() {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
// 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);
// 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.
ActionManager.getInstance().registerAction(preferenceAction);
quitAction = new QuitAction(Messages.exitActionName);
reportBugAction = (ReportBugAction) ActionManager.getInstance().getAction(ReportBugAction.ID);
reportBugAction.setCurrentVersion(Version.buildVersionId);
// Add proxy action for toolbar
ProxyAction newConnectionAction = new ProxyAction(NewQueryConnAction.ID, com.cubrid.cubridquery.ui.spi.Messages.createConnActionNameBig, Activator.getImageDescriptor("icons/toolbar/qb_new_database_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_new_database_off.png"));
ActionManager.getInstance().registerAction(newConnectionAction);
ProxyAction newQueryAction = new ProxyAction(QueryNewAction.ID, com.cubrid.common.ui.spi.Messages.queryNewActionNameBig, Activator.getImageDescriptor("icons/toolbar/qb_new_query_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_new_query_off.png"));
ActionManager.getInstance().registerAction(newQueryAction);
ProxyAction newCustomQueryAction = new ProxyAction(QueryNewCustomAction.ID, com.cubrid.common.ui.spi.Messages.queryNewCustomActionName.replaceAll("\\.", ""), Activator.getImageDescriptor("icons/toolbar/qb_new_query_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_new_query_off.png"));
ActionManager.getInstance().registerAction(newCustomQueryAction);
ProxyAction newTableAction = new ProxyAction(NewTableAction.ID, com.cubrid.common.ui.spi.Messages.tableNewActionName.replaceAll("\\.", ""), Activator.getImageDescriptor("icons/toolbar/qb_new_table_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_new_table_off.png"));
ActionManager.getInstance().registerAction(newTableAction);
ProxyAction newViewAction = new ProxyAction(CreateViewAction.ID, com.cubrid.common.ui.spi.Messages.createViewActionName.replaceAll("\\.", ""), Activator.getImageDescriptor("icons/toolbar/qb_new_view_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_new_view_off.png"));
ActionManager.getInstance().registerAction(newViewAction);
ProxyAction newSerialAction = new ProxyAction(CreateSerialAction.ID, com.cubrid.common.ui.spi.Messages.createSerialActionName.replaceAll("\\.", ""), Activator.getImageDescriptor("icons/toolbar/qb_new_serial_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_new_serial_off.png"));
ActionManager.getInstance().registerAction(newSerialAction);
ProxyAction newTriggerAction = new ProxyAction(NewTriggerAction.ID, com.cubrid.common.ui.spi.Messages.newTriggerActionName.replaceAll("\\.", ""), Activator.getImageDescriptor("icons/toolbar/qb_new_trigger_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_new_trigger_off.png"));
ActionManager.getInstance().registerAction(newTriggerAction);
ProxyAction importAction = new ProxyAction(ImportWizardAction.ID, com.cubrid.common.ui.spi.Messages.tableImportActionName.replaceAll("\\.", ""), Activator.getImageDescriptor("icons/toolbar/qb_import_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_import_off.png"));
ActionManager.getInstance().registerAction(importAction);
ProxyAction exportAction = new ProxyAction(ExportWizardAction.ID, com.cubrid.common.ui.spi.Messages.tableExportActionName.replaceAll("\\.", ""), Activator.getImageDescriptor("icons/toolbar/qb_export_on.png"), Activator.getImageDescriptor("icons/toolbar/qb_export_off.png"));
ActionManager.getInstance().registerAction(exportAction);
ProxyAction openSchemaEditorAction = new ProxyAction(OpenSchemaEditorAction.ID, com.cubrid.common.ui.spi.Messages.schemaDesignerActionName, CommonUIPlugin.getImageDescriptor("icons/action/schema_edit_on.png"), CommonUIPlugin.getImageDescriptor("icons/action/schema_edit_off.png"));
ActionManager.getInstance().registerAction(openSchemaEditorAction);
ProxyAction refreshAction = new ProxyAction(RefreshAction.ID, com.cubrid.cubridquery.ui.spi.Messages.refreshActionName, Activator.getImageDescriptor("icons/toolbar/refresh_32.png"), Activator.getImageDescriptor("icons/toolbar/refresh_32_disabled.png"));
ActionManager.getInstance().registerAction(refreshAction);
ProxyAction reportBugProxyAction = new ProxyAction(ReportBugAction.ID, Messages.reportBugProxyAction, Activator.getImageDescriptor("icons/toolbar/qb_new_bug.png"), null);
ActionManager.getInstance().registerAction(reportBugProxyAction);
}
}
use of com.cubrid.common.ui.common.action.OpenPreferenceAction 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.common.ui.common.action.OpenPreferenceAction 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