Search in sources :

Example 21 with SubjobContainer

use of org.talend.designer.core.ui.editor.subjobcontainer.SubjobContainer in project tdi-studio-se by Talend.

the class DisplaySubjobAction method run.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.jface.action.Action#run()
     */
public void run() {
    List editparts = getSelectedObjects();
    if (editparts.size() == 1) {
        Object o = editparts.get(0);
        if (o instanceof NodePart) {
            NodePart part = (NodePart) o;
            Node node = (Node) part.getModel();
            if (node.getJobletNode() != null) {
                node = (Node) node.getJobletNode();
            }
            DisplaySubjobCommand displaySubjobCommand = new DisplaySubjobCommand(node.getNodeContainer().getSubjobContainer());
            execute(displaySubjobCommand);
        } else if (o instanceof SubjobContainerPart) {
            SubjobContainerPart part = (SubjobContainerPart) o;
            SubjobContainer subjob = (SubjobContainer) part.getModel();
            DisplaySubjobCommand displaySubjobCommand = new DisplaySubjobCommand(subjob);
            execute(displaySubjobCommand);
        }
    }
}
Also used : DisplaySubjobCommand(org.talend.designer.core.ui.editor.cmd.DisplaySubjobCommand) SubjobContainer(org.talend.designer.core.ui.editor.subjobcontainer.SubjobContainer) Node(org.talend.designer.core.ui.editor.nodes.Node) List(java.util.List) NodePart(org.talend.designer.core.ui.editor.nodes.NodePart) SubjobContainerPart(org.talend.designer.core.ui.editor.subjobcontainer.SubjobContainerPart)

Aggregations

SubjobContainer (org.talend.designer.core.ui.editor.subjobcontainer.SubjobContainer)21 Node (org.talend.designer.core.ui.editor.nodes.Node)17 List (java.util.List)11 SubjobContainerPart (org.talend.designer.core.ui.editor.subjobcontainer.SubjobContainerPart)10 ArrayList (java.util.ArrayList)9 NodePart (org.talend.designer.core.ui.editor.nodes.NodePart)9 NodeContainer (org.talend.designer.core.ui.editor.nodecontainer.NodeContainer)8 IConnection (org.talend.core.model.process.IConnection)7 INode (org.talend.core.model.process.INode)7 Connection (org.talend.designer.core.ui.editor.connections.Connection)7 Note (org.talend.designer.core.ui.editor.notes.Note)5 HashMap (java.util.HashMap)4 EditPart (org.eclipse.gef.EditPart)4 ConnectionLabel (org.talend.designer.core.ui.editor.connections.ConnectionLabel)4 NoteEditPart (org.talend.designer.core.ui.editor.notes.NoteEditPart)4 ProcessPart (org.talend.designer.core.ui.editor.process.ProcessPart)4 Point (org.eclipse.draw2d.geometry.Point)3 IComponent (org.talend.core.model.components.IComponent)3 ISubjobContainer (org.talend.core.model.process.ISubjobContainer)3 IGraphicalNode (org.talend.core.ui.process.IGraphicalNode)3