use of org.palladiosimulator.pcm.repository.EventGroup in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddEventChannel method getEventGroup.
private EventGroup getEventGroup(final EventChannel eventChannel) {
// Repository > EventGroup
Collection<Object> filter = new ArrayList<Object>();
filter.add(Repository.class);
filter.add(EventGroup.class);
// Additional Child References
Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(shell, filter, additionalChildReferences, eventChannel.eResource().getResourceSet());
dialog.setProvidedService(EventGroup.class);
dialog.open();
return (EventGroup) dialog.getResult();
}
use of org.palladiosimulator.pcm.repository.EventGroup in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddEventChannel method execute.
@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
EventChannel eventChannel = (EventChannel) parameters.get("instance");
EventGroup eventGroup = getEventGroup(eventChannel);
eventChannel.setEventGroup__EventChannel(eventGroup);
}
use of org.palladiosimulator.pcm.repository.EventGroup in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddSinkRole method getEventGroup.
private EventGroup getEventGroup(SinkRole role) {
Collection<Object> filter = new ArrayList<Object>();
filter.add(Repository.class);
filter.add(EventGroup.class);
// Additional Child References
Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
// Creating the dialog
PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, role.eResource().getResourceSet());
// Setting the needed object type
dialog.setProvidedService(EventGroup.class);
dialog.open();
return (EventGroup) dialog.getResult();
}
Aggregations