Search in sources :

Example 1 with EventChannel

use of org.palladiosimulator.pcm.core.composition.EventChannel in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddAllocationContextEventChannel method getEventChannel.

private EventChannel getEventChannel(AllocationContext allocationContext) {
    Collection<Object> filter = new ArrayList<Object>();
    filter.add(org.palladiosimulator.pcm.system.System.class);
    filter.add(EventChannel.class);
    Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
    PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, allocationContext.eResource().getResourceSet());
    dialog.setProvidedService(EventChannel.class);
    dialog.open();
    return (EventChannel) dialog.getResult();
}
Also used : EventChannel(org.palladiosimulator.pcm.core.composition.EventChannel) PalladioSelectEObjectDialog(org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog) ArrayList(java.util.ArrayList) EObject(org.eclipse.emf.ecore.EObject) EReference(org.eclipse.emf.ecore.EReference)

Example 2 with EventChannel

use of org.palladiosimulator.pcm.core.composition.EventChannel in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddAllocationContextEventChannel method execute.

@Override
public void execute(final Collection<? extends EObject> selections, final Map<String, Object> parameters) {
    AllocationContext allocationContext = (AllocationContext) parameters.get("instance");
    EventChannel eventChannel = getEventChannel(allocationContext);
    allocationContext.setEventChannel__AllocationContext(eventChannel);
}
Also used : AllocationContext(org.palladiosimulator.pcm.allocation.AllocationContext) EventChannel(org.palladiosimulator.pcm.core.composition.EventChannel)

Example 3 with EventChannel

use of org.palladiosimulator.pcm.core.composition.EventChannel 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)

Aggregations

EventChannel (org.palladiosimulator.pcm.core.composition.EventChannel)3 ArrayList (java.util.ArrayList)1 EObject (org.eclipse.emf.ecore.EObject)1 EReference (org.eclipse.emf.ecore.EReference)1 PalladioSelectEObjectDialog (org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog)1 AllocationContext (org.palladiosimulator.pcm.allocation.AllocationContext)1 EventGroup (org.palladiosimulator.pcm.repository.EventGroup)1