Search in sources :

Example 6 with EventGroup

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();
}
Also used : Shell(org.eclipse.swt.widgets.Shell) PalladioSelectEObjectDialog(org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog) ArrayList(java.util.ArrayList) EObject(org.eclipse.emf.ecore.EObject) EReference(org.eclipse.emf.ecore.EReference) EventGroup(org.palladiosimulator.pcm.repository.EventGroup)

Example 7 with EventGroup

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);
}
Also used : EventChannel(org.palladiosimulator.pcm.core.composition.EventChannel) EventGroup(org.palladiosimulator.pcm.repository.EventGroup)

Example 8 with 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();
}
Also used : PalladioSelectEObjectDialog(org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog) ArrayList(java.util.ArrayList) EObject(org.eclipse.emf.ecore.EObject) EReference(org.eclipse.emf.ecore.EReference) EventGroup(org.palladiosimulator.pcm.repository.EventGroup)

Aggregations

EventGroup (org.palladiosimulator.pcm.repository.EventGroup)8 ArrayList (java.util.ArrayList)4 EObject (org.eclipse.emf.ecore.EObject)4 EReference (org.eclipse.emf.ecore.EReference)4 PalladioSelectEObjectDialog (org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog)4 SourceRole (org.palladiosimulator.pcm.repository.SourceRole)2 AdapterFactoryContentProvider (org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider)1 AdapterFactoryLabelProvider (org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider)1 Shell (org.eclipse.swt.widgets.Shell)1 EventTypesTabItemProviderAdapterFactory (org.palladiosimulator.editors.commons.tabs.operations.EventTypesTabItemProviderAdapterFactory)1 EventTypesEditorSection (org.palladiosimulator.editors.sirius.repository.custom.properties.editorsections.EventTypesEditorSection)1 EventChannel (org.palladiosimulator.pcm.core.composition.EventChannel)1 BasicComponent (org.palladiosimulator.pcm.repository.BasicComponent)1 EventType (org.palladiosimulator.pcm.repository.EventType)1 RequiredRole (org.palladiosimulator.pcm.repository.RequiredRole)1 SinkRole (org.palladiosimulator.pcm.repository.SinkRole)1 ServiceEffectSpecification (org.palladiosimulator.pcm.seff.ServiceEffectSpecification)1 PalladioItemProviderAdapterFactory (org.palladiosimulator.pcm.ui.provider.PalladioItemProviderAdapterFactory)1