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);
}
}
Aggregations