use of org.eclipse.sirius.diagram.DNodeContainer 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.eclipse.sirius.diagram.DNodeContainer 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);
}
use of org.eclipse.sirius.diagram.DNodeContainer 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);
}
use of org.eclipse.sirius.diagram.DNodeContainer in project InformationSystem by ObeoNetwork.
the class SOAService method allSelectableExternalComponents.
public List<Component> allSelectableExternalComponents(System context, DSemanticDiagram semanticDiagram) {
List<Component> allNonReferencedExternalComponents = allNonReferencedExternalComponents(context);
List<Component> allComponentToRemove = new ArrayList<Component>();
// "DNodeContainer"
for (EObject obj : EcoreService.eContents(semanticDiagram, DNodeContainer.class)) {
// Retrieve and add the target of DNodeContainer type of Component
if (((DNodeContainer) obj).getTarget() instanceof Component) {
allComponentToRemove.add((Component) ((DNodeContainer) obj).getTarget());
}
}
allNonReferencedExternalComponents.removeAll(allComponentToRemove);
return allNonReferencedExternalComponents;
}
Aggregations