Search in sources :

Example 6 with AbstractEditPart

use of org.eclipse.gef.editparts.AbstractEditPart in project tdi-studio-se by Talend.

the class TalendConnectionCreationTool method performConnectionStartWith.

/**
     * The node part of the source must be given in argument. This will define the fist point of the connection.
     * 
     * @param sourcePart the edit part that will be the source of the connection
     */
public void performConnectionStartWith(EditPart sourcePart) {
    this.sourcePart = sourcePart;
    setConnectionSource(sourcePart);
    updateTargetRequest();
    Command cmd = ((AbstractEditPart) sourcePart).getCommand(getTargetRequest());
    setCurrentCommand(cmd);
    setState(STATE_CONNECTION_STARTED);
}
Also used : CompoundCommand(org.eclipse.gef.commands.CompoundCommand) Command(org.eclipse.gef.commands.Command) AbstractEditPart(org.eclipse.gef.editparts.AbstractEditPart)

Aggregations

AbstractEditPart (org.eclipse.gef.editparts.AbstractEditPart)6 ArrayList (java.util.ArrayList)3 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)3 List (java.util.List)2 Point (org.eclipse.draw2d.geometry.Point)2 EObject (org.eclipse.emf.ecore.EObject)2 View (org.eclipse.gmf.runtime.notation.View)2 RequestType (org.knime.workbench.editor2.CreateDropRequest.RequestType)2 CreateSpaceAction (org.knime.workbench.editor2.actions.CreateSpaceAction)2 NodeContainerEditPart (org.knime.workbench.editor2.editparts.NodeContainerEditPart)2 BusinessItem (org.talend.designer.business.model.business.BusinessItem)2 HashMap (java.util.HashMap)1 Command (org.eclipse.gef.commands.Command)1 CompoundCommand (org.eclipse.gef.commands.CompoundCommand)1 CreateMetaNodeTemplateCommand (org.knime.workbench.editor2.commands.CreateMetaNodeTemplateCommand)1 CreateNodeCommand (org.knime.workbench.editor2.commands.CreateNodeCommand)1 InsertMetaNodeTempalteCommand (org.knime.workbench.editor2.commands.InsertMetaNodeTempalteCommand)1 InsertNodeCommand (org.knime.workbench.editor2.commands.InsertNodeCommand)1 ReplaceMetaNodeTemplateCommand (org.knime.workbench.editor2.commands.ReplaceMetaNodeTemplateCommand)1 ReplaceNodeCommand (org.knime.workbench.editor2.commands.ReplaceNodeCommand)1