Search in sources :

Example 1 with DRepresentationElement

use of org.eclipse.sirius.viewpoint.DRepresentationElement in project Palladio-Editors-Sirius by PalladioSimulator.

the class ReconnectSourceOfUsageFlow method execute.

@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
    AbstractUserAction oldSource = (AbstractUserAction) parameters.get("source");
    AbstractUserAction newSource = (AbstractUserAction) parameters.get("target");
    DRepresentationElement otherEnd = (DRepresentationElement) parameters.get("otherEnd");
    // disallow self looping
    if (!otherEnd.getTarget().equals(newSource)) {
        newSource.setSuccessor((AbstractUserActionImpl) otherEnd.getTarget());
        oldSource.setSuccessor(null);
    }
}
Also used : AbstractUserAction(org.palladiosimulator.pcm.usagemodel.AbstractUserAction) DRepresentationElement(org.eclipse.sirius.viewpoint.DRepresentationElement)

Aggregations

DRepresentationElement (org.eclipse.sirius.viewpoint.DRepresentationElement)1 AbstractUserAction (org.palladiosimulator.pcm.usagemodel.AbstractUserAction)1