diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.classpath new file mode 100644 index 000000000..3906c3b82 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.project new file mode 100644 index 000000000..7545b8415 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.project @@ -0,0 +1,40 @@ + + + org.eclipse.gemoc.event.commons.interpreter + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + fr.inria.diverse.k3.ui.k3Builder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + fr.inria.diverse.k3.ui.k3Nature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.pde.PluginNature + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.settings/org.eclipse.core.resources.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..896a9a53a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/META-INF/MANIFEST.MF new file mode 100644 index 000000000..fa8219521 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-SymbolicName: org.eclipse.gemoc.event.commons.interpreter; singleton:=true +Export-Package: org.eclipse.gemoc.event.commons.interpreter.property, + org.eclipse.gemoc.event.commons.interpreter.scenario, + org.eclipse.gemoc.event.commons.interpreter +Bundle-Name: org.eclipse.gemoc.event.commons.interpreter +Bundle-Version: 1.0.0 +Bundle-ClassPath: . +Require-Bundle: fr.inria.diverse.k3.al.annotationprocessor.plugin;bundle-version="3.0.0";visibility:=reexport, + org.eclipse.xtend.lib;bundle-version="2.6.0";visibility:=private, + org.eclipse.xtext.xbase.lib;bundle-version="2.6.0";visibility:=private, + com.google.guava;bundle-version="0.0.0";visibility:=private, + org.eclipse.emf.ecore.xmi;bundle-version="2.8.0";visibility:=reexport, + org.eclipse.emf.ecore;bundle-version="2.8.0";visibility:=reexport, + org.eclipse.emf.common;bundle-version="2.8.0";visibility:=reexport, + org.eclipse.gemoc.event.commons.model;bundle-version="0.0.0";visibility:=private, + org.eclipse.emf.transaction;bundle-version="1.9.0", + org.eclipse.gemoc.xdsmlframework.api;bundle-version="2.3.0", + org.eclipse.gemoc.trace.commons.model, + org.eclipse.ocl, + org.eclipse.ocl.ecore +Bundle-ManifestVersion: 2 +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/build.properties new file mode 100644 index 000000000..4c8ab5418 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/build.properties @@ -0,0 +1,6 @@ +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + . diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/plugin.xml new file mode 100644 index 000000000..6037a2327 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/plugin.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInstance.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInstance.java new file mode 100644 index 000000000..81e80525a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInstance.java @@ -0,0 +1,27 @@ +package org.eclipse.gemoc.event.commons.interpreter; + +import java.util.Map; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +public class EventInstance { + + private final Event originalEvent; + + private final Map parameters; + + public EventInstance(Event originalEvent, Map parameters) { + this.originalEvent = originalEvent; + this.parameters = parameters; + } + + public Event getOriginalEvent() { + return originalEvent; + } + + public Map getParameters() { + return parameters; + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInterpreter.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInterpreter.java new file mode 100644 index 000000000..44666ebb8 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInterpreter.java @@ -0,0 +1,172 @@ +package org.eclipse.gemoc.event.commons.interpreter; + +import java.util.ArrayList; +import java.util.List; +import java.util.Queue; +import java.util.Set; +import java.util.concurrent.ConcurrentLinkedQueue; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.gemoc.event.commons.interpreter.property.PropertyMonitor; +import org.eclipse.gemoc.event.commons.interpreter.scenario.ArbiterManager; +import org.eclipse.gemoc.event.commons.interpreter.scenario.IArbiterManager; +import org.eclipse.gemoc.event.commons.interpreter.scenario.IScenarioManager; +import org.eclipse.gemoc.event.commons.interpreter.scenario.ScenarioManager; +import org.eclipse.gemoc.event.commons.model.scenario.Arbiter; +import org.eclipse.gemoc.event.commons.model.scenario.Scenario; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; + +public class EventInterpreter implements IEventInterpreter { + + private Resource executedModel; + + private final Queue eventQueue = new ConcurrentLinkedQueue<>(); + + private boolean canManageEvents = true; + + private boolean waitForEvents = false; + + private Thread t = null; + + private IScenarioManager scenarioManager; + + private IArbiterManager arbiterManager; + + private IBehavioralAPI api; + + @Override + public void queueEvent(EventInstance input) { + eventQueue.add((EventInstance) input); + if (t != null) { + synchronized (t) { + t.notify(); + } + t = null; + } + } + + @Override + public boolean canSendEvent(EventInstance event) { + return api.canSendEvent(event); + } + + private List listeners = new ArrayList<>(); + + @Override + public void addListener(IEventInterpreterListener listener) { + listeners.add(listener); + } + + @Override + public void removeListener(IEventInterpreterListener listener) { + listeners.remove(listener); + } + + @Override + public void processEvents() { + if (canManageEvents) { + canManageEvents = false; + if (scenarioManager != null && !scenarioManager.isScenarioComplete()) { + if (waitForEvents && eventQueue.isEmpty()) { + throw new IllegalStateException("Event manager asked to wait for events while playing a scenario"); + } + } else if (waitForEvents && eventQueue.isEmpty()) { + t = Thread.currentThread(); + synchronized (t) { + try { + t.wait(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + waitForEvents = false; + } + EventInstance event = eventQueue.poll(); + while (event != null) { + api.dispatchEvent(event); + event = eventQueue.poll(); + } + canManageEvents = true; + } + } + + @Override + public void waitForEvents() { + waitForEvents = true; + } + + private Scenario pendingScenario; + + private Arbiter pendingArbiter; + + @Override + public void loadScenario(URI uri, ResourceSet resourceSet) { + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl()); + Resource resource = resourceSet.getResource(uri.trimFragment(), true); + EcoreUtil.resolveAll(resource); + if (uri.hasFragment()) { + pendingScenario = (Scenario) resource.getEObject(uri.fragment()); + } else { + pendingScenario = (Scenario) resource.getContents().get(0); + } + } + + @Override + public void loadArbiter(URI uri, ResourceSet resourceSet) { + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl()); + Resource resource = resourceSet.getResource(uri.trimFragment(), true); + EcoreUtil.resolveAll(resource); + if (uri.hasFragment()) { + pendingArbiter = (Arbiter) resource.getEObject(uri.fragment()); + } else { + pendingArbiter = (Arbiter) resource.getContents().get(0); + } + } + + @Override + public void engineAboutToStart(IExecutionEngine engine) { + executedModel = engine.getExecutionContext().getResourceModel(); + if (pendingScenario != null) { + PropertyMonitor monitor = engine.getAddon(PropertyMonitor.class); + if (monitor != null) { + scenarioManager = new ScenarioManager(executedModel, this, monitor); + } else { + + } + } + if (pendingArbiter != null) { + PropertyMonitor monitor = engine.getAddon(PropertyMonitor.class); + if (monitor != null) { + arbiterManager = new ArbiterManager(monitor); + } else { + + } + } + + final Set apis = engine.getAddonsTypedBy(IBehavioralAPI.class); + api = apis.iterator().next(); + } + + @Override + public void engineStarted(IExecutionEngine executionEngine) { + if (pendingScenario != null) { + scenarioManager.loadScenario(pendingScenario); + pendingScenario = null; + } + if (pendingArbiter != null) { + arbiterManager.loadArbiter(pendingArbiter); + pendingArbiter = null; + } + } + + @Override + public void engineStopped(IExecutionEngine engine) { + if (scenarioManager != null) { + scenarioManager.saveScenarioReport(); + } + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInterpreterRegistry.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInterpreterRegistry.java new file mode 100644 index 000000000..ca36e2b96 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/EventInterpreterRegistry.java @@ -0,0 +1,38 @@ +package org.eclipse.gemoc.event.commons.interpreter; + +import java.util.HashSet; +import java.util.Set; + +public class EventInterpreterRegistry { + + private static EventInterpreterRegistry instance; + + private Set registeredManagers; + + private EventInterpreterRegistry () { + this.registeredManagers = new HashSet(); + } + + public static EventInterpreterRegistry getInstance() { + if(instance == null) { + instance = new EventInterpreterRegistry(); + } + return instance; + } + + public void registerManager(IEventInterpreter manager) { + if(manager != null) { + registeredManagers.add(manager); + } + } + + public void unregisterManager(IEventInterpreter manager) { + if(manager != null) { + registeredManagers.remove(manager); + } + } + + public IEventInterpreter findEventInterpreter() { + return registeredManagers.stream().findFirst().orElse(null); + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IBehavioralAPI.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IBehavioralAPI.java new file mode 100644 index 000000000..0429999d6 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IBehavioralAPI.java @@ -0,0 +1,16 @@ +package org.eclipse.gemoc.event.commons.interpreter; + +import java.util.Set; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; + +public interface IBehavioralAPI extends IEngineAddon { + + void dispatchEvent(EventInstance event); + + boolean canSendEvent(EventInstance event); + + Set getEventClasses(); +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IEventInterpreter.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IEventInterpreter.java new file mode 100644 index 000000000..bcf855cab --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IEventInterpreter.java @@ -0,0 +1,24 @@ +package org.eclipse.gemoc.event.commons.interpreter; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; + +public interface IEventInterpreter extends IEngineAddon { + + void queueEvent(EventInstance event); + + void processEvents(); + + void waitForEvents(); + + void loadScenario(URI uri, ResourceSet resourceSet); + + void loadArbiter(URI arbiterURI, ResourceSet resourceSet); + + void addListener(IEventInterpreterListener listener); + + void removeListener(IEventInterpreterListener listener); + + boolean canSendEvent(EventInstance event); +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IEventInterpreterListener.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IEventInterpreterListener.java new file mode 100644 index 000000000..c91467b94 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/IEventInterpreterListener.java @@ -0,0 +1,8 @@ +package org.eclipse.gemoc.event.commons.interpreter; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +public interface IEventInterpreterListener { + + public void eventReceived(Event event); +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/IPropertyListener.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/IPropertyListener.java new file mode 100644 index 000000000..56e196850 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/IPropertyListener.java @@ -0,0 +1,6 @@ +package org.eclipse.gemoc.event.commons.interpreter.property; + +public interface IPropertyListener { + + void update(boolean propertyValue); +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/IPropertyMonitor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/IPropertyMonitor.java new file mode 100644 index 000000000..cb71f7f83 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/IPropertyMonitor.java @@ -0,0 +1,10 @@ +package org.eclipse.gemoc.event.commons.interpreter.property; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +public interface IPropertyMonitor { + + void monitorProperty(Property property, IPropertyListener listener); + + void unmonitorProperty(Property property, IPropertyListener listener); +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/PropertyMonitor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/PropertyMonitor.java new file mode 100644 index 000000000..7fa78af14 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/PropertyMonitor.java @@ -0,0 +1,233 @@ +package org.eclipse.gemoc.event.commons.interpreter.property; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EParameter; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.gemoc.event.commons.interpreter.EventInstance; +import org.eclipse.gemoc.event.commons.interpreter.IEventInterpreter; +import org.eclipse.gemoc.event.commons.interpreter.scenario.ElementProviderAspect; +import org.eclipse.gemoc.event.commons.model.property.CompositeProperty; +import org.eclipse.gemoc.event.commons.model.property.EventPrecondition; +import org.eclipse.gemoc.event.commons.model.property.Property; +import org.eclipse.gemoc.event.commons.model.property.PropertyReference; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; +import org.eclipse.gemoc.event.commons.model.property.StepProperty; +import org.eclipse.gemoc.event.commons.model.property.Stepping; +import org.eclipse.gemoc.event.commons.model.scenario.ElementProvider; +import org.eclipse.gemoc.event.commons.model.scenario.Event; +import org.eclipse.gemoc.trace.commons.model.trace.MSE; +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.ocl.OCL; +import org.eclipse.ocl.ecore.Constraint; +import org.eclipse.ocl.ecore.EcoreEnvironmentFactory; +import org.eclipse.ocl.helper.OCLHelper; + +public class PropertyMonitor implements IEngineAddon, IPropertyMonitor { + + private Resource executedModel; + + private final Map monitoredProperties = new HashMap<>(); + + private final Map> propertyListeners = new HashMap<>(); + + private final Set ongoingSteps = new HashSet<>(); + + private final Set endedSteps = new HashSet<>(); + + private final Set endingSteps = new HashSet<>(); + + private IEventInterpreter eventManager; + + private boolean eventManagerAvailable = false; + + private final OCL ocl; + private final OCLHelper helper; + + public PropertyMonitor() { + ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE); + helper = ocl.createOCLHelper(); + } + + private boolean monitor(Property property) { + if (property == null) { + return true; + } + boolean result = evaluateProperty(property); + monitoredProperties.put(property, result); + return result; + } + + private boolean evaluateProperty(Property property) { + boolean result = false; + if (property instanceof StepProperty) { + result = evaluateStepProperty((StepProperty) property); + } else if (property instanceof StateProperty) { + result = evaluateStateProperty((StateProperty) property); + } else if (property instanceof CompositeProperty) { + result = evaluateCompositeProperty((CompositeProperty) property); + } else if (property instanceof EventPrecondition) { + result = evaluateEventPrecondition((EventPrecondition) property); + } else { + result = evaluateProperty(((PropertyReference) property).getReferencedProperty()); + } + return result; + } + + private void updateProperties() { + new HashSet<>(propertyListeners.entrySet()).stream().forEach(e -> { + final Property p = e.getKey(); + if (monitoredProperties.get(p) != monitor(p)) { + final boolean newValue = monitoredProperties.get(p); + new ArrayList<>(e.getValue()).forEach(l -> l.update(newValue)); + } + }); + } + + @Override + public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute) { + ongoingSteps.add(stepToExecute.getMseoccurrence().getMse()); + endedSteps.addAll(endingSteps); + endingSteps.clear(); + updateProperties(); + } + + @Override + public void stepExecuted(IExecutionEngine engine, Step stepExecuted) { + endedSteps.addAll(endingSteps); + endingSteps.clear(); + endingSteps.add(stepExecuted.getMseoccurrence().getMse()); + updateProperties(); + } + + private boolean evaluateEventPrecondition(EventPrecondition property) { + if (eventManagerAvailable) { + final EventInstance eventInstance = createEvent(property.getEvent()); + return eventInstance != null && eventManager.canSendEvent(eventInstance); + } + return false; + } + + private boolean evaluateCompositeProperty(CompositeProperty property) { + final List list = property.getProperties().stream().map(p -> evaluateProperty(p)) + .collect(Collectors.toList()); + boolean result = false; + switch (property.getOperator()) { + case AND: + result = list.stream().allMatch(b -> b); + break; + case IMPLIES: + break; + case OR: + result = list.stream().anyMatch(b -> b); + break; + default: + break; + } + return result; + } + + private boolean evaluateStepProperty(StepProperty property) { + final EOperation operation = property.getOperation(); + final EObject caller = ElementProviderAspect.resolve(property.getTargetProvider(), executedModel); + final Stepping stepping = property.getStepping(); + final Predicate predicate = mse -> mse.getAction() == operation && mse.getCaller() == caller; + return stepping == Stepping.ONGOING && ongoingSteps.stream().anyMatch(predicate) + || stepping == Stepping.ENDED && endedSteps.stream().anyMatch(predicate) + || stepping == Stepping.ENDING && endingSteps.stream().anyMatch(predicate); + } + + private boolean evaluateStateProperty(StateProperty property) { + final List eventReceivers = new ArrayList<>(); + final Object target = property.getTarget(); + if (target == null) { + Set eClasses = new HashSet<>(); + property.eClass().getEAllGenericSuperTypes().stream() + .forEach(t -> t.getETypeArguments().stream().forEach(a -> eClasses.add(a.getEClassifier()))); + final Iterator it = executedModel.getAllContents(); + while (it.hasNext()) { + EObject o = it.next(); + if (eClasses.contains(o.eClass()) && StatePropertyAspect.evaluate(property, o)) { + eventReceivers.add(o); + } + } + } else { + final EObject target_cast = (EObject) target; + if (StatePropertyAspect.evaluate(property, target_cast)) { + eventReceivers.add(target_cast); + } + } + return !eventReceivers.isEmpty(); + } + + @Override + public void monitorProperty(Property property, IPropertyListener listener) { + List listeners = propertyListeners.get(property); + if (listeners == null) { + listeners = new ArrayList<>(); + propertyListeners.put(property, listeners); + } + listeners.add(listener); + monitoredProperties.put(property, false); + // Should the property be evaluated immediately? + if (monitor(property)) { + listener.update(true); + } + } + + @Override + public void unmonitorProperty(Property property, IPropertyListener listener) { + List listeners = propertyListeners.get(property); + if (listeners != null) { + listeners.remove(listener); + if (listeners.isEmpty()) { + propertyListeners.remove(property); + } + } + monitoredProperties.remove(property); + if (property instanceof CompositeProperty) { + ((CompositeProperty) property).getProperties().forEach(p -> monitoredProperties.remove(p)); + } + } + + @Override + public void engineAboutToStart(IExecutionEngine engine) { + executedModel = engine.getExecutionContext().getResourceModel(); + eventManager = engine.getAddonsTypedBy(IEventInterpreter.class).stream().findFirst().orElse(null); + eventManagerAvailable = eventManager != null; + } + + private EventInstance createEvent(Event originalEvent) { + final List eventParameterMatches = new ArrayList<>(); + final Map parameters = new HashMap<>(); + for (EStructuralFeature f : originalEvent.eClass().getEStructuralFeatures()) { + if (f instanceof EAttribute) { + parameters.put(f, originalEvent.eGet(f)); + } else { + final ElementProvider paramProvider = (ElementProvider) originalEvent.eGet(f); + final EObject parameter = ElementProviderAspect.resolve(paramProvider, executedModel); + if (parameter != null) { + parameters.put(f, parameter); + eventParameterMatches.add(parameter); + } + } + } + return new EventInstance(originalEvent, parameters); + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/propertyAspects.xtend b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/propertyAspects.xtend new file mode 100644 index 000000000..550ebbbfb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/property/propertyAspects.xtend @@ -0,0 +1,295 @@ +package org.eclipse.gemoc.event.commons.interpreter.property + +import org.eclipse.gemoc.event.commons.model.property.BinaryProperty +import org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty +import org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty +import org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty +import org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty +import org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty +import org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty +import org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty +import org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty +import org.eclipse.gemoc.event.commons.model.property.StateProperty +import org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty +import org.eclipse.gemoc.event.commons.model.property.UnaryProperty +import fr.inria.diverse.k3.al.annotationprocessor.Aspect +import fr.inria.diverse.k3.al.annotationprocessor.OverrideAspectMethod +import java.util.Collections +import java.util.HashSet +import java.util.List +import java.util.Set +import org.eclipse.emf.ecore.EObject + +@Aspect(className=StateProperty) +class StatePropertyAspect { + public def boolean evaluate(EObject o) { + false + } + + public def Set extractDynamicTerms() { + return Collections.emptySet + } +} + +@Aspect(className=SingleReferenceProperty) +class SingleReferencePropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val eObject = o.eGet(_self.feature) as EObject + return _self.property.evaluate(eObject) + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return Collections.emptySet + } +} + +@Aspect(className=ContainerReferenceProperty) +class ContainerReferencePropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val eObject = o.eContainer + return _self.property.evaluate(eObject) + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return Collections.emptySet + } +} + +@Aspect(className=UnaryProperty) +class UnaryPropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + var result = false + switch (_self.operator) { + case NOT: { + result = !_self.property.evaluate(o) + } + } + return result + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return Collections.emptySet + } +} + +@Aspect(className=BinaryProperty) +class BinaryPropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + var result = false + switch (_self.operator) { + case AND: { + result = _self.left.evaluate(o) && _self.right.evaluate(o) + } + case OR: { + result = _self.left.evaluate(o) || _self.right.evaluate(o) + } + case IMPLIES: { + result = !_self.left.evaluate(o) || _self.right.evaluate(o) + } + } + return result + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return Collections.emptySet + } +} + +@Aspect(className=ManyReferenceProperty) +class ManyPropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val l = o.eGet(_self.feature) as List + switch (_self.quantifier) { + case EXISTS: { + if (_self.property != null) { + return l.exists[e|_self.property.evaluate(e)] + } else { + return !l.empty + } + } + case FORALL: { + return l.forall[e|_self.property.evaluate(e)] + } + } + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return Collections.emptySet + } +} + +@Aspect(className=BooleanAttributeProperty) +class BooleanAttributePropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val i = o.eGet(_self.feature) as Integer + var result = false + switch (_self.operator) { + case EQUAL: { + result = i == _self.value + } + } + return result + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return if (_self.feature.EAnnotations.exists[a|a.source == "aspect"]) { + new HashSet => [add(_self)] + } else { + Collections.emptySet + } + } +} + +@Aspect(className=IntegerAttributeProperty) +class IntegerAttributePropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val i = o.eGet(_self.feature) as Integer + var result = false + switch (_self.operator) { + case EQUAL: { + result = i == _self.value + } + } + return result + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return if (_self.feature.EAnnotations.exists[a|a.source == "aspect"]) { + new HashSet => [add(_self)] + } else { + Collections.emptySet + } + } +} + +@Aspect(className=StringAttributeProperty) +class StringAttributePropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val i = o.eGet(_self.feature) as String + var result = false + switch (_self.operator) { + case EQUAL: { + result = i == _self.value + } + } + return result + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return if (_self.feature.EAnnotations.exists[a|a.source == "aspect"]) { + new HashSet => [add(_self)] + } else { + Collections.emptySet + } + } +} + +@Aspect(className=ManyBooleanAttributeProperty) +class ManyBooleanAttributePropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val l = o.eGet(_self.feature) as List + var result = false + switch (_self.operator) { + case EQUAL: { + switch (_self.quantifier) { + case EXISTS: { + result = l.exists[i|i == _self.value] + } + case FORALL: { + result = l.forall[i|i == _self.value] + } + } + } + } + return result + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return if (_self.feature.EAnnotations.exists[a|a.source == "aspect"]) { + new HashSet => [add(_self)] + } else { + Collections.emptySet + } + } +} + +@Aspect(className=ManyIntegerAttributeProperty) +class ManyIntegerAttributePropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val l = o.eGet(_self.feature) as List + var result = false + switch (_self.operator) { + case EQUAL: { + switch (_self.quantifier) { + case EXISTS: { + result = l.exists[i|i == _self.value] + } + case FORALL: { + result = l.forall[i|i == _self.value] + } + } + } + } + return result + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return if (_self.feature.EAnnotations.exists[a|a.source == "aspect"]) { + new HashSet => [add(_self)] + } else { + Collections.emptySet + } + } +} + +@Aspect(className=ManyStringAttributeProperty) +class ManyStringAttributePropertyAspect extends StatePropertyAspect { + @OverrideAspectMethod + public def boolean evaluate(EObject o) { + val l = o.eGet(_self.feature) as List + var result = false + switch (_self.operator) { + case EQUAL: { + switch (_self.quantifier) { + case EXISTS: { + result = l.exists[i|i == _self.value] + } + case FORALL: { + result = l.forall[i|i == _self.value] + } + } + } + } + return result + } + + @OverrideAspectMethod + public def Set extractDynamicTerms() { + return if (_self.feature.EAnnotations.exists[a|a.source == "aspect"]) { + new HashSet => [add(_self)] + } else { + Collections.emptySet + } + } +} + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/ArbiterManager.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/ArbiterManager.java new file mode 100644 index 000000000..2eb4dc349 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/ArbiterManager.java @@ -0,0 +1,85 @@ +package org.eclipse.gemoc.event.commons.interpreter.scenario; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; + +import org.eclipse.gemoc.event.commons.interpreter.property.IPropertyListener; +import org.eclipse.gemoc.event.commons.interpreter.property.IPropertyMonitor; +import org.eclipse.gemoc.event.commons.model.scenario.Arbiter; +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterState; +import org.eclipse.gemoc.event.commons.model.scenario.TruthValue; +import org.eclipse.gemoc.event.commons.model.property.Property; + +public class ArbiterManager implements IArbiterManager { + + private ArbiterState currentState; + private final IPropertyMonitor propertyMonitor; + + public ArbiterManager(IPropertyMonitor propertyMonitor) { + this.propertyMonitor = propertyMonitor; + } + + @Override + public TruthValue getTruthValue() { + return currentState.getTruthValue(); + } + + private void setupArbiterStatePropertyListeners(Arbiter arbiter, ArbiterState state) { + final Map guards = new HashMap<>(); + state.getOutgoingTransitions().forEach(t -> { + final Property property = t.getGuard(); + IPropertyListener listener = new ArbiterTransitionGuardListener(arbiter, t.getTarget(), property, guards); + guards.put(property, listener); + }); + new HashSet<>(guards.keySet()).forEach(p -> { + IPropertyListener l = guards.get(p); + if (l != null) { + propertyMonitor.monitorProperty(p, l); + } + }); + } + + @Override + public void loadArbiter(Arbiter arbiter) { + currentState = arbiter.getInitialState(); + setupArbiterStatePropertyListeners(arbiter, currentState); + } + + private class ArbiterTransitionGuardListener implements IPropertyListener { + + private final Arbiter arbiter; + private final ArbiterState state; + private final Property property; + private Map guards = new HashMap<>(); + + public ArbiterTransitionGuardListener(Arbiter arbiter, ArbiterState state, Property property, Map guards) { + this.arbiter = arbiter; + this.state = state; + this.property = property; + this.guards = guards; + } + + @Override + public void update(boolean propertyValue) { + if (propertyValue) { + /* We stop monitoring the current guard as well as + * the guards of the other outgoing transitions of + * the previous state of the FSM.*/ + propertyMonitor.unmonitorProperty(property, this); + currentState = state; + guards.forEach((p, l) -> propertyMonitor.unmonitorProperty(p, l)); + guards.clear(); + if (arbiter.getAcceptingStates().contains(currentState)) { + /* If the current state is an accepting state, + * we print the final verdict.*/ + System.out.println("Arbiter has reached a verdict: " + currentState.getTruthValue()); + } else { + /* Otherwise we start monitoring the guards of the outgoing + * transitions.*/ + setupArbiterStatePropertyListeners(arbiter, state); + } + } + } + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/IArbiterManager.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/IArbiterManager.java new file mode 100644 index 000000000..d3a3f3730 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/IArbiterManager.java @@ -0,0 +1,12 @@ +package org.eclipse.gemoc.event.commons.interpreter.scenario; + +import org.eclipse.gemoc.event.commons.model.scenario.Arbiter; +import org.eclipse.gemoc.event.commons.model.scenario.TruthValue; + +public interface IArbiterManager { + + TruthValue getTruthValue(); + + void loadArbiter(Arbiter arbiter); + +} \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/IScenarioManager.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/IScenarioManager.java new file mode 100644 index 000000000..c1708770f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/IScenarioManager.java @@ -0,0 +1,12 @@ +package org.eclipse.gemoc.event.commons.interpreter.scenario; + +import org.eclipse.gemoc.event.commons.model.scenario.Scenario; + +public interface IScenarioManager { + + boolean isScenarioComplete(); + + void loadScenario(Scenario scenario); + + void saveScenarioReport(); +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/ScenarioManager.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/ScenarioManager.java new file mode 100644 index 000000000..9c036a408 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/ScenarioManager.java @@ -0,0 +1,309 @@ +package org.eclipse.gemoc.event.commons.interpreter.scenario; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.impl.EMFCommandTransaction; +import org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain; +import org.eclipse.gemoc.event.commons.interpreter.EventInstance; +import org.eclipse.gemoc.event.commons.interpreter.IEventInterpreter; +import org.eclipse.gemoc.event.commons.interpreter.property.IPropertyListener; +import org.eclipse.gemoc.event.commons.interpreter.property.IPropertyMonitor; +import org.eclipse.gemoc.event.commons.model.property.CompositeProperty; +import org.eclipse.gemoc.event.commons.model.property.EventPrecondition; +import org.eclipse.gemoc.event.commons.model.property.Property; +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyReference; +import org.eclipse.gemoc.event.commons.model.report.EventReport; +import org.eclipse.gemoc.event.commons.model.report.Report; +import org.eclipse.gemoc.event.commons.model.report.ReportFactory; +import org.eclipse.gemoc.event.commons.model.scenario.ElementProvider; +import org.eclipse.gemoc.event.commons.model.scenario.Event; +import org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence; +import org.eclipse.gemoc.event.commons.model.scenario.Scenario; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState; + +public class ScenarioManager implements IScenarioManager { + + private Scenario scenario; + private final Resource executedModel; + private final IEventInterpreter eventManager; + private final IPropertyMonitor propertyMonitor; + private final List> currentElements = new ArrayList<>(); + private final Report report = ReportFactory.eINSTANCE.createReport(); + private final PropertyFactory propertyFactory = PropertyFactory.eINSTANCE; + + public ScenarioManager(Resource executedModel, IEventInterpreter eventManager, IPropertyMonitor propertyMonitor) { + this.executedModel = executedModel; + this.eventManager = eventManager; + this.propertyMonitor = propertyMonitor; + } + + public void loadScenario(Scenario scenario) { + this.scenario = scenario; + this.scenario.getElements().forEach(element -> { + setupScenarioElementPropertyListeners(element); + }); + } + + private void setupScenarioElementPropertyListeners(ScenarioElement element) { + currentElements.add(element); + final boolean isEvent = element instanceof EventOccurrence; + if (isEvent) { + handleEventOccurrence((EventOccurrence) element); + } else { + handleFSM((ScenarioFSM) element); + } + } + + private void setupFSMStatePropertyListeners(ScenarioFSM fsm, ScenarioFSMState state) { + final Map fsmGuards = new HashMap<>(); + state.getOutgoingTransitions().forEach(t -> { + final Property property = t.getGuard(); + final Event event = t.getTarget().getEvent(); + if (property != null && event != null) { + // If the FSM state sends an event, we add the event + // precondition to the guard of the transition by + // using a composite property. + final CompositeProperty compositeProperty = propertyFactory.createCompositeProperty(); + final PropertyReference propertyReference = propertyFactory.createPropertyReference(); + final EventPrecondition precondition = propertyFactory.createEventPrecondition(); + propertyReference.setReferencedProperty(property); + precondition.setEvent(event); + compositeProperty.getProperties().add(propertyReference); + compositeProperty.getProperties().add(precondition); + IPropertyListener listener = new FSMGuardListener(fsm, t.getTarget(), compositeProperty, fsmGuards); + fsmGuards.put(compositeProperty, listener); + } else if (property != null) { + IPropertyListener listener = new FSMGuardListener(fsm, t.getTarget(), property, fsmGuards); + fsmGuards.put(property, listener); + } else if (event != null) { + final EventPrecondition precondition = propertyFactory.createEventPrecondition(); + precondition.setEvent(event); + IPropertyListener listener = new FSMGuardListener(fsm, t.getTarget(), precondition, fsmGuards); + fsmGuards.put(precondition, listener); + } else { + // Degenerate case: no guard, no event precondition. + // Go directly to the target state? + fsmGuards.clear(); + setupFSMStatePropertyListeners(fsm, t.getTarget()); + } + }); + new HashSet<>(fsmGuards.keySet()).forEach(p -> { + IPropertyListener l = fsmGuards.get(p); + if (l != null) { + propertyMonitor.monitorProperty(p, l); + } + }); + } + + private void handleEventOccurrence(EventOccurrence eventOccurrence) { + final EventPrecondition precondition = propertyFactory.createEventPrecondition(); + precondition.setEvent((eventOccurrence).getEvent()); + final Property property = eventOccurrence.getGuard(); + if (property != null) { + // We create a composite property containing + // both the guard of the event and the event precondition. + final CompositeProperty compositeProperty = propertyFactory.createCompositeProperty(); + final PropertyReference propertyReference = propertyFactory.createPropertyReference(); + propertyReference.setReferencedProperty(property); + compositeProperty.getProperties().add(propertyReference); + compositeProperty.getProperties().add(precondition); + propertyMonitor.monitorProperty(compositeProperty, new ScenarioGuardListener(eventOccurrence, compositeProperty)); + } else { + propertyMonitor.monitorProperty(precondition, new ScenarioGuardListener(eventOccurrence, precondition)); + } + } + + private void handleFSM(ScenarioFSM fsm) { + final ScenarioFSMState initialState = fsm.getInitialState(); + final Property property = fsm.getGuard(); + final Event event = initialState.getEvent(); + if (event != null && property != null) { + // We create a composite property containing + // both the guard of the fsm and the event precondition + final CompositeProperty compositeProperty = propertyFactory.createCompositeProperty(); + final PropertyReference propertyReference = propertyFactory.createPropertyReference(); + final EventPrecondition precondition = propertyFactory.createEventPrecondition(); + propertyReference.setReferencedProperty(property); + precondition.setEvent(event); + compositeProperty.getProperties().add(propertyReference); + compositeProperty.getProperties().add(precondition); + propertyMonitor.monitorProperty(compositeProperty, new ScenarioGuardListener(fsm, compositeProperty)); + } else if (event != null) { + final EventPrecondition precondition = propertyFactory.createEventPrecondition(); + precondition.setEvent(event); + propertyMonitor.monitorProperty(precondition, new ScenarioGuardListener(fsm, precondition)); + } else if (property != null) { + propertyMonitor.monitorProperty(property, new ScenarioGuardListener(fsm, property)); + } else { + setupFSMStatePropertyListeners(fsm, initialState); + } + } + + private EventInstance createEvent(Event originalEvent) { + final List eventParameterMatches = new ArrayList<>(); + final Map parameters = new HashMap<>(); + for (EStructuralFeature f : originalEvent.eClass().getEStructuralFeatures()) { + if (f instanceof EAttribute) { + parameters.put(f, originalEvent.eGet(f)); + } else { + final ElementProvider paramProvider = (ElementProvider) originalEvent.eGet(f); + final EObject parameter = ElementProviderAspect.resolve(paramProvider, executedModel); + if (parameter != null) { + parameters.put(f, parameter); + eventParameterMatches.add(parameter); + } + } + } + final EventReport eventReport = ReportFactory.eINSTANCE.createEventReport(); + if (eventParameterMatches.size() > 1) { + eventReport.getMatches().addAll(eventParameterMatches.subList(1, eventParameterMatches.size() - 1)); + } + eventReport.setEvent(originalEvent); + report.getEvents().add(eventReport); + return new EventInstance(originalEvent, parameters); + } + + @Override + public boolean isScenarioComplete() { + return currentElements.isEmpty(); + } + + @Override + public void saveScenarioReport() { + final ResourceSet resourceSet = scenario.eResource().getResourceSet(); + final TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Factory.INSTANCE + .getEditingDomain(resourceSet); + final URI scenarioURI = scenario.eResource().getURI(); + final URI reportURI = scenarioURI.trimFileExtension().appendFileExtension("report"); + final Resource resource = resourceSet.createResource(reportURI); + final RecordingCommand command = new RecordingCommand(editingDomain) { + @Override + public void doExecute() { + resource.getContents().add(report); + } + }; + EMFCommandTransaction transaction = new EMFCommandTransaction(command, + (InternalTransactionalEditingDomain) editingDomain, null); + try { + transaction.start(); + command.execute(); + transaction.commit(); + } catch (InterruptedException | RollbackException e) { + e.printStackTrace(); + } + try { + resource.save((new PlatformResourceURIHandlerImpl()).createOutputStream(reportURI, Collections.emptyMap()), + Collections.emptyMap()); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private class ScenarioGuardListener implements IPropertyListener { + + private final ScenarioElement element; + private final Property property; + + public ScenarioGuardListener(ScenarioElement element, Property property) { + this.element = element; + this.property = property; + } + + @Override + public void update(boolean propertyValue) { + if (propertyValue) { + // We stop monitoring the guard of this scenario element. + propertyMonitor.unmonitorProperty(property, this); + if (element instanceof EventOccurrence) { + currentElements.remove(element); + currentElements.addAll(element.getNextElements()); + final EventOccurrence eventOccurrence = (EventOccurrence) element; + eventManager.queueEvent(createEvent(eventOccurrence.getEvent())); + // We start monitoring the guards of the next elements in + // the scenario tree. + eventOccurrence.getNextElements().stream().forEach(e -> { + setupScenarioElementPropertyListeners(e); + }); + } else { + // We do not monitor the guards of the next elements in the + // scenario tree yet because they must only be evaluated once the + // FSM reaches an accepting state. + final ScenarioFSM fsm = (ScenarioFSM) element; + final Event event = fsm.getInitialState().getEvent(); + if (event != null) { + eventManager.queueEvent(createEvent(event)); + } + setupFSMStatePropertyListeners(fsm, fsm.getInitialState()); + } + } + } + } + + private class FSMGuardListener implements IPropertyListener { + + private final ScenarioFSM fsm; + private final ScenarioFSMState state; + private final Property property; + private Map fsmGuards = new HashMap<>(); + + public FSMGuardListener(ScenarioFSM fsm, ScenarioFSMState state, Property property, + Map fsmGuards) { + this.fsm = fsm; + this.state = state; + this.property = property; + this.fsmGuards = fsmGuards; + } + + @Override + public void update(boolean propertyValue) { + if (propertyValue) { + // We send the event associated to the newly reached state of + // the FSM, if any. We do not have to check if it can be sent + // as this check is part of the guard of the incoming transition. + final Event event = state.getEvent(); + if (event != null) { + eventManager.queueEvent(createEvent(event)); + } + // We stop monitoring the current guard as well as + // the guards of the other outgoing transitions of + // the previous state of the FSM. + propertyMonitor.unmonitorProperty(property, this); + fsmGuards.forEach((p, l) -> propertyMonitor.unmonitorProperty(p, l)); + fsmGuards.clear(); + if (fsm.getAcceptingStates().contains(state)) { + // The FSM has reached an accepting state, thus we start + // monitoring the guards of the next elements in the + // scenario tree. + currentElements.remove(fsm); + currentElements.addAll(fsm.getNextElements()); + fsm.getNextElements().stream().forEach(e -> { + setupScenarioElementPropertyListeners(e); + }); + } else { + // Otherwise we start monitoring the guards of the outgoing + // transitions. + setupFSMStatePropertyListeners(fsm, state); + } + } + } + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/scenarioAspects.xtend b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/scenarioAspects.xtend new file mode 100644 index 000000000..e342e7ed6 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.interpreter/src/org/eclipse/gemoc/event/commons/interpreter/scenario/scenarioAspects.xtend @@ -0,0 +1,36 @@ +package org.eclipse.gemoc.event.commons.interpreter.scenario + +import org.eclipse.gemoc.event.commons.model.scenario.ElementProvider +import org.eclipse.gemoc.event.commons.model.scenario.ElementQuery +import org.eclipse.gemoc.event.commons.model.scenario.ElementReference +import fr.inria.diverse.k3.al.annotationprocessor.Aspect +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.EObject +import fr.inria.diverse.k3.al.annotationprocessor.OverrideAspectMethod +import org.eclipse.gemoc.event.commons.interpreter.property.StatePropertyAspect + +@Aspect(className=ElementProvider) +class ElementProviderAspect { + public def EObject resolve(Resource r) { + return null + } +} + +@Aspect(className=ElementReference) +class ElementReferenceAspect extends ElementProviderAspect { + @OverrideAspectMethod + public def EObject resolve(Resource r) { + return _self.element as EObject + } +} + +@Aspect(className=ElementQuery) +class ElementQueryAspect extends ElementProviderAspect { + @OverrideAspectMethod + public def EObject resolve(Resource r) { + val queriedType = _self.eClass.EGenericSuperTypes.head.ETypeArguments.head.EClassifier + return r.allContents.filter[o|(o.eClass == queriedType || o.eClass.EAllSuperTypes.contains(queriedType)) + && StatePropertyAspect.evaluate(_self.query, o) + ].head + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/.classpath new file mode 100644 index 000000000..22f30643c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/.project new file mode 100644 index 000000000..808e9cd0d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/.project @@ -0,0 +1,28 @@ + + + org.eclipse.gemoc.event.commons.model.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/META-INF/MANIFEST.MF new file mode 100644 index 000000000..0a450e2ea --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.event.commons.model.edit;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.gemoc.event.commons.model.report.provider.ReportEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.event.commons.model.property.provider, + org.eclipse.gemoc.event.commons.model.scenario.provider, + org.eclipse.gemoc.event.commons.model.arbiter.provider, + org.eclipse.gemoc.event.commons.model.report.provider +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.gemoc.event.commons.model;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.edit;visibility:=reexport, + org.eclipse.gemoc.event.commons.model.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/build.properties new file mode 100644 index 000000000..6e3e902e8 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_CompositeProperty.gif new file mode 100644 index 000000000..bee89db72 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ContainerReferenceProperty.gif new file mode 100644 index 000000000..7ae2ea992 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_EventPrecondition.gif new file mode 100644 index 000000000..4a574b113 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..73a111cde Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..b03123db0 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..921b65a46 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_PropertyReference.gif new file mode 100644 index 000000000..09741e808 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiterTransition_guard_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiter_states_ArbiterState.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiter_states_ArbiterState.gif new file mode 100644 index 000000000..83994f32f Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiter_states_ArbiterState.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiter_transitions_ArbiterTransition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiter_transitions_ArbiterTransition.gif new file mode 100644 index 000000000..633561b32 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateArbiter_transitions_ArbiterTransition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ContainerReferenceProperty.gif new file mode 100644 index 000000000..5452ecdc3 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..5a0697e63 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..d02196365 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..6dffd43dc Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_left_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ContainerReferenceProperty.gif new file mode 100644 index 000000000..5452ecdc3 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..5a0697e63 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..d02196365 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..6dffd43dc Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateBinaryProperty_right_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_CompositeProperty.gif new file mode 100644 index 000000000..cb3d509b1 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ContainerReferenceProperty.gif new file mode 100644 index 000000000..52da91872 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_EventPrecondition.gif new file mode 100644 index 000000000..9f85940dd Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..457a69826 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..40c20f76e Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..46075d88b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_PropertyReference.gif new file mode 100644 index 000000000..20e544750 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateCompositeProperty_properties_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ContainerReferenceProperty.gif new file mode 100644 index 000000000..3070b3d0c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..91a611a1d Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..d72e36b9e Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..548b80529 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateContainerReferenceProperty_property_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ContainerReferenceProperty.gif new file mode 100644 index 000000000..974a35b1e Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..c4524ef70 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..585fa351b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..294bcb2d2 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateElementQuery_query_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ContainerReferenceProperty.gif new file mode 100644 index 000000000..3070b3d0c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..91a611a1d Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..d72e36b9e Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..548b80529 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateManyReferenceProperty_property_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_AbstractProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_AbstractProperty.gif new file mode 100644 index 000000000..8a4acfb07 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_AbstractProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_CompositeProperty.gif new file mode 100644 index 000000000..c200e691a Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ContainerReferenceProperty.gif new file mode 100644 index 000000000..5f8c2018a Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_EventPrecondition.gif new file mode 100644 index 000000000..8eb45613d Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..860276f4b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..214650428 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..bf50c763b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_PropertyReference.gif new file mode 100644 index 000000000..ed60866cc Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateNextProperty_formula_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_AbstractProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_AbstractProperty.gif new file mode 100644 index 000000000..671249c15 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_AbstractProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_CompositeProperty.gif new file mode 100644 index 000000000..8524da45c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ContainerReferenceProperty.gif new file mode 100644 index 000000000..b60215a01 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_EventPrecondition.gif new file mode 100644 index 000000000..2f084ae6e Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..e2efc630b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..eeaa06b98 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..31cb2e2c3 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_PropertyReference.gif new file mode 100644 index 000000000..9cb21a65f Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_leftFormula_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_AbstractProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_AbstractProperty.gif new file mode 100644 index 000000000..671249c15 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_AbstractProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_CompositeProperty.gif new file mode 100644 index 000000000..8524da45c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ContainerReferenceProperty.gif new file mode 100644 index 000000000..b60215a01 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_EventPrecondition.gif new file mode 100644 index 000000000..2f084ae6e Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..e2efc630b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..eeaa06b98 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..31cb2e2c3 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_PropertyReference.gif new file mode 100644 index 000000000..9cb21a65f Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReleaseProperty_rightFormula_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReport_events_EventReport.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReport_events_EventReport.gif new file mode 100644 index 000000000..16dbb0e67 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateReport_events_EventReport.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_CompositeProperty.gif new file mode 100644 index 000000000..b42028e70 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ContainerReferenceProperty.gif new file mode 100644 index 000000000..9a7f5b855 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_EventPrecondition.gif new file mode 100644 index 000000000..06d2414c1 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..a47b32b7d Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..08ad00b36 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..cba39ba89 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_PropertyReference.gif new file mode 100644 index 000000000..697418091 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioElement_guard_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_CompositeProperty.gif new file mode 100644 index 000000000..8cd9cfa90 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ContainerReferenceProperty.gif new file mode 100644 index 000000000..9dc67ff8b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_EventPrecondition.gif new file mode 100644 index 000000000..424142efc Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..95a524524 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..7f8e88eb1 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..84d142dae Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_PropertyReference.gif new file mode 100644 index 000000000..d8233b0ff Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateScenarioFSMTransition_guard_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ContainerReferenceProperty.gif new file mode 100644 index 000000000..6966d766e Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..3b01cc94e Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..bc083830b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..eab3c353c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateSingleReferenceProperty_property_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ContainerReferenceProperty.gif new file mode 100644 index 000000000..4375ccf68 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..34d830378 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..62a122668 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..4df8fc516 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUnaryProperty_property_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_AbstractProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_AbstractProperty.gif new file mode 100644 index 000000000..d3e8153c5 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_AbstractProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_CompositeProperty.gif new file mode 100644 index 000000000..12d45aab7 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ContainerReferenceProperty.gif new file mode 100644 index 000000000..83994f32f Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_EventPrecondition.gif new file mode 100644 index 000000000..9f36b38d3 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..582e5bbcc Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..a1e0e46fa Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..b8713703c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_PropertyReference.gif new file mode 100644 index 000000000..633561b32 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_leftFormula_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_AbstractProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_AbstractProperty.gif new file mode 100644 index 000000000..d3e8153c5 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_AbstractProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_CompositeProperty.gif new file mode 100644 index 000000000..12d45aab7 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ContainerReferenceProperty.gif new file mode 100644 index 000000000..83994f32f Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_EventPrecondition.gif new file mode 100644 index 000000000..9f36b38d3 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..582e5bbcc Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..a1e0e46fa Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyStringAttributeProperty.gif new file mode 100644 index 000000000..b8713703c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_PropertyReference.gif new file mode 100644 index 000000000..633561b32 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/ctool16/CreateUntilProperty_rightFormula_PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/AbstractProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/AbstractProperty.gif new file mode 100644 index 000000000..ef56c1408 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/AbstractProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Arbiter.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Arbiter.gif new file mode 100644 index 000000000..83afb9b3c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Arbiter.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ArbiterState.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ArbiterState.gif new file mode 100644 index 000000000..e4b530eca Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ArbiterState.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ArbiterTransition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ArbiterTransition.gif new file mode 100644 index 000000000..98b351f1c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ArbiterTransition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/CompositeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/CompositeProperty.gif new file mode 100644 index 000000000..904159880 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/CompositeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ContainerReferenceProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ContainerReferenceProperty.gif new file mode 100644 index 000000000..e4b530eca Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ContainerReferenceProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Event.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Event.gif new file mode 100644 index 000000000..e4b530eca Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Event.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/EventPrecondition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/EventPrecondition.gif new file mode 100644 index 000000000..ea58a657d Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/EventPrecondition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/EventReport.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/EventReport.gif new file mode 100644 index 000000000..d3dc5a9ad Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/EventReport.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyBooleanAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyBooleanAttributeProperty.gif new file mode 100644 index 000000000..33854e98c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyBooleanAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyIntegerAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyIntegerAttributeProperty.gif new file mode 100644 index 000000000..a3908bcf7 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyIntegerAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyStringAttributeProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyStringAttributeProperty.gif new file mode 100644 index 000000000..a26660ec2 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/ManyStringAttributeProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/PropertyReference.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/PropertyReference.gif new file mode 100644 index 000000000..98b351f1c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/PropertyReference.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Report.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Report.gif new file mode 100644 index 000000000..33854e98c Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Report.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Scenario.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Scenario.gif new file mode 100644 index 000000000..7bac4fd38 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Scenario.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/State.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/State.gif new file mode 100644 index 000000000..cb1755a71 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/State.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Transition.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Transition.gif new file mode 100644 index 000000000..7bac4fd38 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/icons/full/obj16/Transition.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/plugin.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/plugin.properties new file mode 100644 index 000000000..976e33e89 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/plugin.properties @@ -0,0 +1,155 @@ +# + +pluginName = Property Edit Support +providerName = www.example.org + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_AbstractProperty_type = Abstract Property +_UI_TemporalProperty_type = Temporal Property +_UI_NextProperty_type = Next Property +_UI_UntilProperty_type = Until Property +_UI_ReleaseProperty_type = Release Property +_UI_NegationTemporalProperty_type = Negation Temporal Property +_UI_Property_type = Property +_UI_PropertyReference_type = Reference +_UI_CompositeProperty_type = Composite Property +_UI_EventPrecondition_type = Event Precondition +_UI_StepProperty_type = Step Property +_UI_StateProperty_type = State Property +_UI_UnaryProperty_type = Unary Property +_UI_BinaryProperty_type = Binary Property +_UI_ManyReferenceProperty_type = Many Reference Property +_UI_SingleReferenceProperty_type = Single Reference Property +_UI_ContainerReferenceProperty_type = Container Reference Property +_UI_ManyBooleanAttributeProperty_type = Many Boolean Attribute Property +_UI_ManyIntegerAttributeProperty_type = Many Integer Attribute Property +_UI_ManyStringAttributeProperty_type = Many String Attribute Property +_UI_BooleanAttributeProperty_type = Boolean Attribute Property +_UI_IntegerAttributeProperty_type = Integer Attribute Property +_UI_StringAttributeProperty_type = String Attribute Property +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_NextProperty_formula_feature = Formula +_UI_UntilProperty_leftFormula_feature = Left Formula +_UI_UntilProperty_rightFormula_feature = Right Formula +_UI_ReleaseProperty_leftFormula_feature = Left Formula +_UI_ReleaseProperty_rightFormula_feature = Right Formula +_UI_NegationTemporalProperty_formula_feature = Formula +_UI_PropertyReference_referencedProperty_feature = Referenced Property +_UI_CompositeProperty_properties_feature = Properties +_UI_EventPrecondition_event_feature = Event +_UI_StepProperty_stepping_feature = Stepping +_UI_StepProperty_targetProvider_feature = Target Provider +_UI_StateProperty_target_feature = Target +_UI_UnaryProperty_operator_feature = Operator +_UI_UnaryProperty_property_feature = Property +_UI_BinaryProperty_operator_feature = Operator +_UI_BinaryProperty_left_feature = Left +_UI_BinaryProperty_right_feature = Right +_UI_ManyReferenceProperty_property_feature = Property +_UI_ManyReferenceProperty_quantifier_feature = Quantifier +_UI_SingleReferenceProperty_property_feature = Property +_UI_ContainerReferenceProperty_property_feature = Property +_UI_ManyBooleanAttributeProperty_quantifier_feature = Quantifier +_UI_ManyBooleanAttributeProperty_value_feature = Value +_UI_ManyBooleanAttributeProperty_operator_feature = Operator +_UI_ManyIntegerAttributeProperty_quantifier_feature = Quantifier +_UI_ManyIntegerAttributeProperty_value_feature = Value +_UI_ManyIntegerAttributeProperty_operator_feature = Operator +_UI_ManyStringAttributeProperty_quantifier_feature = Quantifier +_UI_ManyStringAttributeProperty_value_feature = Value +_UI_ManyStringAttributeProperty_operator_feature = Operator +_UI_BooleanAttributeProperty_value_feature = Value +_UI_BooleanAttributeProperty_operator_feature = Operator +_UI_IntegerAttributeProperty_value_feature = Value +_UI_IntegerAttributeProperty_operator_feature = Operator +_UI_StringAttributeProperty_value_feature = Value +_UI_StringAttributeProperty_operator_feature = Operator +_UI_Unknown_feature = Unspecified + +_UI_UnaryOperator_NOT_literal = NOT +_UI_ComparisonOperator_EQUAL_literal = EQUAL +_UI_BooleanOperator_AND_literal = AND +_UI_BooleanOperator_OR_literal = OR +_UI_BooleanOperator_IMPLIES_literal = IMPLIES +_UI_Quantifier_EXISTS_literal = EXISTS +_UI_Quantifier_FORALL_literal = FORALL +_UI_Stepping_ONGOING_literal = ONGOING +_UI_Stepping_ENDED_literal = ENDED +_UI_Stepping_ENDING_literal = ENDING +_UI_Scenario_type = Scenario +_UI_Event_type = Event +_UI_ElementProvider_type = Element Provider +_UI_ElementReference_type = Element Reference +_UI_ElementQuery_type = Element Query +_UI_EventOccurrence_type = Event Occurrence +_UI_ScenarioElement_type = Element +_UI_ScenarioFSM_type = FSM +_UI_ScenarioFSMState_type = FSM State +_UI_ScenarioFSMTransition_type = FSM Transition +_UI_Arbiter_type = Arbiter +_UI_ArbiterState_type = Arbiter State +_UI_ArbiterTransition_type = Arbiter Transition +_UI_Scenario_elements_feature = Elements +_UI_Event_targetProvider_feature = Target Provider +_UI_ElementReference_element_feature = Element +_UI_ElementQuery_query_feature = Query +_UI_EventOccurrence_event_feature = Event +_UI_EventOccurrence_time_feature = Time +_UI_ScenarioElement_nextElements_feature = Next Elements +_UI_ScenarioElement_guard_feature = Guard +_UI_ScenarioFSM_states_feature = States +_UI_ScenarioFSM_initialState_feature = Initial State +_UI_ScenarioFSM_acceptingStates_feature = Accepting States +_UI_ScenarioFSM_transitions_feature = Transitions +_UI_ScenarioFSM_name_feature = Name +_UI_ScenarioFSMState_event_feature = Event +_UI_ScenarioFSMState_outgoingTransitions_feature = Outgoing Transitions +_UI_ScenarioFSMState_incomingTransitions_feature = Incoming Transitions +_UI_ScenarioFSMState_name_feature = Name +_UI_ScenarioFSMTransition_guard_feature = Guard +_UI_ScenarioFSMTransition_source_feature = Source +_UI_ScenarioFSMTransition_target_feature = Target +_UI_ScenarioFSMTransition_name_feature = Name +_UI_Arbiter_states_feature = States +_UI_Arbiter_transitions_feature = Transitions +_UI_Arbiter_initialState_feature = Initial State +_UI_Arbiter_acceptingStates_feature = Accepting States +_UI_Arbiter_name_feature = Name +_UI_ArbiterState_incomingTransitions_feature = Incoming Transitions +_UI_ArbiterState_outgoingTransitions_feature = Outgoing Transitions +_UI_ArbiterState_truthValue_feature = Truth Value +_UI_ArbiterState_name_feature = Name +_UI_ArbiterTransition_guard_feature = Guard +_UI_ArbiterTransition_source_feature = Source +_UI_ArbiterTransition_target_feature = Target +_UI_ArbiterTransition_name_feature = Name +_UI_TruthValue_INCONCLUSIVE_literal = INCONCLUSIVE +_UI_TruthValue_TRUE_literal = TRUE +_UI_TruthValue_FALSE_literal = FALSE +_UI_State_type = State +_UI_Transition_type = Transition +_UI_State_truthValue_feature = Truth Value +_UI_State_outgoingTransitions_feature = Outgoing Transitions +_UI_State_incomingTransitions_feature = Incoming Transitions +_UI_Transition_source_feature = Source +_UI_Transition_target_feature = Target +_UI_Transition_guard_feature = Guard +_UI_Report_type = Report +_UI_EventReport_type = Event Report +_UI_Report_events_feature = Events +_UI_EventReport_event_feature = Event +_UI_EventReport_matches_feature = Matches +_UI_EventReport_target_feature = Target +_UI_EventReport_time_feature = Time +_UI_ScenarioElement_previousElements_feature = Previous Elements diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/plugin.xml new file mode 100644 index 000000000..1d88c065c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/plugin.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterEditPlugin.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterEditPlugin.java new file mode 100644 index 000000000..0be05cea0 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterEditPlugin.java @@ -0,0 +1,98 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyEditPlugin; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioEditPlugin; + +/** + * This is the central singleton for the Arbiter edit plugin. + * + * + * @generated + */ +public final class ArbiterEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ArbiterEditPlugin INSTANCE = new ArbiterEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ArbiterEditPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + PropertyEditPlugin.INSTANCE, + ScenarioEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterItemProvider.java new file mode 100644 index 000000000..962e6dc6c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterItemProvider.java @@ -0,0 +1,188 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.arbiter.Arbiter; +import org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter} object. + * + * + * @generated + */ +public class ArbiterItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArbiterItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addInitialStatePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Initial State feature. + * + * + * @generated + */ + protected void addInitialStatePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arbiter_initialState_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arbiter_initialState_feature", "_UI_Arbiter_type"), + ArbiterPackage.Literals.ARBITER__INITIAL_STATE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArbiterPackage.Literals.ARBITER__STATES); + childrenFeatures.add(ArbiterPackage.Literals.ARBITER__TRANSITIONS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Arbiter.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Arbiter")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_Arbiter_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Arbiter.class)) { + case ArbiterPackage.ARBITER__STATES: + case ArbiterPackage.ARBITER__TRANSITIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ArbiterEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterItemProviderAdapterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterItemProviderAdapterFactory.java new file mode 100644 index 000000000..4b7a581c1 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/ArbiterItemProviderAdapterFactory.java @@ -0,0 +1,175 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.gemoc.event.commons.model.arbiter.util.ArbiterAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class ArbiterItemProviderAdapterFactory extends ArbiterAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public ArbiterItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/StateItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/StateItemProvider.java new file mode 100644 index 000000000..3e3923db4 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/StateItemProvider.java @@ -0,0 +1,206 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage; +import org.eclipse.gemoc.event.commons.model.arbiter.State; +import org.eclipse.gemoc.event.commons.model.arbiter.TruthValue; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.arbiter.State} object. + * + * + * @generated + */ +public class StateItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public StateItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addTruthValuePropertyDescriptor(object); + addOutgoingTransitionsPropertyDescriptor(object); + addIncomingTransitionsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Truth Value feature. + * + * + * @generated + */ + protected void addTruthValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_State_truthValue_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_State_truthValue_feature", "_UI_State_type"), + ArbiterPackage.Literals.STATE__TRUTH_VALUE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Outgoing Transitions feature. + * + * + * @generated + */ + protected void addOutgoingTransitionsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_State_outgoingTransitions_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_State_outgoingTransitions_feature", "_UI_State_type"), + ArbiterPackage.Literals.STATE__OUTGOING_TRANSITIONS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Incoming Transitions feature. + * + * + * @generated + */ + protected void addIncomingTransitionsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_State_incomingTransitions_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_State_incomingTransitions_feature", "_UI_State_type"), + ArbiterPackage.Literals.STATE__INCOMING_TRANSITIONS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns State.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/State")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + TruthValue labelValue = ((State)object).getTruthValue(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_State_type") : + getString("_UI_State_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(State.class)) { + case ArbiterPackage.STATE__TRUTH_VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ArbiterEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/TransitionItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/TransitionItemProvider.java new file mode 100644 index 000000000..64e85865f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/arbiter/provider/TransitionItemProvider.java @@ -0,0 +1,192 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +import org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.arbiter.Transition} object. + * + * + * @generated + */ +public class TransitionItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public TransitionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addSourcePropertyDescriptor(object); + addTargetPropertyDescriptor(object); + addGuardPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Source feature. + * + * + * @generated + */ + protected void addSourcePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Transition_source_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Transition_source_feature", "_UI_Transition_type"), + ArbiterPackage.Literals.TRANSITION__SOURCE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Target feature. + * + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Transition_target_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Transition_target_feature", "_UI_Transition_type"), + ArbiterPackage.Literals.TRANSITION__TARGET, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Guard feature. + * + * + * @generated + */ + protected void addGuardPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Transition_guard_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Transition_guard_feature", "_UI_Transition_type"), + ArbiterPackage.Literals.TRANSITION__GUARD, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns Transition.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Transition")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_Transition_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ArbiterEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/AbstractPropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/AbstractPropertyItemProvider.java new file mode 100644 index 000000000..f00574c0b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/AbstractPropertyItemProvider.java @@ -0,0 +1,120 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.AbstractProperty} object. + * + * + * @generated + */ +public class AbstractPropertyItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public AbstractPropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AbstractProperty.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AbstractProperty")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_AbstractProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PropertyEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/BinaryPropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/BinaryPropertyItemProvider.java new file mode 100644 index 000000000..f67300ca1 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/BinaryPropertyItemProvider.java @@ -0,0 +1,224 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.BinaryProperty; +import org.eclipse.gemoc.event.commons.model.property.BooleanOperator; +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty} object. + * + * + * @generated + */ +public class BinaryPropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BinaryPropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BinaryProperty_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_BinaryProperty_operator_feature", "_UI_BinaryProperty_type"), + PropertyPackage.Literals.BINARY_PROPERTY__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.BINARY_PROPERTY__LEFT); + childrenFeatures.add(PropertyPackage.Literals.BINARY_PROPERTY__RIGHT); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + BooleanOperator labelValue = ((BinaryProperty)object).getOperator(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_BinaryProperty_type") : + getString("_UI_BinaryProperty_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(BinaryProperty.class)) { + case PropertyPackage.BINARY_PROPERTY__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertyPackage.BINARY_PROPERTY__LEFT: + case PropertyPackage.BINARY_PROPERTY__RIGHT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.BINARY_PROPERTY__LEFT, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.BINARY_PROPERTY__LEFT, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.BINARY_PROPERTY__LEFT, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.BINARY_PROPERTY__LEFT, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.BINARY_PROPERTY__RIGHT, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.BINARY_PROPERTY__RIGHT, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.BINARY_PROPERTY__RIGHT, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.BINARY_PROPERTY__RIGHT, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + + /** + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * + * + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = + childFeature == PropertyPackage.Literals.BINARY_PROPERTY__LEFT || + childFeature == PropertyPackage.Literals.BINARY_PROPERTY__RIGHT; + + if (qualify) { + return getString + ("_UI_CreateChild_text2", + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/BooleanAttributePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/BooleanAttributePropertyItemProvider.java new file mode 100644 index 000000000..3423413a5 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/BooleanAttributePropertyItemProvider.java @@ -0,0 +1,143 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty} object. + * + * + * @generated + */ +public class BooleanAttributePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BooleanAttributePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addValuePropertyDescriptor(object); + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BooleanAttributeProperty_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_BooleanAttributeProperty_value_feature", "_UI_BooleanAttributeProperty_type"), + PropertyPackage.Literals.BOOLEAN_ATTRIBUTE_PROPERTY__VALUE, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BooleanAttributeProperty_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_BooleanAttributeProperty_operator_feature", "_UI_BooleanAttributeProperty_type"), + PropertyPackage.Literals.BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + BooleanAttributeProperty booleanAttributeProperty = (BooleanAttributeProperty)object; + return getString("_UI_BooleanAttributeProperty_type") + " " + booleanAttributeProperty.isValue(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(BooleanAttributeProperty.class)) { + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/CompositePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/CompositePropertyItemProvider.java new file mode 100644 index 000000000..b7324fa73 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/CompositePropertyItemProvider.java @@ -0,0 +1,172 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.CompositeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty} object. + * + * + * @generated + */ +public class CompositePropertyItemProvider extends PropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public CompositePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.COMPOSITE_PROPERTY__PROPERTIES); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns CompositeProperty.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CompositeProperty")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_CompositeProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(CompositeProperty.class)) { + case PropertyPackage.COMPOSITE_PROPERTY__PROPERTIES: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.COMPOSITE_PROPERTY__PROPERTIES, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.COMPOSITE_PROPERTY__PROPERTIES, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.COMPOSITE_PROPERTY__PROPERTIES, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.COMPOSITE_PROPERTY__PROPERTIES, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.COMPOSITE_PROPERTY__PROPERTIES, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.COMPOSITE_PROPERTY__PROPERTIES, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.COMPOSITE_PROPERTY__PROPERTIES, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ContainerReferencePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ContainerReferencePropertyItemProvider.java new file mode 100644 index 000000000..63fe238bc --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ContainerReferencePropertyItemProvider.java @@ -0,0 +1,157 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty} object. + * + * + * @generated + */ +public class ContainerReferencePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ContainerReferencePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.CONTAINER_REFERENCE_PROPERTY__PROPERTY); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ContainerReferenceProperty.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ContainerReferenceProperty")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ContainerReferenceProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ContainerReferenceProperty.class)) { + case PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.CONTAINER_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.CONTAINER_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.CONTAINER_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.CONTAINER_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/EventPreconditionItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/EventPreconditionItemProvider.java new file mode 100644 index 000000000..7c0e5152f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/EventPreconditionItemProvider.java @@ -0,0 +1,120 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.EventPrecondition} object. + * + * + * @generated + */ +public class EventPreconditionItemProvider extends PropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public EventPreconditionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addEventPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Event feature. + * + * + * @generated + */ + protected void addEventPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EventPrecondition_event_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EventPrecondition_event_feature", "_UI_EventPrecondition_type"), + PropertyPackage.Literals.EVENT_PRECONDITION__EVENT, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns EventPrecondition.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EventPrecondition")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_EventPrecondition_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/IntegerAttributePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/IntegerAttributePropertyItemProvider.java new file mode 100644 index 000000000..b67c362ed --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/IntegerAttributePropertyItemProvider.java @@ -0,0 +1,143 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty} object. + * + * + * @generated + */ +public class IntegerAttributePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public IntegerAttributePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addValuePropertyDescriptor(object); + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IntegerAttributeProperty_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_IntegerAttributeProperty_value_feature", "_UI_IntegerAttributeProperty_type"), + PropertyPackage.Literals.INTEGER_ATTRIBUTE_PROPERTY__VALUE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IntegerAttributeProperty_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_IntegerAttributeProperty_operator_feature", "_UI_IntegerAttributeProperty_type"), + PropertyPackage.Literals.INTEGER_ATTRIBUTE_PROPERTY__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + IntegerAttributeProperty integerAttributeProperty = (IntegerAttributeProperty)object; + return getString("_UI_IntegerAttributeProperty_type") + " " + integerAttributeProperty.getValue(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(IntegerAttributeProperty.class)) { + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__VALUE: + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyBooleanAttributePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyBooleanAttributePropertyItemProvider.java new file mode 100644 index 000000000..3a5d5625d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyBooleanAttributePropertyItemProvider.java @@ -0,0 +1,182 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty} object. + * + * + * @generated + */ +public class ManyBooleanAttributePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ManyBooleanAttributePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addQuantifierPropertyDescriptor(object); + addValuePropertyDescriptor(object); + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Quantifier feature. + * + * + * @generated + */ + protected void addQuantifierPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyBooleanAttributeProperty_quantifier_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyBooleanAttributeProperty_quantifier_feature", "_UI_ManyBooleanAttributeProperty_type"), + PropertyPackage.Literals.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyBooleanAttributeProperty_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyBooleanAttributeProperty_value_feature", "_UI_ManyBooleanAttributeProperty_type"), + PropertyPackage.Literals.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyBooleanAttributeProperty_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyBooleanAttributeProperty_operator_feature", "_UI_ManyBooleanAttributeProperty_type"), + PropertyPackage.Literals.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns ManyBooleanAttributeProperty.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ManyBooleanAttributeProperty")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + Quantifier labelValue = ((ManyBooleanAttributeProperty)object).getQuantifier(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_ManyBooleanAttributeProperty_type") : + getString("_UI_ManyBooleanAttributeProperty_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ManyBooleanAttributeProperty.class)) { + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER: + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyIntegerAttributePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyIntegerAttributePropertyItemProvider.java new file mode 100644 index 000000000..f528ef8cf --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyIntegerAttributePropertyItemProvider.java @@ -0,0 +1,182 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty} object. + * + * + * @generated + */ +public class ManyIntegerAttributePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ManyIntegerAttributePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addQuantifierPropertyDescriptor(object); + addValuePropertyDescriptor(object); + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Quantifier feature. + * + * + * @generated + */ + protected void addQuantifierPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyIntegerAttributeProperty_quantifier_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyIntegerAttributeProperty_quantifier_feature", "_UI_ManyIntegerAttributeProperty_type"), + PropertyPackage.Literals.MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyIntegerAttributeProperty_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyIntegerAttributeProperty_value_feature", "_UI_ManyIntegerAttributeProperty_type"), + PropertyPackage.Literals.MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyIntegerAttributeProperty_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyIntegerAttributeProperty_operator_feature", "_UI_ManyIntegerAttributeProperty_type"), + PropertyPackage.Literals.MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns ManyIntegerAttributeProperty.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ManyIntegerAttributeProperty")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + Quantifier labelValue = ((ManyIntegerAttributeProperty)object).getQuantifier(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_ManyIntegerAttributeProperty_type") : + getString("_UI_ManyIntegerAttributeProperty_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ManyIntegerAttributeProperty.class)) { + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER: + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE: + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyReferencePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyReferencePropertyItemProvider.java new file mode 100644 index 000000000..05e347cb9 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyReferencePropertyItemProvider.java @@ -0,0 +1,179 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty} object. + * + * + * @generated + */ +public class ManyReferencePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ManyReferencePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addQuantifierPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Quantifier feature. + * + * + * @generated + */ + protected void addQuantifierPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyReferenceProperty_quantifier_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyReferenceProperty_quantifier_feature", "_UI_ManyReferenceProperty_type"), + PropertyPackage.Literals.MANY_REFERENCE_PROPERTY__QUANTIFIER, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.MANY_REFERENCE_PROPERTY__PROPERTY); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + Quantifier labelValue = ((ManyReferenceProperty)object).getQuantifier(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_ManyReferenceProperty_type") : + getString("_UI_ManyReferenceProperty_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ManyReferenceProperty.class)) { + case PropertyPackage.MANY_REFERENCE_PROPERTY__QUANTIFIER: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.MANY_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.MANY_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.MANY_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.MANY_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyStringAttributePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyStringAttributePropertyItemProvider.java new file mode 100644 index 000000000..639c56645 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ManyStringAttributePropertyItemProvider.java @@ -0,0 +1,182 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty} object. + * + * + * @generated + */ +public class ManyStringAttributePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ManyStringAttributePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addQuantifierPropertyDescriptor(object); + addValuePropertyDescriptor(object); + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Quantifier feature. + * + * + * @generated + */ + protected void addQuantifierPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyStringAttributeProperty_quantifier_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyStringAttributeProperty_quantifier_feature", "_UI_ManyStringAttributeProperty_type"), + PropertyPackage.Literals.MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyStringAttributeProperty_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyStringAttributeProperty_value_feature", "_UI_ManyStringAttributeProperty_type"), + PropertyPackage.Literals.MANY_STRING_ATTRIBUTE_PROPERTY__VALUE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ManyStringAttributeProperty_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ManyStringAttributeProperty_operator_feature", "_UI_ManyStringAttributeProperty_type"), + PropertyPackage.Literals.MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns ManyStringAttributeProperty.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ManyStringAttributeProperty")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + Quantifier labelValue = ((ManyStringAttributeProperty)object).getQuantifier(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_ManyStringAttributeProperty_type") : + getString("_UI_ManyStringAttributeProperty_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ManyStringAttributeProperty.class)) { + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER: + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__VALUE: + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/NegationTemporalPropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/NegationTemporalPropertyItemProvider.java new file mode 100644 index 000000000..55e4e2051 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/NegationTemporalPropertyItemProvider.java @@ -0,0 +1,125 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty} object. + * + * + * @generated + */ +public class NegationTemporalPropertyItemProvider extends TemporalPropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public NegationTemporalPropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.NEGATION_TEMPORAL_PROPERTY__FORMULA); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_NegationTemporalProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(NegationTemporalProperty.class)) { + case PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/NextPropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/NextPropertyItemProvider.java new file mode 100644 index 000000000..009aa8816 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/NextPropertyItemProvider.java @@ -0,0 +1,166 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.NextProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.NextProperty} object. + * + * + * @generated + */ +public class NextPropertyItemProvider extends TemporalPropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public NextPropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.NEXT_PROPERTY__FORMULA); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_NextProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(NextProperty.class)) { + case PropertyPackage.NEXT_PROPERTY__FORMULA: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.NEXT_PROPERTY__FORMULA, + PropertyFactory.eINSTANCE.createAbstractProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.NEXT_PROPERTY__FORMULA, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.NEXT_PROPERTY__FORMULA, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.NEXT_PROPERTY__FORMULA, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.NEXT_PROPERTY__FORMULA, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.NEXT_PROPERTY__FORMULA, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.NEXT_PROPERTY__FORMULA, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.NEXT_PROPERTY__FORMULA, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyEditPlugin.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyEditPlugin.java new file mode 100644 index 000000000..2402c9efb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyEditPlugin.java @@ -0,0 +1,95 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioEditPlugin; + +/** + * This is the central singleton for the Property edit plugin. + * + * + * @generated + */ +public final class PropertyEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final PropertyEditPlugin INSTANCE = new PropertyEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public PropertyEditPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + ScenarioEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyItemProvider.java new file mode 100644 index 000000000..dad6bcc0f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyItemProvider.java @@ -0,0 +1,83 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.Property} object. + * + * + * @generated + */ +public class PropertyItemProvider extends AbstractPropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public PropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_Property_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyItemProviderAdapterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyItemProviderAdapterFactory.java new file mode 100644 index 000000000..adae2f589 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyItemProviderAdapterFactory.java @@ -0,0 +1,367 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.gemoc.event.commons.model.property.util.PropertyAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class PropertyItemProviderAdapterFactory extends PropertyAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public PropertyItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.property.AbstractProperty} instances. + * + * + * @generated + */ + protected AbstractPropertyItemProvider abstractPropertyItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.property.AbstractProperty}. + * + * + * @generated + */ + @Override + public Adapter createAbstractPropertyAdapter() { + if (abstractPropertyItemProvider == null) { + abstractPropertyItemProvider = new AbstractPropertyItemProvider(this); + } + + return abstractPropertyItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.property.PropertyReference} instances. + * + * + * @generated + */ + protected PropertyReferenceItemProvider propertyReferenceItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.property.PropertyReference}. + * + * + * @generated + */ + @Override + public Adapter createPropertyReferenceAdapter() { + if (propertyReferenceItemProvider == null) { + propertyReferenceItemProvider = new PropertyReferenceItemProvider(this); + } + + return propertyReferenceItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty} instances. + * + * + * @generated + */ + protected CompositePropertyItemProvider compositePropertyItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty}. + * + * + * @generated + */ + @Override + public Adapter createCompositePropertyAdapter() { + if (compositePropertyItemProvider == null) { + compositePropertyItemProvider = new CompositePropertyItemProvider(this); + } + + return compositePropertyItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.property.EventPrecondition} instances. + * + * + * @generated + */ + protected EventPreconditionItemProvider eventPreconditionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.property.EventPrecondition}. + * + * + * @generated + */ + @Override + public Adapter createEventPreconditionAdapter() { + if (eventPreconditionItemProvider == null) { + eventPreconditionItemProvider = new EventPreconditionItemProvider(this); + } + + return eventPreconditionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty} instances. + * + * + * @generated + */ + protected ContainerReferencePropertyItemProvider containerReferencePropertyItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty}. + * + * + * @generated + */ + @Override + public Adapter createContainerReferencePropertyAdapter() { + if (containerReferencePropertyItemProvider == null) { + containerReferencePropertyItemProvider = new ContainerReferencePropertyItemProvider(this); + } + + return containerReferencePropertyItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty} instances. + * + * + * @generated + */ + protected ManyBooleanAttributePropertyItemProvider manyBooleanAttributePropertyItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty}. + * + * + * @generated + */ + @Override + public Adapter createManyBooleanAttributePropertyAdapter() { + if (manyBooleanAttributePropertyItemProvider == null) { + manyBooleanAttributePropertyItemProvider = new ManyBooleanAttributePropertyItemProvider(this); + } + + return manyBooleanAttributePropertyItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty} instances. + * + * + * @generated + */ + protected ManyIntegerAttributePropertyItemProvider manyIntegerAttributePropertyItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty}. + * + * + * @generated + */ + @Override + public Adapter createManyIntegerAttributePropertyAdapter() { + if (manyIntegerAttributePropertyItemProvider == null) { + manyIntegerAttributePropertyItemProvider = new ManyIntegerAttributePropertyItemProvider(this); + } + + return manyIntegerAttributePropertyItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty} instances. + * + * + * @generated + */ + protected ManyStringAttributePropertyItemProvider manyStringAttributePropertyItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty}. + * + * + * @generated + */ + @Override + public Adapter createManyStringAttributePropertyAdapter() { + if (manyStringAttributePropertyItemProvider == null) { + manyStringAttributePropertyItemProvider = new ManyStringAttributePropertyItemProvider(this); + } + + return manyStringAttributePropertyItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (abstractPropertyItemProvider != null) abstractPropertyItemProvider.dispose(); + if (propertyReferenceItemProvider != null) propertyReferenceItemProvider.dispose(); + if (compositePropertyItemProvider != null) compositePropertyItemProvider.dispose(); + if (eventPreconditionItemProvider != null) eventPreconditionItemProvider.dispose(); + if (containerReferencePropertyItemProvider != null) containerReferencePropertyItemProvider.dispose(); + if (manyBooleanAttributePropertyItemProvider != null) manyBooleanAttributePropertyItemProvider.dispose(); + if (manyIntegerAttributePropertyItemProvider != null) manyIntegerAttributePropertyItemProvider.dispose(); + if (manyStringAttributePropertyItemProvider != null) manyStringAttributePropertyItemProvider.dispose(); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyReferenceItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyReferenceItemProvider.java new file mode 100644 index 000000000..ca1bd972b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/PropertyReferenceItemProvider.java @@ -0,0 +1,120 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.PropertyReference} object. + * + * + * @generated + */ +public class PropertyReferenceItemProvider extends PropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public PropertyReferenceItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addReferencedPropertyPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Referenced Property feature. + * + * + * @generated + */ + protected void addReferencedPropertyPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PropertyReference_referencedProperty_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PropertyReference_referencedProperty_feature", "_UI_PropertyReference_type"), + PropertyPackage.Literals.PROPERTY_REFERENCE__REFERENCED_PROPERTY, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns PropertyReference.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/PropertyReference")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_PropertyReference_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ReleasePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ReleasePropertyItemProvider.java new file mode 100644 index 000000000..cfa7120ed --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/ReleasePropertyItemProvider.java @@ -0,0 +1,231 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.ReleaseProperty; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty} object. + * + * + * @generated + */ +public class ReleasePropertyItemProvider extends TemporalPropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ReleasePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA); + childrenFeatures.add(PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ReleaseProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ReleaseProperty.class)) { + case PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA: + case PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createAbstractProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createAbstractProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + + /** + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * + * + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = + childFeature == PropertyPackage.Literals.RELEASE_PROPERTY__LEFT_FORMULA || + childFeature == PropertyPackage.Literals.RELEASE_PROPERTY__RIGHT_FORMULA; + + if (qualify) { + return getString + ("_UI_CreateChild_text2", + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/SingleReferencePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/SingleReferencePropertyItemProvider.java new file mode 100644 index 000000000..4bad224ba --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/SingleReferencePropertyItemProvider.java @@ -0,0 +1,146 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty} object. + * + * + * @generated + */ +public class SingleReferencePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public SingleReferencePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.SINGLE_REFERENCE_PROPERTY__PROPERTY); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_SingleReferenceProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(SingleReferenceProperty.class)) { + case PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.SINGLE_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.SINGLE_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.SINGLE_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.SINGLE_REFERENCE_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StatePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StatePropertyItemProvider.java new file mode 100644 index 000000000..81745bef0 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StatePropertyItemProvider.java @@ -0,0 +1,109 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.StateProperty} object. + * + * + * @generated + */ +public class StatePropertyItemProvider extends PropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public StatePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addTargetPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Target feature. + * + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_StateProperty_target_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_StateProperty_target_feature", "_UI_StateProperty_type"), + PropertyPackage.Literals.STATE_PROPERTY__TARGET, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_StateProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StepPropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StepPropertyItemProvider.java new file mode 100644 index 000000000..5ac4bc092 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StepPropertyItemProvider.java @@ -0,0 +1,158 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.StepProperty; +import org.eclipse.gemoc.event.commons.model.property.Stepping; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.StepProperty} object. + * + * + * @generated + */ +public class StepPropertyItemProvider extends PropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public StepPropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addSteppingPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Stepping feature. + * + * + * @generated + */ + protected void addSteppingPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_StepProperty_stepping_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_StepProperty_stepping_feature", "_UI_StepProperty_type"), + PropertyPackage.Literals.STEP_PROPERTY__STEPPING, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.STEP_PROPERTY__TARGET_PROVIDER); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + Stepping labelValue = ((StepProperty)object).getStepping(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_StepProperty_type") : + getString("_UI_StepProperty_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(StepProperty.class)) { + case PropertyPackage.STEP_PROPERTY__STEPPING: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StringAttributePropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StringAttributePropertyItemProvider.java new file mode 100644 index 000000000..e7c9f100f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/StringAttributePropertyItemProvider.java @@ -0,0 +1,145 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty} object. + * + * + * @generated + */ +public class StringAttributePropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public StringAttributePropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addValuePropertyDescriptor(object); + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_StringAttributeProperty_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_StringAttributeProperty_value_feature", "_UI_StringAttributeProperty_type"), + PropertyPackage.Literals.STRING_ATTRIBUTE_PROPERTY__VALUE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_StringAttributeProperty_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_StringAttributeProperty_operator_feature", "_UI_StringAttributeProperty_type"), + PropertyPackage.Literals.STRING_ATTRIBUTE_PROPERTY__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((StringAttributeProperty)object).getValue(); + return label == null || label.length() == 0 ? + getString("_UI_StringAttributeProperty_type") : + getString("_UI_StringAttributeProperty_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(StringAttributeProperty.class)) { + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__VALUE: + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/TemporalPropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/TemporalPropertyItemProvider.java new file mode 100644 index 000000000..2574f4e9d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/TemporalPropertyItemProvider.java @@ -0,0 +1,83 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.TemporalProperty} object. + * + * + * @generated + */ +public class TemporalPropertyItemProvider extends AbstractPropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public TemporalPropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_TemporalProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/UnaryPropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/UnaryPropertyItemProvider.java new file mode 100644 index 000000000..51de8e64e --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/UnaryPropertyItemProvider.java @@ -0,0 +1,179 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.UnaryOperator; +import org.eclipse.gemoc.event.commons.model.property.UnaryProperty; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty} object. + * + * + * @generated + */ +public class UnaryPropertyItemProvider extends StatePropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public UnaryPropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_UnaryProperty_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_UnaryProperty_operator_feature", "_UI_UnaryProperty_type"), + PropertyPackage.Literals.UNARY_PROPERTY__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.UNARY_PROPERTY__PROPERTY); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + UnaryOperator labelValue = ((UnaryProperty)object).getOperator(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_UnaryProperty_type") : + getString("_UI_UnaryProperty_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(UnaryProperty.class)) { + case PropertyPackage.UNARY_PROPERTY__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertyPackage.UNARY_PROPERTY__PROPERTY: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNARY_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNARY_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNARY_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNARY_PROPERTY__PROPERTY, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/UntilPropertyItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/UntilPropertyItemProvider.java new file mode 100644 index 000000000..c4c3a1faf --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/property/provider/UntilPropertyItemProvider.java @@ -0,0 +1,231 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.UntilProperty; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.property.UntilProperty} object. + * + * + * @generated + */ +public class UntilPropertyItemProvider extends TemporalPropertyItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public UntilPropertyItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA); + childrenFeatures.add(PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_UntilProperty_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(UntilProperty.class)) { + case PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA: + case PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createAbstractProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createAbstractProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + + /** + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * + * + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = + childFeature == PropertyPackage.Literals.UNTIL_PROPERTY__LEFT_FORMULA || + childFeature == PropertyPackage.Literals.UNTIL_PROPERTY__RIGHT_FORMULA; + + if (qualify) { + return getString + ("_UI_CreateChild_text2", + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/EventReportItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/EventReportItemProvider.java new file mode 100644 index 000000000..650d76a99 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/EventReportItemProvider.java @@ -0,0 +1,225 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.report.EventReport; +import org.eclipse.gemoc.event.commons.model.report.ReportPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.report.EventReport} object. + * + * + * @generated + */ +public class EventReportItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public EventReportItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addEventPropertyDescriptor(object); + addMatchesPropertyDescriptor(object); + addTargetPropertyDescriptor(object); + addTimePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Event feature. + * + * + * @generated + */ + protected void addEventPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EventReport_event_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EventReport_event_feature", "_UI_EventReport_type"), + ReportPackage.Literals.EVENT_REPORT__EVENT, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Matches feature. + * + * + * @generated + */ + protected void addMatchesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EventReport_matches_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EventReport_matches_feature", "_UI_EventReport_type"), + ReportPackage.Literals.EVENT_REPORT__MATCHES, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Target feature. + * + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EventReport_target_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EventReport_target_feature", "_UI_EventReport_type"), + ReportPackage.Literals.EVENT_REPORT__TARGET, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Time feature. + * + * + * @generated + */ + protected void addTimePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EventReport_time_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EventReport_time_feature", "_UI_EventReport_type"), + ReportPackage.Literals.EVENT_REPORT__TIME, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns EventReport.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EventReport")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + EventReport eventReport = (EventReport)object; + return getString("_UI_EventReport_type") + " " + eventReport.getTime(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(EventReport.class)) { + case ReportPackage.EVENT_REPORT__TIME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ReportEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportEditPlugin.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportEditPlugin.java new file mode 100644 index 000000000..d209afb86 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportEditPlugin.java @@ -0,0 +1,98 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyEditPlugin; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioEditPlugin; + +/** + * This is the central singleton for the Report edit plugin. + * + * + * @generated + */ +public final class ReportEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ReportEditPlugin INSTANCE = new ReportEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ReportEditPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + PropertyEditPlugin.INSTANCE, + ScenarioEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportItemProvider.java new file mode 100644 index 000000000..0430eceba --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportItemProvider.java @@ -0,0 +1,168 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.report.Report; +import org.eclipse.gemoc.event.commons.model.report.ReportFactory; +import org.eclipse.gemoc.event.commons.model.report.ReportPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.report.Report} object. + * + * + * @generated + */ +public class ReportItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ReportItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ReportPackage.Literals.REPORT__EVENTS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Report.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Report")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_Report_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Report.class)) { + case ReportPackage.REPORT__EVENTS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ReportPackage.Literals.REPORT__EVENTS, + ReportFactory.eINSTANCE.createEventReport())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ReportEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportItemProviderAdapterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportItemProviderAdapterFactory.java new file mode 100644 index 000000000..5d7a7673a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/report/provider/ReportItemProviderAdapterFactory.java @@ -0,0 +1,223 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.gemoc.event.commons.model.report.util.ReportAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class ReportItemProviderAdapterFactory extends ReportAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public ReportItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.report.Report} instances. + * + * + * @generated + */ + protected ReportItemProvider reportItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.report.Report}. + * + * + * @generated + */ + @Override + public Adapter createReportAdapter() { + if (reportItemProvider == null) { + reportItemProvider = new ReportItemProvider(this); + } + + return reportItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.report.EventReport} instances. + * + * + * @generated + */ + protected EventReportItemProvider eventReportItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.report.EventReport}. + * + * + * @generated + */ + @Override + public Adapter createEventReportAdapter() { + if (eventReportItemProvider == null) { + eventReportItemProvider = new EventReportItemProvider(this); + } + + return eventReportItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (reportItemProvider != null) reportItemProvider.dispose(); + if (eventReportItemProvider != null) eventReportItemProvider.dispose(); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterItemProvider.java new file mode 100644 index 000000000..b098c9e41 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterItemProvider.java @@ -0,0 +1,241 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.scenario.Arbiter; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFactory; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter} object. + * + * + * @generated + */ +public class ArbiterItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArbiterItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addInitialStatePropertyDescriptor(object); + addAcceptingStatesPropertyDescriptor(object); + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Initial State feature. + * + * + * @generated + */ + protected void addInitialStatePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arbiter_initialState_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arbiter_initialState_feature", "_UI_Arbiter_type"), + ScenarioPackage.Literals.ARBITER__INITIAL_STATE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Accepting States feature. + * + * + * @generated + */ + protected void addAcceptingStatesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arbiter_acceptingStates_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arbiter_acceptingStates_feature", "_UI_Arbiter_type"), + ScenarioPackage.Literals.ARBITER__ACCEPTING_STATES, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arbiter_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arbiter_name_feature", "_UI_Arbiter_type"), + ScenarioPackage.Literals.ARBITER__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.ARBITER__STATES); + childrenFeatures.add(ScenarioPackage.Literals.ARBITER__TRANSITIONS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Arbiter)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Arbiter_type") : + getString("_UI_Arbiter_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Arbiter.class)) { + case ScenarioPackage.ARBITER__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ScenarioPackage.ARBITER__STATES: + case ScenarioPackage.ARBITER__TRANSITIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER__STATES, + ScenarioFactory.eINSTANCE.createArbiterState())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER__TRANSITIONS, + ScenarioFactory.eINSTANCE.createArbiterTransition())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterStateItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterStateItemProvider.java new file mode 100644 index 000000000..529f729d0 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterStateItemProvider.java @@ -0,0 +1,228 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterState; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState} object. + * + * + * @generated + */ +public class ArbiterStateItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArbiterStateItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addIncomingTransitionsPropertyDescriptor(object); + addOutgoingTransitionsPropertyDescriptor(object); + addTruthValuePropertyDescriptor(object); + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Incoming Transitions feature. + * + * + * @generated + */ + protected void addIncomingTransitionsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ArbiterState_incomingTransitions_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ArbiterState_incomingTransitions_feature", "_UI_ArbiterState_type"), + ScenarioPackage.Literals.ARBITER_STATE__INCOMING_TRANSITIONS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Outgoing Transitions feature. + * + * + * @generated + */ + protected void addOutgoingTransitionsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ArbiterState_outgoingTransitions_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ArbiterState_outgoingTransitions_feature", "_UI_ArbiterState_type"), + ScenarioPackage.Literals.ARBITER_STATE__OUTGOING_TRANSITIONS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Truth Value feature. + * + * + * @generated + */ + protected void addTruthValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ArbiterState_truthValue_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ArbiterState_truthValue_feature", "_UI_ArbiterState_type"), + ScenarioPackage.Literals.ARBITER_STATE__TRUTH_VALUE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ArbiterState_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ArbiterState_name_feature", "_UI_ArbiterState_type"), + ScenarioPackage.Literals.ARBITER_STATE__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns ArbiterState.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ArbiterState")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ArbiterState)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ArbiterState_type") : + getString("_UI_ArbiterState_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ArbiterState.class)) { + case ScenarioPackage.ARBITER_STATE__TRUTH_VALUE: + case ScenarioPackage.ARBITER_STATE__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterTransitionItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterTransitionItemProvider.java new file mode 100644 index 000000000..8e4f0c061 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ArbiterTransitionItemProvider.java @@ -0,0 +1,276 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; + +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition} object. + * + * + * @generated + */ +public class ArbiterTransitionItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArbiterTransitionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addSourcePropertyDescriptor(object); + addTargetPropertyDescriptor(object); + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Source feature. + * + * + * @generated + */ + protected void addSourcePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ArbiterTransition_source_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ArbiterTransition_source_feature", "_UI_ArbiterTransition_type"), + ScenarioPackage.Literals.ARBITER_TRANSITION__SOURCE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Target feature. + * + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ArbiterTransition_target_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ArbiterTransition_target_feature", "_UI_ArbiterTransition_type"), + ScenarioPackage.Literals.ARBITER_TRANSITION__TARGET, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ArbiterTransition_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ArbiterTransition_name_feature", "_UI_ArbiterTransition_type"), + ScenarioPackage.Literals.ARBITER_TRANSITION__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.ARBITER_TRANSITION__GUARD); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ArbiterTransition.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ArbiterTransition")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ArbiterTransition)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ArbiterTransition_type") : + getString("_UI_ArbiterTransition_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ArbiterTransition.class)) { + case ScenarioPackage.ARBITER_TRANSITION__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ScenarioPackage.ARBITER_TRANSITION__GUARD: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ARBITER_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementProviderItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementProviderItemProvider.java new file mode 100644 index 000000000..c7df989a6 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementProviderItemProvider.java @@ -0,0 +1,109 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ElementProvider} object. + * + * + * @generated + */ +public class ElementProviderItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ElementProviderItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ElementProvider_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementQueryItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementQueryItemProvider.java new file mode 100644 index 000000000..8bec61305 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementQueryItemProvider.java @@ -0,0 +1,147 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; + +import org.eclipse.gemoc.event.commons.model.scenario.ElementQuery; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ElementQuery} object. + * + * + * @generated + */ +public class ElementQueryItemProvider extends ElementProviderItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ElementQueryItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.ELEMENT_QUERY__QUERY); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ElementQuery_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ElementQuery.class)) { + case ScenarioPackage.ELEMENT_QUERY__QUERY: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ELEMENT_QUERY__QUERY, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ELEMENT_QUERY__QUERY, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ELEMENT_QUERY__QUERY, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.ELEMENT_QUERY__QUERY, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementReferenceItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementReferenceItemProvider.java new file mode 100644 index 000000000..20ce570dc --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ElementReferenceItemProvider.java @@ -0,0 +1,109 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ElementReference} object. + * + * + * @generated + */ +public class ElementReferenceItemProvider extends ElementProviderItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ElementReferenceItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addElementPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Element feature. + * + * + * @generated + */ + protected void addElementPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ElementReference_element_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ElementReference_element_feature", "_UI_ElementReference_type"), + ScenarioPackage.Literals.ELEMENT_REFERENCE__ELEMENT, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ElementReference_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/EventItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/EventItemProvider.java new file mode 100644 index 000000000..060792d29 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/EventItemProvider.java @@ -0,0 +1,120 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.Event} object. + * + * + * @generated + */ +public class EventItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public EventItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns Event.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Event")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_Event_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/EventOccurrenceItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/EventOccurrenceItemProvider.java new file mode 100644 index 000000000..c5a7f5612 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/EventOccurrenceItemProvider.java @@ -0,0 +1,154 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence} object. + * + * + * @generated + */ +public class EventOccurrenceItemProvider extends ScenarioElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public EventOccurrenceItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addTimePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Time feature. + * + * + * @generated + */ + protected void addTimePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EventOccurrence_time_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EventOccurrence_time_feature", "_UI_EventOccurrence_type"), + ScenarioPackage.Literals.EVENT_OCCURRENCE__TIME, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.EVENT_OCCURRENCE__EVENT); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + EventOccurrence eventOccurrence = (EventOccurrence)object; + return getString("_UI_EventOccurrence_type") + " " + eventOccurrence.getTime(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(EventOccurrence.class)) { + case ScenarioPackage.EVENT_OCCURRENCE__TIME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ScenarioPackage.EVENT_OCCURRENCE__EVENT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioEditPlugin.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioEditPlugin.java new file mode 100644 index 000000000..3a91be320 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioEditPlugin.java @@ -0,0 +1,95 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyEditPlugin; + +/** + * This is the central singleton for the Scenario edit plugin. + * + * + * @generated + */ +public final class ScenarioEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ScenarioEditPlugin INSTANCE = new ScenarioEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ScenarioEditPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + PropertyEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioElementItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioElementItemProvider.java new file mode 100644 index 000000000..fa79f9ead --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioElementItemProvider.java @@ -0,0 +1,235 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement} object. + * + * + * @generated + */ +public class ScenarioElementItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ScenarioElementItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addPreviousElementsPropertyDescriptor(object); + addNextElementsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Previous Elements feature. + * + * + * @generated + */ + protected void addPreviousElementsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioElement_previousElements_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioElement_previousElements_feature", "_UI_ScenarioElement_type"), + ScenarioPackage.Literals.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Next Elements feature. + * + * + * @generated + */ + protected void addNextElementsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioElement_nextElements_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioElement_nextElements_feature", "_UI_ScenarioElement_type"), + ScenarioPackage.Literals.SCENARIO_ELEMENT__NEXT_ELEMENTS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.SCENARIO_ELEMENT__GUARD); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ScenarioElement_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ScenarioElement.class)) { + case ScenarioPackage.SCENARIO_ELEMENT__GUARD: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_ELEMENT__GUARD, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_ELEMENT__GUARD, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_ELEMENT__GUARD, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_ELEMENT__GUARD, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_ELEMENT__GUARD, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_ELEMENT__GUARD, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_ELEMENT__GUARD, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMItemProvider.java new file mode 100644 index 000000000..73418f884 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMItemProvider.java @@ -0,0 +1,204 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM} object. + * + * + * @generated + */ +public class ScenarioFSMItemProvider extends ScenarioElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ScenarioFSMItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addInitialStatePropertyDescriptor(object); + addAcceptingStatesPropertyDescriptor(object); + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Initial State feature. + * + * + * @generated + */ + protected void addInitialStatePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSM_initialState_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSM_initialState_feature", "_UI_ScenarioFSM_type"), + ScenarioPackage.Literals.SCENARIO_FSM__INITIAL_STATE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Accepting States feature. + * + * + * @generated + */ + protected void addAcceptingStatesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSM_acceptingStates_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSM_acceptingStates_feature", "_UI_ScenarioFSM_type"), + ScenarioPackage.Literals.SCENARIO_FSM__ACCEPTING_STATES, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSM_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSM_name_feature", "_UI_ScenarioFSM_type"), + ScenarioPackage.Literals.SCENARIO_FSM__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.SCENARIO_FSM__STATES); + childrenFeatures.add(ScenarioPackage.Literals.SCENARIO_FSM__TRANSITIONS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ScenarioFSM)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ScenarioFSM_type") : + getString("_UI_ScenarioFSM_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ScenarioFSM.class)) { + case ScenarioPackage.SCENARIO_FSM__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ScenarioPackage.SCENARIO_FSM__STATES: + case ScenarioPackage.SCENARIO_FSM__TRANSITIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMStateItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMStateItemProvider.java new file mode 100644 index 000000000..503cc31d5 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMStateItemProvider.java @@ -0,0 +1,228 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState} object. + * + * + * @generated + */ +public class ScenarioFSMStateItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ScenarioFSMStateItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOutgoingTransitionsPropertyDescriptor(object); + addIncomingTransitionsPropertyDescriptor(object); + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Outgoing Transitions feature. + * + * + * @generated + */ + protected void addOutgoingTransitionsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSMState_outgoingTransitions_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSMState_outgoingTransitions_feature", "_UI_ScenarioFSMState_type"), + ScenarioPackage.Literals.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Incoming Transitions feature. + * + * + * @generated + */ + protected void addIncomingTransitionsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSMState_incomingTransitions_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSMState_incomingTransitions_feature", "_UI_ScenarioFSMState_type"), + ScenarioPackage.Literals.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSMState_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSMState_name_feature", "_UI_ScenarioFSMState_type"), + ScenarioPackage.Literals.SCENARIO_FSM_STATE__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.SCENARIO_FSM_STATE__EVENT); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ScenarioFSMState)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ScenarioFSMState_type") : + getString("_UI_ScenarioFSMState_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ScenarioFSMState.class)) { + case ScenarioPackage.SCENARIO_FSM_STATE__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ScenarioPackage.SCENARIO_FSM_STATE__EVENT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMTransitionItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMTransitionItemProvider.java new file mode 100644 index 000000000..85c9f463a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioFSMTransitionItemProvider.java @@ -0,0 +1,265 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition} object. + * + * + * @generated + */ +public class ScenarioFSMTransitionItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ScenarioFSMTransitionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addSourcePropertyDescriptor(object); + addTargetPropertyDescriptor(object); + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Source feature. + * + * + * @generated + */ + protected void addSourcePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSMTransition_source_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSMTransition_source_feature", "_UI_ScenarioFSMTransition_type"), + ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__SOURCE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Target feature. + * + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSMTransition_target_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSMTransition_target_feature", "_UI_ScenarioFSMTransition_type"), + ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__TARGET, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ScenarioFSMTransition_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ScenarioFSMTransition_name_feature", "_UI_ScenarioFSMTransition_type"), + ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__GUARD); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ScenarioFSMTransition)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ScenarioFSMTransition_type") : + getString("_UI_ScenarioFSMTransition_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ScenarioFSMTransition.class)) { + case ScenarioPackage.SCENARIO_FSM_TRANSITION__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createPropertyReference())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createCompositeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createEventPrecondition())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createContainerReferenceProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createManyBooleanAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createManyIntegerAttributeProperty())); + + newChildDescriptors.add + (createChildParameter + (ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION__GUARD, + PropertyFactory.eINSTANCE.createManyStringAttributeProperty())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioItemProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioItemProvider.java new file mode 100644 index 000000000..c392636a6 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioItemProvider.java @@ -0,0 +1,162 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.gemoc.event.commons.model.scenario.Scenario; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.Scenario} object. + * + * + * @generated + */ +public class ScenarioItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ScenarioItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ScenarioPackage.Literals.SCENARIO__ELEMENTS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Scenario.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Scenario")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_Scenario_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Scenario.class)) { + case ScenarioPackage.SCENARIO__ELEMENTS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ScenarioEditPlugin.INSTANCE; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioItemProviderAdapterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioItemProviderAdapterFactory.java new file mode 100644 index 000000000..fa20cb291 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.edit/src/org/eclipse/gemoc/event/commons/model/scenario/provider/ScenarioItemProviderAdapterFactory.java @@ -0,0 +1,223 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.gemoc.event.commons.model.scenario.util.ScenarioAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class ScenarioItemProviderAdapterFactory extends ScenarioAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public ScenarioItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState} instances. + * + * + * @generated + */ + protected ArbiterStateItemProvider arbiterStateItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState}. + * + * + * @generated + */ + @Override + public Adapter createArbiterStateAdapter() { + if (arbiterStateItemProvider == null) { + arbiterStateItemProvider = new ArbiterStateItemProvider(this); + } + + return arbiterStateItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition} instances. + * + * + * @generated + */ + protected ArbiterTransitionItemProvider arbiterTransitionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition}. + * + * + * @generated + */ + @Override + public Adapter createArbiterTransitionAdapter() { + if (arbiterTransitionItemProvider == null) { + arbiterTransitionItemProvider = new ArbiterTransitionItemProvider(this); + } + + return arbiterTransitionItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (arbiterStateItemProvider != null) arbiterStateItemProvider.dispose(); + if (arbiterTransitionItemProvider != null) arbiterTransitionItemProvider.dispose(); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/.classpath new file mode 100644 index 000000000..22f30643c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/.project new file mode 100644 index 000000000..929b71eec --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/.project @@ -0,0 +1,28 @@ + + + org.eclipse.gemoc.event.commons.model.editor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/META-INF/MANIFEST.MF new file mode 100644 index 000000000..1438630c7 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.event.commons.model.editor;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.gemoc.event.commons.model.report.presentation.ReportEditorPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.event.commons.model.property.presentation, + org.eclipse.gemoc.event.commons.model.scenario.presentation, + org.eclipse.gemoc.event.commons.model.arbiter.presentation, + org.eclipse.gemoc.event.commons.model.report.presentation +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources;visibility:=reexport, + org.eclipse.gemoc.event.commons.model.edit;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.emf.edit.ui;visibility:=reexport, + org.eclipse.ui.ide;visibility:=reexport, + org.eclipse.emf.ecore.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/build.properties new file mode 100644 index 000000000..5fb07711c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/PropertyModelFile.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/PropertyModelFile.gif new file mode 100644 index 000000000..dd4fa0a2b Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/PropertyModelFile.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/ReportModelFile.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/ReportModelFile.gif new file mode 100644 index 000000000..26ea9421d Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/ReportModelFile.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/ScenarioModelFile.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/ScenarioModelFile.gif new file mode 100644 index 000000000..366f9ff33 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/obj16/ScenarioModelFile.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewProperty.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewProperty.gif new file mode 100644 index 000000000..e52cb90c7 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewProperty.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewReport.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewReport.gif new file mode 100644 index 000000000..023a6d4bd Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewReport.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewScenario.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewScenario.gif new file mode 100644 index 000000000..e85f1da21 Binary files /dev/null and b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/icons/full/wizban/NewScenario.gif differ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/plugin.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/plugin.properties new file mode 100644 index 000000000..252488489 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/plugin.properties @@ -0,0 +1,71 @@ +# + +pluginName = Property Editor +providerName = www.example.org + +_UI_PropertyEditor_menu = &Property Editor + +_UI_CreateChild_menu_item = &New Child +_UI_CreateSibling_menu_item = N&ew Sibling + +_UI_ShowPropertiesView_menu_item = Show &Properties View +_UI_RefreshViewer_menu_item = &Refresh + +_UI_SelectionPage_label = Selection +_UI_ParentPage_label = Parent +_UI_ListPage_label = List +_UI_TreePage_label = Tree +_UI_TablePage_label = Table +_UI_TreeWithColumnsPage_label = Tree with Columns +_UI_ObjectColumn_label = Object +_UI_SelfColumn_label = Self + +_UI_NoObjectSelected = Selected Nothing +_UI_SingleObjectSelected = Selected Object: {0} +_UI_MultiObjectSelected = Selected {0} Objects + +_UI_OpenEditorError_label = Open Editor + +_UI_Wizard_category = Example EMF Model Creation Wizards + +_UI_CreateModelError_message = Problems encountered in file "{0}" + +_UI_PropertyModelWizard_label = Property Model +_UI_PropertyModelWizard_description = Create a new Property model + +_UI_PropertyEditor_label = Property Model Editor + +_UI_PropertyEditorFilenameDefaultBase = My +_UI_PropertyEditorFilenameExtensions = property + +_UI_Wizard_label = New + +_WARN_FilenameExtension = The file name must end in ''.{0}'' +_WARN_FilenameExtensions = The file name must have one of the following extensions: {0} + +_UI_ModelObject = &Model Object +_UI_XMLEncoding = &XML Encoding +_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1 +_UI_Wizard_initial_object_description = Select a model object to create + +_UI_FileConflict_label = File Conflict +_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes? + +_UI_ScenarioEditor_menu = &Scenario Editor +_UI_ScenarioModelWizard_label = Scenario Model +_UI_ScenarioModelWizard_description = Create a new Scenario model +_UI_ScenarioEditor_label = Scenario Model Editor +_UI_ScenarioEditorFilenameDefaultBase = My +_UI_ScenarioEditorFilenameExtensions = scenario +_UI_ArbiterEditor_menu = &Arbiter Editor +_UI_ArbiterModelWizard_label = Arbiter Model +_UI_ArbiterModelWizard_description = Create a new Arbiter model +_UI_ArbiterEditor_label = Arbiter Model Editor +_UI_ArbiterEditorFilenameDefaultBase = My +_UI_ArbiterEditorFilenameExtensions = arbiter +_UI_ReportEditor_menu = &Report Editor +_UI_ReportModelWizard_label = Report Model +_UI_ReportModelWizard_description = Create a new Report model +_UI_ReportEditor_label = Report Model Editor +_UI_ReportEditorFilenameDefaultBase = My +_UI_ReportEditorFilenameExtensions = report diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/plugin.xml new file mode 100644 index 000000000..48aa7d2c2 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/plugin.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + %_UI_PropertyModelWizard_description + + + + + + + + + + + + + + + %_UI_ScenarioModelWizard_description + + + + + + + + + + + + + + %_UI_ReportModelWizard_description + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/arbiter/presentation/ArbiterEditorPlugin.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/arbiter/presentation/ArbiterEditorPlugin.java new file mode 100644 index 000000000..4aa3550b8 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/arbiter/presentation/ArbiterEditorPlugin.java @@ -0,0 +1,100 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.presentation; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.ui.EclipseUIPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyEditPlugin; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioEditPlugin; + +/** + * This is the central singleton for the Arbiter editor plugin. + * + * + * @generated + */ +public final class ArbiterEditorPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ArbiterEditorPlugin INSTANCE = new ArbiterEditorPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ArbiterEditorPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + PropertyEditPlugin.INSTANCE, + ScenarioEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyActionBarContributor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyActionBarContributor.java new file mode 100644 index 000000000..5bc3ad742 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyActionBarContributor.java @@ -0,0 +1,423 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.presentation; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.ui.action.ControlAction; +import org.eclipse.emf.edit.ui.action.CreateChildAction; +import org.eclipse.emf.edit.ui.action.CreateSiblingAction; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.action.LoadResourceAction; +import org.eclipse.emf.edit.ui.action.ValidateAction; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.SubContributionItem; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; + +/** + * This is the action bar contributor for the Property model editor. + * + * + * @generated + */ +public class PropertyActionBarContributor + extends EditingDomainActionBarContributor + implements ISelectionChangedListener { + /** + * This keeps track of the active editor. + * + * + * @generated + */ + protected IEditorPart activeEditorPart; + + /** + * This keeps track of the current selection provider. + * + * + * @generated + */ + protected ISelectionProvider selectionProvider; + + /** + * This action opens the Properties view. + * + * + * @generated + */ + protected IAction showPropertiesViewAction = + new Action(PropertyEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } + catch (PartInitException exception) { + PropertyEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * + * + * @generated + */ + protected IAction refreshViewerAction = + new Action(PropertyEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createChildActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateChild actions. + * + * + * @generated + */ + protected IMenuManager createChildMenuManager; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createSiblingActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateSibling actions. + * + * + * @generated + */ + protected IMenuManager createSiblingMenuManager; + + /** + * This creates an instance of the contributor. + * + * + * @generated + */ + public PropertyActionBarContributor() { + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } + + /** + * This adds Separators for editor additions to the tool bar. + * + * + * @generated + */ + @Override + public void contributeToToolBar(IToolBarManager toolBarManager) { + toolBarManager.add(new Separator("property-settings")); + toolBarManager.add(new Separator("property-additions")); + } + + /** + * This adds to the menu bar a menu and some separators for editor additions, + * as well as the sub-menus for object creation items. + * + * + * @generated + */ + @Override + public void contributeToMenu(IMenuManager menuManager) { + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager(PropertyEditorPlugin.INSTANCE.getString("_UI_PropertyEditor_menu"), "org.eclipse.gemoc.event.commons.model.propertyMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(PropertyEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(PropertyEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener + (new IMenuListener() { + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } + + /** + * When the active editor changes, this remembers the change and registers with it as a selection provider. + * + * + * @generated + */ + @Override + public void setActiveEditor(IEditorPart part) { + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } + else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, + * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings + * that can be added to the selected object and updating the menus accordingly. + * + * + * @generated + */ + public void selectionChanged(SelectionChangedEvent event) { + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection newChildDescriptors = null; + Collection newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { + Object object = ((IStructuredSelection)selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This populates the specified manager with {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection, + * by inserting them before the specified contribution item contributionID. + * If contributionID is null, they are simply added. + * + * + * @generated + */ + protected void populateManager(IContributionManager manager, Collection actions, String contributionID) { + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } + else { + manager.add(action); + } + } + } + } + + /** + * This removes from the specified manager all {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection. + * + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Collection actions) { + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem)contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This populates the pop-up menu before it appears. + * + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; + + submenuManager = new MenuManager(PropertyEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); + + submenuManager = new MenuManager(PropertyEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } + + /** + * This inserts global actions before the "additions-end" separator. + * + * + * @generated + */ + @Override + protected void addGlobalActions(IMenuManager menuManager) { + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); + + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); + + super.addGlobalActions(menuManager); + } + + /** + * This ensures that a delete action will clean up all references to deleted objects. + * + * + * @generated + */ + @Override + protected boolean removeAllReferencesOnDelete() { + return true; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyEditor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyEditor.java new file mode 100644 index 000000000..07d2c5461 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyEditor.java @@ -0,0 +1,1825 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.presentation; + + +import java.io.IOException; +import java.io.InputStream; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; + +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; + +import org.eclipse.jface.util.LocalSelectionTransfer; + +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TableLayout; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.custom.CTabFolder; + +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; +import org.eclipse.swt.dnd.Transfer; + +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; + +import org.eclipse.swt.graphics.Point; + +import org.eclipse.swt.layout.FillLayout; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; + +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PartInitException; + +import org.eclipse.ui.dialogs.SaveAsDialog; + +import org.eclipse.ui.ide.IGotoMarker; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiPageEditorPart; + +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; + +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheet; +import org.eclipse.ui.views.properties.PropertySheetPage; + +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.ui.MarkerHelper; +import org.eclipse.emf.common.ui.ViewerPane; + +import org.eclipse.emf.common.ui.editor.ProblemEditorPart; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; + + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; + +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; + +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; + +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; + +import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; + +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; + +import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper; +import org.eclipse.emf.edit.ui.util.EditUIUtil; + +import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyItemProviderAdapterFactory; + +import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioItemProviderAdapterFactory; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + + +/** + * This is an example of a Property model editor. + * + * + * @generated + */ +public class PropertyEditor + extends MultiPageEditorPart + implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { + /** + * This keeps track of the editing domain that is used to track all changes to the model. + * + * + * @generated + */ + protected AdapterFactoryEditingDomain editingDomain; + + /** + * This is the one adapter factory used for providing views of the model. + * + * + * @generated + */ + protected ComposedAdapterFactory adapterFactory; + + /** + * This is the content outline page. + * + * + * @generated + */ + protected IContentOutlinePage contentOutlinePage; + + /** + * This is a kludge... + * + * + * @generated + */ + protected IStatusLineManager contentOutlineStatusLineManager; + + /** + * This is the content outline page's viewer. + * + * + * @generated + */ + protected TreeViewer contentOutlineViewer; + + /** + * This is the property sheet page. + * + * + * @generated + */ + protected List propertySheetPages = new ArrayList(); + + /** + * This is the viewer that shadows the selection in the content outline. + * The parent relation must be correctly defined for this to work. + * + * + * @generated + */ + protected TreeViewer selectionViewer; + + /** + * This inverts the roll of parent and child in the content provider and show parents as a tree. + * + * + * @generated + */ + protected TreeViewer parentViewer; + + /** + * This shows how a tree view works. + * + * + * @generated + */ + protected TreeViewer treeViewer; + + /** + * This shows how a list view works. + * A list viewer doesn't support icons. + * + * + * @generated + */ + protected ListViewer listViewer; + + /** + * This shows how a table view works. + * A table can be used as a list with icons. + * + * + * @generated + */ + protected TableViewer tableViewer; + + /** + * This shows how a tree view with columns works. + * + * + * @generated + */ + protected TreeViewer treeViewerWithColumns; + + /** + * This keeps track of the active viewer pane, in the book. + * + * + * @generated + */ + protected ViewerPane currentViewerPane; + + /** + * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. + * + * + * @generated + */ + protected Viewer currentViewer; + + /** + * This listens to which ever viewer is active. + * + * + * @generated + */ + protected ISelectionChangedListener selectionChangedListener; + + /** + * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. + * + * + * @generated + */ + protected Collection selectionChangedListeners = new ArrayList(); + + /** + * This keeps track of the selection of the editor as a whole. + * + * + * @generated + */ + protected ISelection editorSelection = StructuredSelection.EMPTY; + + /** + * The MarkerHelper is responsible for creating workspace resource markers presented + * in Eclipse's Problems View. + * + * + * @generated + */ + protected MarkerHelper markerHelper = new EditUIMarkerHelper(); + + /** + * This listens for when the outline becomes active + * + * + * @generated + */ + protected IPartListener partListener = + new IPartListener() { + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(PropertyEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(PropertyEditor.this); + handleActivate(); + } + } + else if (p == PropertyEditor.this) { + handleActivate(); + } + } + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * + * + * @generated + */ + protected Collection removedResources = new ArrayList(); + + /** + * Resources that have been changed since last activation. + * + * + * @generated + */ + protected Collection changedResources = new ArrayList(); + + /** + * Resources that have been saved. + * + * + * @generated + */ + protected Collection savedResources = new ArrayList(); + + /** + * Map to store the diagnostic associated with a resource. + * + * + * @generated + */ + protected Map resourceToDiagnosticMap = new LinkedHashMap(); + + /** + * Controls whether the problem indication should be updated. + * + * + * @generated + */ + protected boolean updateProblemIndication = true; + + /** + * Adapter used to update the problem indication when resources are demanded loaded. + * + * + * @generated + */ + protected EContentAdapter problemIndicationAdapter = + new EContentAdapter() { + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource)notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } + else { + resourceToDiagnosticMap.remove(resource); + } + + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } + else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. + * + * + * @generated + */ + protected IResourceChangeListener resourceChangeListener = + new IResourceChangeListener() { + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + protected Collection changedResources = new ArrayList(); + protected Collection removedResources = new ArrayList(); + + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || + delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } + else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection getChangedResources() { + return changedResources; + } + + public Collection getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(PropertyEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == PropertyEditor.this) { + handleActivate(); + } + } + }); + } + } + catch (CoreException exception) { + PropertyEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * + * + * @generated + */ + protected void handleActivate() { + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(PropertyEditor.this, false); + } + else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } + else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * + * + * @generated + */ + protected void handleChangedResources() { + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if (isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } + catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } + + /** + * Updates the problems indication with the information described in the specified diagnostic. + * + * + * @generated + */ + protected void updateProblemIndication() { + if (updateProblemIndication) { + BasicDiagnostic diagnostic = + new BasicDiagnostic + (Diagnostic.OK, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + null, + new Object [] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } + else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } + catch (PartInitException exception) { + PropertyEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if (diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } + catch (CoreException exception) { + PropertyEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * + * + * @generated + */ + protected boolean handleDirtyConflict() { + return + MessageDialog.openQuestion + (getSite().getShell(), + getString("_UI_FileConflict_label"), + getString("_WARN_FileConflict")); + } + + /** + * This creates a model editor. + * + * + * @generated + */ + public PropertyEditor() { + super(); + initializeEditingDomain(); + } + + /** + * This sets up the editing domain for the model editor. + * + * + * @generated + */ + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new PropertyItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ScenarioItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener + (new CommandStackListener() { + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec + (new Runnable() { + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator i = propertySheetPages.iterator(); i.hasNext(); ) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } + else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap()); + } + + /** + * This is here for the listener to be able to call it. + * + * + * @generated + */ + @Override + protected void firePropertyChange(int action) { + super.firePropertyChange(action); + } + + /** + * This sets the selection into whichever viewer is active. + * + * + * @generated + */ + public void setSelectionToViewer(Collection collection) { + final Collection theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = + new Runnable() { + public void run() { + // Try to select the items in the current content viewer of the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. + * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * + * + * @generated + */ + public EditingDomain getEditingDomain() { + return editingDomain; + } + + /** + * + * + * @generated + */ + public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { + /** + * + * + * @generated + */ + public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getElements(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getChildren(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public boolean hasChildren(Object object) { + Object parent = super.getParent(object); + return parent != null; + } + + /** + * + * + * @generated + */ + @Override + public Object getParent(Object object) { + return null; + } + } + + /** + * + * + * @generated + */ + public void setCurrentViewerPane(ViewerPane viewerPane) { + if (currentViewerPane != viewerPane) { + if (currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, + * is the current one. + * + * + * @generated + */ + public void setCurrentViewer(Viewer viewer) { + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = + new ISelectionChangedListener() { + // This just notifies those things that are affected by the section. + // + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} interface. + * + * + * @generated + */ + public Viewer getViewer() { + return currentViewer; + } + + /** + * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. + * + * + * @generated + */ + protected void createContextMenuFor(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu= contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's resource set based on the editor's input. + * + * + * @generated + */ + public void createModel() { + URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } + catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the resource + * and the specified exception (if any). + * + * + * @generated + */ + public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { + boolean hasErrors = !resource.getErrors().isEmpty(); + if (hasErrors || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = + new BasicDiagnostic + (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object [] { exception == null ? (Object)resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } + else if (exception != null) { + return + new BasicDiagnostic + (Diagnostic.ERROR, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception }); + } + else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * + * + * @generated + */ + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PropertyEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + selectionViewer = (TreeViewer)viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); + } + + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PropertyEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + parentViewer = (TreeViewer)viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ParentPage_label")); + } + + // This is the page for the list viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PropertyEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer)viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ListPage_label")); + } + + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PropertyEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer)viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreePage_label")); + } + + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PropertyEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer)viewerPane.getViewer(); + + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + + tableViewer.setColumnProperties(new String [] {"a", "b"}); + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TablePage_label")); + } + + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PropertyEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); + + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + objectColumn.setWidth(250); + + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + selfColumn.setWidth(200); + + treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); + } + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + setActivePage(0); + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener + (new ControlAdapter() { + boolean guard = false; + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, + * this hides the single tab at the bottom. + * + * + * @generated + */ + protected void hideTabs() { + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, + * this shows the tabs at the bottom. + * + * + * @generated + */ + protected void showTabs() { + if (getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. + * + * + * @generated + */ + @Override + protected void pageChange(int pageIndex) { + super.pageChange(pageIndex); + + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } + + /** + * This is how the framework determines which interfaces we implement. + * + * + * @generated + */ + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class key) { + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } + else if (key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } + else if (key.equals(IGotoMarker.class)) { + return this; + } + else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * + * + * @generated + */ + public IContentOutlinePage getContentOutlinePage() { + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener + (new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * + * + * @generated + */ + public IPropertySheetPage getPropertySheetPage() { + PropertySheetPage propertySheetPage = + new ExtendedPropertySheetPage(editingDomain) { + @Override + public void setSelectionToViewer(List selection) { + PropertyEditor.this.setSelectionToViewer(selection); + PropertyEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other views. + * + * + * @generated + */ + public void handleContentOutlineSelection(ISelection selection) { + if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator selectedElements = ((IStructuredSelection)selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + // If it's the selection viewer, then we want it to select the same selection as this selection. + // + if (currentViewerPane.getViewer() == selectionViewer) { + ArrayList selectionList = new ArrayList(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } + else { + // Set the input to the widget. + // + if (currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command stack. + * + * + * @generated + */ + @Override + public boolean isDirty() { + return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); + } + + /** + * This is for implementing {@link IEditorPart} and simply saves the model file. + * + * + * @generated + */ + @Override + public void doSave(IProgressMonitor progressMonitor) { + // Save only resources that have actually changed. + // + final Map saveOptions = new HashMap(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running activity that modifies the workbench. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } + catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } + catch (Exception exception) { + // Something went wrong that shouldn't. + // + PropertyEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the specified resource. + * The implementation uses the URI converter from the editor's resource set to try to open an input stream. + * + * + * @generated + */ + protected boolean isPersisted(Resource resource) { + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } + catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * + * + * @generated + */ + @Override + public boolean isSaveAsAllowed() { + return true; + } + + /** + * This also changes the editor's input. + * + * + * @generated + */ + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * + * + * @generated + */ + protected void doSaveAs(URI uri, IEditorInput editorInput) { + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = + getActionBars().getStatusLineManager() != null ? + getActionBars().getStatusLineManager().getProgressMonitor() : + new NullProgressMonitor(); + doSave(progressMonitor); + } + + /** + * + * + * @generated + */ + public void gotoMarker(IMarker marker) { + List targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } + + /** + * This is called during startup. + * + * + * @generated + */ + @Override + public void init(IEditorSite site, IEditorInput editorInput) { + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } + + /** + * + * + * @generated + */ + @Override + public void setFocus() { + if (currentViewerPane != null) { + currentViewerPane.setFocus(); + } + else { + getControl(getActivePage()).setFocus(); + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void addSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.add(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.remove(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. + * + * + * @generated + */ + public ISelection getSelection() { + return editorSelection; + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. + * Calling this result will notify the listeners. + * + * + * @generated + */ + public void setSelection(ISelection selection) { + editorSelection = selection; + + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } + + /** + * + * + * @generated + */ + public void setStatusLineManager(ISelection selection) { + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? + contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection collection = ((IStructuredSelection)selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } + else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * + * + * @generated + */ + private static String getString(String key) { + return PropertyEditorPlugin.INSTANCE.getString(key); + } + + /** + * This looks up a string in plugin.properties, making a substitution. + * + * + * @generated + */ + private static String getString(String key, Object s1) { + return PropertyEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); + } + + /** + * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. + * + * + * @generated + */ + public void menuAboutToShow(IMenuManager menuManager) { + ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } + + /** + * + * + * @generated + */ + public EditingDomainActionBarContributor getActionBarContributor() { + return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); + } + + /** + * + * + * @generated + */ + public IActionBars getActionBars() { + return getActionBarContributor().getActionBars(); + } + + /** + * + * + * @generated + */ + public AdapterFactory getAdapterFactory() { + return adapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public void dispose() { + updateProblemIndication = false; + + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + + getSite().getPage().removePartListener(partListener); + + adapterFactory.dispose(); + + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } + + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } + + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } + + super.dispose(); + } + + /** + * Returns whether the outline view should be presented to the user. + * + * + * @generated + */ + protected boolean showOutlineView() { + return true; + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyEditorPlugin.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyEditorPlugin.java new file mode 100644 index 000000000..0906117f0 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyEditorPlugin.java @@ -0,0 +1,97 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.presentation; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.ui.EclipseUIPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioEditPlugin; + +/** + * This is the central singleton for the Property editor plugin. + * + * + * @generated + */ +public final class PropertyEditorPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final PropertyEditorPlugin INSTANCE = new PropertyEditorPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public PropertyEditorPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + ScenarioEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyModelWizard.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyModelWizard.java new file mode 100644 index 000000000..787a5a3e4 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/property/presentation/PropertyModelWizard.java @@ -0,0 +1,628 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.presentation; + + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.StringTokenizer; + +import org.eclipse.emf.common.CommonPlugin; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.IProgressMonitor; + +import org.eclipse.jface.dialogs.MessageDialog; + +import org.eclipse.jface.viewers.IStructuredSelection; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.ModifyEvent; + +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; + +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import org.eclipse.ui.dialogs.WizardNewFileCreationPage; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.ISetSelectionTarget; + +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyEditPlugin; + + +import org.eclipse.core.runtime.Path; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; + +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; + + +/** + * This is a simple wizard for creating a new model file. + * + * + * @generated + */ +public class PropertyModelWizard extends Wizard implements INewWizard { + /** + * The supported extensions for created files. + * + * + * @generated + */ + public static final List FILE_EXTENSIONS = + Collections.unmodifiableList(Arrays.asList(PropertyEditorPlugin.INSTANCE.getString("_UI_PropertyEditorFilenameExtensions").split("\\s*,\\s*"))); + + /** + * A formatted list of supported file extensions, suitable for display. + * + * + * @generated + */ + public static final String FORMATTED_FILE_EXTENSIONS = + PropertyEditorPlugin.INSTANCE.getString("_UI_PropertyEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); + + /** + * This caches an instance of the model package. + * + * + * @generated + */ + protected PropertyPackage propertyPackage = PropertyPackage.eINSTANCE; + + /** + * This caches an instance of the model factory. + * + * + * @generated + */ + protected PropertyFactory propertyFactory = propertyPackage.getPropertyFactory(); + + /** + * This is the file creation page. + * + * + * @generated + */ + protected PropertyModelWizardNewFileCreationPage newFileCreationPage; + + /** + * This is the initial object creation page. + * + * + * @generated + */ + protected PropertyModelWizardInitialObjectCreationPage initialObjectCreationPage; + + /** + * Remember the selection during initialization for populating the default container. + * + * + * @generated + */ + protected IStructuredSelection selection; + + /** + * Remember the workbench during initialization. + * + * + * @generated + */ + protected IWorkbench workbench; + + /** + * Caches the names of the types that can be created as the root object. + * + * + * @generated + */ + protected List initialObjectNames; + + /** + * This just records the information. + * + * + * @generated + */ + public void init(IWorkbench workbench, IStructuredSelection selection) { + this.workbench = workbench; + this.selection = selection; + setWindowTitle(PropertyEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(PropertyEditorPlugin.INSTANCE.getImage("full/wizban/NewProperty"))); + } + + /** + * Returns the names of the types that can be created as the root object. + * + * + * @generated + */ + protected Collection getInitialObjectNames() { + if (initialObjectNames == null) { + initialObjectNames = new ArrayList(); + for (EClassifier eClassifier : propertyPackage.getEClassifiers()) { + if (eClassifier instanceof EClass) { + EClass eClass = (EClass)eClassifier; + if (!eClass.isAbstract()) { + initialObjectNames.add(eClass.getName()); + } + } + } + Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); + } + return initialObjectNames; + } + + /** + * Create a new model. + * + * + * @generated + */ + protected EObject createInitialModel() { + EClass eClass = (EClass)propertyPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = propertyFactory.create(eClass); + return rootObject; + } + + /** + * Do the work after everything is specified. + * + * + * @generated + */ + @Override + public boolean performFinish() { + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + + // Do the work within an operation. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if (rootObject != null) { + resource.getContents().add(rootObject); + } + + // Save the contents of the resource to the file system. + // + Map options = new HashMap(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } + catch (Exception exception) { + PropertyEditorPlugin.INSTANCE.log(exception); + } + finally { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if (activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + ((ISetSelectionTarget)activePart).selectReveal(targetSelection); + } + }); + } + + // Open an editor on the new file. + // + try { + page.openEditor + (new FileEditorInput(modelFile), + workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } + catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), PropertyEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + return false; + } + + return true; + } + catch (Exception exception) { + PropertyEditorPlugin.INSTANCE.log(exception); + return false; + } + } + + /** + * This is the one page of the wizard. + * + * + * @generated + */ + public class PropertyModelWizardNewFileCreationPage extends WizardNewFileCreationPage { + /** + * Pass in the selection. + * + * + * @generated + */ + public PropertyModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { + super(pageId, selection); + } + + /** + * The framework calls this to see if the file is correct. + * + * + * @generated + */ + @Override + protected boolean validatePage() { + if (super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if (extension == null || !FILE_EXTENSIONS.contains(extension)) { + String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; + setErrorMessage(PropertyEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } + + /** + * + * + * @generated + */ + public IFile getModelFile() { + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } + } + + /** + * This is the page where the type of object to create is selected. + * + * + * @generated + */ + public class PropertyModelWizardInitialObjectCreationPage extends WizardPage { + /** + * + * + * @generated + */ + protected Combo initialObjectField; + + /** + * @generated + * + * + */ + protected List encodings; + + /** + * + * + * @generated + */ + protected Combo encodingField; + + /** + * Pass in the selection. + * + * + * @generated + */ + public PropertyModelWizardInitialObjectCreationPage(String pageId) { + super(pageId); + } + + /** + * + * + * @generated + */ + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(PropertyEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + + for (String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + + if (initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(PropertyEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + + for (String encoding : getEncodings()) { + encodingField.add(encoding); + } + + encodingField.select(0); + encodingField.addModifyListener(validator); + + setPageComplete(validatePage()); + setControl(composite); + } + + /** + * + * + * @generated + */ + protected ModifyListener validator = + new ModifyListener() { + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; + + /** + * + * + * @generated + */ + protected boolean validatePage() { + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } + + /** + * + * + * @generated + */ + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + if (initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } + else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } + + /** + * + * + * @generated + */ + public String getInitialObjectName() { + String label = initialObjectField.getText(); + + for (String name : getInitialObjectNames()) { + if (getLabel(name).equals(label)) { + return name; + } + } + return null; + } + + /** + * + * + * @generated + */ + public String getEncoding() { + return encodingField.getText(); + } + + /** + * Returns the label for the specified type name. + * + * + * @generated + */ + protected String getLabel(String typeName) { + try { + return PropertyEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + } + catch(MissingResourceException mre) { + PropertyEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } + + /** + * + * + * @generated + */ + protected Collection getEncodings() { + if (encodings == null) { + encodings = new ArrayList(); + for (StringTokenizer stringTokenizer = new StringTokenizer(PropertyEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } + } + + /** + * The framework calls this to create the contents of the wizard. + * + * + * @generated + */ + @Override + public void addPages() { + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new PropertyModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(PropertyEditorPlugin.INSTANCE.getString("_UI_PropertyModelWizard_label")); + newFileCreationPage.setDescription(PropertyEditorPlugin.INSTANCE.getString("_UI_PropertyModelWizard_description")); + newFileCreationPage.setFileName(PropertyEditorPlugin.INSTANCE.getString("_UI_PropertyEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); + addPage(newFileCreationPage); + + // Try and get the resource selection to determine a current directory for the file dialog. + // + if (selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if (selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource)selectedElement; + if (selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + + // This gives us a directory... + // + if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + + // Make up a unique new name here. + // + String defaultModelBaseFilename = PropertyEditorPlugin.INSTANCE.getString("_UI_PropertyEditorFilenameDefaultBase"); + String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; + for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new PropertyModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(PropertyEditorPlugin.INSTANCE.getString("_UI_PropertyModelWizard_label")); + initialObjectCreationPage.setDescription(PropertyEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } + + /** + * Get the file from the page. + * + * + * @generated + */ + public IFile getModelFile() { + return newFileCreationPage.getModelFile(); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportActionBarContributor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportActionBarContributor.java new file mode 100644 index 000000000..81f03cc8b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportActionBarContributor.java @@ -0,0 +1,423 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.presentation; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.ui.action.ControlAction; +import org.eclipse.emf.edit.ui.action.CreateChildAction; +import org.eclipse.emf.edit.ui.action.CreateSiblingAction; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.action.LoadResourceAction; +import org.eclipse.emf.edit.ui.action.ValidateAction; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.SubContributionItem; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; + +/** + * This is the action bar contributor for the Report model editor. + * + * + * @generated + */ +public class ReportActionBarContributor + extends EditingDomainActionBarContributor + implements ISelectionChangedListener { + /** + * This keeps track of the active editor. + * + * + * @generated + */ + protected IEditorPart activeEditorPart; + + /** + * This keeps track of the current selection provider. + * + * + * @generated + */ + protected ISelectionProvider selectionProvider; + + /** + * This action opens the Properties view. + * + * + * @generated + */ + protected IAction showPropertiesViewAction = + new Action(ReportEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } + catch (PartInitException exception) { + ReportEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * + * + * @generated + */ + protected IAction refreshViewerAction = + new Action(ReportEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createChildActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateChild actions. + * + * + * @generated + */ + protected IMenuManager createChildMenuManager; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createSiblingActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateSibling actions. + * + * + * @generated + */ + protected IMenuManager createSiblingMenuManager; + + /** + * This creates an instance of the contributor. + * + * + * @generated + */ + public ReportActionBarContributor() { + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } + + /** + * This adds Separators for editor additions to the tool bar. + * + * + * @generated + */ + @Override + public void contributeToToolBar(IToolBarManager toolBarManager) { + toolBarManager.add(new Separator("report-settings")); + toolBarManager.add(new Separator("report-additions")); + } + + /** + * This adds to the menu bar a menu and some separators for editor additions, + * as well as the sub-menus for object creation items. + * + * + * @generated + */ + @Override + public void contributeToMenu(IMenuManager menuManager) { + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager(ReportEditorPlugin.INSTANCE.getString("_UI_ReportEditor_menu"), "org.eclipse.gemoc.event.commons.model.reportMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(ReportEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(ReportEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener + (new IMenuListener() { + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } + + /** + * When the active editor changes, this remembers the change and registers with it as a selection provider. + * + * + * @generated + */ + @Override + public void setActiveEditor(IEditorPart part) { + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } + else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, + * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings + * that can be added to the selected object and updating the menus accordingly. + * + * + * @generated + */ + public void selectionChanged(SelectionChangedEvent event) { + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection newChildDescriptors = null; + Collection newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { + Object object = ((IStructuredSelection)selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This populates the specified manager with {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection, + * by inserting them before the specified contribution item contributionID. + * If contributionID is null, they are simply added. + * + * + * @generated + */ + protected void populateManager(IContributionManager manager, Collection actions, String contributionID) { + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } + else { + manager.add(action); + } + } + } + } + + /** + * This removes from the specified manager all {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection. + * + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Collection actions) { + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem)contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This populates the pop-up menu before it appears. + * + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; + + submenuManager = new MenuManager(ReportEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); + + submenuManager = new MenuManager(ReportEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } + + /** + * This inserts global actions before the "additions-end" separator. + * + * + * @generated + */ + @Override + protected void addGlobalActions(IMenuManager menuManager) { + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); + + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); + + super.addGlobalActions(menuManager); + } + + /** + * This ensures that a delete action will clean up all references to deleted objects. + * + * + * @generated + */ + @Override + protected boolean removeAllReferencesOnDelete() { + return true; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportEditor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportEditor.java new file mode 100644 index 000000000..2b85f8ba8 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportEditor.java @@ -0,0 +1,1828 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.presentation; + + +import java.io.IOException; +import java.io.InputStream; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; + +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; + +import org.eclipse.jface.util.LocalSelectionTransfer; + +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TableLayout; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.custom.CTabFolder; + +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; +import org.eclipse.swt.dnd.Transfer; + +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; + +import org.eclipse.swt.graphics.Point; + +import org.eclipse.swt.layout.FillLayout; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; + +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PartInitException; + +import org.eclipse.ui.dialogs.SaveAsDialog; + +import org.eclipse.ui.ide.IGotoMarker; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiPageEditorPart; + +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; + +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheet; +import org.eclipse.ui.views.properties.PropertySheetPage; + +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.ui.MarkerHelper; +import org.eclipse.emf.common.ui.ViewerPane; + +import org.eclipse.emf.common.ui.editor.ProblemEditorPart; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; + + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; + +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; + +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; + +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; + +import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; + +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; + +import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper; +import org.eclipse.emf.edit.ui.util.EditUIUtil; + +import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; + +import org.eclipse.gemoc.event.commons.model.report.provider.ReportItemProviderAdapterFactory; + +import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyItemProviderAdapterFactory; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioItemProviderAdapterFactory; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + + +/** + * This is an example of a Report model editor. + * + * + * @generated + */ +public class ReportEditor + extends MultiPageEditorPart + implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { + /** + * This keeps track of the editing domain that is used to track all changes to the model. + * + * + * @generated + */ + protected AdapterFactoryEditingDomain editingDomain; + + /** + * This is the one adapter factory used for providing views of the model. + * + * + * @generated + */ + protected ComposedAdapterFactory adapterFactory; + + /** + * This is the content outline page. + * + * + * @generated + */ + protected IContentOutlinePage contentOutlinePage; + + /** + * This is a kludge... + * + * + * @generated + */ + protected IStatusLineManager contentOutlineStatusLineManager; + + /** + * This is the content outline page's viewer. + * + * + * @generated + */ + protected TreeViewer contentOutlineViewer; + + /** + * This is the property sheet page. + * + * + * @generated + */ + protected List propertySheetPages = new ArrayList(); + + /** + * This is the viewer that shadows the selection in the content outline. + * The parent relation must be correctly defined for this to work. + * + * + * @generated + */ + protected TreeViewer selectionViewer; + + /** + * This inverts the roll of parent and child in the content provider and show parents as a tree. + * + * + * @generated + */ + protected TreeViewer parentViewer; + + /** + * This shows how a tree view works. + * + * + * @generated + */ + protected TreeViewer treeViewer; + + /** + * This shows how a list view works. + * A list viewer doesn't support icons. + * + * + * @generated + */ + protected ListViewer listViewer; + + /** + * This shows how a table view works. + * A table can be used as a list with icons. + * + * + * @generated + */ + protected TableViewer tableViewer; + + /** + * This shows how a tree view with columns works. + * + * + * @generated + */ + protected TreeViewer treeViewerWithColumns; + + /** + * This keeps track of the active viewer pane, in the book. + * + * + * @generated + */ + protected ViewerPane currentViewerPane; + + /** + * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. + * + * + * @generated + */ + protected Viewer currentViewer; + + /** + * This listens to which ever viewer is active. + * + * + * @generated + */ + protected ISelectionChangedListener selectionChangedListener; + + /** + * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. + * + * + * @generated + */ + protected Collection selectionChangedListeners = new ArrayList(); + + /** + * This keeps track of the selection of the editor as a whole. + * + * + * @generated + */ + protected ISelection editorSelection = StructuredSelection.EMPTY; + + /** + * The MarkerHelper is responsible for creating workspace resource markers presented + * in Eclipse's Problems View. + * + * + * @generated + */ + protected MarkerHelper markerHelper = new EditUIMarkerHelper(); + + /** + * This listens for when the outline becomes active + * + * + * @generated + */ + protected IPartListener partListener = + new IPartListener() { + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(ReportEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ReportEditor.this); + handleActivate(); + } + } + else if (p == ReportEditor.this) { + handleActivate(); + } + } + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * + * + * @generated + */ + protected Collection removedResources = new ArrayList(); + + /** + * Resources that have been changed since last activation. + * + * + * @generated + */ + protected Collection changedResources = new ArrayList(); + + /** + * Resources that have been saved. + * + * + * @generated + */ + protected Collection savedResources = new ArrayList(); + + /** + * Map to store the diagnostic associated with a resource. + * + * + * @generated + */ + protected Map resourceToDiagnosticMap = new LinkedHashMap(); + + /** + * Controls whether the problem indication should be updated. + * + * + * @generated + */ + protected boolean updateProblemIndication = true; + + /** + * Adapter used to update the problem indication when resources are demanded loaded. + * + * + * @generated + */ + protected EContentAdapter problemIndicationAdapter = + new EContentAdapter() { + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource)notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } + else { + resourceToDiagnosticMap.remove(resource); + } + + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } + else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. + * + * + * @generated + */ + protected IResourceChangeListener resourceChangeListener = + new IResourceChangeListener() { + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + protected Collection changedResources = new ArrayList(); + protected Collection removedResources = new ArrayList(); + + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || + delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } + else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection getChangedResources() { + return changedResources; + } + + public Collection getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(ReportEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == ReportEditor.this) { + handleActivate(); + } + } + }); + } + } + catch (CoreException exception) { + ReportEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * + * + * @generated + */ + protected void handleActivate() { + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(ReportEditor.this, false); + } + else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } + else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * + * + * @generated + */ + protected void handleChangedResources() { + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if (isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } + catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } + + /** + * Updates the problems indication with the information described in the specified diagnostic. + * + * + * @generated + */ + protected void updateProblemIndication() { + if (updateProblemIndication) { + BasicDiagnostic diagnostic = + new BasicDiagnostic + (Diagnostic.OK, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + null, + new Object [] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } + else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } + catch (PartInitException exception) { + ReportEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if (diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } + catch (CoreException exception) { + ReportEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * + * + * @generated + */ + protected boolean handleDirtyConflict() { + return + MessageDialog.openQuestion + (getSite().getShell(), + getString("_UI_FileConflict_label"), + getString("_WARN_FileConflict")); + } + + /** + * This creates a model editor. + * + * + * @generated + */ + public ReportEditor() { + super(); + initializeEditingDomain(); + } + + /** + * This sets up the editing domain for the model editor. + * + * + * @generated + */ + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReportItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new PropertyItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ScenarioItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener + (new CommandStackListener() { + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec + (new Runnable() { + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator i = propertySheetPages.iterator(); i.hasNext(); ) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } + else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap()); + } + + /** + * This is here for the listener to be able to call it. + * + * + * @generated + */ + @Override + protected void firePropertyChange(int action) { + super.firePropertyChange(action); + } + + /** + * This sets the selection into whichever viewer is active. + * + * + * @generated + */ + public void setSelectionToViewer(Collection collection) { + final Collection theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = + new Runnable() { + public void run() { + // Try to select the items in the current content viewer of the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. + * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * + * + * @generated + */ + public EditingDomain getEditingDomain() { + return editingDomain; + } + + /** + * + * + * @generated + */ + public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { + /** + * + * + * @generated + */ + public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getElements(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getChildren(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public boolean hasChildren(Object object) { + Object parent = super.getParent(object); + return parent != null; + } + + /** + * + * + * @generated + */ + @Override + public Object getParent(Object object) { + return null; + } + } + + /** + * + * + * @generated + */ + public void setCurrentViewerPane(ViewerPane viewerPane) { + if (currentViewerPane != viewerPane) { + if (currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, + * is the current one. + * + * + * @generated + */ + public void setCurrentViewer(Viewer viewer) { + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = + new ISelectionChangedListener() { + // This just notifies those things that are affected by the section. + // + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} interface. + * + * + * @generated + */ + public Viewer getViewer() { + return currentViewer; + } + + /** + * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. + * + * + * @generated + */ + protected void createContextMenuFor(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu= contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's resource set based on the editor's input. + * + * + * @generated + */ + public void createModel() { + URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } + catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the resource + * and the specified exception (if any). + * + * + * @generated + */ + public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { + boolean hasErrors = !resource.getErrors().isEmpty(); + if (hasErrors || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = + new BasicDiagnostic + (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object [] { exception == null ? (Object)resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } + else if (exception != null) { + return + new BasicDiagnostic + (Diagnostic.ERROR, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception }); + } + else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * + * + * @generated + */ + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ReportEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + selectionViewer = (TreeViewer)viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); + } + + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ReportEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + parentViewer = (TreeViewer)viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ParentPage_label")); + } + + // This is the page for the list viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ReportEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer)viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ListPage_label")); + } + + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ReportEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer)viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreePage_label")); + } + + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ReportEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer)viewerPane.getViewer(); + + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + + tableViewer.setColumnProperties(new String [] {"a", "b"}); + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TablePage_label")); + } + + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ReportEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); + + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + objectColumn.setWidth(250); + + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + selfColumn.setWidth(200); + + treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); + } + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + setActivePage(0); + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener + (new ControlAdapter() { + boolean guard = false; + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, + * this hides the single tab at the bottom. + * + * + * @generated + */ + protected void hideTabs() { + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, + * this shows the tabs at the bottom. + * + * + * @generated + */ + protected void showTabs() { + if (getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. + * + * + * @generated + */ + @Override + protected void pageChange(int pageIndex) { + super.pageChange(pageIndex); + + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } + + /** + * This is how the framework determines which interfaces we implement. + * + * + * @generated + */ + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class key) { + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } + else if (key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } + else if (key.equals(IGotoMarker.class)) { + return this; + } + else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * + * + * @generated + */ + public IContentOutlinePage getContentOutlinePage() { + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener + (new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * + * + * @generated + */ + public IPropertySheetPage getPropertySheetPage() { + PropertySheetPage propertySheetPage = + new ExtendedPropertySheetPage(editingDomain) { + @Override + public void setSelectionToViewer(List selection) { + ReportEditor.this.setSelectionToViewer(selection); + ReportEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other views. + * + * + * @generated + */ + public void handleContentOutlineSelection(ISelection selection) { + if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator selectedElements = ((IStructuredSelection)selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + // If it's the selection viewer, then we want it to select the same selection as this selection. + // + if (currentViewerPane.getViewer() == selectionViewer) { + ArrayList selectionList = new ArrayList(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } + else { + // Set the input to the widget. + // + if (currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command stack. + * + * + * @generated + */ + @Override + public boolean isDirty() { + return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); + } + + /** + * This is for implementing {@link IEditorPart} and simply saves the model file. + * + * + * @generated + */ + @Override + public void doSave(IProgressMonitor progressMonitor) { + // Save only resources that have actually changed. + // + final Map saveOptions = new HashMap(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running activity that modifies the workbench. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } + catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } + catch (Exception exception) { + // Something went wrong that shouldn't. + // + ReportEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the specified resource. + * The implementation uses the URI converter from the editor's resource set to try to open an input stream. + * + * + * @generated + */ + protected boolean isPersisted(Resource resource) { + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } + catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * + * + * @generated + */ + @Override + public boolean isSaveAsAllowed() { + return true; + } + + /** + * This also changes the editor's input. + * + * + * @generated + */ + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * + * + * @generated + */ + protected void doSaveAs(URI uri, IEditorInput editorInput) { + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = + getActionBars().getStatusLineManager() != null ? + getActionBars().getStatusLineManager().getProgressMonitor() : + new NullProgressMonitor(); + doSave(progressMonitor); + } + + /** + * + * + * @generated + */ + public void gotoMarker(IMarker marker) { + List targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } + + /** + * This is called during startup. + * + * + * @generated + */ + @Override + public void init(IEditorSite site, IEditorInput editorInput) { + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } + + /** + * + * + * @generated + */ + @Override + public void setFocus() { + if (currentViewerPane != null) { + currentViewerPane.setFocus(); + } + else { + getControl(getActivePage()).setFocus(); + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void addSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.add(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.remove(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. + * + * + * @generated + */ + public ISelection getSelection() { + return editorSelection; + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. + * Calling this result will notify the listeners. + * + * + * @generated + */ + public void setSelection(ISelection selection) { + editorSelection = selection; + + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } + + /** + * + * + * @generated + */ + public void setStatusLineManager(ISelection selection) { + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? + contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection collection = ((IStructuredSelection)selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } + else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * + * + * @generated + */ + private static String getString(String key) { + return ReportEditorPlugin.INSTANCE.getString(key); + } + + /** + * This looks up a string in plugin.properties, making a substitution. + * + * + * @generated + */ + private static String getString(String key, Object s1) { + return ReportEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); + } + + /** + * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. + * + * + * @generated + */ + public void menuAboutToShow(IMenuManager menuManager) { + ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } + + /** + * + * + * @generated + */ + public EditingDomainActionBarContributor getActionBarContributor() { + return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); + } + + /** + * + * + * @generated + */ + public IActionBars getActionBars() { + return getActionBarContributor().getActionBars(); + } + + /** + * + * + * @generated + */ + public AdapterFactory getAdapterFactory() { + return adapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public void dispose() { + updateProblemIndication = false; + + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + + getSite().getPage().removePartListener(partListener); + + adapterFactory.dispose(); + + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } + + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } + + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } + + super.dispose(); + } + + /** + * Returns whether the outline view should be presented to the user. + * + * + * @generated + */ + protected boolean showOutlineView() { + return true; + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportEditorPlugin.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportEditorPlugin.java new file mode 100644 index 000000000..8701532dd --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportEditorPlugin.java @@ -0,0 +1,100 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.presentation; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.ui.EclipseUIPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyEditPlugin; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioEditPlugin; + +/** + * This is the central singleton for the Report editor plugin. + * + * + * @generated + */ +public final class ReportEditorPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ReportEditorPlugin INSTANCE = new ReportEditorPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ReportEditorPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + PropertyEditPlugin.INSTANCE, + ScenarioEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportModelWizard.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportModelWizard.java new file mode 100644 index 000000000..511b4c346 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/report/presentation/ReportModelWizard.java @@ -0,0 +1,628 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.presentation; + + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.StringTokenizer; + +import org.eclipse.emf.common.CommonPlugin; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.IProgressMonitor; + +import org.eclipse.jface.dialogs.MessageDialog; + +import org.eclipse.jface.viewers.IStructuredSelection; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.ModifyEvent; + +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; + +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import org.eclipse.ui.dialogs.WizardNewFileCreationPage; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.ISetSelectionTarget; + +import org.eclipse.gemoc.event.commons.model.report.ReportFactory; +import org.eclipse.gemoc.event.commons.model.report.ReportPackage; +import org.eclipse.gemoc.event.commons.model.report.provider.ReportEditPlugin; + + +import org.eclipse.core.runtime.Path; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; + +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; + + +/** + * This is a simple wizard for creating a new model file. + * + * + * @generated + */ +public class ReportModelWizard extends Wizard implements INewWizard { + /** + * The supported extensions for created files. + * + * + * @generated + */ + public static final List FILE_EXTENSIONS = + Collections.unmodifiableList(Arrays.asList(ReportEditorPlugin.INSTANCE.getString("_UI_ReportEditorFilenameExtensions").split("\\s*,\\s*"))); + + /** + * A formatted list of supported file extensions, suitable for display. + * + * + * @generated + */ + public static final String FORMATTED_FILE_EXTENSIONS = + ReportEditorPlugin.INSTANCE.getString("_UI_ReportEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); + + /** + * This caches an instance of the model package. + * + * + * @generated + */ + protected ReportPackage reportPackage = ReportPackage.eINSTANCE; + + /** + * This caches an instance of the model factory. + * + * + * @generated + */ + protected ReportFactory reportFactory = reportPackage.getReportFactory(); + + /** + * This is the file creation page. + * + * + * @generated + */ + protected ReportModelWizardNewFileCreationPage newFileCreationPage; + + /** + * This is the initial object creation page. + * + * + * @generated + */ + protected ReportModelWizardInitialObjectCreationPage initialObjectCreationPage; + + /** + * Remember the selection during initialization for populating the default container. + * + * + * @generated + */ + protected IStructuredSelection selection; + + /** + * Remember the workbench during initialization. + * + * + * @generated + */ + protected IWorkbench workbench; + + /** + * Caches the names of the types that can be created as the root object. + * + * + * @generated + */ + protected List initialObjectNames; + + /** + * This just records the information. + * + * + * @generated + */ + public void init(IWorkbench workbench, IStructuredSelection selection) { + this.workbench = workbench; + this.selection = selection; + setWindowTitle(ReportEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ReportEditorPlugin.INSTANCE.getImage("full/wizban/NewReport"))); + } + + /** + * Returns the names of the types that can be created as the root object. + * + * + * @generated + */ + protected Collection getInitialObjectNames() { + if (initialObjectNames == null) { + initialObjectNames = new ArrayList(); + for (EClassifier eClassifier : reportPackage.getEClassifiers()) { + if (eClassifier instanceof EClass) { + EClass eClass = (EClass)eClassifier; + if (!eClass.isAbstract()) { + initialObjectNames.add(eClass.getName()); + } + } + } + Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); + } + return initialObjectNames; + } + + /** + * Create a new model. + * + * + * @generated + */ + protected EObject createInitialModel() { + EClass eClass = (EClass)reportPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = reportFactory.create(eClass); + return rootObject; + } + + /** + * Do the work after everything is specified. + * + * + * @generated + */ + @Override + public boolean performFinish() { + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + + // Do the work within an operation. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if (rootObject != null) { + resource.getContents().add(rootObject); + } + + // Save the contents of the resource to the file system. + // + Map options = new HashMap(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } + catch (Exception exception) { + ReportEditorPlugin.INSTANCE.log(exception); + } + finally { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if (activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + ((ISetSelectionTarget)activePart).selectReveal(targetSelection); + } + }); + } + + // Open an editor on the new file. + // + try { + page.openEditor + (new FileEditorInput(modelFile), + workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } + catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), ReportEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + return false; + } + + return true; + } + catch (Exception exception) { + ReportEditorPlugin.INSTANCE.log(exception); + return false; + } + } + + /** + * This is the one page of the wizard. + * + * + * @generated + */ + public class ReportModelWizardNewFileCreationPage extends WizardNewFileCreationPage { + /** + * Pass in the selection. + * + * + * @generated + */ + public ReportModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { + super(pageId, selection); + } + + /** + * The framework calls this to see if the file is correct. + * + * + * @generated + */ + @Override + protected boolean validatePage() { + if (super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if (extension == null || !FILE_EXTENSIONS.contains(extension)) { + String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; + setErrorMessage(ReportEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } + + /** + * + * + * @generated + */ + public IFile getModelFile() { + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } + } + + /** + * This is the page where the type of object to create is selected. + * + * + * @generated + */ + public class ReportModelWizardInitialObjectCreationPage extends WizardPage { + /** + * + * + * @generated + */ + protected Combo initialObjectField; + + /** + * @generated + * + * + */ + protected List encodings; + + /** + * + * + * @generated + */ + protected Combo encodingField; + + /** + * Pass in the selection. + * + * + * @generated + */ + public ReportModelWizardInitialObjectCreationPage(String pageId) { + super(pageId); + } + + /** + * + * + * @generated + */ + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(ReportEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + + for (String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + + if (initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(ReportEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + + for (String encoding : getEncodings()) { + encodingField.add(encoding); + } + + encodingField.select(0); + encodingField.addModifyListener(validator); + + setPageComplete(validatePage()); + setControl(composite); + } + + /** + * + * + * @generated + */ + protected ModifyListener validator = + new ModifyListener() { + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; + + /** + * + * + * @generated + */ + protected boolean validatePage() { + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } + + /** + * + * + * @generated + */ + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + if (initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } + else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } + + /** + * + * + * @generated + */ + public String getInitialObjectName() { + String label = initialObjectField.getText(); + + for (String name : getInitialObjectNames()) { + if (getLabel(name).equals(label)) { + return name; + } + } + return null; + } + + /** + * + * + * @generated + */ + public String getEncoding() { + return encodingField.getText(); + } + + /** + * Returns the label for the specified type name. + * + * + * @generated + */ + protected String getLabel(String typeName) { + try { + return ReportEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + } + catch(MissingResourceException mre) { + ReportEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } + + /** + * + * + * @generated + */ + protected Collection getEncodings() { + if (encodings == null) { + encodings = new ArrayList(); + for (StringTokenizer stringTokenizer = new StringTokenizer(ReportEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } + } + + /** + * The framework calls this to create the contents of the wizard. + * + * + * @generated + */ + @Override + public void addPages() { + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new ReportModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(ReportEditorPlugin.INSTANCE.getString("_UI_ReportModelWizard_label")); + newFileCreationPage.setDescription(ReportEditorPlugin.INSTANCE.getString("_UI_ReportModelWizard_description")); + newFileCreationPage.setFileName(ReportEditorPlugin.INSTANCE.getString("_UI_ReportEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); + addPage(newFileCreationPage); + + // Try and get the resource selection to determine a current directory for the file dialog. + // + if (selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if (selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource)selectedElement; + if (selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + + // This gives us a directory... + // + if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + + // Make up a unique new name here. + // + String defaultModelBaseFilename = ReportEditorPlugin.INSTANCE.getString("_UI_ReportEditorFilenameDefaultBase"); + String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; + for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new ReportModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(ReportEditorPlugin.INSTANCE.getString("_UI_ReportModelWizard_label")); + initialObjectCreationPage.setDescription(ReportEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } + + /** + * Get the file from the page. + * + * + * @generated + */ + public IFile getModelFile() { + return newFileCreationPage.getModelFile(); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioActionBarContributor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioActionBarContributor.java new file mode 100644 index 000000000..983ce942d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioActionBarContributor.java @@ -0,0 +1,423 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.presentation; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.ui.action.ControlAction; +import org.eclipse.emf.edit.ui.action.CreateChildAction; +import org.eclipse.emf.edit.ui.action.CreateSiblingAction; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.action.LoadResourceAction; +import org.eclipse.emf.edit.ui.action.ValidateAction; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.SubContributionItem; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; + +/** + * This is the action bar contributor for the Scenario model editor. + * + * + * @generated + */ +public class ScenarioActionBarContributor + extends EditingDomainActionBarContributor + implements ISelectionChangedListener { + /** + * This keeps track of the active editor. + * + * + * @generated + */ + protected IEditorPart activeEditorPart; + + /** + * This keeps track of the current selection provider. + * + * + * @generated + */ + protected ISelectionProvider selectionProvider; + + /** + * This action opens the Properties view. + * + * + * @generated + */ + protected IAction showPropertiesViewAction = + new Action(ScenarioEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } + catch (PartInitException exception) { + ScenarioEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * + * + * @generated + */ + protected IAction refreshViewerAction = + new Action(ScenarioEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createChildActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateChild actions. + * + * + * @generated + */ + protected IMenuManager createChildMenuManager; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createSiblingActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateSibling actions. + * + * + * @generated + */ + protected IMenuManager createSiblingMenuManager; + + /** + * This creates an instance of the contributor. + * + * + * @generated + */ + public ScenarioActionBarContributor() { + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } + + /** + * This adds Separators for editor additions to the tool bar. + * + * + * @generated + */ + @Override + public void contributeToToolBar(IToolBarManager toolBarManager) { + toolBarManager.add(new Separator("scenario-settings")); + toolBarManager.add(new Separator("scenario-additions")); + } + + /** + * This adds to the menu bar a menu and some separators for editor additions, + * as well as the sub-menus for object creation items. + * + * + * @generated + */ + @Override + public void contributeToMenu(IMenuManager menuManager) { + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager(ScenarioEditorPlugin.INSTANCE.getString("_UI_ScenarioEditor_menu"), "org.eclipse.gemoc.event.commons.model.scenarioMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(ScenarioEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(ScenarioEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener + (new IMenuListener() { + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } + + /** + * When the active editor changes, this remembers the change and registers with it as a selection provider. + * + * + * @generated + */ + @Override + public void setActiveEditor(IEditorPart part) { + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } + else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, + * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings + * that can be added to the selected object and updating the menus accordingly. + * + * + * @generated + */ + public void selectionChanged(SelectionChangedEvent event) { + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection newChildDescriptors = null; + Collection newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { + Object object = ((IStructuredSelection)selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This populates the specified manager with {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection, + * by inserting them before the specified contribution item contributionID. + * If contributionID is null, they are simply added. + * + * + * @generated + */ + protected void populateManager(IContributionManager manager, Collection actions, String contributionID) { + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } + else { + manager.add(action); + } + } + } + } + + /** + * This removes from the specified manager all {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection. + * + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Collection actions) { + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem)contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This populates the pop-up menu before it appears. + * + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; + + submenuManager = new MenuManager(ScenarioEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); + + submenuManager = new MenuManager(ScenarioEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } + + /** + * This inserts global actions before the "additions-end" separator. + * + * + * @generated + */ + @Override + protected void addGlobalActions(IMenuManager menuManager) { + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); + + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); + + super.addGlobalActions(menuManager); + } + + /** + * This ensures that a delete action will clean up all references to deleted objects. + * + * + * @generated + */ + @Override + protected boolean removeAllReferencesOnDelete() { + return true; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioEditor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioEditor.java new file mode 100644 index 000000000..c6b69a463 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioEditor.java @@ -0,0 +1,1825 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.presentation; + + +import java.io.IOException; +import java.io.InputStream; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; + +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; + +import org.eclipse.jface.util.LocalSelectionTransfer; + +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TableLayout; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.custom.CTabFolder; + +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; +import org.eclipse.swt.dnd.Transfer; + +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; + +import org.eclipse.swt.graphics.Point; + +import org.eclipse.swt.layout.FillLayout; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; + +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PartInitException; + +import org.eclipse.ui.dialogs.SaveAsDialog; + +import org.eclipse.ui.ide.IGotoMarker; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiPageEditorPart; + +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; + +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheet; +import org.eclipse.ui.views.properties.PropertySheetPage; + +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.ui.MarkerHelper; +import org.eclipse.emf.common.ui.ViewerPane; + +import org.eclipse.emf.common.ui.editor.ProblemEditorPart; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; + + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; + +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; + +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; + +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; + +import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; + +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; + +import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper; +import org.eclipse.emf.edit.ui.util.EditUIUtil; + +import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; + +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioItemProviderAdapterFactory; + +import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyItemProviderAdapterFactory; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + + +/** + * This is an example of a Scenario model editor. + * + * + * @generated + */ +public class ScenarioEditor + extends MultiPageEditorPart + implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { + /** + * This keeps track of the editing domain that is used to track all changes to the model. + * + * + * @generated + */ + protected AdapterFactoryEditingDomain editingDomain; + + /** + * This is the one adapter factory used for providing views of the model. + * + * + * @generated + */ + protected ComposedAdapterFactory adapterFactory; + + /** + * This is the content outline page. + * + * + * @generated + */ + protected IContentOutlinePage contentOutlinePage; + + /** + * This is a kludge... + * + * + * @generated + */ + protected IStatusLineManager contentOutlineStatusLineManager; + + /** + * This is the content outline page's viewer. + * + * + * @generated + */ + protected TreeViewer contentOutlineViewer; + + /** + * This is the property sheet page. + * + * + * @generated + */ + protected List propertySheetPages = new ArrayList(); + + /** + * This is the viewer that shadows the selection in the content outline. + * The parent relation must be correctly defined for this to work. + * + * + * @generated + */ + protected TreeViewer selectionViewer; + + /** + * This inverts the roll of parent and child in the content provider and show parents as a tree. + * + * + * @generated + */ + protected TreeViewer parentViewer; + + /** + * This shows how a tree view works. + * + * + * @generated + */ + protected TreeViewer treeViewer; + + /** + * This shows how a list view works. + * A list viewer doesn't support icons. + * + * + * @generated + */ + protected ListViewer listViewer; + + /** + * This shows how a table view works. + * A table can be used as a list with icons. + * + * + * @generated + */ + protected TableViewer tableViewer; + + /** + * This shows how a tree view with columns works. + * + * + * @generated + */ + protected TreeViewer treeViewerWithColumns; + + /** + * This keeps track of the active viewer pane, in the book. + * + * + * @generated + */ + protected ViewerPane currentViewerPane; + + /** + * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. + * + * + * @generated + */ + protected Viewer currentViewer; + + /** + * This listens to which ever viewer is active. + * + * + * @generated + */ + protected ISelectionChangedListener selectionChangedListener; + + /** + * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. + * + * + * @generated + */ + protected Collection selectionChangedListeners = new ArrayList(); + + /** + * This keeps track of the selection of the editor as a whole. + * + * + * @generated + */ + protected ISelection editorSelection = StructuredSelection.EMPTY; + + /** + * The MarkerHelper is responsible for creating workspace resource markers presented + * in Eclipse's Problems View. + * + * + * @generated + */ + protected MarkerHelper markerHelper = new EditUIMarkerHelper(); + + /** + * This listens for when the outline becomes active + * + * + * @generated + */ + protected IPartListener partListener = + new IPartListener() { + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(ScenarioEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ScenarioEditor.this); + handleActivate(); + } + } + else if (p == ScenarioEditor.this) { + handleActivate(); + } + } + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * + * + * @generated + */ + protected Collection removedResources = new ArrayList(); + + /** + * Resources that have been changed since last activation. + * + * + * @generated + */ + protected Collection changedResources = new ArrayList(); + + /** + * Resources that have been saved. + * + * + * @generated + */ + protected Collection savedResources = new ArrayList(); + + /** + * Map to store the diagnostic associated with a resource. + * + * + * @generated + */ + protected Map resourceToDiagnosticMap = new LinkedHashMap(); + + /** + * Controls whether the problem indication should be updated. + * + * + * @generated + */ + protected boolean updateProblemIndication = true; + + /** + * Adapter used to update the problem indication when resources are demanded loaded. + * + * + * @generated + */ + protected EContentAdapter problemIndicationAdapter = + new EContentAdapter() { + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource)notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } + else { + resourceToDiagnosticMap.remove(resource); + } + + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } + else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. + * + * + * @generated + */ + protected IResourceChangeListener resourceChangeListener = + new IResourceChangeListener() { + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + protected Collection changedResources = new ArrayList(); + protected Collection removedResources = new ArrayList(); + + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || + delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } + else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection getChangedResources() { + return changedResources; + } + + public Collection getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(ScenarioEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == ScenarioEditor.this) { + handleActivate(); + } + } + }); + } + } + catch (CoreException exception) { + ScenarioEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * + * + * @generated + */ + protected void handleActivate() { + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(ScenarioEditor.this, false); + } + else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } + else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * + * + * @generated + */ + protected void handleChangedResources() { + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if (isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } + catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } + + /** + * Updates the problems indication with the information described in the specified diagnostic. + * + * + * @generated + */ + protected void updateProblemIndication() { + if (updateProblemIndication) { + BasicDiagnostic diagnostic = + new BasicDiagnostic + (Diagnostic.OK, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + null, + new Object [] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } + else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } + catch (PartInitException exception) { + ScenarioEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if (diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } + catch (CoreException exception) { + ScenarioEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * + * + * @generated + */ + protected boolean handleDirtyConflict() { + return + MessageDialog.openQuestion + (getSite().getShell(), + getString("_UI_FileConflict_label"), + getString("_WARN_FileConflict")); + } + + /** + * This creates a model editor. + * + * + * @generated + */ + public ScenarioEditor() { + super(); + initializeEditingDomain(); + } + + /** + * This sets up the editing domain for the model editor. + * + * + * @generated + */ + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ScenarioItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new PropertyItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener + (new CommandStackListener() { + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec + (new Runnable() { + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator i = propertySheetPages.iterator(); i.hasNext(); ) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } + else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap()); + } + + /** + * This is here for the listener to be able to call it. + * + * + * @generated + */ + @Override + protected void firePropertyChange(int action) { + super.firePropertyChange(action); + } + + /** + * This sets the selection into whichever viewer is active. + * + * + * @generated + */ + public void setSelectionToViewer(Collection collection) { + final Collection theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = + new Runnable() { + public void run() { + // Try to select the items in the current content viewer of the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. + * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * + * + * @generated + */ + public EditingDomain getEditingDomain() { + return editingDomain; + } + + /** + * + * + * @generated + */ + public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { + /** + * + * + * @generated + */ + public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getElements(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getChildren(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public boolean hasChildren(Object object) { + Object parent = super.getParent(object); + return parent != null; + } + + /** + * + * + * @generated + */ + @Override + public Object getParent(Object object) { + return null; + } + } + + /** + * + * + * @generated + */ + public void setCurrentViewerPane(ViewerPane viewerPane) { + if (currentViewerPane != viewerPane) { + if (currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, + * is the current one. + * + * + * @generated + */ + public void setCurrentViewer(Viewer viewer) { + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = + new ISelectionChangedListener() { + // This just notifies those things that are affected by the section. + // + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} interface. + * + * + * @generated + */ + public Viewer getViewer() { + return currentViewer; + } + + /** + * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. + * + * + * @generated + */ + protected void createContextMenuFor(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu= contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's resource set based on the editor's input. + * + * + * @generated + */ + public void createModel() { + URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } + catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the resource + * and the specified exception (if any). + * + * + * @generated + */ + public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { + boolean hasErrors = !resource.getErrors().isEmpty(); + if (hasErrors || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = + new BasicDiagnostic + (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object [] { exception == null ? (Object)resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } + else if (exception != null) { + return + new BasicDiagnostic + (Diagnostic.ERROR, + "org.eclipse.gemoc.event.commons.model.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception }); + } + else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * + * + * @generated + */ + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ScenarioEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + selectionViewer = (TreeViewer)viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); + } + + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ScenarioEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + parentViewer = (TreeViewer)viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ParentPage_label")); + } + + // This is the page for the list viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ScenarioEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer)viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ListPage_label")); + } + + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ScenarioEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer)viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreePage_label")); + } + + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ScenarioEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer)viewerPane.getViewer(); + + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + + tableViewer.setColumnProperties(new String [] {"a", "b"}); + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TablePage_label")); + } + + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ScenarioEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); + + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + objectColumn.setWidth(250); + + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + selfColumn.setWidth(200); + + treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); + } + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + setActivePage(0); + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener + (new ControlAdapter() { + boolean guard = false; + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, + * this hides the single tab at the bottom. + * + * + * @generated + */ + protected void hideTabs() { + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, + * this shows the tabs at the bottom. + * + * + * @generated + */ + protected void showTabs() { + if (getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. + * + * + * @generated + */ + @Override + protected void pageChange(int pageIndex) { + super.pageChange(pageIndex); + + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } + + /** + * This is how the framework determines which interfaces we implement. + * + * + * @generated + */ + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class key) { + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } + else if (key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } + else if (key.equals(IGotoMarker.class)) { + return this; + } + else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * + * + * @generated + */ + public IContentOutlinePage getContentOutlinePage() { + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener + (new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * + * + * @generated + */ + public IPropertySheetPage getPropertySheetPage() { + PropertySheetPage propertySheetPage = + new ExtendedPropertySheetPage(editingDomain) { + @Override + public void setSelectionToViewer(List selection) { + ScenarioEditor.this.setSelectionToViewer(selection); + ScenarioEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other views. + * + * + * @generated + */ + public void handleContentOutlineSelection(ISelection selection) { + if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator selectedElements = ((IStructuredSelection)selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + // If it's the selection viewer, then we want it to select the same selection as this selection. + // + if (currentViewerPane.getViewer() == selectionViewer) { + ArrayList selectionList = new ArrayList(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } + else { + // Set the input to the widget. + // + if (currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command stack. + * + * + * @generated + */ + @Override + public boolean isDirty() { + return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); + } + + /** + * This is for implementing {@link IEditorPart} and simply saves the model file. + * + * + * @generated + */ + @Override + public void doSave(IProgressMonitor progressMonitor) { + // Save only resources that have actually changed. + // + final Map saveOptions = new HashMap(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running activity that modifies the workbench. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } + catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } + catch (Exception exception) { + // Something went wrong that shouldn't. + // + ScenarioEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the specified resource. + * The implementation uses the URI converter from the editor's resource set to try to open an input stream. + * + * + * @generated + */ + protected boolean isPersisted(Resource resource) { + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } + catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * + * + * @generated + */ + @Override + public boolean isSaveAsAllowed() { + return true; + } + + /** + * This also changes the editor's input. + * + * + * @generated + */ + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * + * + * @generated + */ + protected void doSaveAs(URI uri, IEditorInput editorInput) { + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = + getActionBars().getStatusLineManager() != null ? + getActionBars().getStatusLineManager().getProgressMonitor() : + new NullProgressMonitor(); + doSave(progressMonitor); + } + + /** + * + * + * @generated + */ + public void gotoMarker(IMarker marker) { + List targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } + + /** + * This is called during startup. + * + * + * @generated + */ + @Override + public void init(IEditorSite site, IEditorInput editorInput) { + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } + + /** + * + * + * @generated + */ + @Override + public void setFocus() { + if (currentViewerPane != null) { + currentViewerPane.setFocus(); + } + else { + getControl(getActivePage()).setFocus(); + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void addSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.add(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.remove(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. + * + * + * @generated + */ + public ISelection getSelection() { + return editorSelection; + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. + * Calling this result will notify the listeners. + * + * + * @generated + */ + public void setSelection(ISelection selection) { + editorSelection = selection; + + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } + + /** + * + * + * @generated + */ + public void setStatusLineManager(ISelection selection) { + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? + contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection collection = ((IStructuredSelection)selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } + else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * + * + * @generated + */ + private static String getString(String key) { + return ScenarioEditorPlugin.INSTANCE.getString(key); + } + + /** + * This looks up a string in plugin.properties, making a substitution. + * + * + * @generated + */ + private static String getString(String key, Object s1) { + return ScenarioEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); + } + + /** + * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. + * + * + * @generated + */ + public void menuAboutToShow(IMenuManager menuManager) { + ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } + + /** + * + * + * @generated + */ + public EditingDomainActionBarContributor getActionBarContributor() { + return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); + } + + /** + * + * + * @generated + */ + public IActionBars getActionBars() { + return getActionBarContributor().getActionBars(); + } + + /** + * + * + * @generated + */ + public AdapterFactory getAdapterFactory() { + return adapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public void dispose() { + updateProblemIndication = false; + + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + + getSite().getPage().removePartListener(partListener); + + adapterFactory.dispose(); + + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } + + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } + + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } + + super.dispose(); + } + + /** + * Returns whether the outline view should be presented to the user. + * + * + * @generated + */ + protected boolean showOutlineView() { + return true; + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioEditorPlugin.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioEditorPlugin.java new file mode 100644 index 000000000..f7ada3f50 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioEditorPlugin.java @@ -0,0 +1,97 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.presentation; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.ui.EclipseUIPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gemoc.event.commons.model.property.provider.PropertyEditPlugin; + +/** + * This is the central singleton for the Scenario editor plugin. + * + * + * @generated + */ +public final class ScenarioEditorPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ScenarioEditorPlugin INSTANCE = new ScenarioEditorPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ScenarioEditorPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + PropertyEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioModelWizard.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioModelWizard.java new file mode 100644 index 000000000..7be3050ce --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model.editor/src/org/eclipse/gemoc/event/commons/model/scenario/presentation/ScenarioModelWizard.java @@ -0,0 +1,628 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.presentation; + + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.StringTokenizer; + +import org.eclipse.emf.common.CommonPlugin; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.IProgressMonitor; + +import org.eclipse.jface.dialogs.MessageDialog; + +import org.eclipse.jface.viewers.IStructuredSelection; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.ModifyEvent; + +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; + +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import org.eclipse.ui.dialogs.WizardNewFileCreationPage; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.ISetSelectionTarget; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFactory; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; +import org.eclipse.gemoc.event.commons.model.scenario.provider.ScenarioEditPlugin; + + +import org.eclipse.core.runtime.Path; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; + +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; + + +/** + * This is a simple wizard for creating a new model file. + * + * + * @generated + */ +public class ScenarioModelWizard extends Wizard implements INewWizard { + /** + * The supported extensions for created files. + * + * + * @generated + */ + public static final List FILE_EXTENSIONS = + Collections.unmodifiableList(Arrays.asList(ScenarioEditorPlugin.INSTANCE.getString("_UI_ScenarioEditorFilenameExtensions").split("\\s*,\\s*"))); + + /** + * A formatted list of supported file extensions, suitable for display. + * + * + * @generated + */ + public static final String FORMATTED_FILE_EXTENSIONS = + ScenarioEditorPlugin.INSTANCE.getString("_UI_ScenarioEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); + + /** + * This caches an instance of the model package. + * + * + * @generated + */ + protected ScenarioPackage scenarioPackage = ScenarioPackage.eINSTANCE; + + /** + * This caches an instance of the model factory. + * + * + * @generated + */ + protected ScenarioFactory scenarioFactory = scenarioPackage.getScenarioFactory(); + + /** + * This is the file creation page. + * + * + * @generated + */ + protected ScenarioModelWizardNewFileCreationPage newFileCreationPage; + + /** + * This is the initial object creation page. + * + * + * @generated + */ + protected ScenarioModelWizardInitialObjectCreationPage initialObjectCreationPage; + + /** + * Remember the selection during initialization for populating the default container. + * + * + * @generated + */ + protected IStructuredSelection selection; + + /** + * Remember the workbench during initialization. + * + * + * @generated + */ + protected IWorkbench workbench; + + /** + * Caches the names of the types that can be created as the root object. + * + * + * @generated + */ + protected List initialObjectNames; + + /** + * This just records the information. + * + * + * @generated + */ + public void init(IWorkbench workbench, IStructuredSelection selection) { + this.workbench = workbench; + this.selection = selection; + setWindowTitle(ScenarioEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ScenarioEditorPlugin.INSTANCE.getImage("full/wizban/NewScenario"))); + } + + /** + * Returns the names of the types that can be created as the root object. + * + * + * @generated + */ + protected Collection getInitialObjectNames() { + if (initialObjectNames == null) { + initialObjectNames = new ArrayList(); + for (EClassifier eClassifier : scenarioPackage.getEClassifiers()) { + if (eClassifier instanceof EClass) { + EClass eClass = (EClass)eClassifier; + if (!eClass.isAbstract()) { + initialObjectNames.add(eClass.getName()); + } + } + } + Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); + } + return initialObjectNames; + } + + /** + * Create a new model. + * + * + * @generated + */ + protected EObject createInitialModel() { + EClass eClass = (EClass)scenarioPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = scenarioFactory.create(eClass); + return rootObject; + } + + /** + * Do the work after everything is specified. + * + * + * @generated + */ + @Override + public boolean performFinish() { + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + + // Do the work within an operation. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if (rootObject != null) { + resource.getContents().add(rootObject); + } + + // Save the contents of the resource to the file system. + // + Map options = new HashMap(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } + catch (Exception exception) { + ScenarioEditorPlugin.INSTANCE.log(exception); + } + finally { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if (activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + ((ISetSelectionTarget)activePart).selectReveal(targetSelection); + } + }); + } + + // Open an editor on the new file. + // + try { + page.openEditor + (new FileEditorInput(modelFile), + workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } + catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), ScenarioEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + return false; + } + + return true; + } + catch (Exception exception) { + ScenarioEditorPlugin.INSTANCE.log(exception); + return false; + } + } + + /** + * This is the one page of the wizard. + * + * + * @generated + */ + public class ScenarioModelWizardNewFileCreationPage extends WizardNewFileCreationPage { + /** + * Pass in the selection. + * + * + * @generated + */ + public ScenarioModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { + super(pageId, selection); + } + + /** + * The framework calls this to see if the file is correct. + * + * + * @generated + */ + @Override + protected boolean validatePage() { + if (super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if (extension == null || !FILE_EXTENSIONS.contains(extension)) { + String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; + setErrorMessage(ScenarioEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } + + /** + * + * + * @generated + */ + public IFile getModelFile() { + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } + } + + /** + * This is the page where the type of object to create is selected. + * + * + * @generated + */ + public class ScenarioModelWizardInitialObjectCreationPage extends WizardPage { + /** + * + * + * @generated + */ + protected Combo initialObjectField; + + /** + * @generated + * + * + */ + protected List encodings; + + /** + * + * + * @generated + */ + protected Combo encodingField; + + /** + * Pass in the selection. + * + * + * @generated + */ + public ScenarioModelWizardInitialObjectCreationPage(String pageId) { + super(pageId); + } + + /** + * + * + * @generated + */ + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(ScenarioEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + + for (String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + + if (initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(ScenarioEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + + for (String encoding : getEncodings()) { + encodingField.add(encoding); + } + + encodingField.select(0); + encodingField.addModifyListener(validator); + + setPageComplete(validatePage()); + setControl(composite); + } + + /** + * + * + * @generated + */ + protected ModifyListener validator = + new ModifyListener() { + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; + + /** + * + * + * @generated + */ + protected boolean validatePage() { + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } + + /** + * + * + * @generated + */ + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + if (initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } + else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } + + /** + * + * + * @generated + */ + public String getInitialObjectName() { + String label = initialObjectField.getText(); + + for (String name : getInitialObjectNames()) { + if (getLabel(name).equals(label)) { + return name; + } + } + return null; + } + + /** + * + * + * @generated + */ + public String getEncoding() { + return encodingField.getText(); + } + + /** + * Returns the label for the specified type name. + * + * + * @generated + */ + protected String getLabel(String typeName) { + try { + return ScenarioEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + } + catch(MissingResourceException mre) { + ScenarioEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } + + /** + * + * + * @generated + */ + protected Collection getEncodings() { + if (encodings == null) { + encodings = new ArrayList(); + for (StringTokenizer stringTokenizer = new StringTokenizer(ScenarioEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } + } + + /** + * The framework calls this to create the contents of the wizard. + * + * + * @generated + */ + @Override + public void addPages() { + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new ScenarioModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(ScenarioEditorPlugin.INSTANCE.getString("_UI_ScenarioModelWizard_label")); + newFileCreationPage.setDescription(ScenarioEditorPlugin.INSTANCE.getString("_UI_ScenarioModelWizard_description")); + newFileCreationPage.setFileName(ScenarioEditorPlugin.INSTANCE.getString("_UI_ScenarioEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); + addPage(newFileCreationPage); + + // Try and get the resource selection to determine a current directory for the file dialog. + // + if (selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if (selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource)selectedElement; + if (selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + + // This gives us a directory... + // + if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + + // Make up a unique new name here. + // + String defaultModelBaseFilename = ScenarioEditorPlugin.INSTANCE.getString("_UI_ScenarioEditorFilenameDefaultBase"); + String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; + for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new ScenarioModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(ScenarioEditorPlugin.INSTANCE.getString("_UI_ScenarioModelWizard_label")); + initialObjectCreationPage.setDescription(ScenarioEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } + + /** + * Get the file from the page. + * + * + * @generated + */ + public IFile getModelFile() { + return newFileCreationPage.getModelFile(); + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.classpath new file mode 100644 index 000000000..428337e56 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.project new file mode 100644 index 000000000..2004a5298 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.event.commons.model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..0c68a61dc --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/META-INF/MANIFEST.MF new file mode 100644 index 000000000..9eaf6f2ca --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/META-INF/MANIFEST.MF @@ -0,0 +1,31 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.event.commons.model;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.event.commons.model.property, + org.eclipse.gemoc.event.commons.model.property.impl, + org.eclipse.gemoc.event.commons.model.property.util, + org.eclipse.gemoc.event.commons.model.scenario, + org.eclipse.gemoc.event.commons.model.scenario.impl, + org.eclipse.gemoc.event.commons.model.scenario.util, + org.eclipse.gemoc.event.commons.model.arbiter, + org.eclipse.gemoc.event.commons.model.arbiter.impl, + org.eclipse.gemoc.event.commons.model.arbiter.util, + org.eclipse.gemoc.event.commons.model.report, + org.eclipse.gemoc.event.commons.model.report.impl, + org.eclipse.gemoc.event.commons.model.report.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.gemoc.event.commons.model;visibility:=reexport, + com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.gemoc.xdsmlframework.api;bundle-version="2.3.0", + org.eclipse.gemoc.trace.commons.model +Bundle-ActivationPolicy: lazy diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/build.properties new file mode 100644 index 000000000..4465407fc --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/arbiter.ecore b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/arbiter.ecore new file mode 100644 index 000000000..9f180017b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/arbiter.ecore @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/arbiter.genmodel b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/arbiter.genmodel new file mode 100644 index 000000000..f521651fa --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/arbiter.genmodel @@ -0,0 +1,35 @@ + + + arbiter.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/property.ecore b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/property.ecore new file mode 100644 index 000000000..beef81470 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/property.ecore @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/property.genmodel b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/property.genmodel new file mode 100644 index 000000000..d9309d1d5 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/property.genmodel @@ -0,0 +1,101 @@ + + + property.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/report.ecore b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/report.ecore new file mode 100644 index 000000000..1e6a20631 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/report.ecore @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/report.genmodel b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/report.genmodel new file mode 100644 index 000000000..c6b7212e1 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/report.genmodel @@ -0,0 +1,19 @@ + + + report.ecore + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/scenario.ecore b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/scenario.ecore new file mode 100644 index 000000000..688db809a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/scenario.ecore @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/scenario.genmodel b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/scenario.genmodel new file mode 100644 index 000000000..bd6840700 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/model/scenario.genmodel @@ -0,0 +1,27 @@ + + + scenario.ecore + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/plugin.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/plugin.properties new file mode 100644 index 000000000..f6073b142 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Scenario Model +providerName = www.example.org diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/plugin.xml new file mode 100644 index 000000000..fbd611e48 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/plugin.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/Arbiter.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/Arbiter.java new file mode 100644 index 000000000..9a09d6226 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/Arbiter.java @@ -0,0 +1,86 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'Arbiter'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getStates States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getTransitions Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getInitialState Initial State}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getArbiter() + * @model abstract="true" + * @generated + */ +public interface Arbiter

, T extends Transition> extends EObject { + /** + * Returns the value of the 'States' containment reference list. + * + *

+ * If the meaning of the 'States' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'States' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getArbiter_States() + * @model containment="true" + * @generated + */ + EList getStates(); + + /** + * Returns the value of the 'Transitions' containment reference list. + * + *

+ * If the meaning of the 'Transitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Transitions' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getArbiter_Transitions() + * @model containment="true" + * @generated + */ + EList getTransitions(); + + /** + * Returns the value of the 'Initial State' reference. + * + *

+ * If the meaning of the 'Initial State' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Initial State' reference. + * @see #setInitialState(State) + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getArbiter_InitialState() + * @model + * @generated + */ + S getInitialState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getInitialState Initial State}' reference. + * + * + * @param value the new value of the 'Initial State' reference. + * @see #getInitialState() + * @generated + */ + void setInitialState(S value); + +} // Arbiter diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/ArbiterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/ArbiterFactory.java new file mode 100644 index 000000000..0d556c1eb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/ArbiterFactory.java @@ -0,0 +1,33 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage + * @generated + */ +public interface ArbiterFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ArbiterFactory eINSTANCE = org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterFactoryImpl.init(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ArbiterPackage getArbiterPackage(); + +} //ArbiterFactory diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/ArbiterPackage.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/ArbiterPackage.java new file mode 100644 index 000000000..f3c834f36 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/ArbiterPackage.java @@ -0,0 +1,512 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterFactory + * @model kind="package" + * @generated + */ +public interface ArbiterPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "arbiter"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.gemoc.org/arbiter"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "arbiter"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ArbiterPackage eINSTANCE = org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterImpl Arbiter}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterImpl + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl#getArbiter() + * @generated + */ + int ARBITER = 0; + + /** + * The feature id for the 'States' containment reference list. + * + * + * @generated + * @ordered + */ + int ARBITER__STATES = 0; + + /** + * The feature id for the 'Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int ARBITER__TRANSITIONS = 1; + + /** + * The feature id for the 'Initial State' reference. + * + * + * @generated + * @ordered + */ + int ARBITER__INITIAL_STATE = 2; + + /** + * The number of structural features of the 'Arbiter' class. + * + * + * @generated + * @ordered + */ + int ARBITER_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Arbiter' class. + * + * + * @generated + * @ordered + */ + int ARBITER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.arbiter.impl.StateImpl State}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.StateImpl + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl#getState() + * @generated + */ + int STATE = 1; + + /** + * The feature id for the 'Truth Value' attribute. + * + * + * @generated + * @ordered + */ + int STATE__TRUTH_VALUE = 0; + + /** + * The feature id for the 'Outgoing Transitions' reference list. + * + * + * @generated + * @ordered + */ + int STATE__OUTGOING_TRANSITIONS = 1; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int STATE__INCOMING_TRANSITIONS = 2; + + /** + * The number of structural features of the 'State' class. + * + * + * @generated + * @ordered + */ + int STATE_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'State' class. + * + * + * @generated + * @ordered + */ + int STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.arbiter.impl.TransitionImpl Transition}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.TransitionImpl + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl#getTransition() + * @generated + */ + int TRANSITION = 2; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int TRANSITION__SOURCE = 0; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int TRANSITION__TARGET = 1; + + /** + * The feature id for the 'Guard' containment reference. + * + * + * @generated + * @ordered + */ + int TRANSITION__GUARD = 2; + + /** + * The number of structural features of the 'Transition' class. + * + * + * @generated + * @ordered + */ + int TRANSITION_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Transition' class. + * + * + * @generated + * @ordered + */ + int TRANSITION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.arbiter.TruthValue Truth Value}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.TruthValue + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl#getTruthValue() + * @generated + */ + int TRUTH_VALUE = 3; + + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter Arbiter}'. + * + * + * @return the meta object for class 'Arbiter'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Arbiter + * @generated + */ + EClass getArbiter(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getStates States}'. + * + * + * @return the meta object for the containment reference list 'States'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getStates() + * @see #getArbiter() + * @generated + */ + EReference getArbiter_States(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getTransitions Transitions}'. + * + * + * @return the meta object for the containment reference list 'Transitions'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getTransitions() + * @see #getArbiter() + * @generated + */ + EReference getArbiter_Transitions(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getInitialState Initial State}'. + * + * + * @return the meta object for the reference 'Initial State'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Arbiter#getInitialState() + * @see #getArbiter() + * @generated + */ + EReference getArbiter_InitialState(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.arbiter.State State}'. + * + * + * @return the meta object for class 'State'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.State + * @generated + */ + EClass getState(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.arbiter.State#getTruthValue Truth Value}'. + * + * + * @return the meta object for the attribute 'Truth Value'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.State#getTruthValue() + * @see #getState() + * @generated + */ + EAttribute getState_TruthValue(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.arbiter.State#getOutgoingTransitions Outgoing Transitions}'. + * + * + * @return the meta object for the reference list 'Outgoing Transitions'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.State#getOutgoingTransitions() + * @see #getState() + * @generated + */ + EReference getState_OutgoingTransitions(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.arbiter.State#getIncomingTransitions Incoming Transitions}'. + * + * + * @return the meta object for the reference list 'Incoming Transitions'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.State#getIncomingTransitions() + * @see #getState() + * @generated + */ + EReference getState_IncomingTransitions(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition Transition}'. + * + * + * @return the meta object for class 'Transition'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Transition + * @generated + */ + EClass getTransition(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getSource Source}'. + * + * + * @return the meta object for the reference 'Source'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Transition#getSource() + * @see #getTransition() + * @generated + */ + EReference getTransition_Source(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Transition#getTarget() + * @see #getTransition() + * @generated + */ + EReference getTransition_Target(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getGuard Guard}'. + * + * + * @return the meta object for the containment reference 'Guard'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Transition#getGuard() + * @see #getTransition() + * @generated + */ + EReference getTransition_Guard(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.event.commons.model.arbiter.TruthValue Truth Value}'. + * + * + * @return the meta object for enum 'Truth Value'. + * @see org.eclipse.gemoc.event.commons.model.arbiter.TruthValue + * @generated + */ + EEnum getTruthValue(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ArbiterFactory getArbiterFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterImpl Arbiter}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterImpl + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl#getArbiter() + * @generated + */ + EClass ARBITER = eINSTANCE.getArbiter(); + + /** + * The meta object literal for the 'States' containment reference list feature. + * + * + * @generated + */ + EReference ARBITER__STATES = eINSTANCE.getArbiter_States(); + + /** + * The meta object literal for the 'Transitions' containment reference list feature. + * + * + * @generated + */ + EReference ARBITER__TRANSITIONS = eINSTANCE.getArbiter_Transitions(); + + /** + * The meta object literal for the 'Initial State' reference feature. + * + * + * @generated + */ + EReference ARBITER__INITIAL_STATE = eINSTANCE.getArbiter_InitialState(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.arbiter.impl.StateImpl State}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.StateImpl + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl#getState() + * @generated + */ + EClass STATE = eINSTANCE.getState(); + + /** + * The meta object literal for the 'Truth Value' attribute feature. + * + * + * @generated + */ + EAttribute STATE__TRUTH_VALUE = eINSTANCE.getState_TruthValue(); + + /** + * The meta object literal for the 'Outgoing Transitions' reference list feature. + * + * + * @generated + */ + EReference STATE__OUTGOING_TRANSITIONS = eINSTANCE.getState_OutgoingTransitions(); + + /** + * The meta object literal for the 'Incoming Transitions' reference list feature. + * + * + * @generated + */ + EReference STATE__INCOMING_TRANSITIONS = eINSTANCE.getState_IncomingTransitions(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.arbiter.impl.TransitionImpl Transition}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.TransitionImpl + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl#getTransition() + * @generated + */ + EClass TRANSITION = eINSTANCE.getTransition(); + + /** + * The meta object literal for the 'Source' reference feature. + * + * + * @generated + */ + EReference TRANSITION__SOURCE = eINSTANCE.getTransition_Source(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference TRANSITION__TARGET = eINSTANCE.getTransition_Target(); + + /** + * The meta object literal for the 'Guard' containment reference feature. + * + * + * @generated + */ + EReference TRANSITION__GUARD = eINSTANCE.getTransition_Guard(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.arbiter.TruthValue Truth Value}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.TruthValue + * @see org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterPackageImpl#getTruthValue() + * @generated + */ + EEnum TRUTH_VALUE = eINSTANCE.getTruthValue(); + + } + +} //ArbiterPackage diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/State.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/State.java new file mode 100644 index 000000000..3eb5b14ec --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/State.java @@ -0,0 +1,93 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'State'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.State#getTruthValue Truth Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.State#getOutgoingTransitions Outgoing Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.State#getIncomingTransitions Incoming Transitions}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getState() + * @model abstract="true" + * @generated + */ +public interface State

> extends EObject { + /** + * Returns the value of the 'Truth Value' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.arbiter.TruthValue}. + * + *

+ * If the meaning of the 'Truth Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Truth Value' attribute. + * @see org.eclipse.gemoc.event.commons.model.arbiter.TruthValue + * @see #setTruthValue(TruthValue) + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getState_TruthValue() + * @model required="true" + * @generated + */ + TruthValue getTruthValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.arbiter.State#getTruthValue Truth Value}' attribute. + * + * + * @param value the new value of the 'Truth Value' attribute. + * @see org.eclipse.gemoc.event.commons.model.arbiter.TruthValue + * @see #getTruthValue() + * @generated + */ + void setTruthValue(TruthValue value); + + /** + * Returns the value of the 'Outgoing Transitions' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getSource Source}'. + * + *

+ * If the meaning of the 'Outgoing Transitions' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Outgoing Transitions' reference list. + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getState_OutgoingTransitions() + * @see org.eclipse.gemoc.event.commons.model.arbiter.Transition#getSource + * @model opposite="source" + * @generated + */ + EList getOutgoingTransitions(); + + /** + * Returns the value of the 'Incoming Transitions' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getTarget Target}'. + * + *

+ * If the meaning of the 'Incoming Transitions' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Incoming Transitions' reference list. + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getState_IncomingTransitions() + * @see org.eclipse.gemoc.event.commons.model.arbiter.Transition#getTarget + * @model opposite="target" + * @generated + */ + EList getIncomingTransitions(); + +} // State diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/Transition.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/Transition.java new file mode 100644 index 000000000..c8b42a961 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/Transition.java @@ -0,0 +1,110 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'Transition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getSource Source}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getTarget Target}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getGuard Guard}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getTransition() + * @model abstract="true" + * @generated + */ +public interface Transition

> extends EObject { + /** + * Returns the value of the 'Source' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.arbiter.State#getOutgoingTransitions Outgoing Transitions}'. + * + *

+ * If the meaning of the 'Source' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Source' reference. + * @see #setSource(State) + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getTransition_Source() + * @see org.eclipse.gemoc.event.commons.model.arbiter.State#getOutgoingTransitions + * @model opposite="outgoingTransitions" required="true" + * @generated + */ + S getSource(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getSource Source}' reference. + * + * + * @param value the new value of the 'Source' reference. + * @see #getSource() + * @generated + */ + void setSource(S value); + + /** + * Returns the value of the 'Target' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.arbiter.State#getIncomingTransitions Incoming Transitions}'. + * + *

+ * If the meaning of the 'Target' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target' reference. + * @see #setTarget(State) + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getTransition_Target() + * @see org.eclipse.gemoc.event.commons.model.arbiter.State#getIncomingTransitions + * @model opposite="incomingTransitions" required="true" + * @generated + */ + S getTarget(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(S value); + + /** + * Returns the value of the 'Guard' containment reference. + * + *

+ * If the meaning of the 'Guard' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Guard' containment reference. + * @see #setGuard(Property) + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getTransition_Guard() + * @model containment="true" + * @generated + */ + P getGuard(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition#getGuard Guard}' containment reference. + * + * + * @param value the new value of the 'Guard' containment reference. + * @see #getGuard() + * @generated + */ + void setGuard(P value); + +} // Transition diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/TruthValue.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/TruthValue.java new file mode 100644 index 000000000..0f85b3bcc --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/TruthValue.java @@ -0,0 +1,241 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Truth Value', + * and utility methods for working with them. + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#getTruthValue() + * @model + * @generated + */ +public enum TruthValue implements Enumerator { + /** + * The 'TRUE' literal object. + * + * + * @see #TRUE_VALUE + * @generated + * @ordered + */ + TRUE(0, "TRUE", "TRUE"), + + /** + * The 'FALSE' literal object. + * + * + * @see #FALSE_VALUE + * @generated + * @ordered + */ + FALSE(1, "FALSE", "FALSE"), + + /** + * The 'INCONCLUSIVE' literal object. + * + * + * @see #INCONCLUSIVE_VALUE + * @generated + * @ordered + */ + INCONCLUSIVE(2, "INCONCLUSIVE", "INCONCLUSIVE"); + + /** + * The 'TRUE' literal value. + * + *

+ * If the meaning of 'TRUE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #TRUE + * @model + * @generated + * @ordered + */ + public static final int TRUE_VALUE = 0; + + /** + * The 'FALSE' literal value. + * + *

+ * If the meaning of 'FALSE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #FALSE + * @model + * @generated + * @ordered + */ + public static final int FALSE_VALUE = 1; + + /** + * The 'INCONCLUSIVE' literal value. + * + *

+ * If the meaning of 'INCONCLUSIVE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INCONCLUSIVE + * @model + * @generated + * @ordered + */ + public static final int INCONCLUSIVE_VALUE = 2; + + /** + * An array of all the 'Truth Value' enumerators. + * + * + * @generated + */ + private static final TruthValue[] VALUES_ARRAY = + new TruthValue[] { + TRUE, + FALSE, + INCONCLUSIVE, + }; + + /** + * A public read-only list of all the 'Truth Value' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Truth Value' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static TruthValue get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + TruthValue result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Truth Value' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static TruthValue getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + TruthValue result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Truth Value' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static TruthValue get(int value) { + switch (value) { + case TRUE_VALUE: return TRUE; + case FALSE_VALUE: return FALSE; + case INCONCLUSIVE_VALUE: return INCONCLUSIVE; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private TruthValue(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //TruthValue diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterFactoryImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterFactoryImpl.java new file mode 100644 index 000000000..274e181ee --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterFactoryImpl.java @@ -0,0 +1,135 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.gemoc.event.commons.model.arbiter.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ArbiterFactoryImpl extends EFactoryImpl implements ArbiterFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ArbiterFactory init() { + try { + ArbiterFactory theArbiterFactory = (ArbiterFactory)EPackage.Registry.INSTANCE.getEFactory(ArbiterPackage.eNS_URI); + if (theArbiterFactory != null) { + return theArbiterFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ArbiterFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ArbiterFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ArbiterPackage.TRUTH_VALUE: + return createTruthValueFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ArbiterPackage.TRUTH_VALUE: + return convertTruthValueToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public TruthValue createTruthValueFromString(EDataType eDataType, String initialValue) { + TruthValue result = TruthValue.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertTruthValueToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public ArbiterPackage getArbiterPackage() { + return (ArbiterPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ArbiterPackage getPackage() { + return ArbiterPackage.eINSTANCE; + } + +} //ArbiterFactoryImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterImpl.java new file mode 100644 index 000000000..5fb729941 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterImpl.java @@ -0,0 +1,254 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.arbiter.Arbiter; +import org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage; +import org.eclipse.gemoc.event.commons.model.arbiter.State; +import org.eclipse.gemoc.event.commons.model.arbiter.Transition; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * An implementation of the model object 'Arbiter'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterImpl#getStates States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterImpl#getTransitions Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.ArbiterImpl#getInitialState Initial State}
  • + *
+ * + * @generated + */ +public abstract class ArbiterImpl

, T extends Transition> extends MinimalEObjectImpl.Container implements Arbiter { + /** + * The cached value of the '{@link #getStates() States}' containment reference list. + * + * + * @see #getStates() + * @generated + * @ordered + */ + protected EList states; + + /** + * The cached value of the '{@link #getTransitions() Transitions}' containment reference list. + * + * + * @see #getTransitions() + * @generated + * @ordered + */ + protected EList transitions; + + /** + * The cached value of the '{@link #getInitialState() Initial State}' reference. + * + * + * @see #getInitialState() + * @generated + * @ordered + */ + protected S initialState; + + /** + * + * + * @generated + */ + protected ArbiterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ArbiterPackage.Literals.ARBITER; + } + + /** + * + * + * @generated + */ + public EList getStates() { + if (states == null) { + states = new EObjectContainmentEList(State.class, this, ArbiterPackage.ARBITER__STATES); + } + return states; + } + + /** + * + * + * @generated + */ + public EList getTransitions() { + if (transitions == null) { + transitions = new EObjectContainmentEList(Transition.class, this, ArbiterPackage.ARBITER__TRANSITIONS); + } + return transitions; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getInitialState() { + if (initialState != null && initialState.eIsProxy()) { + InternalEObject oldInitialState = (InternalEObject)initialState; + initialState = (S)eResolveProxy(oldInitialState); + if (initialState != oldInitialState) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ArbiterPackage.ARBITER__INITIAL_STATE, oldInitialState, initialState)); + } + } + return initialState; + } + + /** + * + * + * @generated + */ + public S basicGetInitialState() { + return initialState; + } + + /** + * + * + * @generated + */ + public void setInitialState(S newInitialState) { + S oldInitialState = initialState; + initialState = newInitialState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ArbiterPackage.ARBITER__INITIAL_STATE, oldInitialState, initialState)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ArbiterPackage.ARBITER__STATES: + return ((InternalEList)getStates()).basicRemove(otherEnd, msgs); + case ArbiterPackage.ARBITER__TRANSITIONS: + return ((InternalEList)getTransitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ArbiterPackage.ARBITER__STATES: + return getStates(); + case ArbiterPackage.ARBITER__TRANSITIONS: + return getTransitions(); + case ArbiterPackage.ARBITER__INITIAL_STATE: + if (resolve) return getInitialState(); + return basicGetInitialState(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ArbiterPackage.ARBITER__STATES: + getStates().clear(); + getStates().addAll((Collection)newValue); + return; + case ArbiterPackage.ARBITER__TRANSITIONS: + getTransitions().clear(); + getTransitions().addAll((Collection)newValue); + return; + case ArbiterPackage.ARBITER__INITIAL_STATE: + setInitialState((S)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ArbiterPackage.ARBITER__STATES: + getStates().clear(); + return; + case ArbiterPackage.ARBITER__TRANSITIONS: + getTransitions().clear(); + return; + case ArbiterPackage.ARBITER__INITIAL_STATE: + setInitialState((S)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ArbiterPackage.ARBITER__STATES: + return states != null && !states.isEmpty(); + case ArbiterPackage.ARBITER__TRANSITIONS: + return transitions != null && !transitions.isEmpty(); + case ArbiterPackage.ARBITER__INITIAL_STATE: + return initialState != null; + } + return super.eIsSet(featureID); + } + +} //ArbiterImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterPackageImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterPackageImpl.java new file mode 100644 index 000000000..7bb797298 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/ArbiterPackageImpl.java @@ -0,0 +1,387 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.ETypeParameter; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.gemoc.event.commons.model.arbiter.Arbiter; +import org.eclipse.gemoc.event.commons.model.arbiter.ArbiterFactory; +import org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage; +import org.eclipse.gemoc.event.commons.model.arbiter.State; +import org.eclipse.gemoc.event.commons.model.arbiter.Transition; +import org.eclipse.gemoc.event.commons.model.arbiter.TruthValue; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ArbiterPackageImpl extends EPackageImpl implements ArbiterPackage { + /** + * + * + * @generated + */ + private EClass arbiterEClass = null; + + /** + * + * + * @generated + */ + private EClass stateEClass = null; + + /** + * + * + * @generated + */ + private EClass transitionEClass = null; + + /** + * + * + * @generated + */ + private EEnum truthValueEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage#eNS_URI + * @see #init() + * @generated + */ + private ArbiterPackageImpl() { + super(eNS_URI, ArbiterFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ArbiterPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ArbiterPackage init() { + if (isInited) return (ArbiterPackage)EPackage.Registry.INSTANCE.getEPackage(ArbiterPackage.eNS_URI); + + // Obtain or create and register package + ArbiterPackageImpl theArbiterPackage = (ArbiterPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ArbiterPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ArbiterPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theArbiterPackage.createPackageContents(); + + // Initialize created meta-data + theArbiterPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theArbiterPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ArbiterPackage.eNS_URI, theArbiterPackage); + return theArbiterPackage; + } + + /** + * + * + * @generated + */ + public EClass getArbiter() { + return arbiterEClass; + } + + /** + * + * + * @generated + */ + public EReference getArbiter_States() { + return (EReference)arbiterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getArbiter_Transitions() { + return (EReference)arbiterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getArbiter_InitialState() { + return (EReference)arbiterEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getState() { + return stateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getState_TruthValue() { + return (EAttribute)stateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getState_OutgoingTransitions() { + return (EReference)stateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getState_IncomingTransitions() { + return (EReference)stateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getTransition() { + return transitionEClass; + } + + /** + * + * + * @generated + */ + public EReference getTransition_Source() { + return (EReference)transitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getTransition_Target() { + return (EReference)transitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getTransition_Guard() { + return (EReference)transitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EEnum getTruthValue() { + return truthValueEEnum; + } + + /** + * + * + * @generated + */ + public ArbiterFactory getArbiterFactory() { + return (ArbiterFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + arbiterEClass = createEClass(ARBITER); + createEReference(arbiterEClass, ARBITER__STATES); + createEReference(arbiterEClass, ARBITER__TRANSITIONS); + createEReference(arbiterEClass, ARBITER__INITIAL_STATE); + + stateEClass = createEClass(STATE); + createEAttribute(stateEClass, STATE__TRUTH_VALUE); + createEReference(stateEClass, STATE__OUTGOING_TRANSITIONS); + createEReference(stateEClass, STATE__INCOMING_TRANSITIONS); + + transitionEClass = createEClass(TRANSITION); + createEReference(transitionEClass, TRANSITION__SOURCE); + createEReference(transitionEClass, TRANSITION__TARGET); + createEReference(transitionEClass, TRANSITION__GUARD); + + // Create enums + truthValueEEnum = createEEnum(TRUTH_VALUE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + PropertyPackage thePropertyPackage = (PropertyPackage)EPackage.Registry.INSTANCE.getEPackage(PropertyPackage.eNS_URI); + + // Create type parameters + ETypeParameter arbiterEClass_P = addETypeParameter(arbiterEClass, "P"); + ETypeParameter arbiterEClass_S = addETypeParameter(arbiterEClass, "S"); + ETypeParameter arbiterEClass_T = addETypeParameter(arbiterEClass, "T"); + ETypeParameter stateEClass_P = addETypeParameter(stateEClass, "P"); + ETypeParameter stateEClass_T = addETypeParameter(stateEClass, "T"); + ETypeParameter transitionEClass_P = addETypeParameter(transitionEClass, "P"); + ETypeParameter transitionEClass_S = addETypeParameter(transitionEClass, "S"); + + // Set bounds for type parameters + EGenericType g1 = createEGenericType(thePropertyPackage.getProperty()); + arbiterEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getState()); + EGenericType g2 = createEGenericType(arbiterEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(arbiterEClass_T); + g1.getETypeArguments().add(g2); + arbiterEClass_S.getEBounds().add(g1); + g1 = createEGenericType(this.getTransition()); + g2 = createEGenericType(arbiterEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(arbiterEClass_S); + g1.getETypeArguments().add(g2); + arbiterEClass_T.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + stateEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getTransition()); + g2 = createEGenericType(stateEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + stateEClass_T.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + transitionEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getState()); + g2 = createEGenericType(transitionEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + transitionEClass_S.getEBounds().add(g1); + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass(arbiterEClass, Arbiter.class, "Arbiter", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(arbiterEClass_S); + initEReference(getArbiter_States(), g1, null, "states", null, 0, -1, Arbiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(arbiterEClass_T); + initEReference(getArbiter_Transitions(), g1, null, "transitions", null, 0, -1, Arbiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(arbiterEClass_S); + initEReference(getArbiter_InitialState(), g1, null, "initialState", null, 0, 1, Arbiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stateEClass, State.class, "State", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getState_TruthValue(), this.getTruthValue(), "truthValue", null, 1, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(stateEClass_T); + initEReference(getState_OutgoingTransitions(), g1, this.getTransition_Source(), "outgoingTransitions", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(stateEClass_T); + initEReference(getState_IncomingTransitions(), g1, this.getTransition_Target(), "incomingTransitions", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(transitionEClass, Transition.class, "Transition", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(transitionEClass_S); + initEReference(getTransition_Source(), g1, this.getState_OutgoingTransitions(), "source", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(transitionEClass_S); + initEReference(getTransition_Target(), g1, this.getState_IncomingTransitions(), "target", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(transitionEClass_P); + initEReference(getTransition_Guard(), g1, null, "guard", null, 0, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(truthValueEEnum, TruthValue.class, "TruthValue"); + addEEnumLiteral(truthValueEEnum, TruthValue.TRUE); + addEEnumLiteral(truthValueEEnum, TruthValue.FALSE); + addEEnumLiteral(truthValueEEnum, TruthValue.INCONCLUSIVE); + + // Create resource + createResource(eNS_URI); + } + +} //ArbiterPackageImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/StateImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/StateImpl.java new file mode 100644 index 000000000..0803a5e2f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/StateImpl.java @@ -0,0 +1,278 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage; +import org.eclipse.gemoc.event.commons.model.arbiter.State; +import org.eclipse.gemoc.event.commons.model.arbiter.Transition; +import org.eclipse.gemoc.event.commons.model.arbiter.TruthValue; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * An implementation of the model object 'State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.StateImpl#getTruthValue Truth Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.StateImpl#getOutgoingTransitions Outgoing Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.StateImpl#getIncomingTransitions Incoming Transitions}
  • + *
+ * + * @generated + */ +public abstract class StateImpl

> extends MinimalEObjectImpl.Container implements State { + /** + * The default value of the '{@link #getTruthValue() Truth Value}' attribute. + * + * + * @see #getTruthValue() + * @generated + * @ordered + */ + protected static final TruthValue TRUTH_VALUE_EDEFAULT = TruthValue.TRUE; + + /** + * The cached value of the '{@link #getTruthValue() Truth Value}' attribute. + * + * + * @see #getTruthValue() + * @generated + * @ordered + */ + protected TruthValue truthValue = TRUTH_VALUE_EDEFAULT; + + /** + * The cached value of the '{@link #getOutgoingTransitions() Outgoing Transitions}' reference list. + * + * + * @see #getOutgoingTransitions() + * @generated + * @ordered + */ + protected EList outgoingTransitions; + + /** + * The cached value of the '{@link #getIncomingTransitions() Incoming Transitions}' reference list. + * + * + * @see #getIncomingTransitions() + * @generated + * @ordered + */ + protected EList incomingTransitions; + + /** + * + * + * @generated + */ + protected StateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ArbiterPackage.Literals.STATE; + } + + /** + * + * + * @generated + */ + public TruthValue getTruthValue() { + return truthValue; + } + + /** + * + * + * @generated + */ + public void setTruthValue(TruthValue newTruthValue) { + TruthValue oldTruthValue = truthValue; + truthValue = newTruthValue == null ? TRUTH_VALUE_EDEFAULT : newTruthValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ArbiterPackage.STATE__TRUTH_VALUE, oldTruthValue, truthValue)); + } + + /** + * + * + * @generated + */ + public EList getOutgoingTransitions() { + if (outgoingTransitions == null) { + outgoingTransitions = new EObjectWithInverseResolvingEList(Transition.class, this, ArbiterPackage.STATE__OUTGOING_TRANSITIONS, ArbiterPackage.TRANSITION__SOURCE); + } + return outgoingTransitions; + } + + /** + * + * + * @generated + */ + public EList getIncomingTransitions() { + if (incomingTransitions == null) { + incomingTransitions = new EObjectWithInverseResolvingEList(Transition.class, this, ArbiterPackage.STATE__INCOMING_TRANSITIONS, ArbiterPackage.TRANSITION__TARGET); + } + return incomingTransitions; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ArbiterPackage.STATE__OUTGOING_TRANSITIONS: + return ((InternalEList)(InternalEList)getOutgoingTransitions()).basicAdd(otherEnd, msgs); + case ArbiterPackage.STATE__INCOMING_TRANSITIONS: + return ((InternalEList)(InternalEList)getIncomingTransitions()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ArbiterPackage.STATE__OUTGOING_TRANSITIONS: + return ((InternalEList)getOutgoingTransitions()).basicRemove(otherEnd, msgs); + case ArbiterPackage.STATE__INCOMING_TRANSITIONS: + return ((InternalEList)getIncomingTransitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ArbiterPackage.STATE__TRUTH_VALUE: + return getTruthValue(); + case ArbiterPackage.STATE__OUTGOING_TRANSITIONS: + return getOutgoingTransitions(); + case ArbiterPackage.STATE__INCOMING_TRANSITIONS: + return getIncomingTransitions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ArbiterPackage.STATE__TRUTH_VALUE: + setTruthValue((TruthValue)newValue); + return; + case ArbiterPackage.STATE__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + getOutgoingTransitions().addAll((Collection)newValue); + return; + case ArbiterPackage.STATE__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + getIncomingTransitions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ArbiterPackage.STATE__TRUTH_VALUE: + setTruthValue(TRUTH_VALUE_EDEFAULT); + return; + case ArbiterPackage.STATE__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + return; + case ArbiterPackage.STATE__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ArbiterPackage.STATE__TRUTH_VALUE: + return truthValue != TRUTH_VALUE_EDEFAULT; + case ArbiterPackage.STATE__OUTGOING_TRANSITIONS: + return outgoingTransitions != null && !outgoingTransitions.isEmpty(); + case ArbiterPackage.STATE__INCOMING_TRANSITIONS: + return incomingTransitions != null && !incomingTransitions.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (truthValue: "); + result.append(truthValue); + result.append(')'); + return result.toString(); + } + +} //StateImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/TransitionImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/TransitionImpl.java new file mode 100644 index 000000000..32379622e --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/impl/TransitionImpl.java @@ -0,0 +1,370 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage; +import org.eclipse.gemoc.event.commons.model.arbiter.State; +import org.eclipse.gemoc.event.commons.model.arbiter.Transition; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * An implementation of the model object 'Transition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.TransitionImpl#getSource Source}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.TransitionImpl#getTarget Target}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.arbiter.impl.TransitionImpl#getGuard Guard}
  • + *
+ * + * @generated + */ +public abstract class TransitionImpl

> extends MinimalEObjectImpl.Container implements Transition { + /** + * The cached value of the '{@link #getSource() Source}' reference. + * + * + * @see #getSource() + * @generated + * @ordered + */ + protected S source; + + /** + * The cached value of the '{@link #getTarget() Target}' reference. + * + * + * @see #getTarget() + * @generated + * @ordered + */ + protected S target; + + /** + * The cached value of the '{@link #getGuard() Guard}' containment reference. + * + * + * @see #getGuard() + * @generated + * @ordered + */ + protected P guard; + + /** + * + * + * @generated + */ + protected TransitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ArbiterPackage.Literals.TRANSITION; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getSource() { + if (source != null && source.eIsProxy()) { + InternalEObject oldSource = (InternalEObject)source; + source = (S)eResolveProxy(oldSource); + if (source != oldSource) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ArbiterPackage.TRANSITION__SOURCE, oldSource, source)); + } + } + return source; + } + + /** + * + * + * @generated + */ + public S basicGetSource() { + return source; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSource(S newSource, NotificationChain msgs) { + S oldSource = source; + source = newSource; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArbiterPackage.TRANSITION__SOURCE, oldSource, newSource); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSource(S newSource) { + if (newSource != source) { + NotificationChain msgs = null; + if (source != null) + msgs = ((InternalEObject)source).eInverseRemove(this, ArbiterPackage.STATE__OUTGOING_TRANSITIONS, State.class, msgs); + if (newSource != null) + msgs = ((InternalEObject)newSource).eInverseAdd(this, ArbiterPackage.STATE__OUTGOING_TRANSITIONS, State.class, msgs); + msgs = basicSetSource(newSource, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ArbiterPackage.TRANSITION__SOURCE, newSource, newSource)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getTarget() { + if (target != null && target.eIsProxy()) { + InternalEObject oldTarget = (InternalEObject)target; + target = (S)eResolveProxy(oldTarget); + if (target != oldTarget) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ArbiterPackage.TRANSITION__TARGET, oldTarget, target)); + } + } + return target; + } + + /** + * + * + * @generated + */ + public S basicGetTarget() { + return target; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTarget(S newTarget, NotificationChain msgs) { + S oldTarget = target; + target = newTarget; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArbiterPackage.TRANSITION__TARGET, oldTarget, newTarget); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTarget(S newTarget) { + if (newTarget != target) { + NotificationChain msgs = null; + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, ArbiterPackage.STATE__INCOMING_TRANSITIONS, State.class, msgs); + if (newTarget != null) + msgs = ((InternalEObject)newTarget).eInverseAdd(this, ArbiterPackage.STATE__INCOMING_TRANSITIONS, State.class, msgs); + msgs = basicSetTarget(newTarget, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ArbiterPackage.TRANSITION__TARGET, newTarget, newTarget)); + } + + /** + * + * + * @generated + */ + public P getGuard() { + return guard; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetGuard(P newGuard, NotificationChain msgs) { + P oldGuard = guard; + guard = newGuard; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArbiterPackage.TRANSITION__GUARD, oldGuard, newGuard); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setGuard(P newGuard) { + if (newGuard != guard) { + NotificationChain msgs = null; + if (guard != null) + msgs = ((InternalEObject)guard).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArbiterPackage.TRANSITION__GUARD, null, msgs); + if (newGuard != null) + msgs = ((InternalEObject)newGuard).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArbiterPackage.TRANSITION__GUARD, null, msgs); + msgs = basicSetGuard(newGuard, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ArbiterPackage.TRANSITION__GUARD, newGuard, newGuard)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ArbiterPackage.TRANSITION__SOURCE: + if (source != null) + msgs = ((InternalEObject)source).eInverseRemove(this, ArbiterPackage.STATE__OUTGOING_TRANSITIONS, State.class, msgs); + return basicSetSource((S)otherEnd, msgs); + case ArbiterPackage.TRANSITION__TARGET: + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, ArbiterPackage.STATE__INCOMING_TRANSITIONS, State.class, msgs); + return basicSetTarget((S)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ArbiterPackage.TRANSITION__SOURCE: + return basicSetSource(null, msgs); + case ArbiterPackage.TRANSITION__TARGET: + return basicSetTarget(null, msgs); + case ArbiterPackage.TRANSITION__GUARD: + return basicSetGuard(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ArbiterPackage.TRANSITION__SOURCE: + if (resolve) return getSource(); + return basicGetSource(); + case ArbiterPackage.TRANSITION__TARGET: + if (resolve) return getTarget(); + return basicGetTarget(); + case ArbiterPackage.TRANSITION__GUARD: + return getGuard(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ArbiterPackage.TRANSITION__SOURCE: + setSource((S)newValue); + return; + case ArbiterPackage.TRANSITION__TARGET: + setTarget((S)newValue); + return; + case ArbiterPackage.TRANSITION__GUARD: + setGuard((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ArbiterPackage.TRANSITION__SOURCE: + setSource((S)null); + return; + case ArbiterPackage.TRANSITION__TARGET: + setTarget((S)null); + return; + case ArbiterPackage.TRANSITION__GUARD: + setGuard((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ArbiterPackage.TRANSITION__SOURCE: + return source != null; + case ArbiterPackage.TRANSITION__TARGET: + return target != null; + case ArbiterPackage.TRANSITION__GUARD: + return guard != null; + } + return super.eIsSet(featureID); + } + +} //TransitionImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/util/ArbiterAdapterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/util/ArbiterAdapterFactory.java new file mode 100644 index 000000000..20d5e889a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/util/ArbiterAdapterFactory.java @@ -0,0 +1,158 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.arbiter.*; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage + * @generated + */ +public class ArbiterAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ArbiterPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ArbiterAdapterFactory() { + if (modelPackage == null) { + modelPackage = ArbiterPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ArbiterSwitch modelSwitch = + new ArbiterSwitch() { + @Override + public

, T extends Transition> Adapter caseArbiter(Arbiter object) { + return createArbiterAdapter(); + } + @Override + public

> Adapter caseState(State object) { + return createStateAdapter(); + } + @Override + public

> Adapter caseTransition(Transition object) { + return createTransitionAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.arbiter.Arbiter Arbiter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Arbiter + * @generated + */ + public Adapter createArbiterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.arbiter.State State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.arbiter.State + * @generated + */ + public Adapter createStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.arbiter.Transition Transition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.arbiter.Transition + * @generated + */ + public Adapter createTransitionAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ArbiterAdapterFactory diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/util/ArbiterSwitch.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/util/ArbiterSwitch.java new file mode 100644 index 000000000..7e6443e91 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/arbiter/util/ArbiterSwitch.java @@ -0,0 +1,154 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.arbiter.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.gemoc.event.commons.model.arbiter.*; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.gemoc.event.commons.model.arbiter.ArbiterPackage + * @generated + */ +public class ArbiterSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ArbiterPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ArbiterSwitch() { + if (modelPackage == null) { + modelPackage = ArbiterPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T1 doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ArbiterPackage.ARBITER: { + Arbiter arbiter = (Arbiter)theEObject; + T1 result = caseArbiter(arbiter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ArbiterPackage.STATE: { + State state = (State)theEObject; + T1 result = caseState(state); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ArbiterPackage.TRANSITION: { + Transition transition = (Transition)theEObject; + T1 result = caseTransition(transition); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Arbiter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Arbiter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

, T extends Transition> T1 caseArbiter(Arbiter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

> T1 caseState(State object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Transition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Transition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

> T1 caseTransition(Transition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T1 defaultCase(EObject object) { + return null; + } + +} //ArbiterSwitch diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/AbstractProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/AbstractProperty.java new file mode 100644 index 000000000..3ca9a2652 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/AbstractProperty.java @@ -0,0 +1,18 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Abstract Property'. + * + * + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getAbstractProperty() + * @model + * @generated + */ +public interface AbstractProperty extends EObject { +} // AbstractProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BinaryProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BinaryProperty.java new file mode 100644 index 000000000..45cb188c7 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BinaryProperty.java @@ -0,0 +1,106 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Binary Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getOperator Operator}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getLeft Left}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getRight Right}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getBinaryProperty() + * @model abstract="true" + * @generated + */ +public interface BinaryProperty

, T> extends StateProperty { + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.BooleanOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanOperator + * @see #setOperator(BooleanOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getBinaryProperty_Operator() + * @model required="true" + * @generated + */ + BooleanOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanOperator + * @see #getOperator() + * @generated + */ + void setOperator(BooleanOperator value); + + /** + * Returns the value of the 'Left' containment reference. + * + *

+ * If the meaning of the 'Left' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Left' containment reference. + * @see #setLeft(StateProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getBinaryProperty_Left() + * @model containment="true" required="true" + * @generated + */ + P getLeft(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getLeft Left}' containment reference. + * + * + * @param value the new value of the 'Left' containment reference. + * @see #getLeft() + * @generated + */ + void setLeft(P value); + + /** + * Returns the value of the 'Right' containment reference. + * + *

+ * If the meaning of the 'Right' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Right' containment reference. + * @see #setRight(StateProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getBinaryProperty_Right() + * @model containment="true" required="true" + * @generated + */ + P getRight(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getRight Right}' containment reference. + * + * + * @param value the new value of the 'Right' containment reference. + * @see #getRight() + * @generated + */ + void setRight(P value); + +} // BinaryProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BooleanAttributeProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BooleanAttributeProperty.java new file mode 100644 index 000000000..a9cae3624 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BooleanAttributeProperty.java @@ -0,0 +1,79 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Boolean Attribute Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty#isValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty#getOperator Operator}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getBooleanAttributeProperty() + * @model abstract="true" + * @generated + */ +public interface BooleanAttributeProperty extends StateProperty { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(boolean) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getBooleanAttributeProperty_Value() + * @model + * @generated + */ + boolean isValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty#isValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #isValue() + * @generated + */ + void setValue(boolean value); + + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #setOperator(ComparisonOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getBooleanAttributeProperty_Operator() + * @model + * @generated + */ + ComparisonOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #getOperator() + * @generated + */ + void setOperator(ComparisonOperator value); + +} // BooleanAttributeProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BooleanOperator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BooleanOperator.java new file mode 100644 index 000000000..0c0645ce8 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/BooleanOperator.java @@ -0,0 +1,241 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Boolean Operator', + * and utility methods for working with them. + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getBooleanOperator() + * @model + * @generated + */ +public enum BooleanOperator implements Enumerator { + /** + * The 'AND' literal object. + * + * + * @see #AND_VALUE + * @generated + * @ordered + */ + AND(0, "AND", "AND"), + + /** + * The 'OR' literal object. + * + * + * @see #OR_VALUE + * @generated + * @ordered + */ + OR(1, "OR", "OR"), + + /** + * The 'IMPLIES' literal object. + * + * + * @see #IMPLIES_VALUE + * @generated + * @ordered + */ + IMPLIES(2, "IMPLIES", "IMPLIES"); + + /** + * The 'AND' literal value. + * + *

+ * If the meaning of 'AND' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #AND + * @model + * @generated + * @ordered + */ + public static final int AND_VALUE = 0; + + /** + * The 'OR' literal value. + * + *

+ * If the meaning of 'OR' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #OR + * @model + * @generated + * @ordered + */ + public static final int OR_VALUE = 1; + + /** + * The 'IMPLIES' literal value. + * + *

+ * If the meaning of 'IMPLIES' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #IMPLIES + * @model + * @generated + * @ordered + */ + public static final int IMPLIES_VALUE = 2; + + /** + * An array of all the 'Boolean Operator' enumerators. + * + * + * @generated + */ + private static final BooleanOperator[] VALUES_ARRAY = + new BooleanOperator[] { + AND, + OR, + IMPLIES, + }; + + /** + * A public read-only list of all the 'Boolean Operator' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Boolean Operator' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static BooleanOperator get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + BooleanOperator result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Boolean Operator' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static BooleanOperator getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + BooleanOperator result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Boolean Operator' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static BooleanOperator get(int value) { + switch (value) { + case AND_VALUE: return AND; + case OR_VALUE: return OR; + case IMPLIES_VALUE: return IMPLIES; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private BooleanOperator(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //BooleanOperator diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ComparisonOperator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ComparisonOperator.java new file mode 100644 index 000000000..20be6e40d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ComparisonOperator.java @@ -0,0 +1,187 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Comparison Operator', + * and utility methods for working with them. + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getComparisonOperator() + * @model + * @generated + */ +public enum ComparisonOperator implements Enumerator { + /** + * The 'EQUAL' literal object. + * + * + * @see #EQUAL_VALUE + * @generated + * @ordered + */ + EQUAL(0, "EQUAL", "EQUAL"); + + /** + * The 'EQUAL' literal value. + * + *

+ * If the meaning of 'EQUAL' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #EQUAL + * @model + * @generated + * @ordered + */ + public static final int EQUAL_VALUE = 0; + + /** + * An array of all the 'Comparison Operator' enumerators. + * + * + * @generated + */ + private static final ComparisonOperator[] VALUES_ARRAY = + new ComparisonOperator[] { + EQUAL, + }; + + /** + * A public read-only list of all the 'Comparison Operator' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Comparison Operator' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static ComparisonOperator get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ComparisonOperator result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Comparison Operator' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static ComparisonOperator getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ComparisonOperator result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Comparison Operator' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static ComparisonOperator get(int value) { + switch (value) { + case EQUAL_VALUE: return EQUAL; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private ComparisonOperator(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //ComparisonOperator diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/CompositeProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/CompositeProperty.java new file mode 100644 index 000000000..841237573 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/CompositeProperty.java @@ -0,0 +1,69 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Composite Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty#getProperties Properties}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty#getOperator Operator}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getCompositeProperty() + * @model + * @generated + */ +public interface CompositeProperty

extends Property { + /** + * Returns the value of the 'Properties' containment reference list. + * + *

+ * If the meaning of the 'Properties' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Properties' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getCompositeProperty_Properties() + * @model containment="true" + * @generated + */ + EList

getProperties(); + + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.BooleanOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanOperator + * @see #setOperator(BooleanOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getCompositeProperty_Operator() + * @model required="true" + * @generated + */ + BooleanOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanOperator + * @see #getOperator() + * @generated + */ + void setOperator(BooleanOperator value); + +} // CompositeProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ContainerReferenceProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ContainerReferenceProperty.java new file mode 100644 index 000000000..77da0b43e --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ContainerReferenceProperty.java @@ -0,0 +1,49 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Container Reference Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty#getProperty Property}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getContainerReferenceProperty() + * @model + * @generated + */ +public interface ContainerReferenceProperty

, T> extends StateProperty { + /** + * Returns the value of the 'Property' containment reference. + * + *

+ * If the meaning of the 'Property' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Property' containment reference. + * @see #setProperty(StateProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getContainerReferenceProperty_Property() + * @model containment="true" + * @generated + */ + P getProperty(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty#getProperty Property}' containment reference. + * + * + * @param value the new value of the 'Property' containment reference. + * @see #getProperty() + * @generated + */ + void setProperty(P value); + +} // ContainerReferenceProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/EnumAttributeProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/EnumAttributeProperty.java new file mode 100644 index 000000000..e6514d7b1 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/EnumAttributeProperty.java @@ -0,0 +1,80 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import org.eclipse.emf.ecore.EEnumLiteral; + +/** + * + * A representation of the model object 'Enum Attribute Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.EnumAttributeProperty#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.EnumAttributeProperty#getOperator Operator}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getEnumAttributeProperty() + * @model abstract="true" + * @generated + */ +public interface EnumAttributeProperty extends StateProperty { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(EEnumLiteral) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getEnumAttributeProperty_Value() + * @model + * @generated + */ + E getValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.EnumAttributeProperty#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(E value); + + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #setOperator(ComparisonOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getEnumAttributeProperty_Operator() + * @model + * @generated + */ + ComparisonOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.EnumAttributeProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #getOperator() + * @generated + */ + void setOperator(ComparisonOperator value); + +} // EnumAttributeProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/EventPrecondition.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/EventPrecondition.java new file mode 100644 index 000000000..456f1a94e --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/EventPrecondition.java @@ -0,0 +1,50 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +/** + * + * A representation of the model object 'Event Precondition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.EventPrecondition#getEvent Event}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getEventPrecondition() + * @model + * @generated + */ +public interface EventPrecondition extends Property { + /** + * Returns the value of the 'Event' reference. + * + *

+ * If the meaning of the 'Event' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Event' reference. + * @see #setEvent(Event) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getEventPrecondition_Event() + * @model + * @generated + */ + E getEvent(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.EventPrecondition#getEvent Event}' reference. + * + * + * @param value the new value of the 'Event' reference. + * @see #getEvent() + * @generated + */ + void setEvent(E value); + +} // EventPrecondition diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/IntegerAttributeProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/IntegerAttributeProperty.java new file mode 100644 index 000000000..7782e3c90 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/IntegerAttributeProperty.java @@ -0,0 +1,79 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Integer Attribute Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty#getOperator Operator}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getIntegerAttributeProperty() + * @model abstract="true" + * @generated + */ +public interface IntegerAttributeProperty extends StateProperty { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getIntegerAttributeProperty_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #setOperator(ComparisonOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getIntegerAttributeProperty_Operator() + * @model + * @generated + */ + ComparisonOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #getOperator() + * @generated + */ + void setOperator(ComparisonOperator value); + +} // IntegerAttributeProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyBooleanAttributeProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyBooleanAttributeProperty.java new file mode 100644 index 000000000..b27b39b81 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyBooleanAttributeProperty.java @@ -0,0 +1,109 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Many Boolean Attribute Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#getQuantifier Quantifier}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#isValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#getOperator Operator}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyBooleanAttributeProperty() + * @model + * @generated + */ +public interface ManyBooleanAttributeProperty extends StateProperty { + /** + * Returns the value of the 'Quantifier' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.Quantifier}. + * + *

+ * If the meaning of the 'Quantifier' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Quantifier' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see #setQuantifier(Quantifier) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyBooleanAttributeProperty_Quantifier() + * @model + * @generated + */ + Quantifier getQuantifier(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#getQuantifier Quantifier}' attribute. + * + * + * @param value the new value of the 'Quantifier' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see #getQuantifier() + * @generated + */ + void setQuantifier(Quantifier value); + + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(boolean) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyBooleanAttributeProperty_Value() + * @model + * @generated + */ + boolean isValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#isValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #isValue() + * @generated + */ + void setValue(boolean value); + + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #setOperator(ComparisonOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyBooleanAttributeProperty_Operator() + * @model + * @generated + */ + ComparisonOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #getOperator() + * @generated + */ + void setOperator(ComparisonOperator value); + +} // ManyBooleanAttributeProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyIntegerAttributeProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyIntegerAttributeProperty.java new file mode 100644 index 000000000..b528fec07 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyIntegerAttributeProperty.java @@ -0,0 +1,109 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Many Integer Attribute Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getQuantifier Quantifier}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getOperator Operator}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyIntegerAttributeProperty() + * @model + * @generated + */ +public interface ManyIntegerAttributeProperty extends StateProperty { + /** + * Returns the value of the 'Quantifier' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.Quantifier}. + * + *

+ * If the meaning of the 'Quantifier' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Quantifier' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see #setQuantifier(Quantifier) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyIntegerAttributeProperty_Quantifier() + * @model + * @generated + */ + Quantifier getQuantifier(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getQuantifier Quantifier}' attribute. + * + * + * @param value the new value of the 'Quantifier' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see #getQuantifier() + * @generated + */ + void setQuantifier(Quantifier value); + + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyIntegerAttributeProperty_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #setOperator(ComparisonOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyIntegerAttributeProperty_Operator() + * @model + * @generated + */ + ComparisonOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #getOperator() + * @generated + */ + void setOperator(ComparisonOperator value); + +} // ManyIntegerAttributeProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyReferenceProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyReferenceProperty.java new file mode 100644 index 000000000..25675e2bf --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyReferenceProperty.java @@ -0,0 +1,79 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Many Reference Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty#getProperty Property}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty#getQuantifier Quantifier}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyReferenceProperty() + * @model abstract="true" + * @generated + */ +public interface ManyReferenceProperty

, T> extends StateProperty { + /** + * Returns the value of the 'Property' containment reference. + * + *

+ * If the meaning of the 'Property' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Property' containment reference. + * @see #setProperty(StateProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyReferenceProperty_Property() + * @model containment="true" required="true" + * @generated + */ + P getProperty(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty#getProperty Property}' containment reference. + * + * + * @param value the new value of the 'Property' containment reference. + * @see #getProperty() + * @generated + */ + void setProperty(P value); + + /** + * Returns the value of the 'Quantifier' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.Quantifier}. + * + *

+ * If the meaning of the 'Quantifier' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Quantifier' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see #setQuantifier(Quantifier) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyReferenceProperty_Quantifier() + * @model + * @generated + */ + Quantifier getQuantifier(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty#getQuantifier Quantifier}' attribute. + * + * + * @param value the new value of the 'Quantifier' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see #getQuantifier() + * @generated + */ + void setQuantifier(Quantifier value); + +} // ManyReferenceProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyStringAttributeProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyStringAttributeProperty.java new file mode 100644 index 000000000..4113dbf2c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ManyStringAttributeProperty.java @@ -0,0 +1,109 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Many String Attribute Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getQuantifier Quantifier}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getOperator Operator}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyStringAttributeProperty() + * @model + * @generated + */ +public interface ManyStringAttributeProperty extends StateProperty { + /** + * Returns the value of the 'Quantifier' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.Quantifier}. + * + *

+ * If the meaning of the 'Quantifier' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Quantifier' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see #setQuantifier(Quantifier) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyStringAttributeProperty_Quantifier() + * @model + * @generated + */ + Quantifier getQuantifier(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getQuantifier Quantifier}' attribute. + * + * + * @param value the new value of the 'Quantifier' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see #getQuantifier() + * @generated + */ + void setQuantifier(Quantifier value); + + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyStringAttributeProperty_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #setOperator(ComparisonOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getManyStringAttributeProperty_Operator() + * @model + * @generated + */ + ComparisonOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #getOperator() + * @generated + */ + void setOperator(ComparisonOperator value); + +} // ManyStringAttributeProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/NegationTemporalProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/NegationTemporalProperty.java new file mode 100644 index 000000000..2e4b24e6b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/NegationTemporalProperty.java @@ -0,0 +1,49 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Negation Temporal Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty#getFormula Formula}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getNegationTemporalProperty() + * @model abstract="true" + * @generated + */ +public interface NegationTemporalProperty

extends TemporalProperty { + /** + * Returns the value of the 'Formula' containment reference. + * + *

+ * If the meaning of the 'Formula' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Formula' containment reference. + * @see #setFormula(TemporalProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getNegationTemporalProperty_Formula() + * @model containment="true" + * @generated + */ + P getFormula(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty#getFormula Formula}' containment reference. + * + * + * @param value the new value of the 'Formula' containment reference. + * @see #getFormula() + * @generated + */ + void setFormula(P value); + +} // NegationTemporalProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/NextProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/NextProperty.java new file mode 100644 index 000000000..d72b0fc4e --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/NextProperty.java @@ -0,0 +1,49 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Next Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.NextProperty#getFormula Formula}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getNextProperty() + * @model abstract="true" + * @generated + */ +public interface NextProperty

extends TemporalProperty { + /** + * Returns the value of the 'Formula' containment reference. + * + *

+ * If the meaning of the 'Formula' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Formula' containment reference. + * @see #setFormula(AbstractProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getNextProperty_Formula() + * @model containment="true" + * @generated + */ + P getFormula(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.NextProperty#getFormula Formula}' containment reference. + * + * + * @param value the new value of the 'Formula' containment reference. + * @see #getFormula() + * @generated + */ + void setFormula(P value); + +} // NextProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Property.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Property.java new file mode 100644 index 000000000..aa214585e --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Property.java @@ -0,0 +1,17 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Property'. + * + * + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getProperty() + * @model abstract="true" + * @generated + */ +public interface Property extends AbstractProperty { +} // Property diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyFactory.java new file mode 100644 index 000000000..e182e3664 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyFactory.java @@ -0,0 +1,107 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import org.eclipse.emf.ecore.EFactory; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage + * @generated + */ +public interface PropertyFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + PropertyFactory eINSTANCE = org.eclipse.gemoc.event.commons.model.property.impl.PropertyFactoryImpl.init(); + + /** + * Returns a new object of class 'Abstract Property'. + * + * + * @return a new object of class 'Abstract Property'. + * @generated + */ + AbstractProperty createAbstractProperty(); + + /** + * Returns a new object of class 'Reference'. + * + * + * @return a new object of class 'Reference'. + * @generated + */ +

PropertyReference

createPropertyReference(); + + /** + * Returns a new object of class 'Composite Property'. + * + * + * @return a new object of class 'Composite Property'. + * @generated + */ +

CompositeProperty

createCompositeProperty(); + + /** + * Returns a new object of class 'Event Precondition'. + * + * + * @return a new object of class 'Event Precondition'. + * @generated + */ + EventPrecondition createEventPrecondition(); + + /** + * Returns a new object of class 'Container Reference Property'. + * + * + * @return a new object of class 'Container Reference Property'. + * @generated + */ +

, T> ContainerReferenceProperty createContainerReferenceProperty(); + + /** + * Returns a new object of class 'Many Boolean Attribute Property'. + * + * + * @return a new object of class 'Many Boolean Attribute Property'. + * @generated + */ + ManyBooleanAttributeProperty createManyBooleanAttributeProperty(); + + /** + * Returns a new object of class 'Many Integer Attribute Property'. + * + * + * @return a new object of class 'Many Integer Attribute Property'. + * @generated + */ + ManyIntegerAttributeProperty createManyIntegerAttributeProperty(); + + /** + * Returns a new object of class 'Many String Attribute Property'. + * + * + * @return a new object of class 'Many String Attribute Property'. + * @generated + */ + ManyStringAttributeProperty createManyStringAttributeProperty(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + PropertyPackage getPropertyPackage(); + +} //PropertyFactory diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyPackage.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyPackage.java new file mode 100644 index 000000000..3d17d1668 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyPackage.java @@ -0,0 +1,2629 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *

    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyFactory + * @model kind="package" + * @generated + */ +public interface PropertyPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "property"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.gemoc.org/property"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "property"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + PropertyPackage eINSTANCE = org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.AbstractPropertyImpl Abstract Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.AbstractPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getAbstractProperty() + * @generated + */ + int ABSTRACT_PROPERTY = 0; + + /** + * The number of structural features of the 'Abstract Property' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_PROPERTY_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Abstract Property' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_PROPERTY_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.TemporalPropertyImpl Temporal Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.TemporalPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getTemporalProperty() + * @generated + */ + int TEMPORAL_PROPERTY = 1; + + /** + * The number of structural features of the 'Temporal Property' class. + * + * + * @generated + * @ordered + */ + int TEMPORAL_PROPERTY_FEATURE_COUNT = ABSTRACT_PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Temporal Property' class. + * + * + * @generated + * @ordered + */ + int TEMPORAL_PROPERTY_OPERATION_COUNT = ABSTRACT_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.NextPropertyImpl Next Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.NextPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getNextProperty() + * @generated + */ + int NEXT_PROPERTY = 2; + + /** + * The feature id for the 'Formula' containment reference. + * + * + * @generated + * @ordered + */ + int NEXT_PROPERTY__FORMULA = TEMPORAL_PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Next Property' class. + * + * + * @generated + * @ordered + */ + int NEXT_PROPERTY_FEATURE_COUNT = TEMPORAL_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Next Property' class. + * + * + * @generated + * @ordered + */ + int NEXT_PROPERTY_OPERATION_COUNT = TEMPORAL_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.UntilPropertyImpl Until Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.UntilPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getUntilProperty() + * @generated + */ + int UNTIL_PROPERTY = 3; + + /** + * The feature id for the 'Left Formula' containment reference. + * + * + * @generated + * @ordered + */ + int UNTIL_PROPERTY__LEFT_FORMULA = TEMPORAL_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Right Formula' containment reference. + * + * + * @generated + * @ordered + */ + int UNTIL_PROPERTY__RIGHT_FORMULA = TEMPORAL_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Until Property' class. + * + * + * @generated + * @ordered + */ + int UNTIL_PROPERTY_FEATURE_COUNT = TEMPORAL_PROPERTY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Until Property' class. + * + * + * @generated + * @ordered + */ + int UNTIL_PROPERTY_OPERATION_COUNT = TEMPORAL_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ReleasePropertyImpl Release Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ReleasePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getReleaseProperty() + * @generated + */ + int RELEASE_PROPERTY = 4; + + /** + * The feature id for the 'Left Formula' containment reference. + * + * + * @generated + * @ordered + */ + int RELEASE_PROPERTY__LEFT_FORMULA = TEMPORAL_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Right Formula' containment reference. + * + * + * @generated + * @ordered + */ + int RELEASE_PROPERTY__RIGHT_FORMULA = TEMPORAL_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Release Property' class. + * + * + * @generated + * @ordered + */ + int RELEASE_PROPERTY_FEATURE_COUNT = TEMPORAL_PROPERTY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Release Property' class. + * + * + * @generated + * @ordered + */ + int RELEASE_PROPERTY_OPERATION_COUNT = TEMPORAL_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.NegationTemporalPropertyImpl Negation Temporal Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.NegationTemporalPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getNegationTemporalProperty() + * @generated + */ + int NEGATION_TEMPORAL_PROPERTY = 5; + + /** + * The feature id for the 'Formula' containment reference. + * + * + * @generated + * @ordered + */ + int NEGATION_TEMPORAL_PROPERTY__FORMULA = TEMPORAL_PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Negation Temporal Property' class. + * + * + * @generated + * @ordered + */ + int NEGATION_TEMPORAL_PROPERTY_FEATURE_COUNT = TEMPORAL_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Negation Temporal Property' class. + * + * + * @generated + * @ordered + */ + int NEGATION_TEMPORAL_PROPERTY_OPERATION_COUNT = TEMPORAL_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.PropertyImpl Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getProperty() + * @generated + */ + int PROPERTY = 6; + + /** + * The number of structural features of the 'Property' class. + * + * + * @generated + * @ordered + */ + int PROPERTY_FEATURE_COUNT = ABSTRACT_PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Property' class. + * + * + * @generated + * @ordered + */ + int PROPERTY_OPERATION_COUNT = ABSTRACT_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.PropertyReferenceImpl Reference}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyReferenceImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getPropertyReference() + * @generated + */ + int PROPERTY_REFERENCE = 7; + + /** + * The feature id for the 'Referenced Property' reference. + * + * + * @generated + * @ordered + */ + int PROPERTY_REFERENCE__REFERENCED_PROPERTY = PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Reference' class. + * + * + * @generated + * @ordered + */ + int PROPERTY_REFERENCE_FEATURE_COUNT = PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Reference' class. + * + * + * @generated + * @ordered + */ + int PROPERTY_REFERENCE_OPERATION_COUNT = PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.CompositePropertyImpl Composite Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.CompositePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getCompositeProperty() + * @generated + */ + int COMPOSITE_PROPERTY = 8; + + /** + * The feature id for the 'Properties' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPOSITE_PROPERTY__PROPERTIES = PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int COMPOSITE_PROPERTY__OPERATOR = PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Composite Property' class. + * + * + * @generated + * @ordered + */ + int COMPOSITE_PROPERTY_FEATURE_COUNT = PROPERTY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Composite Property' class. + * + * + * @generated + * @ordered + */ + int COMPOSITE_PROPERTY_OPERATION_COUNT = PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.EventPreconditionImpl Event Precondition}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.EventPreconditionImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getEventPrecondition() + * @generated + */ + int EVENT_PRECONDITION = 9; + + /** + * The feature id for the 'Event' reference. + * + * + * @generated + * @ordered + */ + int EVENT_PRECONDITION__EVENT = PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Event Precondition' class. + * + * + * @generated + * @ordered + */ + int EVENT_PRECONDITION_FEATURE_COUNT = PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Event Precondition' class. + * + * + * @generated + * @ordered + */ + int EVENT_PRECONDITION_OPERATION_COUNT = PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.StepPropertyImpl Step Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.StepPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getStepProperty() + * @generated + */ + int STEP_PROPERTY = 10; + + /** + * The feature id for the 'Stepping' attribute. + * + * + * @generated + * @ordered + */ + int STEP_PROPERTY__STEPPING = PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Target Provider' containment reference. + * + * + * @generated + * @ordered + */ + int STEP_PROPERTY__TARGET_PROVIDER = PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Step Property' class. + * + * + * @generated + * @ordered + */ + int STEP_PROPERTY_FEATURE_COUNT = PROPERTY_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Get Operation' operation. + * + * + * @generated + * @ordered + */ + int STEP_PROPERTY___GET_OPERATION = PROPERTY_OPERATION_COUNT + 0; + + /** + * The number of operations of the 'Step Property' class. + * + * + * @generated + * @ordered + */ + int STEP_PROPERTY_OPERATION_COUNT = PROPERTY_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.StatePropertyImpl State Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.StatePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getStateProperty() + * @generated + */ + int STATE_PROPERTY = 11; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int STATE_PROPERTY__TARGET = PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'State Property' class. + * + * + * @generated + * @ordered + */ + int STATE_PROPERTY_FEATURE_COUNT = PROPERTY_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int STATE_PROPERTY___GET_FEATURE = PROPERTY_OPERATION_COUNT + 0; + + /** + * The number of operations of the 'State Property' class. + * + * + * @generated + * @ordered + */ + int STATE_PROPERTY_OPERATION_COUNT = PROPERTY_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.UnaryPropertyImpl Unary Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.UnaryPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getUnaryProperty() + * @generated + */ + int UNARY_PROPERTY = 12; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int UNARY_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int UNARY_PROPERTY__OPERATOR = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Property' containment reference. + * + * + * @generated + * @ordered + */ + int UNARY_PROPERTY__PROPERTY = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Unary Property' class. + * + * + * @generated + * @ordered + */ + int UNARY_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int UNARY_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Unary Property' class. + * + * + * @generated + * @ordered + */ + int UNARY_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.BinaryPropertyImpl Binary Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.BinaryPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getBinaryProperty() + * @generated + */ + int BINARY_PROPERTY = 13; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int BINARY_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int BINARY_PROPERTY__OPERATOR = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Left' containment reference. + * + * + * @generated + * @ordered + */ + int BINARY_PROPERTY__LEFT = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Right' containment reference. + * + * + * @generated + * @ordered + */ + int BINARY_PROPERTY__RIGHT = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Binary Property' class. + * + * + * @generated + * @ordered + */ + int BINARY_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 3; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int BINARY_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Binary Property' class. + * + * + * @generated + * @ordered + */ + int BINARY_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ManyReferencePropertyImpl Many Reference Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ManyReferencePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getManyReferenceProperty() + * @generated + */ + int MANY_REFERENCE_PROPERTY = 14; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Property' containment reference. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_PROPERTY__PROPERTY = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Quantifier' attribute. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_PROPERTY__QUANTIFIER = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Many Reference Property' class. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Many Reference Property' class. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.SingleReferencePropertyImpl Single Reference Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.SingleReferencePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getSingleReferenceProperty() + * @generated + */ + int SINGLE_REFERENCE_PROPERTY = 15; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Property' containment reference. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_PROPERTY__PROPERTY = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Single Reference Property' class. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Single Reference Property' class. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ContainerReferencePropertyImpl Container Reference Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ContainerReferencePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getContainerReferenceProperty() + * @generated + */ + int CONTAINER_REFERENCE_PROPERTY = 16; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int CONTAINER_REFERENCE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Property' containment reference. + * + * + * @generated + * @ordered + */ + int CONTAINER_REFERENCE_PROPERTY__PROPERTY = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Container Reference Property' class. + * + * + * @generated + * @ordered + */ + int CONTAINER_REFERENCE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int CONTAINER_REFERENCE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Container Reference Property' class. + * + * + * @generated + * @ordered + */ + int CONTAINER_REFERENCE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ManyBooleanAttributePropertyImpl Many Boolean Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ManyBooleanAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getManyBooleanAttributeProperty() + * @generated + */ + int MANY_BOOLEAN_ATTRIBUTE_PROPERTY = 17; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Quantifier' attribute. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Many Boolean Attribute Property' class. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 3; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Many Boolean Attribute Property' class. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ManyIntegerAttributePropertyImpl Many Integer Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ManyIntegerAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getManyIntegerAttributeProperty() + * @generated + */ + int MANY_INTEGER_ATTRIBUTE_PROPERTY = 18; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Quantifier' attribute. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Many Integer Attribute Property' class. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 3; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Many Integer Attribute Property' class. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ManyStringAttributePropertyImpl Many String Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ManyStringAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getManyStringAttributeProperty() + * @generated + */ + int MANY_STRING_ATTRIBUTE_PROPERTY = 19; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Quantifier' attribute. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_PROPERTY__VALUE = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Many String Attribute Property' class. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 3; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Many String Attribute Property' class. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.BooleanAttributePropertyImpl Boolean Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.BooleanAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getBooleanAttributeProperty() + * @generated + */ + int BOOLEAN_ATTRIBUTE_PROPERTY = 20; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_PROPERTY__VALUE = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Boolean Attribute Property' class. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Boolean Attribute Property' class. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.IntegerAttributePropertyImpl Integer Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.IntegerAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getIntegerAttributeProperty() + * @generated + */ + int INTEGER_ATTRIBUTE_PROPERTY = 21; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_PROPERTY__VALUE = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_PROPERTY__OPERATOR = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Integer Attribute Property' class. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'Integer Attribute Property' class. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.StringAttributePropertyImpl String Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.StringAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getStringAttributeProperty() + * @generated + */ + int STRING_ATTRIBUTE_PROPERTY = 22; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_PROPERTY__TARGET = STATE_PROPERTY__TARGET; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_PROPERTY__VALUE = STATE_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_PROPERTY__OPERATOR = STATE_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'String Attribute Property' class. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_PROPERTY_FEATURE_COUNT = STATE_PROPERTY_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Get Feature' operation. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_PROPERTY___GET_FEATURE = STATE_PROPERTY___GET_FEATURE; + + /** + * The number of operations of the 'String Attribute Property' class. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_PROPERTY_OPERATION_COUNT = STATE_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.UnaryOperator Unary Operator}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.UnaryOperator + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getUnaryOperator() + * @generated + */ + int UNARY_OPERATOR = 23; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator Comparison Operator}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getComparisonOperator() + * @generated + */ + int COMPARISON_OPERATOR = 24; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.BooleanOperator Boolean Operator}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.BooleanOperator + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getBooleanOperator() + * @generated + */ + int BOOLEAN_OPERATOR = 25; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.Quantifier Quantifier}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getQuantifier() + * @generated + */ + int QUANTIFIER = 26; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.property.Stepping Stepping}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.Stepping + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getStepping() + * @generated + */ + int STEPPING = 27; + + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.AbstractProperty Abstract Property}'. + * + * + * @return the meta object for class 'Abstract Property'. + * @see org.eclipse.gemoc.event.commons.model.property.AbstractProperty + * @generated + */ + EClass getAbstractProperty(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.TemporalProperty Temporal Property}'. + * + * + * @return the meta object for class 'Temporal Property'. + * @see org.eclipse.gemoc.event.commons.model.property.TemporalProperty + * @generated + */ + EClass getTemporalProperty(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.NextProperty Next Property}'. + * + * + * @return the meta object for class 'Next Property'. + * @see org.eclipse.gemoc.event.commons.model.property.NextProperty + * @generated + */ + EClass getNextProperty(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.NextProperty#getFormula Formula}'. + * + * + * @return the meta object for the containment reference 'Formula'. + * @see org.eclipse.gemoc.event.commons.model.property.NextProperty#getFormula() + * @see #getNextProperty() + * @generated + */ + EReference getNextProperty_Formula(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.UntilProperty Until Property}'. + * + * + * @return the meta object for class 'Until Property'. + * @see org.eclipse.gemoc.event.commons.model.property.UntilProperty + * @generated + */ + EClass getUntilProperty(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.UntilProperty#getLeftFormula Left Formula}'. + * + * + * @return the meta object for the containment reference 'Left Formula'. + * @see org.eclipse.gemoc.event.commons.model.property.UntilProperty#getLeftFormula() + * @see #getUntilProperty() + * @generated + */ + EReference getUntilProperty_LeftFormula(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.UntilProperty#getRightFormula Right Formula}'. + * + * + * @return the meta object for the containment reference 'Right Formula'. + * @see org.eclipse.gemoc.event.commons.model.property.UntilProperty#getRightFormula() + * @see #getUntilProperty() + * @generated + */ + EReference getUntilProperty_RightFormula(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty Release Property}'. + * + * + * @return the meta object for class 'Release Property'. + * @see org.eclipse.gemoc.event.commons.model.property.ReleaseProperty + * @generated + */ + EClass getReleaseProperty(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty#getLeftFormula Left Formula}'. + * + * + * @return the meta object for the containment reference 'Left Formula'. + * @see org.eclipse.gemoc.event.commons.model.property.ReleaseProperty#getLeftFormula() + * @see #getReleaseProperty() + * @generated + */ + EReference getReleaseProperty_LeftFormula(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty#getRightFormula Right Formula}'. + * + * + * @return the meta object for the containment reference 'Right Formula'. + * @see org.eclipse.gemoc.event.commons.model.property.ReleaseProperty#getRightFormula() + * @see #getReleaseProperty() + * @generated + */ + EReference getReleaseProperty_RightFormula(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty Negation Temporal Property}'. + * + * + * @return the meta object for class 'Negation Temporal Property'. + * @see org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty + * @generated + */ + EClass getNegationTemporalProperty(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty#getFormula Formula}'. + * + * + * @return the meta object for the containment reference 'Formula'. + * @see org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty#getFormula() + * @see #getNegationTemporalProperty() + * @generated + */ + EReference getNegationTemporalProperty_Formula(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.Property Property}'. + * + * + * @return the meta object for class 'Property'. + * @see org.eclipse.gemoc.event.commons.model.property.Property + * @generated + */ + EClass getProperty(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.PropertyReference Reference}'. + * + * + * @return the meta object for class 'Reference'. + * @see org.eclipse.gemoc.event.commons.model.property.PropertyReference + * @generated + */ + EClass getPropertyReference(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.property.PropertyReference#getReferencedProperty Referenced Property}'. + * + * + * @return the meta object for the reference 'Referenced Property'. + * @see org.eclipse.gemoc.event.commons.model.property.PropertyReference#getReferencedProperty() + * @see #getPropertyReference() + * @generated + */ + EReference getPropertyReference_ReferencedProperty(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty Composite Property}'. + * + * + * @return the meta object for class 'Composite Property'. + * @see org.eclipse.gemoc.event.commons.model.property.CompositeProperty + * @generated + */ + EClass getCompositeProperty(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty#getProperties Properties}'. + * + * + * @return the meta object for the containment reference list 'Properties'. + * @see org.eclipse.gemoc.event.commons.model.property.CompositeProperty#getProperties() + * @see #getCompositeProperty() + * @generated + */ + EReference getCompositeProperty_Properties(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.CompositeProperty#getOperator() + * @see #getCompositeProperty() + * @generated + */ + EAttribute getCompositeProperty_Operator(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.EventPrecondition Event Precondition}'. + * + * + * @return the meta object for class 'Event Precondition'. + * @see org.eclipse.gemoc.event.commons.model.property.EventPrecondition + * @generated + */ + EClass getEventPrecondition(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.property.EventPrecondition#getEvent Event}'. + * + * + * @return the meta object for the reference 'Event'. + * @see org.eclipse.gemoc.event.commons.model.property.EventPrecondition#getEvent() + * @see #getEventPrecondition() + * @generated + */ + EReference getEventPrecondition_Event(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.StepProperty Step Property}'. + * + * + * @return the meta object for class 'Step Property'. + * @see org.eclipse.gemoc.event.commons.model.property.StepProperty + * @generated + */ + EClass getStepProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.StepProperty#getStepping Stepping}'. + * + * + * @return the meta object for the attribute 'Stepping'. + * @see org.eclipse.gemoc.event.commons.model.property.StepProperty#getStepping() + * @see #getStepProperty() + * @generated + */ + EAttribute getStepProperty_Stepping(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.StepProperty#getTargetProvider Target Provider}'. + * + * + * @return the meta object for the containment reference 'Target Provider'. + * @see org.eclipse.gemoc.event.commons.model.property.StepProperty#getTargetProvider() + * @see #getStepProperty() + * @generated + */ + EReference getStepProperty_TargetProvider(); + + /** + * Returns the meta object for the '{@link org.eclipse.gemoc.event.commons.model.property.StepProperty#getOperation() Get Operation}' operation. + * + * + * @return the meta object for the 'Get Operation' operation. + * @see org.eclipse.gemoc.event.commons.model.property.StepProperty#getOperation() + * @generated + */ + EOperation getStepProperty__GetOperation(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.StateProperty State Property}'. + * + * + * @return the meta object for class 'State Property'. + * @see org.eclipse.gemoc.event.commons.model.property.StateProperty + * @generated + */ + EClass getStateProperty(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.property.StateProperty#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see org.eclipse.gemoc.event.commons.model.property.StateProperty#getTarget() + * @see #getStateProperty() + * @generated + */ + EReference getStateProperty_Target(); + + /** + * Returns the meta object for the '{@link org.eclipse.gemoc.event.commons.model.property.StateProperty#getFeature() Get Feature}' operation. + * + * + * @return the meta object for the 'Get Feature' operation. + * @see org.eclipse.gemoc.event.commons.model.property.StateProperty#getFeature() + * @generated + */ + EOperation getStateProperty__GetFeature(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty Unary Property}'. + * + * + * @return the meta object for class 'Unary Property'. + * @see org.eclipse.gemoc.event.commons.model.property.UnaryProperty + * @generated + */ + EClass getUnaryProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.UnaryProperty#getOperator() + * @see #getUnaryProperty() + * @generated + */ + EAttribute getUnaryProperty_Operator(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty#getProperty Property}'. + * + * + * @return the meta object for the containment reference 'Property'. + * @see org.eclipse.gemoc.event.commons.model.property.UnaryProperty#getProperty() + * @see #getUnaryProperty() + * @generated + */ + EReference getUnaryProperty_Property(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty Binary Property}'. + * + * + * @return the meta object for class 'Binary Property'. + * @see org.eclipse.gemoc.event.commons.model.property.BinaryProperty + * @generated + */ + EClass getBinaryProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getOperator() + * @see #getBinaryProperty() + * @generated + */ + EAttribute getBinaryProperty_Operator(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getLeft Left}'. + * + * + * @return the meta object for the containment reference 'Left'. + * @see org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getLeft() + * @see #getBinaryProperty() + * @generated + */ + EReference getBinaryProperty_Left(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getRight Right}'. + * + * + * @return the meta object for the containment reference 'Right'. + * @see org.eclipse.gemoc.event.commons.model.property.BinaryProperty#getRight() + * @see #getBinaryProperty() + * @generated + */ + EReference getBinaryProperty_Right(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty Many Reference Property}'. + * + * + * @return the meta object for class 'Many Reference Property'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty + * @generated + */ + EClass getManyReferenceProperty(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty#getProperty Property}'. + * + * + * @return the meta object for the containment reference 'Property'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty#getProperty() + * @see #getManyReferenceProperty() + * @generated + */ + EReference getManyReferenceProperty_Property(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty#getQuantifier Quantifier}'. + * + * + * @return the meta object for the attribute 'Quantifier'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty#getQuantifier() + * @see #getManyReferenceProperty() + * @generated + */ + EAttribute getManyReferenceProperty_Quantifier(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty Single Reference Property}'. + * + * + * @return the meta object for class 'Single Reference Property'. + * @see org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty + * @generated + */ + EClass getSingleReferenceProperty(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty#getProperty Property}'. + * + * + * @return the meta object for the containment reference 'Property'. + * @see org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty#getProperty() + * @see #getSingleReferenceProperty() + * @generated + */ + EReference getSingleReferenceProperty_Property(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty Container Reference Property}'. + * + * + * @return the meta object for class 'Container Reference Property'. + * @see org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty + * @generated + */ + EClass getContainerReferenceProperty(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty#getProperty Property}'. + * + * + * @return the meta object for the containment reference 'Property'. + * @see org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty#getProperty() + * @see #getContainerReferenceProperty() + * @generated + */ + EReference getContainerReferenceProperty_Property(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty Many Boolean Attribute Property}'. + * + * + * @return the meta object for class 'Many Boolean Attribute Property'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty + * @generated + */ + EClass getManyBooleanAttributeProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#getQuantifier Quantifier}'. + * + * + * @return the meta object for the attribute 'Quantifier'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#getQuantifier() + * @see #getManyBooleanAttributeProperty() + * @generated + */ + EAttribute getManyBooleanAttributeProperty_Quantifier(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#isValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#isValue() + * @see #getManyBooleanAttributeProperty() + * @generated + */ + EAttribute getManyBooleanAttributeProperty_Value(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty#getOperator() + * @see #getManyBooleanAttributeProperty() + * @generated + */ + EAttribute getManyBooleanAttributeProperty_Operator(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty Many Integer Attribute Property}'. + * + * + * @return the meta object for class 'Many Integer Attribute Property'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty + * @generated + */ + EClass getManyIntegerAttributeProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getQuantifier Quantifier}'. + * + * + * @return the meta object for the attribute 'Quantifier'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getQuantifier() + * @see #getManyIntegerAttributeProperty() + * @generated + */ + EAttribute getManyIntegerAttributeProperty_Quantifier(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getValue() + * @see #getManyIntegerAttributeProperty() + * @generated + */ + EAttribute getManyIntegerAttributeProperty_Value(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty#getOperator() + * @see #getManyIntegerAttributeProperty() + * @generated + */ + EAttribute getManyIntegerAttributeProperty_Operator(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty Many String Attribute Property}'. + * + * + * @return the meta object for class 'Many String Attribute Property'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty + * @generated + */ + EClass getManyStringAttributeProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getQuantifier Quantifier}'. + * + * + * @return the meta object for the attribute 'Quantifier'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getQuantifier() + * @see #getManyStringAttributeProperty() + * @generated + */ + EAttribute getManyStringAttributeProperty_Quantifier(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getValue() + * @see #getManyStringAttributeProperty() + * @generated + */ + EAttribute getManyStringAttributeProperty_Value(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty#getOperator() + * @see #getManyStringAttributeProperty() + * @generated + */ + EAttribute getManyStringAttributeProperty_Operator(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty Boolean Attribute Property}'. + * + * + * @return the meta object for class 'Boolean Attribute Property'. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty + * @generated + */ + EClass getBooleanAttributeProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty#isValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty#isValue() + * @see #getBooleanAttributeProperty() + * @generated + */ + EAttribute getBooleanAttributeProperty_Value(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty#getOperator() + * @see #getBooleanAttributeProperty() + * @generated + */ + EAttribute getBooleanAttributeProperty_Operator(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty Integer Attribute Property}'. + * + * + * @return the meta object for class 'Integer Attribute Property'. + * @see org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty + * @generated + */ + EClass getIntegerAttributeProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty#getValue() + * @see #getIntegerAttributeProperty() + * @generated + */ + EAttribute getIntegerAttributeProperty_Value(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty#getOperator() + * @see #getIntegerAttributeProperty() + * @generated + */ + EAttribute getIntegerAttributeProperty_Operator(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty String Attribute Property}'. + * + * + * @return the meta object for class 'String Attribute Property'. + * @see org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty + * @generated + */ + EClass getStringAttributeProperty(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty#getValue() + * @see #getStringAttributeProperty() + * @generated + */ + EAttribute getStringAttributeProperty_Value(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty#getOperator() + * @see #getStringAttributeProperty() + * @generated + */ + EAttribute getStringAttributeProperty_Operator(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.event.commons.model.property.UnaryOperator Unary Operator}'. + * + * + * @return the meta object for enum 'Unary Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.UnaryOperator + * @generated + */ + EEnum getUnaryOperator(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator Comparison Operator}'. + * + * + * @return the meta object for enum 'Comparison Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @generated + */ + EEnum getComparisonOperator(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.event.commons.model.property.BooleanOperator Boolean Operator}'. + * + * + * @return the meta object for enum 'Boolean Operator'. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanOperator + * @generated + */ + EEnum getBooleanOperator(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.event.commons.model.property.Quantifier Quantifier}'. + * + * + * @return the meta object for enum 'Quantifier'. + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @generated + */ + EEnum getQuantifier(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.event.commons.model.property.Stepping Stepping}'. + * + * + * @return the meta object for enum 'Stepping'. + * @see org.eclipse.gemoc.event.commons.model.property.Stepping + * @generated + */ + EEnum getStepping(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + PropertyFactory getPropertyFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.AbstractPropertyImpl Abstract Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.AbstractPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getAbstractProperty() + * @generated + */ + EClass ABSTRACT_PROPERTY = eINSTANCE.getAbstractProperty(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.TemporalPropertyImpl Temporal Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.TemporalPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getTemporalProperty() + * @generated + */ + EClass TEMPORAL_PROPERTY = eINSTANCE.getTemporalProperty(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.NextPropertyImpl Next Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.NextPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getNextProperty() + * @generated + */ + EClass NEXT_PROPERTY = eINSTANCE.getNextProperty(); + + /** + * The meta object literal for the 'Formula' containment reference feature. + * + * + * @generated + */ + EReference NEXT_PROPERTY__FORMULA = eINSTANCE.getNextProperty_Formula(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.UntilPropertyImpl Until Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.UntilPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getUntilProperty() + * @generated + */ + EClass UNTIL_PROPERTY = eINSTANCE.getUntilProperty(); + + /** + * The meta object literal for the 'Left Formula' containment reference feature. + * + * + * @generated + */ + EReference UNTIL_PROPERTY__LEFT_FORMULA = eINSTANCE.getUntilProperty_LeftFormula(); + + /** + * The meta object literal for the 'Right Formula' containment reference feature. + * + * + * @generated + */ + EReference UNTIL_PROPERTY__RIGHT_FORMULA = eINSTANCE.getUntilProperty_RightFormula(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ReleasePropertyImpl Release Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ReleasePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getReleaseProperty() + * @generated + */ + EClass RELEASE_PROPERTY = eINSTANCE.getReleaseProperty(); + + /** + * The meta object literal for the 'Left Formula' containment reference feature. + * + * + * @generated + */ + EReference RELEASE_PROPERTY__LEFT_FORMULA = eINSTANCE.getReleaseProperty_LeftFormula(); + + /** + * The meta object literal for the 'Right Formula' containment reference feature. + * + * + * @generated + */ + EReference RELEASE_PROPERTY__RIGHT_FORMULA = eINSTANCE.getReleaseProperty_RightFormula(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.NegationTemporalPropertyImpl Negation Temporal Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.NegationTemporalPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getNegationTemporalProperty() + * @generated + */ + EClass NEGATION_TEMPORAL_PROPERTY = eINSTANCE.getNegationTemporalProperty(); + + /** + * The meta object literal for the 'Formula' containment reference feature. + * + * + * @generated + */ + EReference NEGATION_TEMPORAL_PROPERTY__FORMULA = eINSTANCE.getNegationTemporalProperty_Formula(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.PropertyImpl Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getProperty() + * @generated + */ + EClass PROPERTY = eINSTANCE.getProperty(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.PropertyReferenceImpl Reference}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyReferenceImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getPropertyReference() + * @generated + */ + EClass PROPERTY_REFERENCE = eINSTANCE.getPropertyReference(); + + /** + * The meta object literal for the 'Referenced Property' reference feature. + * + * + * @generated + */ + EReference PROPERTY_REFERENCE__REFERENCED_PROPERTY = eINSTANCE.getPropertyReference_ReferencedProperty(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.CompositePropertyImpl Composite Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.CompositePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getCompositeProperty() + * @generated + */ + EClass COMPOSITE_PROPERTY = eINSTANCE.getCompositeProperty(); + + /** + * The meta object literal for the 'Properties' containment reference list feature. + * + * + * @generated + */ + EReference COMPOSITE_PROPERTY__PROPERTIES = eINSTANCE.getCompositeProperty_Properties(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute COMPOSITE_PROPERTY__OPERATOR = eINSTANCE.getCompositeProperty_Operator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.EventPreconditionImpl Event Precondition}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.EventPreconditionImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getEventPrecondition() + * @generated + */ + EClass EVENT_PRECONDITION = eINSTANCE.getEventPrecondition(); + + /** + * The meta object literal for the 'Event' reference feature. + * + * + * @generated + */ + EReference EVENT_PRECONDITION__EVENT = eINSTANCE.getEventPrecondition_Event(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.StepPropertyImpl Step Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.StepPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getStepProperty() + * @generated + */ + EClass STEP_PROPERTY = eINSTANCE.getStepProperty(); + + /** + * The meta object literal for the 'Stepping' attribute feature. + * + * + * @generated + */ + EAttribute STEP_PROPERTY__STEPPING = eINSTANCE.getStepProperty_Stepping(); + + /** + * The meta object literal for the 'Target Provider' containment reference feature. + * + * + * @generated + */ + EReference STEP_PROPERTY__TARGET_PROVIDER = eINSTANCE.getStepProperty_TargetProvider(); + + /** + * The meta object literal for the 'Get Operation' operation. + * + * + * @generated + */ + EOperation STEP_PROPERTY___GET_OPERATION = eINSTANCE.getStepProperty__GetOperation(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.StatePropertyImpl State Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.StatePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getStateProperty() + * @generated + */ + EClass STATE_PROPERTY = eINSTANCE.getStateProperty(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference STATE_PROPERTY__TARGET = eINSTANCE.getStateProperty_Target(); + + /** + * The meta object literal for the 'Get Feature' operation. + * + * + * @generated + */ + EOperation STATE_PROPERTY___GET_FEATURE = eINSTANCE.getStateProperty__GetFeature(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.UnaryPropertyImpl Unary Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.UnaryPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getUnaryProperty() + * @generated + */ + EClass UNARY_PROPERTY = eINSTANCE.getUnaryProperty(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute UNARY_PROPERTY__OPERATOR = eINSTANCE.getUnaryProperty_Operator(); + + /** + * The meta object literal for the 'Property' containment reference feature. + * + * + * @generated + */ + EReference UNARY_PROPERTY__PROPERTY = eINSTANCE.getUnaryProperty_Property(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.BinaryPropertyImpl Binary Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.BinaryPropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getBinaryProperty() + * @generated + */ + EClass BINARY_PROPERTY = eINSTANCE.getBinaryProperty(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute BINARY_PROPERTY__OPERATOR = eINSTANCE.getBinaryProperty_Operator(); + + /** + * The meta object literal for the 'Left' containment reference feature. + * + * + * @generated + */ + EReference BINARY_PROPERTY__LEFT = eINSTANCE.getBinaryProperty_Left(); + + /** + * The meta object literal for the 'Right' containment reference feature. + * + * + * @generated + */ + EReference BINARY_PROPERTY__RIGHT = eINSTANCE.getBinaryProperty_Right(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ManyReferencePropertyImpl Many Reference Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ManyReferencePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getManyReferenceProperty() + * @generated + */ + EClass MANY_REFERENCE_PROPERTY = eINSTANCE.getManyReferenceProperty(); + + /** + * The meta object literal for the 'Property' containment reference feature. + * + * + * @generated + */ + EReference MANY_REFERENCE_PROPERTY__PROPERTY = eINSTANCE.getManyReferenceProperty_Property(); + + /** + * The meta object literal for the 'Quantifier' attribute feature. + * + * + * @generated + */ + EAttribute MANY_REFERENCE_PROPERTY__QUANTIFIER = eINSTANCE.getManyReferenceProperty_Quantifier(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.SingleReferencePropertyImpl Single Reference Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.SingleReferencePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getSingleReferenceProperty() + * @generated + */ + EClass SINGLE_REFERENCE_PROPERTY = eINSTANCE.getSingleReferenceProperty(); + + /** + * The meta object literal for the 'Property' containment reference feature. + * + * + * @generated + */ + EReference SINGLE_REFERENCE_PROPERTY__PROPERTY = eINSTANCE.getSingleReferenceProperty_Property(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ContainerReferencePropertyImpl Container Reference Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ContainerReferencePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getContainerReferenceProperty() + * @generated + */ + EClass CONTAINER_REFERENCE_PROPERTY = eINSTANCE.getContainerReferenceProperty(); + + /** + * The meta object literal for the 'Property' containment reference feature. + * + * + * @generated + */ + EReference CONTAINER_REFERENCE_PROPERTY__PROPERTY = eINSTANCE.getContainerReferenceProperty_Property(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ManyBooleanAttributePropertyImpl Many Boolean Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ManyBooleanAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getManyBooleanAttributeProperty() + * @generated + */ + EClass MANY_BOOLEAN_ATTRIBUTE_PROPERTY = eINSTANCE.getManyBooleanAttributeProperty(); + + /** + * The meta object literal for the 'Quantifier' attribute feature. + * + * + * @generated + */ + EAttribute MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER = eINSTANCE.getManyBooleanAttributeProperty_Quantifier(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE = eINSTANCE.getManyBooleanAttributeProperty_Value(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR = eINSTANCE.getManyBooleanAttributeProperty_Operator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ManyIntegerAttributePropertyImpl Many Integer Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ManyIntegerAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getManyIntegerAttributeProperty() + * @generated + */ + EClass MANY_INTEGER_ATTRIBUTE_PROPERTY = eINSTANCE.getManyIntegerAttributeProperty(); + + /** + * The meta object literal for the 'Quantifier' attribute feature. + * + * + * @generated + */ + EAttribute MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER = eINSTANCE.getManyIntegerAttributeProperty_Quantifier(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE = eINSTANCE.getManyIntegerAttributeProperty_Value(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR = eINSTANCE.getManyIntegerAttributeProperty_Operator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.ManyStringAttributePropertyImpl Many String Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.ManyStringAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getManyStringAttributeProperty() + * @generated + */ + EClass MANY_STRING_ATTRIBUTE_PROPERTY = eINSTANCE.getManyStringAttributeProperty(); + + /** + * The meta object literal for the 'Quantifier' attribute feature. + * + * + * @generated + */ + EAttribute MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER = eINSTANCE.getManyStringAttributeProperty_Quantifier(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute MANY_STRING_ATTRIBUTE_PROPERTY__VALUE = eINSTANCE.getManyStringAttributeProperty_Value(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR = eINSTANCE.getManyStringAttributeProperty_Operator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.BooleanAttributePropertyImpl Boolean Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.BooleanAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getBooleanAttributeProperty() + * @generated + */ + EClass BOOLEAN_ATTRIBUTE_PROPERTY = eINSTANCE.getBooleanAttributeProperty(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute BOOLEAN_ATTRIBUTE_PROPERTY__VALUE = eINSTANCE.getBooleanAttributeProperty_Value(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR = eINSTANCE.getBooleanAttributeProperty_Operator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.IntegerAttributePropertyImpl Integer Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.IntegerAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getIntegerAttributeProperty() + * @generated + */ + EClass INTEGER_ATTRIBUTE_PROPERTY = eINSTANCE.getIntegerAttributeProperty(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_ATTRIBUTE_PROPERTY__VALUE = eINSTANCE.getIntegerAttributeProperty_Value(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_ATTRIBUTE_PROPERTY__OPERATOR = eINSTANCE.getIntegerAttributeProperty_Operator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.impl.StringAttributePropertyImpl String Attribute Property}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.impl.StringAttributePropertyImpl + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getStringAttributeProperty() + * @generated + */ + EClass STRING_ATTRIBUTE_PROPERTY = eINSTANCE.getStringAttributeProperty(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute STRING_ATTRIBUTE_PROPERTY__VALUE = eINSTANCE.getStringAttributeProperty_Value(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute STRING_ATTRIBUTE_PROPERTY__OPERATOR = eINSTANCE.getStringAttributeProperty_Operator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.UnaryOperator Unary Operator}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.UnaryOperator + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getUnaryOperator() + * @generated + */ + EEnum UNARY_OPERATOR = eINSTANCE.getUnaryOperator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator Comparison Operator}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getComparisonOperator() + * @generated + */ + EEnum COMPARISON_OPERATOR = eINSTANCE.getComparisonOperator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.BooleanOperator Boolean Operator}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.BooleanOperator + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getBooleanOperator() + * @generated + */ + EEnum BOOLEAN_OPERATOR = eINSTANCE.getBooleanOperator(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.Quantifier Quantifier}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.Quantifier + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getQuantifier() + * @generated + */ + EEnum QUANTIFIER = eINSTANCE.getQuantifier(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.property.Stepping Stepping}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.property.Stepping + * @see org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl#getStepping() + * @generated + */ + EEnum STEPPING = eINSTANCE.getStepping(); + + } + +} //PropertyPackage diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyReference.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyReference.java new file mode 100644 index 000000000..187494223 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/PropertyReference.java @@ -0,0 +1,49 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Reference'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.PropertyReference#getReferencedProperty Referenced Property}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getPropertyReference() + * @model + * @generated + */ +public interface PropertyReference

extends Property { + /** + * Returns the value of the 'Referenced Property' reference. + * + *

+ * If the meaning of the 'Referenced Property' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Referenced Property' reference. + * @see #setReferencedProperty(Property) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getPropertyReference_ReferencedProperty() + * @model + * @generated + */ + P getReferencedProperty(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.PropertyReference#getReferencedProperty Referenced Property}' reference. + * + * + * @param value the new value of the 'Referenced Property' reference. + * @see #getReferencedProperty() + * @generated + */ + void setReferencedProperty(P value); + +} // PropertyReference diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Quantifier.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Quantifier.java new file mode 100644 index 000000000..49a63ff5f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Quantifier.java @@ -0,0 +1,214 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Quantifier', + * and utility methods for working with them. + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getQuantifier() + * @model + * @generated + */ +public enum Quantifier implements Enumerator { + /** + * The 'EXISTS' literal object. + * + * + * @see #EXISTS_VALUE + * @generated + * @ordered + */ + EXISTS(0, "EXISTS", "EXISTS"), + + /** + * The 'FORALL' literal object. + * + * + * @see #FORALL_VALUE + * @generated + * @ordered + */ + FORALL(1, "FORALL", "FORALL"); + + /** + * The 'EXISTS' literal value. + * + *

+ * If the meaning of 'EXISTS' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #EXISTS + * @model + * @generated + * @ordered + */ + public static final int EXISTS_VALUE = 0; + + /** + * The 'FORALL' literal value. + * + *

+ * If the meaning of 'FORALL' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #FORALL + * @model + * @generated + * @ordered + */ + public static final int FORALL_VALUE = 1; + + /** + * An array of all the 'Quantifier' enumerators. + * + * + * @generated + */ + private static final Quantifier[] VALUES_ARRAY = + new Quantifier[] { + EXISTS, + FORALL, + }; + + /** + * A public read-only list of all the 'Quantifier' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Quantifier' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static Quantifier get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + Quantifier result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Quantifier' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static Quantifier getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + Quantifier result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Quantifier' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static Quantifier get(int value) { + switch (value) { + case EXISTS_VALUE: return EXISTS; + case FORALL_VALUE: return FORALL; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private Quantifier(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //Quantifier diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ReleaseProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ReleaseProperty.java new file mode 100644 index 000000000..76e877b2b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/ReleaseProperty.java @@ -0,0 +1,76 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Release Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty#getLeftFormula Left Formula}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty#getRightFormula Right Formula}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getReleaseProperty() + * @model abstract="true" + * @generated + */ +public interface ReleaseProperty

extends TemporalProperty { + /** + * Returns the value of the 'Left Formula' containment reference. + * + *

+ * If the meaning of the 'Left Formula' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Left Formula' containment reference. + * @see #setLeftFormula(AbstractProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getReleaseProperty_LeftFormula() + * @model containment="true" + * @generated + */ + P getLeftFormula(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty#getLeftFormula Left Formula}' containment reference. + * + * + * @param value the new value of the 'Left Formula' containment reference. + * @see #getLeftFormula() + * @generated + */ + void setLeftFormula(P value); + + /** + * Returns the value of the 'Right Formula' containment reference. + * + *

+ * If the meaning of the 'Right Formula' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Right Formula' containment reference. + * @see #setRightFormula(AbstractProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getReleaseProperty_RightFormula() + * @model containment="true" + * @generated + */ + P getRightFormula(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty#getRightFormula Right Formula}' containment reference. + * + * + * @param value the new value of the 'Right Formula' containment reference. + * @see #getRightFormula() + * @generated + */ + void setRightFormula(P value); + +} // ReleaseProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/SingleReferenceProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/SingleReferenceProperty.java new file mode 100644 index 000000000..d07929108 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/SingleReferenceProperty.java @@ -0,0 +1,49 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Single Reference Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty#getProperty Property}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getSingleReferenceProperty() + * @model abstract="true" + * @generated + */ +public interface SingleReferenceProperty

, T> extends StateProperty { + /** + * Returns the value of the 'Property' containment reference. + * + *

+ * If the meaning of the 'Property' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Property' containment reference. + * @see #setProperty(StateProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getSingleReferenceProperty_Property() + * @model containment="true" + * @generated + */ + P getProperty(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty#getProperty Property}' containment reference. + * + * + * @param value the new value of the 'Property' containment reference. + * @see #getProperty() + * @generated + */ + void setProperty(P value); + +} // SingleReferenceProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StateProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StateProperty.java new file mode 100644 index 000000000..3002c1cb5 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StateProperty.java @@ -0,0 +1,58 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import org.eclipse.emf.ecore.EStructuralFeature; + +/** + * + * A representation of the model object 'State Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.StateProperty#getTarget Target}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStateProperty() + * @model abstract="true" + * @generated + */ +public interface StateProperty extends Property { + /** + * Returns the value of the 'Target' reference. + * + *

+ * If the meaning of the 'Target' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target' reference. + * @see #setTarget(Object) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStateProperty_Target() + * @model kind="reference" + * @generated + */ + T getTarget(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.StateProperty#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(T value); + + /** + * + * + * @model kind="operation" + * @generated + */ + EStructuralFeature getFeature(); + +} // StateProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StepProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StepProperty.java new file mode 100644 index 000000000..812ed4a29 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StepProperty.java @@ -0,0 +1,90 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import org.eclipse.emf.ecore.EOperation; + +import org.eclipse.gemoc.event.commons.model.scenario.ElementProvider; + +/** + * + * A representation of the model object 'Step Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.StepProperty#getStepping Stepping}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.StepProperty#getTargetProvider Target Provider}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStepProperty() + * @model abstract="true" + * @generated + */ +public interface StepProperty extends Property { + /** + * Returns the value of the 'Stepping' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.Stepping}. + * + *

+ * If the meaning of the 'Stepping' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Stepping' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Stepping + * @see #setStepping(Stepping) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStepProperty_Stepping() + * @model + * @generated + */ + Stepping getStepping(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.StepProperty#getStepping Stepping}' attribute. + * + * + * @param value the new value of the 'Stepping' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.Stepping + * @see #getStepping() + * @generated + */ + void setStepping(Stepping value); + + /** + * Returns the value of the 'Target Provider' containment reference. + * + *

+ * If the meaning of the 'Target Provider' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target Provider' containment reference. + * @see #setTargetProvider(ElementProvider) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStepProperty_TargetProvider() + * @model containment="true" + * @generated + */ + ElementProvider getTargetProvider(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.StepProperty#getTargetProvider Target Provider}' containment reference. + * + * + * @param value the new value of the 'Target Provider' containment reference. + * @see #getTargetProvider() + * @generated + */ + void setTargetProvider(ElementProvider value); + + /** + * + * + * @model kind="operation" + * @generated + */ + EOperation getOperation(); + +} // StepProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Stepping.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Stepping.java new file mode 100644 index 000000000..ce320674a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/Stepping.java @@ -0,0 +1,241 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Stepping', + * and utility methods for working with them. + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStepping() + * @model + * @generated + */ +public enum Stepping implements Enumerator { + /** + * The 'ONGOING' literal object. + * + * + * @see #ONGOING_VALUE + * @generated + * @ordered + */ + ONGOING(0, "ONGOING", "ONGOING"), + + /** + * The 'ENDED' literal object. + * + * + * @see #ENDED_VALUE + * @generated + * @ordered + */ + ENDED(1, "ENDED", "ENDED"), + + /** + * The 'ENDING' literal object. + * + * + * @see #ENDING_VALUE + * @generated + * @ordered + */ + ENDING(2, "ENDING", "ENDING"); + + /** + * The 'ONGOING' literal value. + * + *

+ * If the meaning of 'ONGOING' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ONGOING + * @model + * @generated + * @ordered + */ + public static final int ONGOING_VALUE = 0; + + /** + * The 'ENDED' literal value. + * + *

+ * If the meaning of 'ENDED' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ENDED + * @model + * @generated + * @ordered + */ + public static final int ENDED_VALUE = 1; + + /** + * The 'ENDING' literal value. + * + *

+ * If the meaning of 'ENDING' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ENDING + * @model + * @generated + * @ordered + */ + public static final int ENDING_VALUE = 2; + + /** + * An array of all the 'Stepping' enumerators. + * + * + * @generated + */ + private static final Stepping[] VALUES_ARRAY = + new Stepping[] { + ONGOING, + ENDED, + ENDING, + }; + + /** + * A public read-only list of all the 'Stepping' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Stepping' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static Stepping get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + Stepping result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Stepping' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static Stepping getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + Stepping result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Stepping' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static Stepping get(int value) { + switch (value) { + case ONGOING_VALUE: return ONGOING; + case ENDED_VALUE: return ENDED; + case ENDING_VALUE: return ENDING; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private Stepping(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //Stepping diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StringAttributeProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StringAttributeProperty.java new file mode 100644 index 000000000..61d66eb9d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/StringAttributeProperty.java @@ -0,0 +1,79 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'String Attribute Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty#getOperator Operator}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStringAttributeProperty() + * @model abstract="true" + * @generated + */ +public interface StringAttributeProperty extends StateProperty { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStringAttributeProperty_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.ComparisonOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #setOperator(ComparisonOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getStringAttributeProperty_Operator() + * @model + * @generated + */ + ComparisonOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.ComparisonOperator + * @see #getOperator() + * @generated + */ + void setOperator(ComparisonOperator value); + +} // StringAttributeProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/TemporalProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/TemporalProperty.java new file mode 100644 index 000000000..ad8cecff3 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/TemporalProperty.java @@ -0,0 +1,17 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Temporal Property'. + * + * + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getTemporalProperty() + * @model abstract="true" + * @generated + */ +public interface TemporalProperty extends AbstractProperty { +} // TemporalProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UnaryOperator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UnaryOperator.java new file mode 100644 index 000000000..1777ef66d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UnaryOperator.java @@ -0,0 +1,187 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Unary Operator', + * and utility methods for working with them. + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getUnaryOperator() + * @model + * @generated + */ +public enum UnaryOperator implements Enumerator { + /** + * The 'NOT' literal object. + * + * + * @see #NOT_VALUE + * @generated + * @ordered + */ + NOT(0, "NOT", "NOT"); + + /** + * The 'NOT' literal value. + * + *

+ * If the meaning of 'NOT' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #NOT + * @model + * @generated + * @ordered + */ + public static final int NOT_VALUE = 0; + + /** + * An array of all the 'Unary Operator' enumerators. + * + * + * @generated + */ + private static final UnaryOperator[] VALUES_ARRAY = + new UnaryOperator[] { + NOT, + }; + + /** + * A public read-only list of all the 'Unary Operator' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Unary Operator' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static UnaryOperator get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + UnaryOperator result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Unary Operator' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static UnaryOperator getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + UnaryOperator result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Unary Operator' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static UnaryOperator get(int value) { + switch (value) { + case NOT_VALUE: return NOT; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private UnaryOperator(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //UnaryOperator diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UnaryProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UnaryProperty.java new file mode 100644 index 000000000..910b354ad --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UnaryProperty.java @@ -0,0 +1,79 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Unary Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty#getOperator Operator}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty#getProperty Property}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getUnaryProperty() + * @model abstract="true" + * @generated + */ +public interface UnaryProperty

, T> extends StateProperty { + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.property.UnaryOperator}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.UnaryOperator + * @see #setOperator(UnaryOperator) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getUnaryProperty_Operator() + * @model required="true" + * @generated + */ + UnaryOperator getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see org.eclipse.gemoc.event.commons.model.property.UnaryOperator + * @see #getOperator() + * @generated + */ + void setOperator(UnaryOperator value); + + /** + * Returns the value of the 'Property' containment reference. + * + *

+ * If the meaning of the 'Property' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Property' containment reference. + * @see #setProperty(StateProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getUnaryProperty_Property() + * @model containment="true" required="true" + * @generated + */ + P getProperty(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty#getProperty Property}' containment reference. + * + * + * @param value the new value of the 'Property' containment reference. + * @see #getProperty() + * @generated + */ + void setProperty(P value); + +} // UnaryProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UntilProperty.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UntilProperty.java new file mode 100644 index 000000000..d5a572bb4 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/UntilProperty.java @@ -0,0 +1,76 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property; + + +/** + * + * A representation of the model object 'Until Property'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.UntilProperty#getLeftFormula Left Formula}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.UntilProperty#getRightFormula Right Formula}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getUntilProperty() + * @model abstract="true" + * @generated + */ +public interface UntilProperty

extends TemporalProperty { + /** + * Returns the value of the 'Left Formula' containment reference. + * + *

+ * If the meaning of the 'Left Formula' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Left Formula' containment reference. + * @see #setLeftFormula(AbstractProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getUntilProperty_LeftFormula() + * @model containment="true" + * @generated + */ + P getLeftFormula(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.UntilProperty#getLeftFormula Left Formula}' containment reference. + * + * + * @param value the new value of the 'Left Formula' containment reference. + * @see #getLeftFormula() + * @generated + */ + void setLeftFormula(P value); + + /** + * Returns the value of the 'Right Formula' containment reference. + * + *

+ * If the meaning of the 'Right Formula' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Right Formula' containment reference. + * @see #setRightFormula(AbstractProperty) + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#getUntilProperty_RightFormula() + * @model containment="true" + * @generated + */ + P getRightFormula(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.property.UntilProperty#getRightFormula Right Formula}' containment reference. + * + * + * @param value the new value of the 'Right Formula' containment reference. + * @see #getRightFormula() + * @generated + */ + void setRightFormula(P value); + +} // UntilProperty diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/AbstractPropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/AbstractPropertyImpl.java new file mode 100644 index 000000000..16f8eeb37 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/AbstractPropertyImpl.java @@ -0,0 +1,39 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.gemoc.event.commons.model.property.AbstractProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * + * An implementation of the model object 'Abstract Property'. + * + * + * @generated + */ +public class AbstractPropertyImpl extends MinimalEObjectImpl.Container implements AbstractProperty { + /** + * + * + * @generated + */ + protected AbstractPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.ABSTRACT_PROPERTY; + } + +} //AbstractPropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/BinaryPropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/BinaryPropertyImpl.java new file mode 100644 index 000000000..43be560db --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/BinaryPropertyImpl.java @@ -0,0 +1,322 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.BinaryProperty; +import org.eclipse.gemoc.event.commons.model.property.BooleanOperator; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +/** + * + * An implementation of the model object 'Binary Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.BinaryPropertyImpl#getOperator Operator}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.BinaryPropertyImpl#getLeft Left}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.BinaryPropertyImpl#getRight Right}
  • + *
+ * + * @generated + */ +public abstract class BinaryPropertyImpl

, T> extends StatePropertyImpl implements BinaryProperty { + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final BooleanOperator OPERATOR_EDEFAULT = BooleanOperator.AND; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected BooleanOperator operator = OPERATOR_EDEFAULT; + + /** + * The cached value of the '{@link #getLeft() Left}' containment reference. + * + * + * @see #getLeft() + * @generated + * @ordered + */ + protected P left; + + /** + * The cached value of the '{@link #getRight() Right}' containment reference. + * + * + * @see #getRight() + * @generated + * @ordered + */ + protected P right; + + /** + * + * + * @generated + */ + protected BinaryPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.BINARY_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public BooleanOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(BooleanOperator newOperator) { + BooleanOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.BINARY_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + public P getLeft() { + return left; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLeft(P newLeft, NotificationChain msgs) { + P oldLeft = left; + left = newLeft; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.BINARY_PROPERTY__LEFT, oldLeft, newLeft); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLeft(P newLeft) { + if (newLeft != left) { + NotificationChain msgs = null; + if (left != null) + msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.BINARY_PROPERTY__LEFT, null, msgs); + if (newLeft != null) + msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.BINARY_PROPERTY__LEFT, null, msgs); + msgs = basicSetLeft(newLeft, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.BINARY_PROPERTY__LEFT, newLeft, newLeft)); + } + + /** + * + * + * @generated + */ + public P getRight() { + return right; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRight(P newRight, NotificationChain msgs) { + P oldRight = right; + right = newRight; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.BINARY_PROPERTY__RIGHT, oldRight, newRight); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setRight(P newRight) { + if (newRight != right) { + NotificationChain msgs = null; + if (right != null) + msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.BINARY_PROPERTY__RIGHT, null, msgs); + if (newRight != null) + msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.BINARY_PROPERTY__RIGHT, null, msgs); + msgs = basicSetRight(newRight, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.BINARY_PROPERTY__RIGHT, newRight, newRight)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.BINARY_PROPERTY__LEFT: + return basicSetLeft(null, msgs); + case PropertyPackage.BINARY_PROPERTY__RIGHT: + return basicSetRight(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.BINARY_PROPERTY__OPERATOR: + return getOperator(); + case PropertyPackage.BINARY_PROPERTY__LEFT: + return getLeft(); + case PropertyPackage.BINARY_PROPERTY__RIGHT: + return getRight(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.BINARY_PROPERTY__OPERATOR: + setOperator((BooleanOperator)newValue); + return; + case PropertyPackage.BINARY_PROPERTY__LEFT: + setLeft((P)newValue); + return; + case PropertyPackage.BINARY_PROPERTY__RIGHT: + setRight((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.BINARY_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + case PropertyPackage.BINARY_PROPERTY__LEFT: + setLeft((P)null); + return; + case PropertyPackage.BINARY_PROPERTY__RIGHT: + setRight((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.BINARY_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + case PropertyPackage.BINARY_PROPERTY__LEFT: + return left != null; + case PropertyPackage.BINARY_PROPERTY__RIGHT: + return right != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //BinaryPropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/BooleanAttributePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/BooleanAttributePropertyImpl.java new file mode 100644 index 000000000..67af49883 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/BooleanAttributePropertyImpl.java @@ -0,0 +1,228 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.ComparisonOperator; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * + * An implementation of the model object 'Boolean Attribute Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.BooleanAttributePropertyImpl#isValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.BooleanAttributePropertyImpl#getOperator Operator}
  • + *
+ * + * @generated + */ +public abstract class BooleanAttributePropertyImpl extends StatePropertyImpl implements BooleanAttributeProperty { + /** + * The default value of the '{@link #isValue() Value}' attribute. + * + * + * @see #isValue() + * @generated + * @ordered + */ + protected static final boolean VALUE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isValue() Value}' attribute. + * + * + * @see #isValue() + * @generated + * @ordered + */ + protected boolean value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final ComparisonOperator OPERATOR_EDEFAULT = ComparisonOperator.EQUAL; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected ComparisonOperator operator = OPERATOR_EDEFAULT; + + /** + * + * + * @generated + */ + protected BooleanAttributePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.BOOLEAN_ATTRIBUTE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public boolean isValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(boolean newValue) { + boolean oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public ComparisonOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(ComparisonOperator newOperator) { + ComparisonOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + return isValue(); + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + return getOperator(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + setValue((Boolean)newValue); + return; + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator((ComparisonOperator)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + return value != VALUE_EDEFAULT; + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(", operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //BooleanAttributePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/CompositePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/CompositePropertyImpl.java new file mode 100644 index 000000000..a2016db8c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/CompositePropertyImpl.java @@ -0,0 +1,220 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.property.BooleanOperator; +import org.eclipse.gemoc.event.commons.model.property.CompositeProperty; +import org.eclipse.gemoc.event.commons.model.property.Property; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * + * An implementation of the model object 'Composite Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.CompositePropertyImpl#getProperties Properties}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.CompositePropertyImpl#getOperator Operator}
  • + *
+ * + * @generated + */ +public class CompositePropertyImpl

extends PropertyImpl implements CompositeProperty

{ + /** + * The cached value of the '{@link #getProperties() Properties}' containment reference list. + * + * + * @see #getProperties() + * @generated + * @ordered + */ + protected EList

properties; + + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final BooleanOperator OPERATOR_EDEFAULT = BooleanOperator.AND; + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected BooleanOperator operator = OPERATOR_EDEFAULT; + + /** + * + * + * @generated + */ + protected CompositePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.COMPOSITE_PROPERTY; + } + + /** + * + * + * @generated + */ + public EList

getProperties() { + if (properties == null) { + properties = new EObjectContainmentEList

(Property.class, this, PropertyPackage.COMPOSITE_PROPERTY__PROPERTIES); + } + return properties; + } + + /** + * + * + * @generated + */ + public BooleanOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(BooleanOperator newOperator) { + BooleanOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.COMPOSITE_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.COMPOSITE_PROPERTY__PROPERTIES: + return ((InternalEList)getProperties()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.COMPOSITE_PROPERTY__PROPERTIES: + return getProperties(); + case PropertyPackage.COMPOSITE_PROPERTY__OPERATOR: + return getOperator(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.COMPOSITE_PROPERTY__PROPERTIES: + getProperties().clear(); + getProperties().addAll((Collection)newValue); + return; + case PropertyPackage.COMPOSITE_PROPERTY__OPERATOR: + setOperator((BooleanOperator)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.COMPOSITE_PROPERTY__PROPERTIES: + getProperties().clear(); + return; + case PropertyPackage.COMPOSITE_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.COMPOSITE_PROPERTY__PROPERTIES: + return properties != null && !properties.isEmpty(); + case PropertyPackage.COMPOSITE_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //CompositePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ContainerReferencePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ContainerReferencePropertyImpl.java new file mode 100644 index 000000000..2e0946be2 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ContainerReferencePropertyImpl.java @@ -0,0 +1,187 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +/** + * + * An implementation of the model object 'Container Reference Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ContainerReferencePropertyImpl#getProperty Property}
  • + *
+ * + * @generated + */ +public class ContainerReferencePropertyImpl

, T> extends StatePropertyImpl implements ContainerReferenceProperty { + /** + * The cached value of the '{@link #getProperty() Property}' containment reference. + * + * + * @see #getProperty() + * @generated + * @ordered + */ + protected P property; + + /** + * + * + * @generated + */ + protected ContainerReferencePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.CONTAINER_REFERENCE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public P getProperty() { + return property; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetProperty(P newProperty, NotificationChain msgs) { + P oldProperty = property; + property = newProperty; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY, oldProperty, newProperty); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setProperty(P newProperty) { + if (newProperty != property) { + NotificationChain msgs = null; + if (property != null) + msgs = ((InternalEObject)property).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY, null, msgs); + if (newProperty != null) + msgs = ((InternalEObject)newProperty).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY, null, msgs); + msgs = basicSetProperty(newProperty, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY, newProperty, newProperty)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY: + return basicSetProperty(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY: + return getProperty(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY: + setProperty((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY: + setProperty((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY: + return property != null; + } + return super.eIsSet(featureID); + } + +} //ContainerReferencePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/EventPreconditionImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/EventPreconditionImpl.java new file mode 100644 index 000000000..bd155b134 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/EventPreconditionImpl.java @@ -0,0 +1,159 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.EventPrecondition; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +/** + * + * An implementation of the model object 'Event Precondition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.EventPreconditionImpl#getEvent Event}
  • + *
+ * + * @generated + */ +public class EventPreconditionImpl extends PropertyImpl implements EventPrecondition { + /** + * The cached value of the '{@link #getEvent() Event}' reference. + * + * + * @see #getEvent() + * @generated + * @ordered + */ + protected E event; + + /** + * + * + * @generated + */ + protected EventPreconditionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.EVENT_PRECONDITION; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public E getEvent() { + if (event != null && event.eIsProxy()) { + InternalEObject oldEvent = (InternalEObject)event; + event = (E)eResolveProxy(oldEvent); + if (event != oldEvent) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, PropertyPackage.EVENT_PRECONDITION__EVENT, oldEvent, event)); + } + } + return event; + } + + /** + * + * + * @generated + */ + public E basicGetEvent() { + return event; + } + + /** + * + * + * @generated + */ + public void setEvent(E newEvent) { + E oldEvent = event; + event = newEvent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.EVENT_PRECONDITION__EVENT, oldEvent, event)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.EVENT_PRECONDITION__EVENT: + if (resolve) return getEvent(); + return basicGetEvent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.EVENT_PRECONDITION__EVENT: + setEvent((E)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.EVENT_PRECONDITION__EVENT: + setEvent((E)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.EVENT_PRECONDITION__EVENT: + return event != null; + } + return super.eIsSet(featureID); + } + +} //EventPreconditionImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/IntegerAttributePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/IntegerAttributePropertyImpl.java new file mode 100644 index 000000000..d8c3bd9cd --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/IntegerAttributePropertyImpl.java @@ -0,0 +1,228 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.ComparisonOperator; +import org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * + * An implementation of the model object 'Integer Attribute Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.IntegerAttributePropertyImpl#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.IntegerAttributePropertyImpl#getOperator Operator}
  • + *
+ * + * @generated + */ +public abstract class IntegerAttributePropertyImpl extends StatePropertyImpl implements IntegerAttributeProperty { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final ComparisonOperator OPERATOR_EDEFAULT = ComparisonOperator.EQUAL; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected ComparisonOperator operator = OPERATOR_EDEFAULT; + + /** + * + * + * @generated + */ + protected IntegerAttributePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.INTEGER_ATTRIBUTE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(int newValue) { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public ComparisonOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(ComparisonOperator newOperator) { + ComparisonOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__VALUE: + return getValue(); + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + return getOperator(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__VALUE: + setValue((Integer)newValue); + return; + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator((ComparisonOperator)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__VALUE: + return value != VALUE_EDEFAULT; + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(", operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //IntegerAttributePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyBooleanAttributePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyBooleanAttributePropertyImpl.java new file mode 100644 index 000000000..a80594b8c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyBooleanAttributePropertyImpl.java @@ -0,0 +1,283 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.ComparisonOperator; +import org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; + +/** + * + * An implementation of the model object 'Many Boolean Attribute Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyBooleanAttributePropertyImpl#getQuantifier Quantifier}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyBooleanAttributePropertyImpl#isValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyBooleanAttributePropertyImpl#getOperator Operator}
  • + *
+ * + * @generated + */ +public class ManyBooleanAttributePropertyImpl extends StatePropertyImpl implements ManyBooleanAttributeProperty { + /** + * The default value of the '{@link #getQuantifier() Quantifier}' attribute. + * + * + * @see #getQuantifier() + * @generated + * @ordered + */ + protected static final Quantifier QUANTIFIER_EDEFAULT = Quantifier.EXISTS; + + /** + * The cached value of the '{@link #getQuantifier() Quantifier}' attribute. + * + * + * @see #getQuantifier() + * @generated + * @ordered + */ + protected Quantifier quantifier = QUANTIFIER_EDEFAULT; + + /** + * The default value of the '{@link #isValue() Value}' attribute. + * + * + * @see #isValue() + * @generated + * @ordered + */ + protected static final boolean VALUE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isValue() Value}' attribute. + * + * + * @see #isValue() + * @generated + * @ordered + */ + protected boolean value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final ComparisonOperator OPERATOR_EDEFAULT = ComparisonOperator.EQUAL; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected ComparisonOperator operator = OPERATOR_EDEFAULT; + + /** + * + * + * @generated + */ + protected ManyBooleanAttributePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.MANY_BOOLEAN_ATTRIBUTE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public Quantifier getQuantifier() { + return quantifier; + } + + /** + * + * + * @generated + */ + public void setQuantifier(Quantifier newQuantifier) { + Quantifier oldQuantifier = quantifier; + quantifier = newQuantifier == null ? QUANTIFIER_EDEFAULT : newQuantifier; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER, oldQuantifier, quantifier)); + } + + /** + * + * + * @generated + */ + public boolean isValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(boolean newValue) { + boolean oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public ComparisonOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(ComparisonOperator newOperator) { + ComparisonOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER: + return getQuantifier(); + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + return isValue(); + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + return getOperator(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER: + setQuantifier((Quantifier)newValue); + return; + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + setValue((Boolean)newValue); + return; + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator((ComparisonOperator)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER: + setQuantifier(QUANTIFIER_EDEFAULT); + return; + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER: + return quantifier != QUANTIFIER_EDEFAULT; + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE: + return value != VALUE_EDEFAULT; + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (quantifier: "); + result.append(quantifier); + result.append(", value: "); + result.append(value); + result.append(", operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //ManyBooleanAttributePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyIntegerAttributePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyIntegerAttributePropertyImpl.java new file mode 100644 index 000000000..f0272f042 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyIntegerAttributePropertyImpl.java @@ -0,0 +1,283 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.ComparisonOperator; +import org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; + +/** + * + * An implementation of the model object 'Many Integer Attribute Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyIntegerAttributePropertyImpl#getQuantifier Quantifier}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyIntegerAttributePropertyImpl#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyIntegerAttributePropertyImpl#getOperator Operator}
  • + *
+ * + * @generated + */ +public class ManyIntegerAttributePropertyImpl extends StatePropertyImpl implements ManyIntegerAttributeProperty { + /** + * The default value of the '{@link #getQuantifier() Quantifier}' attribute. + * + * + * @see #getQuantifier() + * @generated + * @ordered + */ + protected static final Quantifier QUANTIFIER_EDEFAULT = Quantifier.EXISTS; + + /** + * The cached value of the '{@link #getQuantifier() Quantifier}' attribute. + * + * + * @see #getQuantifier() + * @generated + * @ordered + */ + protected Quantifier quantifier = QUANTIFIER_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final ComparisonOperator OPERATOR_EDEFAULT = ComparisonOperator.EQUAL; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected ComparisonOperator operator = OPERATOR_EDEFAULT; + + /** + * + * + * @generated + */ + protected ManyIntegerAttributePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.MANY_INTEGER_ATTRIBUTE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public Quantifier getQuantifier() { + return quantifier; + } + + /** + * + * + * @generated + */ + public void setQuantifier(Quantifier newQuantifier) { + Quantifier oldQuantifier = quantifier; + quantifier = newQuantifier == null ? QUANTIFIER_EDEFAULT : newQuantifier; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER, oldQuantifier, quantifier)); + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(int newValue) { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public ComparisonOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(ComparisonOperator newOperator) { + ComparisonOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER: + return getQuantifier(); + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE: + return getValue(); + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + return getOperator(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER: + setQuantifier((Quantifier)newValue); + return; + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE: + setValue((Integer)newValue); + return; + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator((ComparisonOperator)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER: + setQuantifier(QUANTIFIER_EDEFAULT); + return; + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER: + return quantifier != QUANTIFIER_EDEFAULT; + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE: + return value != VALUE_EDEFAULT; + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (quantifier: "); + result.append(quantifier); + result.append(", value: "); + result.append(value); + result.append(", operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //ManyIntegerAttributePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyReferencePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyReferencePropertyImpl.java new file mode 100644 index 000000000..0ae3ac3a0 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyReferencePropertyImpl.java @@ -0,0 +1,256 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +/** + * + * An implementation of the model object 'Many Reference Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyReferencePropertyImpl#getProperty Property}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyReferencePropertyImpl#getQuantifier Quantifier}
  • + *
+ * + * @generated + */ +public abstract class ManyReferencePropertyImpl

, T> extends StatePropertyImpl implements ManyReferenceProperty { + /** + * The cached value of the '{@link #getProperty() Property}' containment reference. + * + * + * @see #getProperty() + * @generated + * @ordered + */ + protected P property; + + /** + * The default value of the '{@link #getQuantifier() Quantifier}' attribute. + * + * + * @see #getQuantifier() + * @generated + * @ordered + */ + protected static final Quantifier QUANTIFIER_EDEFAULT = Quantifier.EXISTS; + + /** + * The cached value of the '{@link #getQuantifier() Quantifier}' attribute. + * + * + * @see #getQuantifier() + * @generated + * @ordered + */ + protected Quantifier quantifier = QUANTIFIER_EDEFAULT; + + /** + * + * + * @generated + */ + protected ManyReferencePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.MANY_REFERENCE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public P getProperty() { + return property; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetProperty(P newProperty, NotificationChain msgs) { + P oldProperty = property; + property = newProperty; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY, oldProperty, newProperty); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setProperty(P newProperty) { + if (newProperty != property) { + NotificationChain msgs = null; + if (property != null) + msgs = ((InternalEObject)property).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY, null, msgs); + if (newProperty != null) + msgs = ((InternalEObject)newProperty).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY, null, msgs); + msgs = basicSetProperty(newProperty, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY, newProperty, newProperty)); + } + + /** + * + * + * @generated + */ + public Quantifier getQuantifier() { + return quantifier; + } + + /** + * + * + * @generated + */ + public void setQuantifier(Quantifier newQuantifier) { + Quantifier oldQuantifier = quantifier; + quantifier = newQuantifier == null ? QUANTIFIER_EDEFAULT : newQuantifier; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_REFERENCE_PROPERTY__QUANTIFIER, oldQuantifier, quantifier)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY: + return basicSetProperty(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY: + return getProperty(); + case PropertyPackage.MANY_REFERENCE_PROPERTY__QUANTIFIER: + return getQuantifier(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY: + setProperty((P)newValue); + return; + case PropertyPackage.MANY_REFERENCE_PROPERTY__QUANTIFIER: + setQuantifier((Quantifier)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY: + setProperty((P)null); + return; + case PropertyPackage.MANY_REFERENCE_PROPERTY__QUANTIFIER: + setQuantifier(QUANTIFIER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.MANY_REFERENCE_PROPERTY__PROPERTY: + return property != null; + case PropertyPackage.MANY_REFERENCE_PROPERTY__QUANTIFIER: + return quantifier != QUANTIFIER_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (quantifier: "); + result.append(quantifier); + result.append(')'); + return result.toString(); + } + +} //ManyReferencePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyStringAttributePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyStringAttributePropertyImpl.java new file mode 100644 index 000000000..a6bd5ee6a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ManyStringAttributePropertyImpl.java @@ -0,0 +1,283 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.ComparisonOperator; +import org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; + +/** + * + * An implementation of the model object 'Many String Attribute Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyStringAttributePropertyImpl#getQuantifier Quantifier}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyStringAttributePropertyImpl#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ManyStringAttributePropertyImpl#getOperator Operator}
  • + *
+ * + * @generated + */ +public class ManyStringAttributePropertyImpl extends StatePropertyImpl implements ManyStringAttributeProperty { + /** + * The default value of the '{@link #getQuantifier() Quantifier}' attribute. + * + * + * @see #getQuantifier() + * @generated + * @ordered + */ + protected static final Quantifier QUANTIFIER_EDEFAULT = Quantifier.EXISTS; + + /** + * The cached value of the '{@link #getQuantifier() Quantifier}' attribute. + * + * + * @see #getQuantifier() + * @generated + * @ordered + */ + protected Quantifier quantifier = QUANTIFIER_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final ComparisonOperator OPERATOR_EDEFAULT = ComparisonOperator.EQUAL; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected ComparisonOperator operator = OPERATOR_EDEFAULT; + + /** + * + * + * @generated + */ + protected ManyStringAttributePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.MANY_STRING_ATTRIBUTE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public Quantifier getQuantifier() { + return quantifier; + } + + /** + * + * + * @generated + */ + public void setQuantifier(Quantifier newQuantifier) { + Quantifier oldQuantifier = quantifier; + quantifier = newQuantifier == null ? QUANTIFIER_EDEFAULT : newQuantifier; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER, oldQuantifier, quantifier)); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public ComparisonOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(ComparisonOperator newOperator) { + ComparisonOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER: + return getQuantifier(); + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__VALUE: + return getValue(); + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR: + return getOperator(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER: + setQuantifier((Quantifier)newValue); + return; + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__VALUE: + setValue((String)newValue); + return; + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator((ComparisonOperator)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER: + setQuantifier(QUANTIFIER_EDEFAULT); + return; + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER: + return quantifier != QUANTIFIER_EDEFAULT; + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (quantifier: "); + result.append(quantifier); + result.append(", value: "); + result.append(value); + result.append(", operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //ManyStringAttributePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/NegationTemporalPropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/NegationTemporalPropertyImpl.java new file mode 100644 index 000000000..3d3129d4a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/NegationTemporalPropertyImpl.java @@ -0,0 +1,176 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.TemporalProperty; + +/** + * + * An implementation of the model object 'Negation Temporal Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.NegationTemporalPropertyImpl#getFormula Formula}
  • + *
+ * + * @generated + */ +public abstract class NegationTemporalPropertyImpl

extends TemporalPropertyImpl implements NegationTemporalProperty

{ + /** + * The cached value of the '{@link #getFormula() Formula}' containment reference. + * + * + * @see #getFormula() + * @generated + * @ordered + */ + protected P formula; + + /** + * + * + * @generated + */ + protected NegationTemporalPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.NEGATION_TEMPORAL_PROPERTY; + } + + /** + * + * + * @generated + */ + public P getFormula() { + return formula; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFormula(P newFormula, NotificationChain msgs) { + P oldFormula = formula; + formula = newFormula; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA, oldFormula, newFormula); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setFormula(P newFormula) { + if (newFormula != formula) { + NotificationChain msgs = null; + if (formula != null) + msgs = ((InternalEObject)formula).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA, null, msgs); + if (newFormula != null) + msgs = ((InternalEObject)newFormula).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA, null, msgs); + msgs = basicSetFormula(newFormula, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA, newFormula, newFormula)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA: + return basicSetFormula(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA: + return getFormula(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA: + setFormula((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA: + setFormula((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.NEGATION_TEMPORAL_PROPERTY__FORMULA: + return formula != null; + } + return super.eIsSet(featureID); + } + +} //NegationTemporalPropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/NextPropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/NextPropertyImpl.java new file mode 100644 index 000000000..c370c4434 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/NextPropertyImpl.java @@ -0,0 +1,176 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.AbstractProperty; +import org.eclipse.gemoc.event.commons.model.property.NextProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * + * An implementation of the model object 'Next Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.NextPropertyImpl#getFormula Formula}
  • + *
+ * + * @generated + */ +public abstract class NextPropertyImpl

extends TemporalPropertyImpl implements NextProperty

{ + /** + * The cached value of the '{@link #getFormula() Formula}' containment reference. + * + * + * @see #getFormula() + * @generated + * @ordered + */ + protected P formula; + + /** + * + * + * @generated + */ + protected NextPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.NEXT_PROPERTY; + } + + /** + * + * + * @generated + */ + public P getFormula() { + return formula; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFormula(P newFormula, NotificationChain msgs) { + P oldFormula = formula; + formula = newFormula; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.NEXT_PROPERTY__FORMULA, oldFormula, newFormula); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setFormula(P newFormula) { + if (newFormula != formula) { + NotificationChain msgs = null; + if (formula != null) + msgs = ((InternalEObject)formula).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.NEXT_PROPERTY__FORMULA, null, msgs); + if (newFormula != null) + msgs = ((InternalEObject)newFormula).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.NEXT_PROPERTY__FORMULA, null, msgs); + msgs = basicSetFormula(newFormula, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.NEXT_PROPERTY__FORMULA, newFormula, newFormula)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.NEXT_PROPERTY__FORMULA: + return basicSetFormula(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.NEXT_PROPERTY__FORMULA: + return getFormula(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.NEXT_PROPERTY__FORMULA: + setFormula((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.NEXT_PROPERTY__FORMULA: + setFormula((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.NEXT_PROPERTY__FORMULA: + return formula != null; + } + return super.eIsSet(featureID); + } + +} //NextPropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyFactoryImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyFactoryImpl.java new file mode 100644 index 000000000..6088dfaad --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyFactoryImpl.java @@ -0,0 +1,321 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.gemoc.event.commons.model.property.*; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class PropertyFactoryImpl extends EFactoryImpl implements PropertyFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static PropertyFactory init() { + try { + PropertyFactory thePropertyFactory = (PropertyFactory)EPackage.Registry.INSTANCE.getEFactory(PropertyPackage.eNS_URI); + if (thePropertyFactory != null) { + return thePropertyFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new PropertyFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public PropertyFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case PropertyPackage.ABSTRACT_PROPERTY: return createAbstractProperty(); + case PropertyPackage.PROPERTY_REFERENCE: return createPropertyReference(); + case PropertyPackage.COMPOSITE_PROPERTY: return createCompositeProperty(); + case PropertyPackage.EVENT_PRECONDITION: return createEventPrecondition(); + case PropertyPackage.CONTAINER_REFERENCE_PROPERTY: return createContainerReferenceProperty(); + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY: return createManyBooleanAttributeProperty(); + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY: return createManyIntegerAttributeProperty(); + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY: return createManyStringAttributeProperty(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case PropertyPackage.UNARY_OPERATOR: + return createUnaryOperatorFromString(eDataType, initialValue); + case PropertyPackage.COMPARISON_OPERATOR: + return createComparisonOperatorFromString(eDataType, initialValue); + case PropertyPackage.BOOLEAN_OPERATOR: + return createBooleanOperatorFromString(eDataType, initialValue); + case PropertyPackage.QUANTIFIER: + return createQuantifierFromString(eDataType, initialValue); + case PropertyPackage.STEPPING: + return createSteppingFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case PropertyPackage.UNARY_OPERATOR: + return convertUnaryOperatorToString(eDataType, instanceValue); + case PropertyPackage.COMPARISON_OPERATOR: + return convertComparisonOperatorToString(eDataType, instanceValue); + case PropertyPackage.BOOLEAN_OPERATOR: + return convertBooleanOperatorToString(eDataType, instanceValue); + case PropertyPackage.QUANTIFIER: + return convertQuantifierToString(eDataType, instanceValue); + case PropertyPackage.STEPPING: + return convertSteppingToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public AbstractProperty createAbstractProperty() { + AbstractPropertyImpl abstractProperty = new AbstractPropertyImpl(); + return abstractProperty; + } + + /** + * + * + * @generated + */ + public

PropertyReference

createPropertyReference() { + PropertyReferenceImpl

propertyReference = new PropertyReferenceImpl

(); + return propertyReference; + } + + /** + * + * + * @generated + */ + public

CompositeProperty

createCompositeProperty() { + CompositePropertyImpl

compositeProperty = new CompositePropertyImpl

(); + return compositeProperty; + } + + /** + * + * + * @generated + */ + public EventPrecondition createEventPrecondition() { + EventPreconditionImpl eventPrecondition = new EventPreconditionImpl(); + return eventPrecondition; + } + + /** + * + * + * @generated + */ + public

, T> ContainerReferenceProperty createContainerReferenceProperty() { + ContainerReferencePropertyImpl containerReferenceProperty = new ContainerReferencePropertyImpl(); + return containerReferenceProperty; + } + + /** + * + * + * @generated + */ + public ManyBooleanAttributeProperty createManyBooleanAttributeProperty() { + ManyBooleanAttributePropertyImpl manyBooleanAttributeProperty = new ManyBooleanAttributePropertyImpl(); + return manyBooleanAttributeProperty; + } + + /** + * + * + * @generated + */ + public ManyIntegerAttributeProperty createManyIntegerAttributeProperty() { + ManyIntegerAttributePropertyImpl manyIntegerAttributeProperty = new ManyIntegerAttributePropertyImpl(); + return manyIntegerAttributeProperty; + } + + /** + * + * + * @generated + */ + public ManyStringAttributeProperty createManyStringAttributeProperty() { + ManyStringAttributePropertyImpl manyStringAttributeProperty = new ManyStringAttributePropertyImpl(); + return manyStringAttributeProperty; + } + + /** + * + * + * @generated + */ + public UnaryOperator createUnaryOperatorFromString(EDataType eDataType, String initialValue) { + UnaryOperator result = UnaryOperator.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertUnaryOperatorToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public ComparisonOperator createComparisonOperatorFromString(EDataType eDataType, String initialValue) { + ComparisonOperator result = ComparisonOperator.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertComparisonOperatorToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public BooleanOperator createBooleanOperatorFromString(EDataType eDataType, String initialValue) { + BooleanOperator result = BooleanOperator.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertBooleanOperatorToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public Quantifier createQuantifierFromString(EDataType eDataType, String initialValue) { + Quantifier result = Quantifier.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertQuantifierToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public Stepping createSteppingFromString(EDataType eDataType, String initialValue) { + Stepping result = Stepping.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertSteppingToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public PropertyPackage getPropertyPackage() { + return (PropertyPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static PropertyPackage getPackage() { + return PropertyPackage.eINSTANCE; + } + +} //PropertyFactoryImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyImpl.java new file mode 100644 index 000000000..e8f277518 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyImpl.java @@ -0,0 +1,37 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gemoc.event.commons.model.property.Property; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +/** + * + * An implementation of the model object 'Property'. + * + * + * @generated + */ +public abstract class PropertyImpl extends AbstractPropertyImpl implements Property { + /** + * + * + * @generated + */ + protected PropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.PROPERTY; + } + +} //PropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyPackageImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyPackageImpl.java new file mode 100644 index 000000000..89ec3e683 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyPackageImpl.java @@ -0,0 +1,1324 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.ETypeParameter; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.gemoc.event.commons.model.property.AbstractProperty; +import org.eclipse.gemoc.event.commons.model.property.BinaryProperty; +import org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.BooleanOperator; +import org.eclipse.gemoc.event.commons.model.property.ComparisonOperator; +import org.eclipse.gemoc.event.commons.model.property.CompositeProperty; +import org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty; +import org.eclipse.gemoc.event.commons.model.property.EventPrecondition; +import org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty; +import org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty; +import org.eclipse.gemoc.event.commons.model.property.NextProperty; +import org.eclipse.gemoc.event.commons.model.property.Property; +import org.eclipse.gemoc.event.commons.model.property.PropertyFactory; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.PropertyReference; +import org.eclipse.gemoc.event.commons.model.property.Quantifier; +import org.eclipse.gemoc.event.commons.model.property.ReleaseProperty; +import org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; +import org.eclipse.gemoc.event.commons.model.property.StepProperty; +import org.eclipse.gemoc.event.commons.model.property.Stepping; +import org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty; +import org.eclipse.gemoc.event.commons.model.property.TemporalProperty; +import org.eclipse.gemoc.event.commons.model.property.UnaryOperator; +import org.eclipse.gemoc.event.commons.model.property.UnaryProperty; +import org.eclipse.gemoc.event.commons.model.property.UntilProperty; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +import org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class PropertyPackageImpl extends EPackageImpl implements PropertyPackage { + /** + * + * + * @generated + */ + private EClass abstractPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass temporalPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass nextPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass untilPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass releasePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass negationTemporalPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass propertyEClass = null; + + /** + * + * + * @generated + */ + private EClass propertyReferenceEClass = null; + + /** + * + * + * @generated + */ + private EClass compositePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass eventPreconditionEClass = null; + + /** + * + * + * @generated + */ + private EClass stepPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass statePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass unaryPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass binaryPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass manyReferencePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass singleReferencePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass containerReferencePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass manyBooleanAttributePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass manyIntegerAttributePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass manyStringAttributePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass booleanAttributePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass integerAttributePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass stringAttributePropertyEClass = null; + + /** + * + * + * @generated + */ + private EEnum unaryOperatorEEnum = null; + + /** + * + * + * @generated + */ + private EEnum comparisonOperatorEEnum = null; + + /** + * + * + * @generated + */ + private EEnum booleanOperatorEEnum = null; + + /** + * + * + * @generated + */ + private EEnum quantifierEEnum = null; + + /** + * + * + * @generated + */ + private EEnum steppingEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage#eNS_URI + * @see #init() + * @generated + */ + private PropertyPackageImpl() { + super(eNS_URI, PropertyFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link PropertyPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static PropertyPackage init() { + if (isInited) return (PropertyPackage)EPackage.Registry.INSTANCE.getEPackage(PropertyPackage.eNS_URI); + + // Obtain or create and register package + PropertyPackageImpl thePropertyPackage = (PropertyPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PropertyPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PropertyPackageImpl()); + + isInited = true; + + // Obtain or create and register interdependencies + ScenarioPackageImpl theScenarioPackage = (ScenarioPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ScenarioPackage.eNS_URI) instanceof ScenarioPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ScenarioPackage.eNS_URI) : ScenarioPackage.eINSTANCE); + + // Create package meta-data objects + thePropertyPackage.createPackageContents(); + theScenarioPackage.createPackageContents(); + + // Initialize created meta-data + thePropertyPackage.initializePackageContents(); + theScenarioPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + thePropertyPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(PropertyPackage.eNS_URI, thePropertyPackage); + return thePropertyPackage; + } + + /** + * + * + * @generated + */ + public EClass getAbstractProperty() { + return abstractPropertyEClass; + } + + /** + * + * + * @generated + */ + public EClass getTemporalProperty() { + return temporalPropertyEClass; + } + + /** + * + * + * @generated + */ + public EClass getNextProperty() { + return nextPropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getNextProperty_Formula() { + return (EReference)nextPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getUntilProperty() { + return untilPropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getUntilProperty_LeftFormula() { + return (EReference)untilPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getUntilProperty_RightFormula() { + return (EReference)untilPropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getReleaseProperty() { + return releasePropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getReleaseProperty_LeftFormula() { + return (EReference)releasePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getReleaseProperty_RightFormula() { + return (EReference)releasePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getNegationTemporalProperty() { + return negationTemporalPropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getNegationTemporalProperty_Formula() { + return (EReference)negationTemporalPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getProperty() { + return propertyEClass; + } + + /** + * + * + * @generated + */ + public EClass getPropertyReference() { + return propertyReferenceEClass; + } + + /** + * + * + * @generated + */ + public EReference getPropertyReference_ReferencedProperty() { + return (EReference)propertyReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getCompositeProperty() { + return compositePropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getCompositeProperty_Properties() { + return (EReference)compositePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCompositeProperty_Operator() { + return (EAttribute)compositePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getEventPrecondition() { + return eventPreconditionEClass; + } + + /** + * + * + * @generated + */ + public EReference getEventPrecondition_Event() { + return (EReference)eventPreconditionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getStepProperty() { + return stepPropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getStepProperty_Stepping() { + return (EAttribute)stepPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getStepProperty_TargetProvider() { + return (EReference)stepPropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getStepProperty__GetOperation() { + return stepPropertyEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getStateProperty() { + return statePropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getStateProperty_Target() { + return (EReference)statePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getStateProperty__GetFeature() { + return statePropertyEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getUnaryProperty() { + return unaryPropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getUnaryProperty_Operator() { + return (EAttribute)unaryPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getUnaryProperty_Property() { + return (EReference)unaryPropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getBinaryProperty() { + return binaryPropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getBinaryProperty_Operator() { + return (EAttribute)binaryPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getBinaryProperty_Left() { + return (EReference)binaryPropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getBinaryProperty_Right() { + return (EReference)binaryPropertyEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getManyReferenceProperty() { + return manyReferencePropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getManyReferenceProperty_Property() { + return (EReference)manyReferencePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getManyReferenceProperty_Quantifier() { + return (EAttribute)manyReferencePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getSingleReferenceProperty() { + return singleReferencePropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getSingleReferenceProperty_Property() { + return (EReference)singleReferencePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getContainerReferenceProperty() { + return containerReferencePropertyEClass; + } + + /** + * + * + * @generated + */ + public EReference getContainerReferenceProperty_Property() { + return (EReference)containerReferencePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getManyBooleanAttributeProperty() { + return manyBooleanAttributePropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getManyBooleanAttributeProperty_Quantifier() { + return (EAttribute)manyBooleanAttributePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getManyBooleanAttributeProperty_Value() { + return (EAttribute)manyBooleanAttributePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getManyBooleanAttributeProperty_Operator() { + return (EAttribute)manyBooleanAttributePropertyEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getManyIntegerAttributeProperty() { + return manyIntegerAttributePropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getManyIntegerAttributeProperty_Quantifier() { + return (EAttribute)manyIntegerAttributePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getManyIntegerAttributeProperty_Value() { + return (EAttribute)manyIntegerAttributePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getManyIntegerAttributeProperty_Operator() { + return (EAttribute)manyIntegerAttributePropertyEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getManyStringAttributeProperty() { + return manyStringAttributePropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getManyStringAttributeProperty_Quantifier() { + return (EAttribute)manyStringAttributePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getManyStringAttributeProperty_Value() { + return (EAttribute)manyStringAttributePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getManyStringAttributeProperty_Operator() { + return (EAttribute)manyStringAttributePropertyEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getBooleanAttributeProperty() { + return booleanAttributePropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getBooleanAttributeProperty_Value() { + return (EAttribute)booleanAttributePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getBooleanAttributeProperty_Operator() { + return (EAttribute)booleanAttributePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getIntegerAttributeProperty() { + return integerAttributePropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getIntegerAttributeProperty_Value() { + return (EAttribute)integerAttributePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getIntegerAttributeProperty_Operator() { + return (EAttribute)integerAttributePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getStringAttributeProperty() { + return stringAttributePropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getStringAttributeProperty_Value() { + return (EAttribute)stringAttributePropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getStringAttributeProperty_Operator() { + return (EAttribute)stringAttributePropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EEnum getUnaryOperator() { + return unaryOperatorEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getComparisonOperator() { + return comparisonOperatorEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getBooleanOperator() { + return booleanOperatorEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getQuantifier() { + return quantifierEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getStepping() { + return steppingEEnum; + } + + /** + * + * + * @generated + */ + public PropertyFactory getPropertyFactory() { + return (PropertyFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + abstractPropertyEClass = createEClass(ABSTRACT_PROPERTY); + + temporalPropertyEClass = createEClass(TEMPORAL_PROPERTY); + + nextPropertyEClass = createEClass(NEXT_PROPERTY); + createEReference(nextPropertyEClass, NEXT_PROPERTY__FORMULA); + + untilPropertyEClass = createEClass(UNTIL_PROPERTY); + createEReference(untilPropertyEClass, UNTIL_PROPERTY__LEFT_FORMULA); + createEReference(untilPropertyEClass, UNTIL_PROPERTY__RIGHT_FORMULA); + + releasePropertyEClass = createEClass(RELEASE_PROPERTY); + createEReference(releasePropertyEClass, RELEASE_PROPERTY__LEFT_FORMULA); + createEReference(releasePropertyEClass, RELEASE_PROPERTY__RIGHT_FORMULA); + + negationTemporalPropertyEClass = createEClass(NEGATION_TEMPORAL_PROPERTY); + createEReference(negationTemporalPropertyEClass, NEGATION_TEMPORAL_PROPERTY__FORMULA); + + propertyEClass = createEClass(PROPERTY); + + propertyReferenceEClass = createEClass(PROPERTY_REFERENCE); + createEReference(propertyReferenceEClass, PROPERTY_REFERENCE__REFERENCED_PROPERTY); + + compositePropertyEClass = createEClass(COMPOSITE_PROPERTY); + createEReference(compositePropertyEClass, COMPOSITE_PROPERTY__PROPERTIES); + createEAttribute(compositePropertyEClass, COMPOSITE_PROPERTY__OPERATOR); + + eventPreconditionEClass = createEClass(EVENT_PRECONDITION); + createEReference(eventPreconditionEClass, EVENT_PRECONDITION__EVENT); + + stepPropertyEClass = createEClass(STEP_PROPERTY); + createEAttribute(stepPropertyEClass, STEP_PROPERTY__STEPPING); + createEReference(stepPropertyEClass, STEP_PROPERTY__TARGET_PROVIDER); + createEOperation(stepPropertyEClass, STEP_PROPERTY___GET_OPERATION); + + statePropertyEClass = createEClass(STATE_PROPERTY); + createEReference(statePropertyEClass, STATE_PROPERTY__TARGET); + createEOperation(statePropertyEClass, STATE_PROPERTY___GET_FEATURE); + + unaryPropertyEClass = createEClass(UNARY_PROPERTY); + createEAttribute(unaryPropertyEClass, UNARY_PROPERTY__OPERATOR); + createEReference(unaryPropertyEClass, UNARY_PROPERTY__PROPERTY); + + binaryPropertyEClass = createEClass(BINARY_PROPERTY); + createEAttribute(binaryPropertyEClass, BINARY_PROPERTY__OPERATOR); + createEReference(binaryPropertyEClass, BINARY_PROPERTY__LEFT); + createEReference(binaryPropertyEClass, BINARY_PROPERTY__RIGHT); + + manyReferencePropertyEClass = createEClass(MANY_REFERENCE_PROPERTY); + createEReference(manyReferencePropertyEClass, MANY_REFERENCE_PROPERTY__PROPERTY); + createEAttribute(manyReferencePropertyEClass, MANY_REFERENCE_PROPERTY__QUANTIFIER); + + singleReferencePropertyEClass = createEClass(SINGLE_REFERENCE_PROPERTY); + createEReference(singleReferencePropertyEClass, SINGLE_REFERENCE_PROPERTY__PROPERTY); + + containerReferencePropertyEClass = createEClass(CONTAINER_REFERENCE_PROPERTY); + createEReference(containerReferencePropertyEClass, CONTAINER_REFERENCE_PROPERTY__PROPERTY); + + manyBooleanAttributePropertyEClass = createEClass(MANY_BOOLEAN_ATTRIBUTE_PROPERTY); + createEAttribute(manyBooleanAttributePropertyEClass, MANY_BOOLEAN_ATTRIBUTE_PROPERTY__QUANTIFIER); + createEAttribute(manyBooleanAttributePropertyEClass, MANY_BOOLEAN_ATTRIBUTE_PROPERTY__VALUE); + createEAttribute(manyBooleanAttributePropertyEClass, MANY_BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR); + + manyIntegerAttributePropertyEClass = createEClass(MANY_INTEGER_ATTRIBUTE_PROPERTY); + createEAttribute(manyIntegerAttributePropertyEClass, MANY_INTEGER_ATTRIBUTE_PROPERTY__QUANTIFIER); + createEAttribute(manyIntegerAttributePropertyEClass, MANY_INTEGER_ATTRIBUTE_PROPERTY__VALUE); + createEAttribute(manyIntegerAttributePropertyEClass, MANY_INTEGER_ATTRIBUTE_PROPERTY__OPERATOR); + + manyStringAttributePropertyEClass = createEClass(MANY_STRING_ATTRIBUTE_PROPERTY); + createEAttribute(manyStringAttributePropertyEClass, MANY_STRING_ATTRIBUTE_PROPERTY__QUANTIFIER); + createEAttribute(manyStringAttributePropertyEClass, MANY_STRING_ATTRIBUTE_PROPERTY__VALUE); + createEAttribute(manyStringAttributePropertyEClass, MANY_STRING_ATTRIBUTE_PROPERTY__OPERATOR); + + booleanAttributePropertyEClass = createEClass(BOOLEAN_ATTRIBUTE_PROPERTY); + createEAttribute(booleanAttributePropertyEClass, BOOLEAN_ATTRIBUTE_PROPERTY__VALUE); + createEAttribute(booleanAttributePropertyEClass, BOOLEAN_ATTRIBUTE_PROPERTY__OPERATOR); + + integerAttributePropertyEClass = createEClass(INTEGER_ATTRIBUTE_PROPERTY); + createEAttribute(integerAttributePropertyEClass, INTEGER_ATTRIBUTE_PROPERTY__VALUE); + createEAttribute(integerAttributePropertyEClass, INTEGER_ATTRIBUTE_PROPERTY__OPERATOR); + + stringAttributePropertyEClass = createEClass(STRING_ATTRIBUTE_PROPERTY); + createEAttribute(stringAttributePropertyEClass, STRING_ATTRIBUTE_PROPERTY__VALUE); + createEAttribute(stringAttributePropertyEClass, STRING_ATTRIBUTE_PROPERTY__OPERATOR); + + // Create enums + unaryOperatorEEnum = createEEnum(UNARY_OPERATOR); + comparisonOperatorEEnum = createEEnum(COMPARISON_OPERATOR); + booleanOperatorEEnum = createEEnum(BOOLEAN_OPERATOR); + quantifierEEnum = createEEnum(QUANTIFIER); + steppingEEnum = createEEnum(STEPPING); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ScenarioPackage theScenarioPackage = (ScenarioPackage)EPackage.Registry.INSTANCE.getEPackage(ScenarioPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + ETypeParameter nextPropertyEClass_P = addETypeParameter(nextPropertyEClass, "P"); + ETypeParameter untilPropertyEClass_P = addETypeParameter(untilPropertyEClass, "P"); + ETypeParameter releasePropertyEClass_P = addETypeParameter(releasePropertyEClass, "P"); + ETypeParameter negationTemporalPropertyEClass_P = addETypeParameter(negationTemporalPropertyEClass, "P"); + ETypeParameter propertyReferenceEClass_P = addETypeParameter(propertyReferenceEClass, "P"); + ETypeParameter compositePropertyEClass_P = addETypeParameter(compositePropertyEClass, "P"); + ETypeParameter eventPreconditionEClass_E = addETypeParameter(eventPreconditionEClass, "E"); + ETypeParameter stepPropertyEClass_T = addETypeParameter(stepPropertyEClass, "T"); + ETypeParameter statePropertyEClass_T = addETypeParameter(statePropertyEClass, "T"); + ETypeParameter unaryPropertyEClass_P = addETypeParameter(unaryPropertyEClass, "P"); + ETypeParameter unaryPropertyEClass_T = addETypeParameter(unaryPropertyEClass, "T"); + ETypeParameter binaryPropertyEClass_P = addETypeParameter(binaryPropertyEClass, "P"); + ETypeParameter binaryPropertyEClass_T = addETypeParameter(binaryPropertyEClass, "T"); + ETypeParameter manyReferencePropertyEClass_P = addETypeParameter(manyReferencePropertyEClass, "P"); + ETypeParameter manyReferencePropertyEClass_T = addETypeParameter(manyReferencePropertyEClass, "T"); + ETypeParameter singleReferencePropertyEClass_P = addETypeParameter(singleReferencePropertyEClass, "P"); + ETypeParameter singleReferencePropertyEClass_T = addETypeParameter(singleReferencePropertyEClass, "T"); + ETypeParameter containerReferencePropertyEClass_P = addETypeParameter(containerReferencePropertyEClass, "P"); + ETypeParameter containerReferencePropertyEClass_T = addETypeParameter(containerReferencePropertyEClass, "T"); + ETypeParameter manyBooleanAttributePropertyEClass_T = addETypeParameter(manyBooleanAttributePropertyEClass, "T"); + ETypeParameter manyIntegerAttributePropertyEClass_T = addETypeParameter(manyIntegerAttributePropertyEClass, "T"); + ETypeParameter manyStringAttributePropertyEClass_T = addETypeParameter(manyStringAttributePropertyEClass, "T"); + ETypeParameter booleanAttributePropertyEClass_T = addETypeParameter(booleanAttributePropertyEClass, "T"); + ETypeParameter integerAttributePropertyEClass_T = addETypeParameter(integerAttributePropertyEClass, "T"); + ETypeParameter stringAttributePropertyEClass_T = addETypeParameter(stringAttributePropertyEClass, "T"); + + // Set bounds for type parameters + EGenericType g1 = createEGenericType(this.getAbstractProperty()); + nextPropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getAbstractProperty()); + untilPropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getAbstractProperty()); + releasePropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getTemporalProperty()); + negationTemporalPropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getProperty()); + propertyReferenceEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getProperty()); + compositePropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(theScenarioPackage.getEvent()); + eventPreconditionEClass_E.getEBounds().add(g1); + g1 = createEGenericType(this.getStateProperty()); + EGenericType g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + unaryPropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + binaryPropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + manyReferencePropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + singleReferencePropertyEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + containerReferencePropertyEClass_P.getEBounds().add(g1); + + // Add supertypes to classes + temporalPropertyEClass.getESuperTypes().add(this.getAbstractProperty()); + nextPropertyEClass.getESuperTypes().add(this.getTemporalProperty()); + untilPropertyEClass.getESuperTypes().add(this.getTemporalProperty()); + releasePropertyEClass.getESuperTypes().add(this.getTemporalProperty()); + negationTemporalPropertyEClass.getESuperTypes().add(this.getTemporalProperty()); + propertyEClass.getESuperTypes().add(this.getAbstractProperty()); + propertyReferenceEClass.getESuperTypes().add(this.getProperty()); + compositePropertyEClass.getESuperTypes().add(this.getProperty()); + eventPreconditionEClass.getESuperTypes().add(this.getProperty()); + stepPropertyEClass.getESuperTypes().add(this.getProperty()); + statePropertyEClass.getESuperTypes().add(this.getProperty()); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(unaryPropertyEClass_T); + g1.getETypeArguments().add(g2); + unaryPropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(binaryPropertyEClass_T); + g1.getETypeArguments().add(g2); + binaryPropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(manyReferencePropertyEClass_T); + g1.getETypeArguments().add(g2); + manyReferencePropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(singleReferencePropertyEClass_T); + g1.getETypeArguments().add(g2); + singleReferencePropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(containerReferencePropertyEClass_T); + g1.getETypeArguments().add(g2); + containerReferencePropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(manyBooleanAttributePropertyEClass_T); + g1.getETypeArguments().add(g2); + manyBooleanAttributePropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(manyIntegerAttributePropertyEClass_T); + g1.getETypeArguments().add(g2); + manyIntegerAttributePropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(manyStringAttributePropertyEClass_T); + g1.getETypeArguments().add(g2); + manyStringAttributePropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(booleanAttributePropertyEClass_T); + g1.getETypeArguments().add(g2); + booleanAttributePropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(integerAttributePropertyEClass_T); + g1.getETypeArguments().add(g2); + integerAttributePropertyEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStateProperty()); + g2 = createEGenericType(stringAttributePropertyEClass_T); + g1.getETypeArguments().add(g2); + stringAttributePropertyEClass.getEGenericSuperTypes().add(g1); + + // Initialize classes, features, and operations; add parameters + initEClass(abstractPropertyEClass, AbstractProperty.class, "AbstractProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(temporalPropertyEClass, TemporalProperty.class, "TemporalProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(nextPropertyEClass, NextProperty.class, "NextProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(nextPropertyEClass_P); + initEReference(getNextProperty_Formula(), g1, null, "formula", null, 0, 1, NextProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(untilPropertyEClass, UntilProperty.class, "UntilProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(untilPropertyEClass_P); + initEReference(getUntilProperty_LeftFormula(), g1, null, "leftFormula", null, 0, 1, UntilProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(untilPropertyEClass_P); + initEReference(getUntilProperty_RightFormula(), g1, null, "rightFormula", null, 0, 1, UntilProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(releasePropertyEClass, ReleaseProperty.class, "ReleaseProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(releasePropertyEClass_P); + initEReference(getReleaseProperty_LeftFormula(), g1, null, "leftFormula", null, 0, 1, ReleaseProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(releasePropertyEClass_P); + initEReference(getReleaseProperty_RightFormula(), g1, null, "rightFormula", null, 0, 1, ReleaseProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(negationTemporalPropertyEClass, NegationTemporalProperty.class, "NegationTemporalProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(negationTemporalPropertyEClass_P); + initEReference(getNegationTemporalProperty_Formula(), g1, null, "formula", null, 0, 1, NegationTemporalProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(propertyEClass, Property.class, "Property", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(propertyReferenceEClass, PropertyReference.class, "PropertyReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(propertyReferenceEClass_P); + initEReference(getPropertyReference_ReferencedProperty(), g1, null, "referencedProperty", null, 0, 1, PropertyReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositePropertyEClass, CompositeProperty.class, "CompositeProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(compositePropertyEClass_P); + initEReference(getCompositeProperty_Properties(), g1, null, "properties", null, 0, -1, CompositeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCompositeProperty_Operator(), this.getBooleanOperator(), "operator", null, 1, 1, CompositeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eventPreconditionEClass, EventPrecondition.class, "EventPrecondition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(eventPreconditionEClass_E); + initEReference(getEventPrecondition_Event(), g1, null, "event", null, 0, 1, EventPrecondition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stepPropertyEClass, StepProperty.class, "StepProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStepProperty_Stepping(), this.getStepping(), "stepping", null, 0, 1, StepProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(theScenarioPackage.getElementProvider()); + g2 = createEGenericType(stepPropertyEClass_T); + g1.getETypeArguments().add(g2); + initEReference(getStepProperty_TargetProvider(), g1, null, "targetProvider", null, 0, 1, StepProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getStepProperty__GetOperation(), theEcorePackage.getEOperation(), "getOperation", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(statePropertyEClass, StateProperty.class, "StateProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(statePropertyEClass_T); + initEReference(getStateProperty_Target(), g1, null, "target", null, 0, 1, StateProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getStateProperty__GetFeature(), theEcorePackage.getEStructuralFeature(), "getFeature", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(unaryPropertyEClass, UnaryProperty.class, "UnaryProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getUnaryProperty_Operator(), this.getUnaryOperator(), "operator", null, 1, 1, UnaryProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(unaryPropertyEClass_P); + initEReference(getUnaryProperty_Property(), g1, null, "property", null, 1, 1, UnaryProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(binaryPropertyEClass, BinaryProperty.class, "BinaryProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBinaryProperty_Operator(), this.getBooleanOperator(), "operator", null, 1, 1, BinaryProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(binaryPropertyEClass_P); + initEReference(getBinaryProperty_Left(), g1, null, "left", null, 1, 1, BinaryProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(binaryPropertyEClass_P); + initEReference(getBinaryProperty_Right(), g1, null, "right", null, 1, 1, BinaryProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(manyReferencePropertyEClass, ManyReferenceProperty.class, "ManyReferenceProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(manyReferencePropertyEClass_P); + initEReference(getManyReferenceProperty_Property(), g1, null, "property", null, 1, 1, ManyReferenceProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getManyReferenceProperty_Quantifier(), this.getQuantifier(), "quantifier", null, 0, 1, ManyReferenceProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(singleReferencePropertyEClass, SingleReferenceProperty.class, "SingleReferenceProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(singleReferencePropertyEClass_P); + initEReference(getSingleReferenceProperty_Property(), g1, null, "property", null, 0, 1, SingleReferenceProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(containerReferencePropertyEClass, ContainerReferenceProperty.class, "ContainerReferenceProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(containerReferencePropertyEClass_P); + initEReference(getContainerReferenceProperty_Property(), g1, null, "property", null, 0, 1, ContainerReferenceProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(manyBooleanAttributePropertyEClass, ManyBooleanAttributeProperty.class, "ManyBooleanAttributeProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getManyBooleanAttributeProperty_Quantifier(), this.getQuantifier(), "quantifier", null, 0, 1, ManyBooleanAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getManyBooleanAttributeProperty_Value(), theEcorePackage.getEBoolean(), "value", null, 0, 1, ManyBooleanAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getManyBooleanAttributeProperty_Operator(), this.getComparisonOperator(), "operator", null, 0, 1, ManyBooleanAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(manyIntegerAttributePropertyEClass, ManyIntegerAttributeProperty.class, "ManyIntegerAttributeProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getManyIntegerAttributeProperty_Quantifier(), this.getQuantifier(), "quantifier", null, 0, 1, ManyIntegerAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getManyIntegerAttributeProperty_Value(), theEcorePackage.getEInt(), "value", null, 0, 1, ManyIntegerAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getManyIntegerAttributeProperty_Operator(), this.getComparisonOperator(), "operator", null, 0, 1, ManyIntegerAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(manyStringAttributePropertyEClass, ManyStringAttributeProperty.class, "ManyStringAttributeProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getManyStringAttributeProperty_Quantifier(), this.getQuantifier(), "quantifier", null, 0, 1, ManyStringAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getManyStringAttributeProperty_Value(), theEcorePackage.getEString(), "value", null, 0, 1, ManyStringAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getManyStringAttributeProperty_Operator(), this.getComparisonOperator(), "operator", null, 0, 1, ManyStringAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(booleanAttributePropertyEClass, BooleanAttributeProperty.class, "BooleanAttributeProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBooleanAttributeProperty_Value(), theEcorePackage.getEBoolean(), "value", null, 0, 1, BooleanAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getBooleanAttributeProperty_Operator(), this.getComparisonOperator(), "operator", null, 0, 1, BooleanAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(integerAttributePropertyEClass, IntegerAttributeProperty.class, "IntegerAttributeProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIntegerAttributeProperty_Value(), theEcorePackage.getEInt(), "value", null, 0, 1, IntegerAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getIntegerAttributeProperty_Operator(), this.getComparisonOperator(), "operator", null, 0, 1, IntegerAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringAttributePropertyEClass, StringAttributeProperty.class, "StringAttributeProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStringAttributeProperty_Value(), theEcorePackage.getEString(), "value", null, 0, 1, StringAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getStringAttributeProperty_Operator(), this.getComparisonOperator(), "operator", null, 0, 1, StringAttributeProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(unaryOperatorEEnum, UnaryOperator.class, "UnaryOperator"); + addEEnumLiteral(unaryOperatorEEnum, UnaryOperator.NOT); + + initEEnum(comparisonOperatorEEnum, ComparisonOperator.class, "ComparisonOperator"); + addEEnumLiteral(comparisonOperatorEEnum, ComparisonOperator.EQUAL); + + initEEnum(booleanOperatorEEnum, BooleanOperator.class, "BooleanOperator"); + addEEnumLiteral(booleanOperatorEEnum, BooleanOperator.AND); + addEEnumLiteral(booleanOperatorEEnum, BooleanOperator.OR); + addEEnumLiteral(booleanOperatorEEnum, BooleanOperator.IMPLIES); + + initEEnum(quantifierEEnum, Quantifier.class, "Quantifier"); + addEEnumLiteral(quantifierEEnum, Quantifier.EXISTS); + addEEnumLiteral(quantifierEEnum, Quantifier.FORALL); + + initEEnum(steppingEEnum, Stepping.class, "Stepping"); + addEEnumLiteral(steppingEEnum, Stepping.ONGOING); + addEEnumLiteral(steppingEEnum, Stepping.ENDED); + addEEnumLiteral(steppingEEnum, Stepping.ENDING); + + // Create resource + createResource(eNS_URI); + } + +} //PropertyPackageImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyReferenceImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyReferenceImpl.java new file mode 100644 index 000000000..d77bb5c7c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/PropertyReferenceImpl.java @@ -0,0 +1,158 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.Property; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.PropertyReference; + +/** + * + * An implementation of the model object 'Reference'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.PropertyReferenceImpl#getReferencedProperty Referenced Property}
  • + *
+ * + * @generated + */ +public class PropertyReferenceImpl

extends PropertyImpl implements PropertyReference

{ + /** + * The cached value of the '{@link #getReferencedProperty() Referenced Property}' reference. + * + * + * @see #getReferencedProperty() + * @generated + * @ordered + */ + protected P referencedProperty; + + /** + * + * + * @generated + */ + protected PropertyReferenceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.PROPERTY_REFERENCE; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public P getReferencedProperty() { + if (referencedProperty != null && referencedProperty.eIsProxy()) { + InternalEObject oldReferencedProperty = (InternalEObject)referencedProperty; + referencedProperty = (P)eResolveProxy(oldReferencedProperty); + if (referencedProperty != oldReferencedProperty) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, PropertyPackage.PROPERTY_REFERENCE__REFERENCED_PROPERTY, oldReferencedProperty, referencedProperty)); + } + } + return referencedProperty; + } + + /** + * + * + * @generated + */ + public P basicGetReferencedProperty() { + return referencedProperty; + } + + /** + * + * + * @generated + */ + public void setReferencedProperty(P newReferencedProperty) { + P oldReferencedProperty = referencedProperty; + referencedProperty = newReferencedProperty; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.PROPERTY_REFERENCE__REFERENCED_PROPERTY, oldReferencedProperty, referencedProperty)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.PROPERTY_REFERENCE__REFERENCED_PROPERTY: + if (resolve) return getReferencedProperty(); + return basicGetReferencedProperty(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.PROPERTY_REFERENCE__REFERENCED_PROPERTY: + setReferencedProperty((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.PROPERTY_REFERENCE__REFERENCED_PROPERTY: + setReferencedProperty((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.PROPERTY_REFERENCE__REFERENCED_PROPERTY: + return referencedProperty != null; + } + return super.eIsSet(featureID); + } + +} //PropertyReferenceImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ReleasePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ReleasePropertyImpl.java new file mode 100644 index 000000000..0505aa634 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/ReleasePropertyImpl.java @@ -0,0 +1,242 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.AbstractProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.ReleaseProperty; + +/** + * + * An implementation of the model object 'Release Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ReleasePropertyImpl#getLeftFormula Left Formula}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.ReleasePropertyImpl#getRightFormula Right Formula}
  • + *
+ * + * @generated + */ +public abstract class ReleasePropertyImpl

extends TemporalPropertyImpl implements ReleaseProperty

{ + /** + * The cached value of the '{@link #getLeftFormula() Left Formula}' containment reference. + * + * + * @see #getLeftFormula() + * @generated + * @ordered + */ + protected P leftFormula; + + /** + * The cached value of the '{@link #getRightFormula() Right Formula}' containment reference. + * + * + * @see #getRightFormula() + * @generated + * @ordered + */ + protected P rightFormula; + + /** + * + * + * @generated + */ + protected ReleasePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.RELEASE_PROPERTY; + } + + /** + * + * + * @generated + */ + public P getLeftFormula() { + return leftFormula; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLeftFormula(P newLeftFormula, NotificationChain msgs) { + P oldLeftFormula = leftFormula; + leftFormula = newLeftFormula; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA, oldLeftFormula, newLeftFormula); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLeftFormula(P newLeftFormula) { + if (newLeftFormula != leftFormula) { + NotificationChain msgs = null; + if (leftFormula != null) + msgs = ((InternalEObject)leftFormula).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA, null, msgs); + if (newLeftFormula != null) + msgs = ((InternalEObject)newLeftFormula).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA, null, msgs); + msgs = basicSetLeftFormula(newLeftFormula, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA, newLeftFormula, newLeftFormula)); + } + + /** + * + * + * @generated + */ + public P getRightFormula() { + return rightFormula; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRightFormula(P newRightFormula, NotificationChain msgs) { + P oldRightFormula = rightFormula; + rightFormula = newRightFormula; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA, oldRightFormula, newRightFormula); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setRightFormula(P newRightFormula) { + if (newRightFormula != rightFormula) { + NotificationChain msgs = null; + if (rightFormula != null) + msgs = ((InternalEObject)rightFormula).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA, null, msgs); + if (newRightFormula != null) + msgs = ((InternalEObject)newRightFormula).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA, null, msgs); + msgs = basicSetRightFormula(newRightFormula, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA, newRightFormula, newRightFormula)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA: + return basicSetLeftFormula(null, msgs); + case PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA: + return basicSetRightFormula(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA: + return getLeftFormula(); + case PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA: + return getRightFormula(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA: + setLeftFormula((P)newValue); + return; + case PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA: + setRightFormula((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA: + setLeftFormula((P)null); + return; + case PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA: + setRightFormula((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.RELEASE_PROPERTY__LEFT_FORMULA: + return leftFormula != null; + case PropertyPackage.RELEASE_PROPERTY__RIGHT_FORMULA: + return rightFormula != null; + } + return super.eIsSet(featureID); + } + +} //ReleasePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/SingleReferencePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/SingleReferencePropertyImpl.java new file mode 100644 index 000000000..feb9708de --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/SingleReferencePropertyImpl.java @@ -0,0 +1,187 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +/** + * + * An implementation of the model object 'Single Reference Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.SingleReferencePropertyImpl#getProperty Property}
  • + *
+ * + * @generated + */ +public abstract class SingleReferencePropertyImpl

, T> extends StatePropertyImpl implements SingleReferenceProperty { + /** + * The cached value of the '{@link #getProperty() Property}' containment reference. + * + * + * @see #getProperty() + * @generated + * @ordered + */ + protected P property; + + /** + * + * + * @generated + */ + protected SingleReferencePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.SINGLE_REFERENCE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public P getProperty() { + return property; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetProperty(P newProperty, NotificationChain msgs) { + P oldProperty = property; + property = newProperty; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY, oldProperty, newProperty); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setProperty(P newProperty) { + if (newProperty != property) { + NotificationChain msgs = null; + if (property != null) + msgs = ((InternalEObject)property).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY, null, msgs); + if (newProperty != null) + msgs = ((InternalEObject)newProperty).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY, null, msgs); + msgs = basicSetProperty(newProperty, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY, newProperty, newProperty)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY: + return basicSetProperty(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY: + return getProperty(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY: + setProperty((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY: + setProperty((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.SINGLE_REFERENCE_PROPERTY__PROPERTY: + return property != null; + } + return super.eIsSet(featureID); + } + +} //SingleReferencePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StatePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StatePropertyImpl.java new file mode 100644 index 000000000..0d716ff53 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StatePropertyImpl.java @@ -0,0 +1,188 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +/** + * + * An implementation of the model object 'State Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.StatePropertyImpl#getTarget Target}
  • + *
+ * + * @generated + */ +public abstract class StatePropertyImpl extends PropertyImpl implements StateProperty { + /** + * The cached value of the '{@link #getTarget() Target}' reference. + * + * + * @see #getTarget() + * @generated + * @ordered + */ + protected T target; + + /** + * + * + * @generated + */ + protected StatePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.STATE_PROPERTY; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public T getTarget() { + if (target != null && ((EObject)target).eIsProxy()) { + InternalEObject oldTarget = (InternalEObject)target; + target = (T)eResolveProxy(oldTarget); + if (target != oldTarget) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, PropertyPackage.STATE_PROPERTY__TARGET, oldTarget, target)); + } + } + return target; + } + + /** + * + * + * @generated + */ + public T basicGetTarget() { + return target; + } + + /** + * + * + * @generated + */ + public void setTarget(T newTarget) { + T oldTarget = target; + target = newTarget; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.STATE_PROPERTY__TARGET, oldTarget, target)); + } + + /** + * + * + * @generated + */ + public EStructuralFeature getFeature() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.STATE_PROPERTY__TARGET: + if (resolve) return getTarget(); + return basicGetTarget(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.STATE_PROPERTY__TARGET: + setTarget((T)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.STATE_PROPERTY__TARGET: + setTarget((T)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.STATE_PROPERTY__TARGET: + return target != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case PropertyPackage.STATE_PROPERTY___GET_FEATURE: + return getFeature(); + } + return super.eInvoke(operationID, arguments); + } + +} //StatePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StepPropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StepPropertyImpl.java new file mode 100644 index 000000000..4cdc782f1 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StepPropertyImpl.java @@ -0,0 +1,276 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.StepProperty; +import org.eclipse.gemoc.event.commons.model.property.Stepping; + +import org.eclipse.gemoc.event.commons.model.scenario.ElementProvider; + +/** + * + * An implementation of the model object 'Step Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.StepPropertyImpl#getStepping Stepping}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.StepPropertyImpl#getTargetProvider Target Provider}
  • + *
+ * + * @generated + */ +public abstract class StepPropertyImpl extends PropertyImpl implements StepProperty { + /** + * The default value of the '{@link #getStepping() Stepping}' attribute. + * + * + * @see #getStepping() + * @generated + * @ordered + */ + protected static final Stepping STEPPING_EDEFAULT = Stepping.ONGOING; + + /** + * The cached value of the '{@link #getStepping() Stepping}' attribute. + * + * + * @see #getStepping() + * @generated + * @ordered + */ + protected Stepping stepping = STEPPING_EDEFAULT; + + /** + * The cached value of the '{@link #getTargetProvider() Target Provider}' containment reference. + * + * + * @see #getTargetProvider() + * @generated + * @ordered + */ + protected ElementProvider targetProvider; + + /** + * + * + * @generated + */ + protected StepPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.STEP_PROPERTY; + } + + /** + * + * + * @generated + */ + public Stepping getStepping() { + return stepping; + } + + /** + * + * + * @generated + */ + public void setStepping(Stepping newStepping) { + Stepping oldStepping = stepping; + stepping = newStepping == null ? STEPPING_EDEFAULT : newStepping; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.STEP_PROPERTY__STEPPING, oldStepping, stepping)); + } + + /** + * + * + * @generated + */ + public ElementProvider getTargetProvider() { + return targetProvider; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTargetProvider(ElementProvider newTargetProvider, NotificationChain msgs) { + ElementProvider oldTargetProvider = targetProvider; + targetProvider = newTargetProvider; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER, oldTargetProvider, newTargetProvider); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTargetProvider(ElementProvider newTargetProvider) { + if (newTargetProvider != targetProvider) { + NotificationChain msgs = null; + if (targetProvider != null) + msgs = ((InternalEObject)targetProvider).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER, null, msgs); + if (newTargetProvider != null) + msgs = ((InternalEObject)newTargetProvider).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER, null, msgs); + msgs = basicSetTargetProvider(newTargetProvider, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER, newTargetProvider, newTargetProvider)); + } + + /** + * + * + * @generated + */ + public EOperation getOperation() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER: + return basicSetTargetProvider(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.STEP_PROPERTY__STEPPING: + return getStepping(); + case PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER: + return getTargetProvider(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.STEP_PROPERTY__STEPPING: + setStepping((Stepping)newValue); + return; + case PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER: + setTargetProvider((ElementProvider)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.STEP_PROPERTY__STEPPING: + setStepping(STEPPING_EDEFAULT); + return; + case PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER: + setTargetProvider((ElementProvider)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.STEP_PROPERTY__STEPPING: + return stepping != STEPPING_EDEFAULT; + case PropertyPackage.STEP_PROPERTY__TARGET_PROVIDER: + return targetProvider != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case PropertyPackage.STEP_PROPERTY___GET_OPERATION: + return getOperation(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (stepping: "); + result.append(stepping); + result.append(')'); + return result.toString(); + } + +} //StepPropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StringAttributePropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StringAttributePropertyImpl.java new file mode 100644 index 000000000..5fded1523 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/StringAttributePropertyImpl.java @@ -0,0 +1,228 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.ComparisonOperator; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty; + +/** + * + * An implementation of the model object 'String Attribute Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.StringAttributePropertyImpl#getValue Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.StringAttributePropertyImpl#getOperator Operator}
  • + *
+ * + * @generated + */ +public abstract class StringAttributePropertyImpl extends StatePropertyImpl implements StringAttributeProperty { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final ComparisonOperator OPERATOR_EDEFAULT = ComparisonOperator.EQUAL; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected ComparisonOperator operator = OPERATOR_EDEFAULT; + + /** + * + * + * @generated + */ + protected StringAttributePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.STRING_ATTRIBUTE_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.STRING_ATTRIBUTE_PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public ComparisonOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(ComparisonOperator newOperator) { + ComparisonOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.STRING_ATTRIBUTE_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__VALUE: + return getValue(); + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__OPERATOR: + return getOperator(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__VALUE: + setValue((String)newValue); + return; + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator((ComparisonOperator)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(", operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //StringAttributePropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/TemporalPropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/TemporalPropertyImpl.java new file mode 100644 index 000000000..e69178524 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/TemporalPropertyImpl.java @@ -0,0 +1,37 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.TemporalProperty; + +/** + * + * An implementation of the model object 'Temporal Property'. + * + * + * @generated + */ +public abstract class TemporalPropertyImpl extends AbstractPropertyImpl implements TemporalProperty { + /** + * + * + * @generated + */ + protected TemporalPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.TEMPORAL_PROPERTY; + } + +} //TemporalPropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/UnaryPropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/UnaryPropertyImpl.java new file mode 100644 index 000000000..11c2f6c36 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/UnaryPropertyImpl.java @@ -0,0 +1,256 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; +import org.eclipse.gemoc.event.commons.model.property.UnaryOperator; +import org.eclipse.gemoc.event.commons.model.property.UnaryProperty; + +/** + * + * An implementation of the model object 'Unary Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.UnaryPropertyImpl#getOperator Operator}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.UnaryPropertyImpl#getProperty Property}
  • + *
+ * + * @generated + */ +public abstract class UnaryPropertyImpl

, T> extends StatePropertyImpl implements UnaryProperty { + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final UnaryOperator OPERATOR_EDEFAULT = UnaryOperator.NOT; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected UnaryOperator operator = OPERATOR_EDEFAULT; + + /** + * The cached value of the '{@link #getProperty() Property}' containment reference. + * + * + * @see #getProperty() + * @generated + * @ordered + */ + protected P property; + + /** + * + * + * @generated + */ + protected UnaryPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.UNARY_PROPERTY; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public void setTarget(T newTarget) { + super.setTarget(newTarget); + } + + /** + * + * + * @generated + */ + public UnaryOperator getOperator() { + return operator; + } + + /** + * + * + * @generated + */ + public void setOperator(UnaryOperator newOperator) { + UnaryOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.UNARY_PROPERTY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + public P getProperty() { + return property; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetProperty(P newProperty, NotificationChain msgs) { + P oldProperty = property; + property = newProperty; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.UNARY_PROPERTY__PROPERTY, oldProperty, newProperty); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setProperty(P newProperty) { + if (newProperty != property) { + NotificationChain msgs = null; + if (property != null) + msgs = ((InternalEObject)property).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.UNARY_PROPERTY__PROPERTY, null, msgs); + if (newProperty != null) + msgs = ((InternalEObject)newProperty).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.UNARY_PROPERTY__PROPERTY, null, msgs); + msgs = basicSetProperty(newProperty, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.UNARY_PROPERTY__PROPERTY, newProperty, newProperty)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.UNARY_PROPERTY__PROPERTY: + return basicSetProperty(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.UNARY_PROPERTY__OPERATOR: + return getOperator(); + case PropertyPackage.UNARY_PROPERTY__PROPERTY: + return getProperty(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.UNARY_PROPERTY__OPERATOR: + setOperator((UnaryOperator)newValue); + return; + case PropertyPackage.UNARY_PROPERTY__PROPERTY: + setProperty((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.UNARY_PROPERTY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + case PropertyPackage.UNARY_PROPERTY__PROPERTY: + setProperty((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.UNARY_PROPERTY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + case PropertyPackage.UNARY_PROPERTY__PROPERTY: + return property != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} //UnaryPropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/UntilPropertyImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/UntilPropertyImpl.java new file mode 100644 index 000000000..bc2ef1cae --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/impl/UntilPropertyImpl.java @@ -0,0 +1,242 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.AbstractProperty; +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; +import org.eclipse.gemoc.event.commons.model.property.UntilProperty; + +/** + * + * An implementation of the model object 'Until Property'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.UntilPropertyImpl#getLeftFormula Left Formula}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.property.impl.UntilPropertyImpl#getRightFormula Right Formula}
  • + *
+ * + * @generated + */ +public abstract class UntilPropertyImpl

extends TemporalPropertyImpl implements UntilProperty

{ + /** + * The cached value of the '{@link #getLeftFormula() Left Formula}' containment reference. + * + * + * @see #getLeftFormula() + * @generated + * @ordered + */ + protected P leftFormula; + + /** + * The cached value of the '{@link #getRightFormula() Right Formula}' containment reference. + * + * + * @see #getRightFormula() + * @generated + * @ordered + */ + protected P rightFormula; + + /** + * + * + * @generated + */ + protected UntilPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertyPackage.Literals.UNTIL_PROPERTY; + } + + /** + * + * + * @generated + */ + public P getLeftFormula() { + return leftFormula; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLeftFormula(P newLeftFormula, NotificationChain msgs) { + P oldLeftFormula = leftFormula; + leftFormula = newLeftFormula; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA, oldLeftFormula, newLeftFormula); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLeftFormula(P newLeftFormula) { + if (newLeftFormula != leftFormula) { + NotificationChain msgs = null; + if (leftFormula != null) + msgs = ((InternalEObject)leftFormula).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA, null, msgs); + if (newLeftFormula != null) + msgs = ((InternalEObject)newLeftFormula).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA, null, msgs); + msgs = basicSetLeftFormula(newLeftFormula, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA, newLeftFormula, newLeftFormula)); + } + + /** + * + * + * @generated + */ + public P getRightFormula() { + return rightFormula; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRightFormula(P newRightFormula, NotificationChain msgs) { + P oldRightFormula = rightFormula; + rightFormula = newRightFormula; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA, oldRightFormula, newRightFormula); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setRightFormula(P newRightFormula) { + if (newRightFormula != rightFormula) { + NotificationChain msgs = null; + if (rightFormula != null) + msgs = ((InternalEObject)rightFormula).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA, null, msgs); + if (newRightFormula != null) + msgs = ((InternalEObject)newRightFormula).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA, null, msgs); + msgs = basicSetRightFormula(newRightFormula, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA, newRightFormula, newRightFormula)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA: + return basicSetLeftFormula(null, msgs); + case PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA: + return basicSetRightFormula(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA: + return getLeftFormula(); + case PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA: + return getRightFormula(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA: + setLeftFormula((P)newValue); + return; + case PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA: + setRightFormula((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA: + setLeftFormula((P)null); + return; + case PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA: + setRightFormula((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertyPackage.UNTIL_PROPERTY__LEFT_FORMULA: + return leftFormula != null; + case PropertyPackage.UNTIL_PROPERTY__RIGHT_FORMULA: + return rightFormula != null; + } + return super.eIsSet(featureID); + } + +} //UntilPropertyImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/util/PropertyAdapterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/util/PropertyAdapterFactory.java new file mode 100644 index 000000000..4a080497a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/util/PropertyAdapterFactory.java @@ -0,0 +1,517 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.*; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage + * @generated + */ +public class PropertyAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static PropertyPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public PropertyAdapterFactory() { + if (modelPackage == null) { + modelPackage = PropertyPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected PropertySwitch modelSwitch = + new PropertySwitch() { + @Override + public Adapter caseAbstractProperty(AbstractProperty object) { + return createAbstractPropertyAdapter(); + } + @Override + public Adapter caseTemporalProperty(TemporalProperty object) { + return createTemporalPropertyAdapter(); + } + @Override + public

Adapter caseNextProperty(NextProperty

object) { + return createNextPropertyAdapter(); + } + @Override + public

Adapter caseUntilProperty(UntilProperty

object) { + return createUntilPropertyAdapter(); + } + @Override + public

Adapter caseReleaseProperty(ReleaseProperty

object) { + return createReleasePropertyAdapter(); + } + @Override + public

Adapter caseNegationTemporalProperty(NegationTemporalProperty

object) { + return createNegationTemporalPropertyAdapter(); + } + @Override + public Adapter caseProperty(Property object) { + return createPropertyAdapter(); + } + @Override + public

Adapter casePropertyReference(PropertyReference

object) { + return createPropertyReferenceAdapter(); + } + @Override + public

Adapter caseCompositeProperty(CompositeProperty

object) { + return createCompositePropertyAdapter(); + } + @Override + public Adapter caseEventPrecondition(EventPrecondition object) { + return createEventPreconditionAdapter(); + } + @Override + public Adapter caseStepProperty(StepProperty object) { + return createStepPropertyAdapter(); + } + @Override + public Adapter caseStateProperty(StateProperty object) { + return createStatePropertyAdapter(); + } + @Override + public

, T> Adapter caseUnaryProperty(UnaryProperty object) { + return createUnaryPropertyAdapter(); + } + @Override + public

, T> Adapter caseBinaryProperty(BinaryProperty object) { + return createBinaryPropertyAdapter(); + } + @Override + public

, T> Adapter caseManyReferenceProperty(ManyReferenceProperty object) { + return createManyReferencePropertyAdapter(); + } + @Override + public

, T> Adapter caseSingleReferenceProperty(SingleReferenceProperty object) { + return createSingleReferencePropertyAdapter(); + } + @Override + public

, T> Adapter caseContainerReferenceProperty(ContainerReferenceProperty object) { + return createContainerReferencePropertyAdapter(); + } + @Override + public Adapter caseManyBooleanAttributeProperty(ManyBooleanAttributeProperty object) { + return createManyBooleanAttributePropertyAdapter(); + } + @Override + public Adapter caseManyIntegerAttributeProperty(ManyIntegerAttributeProperty object) { + return createManyIntegerAttributePropertyAdapter(); + } + @Override + public Adapter caseManyStringAttributeProperty(ManyStringAttributeProperty object) { + return createManyStringAttributePropertyAdapter(); + } + @Override + public Adapter caseBooleanAttributeProperty(BooleanAttributeProperty object) { + return createBooleanAttributePropertyAdapter(); + } + @Override + public Adapter caseIntegerAttributeProperty(IntegerAttributeProperty object) { + return createIntegerAttributePropertyAdapter(); + } + @Override + public Adapter caseStringAttributeProperty(StringAttributeProperty object) { + return createStringAttributePropertyAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.AbstractProperty Abstract Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.AbstractProperty + * @generated + */ + public Adapter createAbstractPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.TemporalProperty Temporal Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.TemporalProperty + * @generated + */ + public Adapter createTemporalPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.NextProperty Next Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.NextProperty + * @generated + */ + public Adapter createNextPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.UntilProperty Until Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.UntilProperty + * @generated + */ + public Adapter createUntilPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.ReleaseProperty Release Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.ReleaseProperty + * @generated + */ + public Adapter createReleasePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty Negation Temporal Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.NegationTemporalProperty + * @generated + */ + public Adapter createNegationTemporalPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.Property Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.Property + * @generated + */ + public Adapter createPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.PropertyReference Reference}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.PropertyReference + * @generated + */ + public Adapter createPropertyReferenceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.CompositeProperty Composite Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.CompositeProperty + * @generated + */ + public Adapter createCompositePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.EventPrecondition Event Precondition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.EventPrecondition + * @generated + */ + public Adapter createEventPreconditionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.StepProperty Step Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.StepProperty + * @generated + */ + public Adapter createStepPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.StateProperty State Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.StateProperty + * @generated + */ + public Adapter createStatePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.UnaryProperty Unary Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.UnaryProperty + * @generated + */ + public Adapter createUnaryPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.BinaryProperty Binary Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.BinaryProperty + * @generated + */ + public Adapter createBinaryPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty Many Reference Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.ManyReferenceProperty + * @generated + */ + public Adapter createManyReferencePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty Single Reference Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.SingleReferenceProperty + * @generated + */ + public Adapter createSingleReferencePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty Container Reference Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.ContainerReferenceProperty + * @generated + */ + public Adapter createContainerReferencePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty Many Boolean Attribute Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.ManyBooleanAttributeProperty + * @generated + */ + public Adapter createManyBooleanAttributePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty Many Integer Attribute Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.ManyIntegerAttributeProperty + * @generated + */ + public Adapter createManyIntegerAttributePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty Many String Attribute Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.ManyStringAttributeProperty + * @generated + */ + public Adapter createManyStringAttributePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty Boolean Attribute Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.BooleanAttributeProperty + * @generated + */ + public Adapter createBooleanAttributePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty Integer Attribute Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.IntegerAttributeProperty + * @generated + */ + public Adapter createIntegerAttributePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty String Attribute Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.property.StringAttributeProperty + * @generated + */ + public Adapter createStringAttributePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //PropertyAdapterFactory diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/util/PropertySwitch.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/util/PropertySwitch.java new file mode 100644 index 000000000..e16cd362c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/property/util/PropertySwitch.java @@ -0,0 +1,627 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.property.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.gemoc.event.commons.model.property.*; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.gemoc.event.commons.model.property.PropertyPackage + * @generated + */ +public class PropertySwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static PropertyPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public PropertySwitch() { + if (modelPackage == null) { + modelPackage = PropertyPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T1 doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case PropertyPackage.ABSTRACT_PROPERTY: { + AbstractProperty abstractProperty = (AbstractProperty)theEObject; + T1 result = caseAbstractProperty(abstractProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.TEMPORAL_PROPERTY: { + TemporalProperty temporalProperty = (TemporalProperty)theEObject; + T1 result = caseTemporalProperty(temporalProperty); + if (result == null) result = caseAbstractProperty(temporalProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.NEXT_PROPERTY: { + NextProperty nextProperty = (NextProperty)theEObject; + T1 result = caseNextProperty(nextProperty); + if (result == null) result = caseTemporalProperty(nextProperty); + if (result == null) result = caseAbstractProperty(nextProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.UNTIL_PROPERTY: { + UntilProperty untilProperty = (UntilProperty)theEObject; + T1 result = caseUntilProperty(untilProperty); + if (result == null) result = caseTemporalProperty(untilProperty); + if (result == null) result = caseAbstractProperty(untilProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.RELEASE_PROPERTY: { + ReleaseProperty releaseProperty = (ReleaseProperty)theEObject; + T1 result = caseReleaseProperty(releaseProperty); + if (result == null) result = caseTemporalProperty(releaseProperty); + if (result == null) result = caseAbstractProperty(releaseProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.NEGATION_TEMPORAL_PROPERTY: { + NegationTemporalProperty negationTemporalProperty = (NegationTemporalProperty)theEObject; + T1 result = caseNegationTemporalProperty(negationTemporalProperty); + if (result == null) result = caseTemporalProperty(negationTemporalProperty); + if (result == null) result = caseAbstractProperty(negationTemporalProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.PROPERTY: { + Property property = (Property)theEObject; + T1 result = caseProperty(property); + if (result == null) result = caseAbstractProperty(property); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.PROPERTY_REFERENCE: { + PropertyReference propertyReference = (PropertyReference)theEObject; + T1 result = casePropertyReference(propertyReference); + if (result == null) result = caseProperty(propertyReference); + if (result == null) result = caseAbstractProperty(propertyReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.COMPOSITE_PROPERTY: { + CompositeProperty compositeProperty = (CompositeProperty)theEObject; + T1 result = caseCompositeProperty(compositeProperty); + if (result == null) result = caseProperty(compositeProperty); + if (result == null) result = caseAbstractProperty(compositeProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.EVENT_PRECONDITION: { + EventPrecondition eventPrecondition = (EventPrecondition)theEObject; + T1 result = caseEventPrecondition(eventPrecondition); + if (result == null) result = caseProperty(eventPrecondition); + if (result == null) result = caseAbstractProperty(eventPrecondition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.STEP_PROPERTY: { + StepProperty stepProperty = (StepProperty)theEObject; + T1 result = caseStepProperty(stepProperty); + if (result == null) result = caseProperty(stepProperty); + if (result == null) result = caseAbstractProperty(stepProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.STATE_PROPERTY: { + StateProperty stateProperty = (StateProperty)theEObject; + T1 result = caseStateProperty(stateProperty); + if (result == null) result = caseProperty(stateProperty); + if (result == null) result = caseAbstractProperty(stateProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.UNARY_PROPERTY: { + UnaryProperty unaryProperty = (UnaryProperty)theEObject; + T1 result = caseUnaryProperty(unaryProperty); + if (result == null) result = caseStateProperty(unaryProperty); + if (result == null) result = caseProperty(unaryProperty); + if (result == null) result = caseAbstractProperty(unaryProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.BINARY_PROPERTY: { + BinaryProperty binaryProperty = (BinaryProperty)theEObject; + T1 result = caseBinaryProperty(binaryProperty); + if (result == null) result = caseStateProperty(binaryProperty); + if (result == null) result = caseProperty(binaryProperty); + if (result == null) result = caseAbstractProperty(binaryProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.MANY_REFERENCE_PROPERTY: { + ManyReferenceProperty manyReferenceProperty = (ManyReferenceProperty)theEObject; + T1 result = caseManyReferenceProperty(manyReferenceProperty); + if (result == null) result = caseStateProperty(manyReferenceProperty); + if (result == null) result = caseProperty(manyReferenceProperty); + if (result == null) result = caseAbstractProperty(manyReferenceProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.SINGLE_REFERENCE_PROPERTY: { + SingleReferenceProperty singleReferenceProperty = (SingleReferenceProperty)theEObject; + T1 result = caseSingleReferenceProperty(singleReferenceProperty); + if (result == null) result = caseStateProperty(singleReferenceProperty); + if (result == null) result = caseProperty(singleReferenceProperty); + if (result == null) result = caseAbstractProperty(singleReferenceProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.CONTAINER_REFERENCE_PROPERTY: { + ContainerReferenceProperty containerReferenceProperty = (ContainerReferenceProperty)theEObject; + T1 result = caseContainerReferenceProperty(containerReferenceProperty); + if (result == null) result = caseStateProperty(containerReferenceProperty); + if (result == null) result = caseProperty(containerReferenceProperty); + if (result == null) result = caseAbstractProperty(containerReferenceProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.MANY_BOOLEAN_ATTRIBUTE_PROPERTY: { + ManyBooleanAttributeProperty manyBooleanAttributeProperty = (ManyBooleanAttributeProperty)theEObject; + T1 result = caseManyBooleanAttributeProperty(manyBooleanAttributeProperty); + if (result == null) result = caseStateProperty(manyBooleanAttributeProperty); + if (result == null) result = caseProperty(manyBooleanAttributeProperty); + if (result == null) result = caseAbstractProperty(manyBooleanAttributeProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.MANY_INTEGER_ATTRIBUTE_PROPERTY: { + ManyIntegerAttributeProperty manyIntegerAttributeProperty = (ManyIntegerAttributeProperty)theEObject; + T1 result = caseManyIntegerAttributeProperty(manyIntegerAttributeProperty); + if (result == null) result = caseStateProperty(manyIntegerAttributeProperty); + if (result == null) result = caseProperty(manyIntegerAttributeProperty); + if (result == null) result = caseAbstractProperty(manyIntegerAttributeProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.MANY_STRING_ATTRIBUTE_PROPERTY: { + ManyStringAttributeProperty manyStringAttributeProperty = (ManyStringAttributeProperty)theEObject; + T1 result = caseManyStringAttributeProperty(manyStringAttributeProperty); + if (result == null) result = caseStateProperty(manyStringAttributeProperty); + if (result == null) result = caseProperty(manyStringAttributeProperty); + if (result == null) result = caseAbstractProperty(manyStringAttributeProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.BOOLEAN_ATTRIBUTE_PROPERTY: { + BooleanAttributeProperty booleanAttributeProperty = (BooleanAttributeProperty)theEObject; + T1 result = caseBooleanAttributeProperty(booleanAttributeProperty); + if (result == null) result = caseStateProperty(booleanAttributeProperty); + if (result == null) result = caseProperty(booleanAttributeProperty); + if (result == null) result = caseAbstractProperty(booleanAttributeProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.INTEGER_ATTRIBUTE_PROPERTY: { + IntegerAttributeProperty integerAttributeProperty = (IntegerAttributeProperty)theEObject; + T1 result = caseIntegerAttributeProperty(integerAttributeProperty); + if (result == null) result = caseStateProperty(integerAttributeProperty); + if (result == null) result = caseProperty(integerAttributeProperty); + if (result == null) result = caseAbstractProperty(integerAttributeProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertyPackage.STRING_ATTRIBUTE_PROPERTY: { + StringAttributeProperty stringAttributeProperty = (StringAttributeProperty)theEObject; + T1 result = caseStringAttributeProperty(stringAttributeProperty); + if (result == null) result = caseStateProperty(stringAttributeProperty); + if (result == null) result = caseProperty(stringAttributeProperty); + if (result == null) result = caseAbstractProperty(stringAttributeProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseAbstractProperty(AbstractProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Temporal Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Temporal Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseTemporalProperty(TemporalProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Next Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Next Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

T1 caseNextProperty(NextProperty

object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Until Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Until Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

T1 caseUntilProperty(UntilProperty

object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Release Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Release Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

T1 caseReleaseProperty(ReleaseProperty

object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Negation Temporal Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Negation Temporal Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

T1 caseNegationTemporalProperty(NegationTemporalProperty

object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseProperty(Property object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

T1 casePropertyReference(PropertyReference

object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Composite Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Composite Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

T1 caseCompositeProperty(CompositeProperty

object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event Precondition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event Precondition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseEventPrecondition(EventPrecondition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Step Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Step Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseStepProperty(StepProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'State Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'State Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseStateProperty(StateProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Unary Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Unary Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

, T> T1 caseUnaryProperty(UnaryProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Binary Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Binary Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

, T> T1 caseBinaryProperty(BinaryProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Many Reference Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Many Reference Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

, T> T1 caseManyReferenceProperty(ManyReferenceProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Single Reference Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Single Reference Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

, T> T1 caseSingleReferenceProperty(SingleReferenceProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Container Reference Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Container Reference Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

, T> T1 caseContainerReferenceProperty(ContainerReferenceProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Many Boolean Attribute Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Many Boolean Attribute Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseManyBooleanAttributeProperty(ManyBooleanAttributeProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Many Integer Attribute Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Many Integer Attribute Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseManyIntegerAttributeProperty(ManyIntegerAttributeProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Many String Attribute Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Many String Attribute Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseManyStringAttributeProperty(ManyStringAttributeProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Boolean Attribute Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Boolean Attribute Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseBooleanAttributeProperty(BooleanAttributeProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Integer Attribute Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Integer Attribute Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseIntegerAttributeProperty(IntegerAttributeProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'String Attribute Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'String Attribute Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseStringAttributeProperty(StringAttributeProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T1 defaultCase(EObject object) { + return null; + } + +} //PropertySwitch diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/EventReport.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/EventReport.java new file mode 100644 index 000000000..a192e2a20 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/EventReport.java @@ -0,0 +1,125 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +/** + * + * A representation of the model object 'Event Report'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.report.EventReport#getEvent Event}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.report.EventReport#getMatches Matches}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.report.EventReport#getTarget Target}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.report.EventReport#getTime Time}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage#getEventReport() + * @model + * @generated + */ +public interface EventReport extends EObject { + /** + * Returns the value of the 'Event' reference. + * + *

+ * If the meaning of the 'Event' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Event' reference. + * @see #setEvent(Event) + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage#getEventReport_Event() + * @model + * @generated + */ + Event getEvent(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.report.EventReport#getEvent Event}' reference. + * + * + * @param value the new value of the 'Event' reference. + * @see #getEvent() + * @generated + */ + void setEvent(Event value); + + /** + * Returns the value of the 'Matches' reference list. + * The list contents are of type {@link org.eclipse.emf.ecore.EObject}. + * + *

+ * If the meaning of the 'Matches' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Matches' reference list. + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage#getEventReport_Matches() + * @model + * @generated + */ + EList getMatches(); + + /** + * Returns the value of the 'Target' reference. + * + *

+ * If the meaning of the 'Target' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target' reference. + * @see #setTarget(EObject) + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage#getEventReport_Target() + * @model + * @generated + */ + EObject getTarget(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.report.EventReport#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(EObject value); + + /** + * Returns the value of the 'Time' attribute. + * + *

+ * If the meaning of the 'Time' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Time' attribute. + * @see #setTime(int) + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage#getEventReport_Time() + * @model + * @generated + */ + int getTime(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.report.EventReport#getTime Time}' attribute. + * + * + * @param value the new value of the 'Time' attribute. + * @see #getTime() + * @generated + */ + void setTime(int value); + +} // EventReport diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/Report.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/Report.java new file mode 100644 index 000000000..02ff7d455 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/Report.java @@ -0,0 +1,42 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Report'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.report.Report#getEvents Events}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage#getReport() + * @model + * @generated + */ +public interface Report extends EObject { + /** + * Returns the value of the 'Events' containment reference list. + * The list contents are of type {@link org.eclipse.gemoc.event.commons.model.report.EventReport}. + * + *

+ * If the meaning of the 'Events' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Events' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage#getReport_Events() + * @model containment="true" + * @generated + */ + EList getEvents(); + +} // Report diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/ReportFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/ReportFactory.java new file mode 100644 index 000000000..76c995825 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/ReportFactory.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage + * @generated + */ +public interface ReportFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ReportFactory eINSTANCE = org.eclipse.gemoc.event.commons.model.report.impl.ReportFactoryImpl.init(); + + /** + * Returns a new object of class 'Report'. + * + * + * @return a new object of class 'Report'. + * @generated + */ + Report createReport(); + + /** + * Returns a new object of class 'Event Report'. + * + * + * @return a new object of class 'Event Report'. + * @generated + */ + EventReport createEventReport(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ReportPackage getReportPackage(); + +} //ReportFactory diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/ReportPackage.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/ReportPackage.java new file mode 100644 index 000000000..fd2f42057 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/ReportPackage.java @@ -0,0 +1,321 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.report.ReportFactory + * @model kind="package" + * @generated + */ +public interface ReportPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "report"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.gemoc.org/report"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "report"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ReportPackage eINSTANCE = org.eclipse.gemoc.event.commons.model.report.impl.ReportPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.report.impl.ReportImpl Report}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.report.impl.ReportImpl + * @see org.eclipse.gemoc.event.commons.model.report.impl.ReportPackageImpl#getReport() + * @generated + */ + int REPORT = 0; + + /** + * The feature id for the 'Events' containment reference list. + * + * + * @generated + * @ordered + */ + int REPORT__EVENTS = 0; + + /** + * The number of structural features of the 'Report' class. + * + * + * @generated + * @ordered + */ + int REPORT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Report' class. + * + * + * @generated + * @ordered + */ + int REPORT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.report.impl.EventReportImpl Event Report}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.report.impl.EventReportImpl + * @see org.eclipse.gemoc.event.commons.model.report.impl.ReportPackageImpl#getEventReport() + * @generated + */ + int EVENT_REPORT = 1; + + /** + * The feature id for the 'Event' reference. + * + * + * @generated + * @ordered + */ + int EVENT_REPORT__EVENT = 0; + + /** + * The feature id for the 'Matches' reference list. + * + * + * @generated + * @ordered + */ + int EVENT_REPORT__MATCHES = 1; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int EVENT_REPORT__TARGET = 2; + + /** + * The feature id for the 'Time' attribute. + * + * + * @generated + * @ordered + */ + int EVENT_REPORT__TIME = 3; + + /** + * The number of structural features of the 'Event Report' class. + * + * + * @generated + * @ordered + */ + int EVENT_REPORT_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Event Report' class. + * + * + * @generated + * @ordered + */ + int EVENT_REPORT_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.report.Report Report}'. + * + * + * @return the meta object for class 'Report'. + * @see org.eclipse.gemoc.event.commons.model.report.Report + * @generated + */ + EClass getReport(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.report.Report#getEvents Events}'. + * + * + * @return the meta object for the containment reference list 'Events'. + * @see org.eclipse.gemoc.event.commons.model.report.Report#getEvents() + * @see #getReport() + * @generated + */ + EReference getReport_Events(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.report.EventReport Event Report}'. + * + * + * @return the meta object for class 'Event Report'. + * @see org.eclipse.gemoc.event.commons.model.report.EventReport + * @generated + */ + EClass getEventReport(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.report.EventReport#getEvent Event}'. + * + * + * @return the meta object for the reference 'Event'. + * @see org.eclipse.gemoc.event.commons.model.report.EventReport#getEvent() + * @see #getEventReport() + * @generated + */ + EReference getEventReport_Event(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.report.EventReport#getMatches Matches}'. + * + * + * @return the meta object for the reference list 'Matches'. + * @see org.eclipse.gemoc.event.commons.model.report.EventReport#getMatches() + * @see #getEventReport() + * @generated + */ + EReference getEventReport_Matches(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.report.EventReport#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see org.eclipse.gemoc.event.commons.model.report.EventReport#getTarget() + * @see #getEventReport() + * @generated + */ + EReference getEventReport_Target(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.report.EventReport#getTime Time}'. + * + * + * @return the meta object for the attribute 'Time'. + * @see org.eclipse.gemoc.event.commons.model.report.EventReport#getTime() + * @see #getEventReport() + * @generated + */ + EAttribute getEventReport_Time(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ReportFactory getReportFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.report.impl.ReportImpl Report}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.report.impl.ReportImpl + * @see org.eclipse.gemoc.event.commons.model.report.impl.ReportPackageImpl#getReport() + * @generated + */ + EClass REPORT = eINSTANCE.getReport(); + + /** + * The meta object literal for the 'Events' containment reference list feature. + * + * + * @generated + */ + EReference REPORT__EVENTS = eINSTANCE.getReport_Events(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.report.impl.EventReportImpl Event Report}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.report.impl.EventReportImpl + * @see org.eclipse.gemoc.event.commons.model.report.impl.ReportPackageImpl#getEventReport() + * @generated + */ + EClass EVENT_REPORT = eINSTANCE.getEventReport(); + + /** + * The meta object literal for the 'Event' reference feature. + * + * + * @generated + */ + EReference EVENT_REPORT__EVENT = eINSTANCE.getEventReport_Event(); + + /** + * The meta object literal for the 'Matches' reference list feature. + * + * + * @generated + */ + EReference EVENT_REPORT__MATCHES = eINSTANCE.getEventReport_Matches(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference EVENT_REPORT__TARGET = eINSTANCE.getEventReport_Target(); + + /** + * The meta object literal for the 'Time' attribute feature. + * + * + * @generated + */ + EAttribute EVENT_REPORT__TIME = eINSTANCE.getEventReport_Time(); + + } + +} //ReportPackage diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/EventReportImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/EventReportImpl.java new file mode 100644 index 000000000..b42e0c886 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/EventReportImpl.java @@ -0,0 +1,328 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +import org.eclipse.gemoc.event.commons.model.report.EventReport; +import org.eclipse.gemoc.event.commons.model.report.ReportPackage; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; + +/** + * + * An implementation of the model object 'Event Report'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.report.impl.EventReportImpl#getEvent Event}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.report.impl.EventReportImpl#getMatches Matches}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.report.impl.EventReportImpl#getTarget Target}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.report.impl.EventReportImpl#getTime Time}
  • + *
+ * + * @generated + */ +public class EventReportImpl extends MinimalEObjectImpl.Container implements EventReport { + /** + * The cached value of the '{@link #getEvent() Event}' reference. + * + * + * @see #getEvent() + * @generated + * @ordered + */ + protected Event event; + + /** + * The cached value of the '{@link #getMatches() Matches}' reference list. + * + * + * @see #getMatches() + * @generated + * @ordered + */ + protected EList matches; + + /** + * The cached value of the '{@link #getTarget() Target}' reference. + * + * + * @see #getTarget() + * @generated + * @ordered + */ + protected EObject target; + + /** + * The default value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected static final int TIME_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected int time = TIME_EDEFAULT; + + /** + * + * + * @generated + */ + protected EventReportImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ReportPackage.Literals.EVENT_REPORT; + } + + /** + * + * + * @generated + */ + public Event getEvent() { + if (event != null && event.eIsProxy()) { + InternalEObject oldEvent = (InternalEObject)event; + event = (Event)eResolveProxy(oldEvent); + if (event != oldEvent) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReportPackage.EVENT_REPORT__EVENT, oldEvent, event)); + } + } + return event; + } + + /** + * + * + * @generated + */ + public Event basicGetEvent() { + return event; + } + + /** + * + * + * @generated + */ + public void setEvent(Event newEvent) { + Event oldEvent = event; + event = newEvent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ReportPackage.EVENT_REPORT__EVENT, oldEvent, event)); + } + + /** + * + * + * @generated + */ + public EList getMatches() { + if (matches == null) { + matches = new EObjectResolvingEList(EObject.class, this, ReportPackage.EVENT_REPORT__MATCHES); + } + return matches; + } + + /** + * + * + * @generated + */ + public EObject getTarget() { + if (target != null && target.eIsProxy()) { + InternalEObject oldTarget = (InternalEObject)target; + target = eResolveProxy(oldTarget); + if (target != oldTarget) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReportPackage.EVENT_REPORT__TARGET, oldTarget, target)); + } + } + return target; + } + + /** + * + * + * @generated + */ + public EObject basicGetTarget() { + return target; + } + + /** + * + * + * @generated + */ + public void setTarget(EObject newTarget) { + EObject oldTarget = target; + target = newTarget; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ReportPackage.EVENT_REPORT__TARGET, oldTarget, target)); + } + + /** + * + * + * @generated + */ + public int getTime() { + return time; + } + + /** + * + * + * @generated + */ + public void setTime(int newTime) { + int oldTime = time; + time = newTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ReportPackage.EVENT_REPORT__TIME, oldTime, time)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ReportPackage.EVENT_REPORT__EVENT: + if (resolve) return getEvent(); + return basicGetEvent(); + case ReportPackage.EVENT_REPORT__MATCHES: + return getMatches(); + case ReportPackage.EVENT_REPORT__TARGET: + if (resolve) return getTarget(); + return basicGetTarget(); + case ReportPackage.EVENT_REPORT__TIME: + return getTime(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ReportPackage.EVENT_REPORT__EVENT: + setEvent((Event)newValue); + return; + case ReportPackage.EVENT_REPORT__MATCHES: + getMatches().clear(); + getMatches().addAll((Collection)newValue); + return; + case ReportPackage.EVENT_REPORT__TARGET: + setTarget((EObject)newValue); + return; + case ReportPackage.EVENT_REPORT__TIME: + setTime((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ReportPackage.EVENT_REPORT__EVENT: + setEvent((Event)null); + return; + case ReportPackage.EVENT_REPORT__MATCHES: + getMatches().clear(); + return; + case ReportPackage.EVENT_REPORT__TARGET: + setTarget((EObject)null); + return; + case ReportPackage.EVENT_REPORT__TIME: + setTime(TIME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ReportPackage.EVENT_REPORT__EVENT: + return event != null; + case ReportPackage.EVENT_REPORT__MATCHES: + return matches != null && !matches.isEmpty(); + case ReportPackage.EVENT_REPORT__TARGET: + return target != null; + case ReportPackage.EVENT_REPORT__TIME: + return time != TIME_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (time: "); + result.append(time); + result.append(')'); + return result.toString(); + } + +} //EventReportImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportFactoryImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportFactoryImpl.java new file mode 100644 index 000000000..60ae0b0da --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportFactoryImpl.java @@ -0,0 +1,106 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.gemoc.event.commons.model.report.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ReportFactoryImpl extends EFactoryImpl implements ReportFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ReportFactory init() { + try { + ReportFactory theReportFactory = (ReportFactory)EPackage.Registry.INSTANCE.getEFactory(ReportPackage.eNS_URI); + if (theReportFactory != null) { + return theReportFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ReportFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ReportFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ReportPackage.REPORT: return createReport(); + case ReportPackage.EVENT_REPORT: return createEventReport(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Report createReport() { + ReportImpl report = new ReportImpl(); + return report; + } + + /** + * + * + * @generated + */ + public EventReport createEventReport() { + EventReportImpl eventReport = new EventReportImpl(); + return eventReport; + } + + /** + * + * + * @generated + */ + public ReportPackage getReportPackage() { + return (ReportPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ReportPackage getPackage() { + return ReportPackage.eINSTANCE; + } + +} //ReportFactoryImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportImpl.java new file mode 100644 index 000000000..b2c4729a9 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportImpl.java @@ -0,0 +1,152 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.report.EventReport; +import org.eclipse.gemoc.event.commons.model.report.Report; +import org.eclipse.gemoc.event.commons.model.report.ReportPackage; + +/** + * + * An implementation of the model object 'Report'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.report.impl.ReportImpl#getEvents Events}
  • + *
+ * + * @generated + */ +public class ReportImpl extends MinimalEObjectImpl.Container implements Report { + /** + * The cached value of the '{@link #getEvents() Events}' containment reference list. + * + * + * @see #getEvents() + * @generated + * @ordered + */ + protected EList events; + + /** + * + * + * @generated + */ + protected ReportImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ReportPackage.Literals.REPORT; + } + + /** + * + * + * @generated + */ + public EList getEvents() { + if (events == null) { + events = new EObjectContainmentEList(EventReport.class, this, ReportPackage.REPORT__EVENTS); + } + return events; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ReportPackage.REPORT__EVENTS: + return ((InternalEList)getEvents()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ReportPackage.REPORT__EVENTS: + return getEvents(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ReportPackage.REPORT__EVENTS: + getEvents().clear(); + getEvents().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ReportPackage.REPORT__EVENTS: + getEvents().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ReportPackage.REPORT__EVENTS: + return events != null && !events.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ReportImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportPackageImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportPackageImpl.java new file mode 100644 index 000000000..ea0c37ecb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/impl/ReportPackageImpl.java @@ -0,0 +1,248 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.gemoc.event.commons.model.report.EventReport; +import org.eclipse.gemoc.event.commons.model.report.Report; +import org.eclipse.gemoc.event.commons.model.report.ReportFactory; +import org.eclipse.gemoc.event.commons.model.report.ReportPackage; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ReportPackageImpl extends EPackageImpl implements ReportPackage { + /** + * + * + * @generated + */ + private EClass reportEClass = null; + + /** + * + * + * @generated + */ + private EClass eventReportEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage#eNS_URI + * @see #init() + * @generated + */ + private ReportPackageImpl() { + super(eNS_URI, ReportFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ReportPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ReportPackage init() { + if (isInited) return (ReportPackage)EPackage.Registry.INSTANCE.getEPackage(ReportPackage.eNS_URI); + + // Obtain or create and register package + ReportPackageImpl theReportPackage = (ReportPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ReportPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ReportPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theReportPackage.createPackageContents(); + + // Initialize created meta-data + theReportPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theReportPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ReportPackage.eNS_URI, theReportPackage); + return theReportPackage; + } + + /** + * + * + * @generated + */ + public EClass getReport() { + return reportEClass; + } + + /** + * + * + * @generated + */ + public EReference getReport_Events() { + return (EReference)reportEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getEventReport() { + return eventReportEClass; + } + + /** + * + * + * @generated + */ + public EReference getEventReport_Event() { + return (EReference)eventReportEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getEventReport_Matches() { + return (EReference)eventReportEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getEventReport_Target() { + return (EReference)eventReportEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getEventReport_Time() { + return (EAttribute)eventReportEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public ReportFactory getReportFactory() { + return (ReportFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + reportEClass = createEClass(REPORT); + createEReference(reportEClass, REPORT__EVENTS); + + eventReportEClass = createEClass(EVENT_REPORT); + createEReference(eventReportEClass, EVENT_REPORT__EVENT); + createEReference(eventReportEClass, EVENT_REPORT__MATCHES); + createEReference(eventReportEClass, EVENT_REPORT__TARGET); + createEAttribute(eventReportEClass, EVENT_REPORT__TIME); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ScenarioPackage theScenarioPackage = (ScenarioPackage)EPackage.Registry.INSTANCE.getEPackage(ScenarioPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass(reportEClass, Report.class, "Report", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getReport_Events(), this.getEventReport(), null, "events", null, 0, -1, Report.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eventReportEClass, EventReport.class, "EventReport", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getEventReport_Event(), theScenarioPackage.getEvent(), null, "event", null, 0, 1, EventReport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getEventReport_Matches(), ecorePackage.getEObject(), null, "matches", null, 0, -1, EventReport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getEventReport_Target(), ecorePackage.getEObject(), null, "target", null, 0, 1, EventReport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEventReport_Time(), ecorePackage.getEInt(), "time", null, 0, 1, EventReport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ReportPackageImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/util/ReportAdapterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/util/ReportAdapterFactory.java new file mode 100644 index 000000000..4a43b180d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/util/ReportAdapterFactory.java @@ -0,0 +1,138 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.report.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage + * @generated + */ +public class ReportAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ReportPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ReportAdapterFactory() { + if (modelPackage == null) { + modelPackage = ReportPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ReportSwitch modelSwitch = + new ReportSwitch() { + @Override + public Adapter caseReport(Report object) { + return createReportAdapter(); + } + @Override + public Adapter caseEventReport(EventReport object) { + return createEventReportAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.report.Report Report}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.report.Report + * @generated + */ + public Adapter createReportAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.report.EventReport Event Report}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.report.EventReport + * @generated + */ + public Adapter createEventReportAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ReportAdapterFactory diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/util/ReportSwitch.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/util/ReportSwitch.java new file mode 100644 index 000000000..0cccdf73c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/report/util/ReportSwitch.java @@ -0,0 +1,131 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.report.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.gemoc.event.commons.model.report.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.gemoc.event.commons.model.report.ReportPackage + * @generated + */ +public class ReportSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ReportPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ReportSwitch() { + if (modelPackage == null) { + modelPackage = ReportPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ReportPackage.REPORT: { + Report report = (Report)theEObject; + T result = caseReport(report); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ReportPackage.EVENT_REPORT: { + EventReport eventReport = (EventReport)theEObject; + T result = caseEventReport(eventReport); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Report'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Report'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseReport(Report object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event Report'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event Report'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEventReport(EventReport object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ReportSwitch diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Arbiter.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Arbiter.java new file mode 100644 index 000000000..3fd42e838 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Arbiter.java @@ -0,0 +1,129 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'Arbiter'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getStates States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getTransitions Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getInitialState Initial State}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getAcceptingStates Accepting States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getName Name}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiter() + * @model abstract="true" + * @generated + */ +public interface Arbiter

, T extends ArbiterTransition> extends EObject { + /** + * Returns the value of the 'States' containment reference list. + * + *

+ * If the meaning of the 'States' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'States' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiter_States() + * @model containment="true" + * @generated + */ + EList getStates(); + + /** + * Returns the value of the 'Transitions' containment reference list. + * + *

+ * If the meaning of the 'Transitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Transitions' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiter_Transitions() + * @model containment="true" + * @generated + */ + EList getTransitions(); + + /** + * Returns the value of the 'Initial State' reference. + * + *

+ * If the meaning of the 'Initial State' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Initial State' reference. + * @see #setInitialState(ArbiterState) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiter_InitialState() + * @model + * @generated + */ + S getInitialState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getInitialState Initial State}' reference. + * + * + * @param value the new value of the 'Initial State' reference. + * @see #getInitialState() + * @generated + */ + void setInitialState(S value); + + /** + * Returns the value of the 'Accepting States' reference list. + * + *

+ * If the meaning of the 'Accepting States' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Accepting States' reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiter_AcceptingStates() + * @model + * @generated + */ + EList getAcceptingStates(); + + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiter_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // Arbiter diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ArbiterState.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ArbiterState.java new file mode 100644 index 000000000..74294a658 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ArbiterState.java @@ -0,0 +1,120 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'Arbiter State'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getIncomingTransitions Incoming Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getOutgoingTransitions Outgoing Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getTruthValue Truth Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getName Name}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterState() + * @model + * @generated + */ +public interface ArbiterState

> extends EObject { + /** + * Returns the value of the 'Incoming Transitions' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getTarget Target}'. + * + *

+ * If the meaning of the 'Incoming Transitions' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Incoming Transitions' reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterState_IncomingTransitions() + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getTarget + * @model opposite="target" + * @generated + */ + EList getIncomingTransitions(); + + /** + * Returns the value of the 'Outgoing Transitions' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getSource Source}'. + * + *

+ * If the meaning of the 'Outgoing Transitions' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Outgoing Transitions' reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterState_OutgoingTransitions() + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getSource + * @model opposite="source" + * @generated + */ + EList getOutgoingTransitions(); + + /** + * Returns the value of the 'Truth Value' attribute. + * The literals are from the enumeration {@link org.eclipse.gemoc.event.commons.model.scenario.TruthValue}. + * + *

+ * If the meaning of the 'Truth Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Truth Value' attribute. + * @see org.eclipse.gemoc.event.commons.model.scenario.TruthValue + * @see #setTruthValue(TruthValue) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterState_TruthValue() + * @model required="true" + * @generated + */ + TruthValue getTruthValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getTruthValue Truth Value}' attribute. + * + * + * @param value the new value of the 'Truth Value' attribute. + * @see org.eclipse.gemoc.event.commons.model.scenario.TruthValue + * @see #getTruthValue() + * @generated + */ + void setTruthValue(TruthValue value); + + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterState_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ArbiterState diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ArbiterTransition.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ArbiterTransition.java new file mode 100644 index 000000000..0eb33c0db --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ArbiterTransition.java @@ -0,0 +1,137 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'Arbiter Transition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getGuard Guard}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getSource Source}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getTarget Target}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getName Name}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterTransition() + * @model + * @generated + */ +public interface ArbiterTransition

> extends EObject { + /** + * Returns the value of the 'Guard' containment reference. + * + *

+ * If the meaning of the 'Guard' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Guard' containment reference. + * @see #setGuard(Property) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterTransition_Guard() + * @model containment="true" + * @generated + */ + P getGuard(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getGuard Guard}' containment reference. + * + * + * @param value the new value of the 'Guard' containment reference. + * @see #getGuard() + * @generated + */ + void setGuard(P value); + + /** + * Returns the value of the 'Source' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getOutgoingTransitions Outgoing Transitions}'. + * + *

+ * If the meaning of the 'Source' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Source' reference. + * @see #setSource(ArbiterState) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterTransition_Source() + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getOutgoingTransitions + * @model opposite="outgoingTransitions" required="true" + * @generated + */ + S getSource(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getSource Source}' reference. + * + * + * @param value the new value of the 'Source' reference. + * @see #getSource() + * @generated + */ + void setSource(S value); + + /** + * Returns the value of the 'Target' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getIncomingTransitions Incoming Transitions}'. + * + *

+ * If the meaning of the 'Target' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target' reference. + * @see #setTarget(ArbiterState) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterTransition_Target() + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getIncomingTransitions + * @model opposite="incomingTransitions" required="true" + * @generated + */ + S getTarget(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(S value); + + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getArbiterTransition_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ArbiterTransition diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementProvider.java new file mode 100644 index 000000000..cfd4e7faa --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementProvider.java @@ -0,0 +1,18 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Element Provider'. + * + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getElementProvider() + * @model abstract="true" + * @generated + */ +public interface ElementProvider extends EObject { +} // ElementProvider diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementQuery.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementQuery.java new file mode 100644 index 000000000..80db5b330 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementQuery.java @@ -0,0 +1,50 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +/** + * + * A representation of the model object 'Element Query'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ElementQuery#getQuery Query}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getElementQuery() + * @model abstract="true" + * @generated + */ +public interface ElementQuery> extends ElementProvider { + /** + * Returns the value of the 'Query' containment reference. + * + *

+ * If the meaning of the 'Query' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Query' containment reference. + * @see #setQuery(StateProperty) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getElementQuery_Query() + * @model containment="true" + * @generated + */ + P getQuery(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementQuery#getQuery Query}' containment reference. + * + * + * @param value the new value of the 'Query' containment reference. + * @see #getQuery() + * @generated + */ + void setQuery(P value); + +} // ElementQuery diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementReference.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementReference.java new file mode 100644 index 000000000..8544e12bf --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ElementReference.java @@ -0,0 +1,49 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + + +/** + * + * A representation of the model object 'Element Reference'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ElementReference#getElement Element}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getElementReference() + * @model abstract="true" + * @generated + */ +public interface ElementReference extends ElementProvider { + /** + * Returns the value of the 'Element' reference. + * + *

+ * If the meaning of the 'Element' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Element' reference. + * @see #setElement(Object) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getElementReference_Element() + * @model kind="reference" + * @generated + */ + T getElement(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementReference#getElement Element}' reference. + * + * + * @param value the new value of the 'Element' reference. + * @see #getElement() + * @generated + */ + void setElement(T value); + +} // ElementReference diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Event.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Event.java new file mode 100644 index 000000000..cc00312c1 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Event.java @@ -0,0 +1,18 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Event'. + * + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getEvent() + * @model abstract="true" + * @generated + */ +public interface Event extends EObject { +} // Event diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/EventOccurrence.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/EventOccurrence.java new file mode 100644 index 000000000..6372778f4 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/EventOccurrence.java @@ -0,0 +1,77 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'Event Occurrence'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence#getEvent Event}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence#getTime Time}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getEventOccurrence() + * @model abstract="true" + * @generated + */ +public interface EventOccurrence extends ScenarioElement

{ + /** + * Returns the value of the 'Event' containment reference. + * + *

+ * If the meaning of the 'Event' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Event' containment reference. + * @see #setEvent(Event) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getEventOccurrence_Event() + * @model containment="true" + * @generated + */ + E getEvent(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence#getEvent Event}' containment reference. + * + * + * @param value the new value of the 'Event' containment reference. + * @see #getEvent() + * @generated + */ + void setEvent(E value); + + /** + * Returns the value of the 'Time' attribute. + * + *

+ * If the meaning of the 'Time' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Time' attribute. + * @see #setTime(int) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getEventOccurrence_Time() + * @model + * @generated + */ + int getTime(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence#getTime Time}' attribute. + * + * + * @param value the new value of the 'Time' attribute. + * @see #getTime() + * @generated + */ + void setTime(int value); + +} // EventOccurrence diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Scenario.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Scenario.java new file mode 100644 index 000000000..bc0244f3a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/Scenario.java @@ -0,0 +1,41 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Scenario'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.Scenario#getElements Elements}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenario() + * @model abstract="true" + * @generated + */ +public interface Scenario> extends EObject { + /** + * Returns the value of the 'Elements' containment reference list. + * + *

+ * If the meaning of the 'Elements' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Elements' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenario_Elements() + * @model containment="true" + * @generated + */ + EList getElements(); + +} // Scenario diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioElement.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioElement.java new file mode 100644 index 000000000..69869a883 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioElement.java @@ -0,0 +1,92 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'Element'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getPreviousElements Previous Elements}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getNextElements Next Elements}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getGuard Guard}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioElement() + * @model abstract="true" + * @generated + */ +public interface ScenarioElement

extends EObject { + /** + * Returns the value of the 'Previous Elements' reference list. + * The list contents are of type {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement}<P>. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getNextElements Next Elements}'. + * + *

+ * If the meaning of the 'Previous Elements' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Previous Elements' reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioElement_PreviousElements() + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getNextElements + * @model opposite="nextElements" + * @generated + */ + EList> getPreviousElements(); + + /** + * Returns the value of the 'Next Elements' reference list. + * The list contents are of type {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement}<P>. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getPreviousElements Previous Elements}'. + * + *

+ * If the meaning of the 'Next Elements' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Next Elements' reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioElement_NextElements() + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getPreviousElements + * @model opposite="previousElements" + * @generated + */ + EList> getNextElements(); + + /** + * Returns the value of the 'Guard' containment reference. + * + *

+ * If the meaning of the 'Guard' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Guard' containment reference. + * @see #setGuard(Property) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioElement_Guard() + * @model containment="true" + * @generated + */ + P getGuard(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getGuard Guard}' containment reference. + * + * + * @param value the new value of the 'Guard' containment reference. + * @see #getGuard() + * @generated + */ + void setGuard(P value); + +} // ScenarioElement diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSM.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSM.java new file mode 100644 index 000000000..973777f8b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSM.java @@ -0,0 +1,127 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'FSM'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getStates States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getInitialState Initial State}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getAcceptingStates Accepting States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getTransitions Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getName Name}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSM() + * @model abstract="true" + * @generated + */ +public interface ScenarioFSM

, T extends ScenarioFSMTransition> extends ScenarioElement

{ + /** + * Returns the value of the 'States' containment reference list. + * + *

+ * If the meaning of the 'States' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'States' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSM_States() + * @model containment="true" + * @generated + */ + EList getStates(); + + /** + * Returns the value of the 'Initial State' reference. + * + *

+ * If the meaning of the 'Initial State' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Initial State' reference. + * @see #setInitialState(ScenarioFSMState) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSM_InitialState() + * @model required="true" + * @generated + */ + S getInitialState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getInitialState Initial State}' reference. + * + * + * @param value the new value of the 'Initial State' reference. + * @see #getInitialState() + * @generated + */ + void setInitialState(S value); + + /** + * Returns the value of the 'Accepting States' reference list. + * + *

+ * If the meaning of the 'Accepting States' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Accepting States' reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSM_AcceptingStates() + * @model + * @generated + */ + EList getAcceptingStates(); + + /** + * Returns the value of the 'Transitions' containment reference list. + * + *

+ * If the meaning of the 'Transitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Transitions' containment reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSM_Transitions() + * @model containment="true" + * @generated + */ + EList getTransitions(); + + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSM_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ScenarioFSM diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSMState.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSMState.java new file mode 100644 index 000000000..d630e26ef --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSMState.java @@ -0,0 +1,115 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'FSM State'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getEvent Event}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getOutgoingTransitions Outgoing Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getIncomingTransitions Incoming Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getName Name}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMState() + * @model abstract="true" + * @generated + */ +public interface ScenarioFSMState> extends EObject { + /** + * Returns the value of the 'Event' containment reference. + * + *

+ * If the meaning of the 'Event' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Event' containment reference. + * @see #setEvent(Event) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMState_Event() + * @model containment="true" + * @generated + */ + E getEvent(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getEvent Event}' containment reference. + * + * + * @param value the new value of the 'Event' containment reference. + * @see #getEvent() + * @generated + */ + void setEvent(E value); + + /** + * Returns the value of the 'Outgoing Transitions' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getSource Source}'. + * + *

+ * If the meaning of the 'Outgoing Transitions' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Outgoing Transitions' reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMState_OutgoingTransitions() + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getSource + * @model opposite="source" + * @generated + */ + EList getOutgoingTransitions(); + + /** + * Returns the value of the 'Incoming Transitions' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getTarget Target}'. + * + *

+ * If the meaning of the 'Incoming Transitions' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Incoming Transitions' reference list. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMState_IncomingTransitions() + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getTarget + * @model opposite="target" + * @generated + */ + EList getIncomingTransitions(); + + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMState_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ScenarioFSMState diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSMTransition.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSMTransition.java new file mode 100644 index 000000000..bd8a647bb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFSMTransition.java @@ -0,0 +1,137 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * A representation of the model object 'FSM Transition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getGuard Guard}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getSource Source}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getTarget Target}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getName Name}
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMTransition() + * @model abstract="true" + * @generated + */ +public interface ScenarioFSMTransition

> extends EObject { + /** + * Returns the value of the 'Guard' containment reference. + * + *

+ * If the meaning of the 'Guard' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Guard' containment reference. + * @see #setGuard(Property) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMTransition_Guard() + * @model containment="true" + * @generated + */ + P getGuard(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getGuard Guard}' containment reference. + * + * + * @param value the new value of the 'Guard' containment reference. + * @see #getGuard() + * @generated + */ + void setGuard(P value); + + /** + * Returns the value of the 'Source' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getOutgoingTransitions Outgoing Transitions}'. + * + *

+ * If the meaning of the 'Source' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Source' reference. + * @see #setSource(ScenarioFSMState) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMTransition_Source() + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getOutgoingTransitions + * @model opposite="outgoingTransitions" required="true" + * @generated + */ + S getSource(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getSource Source}' reference. + * + * + * @param value the new value of the 'Source' reference. + * @see #getSource() + * @generated + */ + void setSource(S value); + + /** + * Returns the value of the 'Target' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getIncomingTransitions Incoming Transitions}'. + * + *

+ * If the meaning of the 'Target' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target' reference. + * @see #setTarget(ScenarioFSMState) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMTransition_Target() + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getIncomingTransitions + * @model opposite="incomingTransitions" required="true" + * @generated + */ + S getTarget(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(S value); + + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getScenarioFSMTransition_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ScenarioFSMTransition diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFactory.java new file mode 100644 index 000000000..573085491 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioFactory.java @@ -0,0 +1,53 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.ecore.EFactory; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage + * @generated + */ +public interface ScenarioFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ScenarioFactory eINSTANCE = org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFactoryImpl.init(); + + /** + * Returns a new object of class 'Arbiter State'. + * + * + * @return a new object of class 'Arbiter State'. + * @generated + */ +

> ArbiterState createArbiterState(); + + /** + * Returns a new object of class 'Arbiter Transition'. + * + * + * @return a new object of class 'Arbiter Transition'. + * @generated + */ +

> ArbiterTransition createArbiterTransition(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ScenarioPackage getScenarioPackage(); + +} //ScenarioFactory diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioPackage.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioPackage.java new file mode 100644 index 000000000..1661ef908 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/ScenarioPackage.java @@ -0,0 +1,1746 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *

    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFactory + * @model kind="package" + * @generated + */ +public interface ScenarioPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "scenario"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.gemoc.org/scenario"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "scenario"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ScenarioPackage eINSTANCE = org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioImpl Scenario}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenario() + * @generated + */ + int SCENARIO = 0; + + /** + * The feature id for the 'Elements' containment reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO__ELEMENTS = 0; + + /** + * The number of structural features of the 'Scenario' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Scenario' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.EventImpl Event}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.EventImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getEvent() + * @generated + */ + int EVENT = 1; + + /** + * The number of structural features of the 'Event' class. + * + * + * @generated + * @ordered + */ + int EVENT_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Event' class. + * + * + * @generated + * @ordered + */ + int EVENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ElementProviderImpl Element Provider}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ElementProviderImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getElementProvider() + * @generated + */ + int ELEMENT_PROVIDER = 2; + + /** + * The number of structural features of the 'Element Provider' class. + * + * + * @generated + * @ordered + */ + int ELEMENT_PROVIDER_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Element Provider' class. + * + * + * @generated + * @ordered + */ + int ELEMENT_PROVIDER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ElementReferenceImpl Element Reference}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ElementReferenceImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getElementReference() + * @generated + */ + int ELEMENT_REFERENCE = 3; + + /** + * The feature id for the 'Element' reference. + * + * + * @generated + * @ordered + */ + int ELEMENT_REFERENCE__ELEMENT = ELEMENT_PROVIDER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Element Reference' class. + * + * + * @generated + * @ordered + */ + int ELEMENT_REFERENCE_FEATURE_COUNT = ELEMENT_PROVIDER_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Element Reference' class. + * + * + * @generated + * @ordered + */ + int ELEMENT_REFERENCE_OPERATION_COUNT = ELEMENT_PROVIDER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ElementQueryImpl Element Query}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ElementQueryImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getElementQuery() + * @generated + */ + int ELEMENT_QUERY = 4; + + /** + * The feature id for the 'Query' containment reference. + * + * + * @generated + * @ordered + */ + int ELEMENT_QUERY__QUERY = ELEMENT_PROVIDER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Element Query' class. + * + * + * @generated + * @ordered + */ + int ELEMENT_QUERY_FEATURE_COUNT = ELEMENT_PROVIDER_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Element Query' class. + * + * + * @generated + * @ordered + */ + int ELEMENT_QUERY_OPERATION_COUNT = ELEMENT_PROVIDER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioElementImpl Element}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioElementImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenarioElement() + * @generated + */ + int SCENARIO_ELEMENT = 6; + + /** + * The feature id for the 'Previous Elements' reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_ELEMENT__PREVIOUS_ELEMENTS = 0; + + /** + * The feature id for the 'Next Elements' reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_ELEMENT__NEXT_ELEMENTS = 1; + + /** + * The feature id for the 'Guard' containment reference. + * + * + * @generated + * @ordered + */ + int SCENARIO_ELEMENT__GUARD = 2; + + /** + * The number of structural features of the 'Element' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_ELEMENT_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Element' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_ELEMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.EventOccurrenceImpl Event Occurrence}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.EventOccurrenceImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getEventOccurrence() + * @generated + */ + int EVENT_OCCURRENCE = 5; + + /** + * The feature id for the 'Previous Elements' reference list. + * + * + * @generated + * @ordered + */ + int EVENT_OCCURRENCE__PREVIOUS_ELEMENTS = SCENARIO_ELEMENT__PREVIOUS_ELEMENTS; + + /** + * The feature id for the 'Next Elements' reference list. + * + * + * @generated + * @ordered + */ + int EVENT_OCCURRENCE__NEXT_ELEMENTS = SCENARIO_ELEMENT__NEXT_ELEMENTS; + + /** + * The feature id for the 'Guard' containment reference. + * + * + * @generated + * @ordered + */ + int EVENT_OCCURRENCE__GUARD = SCENARIO_ELEMENT__GUARD; + + /** + * The feature id for the 'Event' containment reference. + * + * + * @generated + * @ordered + */ + int EVENT_OCCURRENCE__EVENT = SCENARIO_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Time' attribute. + * + * + * @generated + * @ordered + */ + int EVENT_OCCURRENCE__TIME = SCENARIO_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Event Occurrence' class. + * + * + * @generated + * @ordered + */ + int EVENT_OCCURRENCE_FEATURE_COUNT = SCENARIO_ELEMENT_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Event Occurrence' class. + * + * + * @generated + * @ordered + */ + int EVENT_OCCURRENCE_OPERATION_COUNT = SCENARIO_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl FSM}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenarioFSM() + * @generated + */ + int SCENARIO_FSM = 7; + + /** + * The feature id for the 'Previous Elements' reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM__PREVIOUS_ELEMENTS = SCENARIO_ELEMENT__PREVIOUS_ELEMENTS; + + /** + * The feature id for the 'Next Elements' reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM__NEXT_ELEMENTS = SCENARIO_ELEMENT__NEXT_ELEMENTS; + + /** + * The feature id for the 'Guard' containment reference. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM__GUARD = SCENARIO_ELEMENT__GUARD; + + /** + * The feature id for the 'States' containment reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM__STATES = SCENARIO_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Initial State' reference. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM__INITIAL_STATE = SCENARIO_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Accepting States' reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM__ACCEPTING_STATES = SCENARIO_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM__TRANSITIONS = SCENARIO_ELEMENT_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM__NAME = SCENARIO_ELEMENT_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'FSM' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_FEATURE_COUNT = SCENARIO_ELEMENT_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'FSM' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_OPERATION_COUNT = SCENARIO_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMStateImpl FSM State}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMStateImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenarioFSMState() + * @generated + */ + int SCENARIO_FSM_STATE = 8; + + /** + * The feature id for the 'Event' containment reference. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_STATE__EVENT = 0; + + /** + * The feature id for the 'Outgoing Transitions' reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS = 1; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_STATE__INCOMING_TRANSITIONS = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_STATE__NAME = 3; + + /** + * The number of structural features of the 'FSM State' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_STATE_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'FSM State' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMTransitionImpl FSM Transition}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMTransitionImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenarioFSMTransition() + * @generated + */ + int SCENARIO_FSM_TRANSITION = 9; + + /** + * The feature id for the 'Guard' containment reference. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_TRANSITION__GUARD = 0; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_TRANSITION__SOURCE = 1; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_TRANSITION__TARGET = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_TRANSITION__NAME = 3; + + /** + * The number of structural features of the 'FSM Transition' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_TRANSITION_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'FSM Transition' class. + * + * + * @generated + * @ordered + */ + int SCENARIO_FSM_TRANSITION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl Arbiter}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getArbiter() + * @generated + */ + int ARBITER = 10; + + /** + * The feature id for the 'States' containment reference list. + * + * + * @generated + * @ordered + */ + int ARBITER__STATES = 0; + + /** + * The feature id for the 'Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int ARBITER__TRANSITIONS = 1; + + /** + * The feature id for the 'Initial State' reference. + * + * + * @generated + * @ordered + */ + int ARBITER__INITIAL_STATE = 2; + + /** + * The feature id for the 'Accepting States' reference list. + * + * + * @generated + * @ordered + */ + int ARBITER__ACCEPTING_STATES = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ARBITER__NAME = 4; + + /** + * The number of structural features of the 'Arbiter' class. + * + * + * @generated + * @ordered + */ + int ARBITER_FEATURE_COUNT = 5; + + /** + * The number of operations of the 'Arbiter' class. + * + * + * @generated + * @ordered + */ + int ARBITER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterStateImpl Arbiter State}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterStateImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getArbiterState() + * @generated + */ + int ARBITER_STATE = 11; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int ARBITER_STATE__INCOMING_TRANSITIONS = 0; + + /** + * The feature id for the 'Outgoing Transitions' reference list. + * + * + * @generated + * @ordered + */ + int ARBITER_STATE__OUTGOING_TRANSITIONS = 1; + + /** + * The feature id for the 'Truth Value' attribute. + * + * + * @generated + * @ordered + */ + int ARBITER_STATE__TRUTH_VALUE = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ARBITER_STATE__NAME = 3; + + /** + * The number of structural features of the 'Arbiter State' class. + * + * + * @generated + * @ordered + */ + int ARBITER_STATE_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Arbiter State' class. + * + * + * @generated + * @ordered + */ + int ARBITER_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterTransitionImpl Arbiter Transition}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterTransitionImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getArbiterTransition() + * @generated + */ + int ARBITER_TRANSITION = 12; + + /** + * The feature id for the 'Guard' containment reference. + * + * + * @generated + * @ordered + */ + int ARBITER_TRANSITION__GUARD = 0; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int ARBITER_TRANSITION__SOURCE = 1; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int ARBITER_TRANSITION__TARGET = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ARBITER_TRANSITION__NAME = 3; + + /** + * The number of structural features of the 'Arbiter Transition' class. + * + * + * @generated + * @ordered + */ + int ARBITER_TRANSITION_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Arbiter Transition' class. + * + * + * @generated + * @ordered + */ + int ARBITER_TRANSITION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.event.commons.model.scenario.TruthValue Truth Value}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.TruthValue + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getTruthValue() + * @generated + */ + int TRUTH_VALUE = 13; + + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.Scenario Scenario}'. + * + * + * @return the meta object for class 'Scenario'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Scenario + * @generated + */ + EClass getScenario(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.Scenario#getElements Elements}'. + * + * + * @return the meta object for the containment reference list 'Elements'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Scenario#getElements() + * @see #getScenario() + * @generated + */ + EReference getScenario_Elements(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.Event Event}'. + * + * + * @return the meta object for class 'Event'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Event + * @generated + */ + EClass getEvent(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementProvider Element Provider}'. + * + * + * @return the meta object for class 'Element Provider'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ElementProvider + * @generated + */ + EClass getElementProvider(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementReference Element Reference}'. + * + * + * @return the meta object for class 'Element Reference'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ElementReference + * @generated + */ + EClass getElementReference(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementReference#getElement Element}'. + * + * + * @return the meta object for the reference 'Element'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ElementReference#getElement() + * @see #getElementReference() + * @generated + */ + EReference getElementReference_Element(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementQuery Element Query}'. + * + * + * @return the meta object for class 'Element Query'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ElementQuery + * @generated + */ + EClass getElementQuery(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementQuery#getQuery Query}'. + * + * + * @return the meta object for the containment reference 'Query'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ElementQuery#getQuery() + * @see #getElementQuery() + * @generated + */ + EReference getElementQuery_Query(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence Event Occurrence}'. + * + * + * @return the meta object for class 'Event Occurrence'. + * @see org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence + * @generated + */ + EClass getEventOccurrence(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence#getEvent Event}'. + * + * + * @return the meta object for the containment reference 'Event'. + * @see org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence#getEvent() + * @see #getEventOccurrence() + * @generated + */ + EReference getEventOccurrence_Event(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence#getTime Time}'. + * + * + * @return the meta object for the attribute 'Time'. + * @see org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence#getTime() + * @see #getEventOccurrence() + * @generated + */ + EAttribute getEventOccurrence_Time(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement Element}'. + * + * + * @return the meta object for class 'Element'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement + * @generated + */ + EClass getScenarioElement(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getPreviousElements Previous Elements}'. + * + * + * @return the meta object for the reference list 'Previous Elements'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getPreviousElements() + * @see #getScenarioElement() + * @generated + */ + EReference getScenarioElement_PreviousElements(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getNextElements Next Elements}'. + * + * + * @return the meta object for the reference list 'Next Elements'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getNextElements() + * @see #getScenarioElement() + * @generated + */ + EReference getScenarioElement_NextElements(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getGuard Guard}'. + * + * + * @return the meta object for the containment reference 'Guard'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement#getGuard() + * @see #getScenarioElement() + * @generated + */ + EReference getScenarioElement_Guard(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM FSM}'. + * + * + * @return the meta object for class 'FSM'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM + * @generated + */ + EClass getScenarioFSM(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getStates States}'. + * + * + * @return the meta object for the containment reference list 'States'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getStates() + * @see #getScenarioFSM() + * @generated + */ + EReference getScenarioFSM_States(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getInitialState Initial State}'. + * + * + * @return the meta object for the reference 'Initial State'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getInitialState() + * @see #getScenarioFSM() + * @generated + */ + EReference getScenarioFSM_InitialState(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getAcceptingStates Accepting States}'. + * + * + * @return the meta object for the reference list 'Accepting States'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getAcceptingStates() + * @see #getScenarioFSM() + * @generated + */ + EReference getScenarioFSM_AcceptingStates(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getTransitions Transitions}'. + * + * + * @return the meta object for the containment reference list 'Transitions'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getTransitions() + * @see #getScenarioFSM() + * @generated + */ + EReference getScenarioFSM_Transitions(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM#getName() + * @see #getScenarioFSM() + * @generated + */ + EAttribute getScenarioFSM_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState FSM State}'. + * + * + * @return the meta object for class 'FSM State'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState + * @generated + */ + EClass getScenarioFSMState(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getEvent Event}'. + * + * + * @return the meta object for the containment reference 'Event'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getEvent() + * @see #getScenarioFSMState() + * @generated + */ + EReference getScenarioFSMState_Event(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getOutgoingTransitions Outgoing Transitions}'. + * + * + * @return the meta object for the reference list 'Outgoing Transitions'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getOutgoingTransitions() + * @see #getScenarioFSMState() + * @generated + */ + EReference getScenarioFSMState_OutgoingTransitions(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getIncomingTransitions Incoming Transitions}'. + * + * + * @return the meta object for the reference list 'Incoming Transitions'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getIncomingTransitions() + * @see #getScenarioFSMState() + * @generated + */ + EReference getScenarioFSMState_IncomingTransitions(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState#getName() + * @see #getScenarioFSMState() + * @generated + */ + EAttribute getScenarioFSMState_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition FSM Transition}'. + * + * + * @return the meta object for class 'FSM Transition'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition + * @generated + */ + EClass getScenarioFSMTransition(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getGuard Guard}'. + * + * + * @return the meta object for the containment reference 'Guard'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getGuard() + * @see #getScenarioFSMTransition() + * @generated + */ + EReference getScenarioFSMTransition_Guard(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getSource Source}'. + * + * + * @return the meta object for the reference 'Source'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getSource() + * @see #getScenarioFSMTransition() + * @generated + */ + EReference getScenarioFSMTransition_Source(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getTarget() + * @see #getScenarioFSMTransition() + * @generated + */ + EReference getScenarioFSMTransition_Target(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition#getName() + * @see #getScenarioFSMTransition() + * @generated + */ + EAttribute getScenarioFSMTransition_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter Arbiter}'. + * + * + * @return the meta object for class 'Arbiter'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Arbiter + * @generated + */ + EClass getArbiter(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getStates States}'. + * + * + * @return the meta object for the containment reference list 'States'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getStates() + * @see #getArbiter() + * @generated + */ + EReference getArbiter_States(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getTransitions Transitions}'. + * + * + * @return the meta object for the containment reference list 'Transitions'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getTransitions() + * @see #getArbiter() + * @generated + */ + EReference getArbiter_Transitions(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getInitialState Initial State}'. + * + * + * @return the meta object for the reference 'Initial State'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getInitialState() + * @see #getArbiter() + * @generated + */ + EReference getArbiter_InitialState(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getAcceptingStates Accepting States}'. + * + * + * @return the meta object for the reference list 'Accepting States'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getAcceptingStates() + * @see #getArbiter() + * @generated + */ + EReference getArbiter_AcceptingStates(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.event.commons.model.scenario.Arbiter#getName() + * @see #getArbiter() + * @generated + */ + EAttribute getArbiter_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState Arbiter State}'. + * + * + * @return the meta object for class 'Arbiter State'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterState + * @generated + */ + EClass getArbiterState(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getIncomingTransitions Incoming Transitions}'. + * + * + * @return the meta object for the reference list 'Incoming Transitions'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getIncomingTransitions() + * @see #getArbiterState() + * @generated + */ + EReference getArbiterState_IncomingTransitions(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getOutgoingTransitions Outgoing Transitions}'. + * + * + * @return the meta object for the reference list 'Outgoing Transitions'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getOutgoingTransitions() + * @see #getArbiterState() + * @generated + */ + EReference getArbiterState_OutgoingTransitions(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getTruthValue Truth Value}'. + * + * + * @return the meta object for the attribute 'Truth Value'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getTruthValue() + * @see #getArbiterState() + * @generated + */ + EAttribute getArbiterState_TruthValue(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterState#getName() + * @see #getArbiterState() + * @generated + */ + EAttribute getArbiterState_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition Arbiter Transition}'. + * + * + * @return the meta object for class 'Arbiter Transition'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition + * @generated + */ + EClass getArbiterTransition(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getGuard Guard}'. + * + * + * @return the meta object for the containment reference 'Guard'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getGuard() + * @see #getArbiterTransition() + * @generated + */ + EReference getArbiterTransition_Guard(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getSource Source}'. + * + * + * @return the meta object for the reference 'Source'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getSource() + * @see #getArbiterTransition() + * @generated + */ + EReference getArbiterTransition_Source(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getTarget() + * @see #getArbiterTransition() + * @generated + */ + EReference getArbiterTransition_Target(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition#getName() + * @see #getArbiterTransition() + * @generated + */ + EAttribute getArbiterTransition_Name(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.event.commons.model.scenario.TruthValue Truth Value}'. + * + * + * @return the meta object for enum 'Truth Value'. + * @see org.eclipse.gemoc.event.commons.model.scenario.TruthValue + * @generated + */ + EEnum getTruthValue(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ScenarioFactory getScenarioFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioImpl Scenario}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenario() + * @generated + */ + EClass SCENARIO = eINSTANCE.getScenario(); + + /** + * The meta object literal for the 'Elements' containment reference list feature. + * + * + * @generated + */ + EReference SCENARIO__ELEMENTS = eINSTANCE.getScenario_Elements(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.EventImpl Event}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.EventImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getEvent() + * @generated + */ + EClass EVENT = eINSTANCE.getEvent(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ElementProviderImpl Element Provider}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ElementProviderImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getElementProvider() + * @generated + */ + EClass ELEMENT_PROVIDER = eINSTANCE.getElementProvider(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ElementReferenceImpl Element Reference}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ElementReferenceImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getElementReference() + * @generated + */ + EClass ELEMENT_REFERENCE = eINSTANCE.getElementReference(); + + /** + * The meta object literal for the 'Element' reference feature. + * + * + * @generated + */ + EReference ELEMENT_REFERENCE__ELEMENT = eINSTANCE.getElementReference_Element(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ElementQueryImpl Element Query}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ElementQueryImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getElementQuery() + * @generated + */ + EClass ELEMENT_QUERY = eINSTANCE.getElementQuery(); + + /** + * The meta object literal for the 'Query' containment reference feature. + * + * + * @generated + */ + EReference ELEMENT_QUERY__QUERY = eINSTANCE.getElementQuery_Query(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.EventOccurrenceImpl Event Occurrence}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.EventOccurrenceImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getEventOccurrence() + * @generated + */ + EClass EVENT_OCCURRENCE = eINSTANCE.getEventOccurrence(); + + /** + * The meta object literal for the 'Event' containment reference feature. + * + * + * @generated + */ + EReference EVENT_OCCURRENCE__EVENT = eINSTANCE.getEventOccurrence_Event(); + + /** + * The meta object literal for the 'Time' attribute feature. + * + * + * @generated + */ + EAttribute EVENT_OCCURRENCE__TIME = eINSTANCE.getEventOccurrence_Time(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioElementImpl Element}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioElementImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenarioElement() + * @generated + */ + EClass SCENARIO_ELEMENT = eINSTANCE.getScenarioElement(); + + /** + * The meta object literal for the 'Previous Elements' reference list feature. + * + * + * @generated + */ + EReference SCENARIO_ELEMENT__PREVIOUS_ELEMENTS = eINSTANCE.getScenarioElement_PreviousElements(); + + /** + * The meta object literal for the 'Next Elements' reference list feature. + * + * + * @generated + */ + EReference SCENARIO_ELEMENT__NEXT_ELEMENTS = eINSTANCE.getScenarioElement_NextElements(); + + /** + * The meta object literal for the 'Guard' containment reference feature. + * + * + * @generated + */ + EReference SCENARIO_ELEMENT__GUARD = eINSTANCE.getScenarioElement_Guard(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl FSM}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenarioFSM() + * @generated + */ + EClass SCENARIO_FSM = eINSTANCE.getScenarioFSM(); + + /** + * The meta object literal for the 'States' containment reference list feature. + * + * + * @generated + */ + EReference SCENARIO_FSM__STATES = eINSTANCE.getScenarioFSM_States(); + + /** + * The meta object literal for the 'Initial State' reference feature. + * + * + * @generated + */ + EReference SCENARIO_FSM__INITIAL_STATE = eINSTANCE.getScenarioFSM_InitialState(); + + /** + * The meta object literal for the 'Accepting States' reference list feature. + * + * + * @generated + */ + EReference SCENARIO_FSM__ACCEPTING_STATES = eINSTANCE.getScenarioFSM_AcceptingStates(); + + /** + * The meta object literal for the 'Transitions' containment reference list feature. + * + * + * @generated + */ + EReference SCENARIO_FSM__TRANSITIONS = eINSTANCE.getScenarioFSM_Transitions(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute SCENARIO_FSM__NAME = eINSTANCE.getScenarioFSM_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMStateImpl FSM State}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMStateImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenarioFSMState() + * @generated + */ + EClass SCENARIO_FSM_STATE = eINSTANCE.getScenarioFSMState(); + + /** + * The meta object literal for the 'Event' containment reference feature. + * + * + * @generated + */ + EReference SCENARIO_FSM_STATE__EVENT = eINSTANCE.getScenarioFSMState_Event(); + + /** + * The meta object literal for the 'Outgoing Transitions' reference list feature. + * + * + * @generated + */ + EReference SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS = eINSTANCE.getScenarioFSMState_OutgoingTransitions(); + + /** + * The meta object literal for the 'Incoming Transitions' reference list feature. + * + * + * @generated + */ + EReference SCENARIO_FSM_STATE__INCOMING_TRANSITIONS = eINSTANCE.getScenarioFSMState_IncomingTransitions(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute SCENARIO_FSM_STATE__NAME = eINSTANCE.getScenarioFSMState_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMTransitionImpl FSM Transition}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMTransitionImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getScenarioFSMTransition() + * @generated + */ + EClass SCENARIO_FSM_TRANSITION = eINSTANCE.getScenarioFSMTransition(); + + /** + * The meta object literal for the 'Guard' containment reference feature. + * + * + * @generated + */ + EReference SCENARIO_FSM_TRANSITION__GUARD = eINSTANCE.getScenarioFSMTransition_Guard(); + + /** + * The meta object literal for the 'Source' reference feature. + * + * + * @generated + */ + EReference SCENARIO_FSM_TRANSITION__SOURCE = eINSTANCE.getScenarioFSMTransition_Source(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference SCENARIO_FSM_TRANSITION__TARGET = eINSTANCE.getScenarioFSMTransition_Target(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute SCENARIO_FSM_TRANSITION__NAME = eINSTANCE.getScenarioFSMTransition_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl Arbiter}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getArbiter() + * @generated + */ + EClass ARBITER = eINSTANCE.getArbiter(); + + /** + * The meta object literal for the 'States' containment reference list feature. + * + * + * @generated + */ + EReference ARBITER__STATES = eINSTANCE.getArbiter_States(); + + /** + * The meta object literal for the 'Transitions' containment reference list feature. + * + * + * @generated + */ + EReference ARBITER__TRANSITIONS = eINSTANCE.getArbiter_Transitions(); + + /** + * The meta object literal for the 'Initial State' reference feature. + * + * + * @generated + */ + EReference ARBITER__INITIAL_STATE = eINSTANCE.getArbiter_InitialState(); + + /** + * The meta object literal for the 'Accepting States' reference list feature. + * + * + * @generated + */ + EReference ARBITER__ACCEPTING_STATES = eINSTANCE.getArbiter_AcceptingStates(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute ARBITER__NAME = eINSTANCE.getArbiter_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterStateImpl Arbiter State}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterStateImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getArbiterState() + * @generated + */ + EClass ARBITER_STATE = eINSTANCE.getArbiterState(); + + /** + * The meta object literal for the 'Incoming Transitions' reference list feature. + * + * + * @generated + */ + EReference ARBITER_STATE__INCOMING_TRANSITIONS = eINSTANCE.getArbiterState_IncomingTransitions(); + + /** + * The meta object literal for the 'Outgoing Transitions' reference list feature. + * + * + * @generated + */ + EReference ARBITER_STATE__OUTGOING_TRANSITIONS = eINSTANCE.getArbiterState_OutgoingTransitions(); + + /** + * The meta object literal for the 'Truth Value' attribute feature. + * + * + * @generated + */ + EAttribute ARBITER_STATE__TRUTH_VALUE = eINSTANCE.getArbiterState_TruthValue(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute ARBITER_STATE__NAME = eINSTANCE.getArbiterState_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterTransitionImpl Arbiter Transition}' class. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterTransitionImpl + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getArbiterTransition() + * @generated + */ + EClass ARBITER_TRANSITION = eINSTANCE.getArbiterTransition(); + + /** + * The meta object literal for the 'Guard' containment reference feature. + * + * + * @generated + */ + EReference ARBITER_TRANSITION__GUARD = eINSTANCE.getArbiterTransition_Guard(); + + /** + * The meta object literal for the 'Source' reference feature. + * + * + * @generated + */ + EReference ARBITER_TRANSITION__SOURCE = eINSTANCE.getArbiterTransition_Source(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference ARBITER_TRANSITION__TARGET = eINSTANCE.getArbiterTransition_Target(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute ARBITER_TRANSITION__NAME = eINSTANCE.getArbiterTransition_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.event.commons.model.scenario.TruthValue Truth Value}' enum. + * + * + * @see org.eclipse.gemoc.event.commons.model.scenario.TruthValue + * @see org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioPackageImpl#getTruthValue() + * @generated + */ + EEnum TRUTH_VALUE = eINSTANCE.getTruthValue(); + + } + +} //ScenarioPackage diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/TruthValue.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/TruthValue.java new file mode 100644 index 000000000..2501c77ef --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/TruthValue.java @@ -0,0 +1,241 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Truth Value', + * and utility methods for working with them. + * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#getTruthValue() + * @model + * @generated + */ +public enum TruthValue implements Enumerator { + /** + * The 'INCONCLUSIVE' literal object. + * + * + * @see #INCONCLUSIVE_VALUE + * @generated + * @ordered + */ + INCONCLUSIVE(0, "INCONCLUSIVE", "INCONCLUSIVE"), + + /** + * The 'TRUE' literal object. + * + * + * @see #TRUE_VALUE + * @generated + * @ordered + */ + TRUE(1, "TRUE", "TRUE"), + + /** + * The 'FALSE' literal object. + * + * + * @see #FALSE_VALUE + * @generated + * @ordered + */ + FALSE(2, "FALSE", "FALSE"); + + /** + * The 'INCONCLUSIVE' literal value. + * + *

+ * If the meaning of 'INCONCLUSIVE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INCONCLUSIVE + * @model + * @generated + * @ordered + */ + public static final int INCONCLUSIVE_VALUE = 0; + + /** + * The 'TRUE' literal value. + * + *

+ * If the meaning of 'TRUE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #TRUE + * @model + * @generated + * @ordered + */ + public static final int TRUE_VALUE = 1; + + /** + * The 'FALSE' literal value. + * + *

+ * If the meaning of 'FALSE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #FALSE + * @model + * @generated + * @ordered + */ + public static final int FALSE_VALUE = 2; + + /** + * An array of all the 'Truth Value' enumerators. + * + * + * @generated + */ + private static final TruthValue[] VALUES_ARRAY = + new TruthValue[] { + INCONCLUSIVE, + TRUE, + FALSE, + }; + + /** + * A public read-only list of all the 'Truth Value' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Truth Value' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static TruthValue get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + TruthValue result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Truth Value' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static TruthValue getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + TruthValue result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Truth Value' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static TruthValue get(int value) { + switch (value) { + case INCONCLUSIVE_VALUE: return INCONCLUSIVE; + case TRUE_VALUE: return TRUE; + case FALSE_VALUE: return FALSE; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private TruthValue(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //TruthValue diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterImpl.java new file mode 100644 index 000000000..261065dbb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterImpl.java @@ -0,0 +1,357 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +import org.eclipse.gemoc.event.commons.model.scenario.Arbiter; +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterState; +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Arbiter'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl#getStates States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl#getTransitions Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl#getInitialState Initial State}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl#getAcceptingStates Accepting States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterImpl#getName Name}
  • + *
+ * + * @generated + */ +public abstract class ArbiterImpl

, T extends ArbiterTransition> extends MinimalEObjectImpl.Container implements Arbiter { + /** + * The cached value of the '{@link #getStates() States}' containment reference list. + * + * + * @see #getStates() + * @generated + * @ordered + */ + protected EList states; + + /** + * The cached value of the '{@link #getTransitions() Transitions}' containment reference list. + * + * + * @see #getTransitions() + * @generated + * @ordered + */ + protected EList transitions; + + /** + * The cached value of the '{@link #getInitialState() Initial State}' reference. + * + * + * @see #getInitialState() + * @generated + * @ordered + */ + protected S initialState; + + /** + * The cached value of the '{@link #getAcceptingStates() Accepting States}' reference list. + * + * + * @see #getAcceptingStates() + * @generated + * @ordered + */ + protected EList acceptingStates; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ArbiterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.ARBITER; + } + + /** + * + * + * @generated + */ + public EList getStates() { + if (states == null) { + states = new EObjectContainmentEList(ArbiterState.class, this, ScenarioPackage.ARBITER__STATES); + } + return states; + } + + /** + * + * + * @generated + */ + public EList getTransitions() { + if (transitions == null) { + transitions = new EObjectContainmentEList(ArbiterTransition.class, this, ScenarioPackage.ARBITER__TRANSITIONS); + } + return transitions; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getInitialState() { + if (initialState != null && initialState.eIsProxy()) { + InternalEObject oldInitialState = (InternalEObject)initialState; + initialState = (S)eResolveProxy(oldInitialState); + if (initialState != oldInitialState) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ScenarioPackage.ARBITER__INITIAL_STATE, oldInitialState, initialState)); + } + } + return initialState; + } + + /** + * + * + * @generated + */ + public S basicGetInitialState() { + return initialState; + } + + /** + * + * + * @generated + */ + public void setInitialState(S newInitialState) { + S oldInitialState = initialState; + initialState = newInitialState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER__INITIAL_STATE, oldInitialState, initialState)); + } + + /** + * + * + * @generated + */ + public EList getAcceptingStates() { + if (acceptingStates == null) { + acceptingStates = new EObjectResolvingEList(ArbiterState.class, this, ScenarioPackage.ARBITER__ACCEPTING_STATES); + } + return acceptingStates; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.ARBITER__STATES: + return ((InternalEList)getStates()).basicRemove(otherEnd, msgs); + case ScenarioPackage.ARBITER__TRANSITIONS: + return ((InternalEList)getTransitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.ARBITER__STATES: + return getStates(); + case ScenarioPackage.ARBITER__TRANSITIONS: + return getTransitions(); + case ScenarioPackage.ARBITER__INITIAL_STATE: + if (resolve) return getInitialState(); + return basicGetInitialState(); + case ScenarioPackage.ARBITER__ACCEPTING_STATES: + return getAcceptingStates(); + case ScenarioPackage.ARBITER__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.ARBITER__STATES: + getStates().clear(); + getStates().addAll((Collection)newValue); + return; + case ScenarioPackage.ARBITER__TRANSITIONS: + getTransitions().clear(); + getTransitions().addAll((Collection)newValue); + return; + case ScenarioPackage.ARBITER__INITIAL_STATE: + setInitialState((S)newValue); + return; + case ScenarioPackage.ARBITER__ACCEPTING_STATES: + getAcceptingStates().clear(); + getAcceptingStates().addAll((Collection)newValue); + return; + case ScenarioPackage.ARBITER__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.ARBITER__STATES: + getStates().clear(); + return; + case ScenarioPackage.ARBITER__TRANSITIONS: + getTransitions().clear(); + return; + case ScenarioPackage.ARBITER__INITIAL_STATE: + setInitialState((S)null); + return; + case ScenarioPackage.ARBITER__ACCEPTING_STATES: + getAcceptingStates().clear(); + return; + case ScenarioPackage.ARBITER__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.ARBITER__STATES: + return states != null && !states.isEmpty(); + case ScenarioPackage.ARBITER__TRANSITIONS: + return transitions != null && !transitions.isEmpty(); + case ScenarioPackage.ARBITER__INITIAL_STATE: + return initialState != null; + case ScenarioPackage.ARBITER__ACCEPTING_STATES: + return acceptingStates != null && !acceptingStates.isEmpty(); + case ScenarioPackage.ARBITER__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ArbiterImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterStateImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterStateImpl.java new file mode 100644 index 000000000..1d04087d3 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterStateImpl.java @@ -0,0 +1,332 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterState; +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; +import org.eclipse.gemoc.event.commons.model.scenario.TruthValue; + +/** + * + * An implementation of the model object 'Arbiter State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterStateImpl#getIncomingTransitions Incoming Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterStateImpl#getOutgoingTransitions Outgoing Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterStateImpl#getTruthValue Truth Value}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterStateImpl#getName Name}
  • + *
+ * + * @generated + */ +public class ArbiterStateImpl

> extends MinimalEObjectImpl.Container implements ArbiterState { + /** + * The cached value of the '{@link #getIncomingTransitions() Incoming Transitions}' reference list. + * + * + * @see #getIncomingTransitions() + * @generated + * @ordered + */ + protected EList incomingTransitions; + + /** + * The cached value of the '{@link #getOutgoingTransitions() Outgoing Transitions}' reference list. + * + * + * @see #getOutgoingTransitions() + * @generated + * @ordered + */ + protected EList outgoingTransitions; + + /** + * The default value of the '{@link #getTruthValue() Truth Value}' attribute. + * + * + * @see #getTruthValue() + * @generated + * @ordered + */ + protected static final TruthValue TRUTH_VALUE_EDEFAULT = TruthValue.INCONCLUSIVE; + + /** + * The cached value of the '{@link #getTruthValue() Truth Value}' attribute. + * + * + * @see #getTruthValue() + * @generated + * @ordered + */ + protected TruthValue truthValue = TRUTH_VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ArbiterStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.ARBITER_STATE; + } + + /** + * + * + * @generated + */ + public EList getIncomingTransitions() { + if (incomingTransitions == null) { + incomingTransitions = new EObjectWithInverseResolvingEList(ArbiterTransition.class, this, ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS, ScenarioPackage.ARBITER_TRANSITION__TARGET); + } + return incomingTransitions; + } + + /** + * + * + * @generated + */ + public EList getOutgoingTransitions() { + if (outgoingTransitions == null) { + outgoingTransitions = new EObjectWithInverseResolvingEList(ArbiterTransition.class, this, ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS, ScenarioPackage.ARBITER_TRANSITION__SOURCE); + } + return outgoingTransitions; + } + + /** + * + * + * @generated + */ + public TruthValue getTruthValue() { + return truthValue; + } + + /** + * + * + * @generated + */ + public void setTruthValue(TruthValue newTruthValue) { + TruthValue oldTruthValue = truthValue; + truthValue = newTruthValue == null ? TRUTH_VALUE_EDEFAULT : newTruthValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_STATE__TRUTH_VALUE, oldTruthValue, truthValue)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_STATE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS: + return ((InternalEList)(InternalEList)getIncomingTransitions()).basicAdd(otherEnd, msgs); + case ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS: + return ((InternalEList)(InternalEList)getOutgoingTransitions()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS: + return ((InternalEList)getIncomingTransitions()).basicRemove(otherEnd, msgs); + case ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS: + return ((InternalEList)getOutgoingTransitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS: + return getIncomingTransitions(); + case ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS: + return getOutgoingTransitions(); + case ScenarioPackage.ARBITER_STATE__TRUTH_VALUE: + return getTruthValue(); + case ScenarioPackage.ARBITER_STATE__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + getIncomingTransitions().addAll((Collection)newValue); + return; + case ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + getOutgoingTransitions().addAll((Collection)newValue); + return; + case ScenarioPackage.ARBITER_STATE__TRUTH_VALUE: + setTruthValue((TruthValue)newValue); + return; + case ScenarioPackage.ARBITER_STATE__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + return; + case ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + return; + case ScenarioPackage.ARBITER_STATE__TRUTH_VALUE: + setTruthValue(TRUTH_VALUE_EDEFAULT); + return; + case ScenarioPackage.ARBITER_STATE__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS: + return incomingTransitions != null && !incomingTransitions.isEmpty(); + case ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS: + return outgoingTransitions != null && !outgoingTransitions.isEmpty(); + case ScenarioPackage.ARBITER_STATE__TRUTH_VALUE: + return truthValue != TRUTH_VALUE_EDEFAULT; + case ScenarioPackage.ARBITER_STATE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (truthValue: "); + result.append(truthValue); + result.append(", name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ArbiterStateImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterTransitionImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterTransitionImpl.java new file mode 100644 index 000000000..f0f74b2a6 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ArbiterTransitionImpl.java @@ -0,0 +1,438 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterState; +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Arbiter Transition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterTransitionImpl#getGuard Guard}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterTransitionImpl#getSource Source}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterTransitionImpl#getTarget Target}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ArbiterTransitionImpl#getName Name}
  • + *
+ * + * @generated + */ +public class ArbiterTransitionImpl

> extends MinimalEObjectImpl.Container implements ArbiterTransition { + /** + * The cached value of the '{@link #getGuard() Guard}' containment reference. + * + * + * @see #getGuard() + * @generated + * @ordered + */ + protected P guard; + + /** + * The cached value of the '{@link #getSource() Source}' reference. + * + * + * @see #getSource() + * @generated + * @ordered + */ + protected S source; + + /** + * The cached value of the '{@link #getTarget() Target}' reference. + * + * + * @see #getTarget() + * @generated + * @ordered + */ + protected S target; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ArbiterTransitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.ARBITER_TRANSITION; + } + + /** + * + * + * @generated + */ + public P getGuard() { + return guard; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetGuard(P newGuard, NotificationChain msgs) { + P oldGuard = guard; + guard = newGuard; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_TRANSITION__GUARD, oldGuard, newGuard); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setGuard(P newGuard) { + if (newGuard != guard) { + NotificationChain msgs = null; + if (guard != null) + msgs = ((InternalEObject)guard).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.ARBITER_TRANSITION__GUARD, null, msgs); + if (newGuard != null) + msgs = ((InternalEObject)newGuard).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.ARBITER_TRANSITION__GUARD, null, msgs); + msgs = basicSetGuard(newGuard, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_TRANSITION__GUARD, newGuard, newGuard)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getSource() { + if (source != null && source.eIsProxy()) { + InternalEObject oldSource = (InternalEObject)source; + source = (S)eResolveProxy(oldSource); + if (source != oldSource) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ScenarioPackage.ARBITER_TRANSITION__SOURCE, oldSource, source)); + } + } + return source; + } + + /** + * + * + * @generated + */ + public S basicGetSource() { + return source; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSource(S newSource, NotificationChain msgs) { + S oldSource = source; + source = newSource; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_TRANSITION__SOURCE, oldSource, newSource); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSource(S newSource) { + if (newSource != source) { + NotificationChain msgs = null; + if (source != null) + msgs = ((InternalEObject)source).eInverseRemove(this, ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS, ArbiterState.class, msgs); + if (newSource != null) + msgs = ((InternalEObject)newSource).eInverseAdd(this, ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS, ArbiterState.class, msgs); + msgs = basicSetSource(newSource, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_TRANSITION__SOURCE, newSource, newSource)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getTarget() { + if (target != null && target.eIsProxy()) { + InternalEObject oldTarget = (InternalEObject)target; + target = (S)eResolveProxy(oldTarget); + if (target != oldTarget) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ScenarioPackage.ARBITER_TRANSITION__TARGET, oldTarget, target)); + } + } + return target; + } + + /** + * + * + * @generated + */ + public S basicGetTarget() { + return target; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTarget(S newTarget, NotificationChain msgs) { + S oldTarget = target; + target = newTarget; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_TRANSITION__TARGET, oldTarget, newTarget); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTarget(S newTarget) { + if (newTarget != target) { + NotificationChain msgs = null; + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS, ArbiterState.class, msgs); + if (newTarget != null) + msgs = ((InternalEObject)newTarget).eInverseAdd(this, ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS, ArbiterState.class, msgs); + msgs = basicSetTarget(newTarget, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_TRANSITION__TARGET, newTarget, newTarget)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ARBITER_TRANSITION__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.ARBITER_TRANSITION__SOURCE: + if (source != null) + msgs = ((InternalEObject)source).eInverseRemove(this, ScenarioPackage.ARBITER_STATE__OUTGOING_TRANSITIONS, ArbiterState.class, msgs); + return basicSetSource((S)otherEnd, msgs); + case ScenarioPackage.ARBITER_TRANSITION__TARGET: + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, ScenarioPackage.ARBITER_STATE__INCOMING_TRANSITIONS, ArbiterState.class, msgs); + return basicSetTarget((S)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.ARBITER_TRANSITION__GUARD: + return basicSetGuard(null, msgs); + case ScenarioPackage.ARBITER_TRANSITION__SOURCE: + return basicSetSource(null, msgs); + case ScenarioPackage.ARBITER_TRANSITION__TARGET: + return basicSetTarget(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.ARBITER_TRANSITION__GUARD: + return getGuard(); + case ScenarioPackage.ARBITER_TRANSITION__SOURCE: + if (resolve) return getSource(); + return basicGetSource(); + case ScenarioPackage.ARBITER_TRANSITION__TARGET: + if (resolve) return getTarget(); + return basicGetTarget(); + case ScenarioPackage.ARBITER_TRANSITION__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.ARBITER_TRANSITION__GUARD: + setGuard((P)newValue); + return; + case ScenarioPackage.ARBITER_TRANSITION__SOURCE: + setSource((S)newValue); + return; + case ScenarioPackage.ARBITER_TRANSITION__TARGET: + setTarget((S)newValue); + return; + case ScenarioPackage.ARBITER_TRANSITION__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.ARBITER_TRANSITION__GUARD: + setGuard((P)null); + return; + case ScenarioPackage.ARBITER_TRANSITION__SOURCE: + setSource((S)null); + return; + case ScenarioPackage.ARBITER_TRANSITION__TARGET: + setTarget((S)null); + return; + case ScenarioPackage.ARBITER_TRANSITION__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.ARBITER_TRANSITION__GUARD: + return guard != null; + case ScenarioPackage.ARBITER_TRANSITION__SOURCE: + return source != null; + case ScenarioPackage.ARBITER_TRANSITION__TARGET: + return target != null; + case ScenarioPackage.ARBITER_TRANSITION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ArbiterTransitionImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementProviderImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementProviderImpl.java new file mode 100644 index 000000000..5499e7238 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementProviderImpl.java @@ -0,0 +1,39 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.gemoc.event.commons.model.scenario.ElementProvider; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Element Provider'. + * + * + * @generated + */ +public abstract class ElementProviderImpl extends MinimalEObjectImpl.Container implements ElementProvider { + /** + * + * + * @generated + */ + protected ElementProviderImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.ELEMENT_PROVIDER; + } + +} //ElementProviderImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementQueryImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementQueryImpl.java new file mode 100644 index 000000000..3fb5efeaa --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementQueryImpl.java @@ -0,0 +1,177 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +import org.eclipse.gemoc.event.commons.model.scenario.ElementQuery; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Element Query'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ElementQueryImpl#getQuery Query}
  • + *
+ * + * @generated + */ +public abstract class ElementQueryImpl> extends ElementProviderImpl implements ElementQuery { + /** + * The cached value of the '{@link #getQuery() Query}' containment reference. + * + * + * @see #getQuery() + * @generated + * @ordered + */ + protected P query; + + /** + * + * + * @generated + */ + protected ElementQueryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.ELEMENT_QUERY; + } + + /** + * + * + * @generated + */ + public P getQuery() { + return query; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetQuery(P newQuery, NotificationChain msgs) { + P oldQuery = query; + query = newQuery; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.ELEMENT_QUERY__QUERY, oldQuery, newQuery); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setQuery(P newQuery) { + if (newQuery != query) { + NotificationChain msgs = null; + if (query != null) + msgs = ((InternalEObject)query).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.ELEMENT_QUERY__QUERY, null, msgs); + if (newQuery != null) + msgs = ((InternalEObject)newQuery).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.ELEMENT_QUERY__QUERY, null, msgs); + msgs = basicSetQuery(newQuery, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ELEMENT_QUERY__QUERY, newQuery, newQuery)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.ELEMENT_QUERY__QUERY: + return basicSetQuery(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.ELEMENT_QUERY__QUERY: + return getQuery(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.ELEMENT_QUERY__QUERY: + setQuery((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.ELEMENT_QUERY__QUERY: + setQuery((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.ELEMENT_QUERY__QUERY: + return query != null; + } + return super.eIsSet(featureID); + } + +} //ElementQueryImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementReferenceImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementReferenceImpl.java new file mode 100644 index 000000000..50b5288b0 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ElementReferenceImpl.java @@ -0,0 +1,158 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.scenario.ElementReference; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Element Reference'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ElementReferenceImpl#getElement Element}
  • + *
+ * + * @generated + */ +public abstract class ElementReferenceImpl extends ElementProviderImpl implements ElementReference { + /** + * The cached value of the '{@link #getElement() Element}' reference. + * + * + * @see #getElement() + * @generated + * @ordered + */ + protected T element; + + /** + * + * + * @generated + */ + protected ElementReferenceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.ELEMENT_REFERENCE; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public T getElement() { + if (element != null && ((EObject)element).eIsProxy()) { + InternalEObject oldElement = (InternalEObject)element; + element = (T)eResolveProxy(oldElement); + if (element != oldElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ScenarioPackage.ELEMENT_REFERENCE__ELEMENT, oldElement, element)); + } + } + return element; + } + + /** + * + * + * @generated + */ + public T basicGetElement() { + return element; + } + + /** + * + * + * @generated + */ + public void setElement(T newElement) { + T oldElement = element; + element = newElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.ELEMENT_REFERENCE__ELEMENT, oldElement, element)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.ELEMENT_REFERENCE__ELEMENT: + if (resolve) return getElement(); + return basicGetElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.ELEMENT_REFERENCE__ELEMENT: + setElement((T)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.ELEMENT_REFERENCE__ELEMENT: + setElement((T)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.ELEMENT_REFERENCE__ELEMENT: + return element != null; + } + return super.eIsSet(featureID); + } + +} //ElementReferenceImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/EventImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/EventImpl.java new file mode 100644 index 000000000..366f4765e --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/EventImpl.java @@ -0,0 +1,39 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Event'. + * + * + * @generated + */ +public abstract class EventImpl extends MinimalEObjectImpl.Container implements Event { + /** + * + * + * @generated + */ + protected EventImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.EVENT; + } + +} //EventImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/EventOccurrenceImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/EventOccurrenceImpl.java new file mode 100644 index 000000000..027a0e9a3 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/EventOccurrenceImpl.java @@ -0,0 +1,246 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; +import org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Event Occurrence'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.EventOccurrenceImpl#getEvent Event}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.EventOccurrenceImpl#getTime Time}
  • + *
+ * + * @generated + */ +public abstract class EventOccurrenceImpl extends ScenarioElementImpl

implements EventOccurrence { + /** + * The cached value of the '{@link #getEvent() Event}' containment reference. + * + * + * @see #getEvent() + * @generated + * @ordered + */ + protected E event; + + /** + * The default value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected static final int TIME_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected int time = TIME_EDEFAULT; + + /** + * + * + * @generated + */ + protected EventOccurrenceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.EVENT_OCCURRENCE; + } + + /** + * + * + * @generated + */ + public E getEvent() { + return event; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetEvent(E newEvent, NotificationChain msgs) { + E oldEvent = event; + event = newEvent; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.EVENT_OCCURRENCE__EVENT, oldEvent, newEvent); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setEvent(E newEvent) { + if (newEvent != event) { + NotificationChain msgs = null; + if (event != null) + msgs = ((InternalEObject)event).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.EVENT_OCCURRENCE__EVENT, null, msgs); + if (newEvent != null) + msgs = ((InternalEObject)newEvent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.EVENT_OCCURRENCE__EVENT, null, msgs); + msgs = basicSetEvent(newEvent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.EVENT_OCCURRENCE__EVENT, newEvent, newEvent)); + } + + /** + * + * + * @generated + */ + public int getTime() { + return time; + } + + /** + * + * + * @generated + */ + public void setTime(int newTime) { + int oldTime = time; + time = newTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.EVENT_OCCURRENCE__TIME, oldTime, time)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.EVENT_OCCURRENCE__EVENT: + return basicSetEvent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.EVENT_OCCURRENCE__EVENT: + return getEvent(); + case ScenarioPackage.EVENT_OCCURRENCE__TIME: + return getTime(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.EVENT_OCCURRENCE__EVENT: + setEvent((E)newValue); + return; + case ScenarioPackage.EVENT_OCCURRENCE__TIME: + setTime((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.EVENT_OCCURRENCE__EVENT: + setEvent((E)null); + return; + case ScenarioPackage.EVENT_OCCURRENCE__TIME: + setTime(TIME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.EVENT_OCCURRENCE__EVENT: + return event != null; + case ScenarioPackage.EVENT_OCCURRENCE__TIME: + return time != TIME_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (time: "); + result.append(time); + result.append(')'); + return result.toString(); + } + +} //EventOccurrenceImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioElementImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioElementImpl.java new file mode 100644 index 000000000..87d8d5918 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioElementImpl.java @@ -0,0 +1,274 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Element'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioElementImpl#getPreviousElements Previous Elements}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioElementImpl#getNextElements Next Elements}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioElementImpl#getGuard Guard}
  • + *
+ * + * @generated + */ +public abstract class ScenarioElementImpl

extends MinimalEObjectImpl.Container implements ScenarioElement

{ + /** + * The cached value of the '{@link #getPreviousElements() Previous Elements}' reference list. + * + * + * @see #getPreviousElements() + * @generated + * @ordered + */ + protected EList> previousElements; + + /** + * The cached value of the '{@link #getNextElements() Next Elements}' reference list. + * + * + * @see #getNextElements() + * @generated + * @ordered + */ + protected EList> nextElements; + + /** + * The cached value of the '{@link #getGuard() Guard}' containment reference. + * + * + * @see #getGuard() + * @generated + * @ordered + */ + protected P guard; + + /** + * + * + * @generated + */ + protected ScenarioElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.SCENARIO_ELEMENT; + } + + /** + * + * + * @generated + */ + public EList> getPreviousElements() { + if (previousElements == null) { + previousElements = new EObjectWithInverseResolvingEList.ManyInverse>(ScenarioElement.class, this, ScenarioPackage.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS, ScenarioPackage.SCENARIO_ELEMENT__NEXT_ELEMENTS); + } + return previousElements; + } + + /** + * + * + * @generated + */ + public EList> getNextElements() { + if (nextElements == null) { + nextElements = new EObjectWithInverseResolvingEList.ManyInverse>(ScenarioElement.class, this, ScenarioPackage.SCENARIO_ELEMENT__NEXT_ELEMENTS, ScenarioPackage.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS); + } + return nextElements; + } + + /** + * + * + * @generated + */ + public P getGuard() { + return guard; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetGuard(P newGuard, NotificationChain msgs) { + P oldGuard = guard; + guard = newGuard; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_ELEMENT__GUARD, oldGuard, newGuard); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setGuard(P newGuard) { + if (newGuard != guard) { + NotificationChain msgs = null; + if (guard != null) + msgs = ((InternalEObject)guard).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.SCENARIO_ELEMENT__GUARD, null, msgs); + if (newGuard != null) + msgs = ((InternalEObject)newGuard).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.SCENARIO_ELEMENT__GUARD, null, msgs); + msgs = basicSetGuard(newGuard, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_ELEMENT__GUARD, newGuard, newGuard)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS: + return ((InternalEList)(InternalEList)getPreviousElements()).basicAdd(otherEnd, msgs); + case ScenarioPackage.SCENARIO_ELEMENT__NEXT_ELEMENTS: + return ((InternalEList)(InternalEList)getNextElements()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS: + return ((InternalEList)getPreviousElements()).basicRemove(otherEnd, msgs); + case ScenarioPackage.SCENARIO_ELEMENT__NEXT_ELEMENTS: + return ((InternalEList)getNextElements()).basicRemove(otherEnd, msgs); + case ScenarioPackage.SCENARIO_ELEMENT__GUARD: + return basicSetGuard(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS: + return getPreviousElements(); + case ScenarioPackage.SCENARIO_ELEMENT__NEXT_ELEMENTS: + return getNextElements(); + case ScenarioPackage.SCENARIO_ELEMENT__GUARD: + return getGuard(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS: + getPreviousElements().clear(); + getPreviousElements().addAll((Collection>)newValue); + return; + case ScenarioPackage.SCENARIO_ELEMENT__NEXT_ELEMENTS: + getNextElements().clear(); + getNextElements().addAll((Collection>)newValue); + return; + case ScenarioPackage.SCENARIO_ELEMENT__GUARD: + setGuard((P)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS: + getPreviousElements().clear(); + return; + case ScenarioPackage.SCENARIO_ELEMENT__NEXT_ELEMENTS: + getNextElements().clear(); + return; + case ScenarioPackage.SCENARIO_ELEMENT__GUARD: + setGuard((P)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO_ELEMENT__PREVIOUS_ELEMENTS: + return previousElements != null && !previousElements.isEmpty(); + case ScenarioPackage.SCENARIO_ELEMENT__NEXT_ELEMENTS: + return nextElements != null && !nextElements.isEmpty(); + case ScenarioPackage.SCENARIO_ELEMENT__GUARD: + return guard != null; + } + return super.eIsSet(featureID); + } + +} //ScenarioElementImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMImpl.java new file mode 100644 index 000000000..eabfdd257 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMImpl.java @@ -0,0 +1,357 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'FSM'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl#getStates States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl#getInitialState Initial State}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl#getAcceptingStates Accepting States}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl#getTransitions Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMImpl#getName Name}
  • + *
+ * + * @generated + */ +public abstract class ScenarioFSMImpl

, T extends ScenarioFSMTransition> extends ScenarioElementImpl

implements ScenarioFSM { + /** + * The cached value of the '{@link #getStates() States}' containment reference list. + * + * + * @see #getStates() + * @generated + * @ordered + */ + protected EList states; + + /** + * The cached value of the '{@link #getInitialState() Initial State}' reference. + * + * + * @see #getInitialState() + * @generated + * @ordered + */ + protected S initialState; + + /** + * The cached value of the '{@link #getAcceptingStates() Accepting States}' reference list. + * + * + * @see #getAcceptingStates() + * @generated + * @ordered + */ + protected EList acceptingStates; + + /** + * The cached value of the '{@link #getTransitions() Transitions}' containment reference list. + * + * + * @see #getTransitions() + * @generated + * @ordered + */ + protected EList transitions; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ScenarioFSMImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.SCENARIO_FSM; + } + + /** + * + * + * @generated + */ + public EList getStates() { + if (states == null) { + states = new EObjectContainmentEList(ScenarioFSMState.class, this, ScenarioPackage.SCENARIO_FSM__STATES); + } + return states; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getInitialState() { + if (initialState != null && initialState.eIsProxy()) { + InternalEObject oldInitialState = (InternalEObject)initialState; + initialState = (S)eResolveProxy(oldInitialState); + if (initialState != oldInitialState) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ScenarioPackage.SCENARIO_FSM__INITIAL_STATE, oldInitialState, initialState)); + } + } + return initialState; + } + + /** + * + * + * @generated + */ + public S basicGetInitialState() { + return initialState; + } + + /** + * + * + * @generated + */ + public void setInitialState(S newInitialState) { + S oldInitialState = initialState; + initialState = newInitialState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM__INITIAL_STATE, oldInitialState, initialState)); + } + + /** + * + * + * @generated + */ + public EList getAcceptingStates() { + if (acceptingStates == null) { + acceptingStates = new EObjectResolvingEList(ScenarioFSMState.class, this, ScenarioPackage.SCENARIO_FSM__ACCEPTING_STATES); + } + return acceptingStates; + } + + /** + * + * + * @generated + */ + public EList getTransitions() { + if (transitions == null) { + transitions = new EObjectContainmentEList(ScenarioFSMTransition.class, this, ScenarioPackage.SCENARIO_FSM__TRANSITIONS); + } + return transitions; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM__STATES: + return ((InternalEList)getStates()).basicRemove(otherEnd, msgs); + case ScenarioPackage.SCENARIO_FSM__TRANSITIONS: + return ((InternalEList)getTransitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM__STATES: + return getStates(); + case ScenarioPackage.SCENARIO_FSM__INITIAL_STATE: + if (resolve) return getInitialState(); + return basicGetInitialState(); + case ScenarioPackage.SCENARIO_FSM__ACCEPTING_STATES: + return getAcceptingStates(); + case ScenarioPackage.SCENARIO_FSM__TRANSITIONS: + return getTransitions(); + case ScenarioPackage.SCENARIO_FSM__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM__STATES: + getStates().clear(); + getStates().addAll((Collection)newValue); + return; + case ScenarioPackage.SCENARIO_FSM__INITIAL_STATE: + setInitialState((S)newValue); + return; + case ScenarioPackage.SCENARIO_FSM__ACCEPTING_STATES: + getAcceptingStates().clear(); + getAcceptingStates().addAll((Collection)newValue); + return; + case ScenarioPackage.SCENARIO_FSM__TRANSITIONS: + getTransitions().clear(); + getTransitions().addAll((Collection)newValue); + return; + case ScenarioPackage.SCENARIO_FSM__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM__STATES: + getStates().clear(); + return; + case ScenarioPackage.SCENARIO_FSM__INITIAL_STATE: + setInitialState((S)null); + return; + case ScenarioPackage.SCENARIO_FSM__ACCEPTING_STATES: + getAcceptingStates().clear(); + return; + case ScenarioPackage.SCENARIO_FSM__TRANSITIONS: + getTransitions().clear(); + return; + case ScenarioPackage.SCENARIO_FSM__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM__STATES: + return states != null && !states.isEmpty(); + case ScenarioPackage.SCENARIO_FSM__INITIAL_STATE: + return initialState != null; + case ScenarioPackage.SCENARIO_FSM__ACCEPTING_STATES: + return acceptingStates != null && !acceptingStates.isEmpty(); + case ScenarioPackage.SCENARIO_FSM__TRANSITIONS: + return transitions != null && !transitions.isEmpty(); + case ScenarioPackage.SCENARIO_FSM__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ScenarioFSMImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMStateImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMStateImpl.java new file mode 100644 index 000000000..279cbe465 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMStateImpl.java @@ -0,0 +1,342 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.scenario.Event; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'FSM State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMStateImpl#getEvent Event}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMStateImpl#getOutgoingTransitions Outgoing Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMStateImpl#getIncomingTransitions Incoming Transitions}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMStateImpl#getName Name}
  • + *
+ * + * @generated + */ +public abstract class ScenarioFSMStateImpl> extends MinimalEObjectImpl.Container implements ScenarioFSMState { + /** + * The cached value of the '{@link #getEvent() Event}' containment reference. + * + * + * @see #getEvent() + * @generated + * @ordered + */ + protected E event; + + /** + * The cached value of the '{@link #getOutgoingTransitions() Outgoing Transitions}' reference list. + * + * + * @see #getOutgoingTransitions() + * @generated + * @ordered + */ + protected EList outgoingTransitions; + + /** + * The cached value of the '{@link #getIncomingTransitions() Incoming Transitions}' reference list. + * + * + * @see #getIncomingTransitions() + * @generated + * @ordered + */ + protected EList incomingTransitions; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ScenarioFSMStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.SCENARIO_FSM_STATE; + } + + /** + * + * + * @generated + */ + public E getEvent() { + return event; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetEvent(E newEvent, NotificationChain msgs) { + E oldEvent = event; + event = newEvent; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_STATE__EVENT, oldEvent, newEvent); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setEvent(E newEvent) { + if (newEvent != event) { + NotificationChain msgs = null; + if (event != null) + msgs = ((InternalEObject)event).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.SCENARIO_FSM_STATE__EVENT, null, msgs); + if (newEvent != null) + msgs = ((InternalEObject)newEvent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.SCENARIO_FSM_STATE__EVENT, null, msgs); + msgs = basicSetEvent(newEvent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_STATE__EVENT, newEvent, newEvent)); + } + + /** + * + * + * @generated + */ + public EList getOutgoingTransitions() { + if (outgoingTransitions == null) { + outgoingTransitions = new EObjectWithInverseResolvingEList(ScenarioFSMTransition.class, this, ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS, ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE); + } + return outgoingTransitions; + } + + /** + * + * + * @generated + */ + public EList getIncomingTransitions() { + if (incomingTransitions == null) { + incomingTransitions = new EObjectWithInverseResolvingEList(ScenarioFSMTransition.class, this, ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS, ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET); + } + return incomingTransitions; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_STATE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS: + return ((InternalEList)(InternalEList)getOutgoingTransitions()).basicAdd(otherEnd, msgs); + case ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS: + return ((InternalEList)(InternalEList)getIncomingTransitions()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_STATE__EVENT: + return basicSetEvent(null, msgs); + case ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS: + return ((InternalEList)getOutgoingTransitions()).basicRemove(otherEnd, msgs); + case ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS: + return ((InternalEList)getIncomingTransitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_STATE__EVENT: + return getEvent(); + case ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS: + return getOutgoingTransitions(); + case ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS: + return getIncomingTransitions(); + case ScenarioPackage.SCENARIO_FSM_STATE__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_STATE__EVENT: + setEvent((E)newValue); + return; + case ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + getOutgoingTransitions().addAll((Collection)newValue); + return; + case ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + getIncomingTransitions().addAll((Collection)newValue); + return; + case ScenarioPackage.SCENARIO_FSM_STATE__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_STATE__EVENT: + setEvent((E)null); + return; + case ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + return; + case ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + return; + case ScenarioPackage.SCENARIO_FSM_STATE__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_STATE__EVENT: + return event != null; + case ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS: + return outgoingTransitions != null && !outgoingTransitions.isEmpty(); + case ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS: + return incomingTransitions != null && !incomingTransitions.isEmpty(); + case ScenarioPackage.SCENARIO_FSM_STATE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ScenarioFSMStateImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMTransitionImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMTransitionImpl.java new file mode 100644 index 000000000..eb05c287a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFSMTransitionImpl.java @@ -0,0 +1,438 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'FSM Transition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMTransitionImpl#getGuard Guard}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMTransitionImpl#getSource Source}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMTransitionImpl#getTarget Target}
  • + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioFSMTransitionImpl#getName Name}
  • + *
+ * + * @generated + */ +public abstract class ScenarioFSMTransitionImpl

> extends MinimalEObjectImpl.Container implements ScenarioFSMTransition { + /** + * The cached value of the '{@link #getGuard() Guard}' containment reference. + * + * + * @see #getGuard() + * @generated + * @ordered + */ + protected P guard; + + /** + * The cached value of the '{@link #getSource() Source}' reference. + * + * + * @see #getSource() + * @generated + * @ordered + */ + protected S source; + + /** + * The cached value of the '{@link #getTarget() Target}' reference. + * + * + * @see #getTarget() + * @generated + * @ordered + */ + protected S target; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ScenarioFSMTransitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.SCENARIO_FSM_TRANSITION; + } + + /** + * + * + * @generated + */ + public P getGuard() { + return guard; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetGuard(P newGuard, NotificationChain msgs) { + P oldGuard = guard; + guard = newGuard; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD, oldGuard, newGuard); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setGuard(P newGuard) { + if (newGuard != guard) { + NotificationChain msgs = null; + if (guard != null) + msgs = ((InternalEObject)guard).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD, null, msgs); + if (newGuard != null) + msgs = ((InternalEObject)newGuard).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD, null, msgs); + msgs = basicSetGuard(newGuard, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD, newGuard, newGuard)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getSource() { + if (source != null && source.eIsProxy()) { + InternalEObject oldSource = (InternalEObject)source; + source = (S)eResolveProxy(oldSource); + if (source != oldSource) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE, oldSource, source)); + } + } + return source; + } + + /** + * + * + * @generated + */ + public S basicGetSource() { + return source; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSource(S newSource, NotificationChain msgs) { + S oldSource = source; + source = newSource; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE, oldSource, newSource); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSource(S newSource) { + if (newSource != source) { + NotificationChain msgs = null; + if (source != null) + msgs = ((InternalEObject)source).eInverseRemove(this, ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS, ScenarioFSMState.class, msgs); + if (newSource != null) + msgs = ((InternalEObject)newSource).eInverseAdd(this, ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS, ScenarioFSMState.class, msgs); + msgs = basicSetSource(newSource, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE, newSource, newSource)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public S getTarget() { + if (target != null && target.eIsProxy()) { + InternalEObject oldTarget = (InternalEObject)target; + target = (S)eResolveProxy(oldTarget); + if (target != oldTarget) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET, oldTarget, target)); + } + } + return target; + } + + /** + * + * + * @generated + */ + public S basicGetTarget() { + return target; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTarget(S newTarget, NotificationChain msgs) { + S oldTarget = target; + target = newTarget; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET, oldTarget, newTarget); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTarget(S newTarget) { + if (newTarget != target) { + NotificationChain msgs = null; + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS, ScenarioFSMState.class, msgs); + if (newTarget != null) + msgs = ((InternalEObject)newTarget).eInverseAdd(this, ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS, ScenarioFSMState.class, msgs); + msgs = basicSetTarget(newTarget, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET, newTarget, newTarget)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScenarioPackage.SCENARIO_FSM_TRANSITION__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE: + if (source != null) + msgs = ((InternalEObject)source).eInverseRemove(this, ScenarioPackage.SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS, ScenarioFSMState.class, msgs); + return basicSetSource((S)otherEnd, msgs); + case ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET: + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, ScenarioPackage.SCENARIO_FSM_STATE__INCOMING_TRANSITIONS, ScenarioFSMState.class, msgs); + return basicSetTarget((S)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD: + return basicSetGuard(null, msgs); + case ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE: + return basicSetSource(null, msgs); + case ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET: + return basicSetTarget(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD: + return getGuard(); + case ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE: + if (resolve) return getSource(); + return basicGetSource(); + case ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET: + if (resolve) return getTarget(); + return basicGetTarget(); + case ScenarioPackage.SCENARIO_FSM_TRANSITION__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD: + setGuard((P)newValue); + return; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE: + setSource((S)newValue); + return; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET: + setTarget((S)newValue); + return; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD: + setGuard((P)null); + return; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE: + setSource((S)null); + return; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET: + setTarget((S)null); + return; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO_FSM_TRANSITION__GUARD: + return guard != null; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__SOURCE: + return source != null; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__TARGET: + return target != null; + case ScenarioPackage.SCENARIO_FSM_TRANSITION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ScenarioFSMTransitionImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFactoryImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFactoryImpl.java new file mode 100644 index 000000000..8292f27b9 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioFactoryImpl.java @@ -0,0 +1,159 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.gemoc.event.commons.model.property.Property; + +import org.eclipse.gemoc.event.commons.model.scenario.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ScenarioFactoryImpl extends EFactoryImpl implements ScenarioFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ScenarioFactory init() { + try { + ScenarioFactory theScenarioFactory = (ScenarioFactory)EPackage.Registry.INSTANCE.getEFactory(ScenarioPackage.eNS_URI); + if (theScenarioFactory != null) { + return theScenarioFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ScenarioFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ScenarioFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ScenarioPackage.ARBITER_STATE: return createArbiterState(); + case ScenarioPackage.ARBITER_TRANSITION: return createArbiterTransition(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ScenarioPackage.TRUTH_VALUE: + return createTruthValueFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ScenarioPackage.TRUTH_VALUE: + return convertTruthValueToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public

> ArbiterState createArbiterState() { + ArbiterStateImpl arbiterState = new ArbiterStateImpl(); + return arbiterState; + } + + /** + * + * + * @generated + */ + public

> ArbiterTransition createArbiterTransition() { + ArbiterTransitionImpl arbiterTransition = new ArbiterTransitionImpl(); + return arbiterTransition; + } + + /** + * + * + * @generated + */ + public TruthValue createTruthValueFromString(EDataType eDataType, String initialValue) { + TruthValue result = TruthValue.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertTruthValueToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public ScenarioPackage getScenarioPackage() { + return (ScenarioPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ScenarioPackage getPackage() { + return ScenarioPackage.eINSTANCE; + } + +} //ScenarioFactoryImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioImpl.java new file mode 100644 index 000000000..8331e3eaf --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioImpl.java @@ -0,0 +1,152 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.event.commons.model.scenario.Scenario; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; + +/** + * + * An implementation of the model object 'Scenario'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.event.commons.model.scenario.impl.ScenarioImpl#getElements Elements}
  • + *
+ * + * @generated + */ +public abstract class ScenarioImpl> extends MinimalEObjectImpl.Container implements Scenario { + /** + * The cached value of the '{@link #getElements() Elements}' containment reference list. + * + * + * @see #getElements() + * @generated + * @ordered + */ + protected EList elements; + + /** + * + * + * @generated + */ + protected ScenarioImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ScenarioPackage.Literals.SCENARIO; + } + + /** + * + * + * @generated + */ + public EList getElements() { + if (elements == null) { + elements = new EObjectContainmentEList(ScenarioElement.class, this, ScenarioPackage.SCENARIO__ELEMENTS); + } + return elements; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ScenarioPackage.SCENARIO__ELEMENTS: + return ((InternalEList)getElements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ScenarioPackage.SCENARIO__ELEMENTS: + return getElements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ScenarioPackage.SCENARIO__ELEMENTS: + getElements().clear(); + getElements().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO__ELEMENTS: + getElements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ScenarioPackage.SCENARIO__ELEMENTS: + return elements != null && !elements.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ScenarioImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioPackageImpl.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioPackageImpl.java new file mode 100644 index 000000000..5afdc0eb4 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/impl/ScenarioPackageImpl.java @@ -0,0 +1,979 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.ETypeParameter; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.gemoc.event.commons.model.property.PropertyPackage; + +import org.eclipse.gemoc.event.commons.model.property.impl.PropertyPackageImpl; + +import org.eclipse.gemoc.event.commons.model.scenario.Arbiter; +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterState; +import org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ElementProvider; +import org.eclipse.gemoc.event.commons.model.scenario.ElementQuery; +import org.eclipse.gemoc.event.commons.model.scenario.ElementReference; +import org.eclipse.gemoc.event.commons.model.scenario.Event; +import org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence; +import org.eclipse.gemoc.event.commons.model.scenario.Scenario; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioFactory; +import org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage; +import org.eclipse.gemoc.event.commons.model.scenario.TruthValue; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ScenarioPackageImpl extends EPackageImpl implements ScenarioPackage { + /** + * + * + * @generated + */ + private EClass scenarioEClass = null; + + /** + * + * + * @generated + */ + private EClass eventEClass = null; + + /** + * + * + * @generated + */ + private EClass elementProviderEClass = null; + + /** + * + * + * @generated + */ + private EClass elementReferenceEClass = null; + + /** + * + * + * @generated + */ + private EClass elementQueryEClass = null; + + /** + * + * + * @generated + */ + private EClass eventOccurrenceEClass = null; + + /** + * + * + * @generated + */ + private EClass scenarioElementEClass = null; + + /** + * + * + * @generated + */ + private EClass scenarioFSMEClass = null; + + /** + * + * + * @generated + */ + private EClass scenarioFSMStateEClass = null; + + /** + * + * + * @generated + */ + private EClass scenarioFSMTransitionEClass = null; + + /** + * + * + * @generated + */ + private EClass arbiterEClass = null; + + /** + * + * + * @generated + */ + private EClass arbiterStateEClass = null; + + /** + * + * + * @generated + */ + private EClass arbiterTransitionEClass = null; + + /** + * + * + * @generated + */ + private EEnum truthValueEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage#eNS_URI + * @see #init() + * @generated + */ + private ScenarioPackageImpl() { + super(eNS_URI, ScenarioFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ScenarioPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ScenarioPackage init() { + if (isInited) return (ScenarioPackage)EPackage.Registry.INSTANCE.getEPackage(ScenarioPackage.eNS_URI); + + // Obtain or create and register package + ScenarioPackageImpl theScenarioPackage = (ScenarioPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ScenarioPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ScenarioPackageImpl()); + + isInited = true; + + // Obtain or create and register interdependencies + PropertyPackageImpl thePropertyPackage = (PropertyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PropertyPackage.eNS_URI) instanceof PropertyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PropertyPackage.eNS_URI) : PropertyPackage.eINSTANCE); + + // Create package meta-data objects + theScenarioPackage.createPackageContents(); + thePropertyPackage.createPackageContents(); + + // Initialize created meta-data + theScenarioPackage.initializePackageContents(); + thePropertyPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theScenarioPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ScenarioPackage.eNS_URI, theScenarioPackage); + return theScenarioPackage; + } + + /** + * + * + * @generated + */ + public EClass getScenario() { + return scenarioEClass; + } + + /** + * + * + * @generated + */ + public EReference getScenario_Elements() { + return (EReference)scenarioEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getEvent() { + return eventEClass; + } + + /** + * + * + * @generated + */ + public EClass getElementProvider() { + return elementProviderEClass; + } + + /** + * + * + * @generated + */ + public EClass getElementReference() { + return elementReferenceEClass; + } + + /** + * + * + * @generated + */ + public EReference getElementReference_Element() { + return (EReference)elementReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getElementQuery() { + return elementQueryEClass; + } + + /** + * + * + * @generated + */ + public EReference getElementQuery_Query() { + return (EReference)elementQueryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getEventOccurrence() { + return eventOccurrenceEClass; + } + + /** + * + * + * @generated + */ + public EReference getEventOccurrence_Event() { + return (EReference)eventOccurrenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getEventOccurrence_Time() { + return (EAttribute)eventOccurrenceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getScenarioElement() { + return scenarioElementEClass; + } + + /** + * + * + * @generated + */ + public EReference getScenarioElement_PreviousElements() { + return (EReference)scenarioElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getScenarioElement_NextElements() { + return (EReference)scenarioElementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getScenarioElement_Guard() { + return (EReference)scenarioElementEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getScenarioFSM() { + return scenarioFSMEClass; + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSM_States() { + return (EReference)scenarioFSMEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSM_InitialState() { + return (EReference)scenarioFSMEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSM_AcceptingStates() { + return (EReference)scenarioFSMEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSM_Transitions() { + return (EReference)scenarioFSMEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getScenarioFSM_Name() { + return (EAttribute)scenarioFSMEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getScenarioFSMState() { + return scenarioFSMStateEClass; + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSMState_Event() { + return (EReference)scenarioFSMStateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSMState_OutgoingTransitions() { + return (EReference)scenarioFSMStateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSMState_IncomingTransitions() { + return (EReference)scenarioFSMStateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getScenarioFSMState_Name() { + return (EAttribute)scenarioFSMStateEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getScenarioFSMTransition() { + return scenarioFSMTransitionEClass; + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSMTransition_Guard() { + return (EReference)scenarioFSMTransitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSMTransition_Source() { + return (EReference)scenarioFSMTransitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getScenarioFSMTransition_Target() { + return (EReference)scenarioFSMTransitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getScenarioFSMTransition_Name() { + return (EAttribute)scenarioFSMTransitionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getArbiter() { + return arbiterEClass; + } + + /** + * + * + * @generated + */ + public EReference getArbiter_States() { + return (EReference)arbiterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getArbiter_Transitions() { + return (EReference)arbiterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getArbiter_InitialState() { + return (EReference)arbiterEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getArbiter_AcceptingStates() { + return (EReference)arbiterEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getArbiter_Name() { + return (EAttribute)arbiterEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getArbiterState() { + return arbiterStateEClass; + } + + /** + * + * + * @generated + */ + public EReference getArbiterState_IncomingTransitions() { + return (EReference)arbiterStateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getArbiterState_OutgoingTransitions() { + return (EReference)arbiterStateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getArbiterState_TruthValue() { + return (EAttribute)arbiterStateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getArbiterState_Name() { + return (EAttribute)arbiterStateEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getArbiterTransition() { + return arbiterTransitionEClass; + } + + /** + * + * + * @generated + */ + public EReference getArbiterTransition_Guard() { + return (EReference)arbiterTransitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getArbiterTransition_Source() { + return (EReference)arbiterTransitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getArbiterTransition_Target() { + return (EReference)arbiterTransitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getArbiterTransition_Name() { + return (EAttribute)arbiterTransitionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EEnum getTruthValue() { + return truthValueEEnum; + } + + /** + * + * + * @generated + */ + public ScenarioFactory getScenarioFactory() { + return (ScenarioFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + scenarioEClass = createEClass(SCENARIO); + createEReference(scenarioEClass, SCENARIO__ELEMENTS); + + eventEClass = createEClass(EVENT); + + elementProviderEClass = createEClass(ELEMENT_PROVIDER); + + elementReferenceEClass = createEClass(ELEMENT_REFERENCE); + createEReference(elementReferenceEClass, ELEMENT_REFERENCE__ELEMENT); + + elementQueryEClass = createEClass(ELEMENT_QUERY); + createEReference(elementQueryEClass, ELEMENT_QUERY__QUERY); + + eventOccurrenceEClass = createEClass(EVENT_OCCURRENCE); + createEReference(eventOccurrenceEClass, EVENT_OCCURRENCE__EVENT); + createEAttribute(eventOccurrenceEClass, EVENT_OCCURRENCE__TIME); + + scenarioElementEClass = createEClass(SCENARIO_ELEMENT); + createEReference(scenarioElementEClass, SCENARIO_ELEMENT__PREVIOUS_ELEMENTS); + createEReference(scenarioElementEClass, SCENARIO_ELEMENT__NEXT_ELEMENTS); + createEReference(scenarioElementEClass, SCENARIO_ELEMENT__GUARD); + + scenarioFSMEClass = createEClass(SCENARIO_FSM); + createEReference(scenarioFSMEClass, SCENARIO_FSM__STATES); + createEReference(scenarioFSMEClass, SCENARIO_FSM__INITIAL_STATE); + createEReference(scenarioFSMEClass, SCENARIO_FSM__ACCEPTING_STATES); + createEReference(scenarioFSMEClass, SCENARIO_FSM__TRANSITIONS); + createEAttribute(scenarioFSMEClass, SCENARIO_FSM__NAME); + + scenarioFSMStateEClass = createEClass(SCENARIO_FSM_STATE); + createEReference(scenarioFSMStateEClass, SCENARIO_FSM_STATE__EVENT); + createEReference(scenarioFSMStateEClass, SCENARIO_FSM_STATE__OUTGOING_TRANSITIONS); + createEReference(scenarioFSMStateEClass, SCENARIO_FSM_STATE__INCOMING_TRANSITIONS); + createEAttribute(scenarioFSMStateEClass, SCENARIO_FSM_STATE__NAME); + + scenarioFSMTransitionEClass = createEClass(SCENARIO_FSM_TRANSITION); + createEReference(scenarioFSMTransitionEClass, SCENARIO_FSM_TRANSITION__GUARD); + createEReference(scenarioFSMTransitionEClass, SCENARIO_FSM_TRANSITION__SOURCE); + createEReference(scenarioFSMTransitionEClass, SCENARIO_FSM_TRANSITION__TARGET); + createEAttribute(scenarioFSMTransitionEClass, SCENARIO_FSM_TRANSITION__NAME); + + arbiterEClass = createEClass(ARBITER); + createEReference(arbiterEClass, ARBITER__STATES); + createEReference(arbiterEClass, ARBITER__TRANSITIONS); + createEReference(arbiterEClass, ARBITER__INITIAL_STATE); + createEReference(arbiterEClass, ARBITER__ACCEPTING_STATES); + createEAttribute(arbiterEClass, ARBITER__NAME); + + arbiterStateEClass = createEClass(ARBITER_STATE); + createEReference(arbiterStateEClass, ARBITER_STATE__INCOMING_TRANSITIONS); + createEReference(arbiterStateEClass, ARBITER_STATE__OUTGOING_TRANSITIONS); + createEAttribute(arbiterStateEClass, ARBITER_STATE__TRUTH_VALUE); + createEAttribute(arbiterStateEClass, ARBITER_STATE__NAME); + + arbiterTransitionEClass = createEClass(ARBITER_TRANSITION); + createEReference(arbiterTransitionEClass, ARBITER_TRANSITION__GUARD); + createEReference(arbiterTransitionEClass, ARBITER_TRANSITION__SOURCE); + createEReference(arbiterTransitionEClass, ARBITER_TRANSITION__TARGET); + createEAttribute(arbiterTransitionEClass, ARBITER_TRANSITION__NAME); + + // Create enums + truthValueEEnum = createEEnum(TRUTH_VALUE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + PropertyPackage thePropertyPackage = (PropertyPackage)EPackage.Registry.INSTANCE.getEPackage(PropertyPackage.eNS_URI); + + // Create type parameters + ETypeParameter scenarioEClass_T = addETypeParameter(scenarioEClass, "T"); + addETypeParameter(elementProviderEClass, "T"); + ETypeParameter elementReferenceEClass_T = addETypeParameter(elementReferenceEClass, "T"); + ETypeParameter elementQueryEClass_T = addETypeParameter(elementQueryEClass, "T"); + ETypeParameter elementQueryEClass_P = addETypeParameter(elementQueryEClass, "P"); + ETypeParameter eventOccurrenceEClass_E = addETypeParameter(eventOccurrenceEClass, "E"); + ETypeParameter eventOccurrenceEClass_P = addETypeParameter(eventOccurrenceEClass, "P"); + ETypeParameter scenarioElementEClass_P = addETypeParameter(scenarioElementEClass, "P"); + ETypeParameter scenarioFSMEClass_P = addETypeParameter(scenarioFSMEClass, "P"); + ETypeParameter scenarioFSMEClass_E = addETypeParameter(scenarioFSMEClass, "E"); + ETypeParameter scenarioFSMEClass_S = addETypeParameter(scenarioFSMEClass, "S"); + ETypeParameter scenarioFSMEClass_T = addETypeParameter(scenarioFSMEClass, "T"); + ETypeParameter scenarioFSMStateEClass_E = addETypeParameter(scenarioFSMStateEClass, "E"); + ETypeParameter scenarioFSMStateEClass_T = addETypeParameter(scenarioFSMStateEClass, "T"); + ETypeParameter scenarioFSMTransitionEClass_P = addETypeParameter(scenarioFSMTransitionEClass, "P"); + ETypeParameter scenarioFSMTransitionEClass_S = addETypeParameter(scenarioFSMTransitionEClass, "S"); + ETypeParameter arbiterEClass_P = addETypeParameter(arbiterEClass, "P"); + ETypeParameter arbiterEClass_S = addETypeParameter(arbiterEClass, "S"); + ETypeParameter arbiterEClass_T = addETypeParameter(arbiterEClass, "T"); + ETypeParameter arbiterStateEClass_P = addETypeParameter(arbiterStateEClass, "P"); + ETypeParameter arbiterStateEClass_T = addETypeParameter(arbiterStateEClass, "T"); + ETypeParameter arbiterTransitionEClass_P = addETypeParameter(arbiterTransitionEClass, "P"); + ETypeParameter arbiterTransitionEClass_S = addETypeParameter(arbiterTransitionEClass, "S"); + + // Set bounds for type parameters + EGenericType g1 = createEGenericType(this.getScenarioElement()); + EGenericType g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + scenarioEClass_T.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getStateProperty()); + g2 = createEGenericType(elementQueryEClass_T); + g1.getETypeArguments().add(g2); + elementQueryEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getEvent()); + eventOccurrenceEClass_E.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + eventOccurrenceEClass_P.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + scenarioElementEClass_P.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + scenarioFSMEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getEvent()); + scenarioFSMEClass_E.getEBounds().add(g1); + g1 = createEGenericType(this.getScenarioFSMState()); + g2 = createEGenericType(scenarioFSMEClass_E); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(scenarioFSMEClass_T); + g1.getETypeArguments().add(g2); + scenarioFSMEClass_S.getEBounds().add(g1); + g1 = createEGenericType(this.getScenarioFSMTransition()); + g2 = createEGenericType(scenarioFSMEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(scenarioFSMEClass_S); + g1.getETypeArguments().add(g2); + scenarioFSMEClass_T.getEBounds().add(g1); + g1 = createEGenericType(this.getEvent()); + scenarioFSMStateEClass_E.getEBounds().add(g1); + g1 = createEGenericType(this.getScenarioFSMTransition()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + scenarioFSMStateEClass_T.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + scenarioFSMTransitionEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getScenarioFSMState()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + scenarioFSMTransitionEClass_S.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + arbiterEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getArbiterState()); + g2 = createEGenericType(arbiterEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(arbiterEClass_T); + g1.getETypeArguments().add(g2); + arbiterEClass_S.getEBounds().add(g1); + g1 = createEGenericType(this.getArbiterTransition()); + g2 = createEGenericType(arbiterEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(arbiterEClass_S); + g1.getETypeArguments().add(g2); + arbiterEClass_T.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + arbiterStateEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getArbiterTransition()); + g2 = createEGenericType(arbiterStateEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + arbiterStateEClass_T.getEBounds().add(g1); + g1 = createEGenericType(thePropertyPackage.getProperty()); + arbiterTransitionEClass_P.getEBounds().add(g1); + g1 = createEGenericType(this.getArbiterState()); + g2 = createEGenericType(arbiterTransitionEClass_P); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + arbiterTransitionEClass_S.getEBounds().add(g1); + + // Add supertypes to classes + g1 = createEGenericType(this.getElementProvider()); + g2 = createEGenericType(elementReferenceEClass_T); + g1.getETypeArguments().add(g2); + elementReferenceEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getElementProvider()); + g2 = createEGenericType(elementQueryEClass_T); + g1.getETypeArguments().add(g2); + elementQueryEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getScenarioElement()); + g2 = createEGenericType(eventOccurrenceEClass_P); + g1.getETypeArguments().add(g2); + eventOccurrenceEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getScenarioElement()); + g2 = createEGenericType(scenarioFSMEClass_P); + g1.getETypeArguments().add(g2); + scenarioFSMEClass.getEGenericSuperTypes().add(g1); + + // Initialize classes, features, and operations; add parameters + initEClass(scenarioEClass, Scenario.class, "Scenario", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(scenarioEClass_T); + initEReference(getScenario_Elements(), g1, null, "elements", null, 0, -1, Scenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eventEClass, Event.class, "Event", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(elementProviderEClass, ElementProvider.class, "ElementProvider", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(elementReferenceEClass, ElementReference.class, "ElementReference", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(elementReferenceEClass_T); + initEReference(getElementReference_Element(), g1, null, "element", null, 0, 1, ElementReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(elementQueryEClass, ElementQuery.class, "ElementQuery", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(elementQueryEClass_P); + initEReference(getElementQuery_Query(), g1, null, "query", null, 0, 1, ElementQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eventOccurrenceEClass, EventOccurrence.class, "EventOccurrence", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(eventOccurrenceEClass_E); + initEReference(getEventOccurrence_Event(), g1, null, "event", null, 0, 1, EventOccurrence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEventOccurrence_Time(), ecorePackage.getEInt(), "time", null, 0, 1, EventOccurrence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(scenarioElementEClass, ScenarioElement.class, "ScenarioElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(this.getScenarioElement()); + g2 = createEGenericType(scenarioElementEClass_P); + g1.getETypeArguments().add(g2); + initEReference(getScenarioElement_PreviousElements(), g1, this.getScenarioElement_NextElements(), "previousElements", null, 0, -1, ScenarioElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(this.getScenarioElement()); + g2 = createEGenericType(scenarioElementEClass_P); + g1.getETypeArguments().add(g2); + initEReference(getScenarioElement_NextElements(), g1, this.getScenarioElement_PreviousElements(), "nextElements", null, 0, -1, ScenarioElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(scenarioElementEClass_P); + initEReference(getScenarioElement_Guard(), g1, null, "guard", null, 0, 1, ScenarioElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(scenarioFSMEClass, ScenarioFSM.class, "ScenarioFSM", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(scenarioFSMEClass_S); + initEReference(getScenarioFSM_States(), g1, null, "states", null, 0, -1, ScenarioFSM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(scenarioFSMEClass_S); + initEReference(getScenarioFSM_InitialState(), g1, null, "initialState", null, 1, 1, ScenarioFSM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(scenarioFSMEClass_S); + initEReference(getScenarioFSM_AcceptingStates(), g1, null, "acceptingStates", null, 0, -1, ScenarioFSM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(scenarioFSMEClass_T); + initEReference(getScenarioFSM_Transitions(), g1, null, "transitions", null, 0, -1, ScenarioFSM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getScenarioFSM_Name(), ecorePackage.getEString(), "name", null, 0, 1, ScenarioFSM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(scenarioFSMStateEClass, ScenarioFSMState.class, "ScenarioFSMState", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(scenarioFSMStateEClass_E); + initEReference(getScenarioFSMState_Event(), g1, null, "event", null, 0, 1, ScenarioFSMState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(scenarioFSMStateEClass_T); + initEReference(getScenarioFSMState_OutgoingTransitions(), g1, this.getScenarioFSMTransition_Source(), "outgoingTransitions", null, 0, -1, ScenarioFSMState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(scenarioFSMStateEClass_T); + initEReference(getScenarioFSMState_IncomingTransitions(), g1, this.getScenarioFSMTransition_Target(), "incomingTransitions", null, 0, -1, ScenarioFSMState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getScenarioFSMState_Name(), ecorePackage.getEString(), "name", null, 0, 1, ScenarioFSMState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(scenarioFSMTransitionEClass, ScenarioFSMTransition.class, "ScenarioFSMTransition", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(scenarioFSMTransitionEClass_P); + initEReference(getScenarioFSMTransition_Guard(), g1, null, "guard", null, 0, 1, ScenarioFSMTransition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(scenarioFSMTransitionEClass_S); + initEReference(getScenarioFSMTransition_Source(), g1, this.getScenarioFSMState_OutgoingTransitions(), "source", null, 1, 1, ScenarioFSMTransition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(scenarioFSMTransitionEClass_S); + initEReference(getScenarioFSMTransition_Target(), g1, this.getScenarioFSMState_IncomingTransitions(), "target", null, 1, 1, ScenarioFSMTransition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getScenarioFSMTransition_Name(), ecorePackage.getEString(), "name", null, 0, 1, ScenarioFSMTransition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(arbiterEClass, Arbiter.class, "Arbiter", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(arbiterEClass_S); + initEReference(getArbiter_States(), g1, null, "states", null, 0, -1, Arbiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(arbiterEClass_T); + initEReference(getArbiter_Transitions(), g1, null, "transitions", null, 0, -1, Arbiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(arbiterEClass_S); + initEReference(getArbiter_InitialState(), g1, null, "initialState", null, 0, 1, Arbiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(arbiterEClass_S); + initEReference(getArbiter_AcceptingStates(), g1, null, "acceptingStates", null, 0, -1, Arbiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getArbiter_Name(), ecorePackage.getEString(), "name", null, 0, 1, Arbiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(arbiterStateEClass, ArbiterState.class, "ArbiterState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(arbiterStateEClass_T); + initEReference(getArbiterState_IncomingTransitions(), g1, this.getArbiterTransition_Target(), "incomingTransitions", null, 0, -1, ArbiterState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(arbiterStateEClass_T); + initEReference(getArbiterState_OutgoingTransitions(), g1, this.getArbiterTransition_Source(), "outgoingTransitions", null, 0, -1, ArbiterState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getArbiterState_TruthValue(), this.getTruthValue(), "truthValue", null, 1, 1, ArbiterState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getArbiterState_Name(), ecorePackage.getEString(), "name", null, 0, 1, ArbiterState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(arbiterTransitionEClass, ArbiterTransition.class, "ArbiterTransition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(arbiterTransitionEClass_P); + initEReference(getArbiterTransition_Guard(), g1, null, "guard", null, 0, 1, ArbiterTransition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(arbiterTransitionEClass_S); + initEReference(getArbiterTransition_Source(), g1, this.getArbiterState_OutgoingTransitions(), "source", null, 1, 1, ArbiterTransition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(arbiterTransitionEClass_S); + initEReference(getArbiterTransition_Target(), g1, this.getArbiterState_IncomingTransitions(), "target", null, 1, 1, ArbiterTransition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getArbiterTransition_Name(), ecorePackage.getEString(), "name", null, 0, 1, ArbiterTransition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(truthValueEEnum, TruthValue.class, "TruthValue"); + addEEnumLiteral(truthValueEEnum, TruthValue.INCONCLUSIVE); + addEEnumLiteral(truthValueEEnum, TruthValue.TRUE); + addEEnumLiteral(truthValueEEnum, TruthValue.FALSE); + + // Create resource + createResource(eNS_URI); + } + +} //ScenarioPackageImpl diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/util/ScenarioAdapterFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/util/ScenarioAdapterFactory.java new file mode 100644 index 000000000..712587eb9 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/util/ScenarioAdapterFactory.java @@ -0,0 +1,339 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.event.commons.model.property.Property; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +import org.eclipse.gemoc.event.commons.model.scenario.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage + * @generated + */ +public class ScenarioAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ScenarioPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ScenarioAdapterFactory() { + if (modelPackage == null) { + modelPackage = ScenarioPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ScenarioSwitch modelSwitch = + new ScenarioSwitch() { + @Override + public > Adapter caseScenario(Scenario object) { + return createScenarioAdapter(); + } + @Override + public Adapter caseEvent(Event object) { + return createEventAdapter(); + } + @Override + public Adapter caseElementProvider(ElementProvider object) { + return createElementProviderAdapter(); + } + @Override + public Adapter caseElementReference(ElementReference object) { + return createElementReferenceAdapter(); + } + @Override + public > Adapter caseElementQuery(ElementQuery object) { + return createElementQueryAdapter(); + } + @Override + public Adapter caseEventOccurrence(EventOccurrence object) { + return createEventOccurrenceAdapter(); + } + @Override + public

Adapter caseScenarioElement(ScenarioElement

object) { + return createScenarioElementAdapter(); + } + @Override + public

, T extends ScenarioFSMTransition> Adapter caseScenarioFSM(ScenarioFSM object) { + return createScenarioFSMAdapter(); + } + @Override + public > Adapter caseScenarioFSMState(ScenarioFSMState object) { + return createScenarioFSMStateAdapter(); + } + @Override + public

> Adapter caseScenarioFSMTransition(ScenarioFSMTransition object) { + return createScenarioFSMTransitionAdapter(); + } + @Override + public

, T extends ArbiterTransition> Adapter caseArbiter(Arbiter object) { + return createArbiterAdapter(); + } + @Override + public

> Adapter caseArbiterState(ArbiterState object) { + return createArbiterStateAdapter(); + } + @Override + public

> Adapter caseArbiterTransition(ArbiterTransition object) { + return createArbiterTransitionAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.Scenario Scenario}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.Scenario + * @generated + */ + public Adapter createScenarioAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.Event Event}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.Event + * @generated + */ + public Adapter createEventAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementProvider Element Provider}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ElementProvider + * @generated + */ + public Adapter createElementProviderAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementReference Element Reference}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ElementReference + * @generated + */ + public Adapter createElementReferenceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ElementQuery Element Query}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ElementQuery + * @generated + */ + public Adapter createElementQueryAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence Event Occurrence}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.EventOccurrence + * @generated + */ + public Adapter createEventOccurrenceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioElement + * @generated + */ + public Adapter createScenarioElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM FSM}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSM + * @generated + */ + public Adapter createScenarioFSMAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState FSM State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMState + * @generated + */ + public Adapter createScenarioFSMStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition FSM Transition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioFSMTransition + * @generated + */ + public Adapter createScenarioFSMTransitionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.Arbiter Arbiter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.Arbiter + * @generated + */ + public Adapter createArbiterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterState Arbiter State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterState + * @generated + */ + public Adapter createArbiterStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition Arbiter Transition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.gemoc.event.commons.model.scenario.ArbiterTransition + * @generated + */ + public Adapter createArbiterTransitionAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ScenarioAdapterFactory diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/util/ScenarioSwitch.java b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/util/ScenarioSwitch.java new file mode 100644 index 000000000..a6774f256 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.event.commons.model/src/org/eclipse/gemoc/event/commons/model/scenario/util/ScenarioSwitch.java @@ -0,0 +1,369 @@ +/** + */ +package org.eclipse.gemoc.event.commons.model.scenario.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.gemoc.event.commons.model.property.Property; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; + +import org.eclipse.gemoc.event.commons.model.scenario.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.gemoc.event.commons.model.scenario.ScenarioPackage + * @generated + */ +public class ScenarioSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ScenarioPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ScenarioSwitch() { + if (modelPackage == null) { + modelPackage = ScenarioPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T1 doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ScenarioPackage.SCENARIO: { + Scenario scenario = (Scenario)theEObject; + T1 result = caseScenario(scenario); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.EVENT: { + Event event = (Event)theEObject; + T1 result = caseEvent(event); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.ELEMENT_PROVIDER: { + ElementProvider elementProvider = (ElementProvider)theEObject; + T1 result = caseElementProvider(elementProvider); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.ELEMENT_REFERENCE: { + ElementReference elementReference = (ElementReference)theEObject; + T1 result = caseElementReference(elementReference); + if (result == null) result = caseElementProvider(elementReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.ELEMENT_QUERY: { + ElementQuery elementQuery = (ElementQuery)theEObject; + T1 result = caseElementQuery(elementQuery); + if (result == null) result = caseElementProvider(elementQuery); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.EVENT_OCCURRENCE: { + EventOccurrence eventOccurrence = (EventOccurrence)theEObject; + T1 result = caseEventOccurrence(eventOccurrence); + if (result == null) result = caseScenarioElement(eventOccurrence); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.SCENARIO_ELEMENT: { + ScenarioElement scenarioElement = (ScenarioElement)theEObject; + T1 result = caseScenarioElement(scenarioElement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.SCENARIO_FSM: { + ScenarioFSM scenarioFSM = (ScenarioFSM)theEObject; + T1 result = caseScenarioFSM(scenarioFSM); + if (result == null) result = caseScenarioElement(scenarioFSM); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.SCENARIO_FSM_STATE: { + ScenarioFSMState scenarioFSMState = (ScenarioFSMState)theEObject; + T1 result = caseScenarioFSMState(scenarioFSMState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.SCENARIO_FSM_TRANSITION: { + ScenarioFSMTransition scenarioFSMTransition = (ScenarioFSMTransition)theEObject; + T1 result = caseScenarioFSMTransition(scenarioFSMTransition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.ARBITER: { + Arbiter arbiter = (Arbiter)theEObject; + T1 result = caseArbiter(arbiter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.ARBITER_STATE: { + ArbiterState arbiterState = (ArbiterState)theEObject; + T1 result = caseArbiterState(arbiterState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScenarioPackage.ARBITER_TRANSITION: { + ArbiterTransition arbiterTransition = (ArbiterTransition)theEObject; + T1 result = caseArbiterTransition(arbiterTransition); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Scenario'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Scenario'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T1 caseScenario(Scenario object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseEvent(Event object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Element Provider'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Provider'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseElementProvider(ElementProvider object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Element Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseElementReference(ElementReference object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Element Query'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Query'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T1 caseElementQuery(ElementQuery object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event Occurrence'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event Occurrence'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseEventOccurrence(EventOccurrence object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

T1 caseScenarioElement(ScenarioElement

object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'FSM'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'FSM'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

, T extends ScenarioFSMTransition> T1 caseScenarioFSM(ScenarioFSM object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'FSM State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'FSM State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T1 caseScenarioFSMState(ScenarioFSMState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'FSM Transition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'FSM Transition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

> T1 caseScenarioFSMTransition(ScenarioFSMTransition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Arbiter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Arbiter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

, T extends ArbiterTransition> T1 caseArbiter(Arbiter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Arbiter State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Arbiter State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

> T1 caseArbiterState(ArbiterState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Arbiter Transition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Arbiter Transition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public

> T1 caseArbiterTransition(ArbiterTransition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T1 defaultCase(EObject object) { + return null; + } + +} //ScenarioSwitch diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/plugin.xml index ce4df2d84..86cc3c8ba 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/plugin.xml +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/plugin.xml @@ -93,5 +93,9 @@ actionClass="org.eclipse.gemoc.executionframework.debugger.ui.breakpoints.GemocToggleBreakpointAction" id="org.eclipse.gemoc.executionframework.debugger.ui.GemocToggleBreakpointAction"> + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocToggleConditionalBreakpointAction.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocToggleConditionalBreakpointAction.java new file mode 100644 index 000000000..e143f6729 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocToggleConditionalBreakpointAction.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright (c) 2016 Inria and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Inria - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.executionframework.debugger.ui.breakpoints; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; +import org.eclipse.gemoc.executionframework.debugger.GemocBreakpoint; +import org.eclipse.gemoc.executionframework.engine.ui.launcher.AbstractGemocLauncher; + +import fr.inria.diverse.melange.resource.MelangeResource; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.DSLToggleBreakpointsUtils; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.action.AbstractToggleBreakpointAction; + +/** + * commons class for all Gemoc based models + * + * @author dleroy + * + */ +public class GemocToggleConditionalBreakpointAction extends AbstractToggleBreakpointAction { + + @Override + protected String getModelIdentifier() { + return AbstractGemocLauncher.MODEL_ID; + } + + @Override + protected DSLToggleBreakpointsUtils createToggleBreakpointsUtils() { + return new DSLToggleBreakpointsUtils(getModelIdentifier()) { + @Override + protected void toggleBreakpoint(Object selected, EObject instruction) throws CoreException { + DSLBreakpoint breakpoint = getBreakpoint(instruction); + if (breakpoint != null) { + breakpoint.delete(); + } else { + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + try { + DSLBreakpoint breakpoint = createBreakpoint(selected, instruction); + DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(breakpoint); + } catch (CoreException e) { + e.printStackTrace(); + } + } + }); + } + } + + @Override + protected DSLBreakpoint createBreakpoint(Object selected, EObject instruction) throws CoreException { + final Resource res = ((EObject) instruction).eResource(); + final ResourceSet resSet = res.getResourceSet(); + final Resource originalResource = resSet.getResources().stream().filter(r -> { + return r instanceof MelangeResource; + }).map(r -> (MelangeResource) r).findFirst().map(mr -> mr.getWrappedResource()).orElse(null); + + if (originalResource != null) { + final String fragmentURI = res.getURIFragment(instruction); + instruction = originalResource.getEObject(fragmentURI); + } + + final GemocBreakpoint breakpoint = new GemocBreakpoint(identifier, instruction, true); + + Shell activeShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + FileDialog dialog = new FileDialog(activeShell, SWT.OPEN); + try { + breakpoint.getMarker().setAttribute(GemocBreakpoint.PROPERTY, dialog.open()); + } catch (CoreException e) { + e.printStackTrace(); + } + + return breakpoint; + } + }; + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebugger.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebugger.java index 864819f00..1d3562441 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebugger.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebugger.java @@ -23,29 +23,16 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; import java.util.function.BiPredicate; -import java.util.function.Function; import java.util.stream.Collectors; -import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer; -import org.eclipse.debug.internal.ui.views.launch.LaunchView; import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.TreePath; -import org.eclipse.jface.viewers.TreeSelection; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.swt.widgets.Tree; -import org.eclipse.swt.widgets.TreeItem; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PlatformUI; +import org.eclipse.gemoc.dsl.debug.ide.AbstractDSLDebugger; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; +import org.eclipse.gemoc.trace.commons.model.trace.Step; import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; @@ -53,14 +40,6 @@ import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.IModelChangeListenerAddon; import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.SimpleModelChangeListenerAddon; -import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; -import org.eclipse.gemoc.trace.commons.model.trace.Step; -import org.eclipse.gemoc.dsl.debug.StackFrame; -import org.eclipse.gemoc.dsl.debug.ide.AbstractDSLDebugger; -import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLStackFrameAdapter; -import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; - -@SuppressWarnings("restriction") public abstract class AbstractGemocDebugger extends AbstractDSLDebugger implements IGemocDebugger { /** @@ -385,8 +364,6 @@ public void setVariableValue(String threadName, String stackName, String variabl data.setValue(value); } - private ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(); - @Override public void updateData(String threadName, EObject instruction) { if (executedModelRoot == null) { @@ -399,72 +376,10 @@ public void updateData(String threadName, EObject instruction) { variable(threadName, frameName, "mutable data", m.getName(), m.getValue(), true); } } else { - // Updating mutable datas + // Updating mutable data updateVariables(threadName); } updateStack(threadName, instruction); - scheduleSelectLastStackframe(500); - } - - protected void scheduleSelectLastStackframe(long delay) { - executorService.schedule(() -> selectLastStackframe(), delay, TimeUnit.MILLISECONDS); - } - - private List flatten(List ts, Function> provider) { - if (ts.isEmpty()) { - return ts; - } else { - List res = new ArrayList<>(); - for (T t : ts) { - res.addAll(flatten(provider.apply(t), provider)); - res.add(t); - } - return res; - } - } - - private void selectLastStackframe() { - final IWorkbench workbench = PlatformUI.getWorkbench(); - workbench - .getDisplay() - .asyncExec( - () -> { - final IWorkbenchPage workbenchPage = workbench.getActiveWorkbenchWindow().getActivePage(); - final IViewPart view = workbenchPage.findView("org.eclipse.debug.ui.DebugView"); - if(view == null){ - Activator.getDefault().warn("Cannot find view org.eclipse.debug.ui.DebugView and update the stack", null); - return; - } - view.setFocus(); - final ISelectionProvider selectionProvider = view.getSite().getSelectionProvider(); - selectionProvider.setSelection(StructuredSelection.EMPTY); - if (view instanceof LaunchView) { - final LaunchView launchView = (LaunchView) view; - final Viewer viewer = launchView.getViewer(); - final Tree tree = ((TreeModelViewer) viewer).getTree(); - final TreeItem[] items = tree.getItems(); - final List allItems = flatten(Arrays.asList(items), - t -> Arrays.asList(t.getItems())); - final List leafItems = allItems - .stream() - .filter(i -> i.getData() instanceof DSLStackFrameAdapter) - .filter(i -> ((DSLStackFrameAdapter) i.getData()).getTarget() instanceof StackFrame) - .collect(Collectors.toList()); - for (TreeItem item : leafItems) { - final DSLStackFrameAdapter stackFrameAdapter = (DSLStackFrameAdapter) item - .getData(); - final StackFrame s = (StackFrame) stackFrameAdapter.getTarget(); - if (s.getName().startsWith("Global context :")) { - tree.showItem(item); - tree.select(item); - final TreeSelection selection = (TreeSelection) viewer.getSelection(); - final TreePath[] paths = selection.getPathsFor(stackFrameAdapter); - selectionProvider.setSelection(new TreeSelection(paths)); - break; - } - } - } - }); } @Override diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/GemocBreakpoint.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/GemocBreakpoint.java index 1cf6f31f1..4175439e7 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/GemocBreakpoint.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/GemocBreakpoint.java @@ -35,6 +35,11 @@ public class GemocBreakpoint extends DSLBreakpoint { */ public static final String BREAK_ON_MSE_OCCURRENCE = "org.gemoc.gemoc_modeling_workbench.ui.breakpoint.breakOnMSE"; + /** + * The property. + */ + public static final String PROPERTY = "org.gemoc.gemoc_modeling_workbench.ui.breakpoint.property"; + /** diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/commons/RunConfiguration.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/commons/RunConfiguration.java index 935ade899..056bbee41 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/commons/RunConfiguration.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/commons/RunConfiguration.java @@ -26,8 +26,6 @@ public class RunConfiguration implements IRunConfiguration { - - protected ILaunchConfiguration _launchConfiguration; public RunConfiguration(ILaunchConfiguration launchConfiguration) throws CoreException { @@ -50,6 +48,10 @@ protected void extractInformation() throws CoreException { _modelEntryPoint = getAttribute(LAUNCH_MODEL_ENTRY_POINT, ""); _modelInitializationMethod = getAttribute(LAUNCH_INITIALIZATION_METHOD, ""); _modelInitializationArguments = getAttribute(LAUNCH_INITIALIZATION_ARGUMENTS, ""); + String scenarioPath = getAttribute(LAUNCH_SCENARIO_URI, ""); + _scenarioURI = scenarioPath.length() > 0 ? URI.createPlatformResourceURI(scenarioPath, true) : null; + String arbiterPath = getAttribute(LAUNCH_ARBITER_URI, ""); + _arbiterURI = arbiterPath.length() > 0 ? URI.createPlatformResourceURI(arbiterPath, true) : null; _melangeQuery = getAttribute(LAUNCH_MELANGE_QUERY, ""); for (EngineAddonSpecificationExtension extension : EngineAddonSpecificationExtensionPoint.getSpecifications()) { @@ -78,8 +80,6 @@ public int getAnimationDelay() { return _animationDelay; } - - private URI _modelURI; @Override @@ -161,6 +161,20 @@ public String getModelInitializationArguments() { return _modelInitializationArguments; } + private URI _scenarioURI; + + @Override + public URI getScenarioURI() { + return _scenarioURI; + } + + private URI _arbiterURI; + + @Override + public URI getArbiterURI() { + return _arbiterURI; + } + private boolean _breakStart; @Override diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/launcher/AbstractGemocLauncher.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/launcher/AbstractGemocLauncher.java index 075b8b2bc..9f2f89fd1 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/launcher/AbstractGemocLauncher.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/launcher/AbstractGemocLauncher.java @@ -20,7 +20,7 @@ import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; -abstract public class AbstractGemocLauncher extends org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch.AbstractDSLLaunchConfigurationDelegateUI { +abstract public class AbstractGemocLauncher extends org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch.AbstractDSLLaunchConfigurationDelegateSiriusUI { // warning this MODEL_ID must be the same as the one in the ModelLoader in order to enable correctly the breakpoints public final static String MODEL_ID = org.eclipse.gemoc.executionframework.engine.ui.Activator.PLUGIN_ID+".debugModel"; diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/META-INF/MANIFEST.MF index 54a7e8c68..629b59ced 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/META-INF/MANIFEST.MF +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/META-INF/MANIFEST.MF @@ -13,7 +13,9 @@ Require-Bundle: org.eclipse.gemoc.xdsmlframework.api, org.eclipse.emf.transaction;bundle-version="1.8.0", org.eclipse.gemoc.trace.gemoc.api;bundle-version="1.0.0", fr.inria.diverse.k3.al.annotationprocessor.plugin, - org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0" + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0", + org.eclipse.gemoc.event.commons.model, + org.eclipse.gemoc.event.commons.interpreter Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Export-Package: org.eclipse.gemoc.executionframework.engine, diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractExecutionEngine.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractExecutionEngine.java index 98e2b6345..af21b5b3a 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractExecutionEngine.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractExecutionEngine.java @@ -313,42 +313,47 @@ public final void start() { @Override public void run() { - try { - notifyEngineAboutToStart(); - Activator.getDefault().gemocRunningEngineRegistry.registerEngine(getName(), AbstractExecutionEngine.this); - setEngineStatus(EngineStatus.RunStatus.Running); - beforeStart(); - notifyEngineStarted(); - try { - performStart(); - } finally { - // We always try to commit the last remaining - // transaction - commitCurrentTransaction(); - } - - } catch (EngineStoppedException stopException) { - // not really an error, simply print the stop exception - // message - Activator.getDefault().info("Engine stopped by the user : " + stopException.getMessage()); - - } catch (Throwable e) { - error = e; - e.printStackTrace(); - Activator.getDefault().error("Exception received " + e.getMessage() + ", stopping engine.", e); - } finally { - // make sure to notify the stop if this wasn't an - // external call to stop() that lead us here. - // ie. normal end of the mode execution - stop(); - Activator.getDefault().info("*** " + AbstractExecutionEngine.this.getName() + " stopped ***"); - } + startSynchronous(); } }; thread = new Thread(r, engineKindName() + " " + _executionContext.getRunConfiguration().getExecutedModelURI()); thread.start(); } } + + @Override + public final void startSynchronous() { + try { + notifyEngineAboutToStart(); + Activator.getDefault().gemocRunningEngineRegistry.registerEngine(getName(), AbstractExecutionEngine.this); + setEngineStatus(EngineStatus.RunStatus.Running); + beforeStart(); + notifyEngineStarted(); + try { + performStart(); + } finally { + // We always try to commit the last remaining + // transaction + commitCurrentTransaction(); + } + + } catch (EngineStoppedException stopException) { + // not really an error, simply print the stop exception + // message + Activator.getDefault().info("Engine stopped by the user : " + stopException.getMessage()); + + } catch (Throwable e) { + error = e; + e.printStackTrace(); + Activator.getDefault().error("Exception received " + e.getMessage() + ", stopping engine.", e); + } finally { + // make sure to notify the stop if this wasn't an + // external call to stop() that lead us here. + // ie. normal end of the mode execution + stop(); + Activator.getDefault().info("*** " + AbstractExecutionEngine.this.getName() + " stopped ***"); + } + } @Override public final void stop() { diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java index a252a4eec..9caf84ffc 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java @@ -15,43 +15,44 @@ import java.util.ArrayList; import java.util.Set; +import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EOperation; import org.eclipse.emf.ecore.EcoreFactory; import org.eclipse.emf.transaction.RecordingCommand; import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.gemoc.event.commons.interpreter.EventInterpreter; +import org.eclipse.gemoc.event.commons.interpreter.IEventInterpreter; +import org.eclipse.gemoc.event.commons.interpreter.property.PropertyMonitor; import org.eclipse.gemoc.executionframework.engine.Activator; -import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext; -import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; - -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.EventManagerRegistry; -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IEventManager; import org.eclipse.gemoc.trace.commons.model.generictrace.GenericSequentialStep; import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictraceFactory; import org.eclipse.gemoc.trace.commons.model.trace.GenericMSE; import org.eclipse.gemoc.trace.commons.model.trace.MSE; import org.eclipse.gemoc.trace.commons.model.trace.MSEModel; import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; -import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; import org.eclipse.gemoc.trace.commons.model.trace.Step; import org.eclipse.gemoc.trace.commons.model.trace.TraceFactory; import org.eclipse.gemoc.trace.gemoc.api.IMultiDimensionalTraceAddon; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; /** * Abstract class providing a basic implementation for sequential engines - * + * * @author Didier Vojtisek * */ public abstract class AbstractSequentialExecutionEngine extends AbstractExecutionEngine implements IExecutionEngine { private MSEModel _actionModel; - private IMultiDimensionalTraceAddon traceAddon; + private IMultiDimensionalTraceAddon traceAddon; + private IEventInterpreter eventInterpreter; protected abstract void executeEntryPoint(); - + /** * if it exists, calls the method tagged as @Initialize */ @@ -72,8 +73,19 @@ public abstract class AbstractSequentialExecutionEngine extends AbstractExecutio public final void performInitialize(IExecutionContext executionContext) { @SuppressWarnings("rawtypes") Set traceManagers = this.getAddonsTypedBy(IMultiDimensionalTraceAddon.class); - if (!traceManagers.isEmpty()) + if (!traceManagers.isEmpty()) { this.traceAddon = traceManagers.iterator().next(); + } + eventInterpreter = new EventInterpreter(); + getExecutionContext().getExecutionPlatform().addEngineAddon(eventInterpreter); + URI scenarioURI = executionContext.getRunConfiguration().getScenarioURI(); + if (scenarioURI != null) { + eventInterpreter.loadScenario(scenarioURI, executionContext.getResourceModel().getResourceSet()); + } + URI arbiterURI = executionContext.getRunConfiguration().getArbiterURI(); + if (arbiterURI != null) { + eventInterpreter.loadArbiter(arbiterURI, executionContext.getResourceModel().getResourceSet()); + } prepareEntryPoint(executionContext); prepareInitializeModel(executionContext); } @@ -85,17 +97,10 @@ protected final void performStart() { executeEntryPoint(); Activator.getDefault().info("Execution finished"); } - + private void manageEvents() { - MSEOccurrence mse = getCurrentMSEOccurrence(); - if (mse != null) { - EObject container = mse.eContainer(); - if (container instanceof SequentialStep) { - IEventManager eventManager = EventManagerRegistry.getInstance().findEventManager(); - if (eventManager != null) { - eventManager.manageEvents(); - } - } + if (eventInterpreter != null) { + eventInterpreter.processEvents(); } } @@ -104,7 +109,7 @@ protected final void afterExecutionStep() { manageEvents(); super.afterExecutionStep(); } - + /** * To be called just before each execution step by an implementing engine. */ @@ -189,8 +194,6 @@ private EOperation findOperation(EObject object, String className, String method return operation; } - - /** * Find the MSE element for the triplet caller/className/MethodName in the model of precalculated possible MSE. * If it doesn't exist yet, create one and add it to the model. @@ -250,16 +253,13 @@ protected void doExecute() { @Override protected void beforeStart() { - // TODO Auto-generated method stub } @Override protected void performStop() { - // TODO Auto-generated method stub } @Override protected void finishDispose() { - // TODO Auto-generated method stub } } diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/META-INF/MANIFEST.MF index 8dc575384..1cde3ef8a 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/META-INF/MANIFEST.MF +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/META-INF/MANIFEST.MF @@ -11,6 +11,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.emf.ecore, org.eclipse.gemoc.trace.commons.model, org.eclipse.xtext, - fr.inria.diverse.k3.al.annotationprocessor.plugin;bundle-version="3.2.1" + fr.inria.diverse.k3.al.annotationprocessor.plugin;bundle-version="3.2.1", + org.eclipse.gemoc.event.commons.model;bundle-version="1.0.0", + org.eclipse.gemoc.event.commons.interpreter;bundle-version="1.0.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerRenderer.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerRenderer.java index 52792cf02..007f43df2 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerRenderer.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerRenderer.java @@ -15,17 +15,17 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.gemoc.event.commons.interpreter.EventInstance; +import org.eclipse.gemoc.event.commons.interpreter.IEventInterpreter; +import org.eclipse.gemoc.trace.commons.model.trace.Step; import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.EventManagerRegistry; -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IEventManager; -import org.eclipse.gemoc.trace.commons.model.trace.Step; import javafx.application.Platform; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; @@ -41,25 +41,30 @@ import javafx.scene.layout.VBox; import javafx.util.StringConverter; +/** + * This class provides a GUI allowing to queue events to the event interpreter. + * @author dorian leroy + * + */ public class EventManagerRenderer extends Pane implements IEngineAddon { - private IEventManager eventManager; + private IEventInterpreter eventInterpreter; private Resource executedModel; private final ObservableList eventList = FXCollections.observableArrayList(); - private final ObservableList pushedEvents = FXCollections.observableArrayList(); + private final ObservableList pushedEvents = FXCollections.observableArrayList(); private final Map eventTypeToEventTableView = new HashMap<>(); - private final Map> eventTypeToSelectedEvents = new HashMap<>(); + private final Map> eventTypeToSelectedEvents = new HashMap<>(); private final ScrollPane scrollPane = new ScrollPane(); private final ListView eventListView = new ListView<>(eventList); - private final ListView pushedEventListView = new ListView<>(pushedEvents); + private final ListView pushedEventListView = new ListView<>(pushedEvents); private final BorderPane borderPane = new BorderPane(); @@ -84,7 +89,9 @@ public EventManagerRenderer() { }); sendButton.setOnAction(e -> { - pushedEvents.forEach(eventManager::sendEvent); + pushedEvents.forEach(eventInterpreter::queueEvent); + eventTypeToEventTableView.values().forEach(t -> t.getSelectionModel().clearSelection()); +// eventTypeToSelectedEvents.forEach((k,v) -> v.clear()); pushedEvents.clear(); }); @@ -124,12 +131,12 @@ public EClass fromString(String string) { eventTypeToSelectedEvents.remove(e); }); c.getAddedSubList().stream().forEach(e -> { - final EventTableView tableView = new EventTableView(e, executedModel, eventManager); + final EventTableView tableView = new EventTableView(e, executedModel, eventInterpreter); eventTypeToEventTableView.put(e, tableView); - final List selectedEvents = new ArrayList<>(); + final List selectedEvents = new ArrayList<>(); eventTypeToSelectedEvents.put(e, selectedEvents); - final ListChangeListener selectedEventsChangeListener = c1 -> { + final ListChangeListener selectedEventsChangeListener = c1 -> { while (c1.next()) { selectedEvents.removeAll(c1.getRemoved()); selectedEvents.addAll(c1.getAddedSubList()); @@ -145,12 +152,16 @@ public EClass fromString(String string) { eventList.addListener(eventTypesChangeListener); } - public void setEventManager(IEventManager eventManager) { + /** + * Sets the interpreter linked to this event manager + * @param eventInterpreter the event interpreter + */ + public void setEventInterpreter(IEventInterpreter eventInterpreter) { Runnable runnable = () -> { - this.eventManager = eventManager; + this.eventInterpreter = eventInterpreter; eventList.clear(); - if (eventManager != null) { - eventList.addAll(this.eventManager.getEventClasses()); + if (eventInterpreter != null) { +// eventList.addAll(this.eventInterpreter.getEventClasses()); } }; if (!Platform.isFxApplicationThread()) { @@ -191,7 +202,10 @@ public void engineStarted(IExecutionEngine executionEngine) { @Override public void engineInitialized(IExecutionEngine executionEngine) { - setEventManager(EventManagerRegistry.getInstance().findEventManager()); + Set eventManagers = executionEngine.getAddonsTypedBy(IEventInterpreter.class); + if (!eventManagers.isEmpty()) { + setEventInterpreter(eventManagers.iterator().next()); + } } @Override @@ -213,16 +227,16 @@ public void engineAboutToDispose(IExecutionEngine engine) { } @Override - public void stepSelected(IExecutionEngine engine, Step selectedStep) { + public void stepSelected(IExecutionEngine engine, Step selectedStep) { } @Override - public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute) { + public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute) { refreshEvents(); } @Override - public void stepExecuted(IExecutionEngine engine, Step stepExecuted) { + public void stepExecuted(IExecutionEngine engine, Step stepExecuted) { refreshEvents(); } @@ -232,7 +246,6 @@ public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus) { @Override public List validate(List otherAddons) { - // TODO Auto-generated method stub return null; } diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerViewPart.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerViewPart.java index e68c92458..f0199c79d 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerViewPart.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerViewPart.java @@ -26,7 +26,7 @@ public class EventManagerViewPart extends EngineSelectionDependentViewPart { public static final String ID = "org.eclipse.gemoc.executionframework.eventmanager.views.EventManager"; private FXCanvas fxCanvas; - + private EventManagerRenderer eventManagerRenderer; public void createPartControl(Composite parent) { @@ -34,9 +34,9 @@ public void createPartControl(Composite parent) { eventManagerRenderer = new EventManagerRenderer(); Scene scene = new Scene(eventManagerRenderer); fxCanvas.setScene(scene); - + parent.getShell().addListener(SWT.Resize, (e) -> { - + }); } @@ -45,7 +45,11 @@ public void setFocus() { @Override public void engineSelectionChanged(IExecutionEngine engine) { - eventManagerRenderer.setExecutedModel(engine.getExecutionContext().getResourceModel()); - engine.getExecutionContext().getExecutionPlatform().addEngineAddon(eventManagerRenderer); + if (engine != null) { + eventManagerRenderer.setExecutedModel(engine.getExecutionContext().getResourceModel()); + engine.getExecutionContext().getExecutionPlatform().addEngineAddon(eventManagerRenderer); + } else { + eventManagerRenderer.setExecutedModel(null); + } } } diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventPane.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventPane.java index 7b9d39a94..9dec20209 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventPane.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventPane.java @@ -12,15 +12,15 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.gemoc.event.commons.interpreter.IEventInterpreter; -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IEventManager; import javafx.scene.layout.BorderPane; public class EventPane extends BorderPane { private final EventTableView tableView; - public EventPane(EClass eventClass, final Resource executedModel, final IEventManager eventManager) { + public EventPane(EClass eventClass, final Resource executedModel, final IEventInterpreter eventManager) { tableView = new EventTableView(eventClass, executedModel, eventManager); setCenter(tableView); tableView.refreshEvents(); diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventTableView.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventTableView.java index bfbeb5622..260bf0c77 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventTableView.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventTableView.java @@ -14,18 +14,24 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; +import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EFactory; +import org.eclipse.emf.ecore.EGenericType; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.gemoc.event.commons.interpreter.EventInstance; +import org.eclipse.gemoc.event.commons.interpreter.IEventInterpreter; +import org.eclipse.gemoc.event.commons.model.scenario.Event; import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; import org.eclipse.xtext.naming.QualifiedName; -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IEventManager; import javafx.application.Platform; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ObservableValue; @@ -33,11 +39,11 @@ import javafx.collections.ObservableList; import javafx.scene.control.TableColumn; import javafx.scene.control.TableColumn.CellDataFeatures; -import javafx.scene.control.TableRow; import javafx.scene.control.TableView; +import javafx.scene.control.cell.TextFieldTableCell; import javafx.util.Callback; -public class EventTableView extends TableView { +public class EventTableView extends TableView { private final EClass eventClass; @@ -47,40 +53,45 @@ public class EventTableView extends TableView { private final List eventParameterClasses = new ArrayList<>(); + private final Map referenceToParameterClass = new HashMap<>(); + private final Map> referenceToMatchingModelElements = new HashMap<>(); - private final ObservableList events = FXCollections.observableArrayList(); + private final ObservableList events = FXCollections.observableArrayList(); - private final Function canDisplayEventFunction; + private final Function canDisplayEventFunction; - public EventTableView(final EClass eventClass, final Resource executedModel, final IEventManager eventManager) { + public EventTableView(final EClass eventClass, final Resource executedModel, final IEventInterpreter eventManager) { this.eventClass = eventClass; this.factory = eventClass.getEPackage().getEFactoryInstance(); this.executedModel = executedModel; - eventParameterClasses - .addAll(eventClass.getEReferences().stream().map(r -> r.eClass()).collect(Collectors.toList())); + extractEventParameters(); setItems(events); - + setEditable(true); + canDisplayEventFunction = (event) -> { return eventManager.canSendEvent(event); }; - final List> columns = new ArrayList<>(); - eventClass.getEReferences().stream().forEach(r -> { - final TableColumn col = new TableColumn(r.getName()); - col.setCellValueFactory(new EObjectPropertyValueFactory(r)); - columns.add(col); - }); - - setRowFactory(tv -> { - TableRow row = new TableRow<>(); - row.setOnMouseClicked(event -> { - if (event.getClickCount() == 2 && (!row.isEmpty())) { - EObject rowData = row.getItem(); - eventManager.sendEvent(rowData); - } - }); - return row; + final List> columns = new ArrayList<>(); + eventClass.getEAllStructuralFeatures().stream().forEach(f -> { + if (f instanceof EReference) { + final String name = f.getName().substring(0, f.getName().indexOf("Provider")); + final TableColumn col = new TableColumn(name); + col.setCellValueFactory(new EventInstanceReferencePropertyValueFactory((EReference) f)); + columns.add(col); + } else { + final String name = f.getName(); + final TableColumn col = new TableColumn(name); + col.setEditable(true); + col.setCellValueFactory(new EventInstanceAttributePropertyValueFactory((EAttribute) f)); + col.setCellFactory(TextFieldTableCell.forTableColumn()); + col.setOnEditCommit(editEvent -> { + EventInstance event = editEvent.getRowValue(); + event.getParameters().put(f, editEvent.getNewValue()); + }); + columns.add(col); + } }); getColumns().setAll(columns); @@ -91,49 +102,47 @@ public void refreshEvents() { Platform.runLater(() -> { referenceToMatchingModelElements.clear(); gatherPotentialParameters(); - -// final List newEvents = computeAllPossibleEvents().stream().filter(m -> { -// return !events.stream().anyMatch(event -> { -// return m.entrySet().stream().allMatch(entry -> { -// final EReference ref = entry.getKey(); -// final Object val1 = event.eGet(ref); -// final EObject val2 = entry.getValue(); -// return val1 == val2; -// }); -// }); -// }).map(m -> { -// final EObject event = factory.create(eventClass); -// m.entrySet().forEach(entry -> { -// event.eSet(entry.getKey(), entry.getValue()); -// }); -// return event; -// }).filter(event -> canDisplayEventFunction.apply(event)).collect(Collectors.toList()); -// -// final List toRemove = events.stream().filter(event -> canDisplayEventFunction.apply(event)).collect(Collectors.toList()); -// -// events.removeAll(toRemove); -// events.addAll(newEvents); - - events.clear(); - events.addAll(computeAllPossibleEvents().stream().map(m -> { - final EObject event = factory.create(eventClass); - m.entrySet().forEach(entry -> { - event.eSet(entry.getKey(), entry.getValue()); + + final List newEvents = computeAllPossibleEvents().stream().filter(m -> { + return !events.stream().anyMatch(event -> { + return m.entrySet().stream().allMatch(entry -> { + final EStructuralFeature ref = entry.getKey(); + final Object val1 = event.getParameters().get(ref); + final Object val2 = entry.getValue(); + return val1 == val2; + }); }); - return event; - }).filter(event -> canDisplayEventFunction.apply(event)).collect(Collectors.toList())); + }).map(m -> { + return new EventInstance((Event) factory.create(eventClass), m); + }).filter(event -> canDisplayEventFunction.apply(event)).collect(Collectors.toList()); + + final List toRemove = events.stream().filter(event -> !canDisplayEventFunction.apply(event)) + .collect(Collectors.toList()); + events.removeAll(toRemove); + events.addAll(newEvents); + }); + } + + private void extractEventParameters() { + eventClass.getEReferences().forEach(f -> { + final List genericTypes = ((EClass) f.getEType()).getEGenericSuperTypes(); + final List typeArguments = genericTypes.get(0).getETypeArguments(); + final EClass correspondingClass = (EClass) typeArguments.get(0).getEClassifier(); + eventParameterClasses.add(correspondingClass); + referenceToParameterClass.put(f, correspondingClass); }); } private void gatherPotentialParameters() { - final List eventParameters = eventClass.getEReferences(); + final Set eventParameters = referenceToParameterClass.keySet(); executedModel.getAllContents().forEachRemaining(modelElement -> { final EClass elementClass = modelElement.eClass(); - final List matchingParameters = eventParameters.stream().filter(r -> { - return elementClass.getClassifierID() == r.getEType().getClassifierID() - || elementClass.getEAllSuperTypes().contains(r.getEType()); - }).collect(Collectors.toList()); - matchingParameters.forEach(r -> { + eventParameters.stream().filter(r -> { + final EClass parameterClass = referenceToParameterClass.get(r); + return elementClass.getClassifierID() == parameterClass.getClassifierID() + || elementClass.getEAllSuperTypes().contains(parameterClass); + }) + .forEach(r -> { List elements = referenceToMatchingModelElements.get(r); if (elements == null) { elements = new ArrayList<>(); @@ -144,15 +153,15 @@ private void gatherPotentialParameters() { }); } - private List> computeAllPossibleEvents() { - final List> result = new ArrayList<>(); + private List> computeAllPossibleEvents() { + final List> result = new ArrayList<>(); final int nbEvents = referenceToMatchingModelElements.values().stream().map(l -> l.size()) .reduce((i1, i2) -> i1 * i2).orElse(0); final List>> entries = new ArrayList<>( referenceToMatchingModelElements.entrySet()); for (int i = 0; i < nbEvents; i++) { int j = 1; - final Map parametersAssociation = new HashMap<>(); + final Map parametersAssociation = new HashMap<>(); for (Map.Entry> entry : entries) { final List modelElements = entry.getValue(); parametersAssociation.put(entry.getKey(), modelElements.get((i / j) % modelElements.size())); @@ -163,31 +172,30 @@ private List> computeAllPossibleEvents() { return result; } - static class EObjectPropertyValueFactory - implements Callback, ObservableValue> { + static class EventInstanceReferencePropertyValueFactory + implements Callback, ObservableValue> { private final EReference reference; - private final Function stringGetter; private final DefaultDeclarativeQualifiedNameProvider nameprovider = new DefaultDeclarativeQualifiedNameProvider(); + private final Function stringGetter = (o) -> { + if (o instanceof EObject) { + QualifiedName qname = nameprovider.getFullyQualifiedName((EObject) o); + if (qname != null) { + return qname.toString(); + } + } + final String string = o.toString(); + return string.substring(string.lastIndexOf(".") + 1); + }; - public EObjectPropertyValueFactory(EReference reference) { + public EventInstanceReferencePropertyValueFactory(EReference reference) { this.reference = reference; - stringGetter = (o) -> { - if (o instanceof EObject) { - QualifiedName qname = nameprovider.getFullyQualifiedName((EObject) o); - if (qname != null) { - return qname.toString(); - } - } - final String string = o.toString(); - return string.substring(string.lastIndexOf(".") + 1); - }; } @Override - public ObservableValue call(CellDataFeatures p) { - EObject object = p.getValue(); - Object refValue = object.eGet(reference); + public ObservableValue call(CellDataFeatures p) { + EventInstance event = p.getValue(); + Object refValue = event.getParameters().get(reference); if (refValue != null) { String string = stringGetter.apply(refValue); ObservableValue result = new ReadOnlyObjectWrapper(string); @@ -196,4 +204,25 @@ public ObservableValue call(CellDataFeatures p) { return null; } } + + static class EventInstanceAttributePropertyValueFactory + implements Callback, ObservableValue> { + + private final EAttribute attribute; + + public EventInstanceAttributePropertyValueFactory(EAttribute attribute) { + this.attribute = attribute; + } + + @Override + public ObservableValue call(CellDataFeatures p) { + EventInstance event = p.getValue(); + Object refValue = event.getParameters().get(attribute); + if (refValue != null) { + ObservableValue result = new ReadOnlyObjectWrapper(refValue.toString()); + return result; + } + return null; + } + } } diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DefaultModelLoader.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DefaultModelLoader.java index 96820626d..604a599be 100644 --- a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DefaultModelLoader.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DefaultModelLoader.java @@ -92,7 +92,7 @@ */ @SuppressWarnings("restriction") public class DefaultModelLoader implements IModelLoader { - + IProgressMonitor progressMonitor; @Override @@ -156,7 +156,7 @@ private static Resource loadModel(IExecutionContext context, boolean withAnimati modelURI = context.getRunConfiguration().getExecutedModelURI(); } HashMap nsURIMapping = getnsURIMapping(context); - ResourceSet resourceSet = createAndConfigureResourceSet(modelURI, nsURIMapping, subMonitor); + ResourceSet resourceSet = createResourceSet(modelURI, nsURIMapping, subMonitor); // If there is animation, we ask sirius to create the resource if (withAnimation && context.getRunConfiguration().getAnimatorURI() != null) { @@ -165,7 +165,7 @@ private static Resource loadModel(IExecutionContext context, boolean withAnimati // Killing + restarting Sirius session for animation killPreviousSiriusSession(context.getRunConfiguration().getAnimatorURI()); openNewSiriusSession(context, context.getRunConfiguration().getAnimatorURI(), resourceSet, modelURI, - subMonitor); + subMonitor,nsURIMapping); // At this point Sirius has loaded the model, we just need to // find it @@ -182,13 +182,7 @@ private static Resource loadModel(IExecutionContext context, boolean withAnimati // If there is no animation, we create a resource ourselves else { - Resource resource = resourceSet.createResource(modelURI); - try { - resource.load(null); - } catch (IOException e) { - new RuntimeException("The model could not be loaded.", e); - } - return resource; + return loadModelThenConfigureResourceSet(resourceSet, modelURI, nsURIMapping, subMonitor); } } @@ -231,14 +225,14 @@ public void run() { } private static Session openNewSiriusSession(final IExecutionContext context, URI sessionResourceURI, ResourceSet rs, - URI modelURI, SubMonitor subMonitor) throws CoreException { + URI modelURI, SubMonitor subMonitor, HashMap nsURIMapping) throws CoreException { subMonitor.subTask("Loading model"); subMonitor.newChild(3); // load model resource and resolve all proxies - Resource r = rs.getResource(modelURI, true); - EcoreUtil.resolveAll(rs); + + Resource r = loadModelThenConfigureResourceSet(rs, modelURI, nsURIMapping, subMonitor); // force adaptee model resource in the main ResourceSet if (r instanceof MelangeResourceImpl) { @@ -373,13 +367,31 @@ protected void doExecute() { return session; } - private static ResourceSet createAndConfigureResourceSet(URI modelURI, HashMap nsURIMapping, + private static ResourceSet createResourceSet(URI modelURI, HashMap nsURIMapping, + SubMonitor subMonitor) { + + final ResourceSet rs = ResourceSetFactory.createFactory().createResourceSet(modelURI); + + return rs; + } + + private static Resource loadModelThenConfigureResourceSet(ResourceSet rs, URI modelURI, HashMap nsURIMapping, + SubMonitor subMonitor) { + + Resource resource = rs.getResource(modelURI, true); + EcoreUtil.resolveAll(rs); + configureResourceSet(rs,modelURI,nsURIMapping,subMonitor); + + return resource; + + } + + private static void configureResourceSet(ResourceSet rs, URI modelURI, HashMap nsURIMapping, SubMonitor subMonitor) { subMonitor.subTask("Configuring ResourceSet"); subMonitor.newChild(1); - final ResourceSet rs = ResourceSetFactory.createFactory().createResourceSet(modelURI); final String fileExtension = modelURI.fileExtension(); // indicates which melange query should be added to the xml uri handler // for a given extension @@ -393,7 +405,6 @@ private static ResourceSet createAndConfigureResourceSet(URI modelURI, HashMap stepToExecute) { - } - - override aboutToSelectStep(IExecutionEngine engine, Collection> steps) { + this.testResult = new TestResult } override engineAboutToDispose(IExecutionEngine engine) { - engineAboutToDispose = true + testResult.engineAboutToDispose = true } override engineAboutToStart(IExecutionEngine engine) { - engineAboutToStart = true + testResult.engineAboutToStart = true } override engineAboutToStop(IExecutionEngine engine) { - engineAboutToStop = true + testResult.engineAboutToStop = true + val timeEnd = System.nanoTime + testResult.executionDuration = timeEnd - timeStart } override engineStarted(IExecutionEngine executionEngine) { - engineStarted = true - } - - override engineStatusChanged(IExecutionEngine engine, RunStatus newStatus) { + testResult.engineStarted = true + timeStart = System.nanoTime } override engineStopped(IExecutionEngine engine) { - engineStopped = true - } - - override proposedStepsChanged(IExecutionEngine engine, Collection> steps) { + testResult.engineStopped = true } override stepExecuted(IExecutionEngine engine, Step stepExecuted) { - amountOfStepsExecuted++ - if (shouldStopAfter != -1 && shouldStopAfter < amountOfStepsExecuted) { + testResult.amountOfStepsExecuted++ + if (shouldStopAfter != -1 && shouldStopAfter < testResult.amountOfStepsExecuted) { engine.stop } } - override stepSelected(IExecutionEngine engine, Step selectedStep) { - } - - override validate(List otherAddons) { - } - } diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestHelper.xtend b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestHelper.xtend index aa1ab6d0e..5364a9a1d 100644 --- a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestHelper.xtend +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestHelper.xtend @@ -3,6 +3,7 @@ package org.eclipse.gemoc.executionframework.test.lib.impl import java.io.File import java.io.PrintWriter import java.io.StringWriter +import java.util.HashSet import java.util.Random import java.util.Set import org.eclipse.core.resources.IFile @@ -14,16 +15,30 @@ import org.eclipse.emf.common.util.URI import org.eclipse.gemoc.executionframework.test.lib.IEngineWrapper import org.eclipse.gemoc.executionframework.test.lib.IExecutableModel import org.eclipse.gemoc.executionframework.test.lib.ILanguageWrapper +import org.eclipse.gemoc.trace.commons.model.trace.Trace +import org.eclipse.gemoc.trace.gemoc.traceaddon.GenericTraceEngineAddon +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon import static org.junit.Assert.* class TestHelper { - private static def testInternal(IProgressMonitor m, IEngineWrapper engine, ILanguageWrapper language, - Set addons, IExecutableModel model) { + static class TestResult { + public var long executionDuration + public var Trace trace + public var int amountOfStepsExecuted = 0 + public var boolean engineAboutToStart = false + public var boolean engineAboutToStop = false + public var boolean engineStarted = false + public var boolean engineStopped = false + public var boolean engineAboutToDispose = false + } + private static def testInternal(IProgressMonitor m, IEngineWrapper engine, ILanguageWrapper language, + Set addons, Set otherAddons, IExecutableModel model, boolean cleanup) { // Create eclipse project in test WS - val eclipseProject = ResourcesPlugin::getWorkspace().getRoot().getProject(Math::abs(new Random().nextInt).toString); + val eclipseProject = ResourcesPlugin::getWorkspace().getRoot().getProject( + Math::abs(new Random().nextInt).toString); if (eclipseProject.exists) eclipseProject.delete(true, m) eclipseProject.create(m) @@ -41,37 +56,42 @@ class TestHelper { val TestEngineAddon testAddon = new TestEngineAddon(model.shouldStopAfter) engine.prepare(language, model, addons, modelURI) engine.realEngine.executionContext.executionPlatform.addEngineAddon(testAddon) + for (otherAddon : otherAddons) { + engine.realEngine.executionContext.executionPlatform.addEngineAddon(otherAddon) + } // Execute engine engine.run - + // Dispose engine engine.realEngine.dispose - + // Generic oracle using test addon - assertTrue("No steps were executed", testAddon.amountOfStepsExecuted > 0) - assertTrue("engineAboutToStart never performed", testAddon.engineAboutToStart) - assertTrue("engineStarted never performed", testAddon.engineStarted) - assertTrue("engineAboutToStop never performed", testAddon.engineAboutToStop) - assertTrue("engineStopped never performed", testAddon.engineStopped) - assertTrue("engineAboutToDispose never performed", testAddon.engineAboutToDispose) - - // Done - return Status.OK_STATUS + val testResult = testAddon.testResult +// genericAsserts(testResult) + if (cleanup) { + eclipseProject.delete(true, true, m) + } + + // Return + return testResult } - def static void testWithAddons(IEngineWrapper engine, ILanguageWrapper language, Set addons, - IExecutableModel model) { + def static testWithJob(IEngineWrapper engine, ILanguageWrapper language, Set addons, + Set otherAddons, IExecutableModel model, boolean cleanup) { + val Set out = new HashSet val job = new Job("single test case") { override protected run(IProgressMonitor m) { try { - return testInternal(m, engine, language, addons, model) + val testResult = testInternal(m, engine, language, addons, otherAddons, model, cleanup) + out.add(testResult) + return Status.OK_STATUS } catch (Throwable t) { t.printStackTrace val StringWriter sw = new StringWriter(); t.printStackTrace(new PrintWriter(sw)); - val errorStatus = new Status(Status.ERROR, "trace test", "An error occured in the test case", t) + val errorStatus = new Status(Status.ERROR, "test", "An error occured in the test case", t) return errorStatus } } @@ -81,14 +101,44 @@ class TestHelper { if (job.result != null && job.result.exception != null) { throw job.result.exception } + return out.head } - def static void testWithGenericTrace(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model) { - testWithAddons(engine, language, #{"Generic MultiDimensional Trace"}, model) + def static testWithGenericTrace(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model, + boolean cleanup) { + val traceAddon = new GenericTraceEngineAddon() + val testResult = testWithJob(engine, language, #{}, #{traceAddon}, model, cleanup) + // TODO when other PR is merged + //testResult.trace = traceAddon.trace + return testResult + } + + def static testWithGenericTrace(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model) { + testWithGenericTrace(engine, language, model, false) + } + + def static testWithoutExtraAddons(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model, + boolean cleanup) { + return testWithJob(engine, language, #{}, #{}, model, cleanup) + } + + def static testWithoutExtraAddons(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model) { + return testWithoutExtraAddons(engine, language, model, false) + } + + def static testNoAssert(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model, boolean cleanup) { + val res = testWithJob(engine, language, #{}, #{}, model, cleanup) + + return res } - def static void testWithoutExtraAddons(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model) { - testWithAddons(engine, language, #{}, model) + public def static genericAsserts(TestResult testResult) { + assertTrue("No steps were executed", testResult.amountOfStepsExecuted > 0) + assertTrue("engineAboutToStart never performed", testResult.engineAboutToStart) + assertTrue("engineStarted never performed", testResult.engineStarted) + assertTrue("engineAboutToStop never performed", testResult.engineAboutToStop) + assertTrue("engineStopped never performed", testResult.engineStopped) + assertTrue("engineAboutToDispose never performed", testResult.engineAboutToDispose) } } diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestRunConfiguration.xtend b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestRunConfiguration.xtend index ee2a26002..4cb7895bb 100644 --- a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestRunConfiguration.xtend +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestRunConfiguration.xtend @@ -69,7 +69,10 @@ class TestRunConfiguration implements IRunConfiguration { } override getMelangeQuery() { - model.melangeQuery + if (model.melangeQuery == null) + "?lang=" + languageName + else + model.melangeQuery } override getBreakStart() { diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.aird b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.aird index 8ff0c774d..40338cfa6 100644 --- a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.aird +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.aird @@ -1,7 +1,7 @@ GemocExecutionEngineTrace.ecore - platform:/resource/fr.inria.diverse.trace.commons.model/model/GenericTrace.ecore + platform:/resource/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.ecore http://www.eclipse.org/emf/2002/Ecore platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore @@ -575,8 +575,8 @@ - - + + @@ -588,16 +588,16 @@ - - + + - - + + @@ -605,8 +605,8 @@ - - + + @@ -647,8 +647,8 @@ - - + + labelSize diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.ecore b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.ecore index 1e4ddcc54..618a3c0cd 100644 --- a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.ecore +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.ecore @@ -6,9 +6,9 @@ - + GemocExecutionEngineTrace.ecore > steps) { - } - - @Override - public void stepSelected(IExecutionEngine engine, Step selectedStep) { - } - - @Override - public void engineStopped(IExecutionEngine engine) { - } - - @Override - public void aboutToExecuteStep(IExecutionEngine executionEngine, Step stepToApply) { - } - - @Override - public void engineStatusChanged(IExecutionEngine engineRunnable, RunStatus newStatus) { - } - - @Override - public void engineAboutToStop(IExecutionEngine engine) { - } - - @Override - public void stepExecuted(IExecutionEngine engine, Step stepExecuted) { - } - - @Override - public void proposedStepsChanged(IExecutionEngine engine, Collection> steps) { - } - - @Override - public void engineAboutToDispose(IExecutionEngine engine) { - } - - @Override - public List validate(List otherAddons) { - return new ArrayList(); - } } diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java index 187ad8c24..c1a42429c 100644 --- a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016, 2017 Inria and others. + * Copyright (c) 2016 Inria and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.gemoc.xdsmlframework.api.engine_addon; +import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -23,49 +24,58 @@ public interface IEngineAddon { /** * Operation called before the engine starts */ - public void engineAboutToStart(IExecutionEngine engine); + default public void engineAboutToStart(IExecutionEngine engine) { + }; /** * Operation called after the engine have started */ - public void engineStarted(IExecutionEngine executionEngine); + default public void engineStarted(IExecutionEngine executionEngine) { + }; default public void engineInitialized(IExecutionEngine executionEngine) { - - } - - public void engineAboutToStop(IExecutionEngine engine); + }; + + default public void engineAboutToStop(IExecutionEngine engine) { + }; /** * Operation called after the engine has been stopped */ - public void engineStopped(IExecutionEngine engine); + default public void engineStopped(IExecutionEngine engine) { + }; - /** * Operation before the engine has been disposed (and after the engine has * been stopped) */ - public void engineAboutToDispose(IExecutionEngine engine); + default public void engineAboutToDispose(IExecutionEngine engine) { + }; /** * Operation called before the Step has been chosen */ - public void aboutToSelectStep(IExecutionEngine engine, Collection> steps); + default public void aboutToSelectStep(IExecutionEngine engine, Collection> steps) { + }; - public void proposedStepsChanged(IExecutionEngine engine, Collection> steps); + default public void proposedStepsChanged(IExecutionEngine engine, Collection> steps) { + }; /** * Operation called after the Step has been chosen It also returns the * chosen Step */ - public void stepSelected(IExecutionEngine engine, Step selectedStep); + default public void stepSelected(IExecutionEngine engine, Step selectedStep) { + }; - public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute); + default public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute) { + }; - public void stepExecuted(IExecutionEngine engine, Step stepExecuted); + default public void stepExecuted(IExecutionEngine engine, Step stepExecuted) { + }; - public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus); + default public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus) { + }; /** * This operation check the current addon compatibility with elements in @@ -74,6 +84,8 @@ default public void engineInitialized(IExecutionEngine executionEngine) { * @return A list of error messages if the check failed or an empty list * otherwise. */ - public List validate(List otherAddons); + default public List validate(List otherAddons) { + return new ArrayList(); + }; -} +} \ No newline at end of file diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/SimpleModelChangeListenerAddon.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/SimpleModelChangeListenerAddon.java index 0b35376a5..a88abfc09 100644 --- a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/SimpleModelChangeListenerAddon.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/SimpleModelChangeListenerAddon.java @@ -23,10 +23,9 @@ import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EContentAdapter; import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.eclipse.gemoc.xdsmlframework.api.engine_addon.DefaultEngineAddon; import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -public class SimpleModelChangeListenerAddon extends DefaultEngineAddon implements IModelChangeListenerAddon { +public class SimpleModelChangeListenerAddon implements IEngineAddon, IModelChangeListenerAddon { private EContentAdapter adapter; private IExecutionEngine engine; diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/command/AddDebugLayerHandler.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/command/AddDebugLayerHandler.java index e5abe5176..83e4263cd 100644 --- a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/command/AddDebugLayerHandler.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/command/AddDebugLayerHandler.java @@ -268,23 +268,41 @@ public static Layer createLayer(DiagramDescription description, initialOperation.setFirstModelOperations(debugJavaAction); debugAction.setInitialOperation(initialOperation); // Toggle breakpoint action - OperationAction toogleBreakpointAction = ToolPackage.eINSTANCE + OperationAction toggleBreakpointAction = ToolPackage.eINSTANCE .getToolFactory().createOperationAction(); - toogleBreakpointAction.setName("Toggle breakpoint"); - toogleBreakpointAction + toggleBreakpointAction.setName("Toggle breakpoint"); + toggleBreakpointAction .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); - popupMenu.getMenuItemDescription().add(toogleBreakpointAction); - ExternalJavaAction toogleBreakpointJavaAction = ToolPackage.eINSTANCE + popupMenu.getMenuItemDescription().add(toggleBreakpointAction); + ExternalJavaAction toggleBreakpointJavaAction = ToolPackage.eINSTANCE .getToolFactory().createExternalJavaAction(); - toogleBreakpointJavaAction.setName("Toggle Gemoc breakpoint"); - toogleBreakpointJavaAction + toggleBreakpointJavaAction.setName("Toggle Gemoc breakpoint"); + toggleBreakpointJavaAction .setId("org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.GemocSequentialToggleBreakpointAction"); - toogleBreakpointJavaAction + toggleBreakpointJavaAction .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif"); initialOperation = ToolPackage.eINSTANCE.getToolFactory() .createInitialOperation(); - initialOperation.setFirstModelOperations(toogleBreakpointJavaAction); - toogleBreakpointAction.setInitialOperation(initialOperation); + initialOperation.setFirstModelOperations(toggleBreakpointJavaAction); + toggleBreakpointAction.setInitialOperation(initialOperation); + // Toggle conditional breakpoint action + OperationAction toggleConditionalBreakpointAction = ToolPackage.eINSTANCE + .getToolFactory().createOperationAction(); + toggleConditionalBreakpointAction.setName("Toggle conditional breakpoint"); + toggleConditionalBreakpointAction + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); + popupMenu.getMenuItemDescription().add(toggleConditionalBreakpointAction); + ExternalJavaAction toggleConditionalBreakpointJavaAction = ToolPackage.eINSTANCE + .getToolFactory().createExternalJavaAction(); + toggleConditionalBreakpointJavaAction.setName("Toggle Gemoc conditional breakpoint"); + toggleConditionalBreakpointJavaAction + .setId("org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.GemocSequentialToggleConditionalBreakpointAction"); + toggleConditionalBreakpointJavaAction + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif"); + initialOperation = ToolPackage.eINSTANCE.getToolFactory() + .createInitialOperation(); + initialOperation.setFirstModelOperations(toggleConditionalBreakpointJavaAction); + toggleConditionalBreakpointAction.setInitialOperation(initialOperation); DecorationDescriptionsSet decorationSet = DescriptionPackage.eINSTANCE .getDescriptionFactory().createDecorationDescriptionsSet(); @@ -407,7 +425,25 @@ public static Layer createLayer(DiagramExtensionDescription descriptionExtension DecorationDescriptionsSet decorationSet = DescriptionPackage.eINSTANCE .getDescriptionFactory().createDecorationDescriptionsSet(); res.setDecorationDescriptionsSet(decorationSet); - + // Toggle conditional breakpoint action + OperationAction toggleConditionalBreakpointAction = ToolPackage.eINSTANCE + .getToolFactory().createOperationAction(); + toggleConditionalBreakpointAction.setName("Toggle conditional breakpoint"); + toggleConditionalBreakpointAction + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); + popupMenu.getMenuItemDescription().add(toggleConditionalBreakpointAction); + ExternalJavaAction toggleConditionalBreakpointJavaAction = ToolPackage.eINSTANCE + .getToolFactory().createExternalJavaAction(); + toggleConditionalBreakpointJavaAction.setName("Toggle Gemoc conditional breakpoint"); + toggleConditionalBreakpointJavaAction + .setId("org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.GemocSequentialToggleConditionalBreakpointAction"); + toggleConditionalBreakpointJavaAction + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif"); + initialOperation = ToolPackage.eINSTANCE.getToolFactory() + .createInitialOperation(); + initialOperation.setFirstModelOperations(toggleConditionalBreakpointJavaAction); + toggleConditionalBreakpointAction.setInitialOperation(initialOperation); + List mappings = getAllMapping(descriptionExtension); // enabled breakpoint decorator MappingBasedDecoration enabledBreakpoint = org.eclipse.sirius.diagram.description.DescriptionPackage.eINSTANCE @@ -816,7 +852,6 @@ public static String getContent(InputStream inputStream, String charsetName) */ public static void setContent(File file, String charsetName, String content) throws IOException { - if (!file.exists()) { throw new IOException(file.getAbsolutePath() + " doesn't exists."); } else if (file.isDirectory()) { diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/META-INF/MANIFEST.MF b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/META-INF/MANIFEST.MF index 5d063052b..9522801f7 100644 --- a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/META-INF/MANIFEST.MF +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/META-INF/MANIFEST.MF @@ -31,6 +31,5 @@ Export-Package: org.eclipse.gemoc.xdsmlframework.ide.ui, org.eclipse.gemoc.xdsmlframework.ide.ui.builder.pde, org.eclipse.gemoc.xdsmlframework.ide.ui.commands, org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards, - org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.pages, - org.jdom2 + org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.pages diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/META-INF/MANIFEST.MF b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/META-INF/MANIFEST.MF index bb370f613..53def7cd8 100644 --- a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/META-INF/MANIFEST.MF +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/META-INF/MANIFEST.MF @@ -36,7 +36,9 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="3.4.400", org.eclipse.gemoc.executionframework.debugger, org.eclipse.gemoc.executionframework.debugger.ui, org.eclipse.gemoc.commons.eclipse.messagingsystem.api;bundle-version="2.3.0", - org.eclipse.gemoc.commons.eclipse.messagingsystem.ui;bundle-version="2.3.0" + org.eclipse.gemoc.commons.eclipse.messagingsystem.ui;bundle-version="2.3.0", + org.eclipse.gemoc.event.commons.model, + org.eclipse.gemoc.event.commons.interpreter Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/commands/GemocToggleBreakpointHandler.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/commands/GemocToggleBreakpointHandler.java index cc80425a1..560d75cda 100644 --- a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/commands/GemocToggleBreakpointHandler.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/commands/GemocToggleBreakpointHandler.java @@ -62,7 +62,7 @@ else if (selected instanceof MSEOccurrence) { res = super.getInstruction(selected); } - + return res; } diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/GenericSequentialModelDebugger.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/GenericSequentialModelDebugger.java index 85e755d58..e220c456c 100644 --- a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/GenericSequentialModelDebugger.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/GenericSequentialModelDebugger.java @@ -13,26 +13,33 @@ import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; +import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.function.BiPredicate; +import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; -import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; +import org.eclipse.gemoc.event.commons.interpreter.property.StatePropertyAspect; +import org.eclipse.gemoc.event.commons.model.property.StateProperty; import org.eclipse.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine; import org.eclipse.gemoc.executionframework.debugger.AbstractGemocDebugger; import org.eclipse.gemoc.executionframework.debugger.GemocBreakpoint; import org.eclipse.gemoc.executionframework.engine.core.EngineStoppedException; -import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; - -import fr.inria.diverse.melange.resource.MelangeResourceImpl; import org.eclipse.gemoc.trace.commons.model.trace.MSE; import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; import org.eclipse.gemoc.trace.commons.model.trace.Step; -import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.QualifiedName; + +import fr.inria.diverse.melange.resource.MelangeResourceImpl; public class GenericSequentialModelDebugger extends AbstractGemocDebugger { @@ -227,7 +234,30 @@ public boolean shouldBreak(EObject instruction) { } return false; } - + + private final Map> propertyCache = new HashMap<>(); + + private boolean checkBreakpointProperty(EObject originalObject, EObject actualObject) { + boolean propertyResult = true; + final String propertyURI = (String)getBreakpointAttributes(originalObject, GemocBreakpoint.PROPERTY); + if (propertyURI != null && !propertyURI.isEmpty()) { + StateProperty property = propertyCache.computeIfAbsent(propertyURI, p -> { + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl()); + final Resource resource = originalObject.eResource().getResourceSet().getResource(URI.createFileURI(propertyURI), true); + EcoreUtil.resolveAll(resource); + final EObject content = resource.getContents().get(0); + if (content != null && content instanceof StateProperty) { + return (StateProperty) content; + } + return null; + }); + if (property != null) { + propertyResult = StatePropertyAspect.evaluate(property, actualObject); + } + } + return propertyResult; + } + private boolean hasRegularBreakpointTrue(EObject o) { EObject target = o; // Try to get the original object if 'o' comes from @@ -253,7 +283,8 @@ private boolean hasRegularBreakpointTrue(EObject o) { return super.shouldBreak(target) && (Boolean.valueOf((String) getBreakpointAttributes(target, GemocBreakpoint.BREAK_ON_LOGICAL_STEP)) || Boolean - .valueOf((String) getBreakpointAttributes(target, GemocBreakpoint.BREAK_ON_MSE_OCCURRENCE))); + .valueOf((String) getBreakpointAttributes(target, GemocBreakpoint.BREAK_ON_MSE_OCCURRENCE))) + && checkBreakpointProperty(target, o); } private boolean shouldBreakMSEOccurence(MSEOccurrence mseOccurrence) { diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleBreakpointAction.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleBreakpointAction.java index 7133c0b6c..6c266ec29 100644 --- a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleBreakpointAction.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleBreakpointAction.java @@ -24,7 +24,4 @@ public class GemocSequentialToggleBreakpointAction extends GemocToggleBreakpoint protected String getModelIdentifier() { return Activator.DEBUG_MODEL_ID; } - - - } diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleConditionalBreakpointAction.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleConditionalBreakpointAction.java new file mode 100644 index 000000000..a408b728a --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleConditionalBreakpointAction.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2016 Inria and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Inria - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.sirius.action; + +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator; +import org.eclipse.gemoc.executionframework.debugger.ui.breakpoints.GemocToggleConditionalBreakpointAction; + +/** + * commons class for all Gemoc based models + * @author dvojtise + * + */ +public class GemocSequentialToggleConditionalBreakpointAction extends GemocToggleConditionalBreakpointAction { + @Override + protected String getModelIdentifier() { + return Activator.DEBUG_MODEL_ID; + } +} diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationMainTab.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationMainTab.java index 4e8ea13ce..ac2fd89b3 100644 --- a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationMainTab.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationMainTab.java @@ -59,7 +59,7 @@ import org.osgi.framework.Bundle; import org.eclipse.gemoc.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; -import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch.AbstractDSLLaunchConfigurationDelegateUI; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch.AbstractDSLLaunchConfigurationDelegateSiriusUI; /** * Sequential engine launch configuration main tab @@ -73,6 +73,8 @@ public class LaunchConfigurationMainTab extends LaunchConfigurationTab { protected Text _modelLocationText; protected Text _modelInitializationMethodText; protected Text _modelInitializationArgumentsText; + protected Text _scenarioLocationText; + protected Text _arbiterLocationText; protected Text _siriusRepresentationLocationText; protected Button _animateButton; protected Text _delayText; @@ -155,6 +157,14 @@ public void initializeFrom(ILaunchConfiguration configuration) { _languageCombo.setText(runConfiguration .getLanguageName()); _modelInitializationArgumentsText.setText(runConfiguration.getModelInitializationArguments()); + + URI scenarioURI = runConfiguration.getScenarioURI(); + _scenarioLocationText.setText(scenarioURI == null ? "" : + URIHelper.removePlatformScheme(scenarioURI)); + URI arbiterURI = runConfiguration.getArbiterURI(); + _arbiterLocationText.setText(arbiterURI == null ? "" : + URIHelper.removePlatformScheme(arbiterURI)); + _entryPointModelElementLabel.setText(""); updateMainElementName(); } catch (CoreException e) { @@ -168,7 +178,7 @@ public void performApply(ILaunchConfigurationWorkingCopy configuration) { AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, this._modelLocationText.getText()); configuration.setAttribute( - AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, + AbstractDSLLaunchConfigurationDelegateSiriusUI.SIRIUS_RESOURCE_URI, this._siriusRepresentationLocationText.getText()); configuration.setAttribute(RunConfiguration.LAUNCH_DELAY, Integer.parseInt(_delayText.getText())); @@ -184,6 +194,16 @@ public void performApply(ILaunchConfigurationWorkingCopy configuration) { _modelInitializationMethodText.getText()); configuration.setAttribute(RunConfiguration.LAUNCH_INITIALIZATION_ARGUMENTS, _modelInitializationArgumentsText.getText()); + configuration.setAttribute(RunConfiguration.LAUNCH_SCENARIO_URI, + _scenarioLocationText.getText()); + configuration.setAttribute(RunConfiguration.LAUNCH_ARBITER_URI, + _arbiterLocationText.getText()); + try { + configuration.setAttribute("Property Monitor", + !configuration.getAttribute(RunConfiguration.LAUNCH_SCENARIO_URI, "").equals("")); + } catch (CoreException e) { + e.printStackTrace(); + } configuration.setAttribute(RunConfiguration.LAUNCH_BREAK_START, _animationFirstBreak.getSelection()); // DebugModelID for sequential engine @@ -256,13 +276,51 @@ public void widgetSelected(SelectionEvent evt) { _modelInitializationArgumentsText.setFont(font); _modelInitializationArgumentsText.setEditable(true); _modelInitializationArgumentsText.addModifyListener(new ModifyListener() { - @Override public void modifyText(ModifyEvent e) { updateLaunchConfigurationDialog(); } }); createTextLabelLayout(parent, ""); + + // Scenario location text + createTextLabelLayout(parent, "Scenario"); + _scenarioLocationText = new Text(parent, SWT.SINGLE | SWT.BORDER); + _scenarioLocationText.setLayoutData(createStandardLayout()); + _scenarioLocationText.setFont(font); + _scenarioLocationText.addModifyListener(fBasicModifyListener); + Button scenarioLocationButton = createPushButton(parent, "Browse", null); + scenarioLocationButton.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent evt) { + SelectAnyIFileDialog dialog = new SelectAnyIFileDialog(); + if (dialog.open() == Dialog.OK) { + String scenarioPath = ((IResource) dialog.getResult()[0]) + .getFullPath().toPortableString(); + _scenarioLocationText.setText(scenarioPath); + updateLaunchConfigurationDialog(); + } + } + }); + + // Arbiter location text + createTextLabelLayout(parent, "Arbiter"); + _arbiterLocationText = new Text(parent, SWT.SINGLE | SWT.BORDER); + _arbiterLocationText.setLayoutData(createStandardLayout()); + _arbiterLocationText.setFont(font); + _arbiterLocationText.addModifyListener(fBasicModifyListener); + Button arbiterLocationButton = createPushButton(parent, "Browse", null); + arbiterLocationButton.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent evt) { + SelectAnyIFileDialog dialog = new SelectAnyIFileDialog(); + if (dialog.open() == Dialog.OK) { + String arbiterPath = ((IResource) dialog.getResult()[0]) + .getFullPath().toPortableString(); + _arbiterLocationText.setText(arbiterPath); + updateLaunchConfigurationDialog(); + } + } + }); + return parent; } diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/PlainK3ExecutionEngine.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/PlainK3ExecutionEngine.java index fb757028e..e7bf103ef 100644 --- a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/PlainK3ExecutionEngine.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/PlainK3ExecutionEngine.java @@ -223,7 +223,7 @@ protected void prepareInitializeModel(IExecutionContext executionContext) { } /** - * Invoke the initialize method + * Invoke the initialize method */ private void callInitializeModel() { try { @@ -242,22 +242,23 @@ private void callInitializeModel() { throw new RuntimeException(e); } } - + @Override protected void initializeModel() { - if(initializeMethod != null){ + if (initializeMethod != null) { StepManagerRegistry.getInstance().registerManager(PlainK3ExecutionEngine.this); try { final boolean isStepMethod = initializeMethod.isAnnotationPresent(fr.inria.diverse.k3.al.annotationprocessor.Step.class); if(!isStepMethod){ fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand command = new fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand() { - @Override - public void execute() { - callInitializeModel(); - } - }; - fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager stepManager = PlainK3ExecutionEngine.this; - stepManager.executeStep(entryPointMethodParameters.get(0),command,entryPointClass.getName(),initializeMethod.getName()); + @Override + public void execute() { + callInitializeModel(); + } + }; + fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager stepManager = PlainK3ExecutionEngine.this; + stepManager.executeStep(entryPointMethodParameters.get(0), command, entryPointClass.getName(), + initializeMethod.getName()); } else { callInitializeModel(); } @@ -446,10 +447,12 @@ public static Resource loadModel(URI modelURI) { @Override public LaunchConfiguration extractLaunchConfiguration() { final IRunConfiguration configuration = getExecutionContext().getRunConfiguration(); - final LaunchConfiguration launchConfiguration = LaunchconfigurationFactory.eINSTANCE.createLaunchConfiguration(); + final LaunchConfiguration launchConfiguration = LaunchconfigurationFactory.eINSTANCE + .createLaunchConfiguration(); launchConfiguration.setType(LAUNCH_CONFIGURATION_TYPE); if (configuration.getLanguageName() != "") { - final LanguageNameParameter languageNameParam = LaunchconfigurationFactory.eINSTANCE.createLanguageNameParameter(); + final LanguageNameParameter languageNameParam = LaunchconfigurationFactory.eINSTANCE + .createLanguageNameParameter(); languageNameParam.setValue(configuration.getLanguageName()); launchConfiguration.getParameters().add(languageNameParam); } @@ -463,12 +466,14 @@ public LaunchConfiguration extractLaunchConfiguration() { final URI animatorURI = configuration.getAnimatorURI(); if (configuration.getAnimatorURI() != null) { final String scheme = animatorURI.scheme() + ":/resource"; - final AnimatorURIParameter animatorURIParam = LaunchconfigurationFactory.eINSTANCE.createAnimatorURIParameter(); + final AnimatorURIParameter animatorURIParam = LaunchconfigurationFactory.eINSTANCE + .createAnimatorURIParameter(); animatorURIParam.setValue(animatorURI.toString().substring(scheme.length())); launchConfiguration.getParameters().add(animatorURIParam); } if (configuration.getExecutionEntryPoint() != null) { - final EntryPointParameter entryPointParam = LaunchconfigurationFactory.eINSTANCE.createEntryPointParameter(); + final EntryPointParameter entryPointParam = LaunchconfigurationFactory.eINSTANCE + .createEntryPointParameter(); entryPointParam.setValue(configuration.getExecutionEntryPoint()); launchConfiguration.getParameters().add(entryPointParam); } @@ -490,7 +495,8 @@ public LaunchConfiguration extractLaunchConfiguration() { launchConfiguration.getParameters().add(initializationArgumentsParam); } configuration.getEngineAddonExtensions().forEach(extensionPoint -> { - final AddonExtensionParameter addonExtensionParam = LaunchconfigurationFactory.eINSTANCE.createAddonExtensionParameter(); + final AddonExtensionParameter addonExtensionParam = LaunchconfigurationFactory.eINSTANCE + .createAddonExtensionParameter(); addonExtensionParam.setValue(extensionPoint.getName()); launchConfiguration.getParameters().add(addonExtensionParam); }); diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/JavaEngineTests.launch b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/JavaEngineTests.launch index 462477f8c..112bc5745 100644 --- a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/JavaEngineTests.launch +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/JavaEngineTests.launch @@ -14,10 +14,10 @@ - + - + @@ -32,8 +32,8 @@ - - + + diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/META-INF/MANIFEST.MF b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/META-INF/MANIFEST.MF index 4b5a4909c..92c5935e8 100644 --- a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/META-INF/MANIFEST.MF +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/META-INF/MANIFEST.MF @@ -27,7 +27,8 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.xtext.ui, org.eclipse.gemoc.xdsmlframework.ui.utils, org.eclipse.emf.ecoretools.design.ui, - org.eclipse.gemoc.commons.eclipse.pde + org.eclipse.gemoc.commons.eclipse.pde, + org.jdom2;bundle-version="2.0.6" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageBuilder.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageBuilder.java index d2590ecce..448d8c9cd 100644 --- a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageBuilder.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageBuilder.java @@ -162,8 +162,6 @@ protected void updateModelLoaderClass(IProject project, String modelLoaderClass) LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF_LOADMODEL_ATT, modelLoaderClass != null ? modelLoaderClass : "org.eclipse.gemoc.executionframework.extensions.sirius.modelloader.DefaultModelLoader"); helper.saveDocument(pluginfile); - - } protected void setPluginLanguageNameAndFilePath(IProject project, IFile melangeFile , final String languageName) { diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateSiriusUI.java similarity index 94% rename from simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateSiriusUI.java index def5c52b7..7544509d8 100644 --- a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateSiriusUI.java @@ -10,10 +10,6 @@ *******************************************************************************/ package org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch; -import org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; -import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.services.AbstractDSLDebuggerServices; -import org.eclipse.gemoc.dsl.debug.ide.ui.launch.DSLLaunchConfigurationTab; - import java.util.Arrays; import java.util.List; @@ -24,6 +20,9 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; +import org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.services.AbstractDSLDebuggerServices; +import org.eclipse.gemoc.dsl.debug.ide.ui.launch.DSLLaunchConfigurationTab; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.sirius.business.api.helper.SiriusUtil; import org.eclipse.sirius.business.api.session.Session; @@ -31,13 +30,14 @@ import org.eclipse.ui.PlatformUI; /** - * A Sirius implementation of {@link org.eclipse.gemoc.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate + * A Sirius implementation of + * {@link org.eclipse.gemoc.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate * AbstractDSLLaunchConfigurationDelegate} with {@link org.eclipse.debug.ui.ILaunchShortcut ILaunchShortcut} * support. * * @author Yvan Lussaud */ -public abstract class AbstractDSLLaunchConfigurationDelegateUI extends org.eclipse.gemoc.dsl.debug.ide.ui.launch.AbstractDSLLaunchConfigurationDelegateUI { +public abstract class AbstractDSLLaunchConfigurationDelegateSiriusUI extends org.eclipse.gemoc.dsl.debug.ide.ui.launch.AbstractDSLLaunchConfigurationDelegateUI { /** * The Sirius {@link org.eclipse.emf.ecore.resource.Resource Resource} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/DSLLaunchConfigurationTab.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/DSLLaunchConfigurationTab.java index fcdff2a8b..9e7bb07b4 100644 --- a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/DSLLaunchConfigurationTab.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/DSLLaunchConfigurationTab.java @@ -50,7 +50,7 @@ public class DSLLaunchConfigurationTab extends org.eclipse.gemoc.dsl.debug.ide.ui.launch.DSLLaunchConfigurationTab { /** - * The {@link Text} used for the {@link AbstractDSLLaunchConfigurationDelegateUI#SIRIUS_RESOURCE_URI}. + * The {@link Text} used for the {@link AbstractDSLLaunchConfigurationDelegateSiriusUI#SIRIUS_RESOURCE_URI}. */ private Text siriusResourceURIText; @@ -67,7 +67,7 @@ public DSLLaunchConfigurationTab(String[] extensions) { @Override public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { super.setDefaults(configuration); - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, ""); + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegateSiriusUI.SIRIUS_RESOURCE_URI, ""); } /** @@ -94,7 +94,7 @@ public void initializeFrom(final ILaunchConfiguration configuration) { @Override public void performApply(ILaunchConfigurationWorkingCopy configuration) { super.performApply(configuration); - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegateSiriusUI.SIRIUS_RESOURCE_URI, siriusResourceURIText.getText()); } @@ -106,7 +106,7 @@ public boolean isValid(ILaunchConfiguration launchConfig) { try { if (res) { String siriusResourceURI = launchConfig.getAttribute( - AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, ""); + AbstractDSLLaunchConfigurationDelegateSiriusUI.SIRIUS_RESOURCE_URI, ""); IFile resourceFile = ResourcesPlugin.getWorkspace().getRoot().getFile( new Path(siriusResourceURI)); Resource resource = null; diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.ecore b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.ecore index a2c748cfa..f89b6b9aa 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.ecore +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.ecore @@ -134,8 +134,8 @@ containment="true"> - + - + diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.genmodel b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.genmodel index 42c7c957b..c0e605f5b 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.genmodel +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.genmodel @@ -1,12 +1,12 @@ GenericTrace.ecore - diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTraceImpl.genmodel b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTraceImpl.genmodel index 0872efdde..e07d2f170 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTraceImpl.genmodel +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTraceImpl.genmodel @@ -1,12 +1,12 @@ GenericTraceImpl.ecore - diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.genmodel b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.genmodel index d05c54c03..129920f1e 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.genmodel +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.genmodel @@ -1,11 +1,11 @@ LaunchConfiguration.ecore - diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/State.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/State.java index 9e2d5222f..0d0fe4a45 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/State.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/State.java @@ -81,7 +81,7 @@ public interface State, ValueSubType extends ValueValues' reference list. * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getState_Values() * @see org.eclipse.gemoc.trace.commons.model.trace.Value#getStates - * @model opposite="states" + * @model opposite="states" ordered="false" * @generated */ EList getValues(); diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Trace.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Trace.java index f4fda9321..025fa761e 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Trace.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Trace.java @@ -74,7 +74,7 @@ public interface Trace, TracedObjectSubtype extends * * @return the value of the 'Traced Objects' containment reference list. * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getTrace_TracedObjects() - * @model containment="true" + * @model containment="true" ordered="false" * @generated */ EList getTracedObjects(); diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TracedObject.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TracedObject.java index a7ec07181..301ab4ccc 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TracedObject.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TracedObject.java @@ -43,7 +43,7 @@ public interface TracedObject> extends EOb * * @return the value of the 'Dimensions' reference list. * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getTracedObject_Dimensions() - * @model transient="true" volatile="true" + * @model transient="true" volatile="true" derived="true" * annotation="http://www.eclipse.org/emf/2002/GenModel get='return getDimensionsInternal();'" * @generated */ diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TracePackageImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TracePackageImpl.java index 0a430861b..1b2f2860f 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TracePackageImpl.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TracePackageImpl.java @@ -857,14 +857,14 @@ public void initializePackageContents() { g1 = createEGenericType(traceEClass_StepSubType); initEReference(getTrace_RootStep(), g1, null, "rootStep", null, 1, 1, Trace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); g1 = createEGenericType(traceEClass_TracedObjectSubtype); - initEReference(getTrace_TracedObjects(), g1, null, "tracedObjects", null, 0, -1, Trace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getTrace_TracedObjects(), g1, null, "tracedObjects", null, 0, -1, Trace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); g1 = createEGenericType(traceEClass_StateSubType); initEReference(getTrace_States(), g1, null, "states", null, 0, -1, Trace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getTrace_Launchconfiguration(), theLaunchconfigurationPackage.getLaunchConfiguration(), null, "launchconfiguration", null, 1, 1, Trace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tracedObjectEClass, TracedObject.class, "TracedObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); g1 = createEGenericType(tracedObjectEClass_DimensionSubType); - initEReference(getTracedObject_Dimensions(), g1, null, "dimensions", null, 0, -1, TracedObject.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getTracedObject_Dimensions(), g1, null, "dimensions", null, 0, -1, TracedObject.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); EOperation op = initEOperation(getTracedObject__GetDimensionsInternal(), null, "getDimensionsInternal", 0, -1, IS_UNIQUE, IS_ORDERED); g1 = createEGenericType(tracedObjectEClass_DimensionSubType); @@ -884,7 +884,7 @@ public void initializePackageContents() { g1 = createEGenericType(stateEClass_StepSubType); initEReference(getState_EndedSteps(), g1, this.getStep_EndingState(), "endedSteps", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); g1 = createEGenericType(stateEClass_ValueSubType); - initEReference(getState_Values(), g1, this.getValue_States(), "values", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getState_Values(), g1, this.getValue_States(), "values", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); // Initialize data types initEDataType(iSerializableEDataType, byte[].class, "ISerializable", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/META-INF/MANIFEST.MF b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/META-INF/MANIFEST.MF index bbc2baa06..94d01de83 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/META-INF/MANIFEST.MF +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/META-INF/MANIFEST.MF @@ -4,9 +4,7 @@ Bundle-Name: Util Bundle-SymbolicName: org.eclipse.gemoc.trace.commons Bundle-Version: 2.3.0.qualifier Export-Package: org.eclipse.gemoc.trace.commons, - org.eclipse.gemoc.trace.commons.tracemetamodel, - org.jdom2, - org.jdom2.filter + org.eclipse.gemoc.trace.commons.tracemetamodel Require-Bundle: com.google.guava, org.eclipse.xtext.xbase.lib, org.eclipse.xtend.lib, diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EMFCompareUtil.xtend b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EMFCompareUtil.xtend index 9ddb86b00..68b1bfd8f 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EMFCompareUtil.xtend +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EMFCompareUtil.xtend @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Inria - initial API and implementation *******************************************************************************/ @@ -22,22 +22,27 @@ import static org.junit.Assert.* class EMFCompareUtil { - public def static void assertEqualsEMF(String message, EObject rootCurrent, EObject rootExpected) { - val DefaultComparisonScope _defaultComparisonScope = new DefaultComparisonScope(rootCurrent, rootExpected, null); + public def static List compare(EObject rootCurrent, EObject rootExpected) { + val DefaultComparisonScope _defaultComparisonScope = new DefaultComparisonScope(rootCurrent, rootExpected, + null); val IComparisonScope scope = _defaultComparisonScope; val _builder = EMFCompare.builder(); val EMFCompare _build = _builder.build(); val Comparison comparison = _build.compare(scope); - val List differences = comparison.getDifferences(); + return comparison.differences + + } + + public def static void assertEqualsEMF(String message, EObject rootCurrent, EObject rootExpected) { + val List differences = compare(rootCurrent, rootExpected); for (d : differences) { val String _string = d.toString(); val String _plus = ("Checking:[" + _string); val String _plus_1 = (_plus + "]"); val DifferenceKind _kind = d.getKind(); println(_plus_1) - assertEquals(message+" - "+_plus_1, DifferenceKind.MOVE, _kind); + assertEquals(message + " - " + _plus_1, DifferenceKind.MOVE, _kind); } - } } diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/PluginXMLHelper.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/PluginXMLHelper.java index c00f997eb..371bb1c03 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/PluginXMLHelper.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/PluginXMLHelper.java @@ -92,7 +92,6 @@ public void saveDocument(IFile pluginXmlFile) { } } - public Element getOrCreateExtensionPoint(String extensionPointName){ Element result; List elements = root.getContent(new ExtensionFilter(extensionPointName)); diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IMultiDimensionalTraceAddon.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IMultiDimensionalTraceAddon.java index f57c905a1..1e8b97b17 100644 --- a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IMultiDimensionalTraceAddon.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IMultiDimensionalTraceAddon.java @@ -12,13 +12,13 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; - import org.eclipse.gemoc.trace.commons.model.trace.Dimension; import org.eclipse.gemoc.trace.commons.model.trace.State; import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.trace.commons.model.trace.Trace; import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; import org.eclipse.gemoc.trace.commons.model.trace.Value; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; public interface IMultiDimensionalTraceAddon, StateSubType extends State, TracedObjectSubType extends TracedObject, DimensionSubType extends Dimension, ValueSubType extends Value> extends IEngineAddon { @@ -35,4 +35,6 @@ public interface IMultiDimensionalTraceAddon, StateS void load(Resource traceResource); boolean isAddonForTrace(EObject traceRoot); + + Trace getTrace(); } diff --git a/trace/generator/README.md b/trace/generator/README.md index 5dd46182e..75316baeb 100644 --- a/trace/generator/README.md +++ b/trace/generator/README.md @@ -14,12 +14,12 @@ The generation process is divided in three steps: 1. Because operation semantics can be defined in using any language(s), we first extract the execution extension into an intermediate representation in order to then generically process it with the generator. The intermediate representation is defined using the Ecore metamodel that can be found in the plugin `fr.inria.diverse.opsemanticsview.model`. An conforming model is composed of new `EStructuralFeature` added to classes of the abstract classes, of new `EClass` objects, and of transformation rules specified as `EOperation` objects. Two extractors are provided for now: - - One for Kermeta in the plugin `fr.inria.diverse.trace.plaink3.tracematerialextractor`. - - One for xMOF in the plugin `fr.inria.diverse.trace.xmof.tracematerialextractor`. + - One for Kermeta in the plugin `org.eclipse.gemoc.trace.plaink3.tracematerialextractor`. + - One for xMOF in the plugin `org.eclipse.gemoc.trace.xmof.tracematerialextractor`. -2. A generic generator is called to process the intermediate representation and to produce an Ecore multidimensional domain-specific trace metamodel. The generator can be found in the plugin `fr.inria.diverse.trace.metamodel.generator`. +2. A generic generator is called to process the intermediate representation and to produce an Ecore multidimensional domain-specific trace metamodel. The generator can be found in the plugin `org.eclipse.gemoc.trace.metamodel.generator`. -3. A GEMOC engine addon generator is called, to process the intermediate representation, the generated trace metamodel and some traceability links in order to produce a trace management plugin that contains the trace metamodel and a trace manager (in Java). The *state manager* provides services to construct a trace, and to restore the executed model into a former state in order to create a Java class to integrate the trace plugin into a GEMOC engine addon. Contrary to the previous steps, this last step is specific and dependent to the GEMOC Studio plugins. The generator can be found in `fr.inria.diverse.trace.gemoc.generator`. +3. A GEMOC engine addon generator is called, to process the intermediate representation, the generated trace metamodel and some traceability links in order to produce a trace management plugin that contains the trace metamodel and a trace manager (in Java). The *state manager* provides services to construct a trace, and to restore the executed model into a former state in order to create a Java class to integrate the trace plugin into a GEMOC engine addon. Contrary to the previous steps, this last step is specific and dependent to the GEMOC Studio plugins. The generator can be found in `org.eclipse.gemoc.trace.gemoc.generator`. ## Publication diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/model/tracingannotations.genmodel b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/model/tracingannotations.genmodel index 9382fda8a..8032adfcb 100644 --- a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/model/tracingannotations.genmodel +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/model/tracingannotations.genmodel @@ -1,5 +1,5 @@ - + tracingannotations.ecore diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/META-INF/MANIFEST.MF b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/META-INF/MANIFEST.MF index 0652f66ea..601479fa6 100644 --- a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/META-INF/MANIFEST.MF +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/META-INF/MANIFEST.MF @@ -22,7 +22,8 @@ Require-Bundle: com.google.guava, org.eclipse.jdt.ui, org.eclipse.gemoc.xdsmlframework.api, org.eclipse.gemoc.opsemanticsview.model;bundle-version="0.1.0", - org.eclipse.gemoc.opsemanticsview.gen;bundle-version="1.0.0" + org.eclipse.gemoc.opsemanticsview.gen;bundle-version="1.0.0", + org.jdom2;bundle-version="2.0.6" Bundle-ClassPath: . Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.eclipse.gemoc.trace.gemoc.generator, diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/GenericEngineTraceAddonGenerator.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/GenericEngineTraceAddonGenerator.xtend index f4892376b..bb339286f 100644 --- a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/GenericEngineTraceAddonGenerator.xtend +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/GenericEngineTraceAddonGenerator.xtend @@ -14,7 +14,6 @@ import org.eclipse.gemoc.trace.commons.CodeGenUtil import org.eclipse.gemoc.trace.commons.EclipseUtil import org.eclipse.gemoc.trace.commons.EcoreCraftingUtil import org.eclipse.gemoc.trace.commons.ManifestUtil -import org.eclipse.gemoc.trace.commons.PluginXMLHelper import org.eclipse.gemoc.trace.gemoc.generator.codegen.StateManagerGeneratorJava import org.eclipse.gemoc.trace.gemoc.generator.codegen.TraceConstructorGeneratorJava import org.eclipse.gemoc.trace.gemoc.generator.util.StandaloneEMFProjectGenerator @@ -42,6 +41,7 @@ import org.eclipse.xtend.lib.annotations.Accessors import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint import org.jdom2.Element import org.jdom2.filter.ElementFilter +import org.eclipse.gemoc.xdsmlframework.ide.ui.builder.pde.PluginXMLHelper class GenericEngineTraceAddonGenerator { diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/AbstractTraceAddon.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/AbstractTraceAddon.xtend index 978c44d8f..9ebed8a40 100644 --- a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/AbstractTraceAddon.xtend +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/AbstractTraceAddon.xtend @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Inria - initial API and implementation *******************************************************************************/ @@ -12,18 +12,6 @@ package org.eclipse.gemoc.trace.gemoc.traceaddon import com.google.common.collect.BiMap import com.google.common.collect.HashBiMap -import org.eclipse.gemoc.trace.commons.model.trace.Dimension -import org.eclipse.gemoc.trace.commons.model.trace.State -import org.eclipse.gemoc.trace.commons.model.trace.Step -import org.eclipse.gemoc.trace.commons.model.trace.Trace -import org.eclipse.gemoc.trace.commons.model.trace.TracedObject -import org.eclipse.gemoc.trace.commons.model.trace.Value -import org.eclipse.gemoc.trace.gemoc.api.IMultiDimensionalTraceAddon -import org.eclipse.gemoc.trace.gemoc.api.IStateManager -import org.eclipse.gemoc.trace.gemoc.api.ITraceConstructor -import org.eclipse.gemoc.trace.gemoc.api.ITraceExplorer -import org.eclipse.gemoc.trace.gemoc.api.ITraceExtractor -import org.eclipse.gemoc.trace.gemoc.api.ITraceNotifier import java.util.ArrayList import java.util.HashSet import java.util.List @@ -39,28 +27,41 @@ import org.eclipse.emf.transaction.RecordingCommand import org.eclipse.emf.transaction.util.TransactionUtil import org.eclipse.gemoc.commons.eclipse.emf.EMFResource import org.eclipse.gemoc.executionframework.engine.core.CommandExecution +import org.eclipse.gemoc.trace.commons.model.trace.Dimension +import org.eclipse.gemoc.trace.commons.model.trace.State +import org.eclipse.gemoc.trace.commons.model.trace.Step +import org.eclipse.gemoc.trace.commons.model.trace.Trace +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject +import org.eclipse.gemoc.trace.commons.model.trace.Value +import org.eclipse.gemoc.trace.gemoc.api.IMultiDimensionalTraceAddon +import org.eclipse.gemoc.trace.gemoc.api.IStateManager +import org.eclipse.gemoc.trace.gemoc.api.ITraceConstructor +import org.eclipse.gemoc.trace.gemoc.api.ITraceExplorer +import org.eclipse.gemoc.trace.gemoc.api.ITraceExtractor +import org.eclipse.gemoc.trace.gemoc.api.ITraceNotifier import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine -import org.eclipse.gemoc.xdsmlframework.api.engine_addon.DefaultEngineAddon import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.BatchModelChangeListener import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint -abstract class AbstractTraceAddon extends DefaultEngineAddon implements IMultiDimensionalTraceAddon, State, TracedObject, Dimension, Value> { +abstract class AbstractTraceAddon implements IEngineAddon, IMultiDimensionalTraceAddon, State, TracedObject, Dimension, Value> { private IExecutionContext _executionContext - private ITraceExplorer, State, TracedObject, Dimension, Value> traceExplorer - private ITraceExtractor, State, TracedObject, Dimension, Value> traceExtractor + private ITraceExplorer, State, TracedObject, Dimension, Value> traceExplorer + private ITraceExtractor, State, TracedObject, Dimension, Value> traceExtractor private ITraceConstructor traceConstructor private ITraceNotifier traceNotifier private BatchModelChangeListener traceListener - private boolean shouldSave = true private var boolean needTransaction = true private BatchModelChangeListener listenerAddon - - protected abstract def ITraceConstructor constructTraceConstructor(Resource modelResource, Resource traceResource, Map> exeToTraced) - - protected abstract def IStateManager> constructStateManager(Resource modelResource, Map, EObject> tracedToExe) + private Trace, TracedObject, State> trace + + protected abstract def ITraceConstructor constructTraceConstructor(Resource modelResource, Resource traceResource, + Map> exeToTraced) + + protected abstract def IStateManager> constructStateManager(Resource modelResource, + Map, EObject> tracedToExe) override getTraceExplorer() { return traceExplorer @@ -73,15 +74,15 @@ abstract class AbstractTraceAddon extends DefaultEngineAddon implements IMultiDi override getTraceExtractor() { return traceExtractor } - + override getTraceNotifier() { return traceNotifier } - + public override void load(Resource traceResource) { val root = traceResource.contents.head - if (root instanceof Trace) { - val trace = root as Trace,TracedObject,State> + if (root instanceof Trace) { + trace = root as Trace, TracedObject, State> traceExplorer = new GenericTraceExplorer(trace) traceExtractor = new GenericTraceExtractor(trace) } else { @@ -111,13 +112,13 @@ abstract class AbstractTraceAddon extends DefaultEngineAddon implements IMultiDi if (step != null) { modifyTrace([ traceConstructor.addState(listenerAddon.getChanges(this)) - + if (add) { traceConstructor.addStep(step) } else { traceConstructor.endStep(step) } - + // Updating the trace extractor and explorer with the last changes traceNotifier.notifyListener(traceExtractor) traceNotifier.notifyListener(traceExplorer) @@ -127,9 +128,10 @@ abstract class AbstractTraceAddon extends DefaultEngineAddon implements IMultiDi traceExplorer.updateCallStack(step) ]) - if (shouldSave) { -// traceConstructor.save() - } + /*try { + traceConstructor.save() + } catch (Throwable t) { + }*/ } } @@ -155,7 +157,8 @@ abstract class AbstractTraceAddon extends DefaultEngineAddon implements IMultiDi val Resource traceResource = rs.createResource(traceModelURI) // We construct a new listener addon if required - this.listenerAddon = new BatchModelChangeListener(EMFResource.getRelatedResources(engine.executionContext.resourceModel)) + this.listenerAddon = new BatchModelChangeListener( + EMFResource.getRelatedResources(engine.executionContext.resourceModel)) listenerAddon.registerObserver(this) val launchConfiguration = engine.extractLaunchConfiguration @@ -170,8 +173,8 @@ abstract class AbstractTraceAddon extends DefaultEngineAddon implements IMultiDi // And we enable trace exploration by loading it in a new trace explorer val root = traceResource.contents.head - if (root instanceof Trace) { - val trace = root as Trace,TracedObject,State> + if (root instanceof Trace) { + trace = root as Trace, TracedObject, State> val stateManager = constructStateManager(modelResource, exeToTraced.inverse) traceExplorer = new GenericTraceExplorer(trace, stateManager) traceExtractor = new GenericTraceExtractor(trace) @@ -235,4 +238,11 @@ abstract class AbstractTraceAddon extends DefaultEngineAddon implements IMultiDi return errors } + override getTrace() { + return trace + } + + override engineStopped(IExecutionEngine engine) { + } + } diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceConstructor.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceConstructor.java index 38d83870f..02a6496a0 100644 --- a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceConstructor.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceConstructor.java @@ -80,7 +80,7 @@ private Set getAllExecutedModelResources() { allResources.removeIf(r -> r == null); return allResources; } - + private boolean addNewObjectToStateIfDynamic(EObject object, GenericState state) { final EClass c = object.eClass(); final List mutableProperties = c.getEAllStructuralFeatures().stream() diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.aird b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.aird index 7e151f9c2..18625232f 100644 --- a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.aird +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.aird @@ -2,10 +2,10 @@ base.ecore - platform:/resource/fr.inria.diverse.trace.commons.model/model/GenericTrace.ecore + platform:/resource/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.ecore platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore http://www.eclipse.org/emf/2002/Ecore - platform:/resource/fr.inria.diverse.trace.commons.model/model/LaunchConfiguration.ecore + platform:/resource/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.ecore @@ -799,14 +799,14 @@ - - + + - - + + KEEP_LOCATION KEEP_SIZE KEEP_RATIO @@ -816,8 +816,8 @@ - - + + KEEP_LOCATION KEEP_SIZE KEEP_RATIO @@ -827,8 +827,8 @@ - - + + KEEP_LOCATION KEEP_SIZE KEEP_RATIO @@ -846,8 +846,8 @@ - - + + bold @@ -855,8 +855,8 @@ - - + + labelSize @@ -869,8 +869,8 @@ - - + + @@ -878,8 +878,8 @@ - - + + labelSize @@ -907,14 +907,14 @@ - - + + - - + + KEEP_LOCATION KEEP_SIZE KEEP_RATIO @@ -932,8 +932,8 @@ - - + + @@ -941,8 +941,8 @@ - - + + @@ -967,14 +967,14 @@ - - + + - - + + KEEP_LOCATION KEEP_SIZE KEEP_RATIO @@ -993,8 +993,8 @@ - - + + labelSize @@ -1023,14 +1023,14 @@ - - + + - - + + @@ -1046,14 +1046,14 @@ - - + + - - + + KEEP_LOCATION KEEP_SIZE KEEP_RATIO @@ -1063,8 +1063,8 @@ - - + + KEEP_LOCATION KEEP_SIZE KEEP_RATIO @@ -1163,14 +1163,14 @@ - - + + - - + + KEEP_LOCATION KEEP_SIZE KEEP_RATIO @@ -1188,8 +1188,8 @@ - - + + @@ -1242,8 +1242,8 @@ - - + + italic @@ -1282,9 +1282,9 @@ - - - + + + routingStyle @@ -1294,9 +1294,9 @@ - - - + + + @@ -1305,9 +1305,9 @@ - - - + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.ecore b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.ecore index c09a76ff7..2cf771b85 100644 --- a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.ecore +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.ecore @@ -2,8 +2,8 @@ - - + + @@ -25,17 +25,17 @@ - + - + - + @@ -44,7 +44,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -76,7 +76,7 @@ - + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.genmodel b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.genmodel index 6092c9546..1baae2c51 100644 --- a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.genmodel +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.genmodel @@ -1,9 +1,9 @@ base.ecore diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Clone.launch b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Clone.launch index 3cf1f4354..f0afc04a9 100644 --- a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Clone.launch +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Clone.launch @@ -11,7 +11,7 @@ - + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generated.launch b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generated.launch index acb69f856..789f916a4 100644 --- a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generated.launch +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generated.launch @@ -11,7 +11,7 @@ - + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generic.launch b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generic.launch index b9e0be063..a0d1b3a88 100644 --- a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generic.launch +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generic.launch @@ -11,7 +11,7 @@ - + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-None.launch b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-None.launch index 9ba8b3fed..2ab4a58d7 100644 --- a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-None.launch +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-None.launch @@ -11,7 +11,7 @@ - + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/hs_err_pid8464.log b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/hs_err_pid8464.log deleted file mode 100644 index 998a66bac..000000000 --- a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/hs_err_pid8464.log +++ /dev/null @@ -1,835 +0,0 @@ -# -# A fatal error has been detected by the Java Runtime Environment: -# -# SIGSEGV (0xb) at pc=0x0000000000000000, pid=8464, tid=140599452133120 -# -# JRE version: Java(TM) SE Runtime Environment (8.0_77-b03) (build 1.8.0_77-b03) -# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.77-b03 mixed mode linux-amd64 compressed oops) -# Problematic frame: -# C 0x0000000000000000 -# -# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again -# -# If you would like to submit a bug report, please visit: -# http://bugreport.java.com/bugreport/crash.jsp -# - ---------------- T H R E A D --------------- - -Current thread (0x00007fdff80c5000): JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_in_vm, id=8487, stack(0x00007fdfdc566000,0x00007fdfdc667000)] - -siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000 - -Registers: -RAX=0x00007fdfbc08aa70, RBX=0x00007fdfbc0b0040, RCX=0x00007fdfffd4c2e0, RDX=0x00007fdfff32e640 -RSP=0x00007fdfdc665a48, RBP=0x00007fdfdc665a60, RSI=0x00007fdff80c5000, RDI=0x00007fdfbc0b0040 -R8 =0x00007fdfbc0a9ff0, R9 =0x0000000000000000, R10=0x00007fdfbc0a9fe0, R11=0x00007fdfff4e69b0 -R12=0x0000000000000017, R13=0x00007fdfbc000078, R14=0x00007fdff80c5000, R15=0x00007fdfdc665b67 -RIP=0x0000000000000000, EFLAGS=0x0000000000010216, CSGSFS=0x0000000000000033, ERR=0x0000000000000014 - TRAPNO=0x000000000000000e - -Top of Stack: (sp=0x00007fdfdc665a48) -0x00007fdfdc665a48: 00007fdffec1f567 0000000000000074 -0x00007fdfdc665a58: 00007fdff8003c10 00007fdfdc665ad0 -0x00007fdfdc665a68: 00007fdffeaafcae 00007fdfdc665a90 -0x00007fdfdc665a78: 00007fdfdc665a80 00007fdff80c5000 -0x00007fdfdc665a88: 0000000000000000 00007fdf00000000 -0x00007fdfdc665a98: 0000000000000000 00007fdfdc665ac0 -0x00007fdfdc665aa8: 00007fdffda33e40 00007fdfbc000078 -0x00007fdfdc665ab8: 00007fdfdc665b67 0000000000000001 -0x00007fdfdc665ac8: 00007fdfdc665b67 00007fdfdc665b00 -0x00007fdfdc665ad8: 00007fdffd81f8c2 00007fdfdc665b00 -0x00007fdfdc665ae8: 00007fdfbc000078 00007fdfdc665bd0 -0x00007fdfdc665af8: 0000000000000008 00007fdfdc665b90 -0x00007fdfdc665b08: 00007fdffd800aa0 00007fdfdc665b48 -0x00007fdfdc665b18: 00007fdfdc665b40 00007fdfdc665b38 -0x00007fdfdc665b28: 00007fdfdc665b5c 00000001bc0226d0 -0x00007fdfdc665b38: 0000000000000000 0000000000000000 -0x00007fdfdc665b48: 0000000000000000 00007fdfbc022870 -0x00007fdfdc665b58: 00000002dc665bd0 000000000000000d -0x00007fdfdc665b68: 0000000000000002 000000000000000f -0x00007fdfdc665b78: 0000000000000002 00000000000f0200 -0x00007fdfdc665b88: 000000000000000f 00007fdfdc665de0 -0x00007fdfdc665b98: 00007fdffd80b9c6 0000825800000013 -0x00007fdfdc665ba8: 00007fdffe0f0200 00007fdfb0000ba0 -0x00007fdfdc665bb8: 0000000000000000 00007fdfdc665bd0 -0x00007fdfdc665bc8: 00007fdfdc665d60 00007fdfdc665c46 -0x00007fdfdc665bd8: 00007fdf00000106 00007fdfdc665be8 -0x00007fdfdc665be8: 0000000000000026 00007fdfdc665c20 -0x00007fdfdc665bf8: 0000000000000000 00007f0000000000 -0x00007fdfdc665c08: 00008258000007c2 00007fdf00005d80 -0x00007fdfdc665c18: 0000000000000000 df7f00000d000000 -0x00007fdfdc665c28: 0700000088f200bc 0070756e61656c63 -0x00007fdfdc665c38: 0000562928030000 6574020000000000 - -Instructions: (pc=0x0000000000000000) -0xffffffffffffffe0: - -Register to memory mapping: - -RAX=0x00007fdfbc08aa70 is an unknown value -RBX=0x00007fdfbc0b0040 is an unknown value -RCX=0x00007fdfffd4c2e0: in /lib64/libpthread.so.0 at 0x00007fdfffb34000 -RDX=0x00007fdfff32e640: in /usr/java/jdk1.8.0_77/jre/lib/amd64/server/libjvm.so at 0x00007fdffe379000 -RSP=0x00007fdfdc665a48 is pointing into the stack for thread: 0x00007fdff80c5000 -RBP=0x00007fdfdc665a60 is pointing into the stack for thread: 0x00007fdff80c5000 -RSI=0x00007fdff80c5000 is a thread -RDI=0x00007fdfbc0b0040 is an unknown value -R8 =0x00007fdfbc0a9ff0 is an unknown value -R9 =0x0000000000000000 is an unknown value -R10=0x00007fdfbc0a9fe0 is an unknown value -R11=0x00007fdfff4e69b0: in /lib64/libc.so.6 at 0x00007fdfff359000 -R12=0x0000000000000017 is an unknown value -R13=0x00007fdfbc000078 is an unknown value -R14=0x00007fdff80c5000 is a thread -R15=0x00007fdfdc665b67 is pointing into the stack for thread: 0x00007fdff80c5000 - - -Stack: [0x00007fdfdc566000,0x00007fdfdc667000], sp=0x00007fdfdc665a48, free space=1022k - ---------------- P R O C E S S --------------- - -Java Threads: ( => current thread ) - 0x00007fdf8000b800 JavaThread "[ThreadPool Manager] - Idle Thread" daemon [_thread_blocked, id=8588, stack(0x00007fdfa57dd000,0x00007fdfa58de000)] - 0x00007fdf78012800 JavaThread "Worker-1" [_thread_blocked, id=8547, stack(0x00007fdfa6a5d000,0x00007fdfa6b5e000)] - 0x00007fdff857e000 JavaThread "Worker-0" [_thread_blocked, id=8524, stack(0x00007fdfa62e0000,0x00007fdfa63e1000)] - 0x00007fdff8136000 JavaThread "EMF Reference Cleaner" daemon [_thread_blocked, id=8523, stack(0x00007fdfa5ede000,0x00007fdfa5fdf000)] - 0x00007fdff8134800 JavaThread "ReaderThread" [_thread_in_native, id=8522, stack(0x00007fdfa61df000,0x00007fdfa62e0000)] - 0x00007fdf7c43e000 JavaThread "Worker-JM" [_thread_blocked, id=8520, stack(0x00007fdfa65e1000,0x00007fdfa66e2000)] - 0x00007fdf7c007000 JavaThread "[Timer] - Main Queue Handler" daemon [_thread_blocked, id=8516, stack(0x00007fdfa695c000,0x00007fdfa6a5d000)] - 0x00007fdff8828800 JavaThread "Bundle File Closer" daemon [_thread_blocked, id=8510, stack(0x00007fdfa6e4d000,0x00007fdfa6f4e000)] - 0x00007fdff8403800 JavaThread "Start Level: Equinox Container: 7083cb78-35fb-0015-1141-bece38f4d72a" daemon [_thread_blocked, id=8509, stack(0x00007fdfa709f000,0x00007fdfa71a0000)] - 0x00007fdff83fa000 JavaThread "Refresh Thread: Equinox Container: 7083cb78-35fb-0015-1141-bece38f4d72a" daemon [_thread_blocked, id=8508, stack(0x00007fdfa72b1000,0x00007fdfa73b2000)] - 0x00007fdff83f7000 JavaThread "Framework Event Dispatcher: Equinox Container: 7083cb78-35fb-0015-1141-bece38f4d72a" daemon [_thread_blocked, id=8507, stack(0x00007fdfa73b2000,0x00007fdfa74b3000)] - 0x00007fdff83ce000 JavaThread "Active Thread: Equinox Container: 7083cb78-35fb-0015-1141-bece38f4d72a" [_thread_blocked, id=8506, stack(0x00007fdfa74b3000,0x00007fdfa75b4000)] - 0x00007fdff80d2800 JavaThread "Service Thread" daemon [_thread_blocked, id=8497, stack(0x00007fdfa7eff000,0x00007fdfa8000000)] - 0x00007fdff80cf000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=8496, stack(0x00007fdfdc061000,0x00007fdfdc162000)] - 0x00007fdff80cd800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=8495, stack(0x00007fdfdc162000,0x00007fdfdc263000)] - 0x00007fdff80ca800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=8494, stack(0x00007fdfdc263000,0x00007fdfdc364000)] - 0x00007fdfbc001000 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=8491, stack(0x00007fdfdc364000,0x00007fdfdc465000)] - 0x00007fdff80c8800 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=8490, stack(0x00007fdfdc465000,0x00007fdfdc566000)] -=>0x00007fdff80c5000 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_in_vm, id=8487, stack(0x00007fdfdc566000,0x00007fdfdc667000)] - 0x00007fdff80b8800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8485, stack(0x00007fdfdc86b000,0x00007fdfdc96c000)] - 0x00007fdff8086800 JavaThread "Finalizer" daemon [_thread_blocked, id=8484, stack(0x00007fdfdc96c000,0x00007fdfdca6d000)] - 0x00007fdff8082000 JavaThread "Reference Handler" daemon [_thread_blocked, id=8483, stack(0x00007fdfdca6d000,0x00007fdfdcb6e000)] - 0x00007fdff800c800 JavaThread "main" [_thread_blocked, id=8477, stack(0x00007fdfffe41000,0x00007fdffff42000)] - -Other Threads: - 0x00007fdff807a000 VMThread [stack: 0x00007fdfdcb6e000,0x00007fdfdcc6f000] [id=8482] - 0x00007fdff80d6000 WatcherThread [stack: 0x00007fdfa7dfe000,0x00007fdfa7eff000] [id=8498] - -VM state:not at safepoint (normal execution) - -VM Mutex/Monitor currently owned by a thread: None - -Heap: - PSYoungGen total 625152K, used 99173K [0x00000000d6c00000, 0x0000000100000000, 0x0000000100000000) - eden space 605184K, 16% used [0x00000000d6c00000,0x00000000dccd96b8,0x00000000fbb00000) - from space 19968K, 0% used [0x00000000fec80000,0x00000000fec80000,0x0000000100000000) - to space 35328K, 0% used [0x00000000fbb00000,0x00000000fbb00000,0x00000000fdd80000) - ParOldGen total 124416K, used 62214K [0x0000000084400000, 0x000000008bd80000, 0x00000000d6c00000) - object space 124416K, 50% used [0x0000000084400000,0x00000000880c18e8,0x000000008bd80000) - Metaspace used 22413K, capacity 24248K, committed 24448K, reserved 1071104K - class space used 2498K, capacity 3099K, committed 3200K, reserved 1048576K - -Card table byte_map: [0x00007fdffca2b000,0x00007fdffce0a000] byte_map_base: 0x00007fdffc609000 - -Marking Bits: (ParMarkBitMap*) 0x00007fdfff32e100 - Begin Bits: [0x00007fdfde75c000, 0x00007fdfe064c000) - End Bits: [0x00007fdfe064c000, 0x00007fdfe253c000) - -Polling page: 0x00007fdffff6f000 - -CodeCache: size=245760Kb used=12916Kb max_used=12994Kb free=232843Kb - bounds [0x00007fdfe253c000, 0x00007fdfe321c000, 0x00007fdff153c000] - total_blobs=3652 nmethods=3234 adapters=338 - compilation: enabled - -Compilation events (10 events): -Event: 30,653 Thread 0x00007fdff80cd800 nmethod 3946 0x00007fdfe2a452d0 code [0x00007fdfe2a45540, 0x00007fdfe2a46768] -Event: 30,653 Thread 0x00007fdff80cd800 3937 4 java.io.DataOutputStream::writeByte (14 bytes) -Event: 30,654 Thread 0x00007fdff80cd800 nmethod 3937 0x00007fdfe2b5a910 code [0x00007fdfe2b5aa60, 0x00007fdfe2b5ab18] -Event: 30,654 Thread 0x00007fdff80cd800 3940 ! 4 org.eclipse.osgi.container.ModuleRevisions::isUninstalled (17 bytes) -Event: 30,654 Thread 0x00007fdff80cd800 nmethod 3940 0x00007fdfe2a42010 code [0x00007fdfe2a42160, 0x00007fdfe2a423b8] -Event: 30,654 Thread 0x00007fdff80cd800 3935 4 org.eclipse.osgi.container.ModuleDatabase$Persistence::writeQualifier (19 bytes) -Event: 30,656 Thread 0x00007fdff80cd800 nmethod 3935 0x00007fdfe28c1350 code [0x00007fdfe28c14e0, 0x00007fdfe28c1778] -Event: 31,107 Thread 0x00007fdff80ca800 nmethod 3932 0x00007fdfe31f5fd0 code [0x00007fdfe31f6fc0, 0x00007fdfe3206df0] -Event: 438,466 Thread 0x00007fdff80cf000 3947 1 org.eclipse.core.internal.jobs.InternalJob::previous (5 bytes) -Event: 438,467 Thread 0x00007fdff80cf000 nmethod 3947 0x00007fdfe28c1010 code [0x00007fdfe28c1160, 0x00007fdfe28c1270] - -GC Heap History (10 events): -Event: 3,602 GC heap before -{Heap before GC invocations=11 (full 0): - PSYoungGen total 420864K, used 403648K [0x00000000d6c00000, 0x00000000f1c00000, 0x0000000100000000) - eden space 402432K, 100% used [0x00000000d6c00000,0x00000000ef500000,0x00000000ef500000) - from space 18432K, 6% used [0x00000000f0800000,0x00000000f0930000,0x00000000f1a00000) - to space 19456K, 0% used [0x00000000ef500000,0x00000000ef500000,0x00000000f0800000) - ParOldGen total 84992K, used 38011K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 44% used [0x0000000084400000,0x000000008691eff0,0x0000000089700000) - Metaspace used 9048K, capacity 9240K, committed 9472K, reserved 1058816K - class space used 892K, capacity 930K, committed 1024K, reserved 1048576K -Event: 3,617 GC heap after -Heap after GC invocations=11 (full 0): - PSYoungGen total 421888K, used 4672K [0x00000000d6c00000, 0x0000000100000000, 0x0000000100000000) - eden space 402432K, 0% used [0x00000000d6c00000,0x00000000d6c00000,0x00000000ef500000) - from space 19456K, 24% used [0x00000000ef500000,0x00000000ef990000,0x00000000f0800000) - to space 19456K, 0% used [0x00000000fed00000,0x00000000fed00000,0x0000000100000000) - ParOldGen total 84992K, used 38468K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 45% used [0x0000000084400000,0x0000000086991010,0x0000000089700000) - Metaspace used 9048K, capacity 9240K, committed 9472K, reserved 1058816K - class space used 892K, capacity 930K, committed 1024K, reserved 1048576K -} -Event: 4,081 GC heap before -{Heap before GC invocations=12 (full 0): - PSYoungGen total 421888K, used 407104K [0x00000000d6c00000, 0x0000000100000000, 0x0000000100000000) - eden space 402432K, 100% used [0x00000000d6c00000,0x00000000ef500000,0x00000000ef500000) - from space 19456K, 24% used [0x00000000ef500000,0x00000000ef990000,0x00000000f0800000) - to space 19456K, 0% used [0x00000000fed00000,0x00000000fed00000,0x0000000100000000) - ParOldGen total 84992K, used 38468K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 45% used [0x0000000084400000,0x0000000086991010,0x0000000089700000) - Metaspace used 9064K, capacity 9240K, committed 9472K, reserved 1058816K - class space used 892K, capacity 930K, committed 1024K, reserved 1048576K -Event: 4,086 GC heap after -Heap after GC invocations=12 (full 0): - PSYoungGen total 655360K, used 7936K [0x00000000d6c00000, 0x00000000fff00000, 0x0000000100000000) - eden space 636928K, 0% used [0x00000000d6c00000,0x00000000d6c00000,0x00000000fda00000) - from space 18432K, 43% used [0x00000000fed00000,0x00000000ff4c0000,0x00000000fff00000) - to space 18944K, 0% used [0x00000000fda00000,0x00000000fda00000,0x00000000fec80000) - ParOldGen total 84992K, used 38916K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 45% used [0x0000000084400000,0x0000000086a01010,0x0000000089700000) - Metaspace used 9064K, capacity 9240K, committed 9472K, reserved 1058816K - class space used 892K, capacity 930K, committed 1024K, reserved 1048576K -} -Event: 4,826 GC heap before -{Heap before GC invocations=13 (full 0): - PSYoungGen total 655360K, used 644864K [0x00000000d6c00000, 0x00000000fff00000, 0x0000000100000000) - eden space 636928K, 100% used [0x00000000d6c00000,0x00000000fda00000,0x00000000fda00000) - from space 18432K, 43% used [0x00000000fed00000,0x00000000ff4c0000,0x00000000fff00000) - to space 18944K, 0% used [0x00000000fda00000,0x00000000fda00000,0x00000000fec80000) - ParOldGen total 84992K, used 38916K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 45% used [0x0000000084400000,0x0000000086a01010,0x0000000089700000) - Metaspace used 9064K, capacity 9240K, committed 9472K, reserved 1058816K - class space used 892K, capacity 930K, committed 1024K, reserved 1048576K -Event: 4,839 GC heap after -Heap after GC invocations=13 (full 0): - PSYoungGen total 655872K, used 18944K [0x00000000d6c00000, 0x0000000100000000, 0x0000000100000000) - eden space 636928K, 0% used [0x00000000d6c00000,0x00000000d6c00000,0x00000000fda00000) - from space 18944K, 100% used [0x00000000fda00000,0x00000000fec80000,0x00000000fec80000) - to space 19968K, 0% used [0x00000000fec80000,0x00000000fec80000,0x0000000100000000) - ParOldGen total 84992K, used 45052K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 53% used [0x0000000084400000,0x0000000086fff140,0x0000000089700000) - Metaspace used 9064K, capacity 9240K, committed 9472K, reserved 1058816K - class space used 892K, capacity 930K, committed 1024K, reserved 1048576K -} -Event: 8,530 GC heap before -{Heap before GC invocations=14 (full 0): - PSYoungGen total 655872K, used 565687K [0x00000000d6c00000, 0x0000000100000000, 0x0000000100000000) - eden space 636928K, 85% used [0x00000000d6c00000,0x00000000f81edd00,0x00000000fda00000) - from space 18944K, 100% used [0x00000000fda00000,0x00000000fec80000,0x00000000fec80000) - to space 19968K, 0% used [0x00000000fec80000,0x00000000fec80000,0x0000000100000000) - ParOldGen total 84992K, used 45052K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 53% used [0x0000000084400000,0x0000000086fff140,0x0000000089700000) - Metaspace used 19748K, capacity 21180K, committed 21248K, reserved 1069056K - class space used 2113K, capacity 2548K, committed 2560K, reserved 1048576K -Event: 8,559 GC heap after -Heap after GC invocations=14 (full 0): - PSYoungGen total 625152K, used 19948K [0x00000000d6c00000, 0x0000000100000000, 0x0000000100000000) - eden space 605184K, 0% used [0x00000000d6c00000,0x00000000d6c00000,0x00000000fbb00000) - from space 19968K, 99% used [0x00000000fec80000,0x00000000ffffb388,0x0000000100000000) - to space 35328K, 0% used [0x00000000fbb00000,0x00000000fbb00000,0x00000000fdd80000) - ParOldGen total 84992K, used 70869K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 83% used [0x0000000084400000,0x0000000088935688,0x0000000089700000) - Metaspace used 19748K, capacity 21180K, committed 21248K, reserved 1069056K - class space used 2113K, capacity 2548K, committed 2560K, reserved 1048576K -} -Event: 8,559 GC heap before -{Heap before GC invocations=15 (full 1): - PSYoungGen total 625152K, used 19948K [0x00000000d6c00000, 0x0000000100000000, 0x0000000100000000) - eden space 605184K, 0% used [0x00000000d6c00000,0x00000000d6c00000,0x00000000fbb00000) - from space 19968K, 99% used [0x00000000fec80000,0x00000000ffffb388,0x0000000100000000) - to space 35328K, 0% used [0x00000000fbb00000,0x00000000fbb00000,0x00000000fdd80000) - ParOldGen total 84992K, used 70869K [0x0000000084400000, 0x0000000089700000, 0x00000000d6c00000) - object space 84992K, 83% used [0x0000000084400000,0x0000000088935688,0x0000000089700000) - Metaspace used 19748K, capacity 21180K, committed 21248K, reserved 1069056K - class space used 2113K, capacity 2548K, committed 2560K, reserved 1048576K -Event: 8,670 GC heap after -Heap after GC invocations=15 (full 1): - PSYoungGen total 625152K, used 0K [0x00000000d6c00000, 0x0000000100000000, 0x0000000100000000) - eden space 605184K, 0% used [0x00000000d6c00000,0x00000000d6c00000,0x00000000fbb00000) - from space 19968K, 0% used [0x00000000fec80000,0x00000000fec80000,0x0000000100000000) - to space 35328K, 0% used [0x00000000fbb00000,0x00000000fbb00000,0x00000000fdd80000) - ParOldGen total 124416K, used 62214K [0x0000000084400000, 0x000000008bd80000, 0x00000000d6c00000) - object space 124416K, 50% used [0x0000000084400000,0x00000000880c18e8,0x000000008bd80000) - Metaspace used 19748K, capacity 21180K, committed 21248K, reserved 1069056K - class space used 2113K, capacity 2548K, committed 2560K, reserved 1048576K -} - -Deoptimization events (10 events): -Event: 8,785 Thread 0x00007fdff800c800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x00007fdfe2d05288 method=java.util.Collections$UnmodifiableCollection$1.(Ljava/util/Collections$UnmodifiableCollection;)V @ 17 -Event: 8,800 Thread 0x00007fdff800c800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x00007fdfe2d05288 method=java.util.Collections$UnmodifiableCollection$1.(Ljava/util/Collections$UnmodifiableCollection;)V @ 17 -Event: 8,833 Thread 0x00007fdff800c800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007fdfe269effc method=java.util.Arrays.equals([B[B)Z @ 2 -Event: 14,090 Thread 0x00007fdff800c800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007fdfe2897804 method=java.lang.AbstractStringBuilder.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder; @ 1 -Event: 18,457 Thread 0x00007fdff800c800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007fdfe270a034 method=java.lang.AbstractStringBuilder.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder; @ 1 -Event: 30,461 Thread 0x00007fdff83ce000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007fdfe303a79c method=java.io.BufferedOutputStream.write(I)V @ 9 -Event: 30,514 Thread 0x00007fdff83ce000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007fdfe27bf070 method=sun.nio.cs.UTF_8$Encoder.encode([CII[B)I @ 33 -Event: 30,555 Thread 0x00007fdff83ce000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007fdfe28c9870 method=org.osgi.framework.Version.equals(Ljava/lang/Object;)Z @ 51 -Event: 30,555 Thread 0x00007fdff83ce000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007fdfe28c8654 method=org.osgi.framework.Version.equals(Ljava/lang/Object;)Z @ 51 -Event: 30,635 Thread 0x00007fdff83ce000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007fdfe2d1a998 method=java.util.concurrent.locks.AbstractQueuedSynchronizer.release(I)Z @ 14 - -Internal exceptions (10 events): -Event: 8,370 Thread 0x00007fdff800c800 Exception (0x00000000e1c48bd0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u77/6540/hotspot/src/share/vm/prims/jni.cpp, line 709] -Event: 8,371 Thread 0x00007fdff800c800 Exception (0x00000000e1c55b48) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u77/6540/hotspot/src/share/vm/prims/jni.cpp, line 709] -Event: 8,774 Thread 0x00007fdff800c800 Exception (0x00000000d7039c60) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u77/6540/hotspot/src/share/vm/prims/jni.cpp, line 709] -Event: 8,781 Thread 0x00007fdff800c800 Exception (0x00000000d707f390) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u77/6540/hotspot/src/share/vm/prims/jni.cpp, line 709] -Event: 8,783 Thread 0x00007fdff800c800 Exception (0x00000000d7091cb8) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u77/6540/hotspot/src/share/vm/prims/jni.cpp, line 709] -Event: 8,787 Thread 0x00007fdff800c800 Exception (0x00000000d70b9e20) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u77/6540/hotspot/src/share/vm/runtime/reflection.cpp, line 1092] -Event: 8,823 Thread 0x00007fdff800c800 Exception (0x00000000d71ab0c0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u77/6540/hotspot/src/share/vm/prims/methodHandles.cpp, line 1146] -Event: 8,825 Thread 0x00007fdff800c800 Exception (0x00000000d71b8b50) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u77/6540/hotspot/src/share/vm/prims/methodHandles.cpp, line 1146] -Event: 14,090 Thread 0x00007fdff800c800 Implicit null exception at 0x00007fdfe289722f to 0x00007fdfe28977ed -Event: 18,457 Thread 0x00007fdff800c800 Implicit null exception at 0x00007fdfe2709bb6 to 0x00007fdfe270a01d - -Events (10 events): -Event: 123,116 Executing VM operation: GetOrSetLocal -Event: 123,116 Executing VM operation: GetOrSetLocal done -Event: 318,466 Executing VM operation: RevokeBias -Event: 318,466 Executing VM operation: RevokeBias done -Event: 318,466 Executing VM operation: RevokeBias -Event: 318,466 Executing VM operation: RevokeBias done -Event: 438,467 Thread 0x00007fdff80cf000 flushing nmethod 0x00007fdfe2669190 -Event: 438,467 Thread 0x00007fdff80cf000 flushing nmethod 0x00007fdfe266fa90 -Event: 451,889 Executing VM operation: RedefineClasses -Event: 451,917 Executing VM operation: RedefineClasses done - - -Dynamic libraries: -00400000-00401000 r-xp 00000000 08:06 689477 /usr/java/jdk1.8.0_77/bin/java -00600000-00601000 rw-p 00000000 08:06 689477 /usr/java/jdk1.8.0_77/bin/java -00b1a000-00b3b000 rw-p 00000000 00:00 0 [heap] -84400000-8bd80000 rw-p 00000000 00:00 0 -8bd80000-d6c00000 ---p 00000000 00:00 0 -d6c00000-100000000 rw-p 00000000 00:00 0 -100000000-100320000 rw-p 00000000 00:00 0 -100320000-140000000 ---p 00000000 00:00 0 -7fdf64000000-7fdf64021000 rw-p 00000000 00:00 0 -7fdf64021000-7fdf68000000 ---p 00000000 00:00 0 -7fdf6c000000-7fdf6c021000 rw-p 00000000 00:00 0 -7fdf6c021000-7fdf70000000 ---p 00000000 00:00 0 -7fdf70000000-7fdf70021000 rw-p 00000000 00:00 0 -7fdf70021000-7fdf74000000 ---p 00000000 00:00 0 -7fdf74000000-7fdf74021000 rw-p 00000000 00:00 0 -7fdf74021000-7fdf78000000 ---p 00000000 00:00 0 -7fdf78000000-7fdf78031000 rw-p 00000000 00:00 0 -7fdf78031000-7fdf7c000000 ---p 00000000 00:00 0 -7fdf7c000000-7fdf7c99e000 rw-p 00000000 00:00 0 -7fdf7c99e000-7fdf80000000 ---p 00000000 00:00 0 -7fdf80000000-7fdf80021000 rw-p 00000000 00:00 0 -7fdf80021000-7fdf84000000 ---p 00000000 00:00 0 -7fdf84000000-7fdf8417b000 rw-p 00000000 00:00 0 -7fdf8417b000-7fdf88000000 ---p 00000000 00:00 0 -7fdf88000000-7fdf88021000 rw-p 00000000 00:00 0 -7fdf88021000-7fdf8c000000 ---p 00000000 00:00 0 -7fdf8c000000-7fdf8c021000 rw-p 00000000 00:00 0 -7fdf8c021000-7fdf90000000 ---p 00000000 00:00 0 -7fdf90000000-7fdf9007a000 rw-p 00000000 00:00 0 -7fdf9007a000-7fdf94000000 ---p 00000000 00:00 0 -7fdf94000000-7fdf94021000 rw-p 00000000 00:00 0 -7fdf94021000-7fdf98000000 ---p 00000000 00:00 0 -7fdf98000000-7fdf980f1000 rw-p 00000000 00:00 0 -7fdf980f1000-7fdf9c000000 ---p 00000000 00:00 0 -7fdf9c000000-7fdf9c021000 rw-p 00000000 00:00 0 -7fdf9c021000-7fdfa0000000 ---p 00000000 00:00 0 -7fdfa0000000-7fdfa0cc0000 rw-p 00000000 00:00 0 -7fdfa0cc0000-7fdfa4000000 ---p 00000000 00:00 0 -7fdfa57dd000-7fdfa57e0000 ---p 00000000 00:00 0 -7fdfa57e0000-7fdfa599e000 rw-p 00000000 00:00 0 [stack:8588] -7fdfa599e000-7fdfa5ade000 ---p 00000000 00:00 0 -7fdfa5ade000-7fdfa5cde000 rw-p 00000000 00:00 0 -7fdfa5cde000-7fdfa5ede000 rw-p 00000000 00:00 0 -7fdfa5ede000-7fdfa5ee1000 ---p 00000000 00:00 0 -7fdfa5ee1000-7fdfa61df000 rw-p 00000000 00:00 0 [stack:8523] -7fdfa61df000-7fdfa61e2000 ---p 00000000 00:00 0 -7fdfa61e2000-7fdfa62e0000 rw-p 00000000 00:00 0 [stack:8522] -7fdfa62e0000-7fdfa62e3000 ---p 00000000 00:00 0 -7fdfa62e3000-7fdfa65e1000 rw-p 00000000 00:00 0 [stack:8524] -7fdfa65e1000-7fdfa65e4000 ---p 00000000 00:00 0 -7fdfa65e4000-7fdfa66e2000 rw-p 00000000 00:00 0 [stack:8520] -7fdfa66e2000-7fdfa671f000 r--s 003a9000 08:08 2500928 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.fsmkernel.model.xtext.fsmdsl_0.1.1.201604011624.jar -7fdfa671f000-7fdfa675c000 r--s 003b2000 08:08 2496204 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.ccslmocc.model.xtext.mocdsl_0.1.1.201604011624.jar -7fdfa675c000-7fdfa695c000 rw-p 00000000 00:00 0 -7fdfa695c000-7fdfa695f000 ---p 00000000 00:00 0 -7fdfa695f000-7fdfa6a5d000 rw-p 00000000 00:00 0 [stack:8516] -7fdfa6a5d000-7fdfa6a60000 ---p 00000000 00:00 0 -7fdfa6a60000-7fdfa6d5e000 rw-p 00000000 00:00 0 [stack:8547] -7fdfa6d74000-7fdfa6d9d000 r--s 00200000 08:08 2496101 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/com.google.guava_15.0.0.v201403281430.jar -7fdfa6d9d000-7fdfa6de1000 r--s 00390000 08:08 2495336 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.ui.workbench_3.106.2.v20150204-1030.jar -7fdfa6de1000-7fdfa6e07000 r--p 00000000 08:06 926394 /usr/share/locale/fr/LC_MESSAGES/libc.mo -7fdfa6e07000-7fdfa6e18000 r--s 00155000 08:08 3540724 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/platform.jar -7fdfa6e18000-7fdfa6e4d000 r--s 003a3000 08:08 3540712 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/svnkit.jar -7fdfa6e4d000-7fdfa6e50000 ---p 00000000 00:00 0 -7fdfa6e50000-7fdfa6f4e000 rw-p 00000000 00:00 0 [stack:8510] -7fdfa6f5e000-7fdfa6fcb000 r--s 008f8000 08:08 274949 /home/zerwan/Work/git/moliz/org.modelexecution.fumldebug/lib/aspectjtools.jar -7fdfa6fcb000-7fdfa6fcd000 r--s 00008000 08:08 2500837 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.weaving.hook_1.1.100.weaving-hook-20140821.jar -7fdfa6fcd000-7fdfa6fe2000 r--s 000e5000 08:08 274950 /home/zerwan/Work/git/moliz/org.modelexecution.fumldebug/lib/moliz-core-v1.0.0.jar -7fdfa6fe2000-7fdfa6ffb000 r--s 00135000 08:08 531245 /home/zerwan/Work/git/gemoc-gits/modelanimation/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xercesImpl.jar -7fdfa6ffb000-7fdfa7001000 r--s 00044000 08:08 531242 /home/zerwan/Work/git/gemoc-gits/modelanimation/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5.jar -7fdfa7001000-7fdfa7016000 r--s 013bf000 08:08 2501935 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gemoc_language_workbench.documentation_2.1.1.201604011643.jar -7fdfa7019000-7fdfa7024000 r--s 000c1000 08:08 2501472 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.resources_3.9.1.v20140825-1431.jar -7fdfa7024000-7fdfa702b000 r--s 00050000 08:08 2501727 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.emf.common_2.10.1.v20150123-0348.jar -7fdfa702b000-7fdfa703d000 r--s 00111000 08:08 2498921 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.emf.ecore_2.10.2.v20150123-0348.jar -7fdfa703d000-7fdfa704d000 r--s 000ab000 08:08 3540716 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/sqljet.jar -7fdfa704d000-7fdfa7052000 r--s 000fa000 08:08 2500902 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.fsmkernel.model.xtext.fsmdsl.ui_0.1.1.201604011624.jar -7fdfa7052000-7fdfa7056000 r--s 00013000 08:08 2501119 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.fsmkernel.model.design_0.1.1.201604011624.jar -7fdfa7056000-7fdfa705d000 r--s 0001b000 08:08 2501690 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gexpressions.edit_1.0.0.201604011613.jar -7fdfa7060000-7fdfa7066000 r--s 00036000 08:08 2893960 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.junit_4.11.0.v201303080030/junit.jar -7fdfa7066000-7fdfa7068000 r--s 00011000 08:08 2501942 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.runtime_3.10.0.v20140318-2214.jar -7fdfa7068000-7fdfa706f000 r--s 00000000 08:06 22958 /usr/lib64/gconv/gconv-modules.cache -7fdfa706f000-7fdfa7071000 r--s 00002000 08:08 2496248 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.w3c.dom.events_3.0.0.draft20060413_v201105210656.jar -7fdfa7071000-7fdfa7076000 r--s 0002a000 08:08 3540713 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/svnkit-javahl.jar -7fdfa7076000-7fdfa707b000 r--s 00039000 08:08 3540710 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/trilead.jar -7fdfa707b000-7fdfa7081000 r--s 00033000 08:08 531239 /home/zerwan/Work/git/gemoc-gits/modelanimation/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jaxen-1.1.6.jar -7fdfa7081000-7fdfa7084000 r--s 0000f000 08:08 2501098 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.transformations.ecl2mtl.ui_0.0.1.201604011619.jar -7fdfa7084000-7fdfa7088000 r--s 00038000 08:08 2501066 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.transformations.ecl2mtl_0.0.1.201604011619.jar -7fdfa7088000-7fdfa708d000 r--s 00027000 08:08 2501307 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.fsmkernel.model_0.1.1.201604011624.jar -7fdfa708d000-7fdfa7092000 r--s 00102000 08:08 2501331 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.ccslmocc.model.xtext.mocdsl.ui_0.1.1.201604011624.jar -7fdfa7092000-7fdfa7095000 r--s 00039000 08:08 2496257 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.osgi.compatibility.state_1.0.1.v20140709-1414.jar -7fdfa7095000-7fdfa7098000 r--s 0000f000 08:08 2501849 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.ccslmocc.model.design_0.1.1.201604011624.jar -7fdfa7099000-7fdfa709b000 r--s 00007000 08:08 2495923 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.w3c.css.sac_1.3.1.v200903091627.jar -7fdfa709b000-7fdfa709d000 r--s 0000c000 08:08 2496531 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.mocc.ccslmocc.model_0.1.1.201604011624.jar -7fdfa709d000-7fdfa709f000 r--s 00015000 08:08 2495339 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gexpressions.xtext.ui_1.0.0.201604011613.jar -7fdfa709f000-7fdfa70a2000 ---p 00000000 00:00 0 -7fdfa70a2000-7fdfa71a0000 rw-p 00000000 00:00 0 [stack:8509] -7fdfa71a0000-7fdfa71b0000 r-xp 00000000 08:08 2894024 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20150204-1316/eclipse_1607.so -7fdfa71b0000-7fdfa72af000 ---p 00010000 08:08 2894024 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20150204-1316/eclipse_1607.so -7fdfa72af000-7fdfa72b1000 rw-p 0000f000 08:08 2894024 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20150204-1316/eclipse_1607.so -7fdfa72b1000-7fdfa72b4000 ---p 00000000 00:00 0 -7fdfa72b4000-7fdfa73b2000 rw-p 00000000 00:00 0 [stack:8508] -7fdfa73b2000-7fdfa73b5000 ---p 00000000 00:00 0 -7fdfa73b5000-7fdfa74b3000 rw-p 00000000 00:00 0 [stack:8507] -7fdfa74b3000-7fdfa74b6000 ---p 00000000 00:00 0 -7fdfa74b6000-7fdfa75b4000 rw-p 00000000 00:00 0 [stack:8506] -7fdfa75b4000-7fdfa75cb000 r-xp 00000000 08:06 28348 /usr/lib64/libresolv-2.22.so -7fdfa75cb000-7fdfa77cb000 ---p 00017000 08:06 28348 /usr/lib64/libresolv-2.22.so -7fdfa77cb000-7fdfa77cc000 r--p 00017000 08:06 28348 /usr/lib64/libresolv-2.22.so -7fdfa77cc000-7fdfa77cd000 rw-p 00018000 08:06 28348 /usr/lib64/libresolv-2.22.so -7fdfa77cd000-7fdfa77cf000 rw-p 00000000 00:00 0 -7fdfa77cf000-7fdfa77d4000 r-xp 00000000 08:06 27251 /usr/lib64/libnss_dns-2.22.so -7fdfa77d4000-7fdfa79d4000 ---p 00005000 08:06 27251 /usr/lib64/libnss_dns-2.22.so -7fdfa79d4000-7fdfa79d5000 r--p 00005000 08:06 27251 /usr/lib64/libnss_dns-2.22.so -7fdfa79d5000-7fdfa79d6000 rw-p 00006000 08:06 27251 /usr/lib64/libnss_dns-2.22.so -7fdfa79d6000-7fdfa79e7000 r-xp 00000000 08:06 689652 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnio.so -7fdfa79e7000-7fdfa7be6000 ---p 00011000 08:06 689652 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnio.so -7fdfa7be6000-7fdfa7be7000 rw-p 00010000 08:06 689652 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnio.so -7fdfa7be7000-7fdfa7bfd000 r-xp 00000000 08:06 689651 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnet.so -7fdfa7bfd000-7fdfa7dfd000 ---p 00016000 08:06 689651 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnet.so -7fdfa7dfd000-7fdfa7dfe000 rw-p 00016000 08:06 689651 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnet.so -7fdfa7dfe000-7fdfa7dff000 ---p 00000000 00:00 0 -7fdfa7dff000-7fdfa7eff000 rw-p 00000000 00:00 0 [stack:8498] -7fdfa7eff000-7fdfa7f02000 ---p 00000000 00:00 0 -7fdfa7f02000-7fdfa8000000 rw-p 00000000 00:00 0 [stack:8497] -7fdfa8000000-7fdfaa1c9000 rw-p 00000000 00:00 0 -7fdfaa1c9000-7fdfac000000 ---p 00000000 00:00 0 -7fdfac000000-7fdfadf87000 rw-p 00000000 00:00 0 -7fdfadf87000-7fdfb0000000 ---p 00000000 00:00 0 -7fdfb0000000-7fdfb0021000 rw-p 00000000 00:00 0 -7fdfb0021000-7fdfb4000000 ---p 00000000 00:00 0 -7fdfb4000000-7fdfb4021000 rw-p 00000000 00:00 0 -7fdfb4021000-7fdfb8000000 ---p 00000000 00:00 0 -7fdfb8000000-7fdfb8021000 rw-p 00000000 00:00 0 -7fdfb8021000-7fdfbc000000 ---p 00000000 00:00 0 -7fdfbc000000-7fdfbc0f2000 rw-p 00000000 00:00 0 -7fdfbc0f2000-7fdfc0000000 ---p 00000000 00:00 0 -7fdfc0000000-7fdfc0021000 rw-p 00000000 00:00 0 -7fdfc0021000-7fdfc4000000 ---p 00000000 00:00 0 -7fdfc4000000-7fdfc4021000 rw-p 00000000 00:00 0 -7fdfc4021000-7fdfc8000000 ---p 00000000 00:00 0 -7fdfc8000000-7fdfc8021000 rw-p 00000000 00:00 0 -7fdfc8021000-7fdfcc000000 ---p 00000000 00:00 0 -7fdfcc000000-7fdfcc0db000 rw-p 00000000 00:00 0 -7fdfcc0db000-7fdfd0000000 ---p 00000000 00:00 0 -7fdfd0000000-7fdfd0021000 rw-p 00000000 00:00 0 -7fdfd0021000-7fdfd4000000 ---p 00000000 00:00 0 -7fdfd4000000-7fdfd4021000 rw-p 00000000 00:00 0 -7fdfd4021000-7fdfd8000000 ---p 00000000 00:00 0 -7fdfd8000000-7fdfd8021000 rw-p 00000000 00:00 0 -7fdfd8021000-7fdfdc000000 ---p 00000000 00:00 0 -7fdfdc000000-7fdfdc001000 r--s 00005000 08:08 2501308 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.fx.osgi_2.1.0.201508240501.jar -7fdfdc002000-7fdfdc004000 r--s 00006000 08:08 2501951 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.sonatype.tycho.m2e_0.7.0.201309291400.jar -7fdfdc004000-7fdfdc006000 r--s 00007000 08:08 2501729 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.sequential_addons.multidimensional.timeline_0.1.0.201604011637.jar -7fdfdc006000-7fdfdc00a000 r--s 0001e000 08:08 2501997 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gexpressions.xtext_1.0.0.201604011613.jar -7fdfdc00a000-7fdfdc00d000 r--s 00016000 08:08 2500914 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gexpressions_0.1.0.201604011613.jar -7fdfdc00d000-7fdfdc00f000 r--s 0011b000 08:08 2501730 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gemoc_studio.branding_2.1.1.201604011643.jar -7fdfdc00f000-7fdfdc010000 r--s 0000e000 08:08 2501657 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gemoc_modeling_workbench.sample.deployer_0.1.0.201603221014.jar -7fdfdc010000-7fdfdc012000 r--s 00008000 08:08 2501738 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gemoc_heterogeneous_modeling_workbench.ui_0.1.0.201604011636.jar -7fdfdc012000-7fdfdc014000 r--s 00028000 08:08 2495342 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gel.xtext.ui_0.1.0.201604011622.jar -7fdfdc014000-7fdfdc018000 r--s 00035000 08:08 2500871 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gel.xtext_0.1.0.201604011622.jar -7fdfdc018000-7fdfdc01b000 r--s 0000e000 08:08 2500869 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gel.microgel.editor_0.1.0.201604011622.jar -7fdfdc028000-7fdfdc02b000 r--s 00011000 08:08 2496249 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.util_1.0.500.v20130404-1337.jar -7fdfdc02b000-7fdfdc02c000 r--s 00002000 08:08 2501452 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.filesystem.linux.x86_64_1.2.200.v20140124-1940.jar -7fdfdc02c000-7fdfdc02d000 r--s 00003000 08:08 2501087 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.filesystem.java7_1.0.0.v20140429-1531.jar -7fdfdc02d000-7fdfdc031000 r--s 0001e000 08:08 2501814 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.xtext.xbase.lib_2.8.4.v201508050135.jar -7fdfdc031000-7fdfdc035000 r--s 00035000 08:08 2501743 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.emf.ecore.xmi_2.10.2.v20150123-0348.jar -7fdfdc035000-7fdfdc03b000 r--s 00044000 08:08 281325 /home/zerwan/Work/git/gemoc-gits/modelanimation/trace/commons/plugins/fr.inria.diverse.trace.commons/lib/jdom-2.0.5.jar -7fdfdc03b000-7fdfdc03d000 r--s 0000d000 08:08 2496001 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.filesystem_1.4.100.v20140514-1614.jar -7fdfdc03d000-7fdfdc03f000 r--s 00004000 08:08 2496290 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.jdt.junit4.runtime_1.1.400.v20140314-0036.jar -7fdfdc03f000-7fdfdc042000 r--s 0000b000 08:08 2501103 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.jdt.junit.runtime_3.4.500.v20140527-1138.jar -7fdfdc042000-7fdfdc044000 r--s 00004000 08:08 2500848 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.pde.junit.runtime_3.4.400.v20140204-1740.jar -7fdfdc044000-7fdfdc046000 r--s 0000d000 08:08 2495920 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.apache.felix.gogo.command_0.10.0.v201209301215.jar -7fdfdc046000-7fdfdc04a000 r--s 00013000 08:08 2496532 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.osgi.services_3.4.0.v20140312-2051.jar -7fdfdc04a000-7fdfdc04c000 r--s 00012000 08:08 2496107 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar -7fdfdc04c000-7fdfdc04e000 r--s 0001b000 08:08 2500824 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.console_1.1.0.v20140131-1639.jar -7fdfdc04e000-7fdfdc050000 r--s 00017000 08:08 2501879 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.update.configurator_3.3.300.v20140518-1928.jar -7fdfdc050000-7fdfdc053000 r--s 0002d000 08:08 2502019 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.ds_1.4.200.v20131126-2331.jar -7fdfdc053000-7fdfdc056000 r--s 0000f000 08:08 2500905 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.ui.trace_1.0.201.v20140702-1807.jar -7fdfdc056000-7fdfdc058000 r--s 00015000 08:08 2496777 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.runtime.compatibility_3.2.200.v20140128-0851.jar -7fdfdc058000-7fdfdc061000 r--s 00055000 08:08 2501985 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.codehaus.groovy.eclipse.dsl_2.9.0.xx-201406301445-e44.jar -7fdfdc061000-7fdfdc064000 ---p 00000000 00:00 0 -7fdfdc064000-7fdfdc162000 rw-p 00000000 00:00 0 [stack:8496] -7fdfdc162000-7fdfdc165000 ---p 00000000 00:00 0 -7fdfdc165000-7fdfdc263000 rw-p 00000000 00:00 0 [stack:8495] -7fdfdc263000-7fdfdc266000 ---p 00000000 00:00 0 -7fdfdc266000-7fdfdc364000 rw-p 00000000 00:00 0 [stack:8494] -7fdfdc364000-7fdfdc367000 ---p 00000000 00:00 0 -7fdfdc367000-7fdfdc465000 rw-p 00000000 00:00 0 [stack:8491] -7fdfdc465000-7fdfdc468000 ---p 00000000 00:00 0 -7fdfdc468000-7fdfdc566000 rw-p 00000000 00:00 0 [stack:8490] -7fdfdc566000-7fdfdc569000 ---p 00000000 00:00 0 -7fdfdc569000-7fdfdc667000 rw-p 00000000 00:00 0 [stack:8487] -7fdfdc667000-7fdfdc66b000 r-xp 00000000 08:06 689619 /usr/java/jdk1.8.0_77/jre/lib/amd64/libdt_socket.so -7fdfdc66b000-7fdfdc86a000 ---p 00004000 08:06 689619 /usr/java/jdk1.8.0_77/jre/lib/amd64/libdt_socket.so -7fdfdc86a000-7fdfdc86b000 rw-p 00003000 08:06 689619 /usr/java/jdk1.8.0_77/jre/lib/amd64/libdt_socket.so -7fdfdc86b000-7fdfdc86e000 ---p 00000000 00:00 0 -7fdfdc86e000-7fdfdc96c000 rw-p 00000000 00:00 0 [stack:8485] -7fdfdc96c000-7fdfdc96f000 ---p 00000000 00:00 0 -7fdfdc96f000-7fdfdca6d000 rw-p 00000000 00:00 0 [stack:8484] -7fdfdca6d000-7fdfdca70000 ---p 00000000 00:00 0 -7fdfdca70000-7fdfdcb6e000 rw-p 00000000 00:00 0 [stack:8483] -7fdfdcb6e000-7fdfdcb6f000 ---p 00000000 00:00 0 -7fdfdcb6f000-7fdfe253c000 rw-p 00000000 00:00 0 [stack:8482] -7fdfe253c000-7fdfe321c000 rwxp 00000000 00:00 0 -7fdfe321c000-7fdff153c000 ---p 00000000 00:00 0 -7fdff153c000-7fdff8000000 r--p 00000000 08:06 19699 /usr/lib/locale/locale-archive -7fdff8000000-7fdff8ade000 rw-p 00000000 00:00 0 -7fdff8ade000-7fdffc000000 ---p 00000000 00:00 0 -7fdffc000000-7fdffc001000 r--s 0000e000 08:08 2501988 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.apache.felix.gogo.shell_0.10.0.v201212101605.jar -7fdffc001000-7fdffc003000 r--s 00007000 08:08 2496815 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.slf4j.api_1.7.2.v20121108-1250.jar -7fdffc003000-7fdffc004000 r--s 00007000 08:08 2501755 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.event_1.3.100.v20140115-1647.jar -7fdffc004000-7fdffc007000 r--s 00013000 08:08 2502046 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.app_1.3.200.v20130910-1609.jar -7fdffc007000-7fdffc009000 r--s 00016000 08:08 2500915 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.jobs_3.6.1.v20141014-1248.jar -7fdffc009000-7fdffc00d000 r--s 0001c000 08:08 2500857 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.preferences_3.5.200.v20140224-1527.jar -7fdffc00d000-7fdffc00f000 r--s 00015000 08:08 2501833 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.contenttype_3.4.200.v20140207-1251.jar -7fdffc00f000-7fdffc013000 r--s 00029000 08:08 2496817 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.registry_3.5.400.v20140428-1507.jar -7fdffc013000-7fdffc016000 r--s 00018000 08:08 2496242 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar -7fdffc016000-7fdffc01b000 r--s 00011000 08:08 2501309 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.w3c.dom.svg_1.1.0.v201011041433.jar -7fdffc01b000-7fdffc01c000 r--s 00003000 08:08 2496761 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.w3c.dom.smil_1.0.0.v200806040011.jar -7fdffc01c000-7fdffc021000 r--s 00037000 08:08 2501950 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.sat4j.pb_2.3.5.v201404071733.jar -7fdffc021000-7fdffc027000 r--s 00053000 08:08 2501972 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.sat4j.core_2.3.5.v201308161310.jar -7fdffc027000-7fdffc028000 r--s 00001000 08:08 3540723 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/jsch.agentproxy.usocket-nc.jar -7fdffc028000-7fdffc029000 r--s 00001000 08:08 3540722 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/jsch.agentproxy.usocket-jna.jar -7fdffc029000-7fdffc02a000 r--s 00000000 08:08 3540721 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/jsch.agentproxy.svnkit-trilead-ssh2.jar -7fdffc02a000-7fdffc02c000 r--s 00000000 08:08 3540720 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/jsch.agentproxy.sshagent.jar -7fdffc02c000-7fdffc02e000 r--s 00001000 08:08 3540718 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/jsch.agentproxy.core.jar -7fdffc02e000-7fdffc02f000 r--s 00002000 08:08 3540717 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/jsch.agentproxy.connector-factory.jar -7fdffc02f000-7fdffc033000 r--s 00025000 08:08 3540715 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/antlr-runtime.jar -7fdffc033000-7fdffc037000 r--s 000dc000 08:08 3540714 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/jna.jar -7fdffc037000-7fdffc03a000 r--s 0000f000 08:08 3540711 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/sequence.jar -7fdffc03a000-7fdffc03d000 r--s 00621000 08:08 2501340 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.polarion.eclipse.team.svn.connector.svnkit18_4.1.3.I20150214-1700.jar -7fdffc03d000-7fdffc03f000 r--s 00000000 08:08 2501264 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.polarion.eclipse.team.svn.connector_4.1.3.I20150214-1700.jar -7fdffc03f000-7fdffc043000 r--s 00019000 08:08 274948 /home/zerwan/Work/git/moliz/org.modelexecution.fumldebug/lib/aspectjrt.jar -7fdffc043000-7fdffc045000 r--s 0000c000 08:08 2501108 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.hamcrest.core_1.3.0.v201303031735.jar -7fdffc045000-7fdffc050000 r--s 0021a000 08:06 689673 /usr/java/jdk1.8.0_77/jre/lib/ext/localedata.jar -7fdffc050000-7fdffc072000 r--s 0038e000 08:06 689800 /usr/java/jdk1.8.0_77/jre/lib/ext/cldrdata.jar -7fdffc072000-7fdffc145000 rw-p 00000000 00:00 0 -7fdffc145000-7fdffc31d000 r--s 03cd6000 08:06 689685 /usr/java/jdk1.8.0_77/jre/lib/rt.jar -7fdffc31d000-7fdffc393000 rw-p 00000000 00:00 0 -7fdffc393000-7fdffc394000 ---p 00000000 00:00 0 -7fdffc394000-7fdffc494000 rw-p 00000000 00:00 0 [stack:8481] -7fdffc494000-7fdffc495000 ---p 00000000 00:00 0 -7fdffc495000-7fdffc595000 rw-p 00000000 00:00 0 [stack:8480] -7fdffc595000-7fdffc596000 ---p 00000000 00:00 0 -7fdffc596000-7fdffc696000 rw-p 00000000 00:00 0 [stack:8479] -7fdffc696000-7fdffc697000 ---p 00000000 00:00 0 -7fdffc697000-7fdffc7d4000 rw-p 00000000 00:00 0 [stack:8478] -7fdffc7d4000-7fdffca2b000 ---p 00000000 00:00 0 -7fdffca2b000-7fdffca68000 rw-p 00000000 00:00 0 -7fdffca68000-7fdffccbf000 ---p 00000000 00:00 0 -7fdffccbf000-7fdffce09000 rw-p 00000000 00:00 0 -7fdffce09000-7fdffce3e000 rw-p 00000000 00:00 0 -7fdffce3e000-7fdffd1ca000 ---p 00000000 00:00 0 -7fdffd1ca000-7fdffd1e4000 r-xp 00000000 08:06 689666 /usr/java/jdk1.8.0_77/jre/lib/amd64/libzip.so -7fdffd1e4000-7fdffd3e4000 ---p 0001a000 08:06 689666 /usr/java/jdk1.8.0_77/jre/lib/amd64/libzip.so -7fdffd3e4000-7fdffd3e5000 rw-p 0001a000 08:06 689666 /usr/java/jdk1.8.0_77/jre/lib/amd64/libzip.so -7fdffd3e5000-7fdffd3f0000 r-xp 00000000 08:06 28312 /usr/lib64/libnss_files-2.22.so -7fdffd3f0000-7fdffd5ef000 ---p 0000b000 08:06 28312 /usr/lib64/libnss_files-2.22.so -7fdffd5ef000-7fdffd5f0000 r--p 0000a000 08:06 28312 /usr/lib64/libnss_files-2.22.so -7fdffd5f0000-7fdffd5f1000 rw-p 0000b000 08:06 28312 /usr/lib64/libnss_files-2.22.so -7fdffd5f1000-7fdffd5f7000 rw-p 00000000 00:00 0 -7fdffd5f7000-7fdffd5f9000 r-xp 00000000 08:06 689654 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnpt.so -7fdffd5f9000-7fdffd7f9000 ---p 00002000 08:06 689654 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnpt.so -7fdffd7f9000-7fdffd7fa000 rw-p 00002000 08:06 689654 /usr/java/jdk1.8.0_77/jre/lib/amd64/libnpt.so -7fdffd7fa000-7fdffd833000 r-xp 00000000 08:06 689638 /usr/java/jdk1.8.0_77/jre/lib/amd64/libjdwp.so -7fdffd833000-7fdffda32000 ---p 00039000 08:06 689638 /usr/java/jdk1.8.0_77/jre/lib/amd64/libjdwp.so -7fdffda32000-7fdffda34000 rw-p 00038000 08:06 689638 /usr/java/jdk1.8.0_77/jre/lib/amd64/libjdwp.so -7fdffda34000-7fdffda5e000 r-xp 00000000 08:06 689630 /usr/java/jdk1.8.0_77/jre/lib/amd64/libjava.so -7fdffda5e000-7fdffdc5e000 ---p 0002a000 08:06 689630 /usr/java/jdk1.8.0_77/jre/lib/amd64/libjava.so -7fdffdc5e000-7fdffdc60000 rw-p 0002a000 08:06 689630 /usr/java/jdk1.8.0_77/jre/lib/amd64/libjava.so -7fdffdc60000-7fdffdc6d000 r-xp 00000000 08:06 689665 /usr/java/jdk1.8.0_77/jre/lib/amd64/libverify.so -7fdffdc6d000-7fdffde6d000 ---p 0000d000 08:06 689665 /usr/java/jdk1.8.0_77/jre/lib/amd64/libverify.so -7fdffde6d000-7fdffde6f000 rw-p 0000d000 08:06 689665 /usr/java/jdk1.8.0_77/jre/lib/amd64/libverify.so -7fdffde6f000-7fdffde76000 r-xp 00000000 08:06 28360 /usr/lib64/librt-2.22.so -7fdffde76000-7fdffe075000 ---p 00007000 08:06 28360 /usr/lib64/librt-2.22.so -7fdffe075000-7fdffe076000 r--p 00006000 08:06 28360 /usr/lib64/librt-2.22.so -7fdffe076000-7fdffe077000 rw-p 00007000 08:06 28360 /usr/lib64/librt-2.22.so -7fdffe077000-7fdffe178000 r-xp 00000000 08:06 26141 /usr/lib64/libm-2.22.so -7fdffe178000-7fdffe377000 ---p 00101000 08:06 26141 /usr/lib64/libm-2.22.so -7fdffe377000-7fdffe378000 r--p 00100000 08:06 26141 /usr/lib64/libm-2.22.so -7fdffe378000-7fdffe379000 rw-p 00101000 08:06 26141 /usr/lib64/libm-2.22.so -7fdffe379000-7fdfff038000 r-xp 00000000 08:06 689670 /usr/java/jdk1.8.0_77/jre/lib/amd64/server/libjvm.so -7fdfff038000-7fdfff237000 ---p 00cbf000 08:06 689670 /usr/java/jdk1.8.0_77/jre/lib/amd64/server/libjvm.so -7fdfff237000-7fdfff310000 rw-p 00cbe000 08:06 689670 /usr/java/jdk1.8.0_77/jre/lib/amd64/server/libjvm.so -7fdfff310000-7fdfff359000 rw-p 00000000 00:00 0 -7fdfff359000-7fdfff510000 r-xp 00000000 08:06 24388 /usr/lib64/libc-2.22.so -7fdfff510000-7fdfff710000 ---p 001b7000 08:06 24388 /usr/lib64/libc-2.22.so -7fdfff710000-7fdfff714000 r--p 001b7000 08:06 24388 /usr/lib64/libc-2.22.so -7fdfff714000-7fdfff716000 rw-p 001bb000 08:06 24388 /usr/lib64/libc-2.22.so -7fdfff716000-7fdfff71a000 rw-p 00000000 00:00 0 -7fdfff71a000-7fdfff71d000 r-xp 00000000 08:06 25765 /usr/lib64/libdl-2.22.so -7fdfff71d000-7fdfff91c000 ---p 00003000 08:06 25765 /usr/lib64/libdl-2.22.so -7fdfff91c000-7fdfff91d000 r--p 00002000 08:06 25765 /usr/lib64/libdl-2.22.so -7fdfff91d000-7fdfff91e000 rw-p 00003000 08:06 25765 /usr/lib64/libdl-2.22.so -7fdfff91e000-7fdfff933000 r-xp 00000000 08:06 689943 /usr/java/jdk1.8.0_77/lib/amd64/jli/libjli.so -7fdfff933000-7fdfffb33000 ---p 00015000 08:06 689943 /usr/java/jdk1.8.0_77/lib/amd64/jli/libjli.so -7fdfffb33000-7fdfffb34000 rw-p 00015000 08:06 689943 /usr/java/jdk1.8.0_77/lib/amd64/jli/libjli.so -7fdfffb34000-7fdfffb4c000 r-xp 00000000 08:06 22942 /usr/lib64/libpthread-2.22.so -7fdfffb4c000-7fdfffd4b000 ---p 00018000 08:06 22942 /usr/lib64/libpthread-2.22.so -7fdfffd4b000-7fdfffd4c000 r--p 00017000 08:06 22942 /usr/lib64/libpthread-2.22.so -7fdfffd4c000-7fdfffd4d000 rw-p 00018000 08:06 22942 /usr/lib64/libpthread-2.22.so -7fdfffd4d000-7fdfffd51000 rw-p 00000000 00:00 0 -7fdfffd51000-7fdfffd72000 r-xp 00000000 08:06 19680 /usr/lib64/ld-2.22.so -7fdfffd72000-7fdfffd74000 r--s 00002000 08:08 2896216 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/runtime_registry_compatibility.jar -7fdfffd74000-7fdfffd75000 r--s 00001000 08:08 3540719 /home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.osgi/871/0/.cp/lib/jsch.agentproxy.pageant.jar -7fdfffd75000-7fdfffd76000 r--s 00009000 08:08 2496244 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.objectweb.asm.tree_5.0.1.v201404251740.jar -7fdfffd76000-7fdfffe41000 rw-p 00000000 00:00 0 -7fdfffe41000-7fdfffe44000 ---p 00000000 00:00 0 -7fdfffe44000-7fdffff46000 rw-p 00000000 00:00 0 [stack:8477] -7fdffff46000-7fdffff48000 r--s 006bd000 08:08 2501085 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.gemoc.gemoc_language_workbench.sample.deployer_0.1.0.201603221014.jar -7fdffff48000-7fdffff49000 r--s 0000f000 08:08 2496282 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.objectweb.asm_5.0.1.v201404251740.jar -7fdffff49000-7fdffff5d000 r--s 00121000 08:08 2500779 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.osgi_3.10.2.v20150203-1939.jar -7fdffff5d000-7fdffff5f000 r--s 0001a000 08:06 689852 /usr/java/jdk1.8.0_77/jre/lib/jce.jar -7fdffff5f000-7fdffff64000 r--s 00096000 08:06 689923 /usr/java/jdk1.8.0_77/jre/lib/jsse.jar -7fdffff64000-7fdffff66000 r--s 0000b000 08:08 2501088 /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -7fdffff66000-7fdffff6e000 rw-s 00000000 00:25 257731 /tmp/hsperfdata_zerwan/8464 -7fdffff6e000-7fdffff6f000 rw-p 00000000 00:00 0 -7fdffff6f000-7fdffff70000 r--p 00000000 00:00 0 -7fdffff70000-7fdffff71000 rw-p 00000000 00:00 0 -7fdffff71000-7fdffff72000 r--p 00020000 08:06 19680 /usr/lib64/ld-2.22.so -7fdffff72000-7fdffff73000 rw-p 00021000 08:06 19680 /usr/lib64/ld-2.22.so -7fdffff73000-7fdffff74000 rw-p 00000000 00:00 0 -7ffd9104a000-7ffd9106b000 rw-p 00000000 00:00 0 [stack] -7ffd910da000-7ffd910dc000 r--p 00000000 00:00 0 [vvar] -7ffd910dc000-7ffd910de000 r-xp 00000000 00:00 0 [vdso] -ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] - -VM Arguments: -jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:39609 -Declipse.pde.launch=true -Declipse.p2.data.area=@config.dir/p2 -Dfile.encoding=UTF-8 -java_command: org.eclipse.equinox.launcher.Main -os linux -ws gtk -arch x86_64 -nl fr_FR -consoleLog -version 3 -port 38527 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -test fr.inria.diverse.trace.metamodel.test.TraceMMGeneratorTest:testModel1 -application org.eclipse.pde.junit.runtime.coretestapplication -data /home/zerwan/Work/dev/ws-studio3/../junit-workspace -configuration file:/home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/ -dev file:/home/zerwan/Work/dev/ws-studio3/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties -os linux -ws gtk -arch x86_64 -nl fr_FR -consoleLog -testpluginname fr.inria.diverse.trace.metamodel.generator.test -java_class_path (initial): /home/zerwan/Work/Applications/gemoc_studio-linux.gtk.x86_64/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -Launcher Type: SUN_STANDARD - -Environment Variables: -PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin -USERNAME=zerwan -SHELL=/bin/zsh -DISPLAY=:1 - -Signal Handlers: -SIGSEGV: [libjvm.so+0xabb070], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGBUS: [libjvm.so+0xabb070], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGFPE: [libjvm.so+0x918480], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGPIPE: [libjvm.so+0x918480], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGXFSZ: [libjvm.so+0x918480], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGILL: [libjvm.so+0x918480], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none -SIGUSR2: [libjvm.so+0x919ab0], sa_mask[0]=00100000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO -SIGHUP: [libjvm.so+0x91aeb0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGINT: [libjvm.so+0x91aeb0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGTERM: [libjvm.so+0x91aeb0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO -SIGQUIT: [libjvm.so+0x91aeb0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO - - ---------------- S Y S T E M --------------- - -OS:Fedora release 23 (Twenty Three) - -uname:Linux 4.4.6-300.fc23.x86_64 #1 SMP Wed Mar 16 22:10:37 UTC 2016 x86_64 -libc:glibc 2.22 NPTL 2.22 -rlimit: STACK 8192k, CORE 0k, NPROC 31593, NOFILE 4096, AS infinity -load average:0,39 0,92 1,00 - -/proc/meminfo: -MemTotal: 8107124 kB -MemFree: 599776 kB -MemAvailable: 1363176 kB -Buffers: 76564 kB -Cached: 661592 kB -SwapCached: 5040 kB -Active: 5773388 kB -Inactive: 1315872 kB -Active(anon): 5166844 kB -Inactive(anon): 1238728 kB -Active(file): 606544 kB -Inactive(file): 77144 kB -Unevictable: 64 kB -Mlocked: 64 kB -SwapTotal: 10239996 kB -SwapFree: 9981768 kB -Dirty: 836 kB -Writeback: 0 kB -AnonPages: 6346712 kB -Mapped: 369124 kB -Shmem: 54152 kB -Slab: 196816 kB -SReclaimable: 122096 kB -SUnreclaim: 74720 kB -KernelStack: 13744 kB -PageTables: 70220 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -WritebackTmp: 0 kB -CommitLimit: 14293556 kB -Committed_AS: 12781420 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 0 kB -VmallocChunk: 0 kB -HardwareCorrupted: 0 kB -AnonHugePages: 0 kB -CmaTotal: 0 kB -CmaFree: 0 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -HugePages_Surp: 0 -Hugepagesize: 2048 kB -DirectMap4k: 377672 kB -DirectMap2M: 7942144 kB - - -CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, tsc, tscinvbit, tscinv - -/proc/cpuinfo: -processor : 0 -vendor_id : GenuineIntel -cpu family : 6 -model : 58 -model name : Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz -stepping : 9 -microcode : 0x1c -cpu MHz : 3599.882 -cache size : 6144 KB -physical id : 0 -siblings : 4 -core id : 0 -cpu cores : 4 -apicid : 0 -initial apicid : 0 -fpu : yes -fpu_exception : yes -cpuid level : 13 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt -bugs : -bogomips : 6799.97 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 1 -vendor_id : GenuineIntel -cpu family : 6 -model : 58 -model name : Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz -stepping : 9 -microcode : 0x1c -cpu MHz : 3599.882 -cache size : 6144 KB -physical id : 0 -siblings : 4 -core id : 1 -cpu cores : 4 -apicid : 2 -initial apicid : 2 -fpu : yes -fpu_exception : yes -cpuid level : 13 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt -bugs : -bogomips : 6799.97 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 2 -vendor_id : GenuineIntel -cpu family : 6 -model : 58 -model name : Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz -stepping : 9 -microcode : 0x1c -cpu MHz : 3599.882 -cache size : 6144 KB -physical id : 0 -siblings : 4 -core id : 2 -cpu cores : 4 -apicid : 4 -initial apicid : 4 -fpu : yes -fpu_exception : yes -cpuid level : 13 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt -bugs : -bogomips : 6799.97 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 3 -vendor_id : GenuineIntel -cpu family : 6 -model : 58 -model name : Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz -stepping : 9 -microcode : 0x1c -cpu MHz : 3599.882 -cache size : 6144 KB -physical id : 0 -siblings : 4 -core id : 3 -cpu cores : 4 -apicid : 6 -initial apicid : 6 -fpu : yes -fpu_exception : yes -cpuid level : 13 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt -bugs : -bogomips : 6799.97 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - - - -Memory: 4k page, physical 8107124k(599776k free), swap 10239996k(9981768k free) - -vm_info: Java HotSpot(TM) 64-Bit Server VM (25.77-b03) for linux-amd64 JRE (1.8.0_77-b03), built on Mar 20 2016 22:00:46 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8) - -time: Tue Apr 5 15:58:49 2016 -elapsed time: 451 seconds (0d 0h 7m 31s) -