Search in sources :

Example 1 with CompleteComponentType

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

the class ReconnectSourceOfConformsCompleteRelation method execute.

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

Example 2 with CompleteComponentType

use of org.palladiosimulator.pcm.repository.CompleteComponentType 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)2 CompleteComponentType (org.palladiosimulator.pcm.repository.CompleteComponentType)2 ImplementationComponentType (org.palladiosimulator.pcm.repository.ImplementationComponentType)1 ProvidesComponentType (org.palladiosimulator.pcm.repository.ProvidesComponentType)1