Search in sources :

Example 1 with ProvidesComponentType

use of org.palladiosimulator.pcm.repository.ProvidesComponentType in project Palladio-Editors-Sirius by PalladioSimulator.

the class ReconnectSourceOfConformsProvidesRelation method execute.

@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
    CompleteComponentType newSource = (CompleteComponentType) parameters.get("target");
    CompleteComponentType oldSource = (CompleteComponentType) parameters.get("source");
    DNodeContainer otherEnd = (DNodeContainer) parameters.get("otherEnd");
    ProvidesComponentType target = (ProvidesComponentType) otherEnd.getTarget();
    newSource.getParentProvidesComponentTypes().add(target);
    oldSource.getParentProvidesComponentTypes().remove(target);
}
Also used : DNodeContainer(org.eclipse.sirius.diagram.DNodeContainer) CompleteComponentType(org.palladiosimulator.pcm.repository.CompleteComponentType) ProvidesComponentType(org.palladiosimulator.pcm.repository.ProvidesComponentType)

Aggregations

DNodeContainer (org.eclipse.sirius.diagram.DNodeContainer)1 CompleteComponentType (org.palladiosimulator.pcm.repository.CompleteComponentType)1 ProvidesComponentType (org.palladiosimulator.pcm.repository.ProvidesComponentType)1