Examples of DesignerEditor


Examples of org.jbpm.ui.editor.DesignerEditor

            }
        } else if (elementMatch.getGraphElement() instanceof Subprocess) {
            SubprocessDelegate delegate = new SubprocessDelegate();
            delegate.openDetails((Subprocess) elementMatch.getGraphElement());
        } else if (elementMatch.getGraphElement() != null) {
            DesignerEditor designerEditor = (DesignerEditor) IDE.openEditor(getSite().getPage(), elementMatch.getFile());
            designerEditor.select(elementMatch.getGraphElement());
        }
        if (editor == null) {
            return;
        }
        if (offset != 0 && length != 0) {
View Full Code Here

Examples of org.jbpm.ui.editor.DesignerEditor

import org.jbpm.ui.editor.DesignerEditor;

public class ShowGridAction extends BaseActionDelegate {

  public void run(IAction action) {
        DesignerEditor editor = getActiveDesignerEditor();
        editor.getDefinition().setShowGrid(!editor.getDefinition().isShowGrid());
  }
View Full Code Here

Examples of org.jbpm.ui.editor.DesignerEditor

        editor.getDefinition().setShowGrid(!editor.getDefinition().isShowGrid());
  }

    @Override
  public void selectionChanged(IAction action, ISelection selection) {
        DesignerEditor editor = getActiveDesignerEditor();
        action.setChecked(editor != null && editor.getDefinition().isShowGrid());
        action.setEnabled(editor != null);
  }
View Full Code Here

Examples of org.jbpm.ui.editor.DesignerEditor

import org.jbpm.ui.editor.DesignerEditor;

public class ShowActionsAction extends BaseActionDelegate {

    public void run(IAction action) {
    DesignerEditor editor = getActiveDesignerEditor();
        editor.getDefinition().setShowActions(!editor.getDefinition().isShowActions());
    }
View Full Code Here

Examples of org.jbpm.ui.editor.DesignerEditor

        editor.getDefinition().setShowActions(!editor.getDefinition().isShowActions());
    }

    @Override
    public void selectionChanged(IAction action, ISelection selection) {
        DesignerEditor editor = getActiveDesignerEditor();
        action.setChecked(editor != null && editor.getDefinition().isShowActions());
        action.setEnabled(editor != null);
    }
View Full Code Here

Examples of org.jbpm.ui.editor.DesignerEditor

            currentNode.setSwimlane(null);
        }
    }

    private void editSwimlane() {
        DesignerEditor editor = ((DesignerGraphicalEditorPart) targetPart).getEditor();
        editor.openPage(1);
        if (currentNode.getSwimlane() != null) {
            editor.select(currentNode.getSwimlane());
        }
    }
View Full Code Here

Examples of org.jbpm.ui.editor.DesignerEditor

import org.jbpm.ui.editor.DesignerEditor;

public class UpdateJpdlVersionAction extends BaseActionDelegate {

    public void run(IAction action) {
         DesignerEditor editor = getActiveDesignerEditor();
         Command command = new UpdateJpdlVersionCommand(editor, editor.getDefinitionFile(), editor.getDefinition());
         executeCommand(command);
    }
View Full Code Here

Examples of org.jbpm.ui.editor.DesignerEditor

        if (marker == null) {
            return;
        }
        try {
            IFile resource = (IFile) marker.getResource();
            DesignerEditor designerEditor = (DesignerEditor) IDE.openEditor(getSite().getPage(), resource);
            GraphElement graphElement = null;

            String elementName = marker.getAttribute(PluginConstants.SELECTION_LINK_KEY, null);
            if (elementName != null) {
                graphElement = findElement(designerEditor.getDefinition(), NamedGraphElement.class, elementName);
            }
            String swimlaneName = marker.getAttribute(PluginConstants.SWIMLANE_LINK_KEY, null);
            if (swimlaneName != null) {
                graphElement = findElement(designerEditor.getDefinition(), Swimlane.class, swimlaneName);
            }
            int actionIndex = marker.getAttribute(PluginConstants.ACTION_INDEX_KEY, -1);
            if (actionIndex != -1) {
                String parentTreePath = marker.getAttribute(PluginConstants.PARENT_NODE_KEY, null);
                String[] paths = parentTreePath.split("\\|", -1);
                Active active;
                if (paths.length == 1) {
                    active = (Active) findElement(designerEditor.getDefinition(), NamedGraphElement.class, paths[0]);
                } else if (paths.length == 2) {
                    Node node = (Node) findElement(designerEditor.getDefinition(), Node.class, paths[0]);
                    active = node.getTransitionByName(paths[1]);
                } else {
                    throw new RuntimeException("Invalid tree path: " + parentTreePath);
                }
                List<? extends Action> activeActions = active.getActions();
                graphElement = activeActions.get(actionIndex);
            }

            if (graphElement != null) {
                designerEditor.select(graphElement);
            }

        } catch (Exception e) {
            // don't display error to user
            DesignerLogger.logErrorWithoutDialog("Unable select element", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.