use of org.palladiosimulator.pcm.resourcetype.ProcessingResourceType in project Palladio-Editors-Sirius by PalladioSimulator.
the class SetRequiredResource method execute.
@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
ParametricResourceDemand rd = (ParametricResourceDemand) parameters.get("instance");
ProcessingResourceType rt = getProcessingResourceType(rd);
rd.setRequiredResource_ParametricResourceDemand(rt);
}
use of org.palladiosimulator.pcm.resourcetype.ProcessingResourceType in project Palladio-Editors-Sirius by PalladioSimulator.
the class SetRequiredResource method getProcessingResourceType.
private ProcessingResourceType getProcessingResourceType(ParametricResourceDemand rd) {
Collection<Object> filter = new ArrayList<Object>();
filter.add(ResourceRepository.class);
filter.add(ProcessingResourceType.class);
// Additional Child References
Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
// Creating the dialog
PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, rd.eResource().getResourceSet());
// Setting the needed object type
dialog.setProvidedService(ProcessingResourceType.class);
dialog.open();
return (ProcessingResourceType) dialog.getResult();
}
Aggregations