Search in sources :

Example 1 with AbstractAction

use of org.palladiosimulator.pcm.seff.AbstractAction in project Palladio-Editors-Sirius by PalladioSimulator.

the class ReconnectSourceOfControlFlow method execute.

@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
    AbstractAction oldSource = (AbstractAction) parameters.get("source");
    AbstractAction newSource = (AbstractAction) parameters.get("target");
    DDiagramElement otherEnd = (DDiagramElement) parameters.get("otherEnd");
    // Prevent self connecting os edges
    if (!otherEnd.getTarget().equals(newSource)) {
        newSource.setSuccessor_AbstractAction((AbstractAction) otherEnd.getTarget());
        oldSource.setSuccessor_AbstractAction(null);
    }
}
Also used : DDiagramElement(org.eclipse.sirius.diagram.DDiagramElement) AbstractAction(org.palladiosimulator.pcm.seff.AbstractAction)

Aggregations

DDiagramElement (org.eclipse.sirius.diagram.DDiagramElement)1 AbstractAction (org.palladiosimulator.pcm.seff.AbstractAction)1