use of org.eclipse.gef.ui.actions.RedoAction in project jbosstools-hibernate by jbosstools.
the class DiagramViewer method createActions.
@SuppressWarnings("unchecked")
protected void createActions() {
// super.createActions();
// BEGIN: redefine super.createActions
ActionRegistry registry = getActionRegistry();
IAction action;
action = new RefreshAction(this);
registry.registerAction(action);
getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(), action);
action = new UndoAction(this);
registry.registerAction(action);
getStackActions().add(action.getId());
action = new RedoAction(this);
registry.registerAction(action);
getStackActions().add(action.getId());
action = new SelectAllAction(this);
registry.registerAction(action);
action = new DeleteAction((IWorkbenchPart) this);
registry.registerAction(action);
getSelectionActions().add(action.getId());
action = new SaveAction(this);
registry.registerAction(action);
getPropertyActions().add(action.getId());
registry.registerAction(new PrintDiagramViewerAction(this));
// END: redefine super.createActions
getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.PRINT.getId(), getActionRegistry().getAction(ActionFactory.PRINT.getId()));
getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), getActionRegistry().getAction(ActionFactory.SELECT_ALL.getId()));
action = new OpenMappingAction(this);
registry.registerAction(action);
action = new OpenSourceAction(this);
registry.registerAction(action);
action = new ExportImageAction(this);
registry.registerAction(action);
action = new AutoLayoutAction(this);
registry.registerAction(action);
ToggleConnectionsAction actionToggleConnections = new ToggleConnectionsAction(this);
registry.registerAction(actionToggleConnections);
action = new ToggleAssociationAction(this);
registry.registerAction(action);
action = new ToggleClassMappingAction(this);
registry.registerAction(action);
action = new ToggleForeignKeyConstraintAction(this);
registry.registerAction(action);
action = new TogglePropertyMappingAction(this);
registry.registerAction(action);
action = new ConnectionRouterFanAction(this);
registry.registerAction(action);
getPropertyActions().add(action.getId());
action = new ConnectionRouterManhattanAction(this);
registry.registerAction(action);
getPropertyActions().add(action.getId());
ToggleShapeExpandStateAction actionToggleShapeExpandState = new ToggleShapeExpandStateAction(this);
registry.registerAction(actionToggleShapeExpandState);
getSelectionActions().add(actionToggleShapeExpandState.getId());
action = new ShapeExpandAction(this);
registry.registerAction(action);
getSelectionActions().add(action.getId());
action = new ShapeCollapseAction(this);
registry.registerAction(action);
getSelectionActions().add(action.getId());
ToggleShapeVisibleStateAction actionToggleShapeVisibleState = new ToggleShapeVisibleStateAction(this);
registry.registerAction(actionToggleShapeVisibleState);
getSelectionActions().add(actionToggleShapeVisibleState.getId());
action = new ShapeHideAction(this);
registry.registerAction(action);
getSelectionActions().add(action.getId());
action = new ShapeShowAction(this);
registry.registerAction(action);
getSelectionActions().add(action.getId());
// action = new CollapseAllAction(this);
// registry.registerAction(action);
// action = new ExpandAllAction(this);
// registry.registerAction(action);
action = new ZoomInAction(gefRootEditPart.getZoomManager());
registry.registerAction(action);
action = new ZoomOutAction(gefRootEditPart.getZoomManager());
registry.registerAction(action);
action = new LexicalSortingAction(this, null);
registry.registerAction(action);
Action[] act = new Action[4];
act[0] = (Action) registry.getAction(TogglePropertyMappingAction.ACTION_ID);
act[1] = (Action) registry.getAction(ToggleClassMappingAction.ACTION_ID);
act[2] = (Action) registry.getAction(ToggleAssociationAction.ACTION_ID);
act[3] = (Action) registry.getAction(ToggleForeignKeyConstraintAction.ACTION_ID);
// act[4] = null;
// act[5] = (Action)registry.getAction(ConnectionRouterManhattanAction.ACTION_ID);
// act[6] = (Action)registry.getAction(ConnectionRouterFanAction.ACTION_ID);
actionToggleConnections.setMenuCreator(new ActionMenu(act));
// act = new Action[2];
// act[0] = (Action)registry.getAction(ShapeExpandAction.ACTION_ID);
// act[1] = (Action)registry.getAction(ShapeCollapseAction.ACTION_ID);
// actionToggleShapeExpandState.setMenuCreator(new ActionMenu(act));
// act = new Action[2];
// act[0] = (Action)registry.getAction(ShapeShowAction.ACTION_ID);
// act[1] = (Action)registry.getAction(ShapeHideAction.ACTION_ID);
// actionToggleShapeVisibleState.setMenuCreator(new ActionMenu(act));
}
use of org.eclipse.gef.ui.actions.RedoAction in project cubrid-manager by CUBRID.
the class ERSchemaEditor method createActions.
/**
* Creates actions and registers them to the ActionRegistry.
*/
protected void createActions() {
addStackAction(new UndoAction(this));
addStackAction(new RedoAction(this));
// er own deleting action
addEditPartAction(new DeleteAction(this));
addEditPartAction(new ImportERwinDataAction(this));
addEditPartAction(new ModifyTableNameAction(this));
addEditPartAction(new AddColumnAction(this));
addEditPartAction(new EditTableAction(this));
}
use of org.eclipse.gef.ui.actions.RedoAction in project knime-core by knime.
the class WorkflowEditor method createActions.
/**
* Creates the editor actions.
*
* @see org.eclipse.gef.ui.parts.GraphicalEditor#createActions()
*/
@Override
protected void createActions() {
LOGGER.debug("creating editor actions...");
// super already does something for us...
super.createActions();
// Stack actions
StackAction undo = new UndoAction(this);
StackAction redo = new RedoAction(this);
// Editor Actions
WorkbenchPartAction delete = new NodeConnectionContainerDeleteAction(this);
WorkbenchPartAction save = new SaveAction(this);
WorkbenchPartAction saveAs = new SaveAsAction(this);
WorkbenchPartAction print = new PrintAction(this);
WorkbenchPartAction hideNodeName = new HideNodeNamesAction(this);
WorkbenchPartAction showNodeIdAction = new ShowNodeIdsAction(this);
// node actions
//
AbstractNodeAction openDialog = new OpenDialogAction(this);
AbstractNodeAction execute = new ExecuteAction(this);
AbstractNodeAction executeAll = new ExecuteAllAction(this);
AbstractNodeAction cancelAll = new CancelAllAction(this);
AbstractNodeAction cancel = new CancelAction(this);
AbstractNodeAction pause = new PauseLoopExecutionAction(this);
AbstractNodeAction step = new StepLoopAction(this);
AbstractNodeAction resume = new ResumeLoopAction(this);
AbstractNodeAction executeAndView = new ExecuteAndOpenViewAction(this);
AbstractNodeAction reset = new ResetAction(this);
AbstractNodeAction selectScope = new SelectLoopAction(this);
AbstractNodeAction setNameAndDescription = new SetNodeDescriptionAction(this);
AbstractNodeAction toggleFlowVarPorts = new ToggleFlowVarPortsAction(this);
AbstractNodeAction defaultOpenView = new DefaultOpenViewAction(this);
AbstractNodeAction metaNodeReConfigure = new MetaNodeReconfigureAction(this);
AbstractNodeAction metaNodeChangeLink = new ChangeMetaNodeLinkAction(this);
AbstractNodeAction defineMetaNodeTemplate = new SaveAsMetaNodeTemplateAction(this);
AbstractNodeAction checkUpdateMetaNodeLink = new CheckUpdateMetaNodeLinkAction(this);
AbstractNodeAction revealMetaNodeTemplate = new RevealMetaNodeTemplateAction(this);
AbstractNodeAction disconnectMetaNodeLink = new DisconnectMetaNodeLinkAction(this);
AbstractNodeAction lockMetaLink = new LockMetaNodeAction(this);
AbstractNodeAction subNodeReConfigure = new SubNodeReconfigureAction(this);
AbstractNodeAction subNodeChangeLink = new ChangeSubNodeLinkAction(this);
AbstractNodeAction defineSubNodeTemplate = new SaveAsSubNodeTemplateAction(this);
AbstractNodeAction checkUpdateSubNodeLink = new CheckUpdateMetaNodeLinkAction(this);
AbstractNodeAction revealSubNodeTemplate = new RevealSubNodeTemplateAction(this);
AbstractNodeAction disconnectSubNodeLink = new DisconnectSubNodeLinkAction(this);
AbstractNodeAction lockSubLink = new LockSubNodeAction(this);
// new annotation action
AddAnnotationAction annotation = new AddAnnotationAction(this);
// copy / cut / paste action
CopyAction copy = new CopyAction(this);
CutAction cut = new CutAction(this);
PasteAction paste = new PasteAction(this);
PasteActionContextMenu pasteContext = new PasteActionContextMenu(this);
CollapseMetaNodeAction collapse = new CollapseMetaNodeAction(this);
EncapsulateSubNodeAction encapsulate = new EncapsulateSubNodeAction(this);
ExpandMetaNodeAction expand = new ExpandMetaNodeAction(this);
ExpandSubNodeAction expandSub = new ExpandSubNodeAction(this);
ConvertMetaNodeToSubNodeAction wrap = new ConvertMetaNodeToSubNodeAction(this);
ConvertSubNodeToMetaNodeAction unWrap = new ConvertSubNodeToMetaNodeAction(this);
// register the actions
m_actionRegistry.registerAction(undo);
m_actionRegistry.registerAction(redo);
m_actionRegistry.registerAction(delete);
m_actionRegistry.registerAction(save);
m_actionRegistry.registerAction(saveAs);
m_actionRegistry.registerAction(print);
m_actionRegistry.registerAction(openDialog);
m_actionRegistry.registerAction(execute);
m_actionRegistry.registerAction(executeAll);
m_actionRegistry.registerAction(cancelAll);
m_actionRegistry.registerAction(cancel);
m_actionRegistry.registerAction(pause);
m_actionRegistry.registerAction(step);
m_actionRegistry.registerAction(resume);
m_actionRegistry.registerAction(executeAndView);
m_actionRegistry.registerAction(reset);
m_actionRegistry.registerAction(selectScope);
m_actionRegistry.registerAction(toggleFlowVarPorts);
m_actionRegistry.registerAction(setNameAndDescription);
m_actionRegistry.registerAction(defaultOpenView);
m_actionRegistry.registerAction(copy);
m_actionRegistry.registerAction(cut);
m_actionRegistry.registerAction(paste);
m_actionRegistry.registerAction(pasteContext);
m_actionRegistry.registerAction(hideNodeName);
m_actionRegistry.registerAction(showNodeIdAction);
m_actionRegistry.registerAction(collapse);
m_actionRegistry.registerAction(encapsulate);
m_actionRegistry.registerAction(expand);
m_actionRegistry.registerAction(expandSub);
m_actionRegistry.registerAction(wrap);
m_actionRegistry.registerAction(unWrap);
m_actionRegistry.registerAction(metaNodeReConfigure);
m_actionRegistry.registerAction(metaNodeChangeLink);
m_actionRegistry.registerAction(defineMetaNodeTemplate);
m_actionRegistry.registerAction(checkUpdateMetaNodeLink);
m_actionRegistry.registerAction(revealMetaNodeTemplate);
m_actionRegistry.registerAction(disconnectMetaNodeLink);
m_actionRegistry.registerAction(lockMetaLink);
m_actionRegistry.registerAction(subNodeReConfigure);
m_actionRegistry.registerAction(subNodeChangeLink);
m_actionRegistry.registerAction(defineSubNodeTemplate);
m_actionRegistry.registerAction(checkUpdateSubNodeLink);
m_actionRegistry.registerAction(revealSubNodeTemplate);
m_actionRegistry.registerAction(disconnectSubNodeLink);
m_actionRegistry.registerAction(lockSubLink);
m_actionRegistry.registerAction(annotation);
// remember ids for later updates via 'updateActions'
m_editorActions = new ArrayList<String>();
m_editorActions.add(undo.getId());
m_editorActions.add(redo.getId());
m_editorActions.add(delete.getId());
m_editorActions.add(save.getId());
m_editorActions.add(saveAs.getId());
m_editorActions.add(openDialog.getId());
m_editorActions.add(execute.getId());
m_editorActions.add(executeAll.getId());
m_editorActions.add(cancelAll.getId());
m_editorActions.add(executeAndView.getId());
m_editorActions.add(reset.getId());
m_editorActions.add(setNameAndDescription.getId());
m_editorActions.add(toggleFlowVarPorts.getId());
m_editorActions.add(defaultOpenView.getId());
m_editorActions.add(hideNodeName.getId());
m_editorActions.add(showNodeIdAction.getId());
m_editorActions.add(collapse.getId());
m_editorActions.add(expand.getId());
m_editorActions.add(unWrap.getId());
m_editorActions.add(copy.getId());
m_editorActions.add(cut.getId());
m_editorActions.add(paste.getId());
m_editorActions.add(metaNodeReConfigure.getId());
m_editorActions.add(subNodeReConfigure.getId());
m_editorActions.add(metaNodeChangeLink.getId());
m_editorActions.add(defineMetaNodeTemplate.getId());
m_editorActions.add(checkUpdateMetaNodeLink.getId());
m_editorActions.add(annotation.getId());
}
Aggregations