Search in sources :

Example 1 with PrintAction

use of org.eclipse.gef.ui.actions.PrintAction 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());
}
Also used : StackAction(org.eclipse.gef.ui.actions.StackAction) SaveAsAction(org.knime.workbench.editor2.actions.SaveAsAction) DisconnectMetaNodeLinkAction(org.knime.workbench.editor2.actions.DisconnectMetaNodeLinkAction) HideNodeNamesAction(org.knime.workbench.editor2.actions.HideNodeNamesAction) RedoAction(org.eclipse.gef.ui.actions.RedoAction) AbstractNodeAction(org.knime.workbench.editor2.actions.AbstractNodeAction) ExecuteAndOpenViewAction(org.knime.workbench.editor2.actions.ExecuteAndOpenViewAction) ChangeMetaNodeLinkAction(org.knime.workbench.editor2.actions.ChangeMetaNodeLinkAction) ExecuteAction(org.knime.workbench.editor2.actions.ExecuteAction) CheckUpdateMetaNodeLinkAction(org.knime.workbench.editor2.actions.CheckUpdateMetaNodeLinkAction) SetNodeDescriptionAction(org.knime.workbench.editor2.actions.SetNodeDescriptionAction) ExpandMetaNodeAction(org.knime.workbench.editor2.actions.ExpandMetaNodeAction) ToggleFlowVarPortsAction(org.knime.workbench.editor2.actions.ToggleFlowVarPortsAction) SubNodeReconfigureAction(org.knime.workbench.editor2.actions.SubNodeReconfigureAction) MetaNodeReconfigureAction(org.knime.workbench.editor2.actions.MetaNodeReconfigureAction) DefaultOpenViewAction(org.knime.workbench.editor2.actions.DefaultOpenViewAction) PauseLoopExecutionAction(org.knime.workbench.editor2.actions.PauseLoopExecutionAction) ResumeLoopAction(org.knime.workbench.editor2.actions.ResumeLoopAction) WorkbenchPartAction(org.eclipse.gef.ui.actions.WorkbenchPartAction) SaveAction(org.eclipse.gef.ui.actions.SaveAction) CutAction(org.knime.workbench.editor2.actions.CutAction) ShowNodeIdsAction(org.knime.workbench.editor2.actions.ShowNodeIdsAction) PrintAction(org.eclipse.gef.ui.actions.PrintAction) CancelAction(org.knime.workbench.editor2.actions.CancelAction) CollapseMetaNodeAction(org.knime.workbench.editor2.actions.CollapseMetaNodeAction) AddAnnotationAction(org.knime.workbench.editor2.actions.AddAnnotationAction) StepLoopAction(org.knime.workbench.editor2.actions.StepLoopAction) ExecuteAllAction(org.knime.workbench.editor2.actions.ExecuteAllAction) DisconnectSubNodeLinkAction(org.knime.workbench.editor2.actions.DisconnectSubNodeLinkAction) RevealSubNodeTemplateAction(org.knime.workbench.editor2.actions.RevealSubNodeTemplateAction) NodeConnectionContainerDeleteAction(org.knime.workbench.editor2.actions.NodeConnectionContainerDeleteAction) SaveAsMetaNodeTemplateAction(org.knime.workbench.editor2.actions.SaveAsMetaNodeTemplateAction) ConvertMetaNodeToSubNodeAction(org.knime.workbench.editor2.actions.ConvertMetaNodeToSubNodeAction) ConvertSubNodeToMetaNodeAction(org.knime.workbench.editor2.actions.ConvertSubNodeToMetaNodeAction) CopyAction(org.knime.workbench.editor2.actions.CopyAction) LockMetaNodeAction(org.knime.workbench.editor2.actions.LockMetaNodeAction) PasteActionContextMenu(org.knime.workbench.editor2.actions.PasteActionContextMenu) SelectLoopAction(org.knime.workbench.editor2.actions.SelectLoopAction) RevealMetaNodeTemplateAction(org.knime.workbench.editor2.actions.RevealMetaNodeTemplateAction) EncapsulateSubNodeAction(org.knime.workbench.editor2.actions.EncapsulateSubNodeAction) ExpandSubNodeAction(org.knime.workbench.editor2.actions.ExpandSubNodeAction) PasteAction(org.knime.workbench.editor2.actions.PasteAction) ResetAction(org.knime.workbench.editor2.actions.ResetAction) LockSubNodeAction(org.knime.workbench.editor2.actions.LockSubNodeAction) ChangeSubNodeLinkAction(org.knime.workbench.editor2.actions.ChangeSubNodeLinkAction) SaveAsSubNodeTemplateAction(org.knime.workbench.editor2.actions.SaveAsSubNodeTemplateAction) UndoAction(org.eclipse.gef.ui.actions.UndoAction) CancelAllAction(org.knime.workbench.editor2.actions.CancelAllAction) OpenDialogAction(org.knime.workbench.editor2.actions.OpenDialogAction)

Aggregations

PrintAction (org.eclipse.gef.ui.actions.PrintAction)1 RedoAction (org.eclipse.gef.ui.actions.RedoAction)1 SaveAction (org.eclipse.gef.ui.actions.SaveAction)1 StackAction (org.eclipse.gef.ui.actions.StackAction)1 UndoAction (org.eclipse.gef.ui.actions.UndoAction)1 WorkbenchPartAction (org.eclipse.gef.ui.actions.WorkbenchPartAction)1 AbstractNodeAction (org.knime.workbench.editor2.actions.AbstractNodeAction)1 AddAnnotationAction (org.knime.workbench.editor2.actions.AddAnnotationAction)1 CancelAction (org.knime.workbench.editor2.actions.CancelAction)1 CancelAllAction (org.knime.workbench.editor2.actions.CancelAllAction)1 ChangeMetaNodeLinkAction (org.knime.workbench.editor2.actions.ChangeMetaNodeLinkAction)1 ChangeSubNodeLinkAction (org.knime.workbench.editor2.actions.ChangeSubNodeLinkAction)1 CheckUpdateMetaNodeLinkAction (org.knime.workbench.editor2.actions.CheckUpdateMetaNodeLinkAction)1 CollapseMetaNodeAction (org.knime.workbench.editor2.actions.CollapseMetaNodeAction)1 ConvertMetaNodeToSubNodeAction (org.knime.workbench.editor2.actions.ConvertMetaNodeToSubNodeAction)1 ConvertSubNodeToMetaNodeAction (org.knime.workbench.editor2.actions.ConvertSubNodeToMetaNodeAction)1 CopyAction (org.knime.workbench.editor2.actions.CopyAction)1 CutAction (org.knime.workbench.editor2.actions.CutAction)1 DefaultOpenViewAction (org.knime.workbench.editor2.actions.DefaultOpenViewAction)1 DisconnectMetaNodeLinkAction (org.knime.workbench.editor2.actions.DisconnectMetaNodeLinkAction)1