use of org.palladiosimulator.pcm.resourceenvironment.LinkingResource in project Palladio-Editors-Sirius by PalladioSimulator.
the class ReconnectLinkingResourceOfConnector method execute.
@Override
public void execute(Collection<? extends EObject> selection, Map<String, Object> parameters) {
DNodeContainer otherEnd = (DNodeContainer) parameters.get("otherEnd");
ResourceContainer element = (ResourceContainer) otherEnd.getTarget();
LinkingResource source = (LinkingResource) parameters.get("source");
LinkingResource target = (LinkingResource) parameters.get("target");
source.getConnectedResourceContainers_LinkingResource().remove(element);
target.getConnectedResourceContainers_LinkingResource().add(element);
}
use of org.palladiosimulator.pcm.resourceenvironment.LinkingResource in project Palladio-Editors-Sirius by PalladioSimulator.
the class RemoveConnectorAction method execute.
@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
DEdge edge = (DEdge) parameters.get("elementView");
LinkingResource linkingResource = (LinkingResource) edge.getTarget();
EdgeTarget targetNode = edge.getTargetNode();
ResourceContainer resourceContainer = (ResourceContainer) (((DDiagramElement) targetNode).getTarget());
linkingResource.getConnectedResourceContainers_LinkingResource().remove(resourceContainer);
}
Aggregations