use of org.palladiosimulator.pcm.repository.PassiveResource in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddAcquireAction method getPassiveResource.
private PassiveResource getPassiveResource(AcquireAction acquireAction) {
Collection<Object> filter = new ArrayList<Object>();
filter.add(Repository.class);
filter.add(BasicComponent.class);
filter.add(PassiveResource.class);
// Additional Child References
Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
// additionalChildReferences.add(RepositoryPackage.Literals.PASSIVE_RESOURCE__BASIC_COMPONENT_PASSIVE_RESOURCE);
// Creating the dialog
PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, acquireAction.eResource().getResourceSet());
// Setting the needed object type
dialog.setProvidedService(PassiveResource.class);
dialog.open();
return (PassiveResource) dialog.getResult();
}
use of org.palladiosimulator.pcm.repository.PassiveResource in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddReleaseAction method getPassiveResource.
private PassiveResource getPassiveResource(ReleaseAction releaseAction) {
Collection<Object> filter = new ArrayList<Object>();
filter.add(Repository.class);
filter.add(BasicComponent.class);
filter.add(PassiveResource.class);
// Additional Child References
Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
// Creating the dialog
PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, releaseAction.eResource().getResourceSet());
// Setting the needed object type
dialog.setProvidedService(PassiveResource.class);
dialog.open();
return (PassiveResource) dialog.getResult();
}
use of org.palladiosimulator.pcm.repository.PassiveResource in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddAcquireAction method execute.
@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
AcquireAction acquireAction = (AcquireAction) parameters.get("instance");
PassiveResource passiveResource = getPassiveResource(acquireAction);
acquireAction.setPassiveresource_AcquireAction(passiveResource);
}
use of org.palladiosimulator.pcm.repository.PassiveResource in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddReleaseAction method execute.
@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
ReleaseAction releaseAction = (ReleaseAction) parameters.get("instance");
PassiveResource passiveResource = getPassiveResource(releaseAction);
releaseAction.setPassiveResource_ReleaseAction(passiveResource);
}
Aggregations