diff --git a/.project b/.project new file mode 100644 index 000000000..a3725806c --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + ModelDebugging + + + + + + + + diff --git a/.travis.yml b/.travis.yml index 476c86dd7..c66893a9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,15 +8,25 @@ env: - MAVEN_OPTS="-Xmx2g" jdk: - oraclejdk8 -before_install: echo "MAVEN_OPTS='-Xmx2048m -XX:MaxPermSize=512m'" > ~/.mavenrc +cache: + directories: + - $HOME/.m2 +before_install: + - echo "MAVEN_OPTS='-Xmx2048m -XX:MaxPermSize=512m'" > ~/.mavenrc + - git clone https://github.com/gemoc/gemoc-studio.git ${TRAVIS_BUILD_DIR}/../gemoc-studio install: -- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -P use_CI_repositories,modelanimation,trace_and_framework,java_execution +- +before_script: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + - sleep 3 # give xvfb some time to start script: +- # Build update-site -- mvn -P use_CI_repositories,modelanimation,trace_and_framework,java_execution clean verify +- travis_retry mvn -P use_CI_repositories,modelanimation,trace_and_framework,java_execution,repository verify -Dmaven.test.failure.ignore=true # Rename the zipped update site to nightly -- mv simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/target/fr.obeo.dsl.debug.repository-*-SNAPSHOT.zip - simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/target/fr.obeo.dsl.debug.repository-nightly.zip +- mv releng/org.eclipse.gemoc.modeldebugging.repository/target/org.eclipse.gemoc.modeldebugging.repository-*-SNAPSHOT.zip + releng/org.eclipse.gemoc.modeldebugging.repository/target/org.eclipse.gemoc.modeldebugging.repository-nightly.zip # Prepare local dirs to deploy: copy repository - chmod a+x prepare-deploy-local-dir.sh - ./prepare-deploy-local-dir.sh $TRAVIS_BUILD_DIR/simulationmodelanimation/nightly diff --git a/dev/fr.obeo.dsl.dev/codestyle/GemocCheckstyle6Configuration-Light.xml b/dev/fr.obeo.dsl.dev/codestyle/GemocCheckstyle6Configuration-Light.xml new file mode 100644 index 000000000..acb48e1e5 --- /dev/null +++ b/dev/fr.obeo.dsl.dev/codestyle/GemocCheckstyle6Configuration-Light.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/.classpath similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.classpath rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/.classpath diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/.project new file mode 100644 index 000000000..62df3190e --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.executionframework.debugger.ui + + + + + + 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.gemoc.executionframework.engine.ui/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.settings/org.eclipse.jdt.core.prefs rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/META-INF/MANIFEST.MF new file mode 100644 index 000000000..2b0b84673 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/META-INF/MANIFEST.MF @@ -0,0 +1,33 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.executionframework.debugger.ui +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.debugger.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-Activator: org.eclipse.gemoc.executionframework.debugger.ui.Activator +Export-Package: org.eclipse.gemoc.executionframework.debugger.ui;uses:="org.eclipse.gemoc.xdsmlframework.api.core,org.eclipse.core.commands,org.eclipse.jface.viewers", + org.eclipse.gemoc.executionframework.debugger.ui.breakpoints +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.core.commands, + org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.jface, + org.eclipse.debug.core, + org.eclipse.gemoc.dsl.debug.ide, + org.eclipse.core.runtime;bundle-version="3.12.0", + org.eclipse.gemoc.executionframework.engine, + org.eclipse.gemoc.commons.eclipse.ui, + org.eclipse.equinox.registry, + org.eclipse.ui.workbench, + org.eclipse.xtext;bundle-version="2.10.0", + org.eclipse.gemoc.executionframework.debugger;bundle-version="1.0.0", + org.eclipse.gemoc.dsl.debug.ide.sirius.ui, + org.eclipse.gemoc.executionframework.engine.ui, + fr.inria.diverse.melange.resource, + org.eclipse.gemoc.dsl.debug.ide.ui;bundle-version="2.3.0", + org.eclipse.sirius;bundle-version="4.1.3", + org.eclipse.debug.ui +Bundle-ActivationPolicy: lazy + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/build.properties new file mode 100644 index 000000000..804c6065d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml 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 new file mode 100644 index 000000000..ce4df2d84 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/plugin.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/pom.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/pom.xml new file mode 100644 index 000000000..54307b10f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/pom.xml @@ -0,0 +1,64 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.executionframework + org.gemoc.modeldebugging.executionframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.executionframework.debugger.ui + 2.3.0-SNAPSHOT + eclipse-plugin + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/Activator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/Activator.java new file mode 100644 index 000000000..886949bd3 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/Activator.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +//import org.gemoc.gemoc_language_workbench.extensions.sirius.services.AbstractGemocDebuggerServices; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.executionframework.debugger.ui"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + private OpenSemanticsHandler handler; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + // AbstractGemocDebuggerServices.LISTENER.uninstall(); + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given plug-in + * relative path + * + * @param path + * the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + public static void warn(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); + } + + public static void error(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); + } + + public OpenSemanticsHandler getHandler() { + return handler; + } + + void setHandler(OpenSemanticsHandler handler) { + this.handler = handler; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/MutableFieldNameProvider.xtend b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/MutableFieldNameProvider.xtend new file mode 100644 index 000000000..ea8d0bcff --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/MutableFieldNameProvider.xtend @@ -0,0 +1,25 @@ +/******************************************************************************* + * 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 + +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.gemoc.executionframework.debugger.MutableField + +public class MutableFieldNameProvider extends DefaultDeclarativeQualifiedNameProvider{ + + def QualifiedName qualifiedName(MutableField e) { + var qnameSegments = this.getFullyQualifiedName(e.geteObject).segments + qnameSegments.add(e.mutableProperty.name) + return QualifiedName.create(qnameSegments); + } + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/semanticsopener/OpenSemanticsHandler.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/OpenSemanticsHandler.java similarity index 80% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/semanticsopener/OpenSemanticsHandler.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/OpenSemanticsHandler.java index 9af56fcf5..ea756cf2c 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/semanticsopener/OpenSemanticsHandler.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/OpenSemanticsHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.debug.semanticsopener; +package org.eclipse.gemoc.executionframework.debugger.ui; import java.io.File; import java.io.IOException; @@ -16,6 +16,7 @@ import java.util.Arrays; import java.util.LinkedList; import java.util.List; +import java.util.function.Supplier; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; @@ -26,13 +27,12 @@ import org.eclipse.jface.viewers.TreePath; import org.eclipse.jface.viewers.TreeSelection; import org.eclipse.ui.handlers.HandlerUtil; -import org.gemoc.commons.eclipse.ui.OpenEditor; -import org.gemoc.executionframework.engine.core.AbstractExecutionEngine; -import org.gemoc.executionframework.engine.ui.Activator; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.commons.eclipse.ui.OpenEditor; +import org.eclipse.gemoc.executionframework.engine.core.AbstractExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; import org.osgi.framework.Bundle; -import fr.obeo.dsl.debug.ide.adapter.DSLThreadAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLThreadAdapter; public class OpenSemanticsHandler extends AbstractHandler { @@ -102,6 +102,15 @@ public void locateAndOpenSource(TreeSelection selection) { } public Object execute(ExecutionEvent event) throws ExecutionException { + Supplier engineSupplier = org.eclipse.gemoc.executionframework.debugger.Activator.getDefault().getEngineSupplier(); + Supplier bundleSupplier = org.eclipse.gemoc.executionframework.debugger.Activator.getDefault().getBundleSymbolicNameSupplier(); + if (engineSupplier != null) { + this.engine = engineSupplier.get(); + } + if (bundleSupplier != null) { + this.bundleSymbolicName = bundleSupplier.get(); + } + TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event); locateAndOpenSource(selection); return null; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/BreakpointDetailPaneFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/BreakpointDetailPaneFactory.java similarity index 90% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/BreakpointDetailPaneFactory.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/BreakpointDetailPaneFactory.java index 8a13af5bc..2b37b811a 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/BreakpointDetailPaneFactory.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/BreakpointDetailPaneFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.debug.breakpoint; +package org.eclipse.gemoc.executionframework.debugger.ui.breakpoints; import java.util.HashSet; import java.util.Set; @@ -17,8 +17,9 @@ import org.eclipse.debug.ui.IDetailPane; import org.eclipse.debug.ui.IDetailPaneFactory; import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.gemoc.executionframework.debugger.GemocBreakpoint; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; /** * The {@link IDetailPaneFactory} creating {@link GemocBreakpointDetailPane}. diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/GemocBreakpointDetailPane.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocBreakpointDetailPane.java similarity index 94% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/GemocBreakpointDetailPane.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocBreakpointDetailPane.java index 132a7cc1e..7790a3082 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/GemocBreakpointDetailPane.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocBreakpointDetailPane.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.debug.breakpoint; +package org.eclipse.gemoc.executionframework.debugger.ui.breakpoints; import org.eclipse.debug.ui.IDetailPane; import org.eclipse.jface.viewers.IStructuredSelection; @@ -19,6 +19,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IWorkbenchPartSite; +import org.eclipse.gemoc.executionframework.debugger.GemocBreakpoint; /** * Gemoc {@link IDetailPane} for breakpoints. diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocToggleBreakpointAction.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocToggleBreakpointAction.java new file mode 100644 index 000000000..2fde27fa2 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger.ui/src/org/eclipse/gemoc/executionframework/debugger/ui/breakpoints/GemocToggleBreakpointAction.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +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 dvojtise + * + */ +public class GemocToggleBreakpointAction extends AbstractToggleBreakpointAction { + + @Override + protected String getModelIdentifier() { + return AbstractGemocLauncher.MODEL_ID; + } + + @Override + protected DSLToggleBreakpointsUtils createToggleBreakpointsUtils() { + return new DSLToggleBreakpointsUtils(getModelIdentifier()){ + + @Override + protected DSLBreakpoint createBreakpoint(Object selected, + EObject instruction) throws CoreException { + final Resource res = ((EObject)instruction).eResource(); + final ResourceSet resSet = res.getResourceSet(); + final MelangeResource mr = resSet.getResources().stream().filter(r -> { + return r instanceof MelangeResource; + }).map(r -> (MelangeResource)r).findFirst().orElse(null); + if (mr != null) { + final String fragmentURI = res.getURIFragment(instruction); + instruction = mr.getWrappedResource().getEObject(fragmentURI); + } + return new GemocBreakpoint(identifier, instruction, true); + } + + }; + } + +} diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/.classpath similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/.classpath rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/.classpath diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/.project new file mode 100644 index 000000000..b6e852ca4 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.executionframework.debugger + + + + + + 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.gemoc.executionframework.extensions.sirius/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/.settings/org.eclipse.jdt.core.prefs rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/META-INF/MANIFEST.MF new file mode 100644 index 000000000..2b8b85ad8 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/META-INF/MANIFEST.MF @@ -0,0 +1,31 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.executionframework.debugger +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.debugger;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-Activator: org.eclipse.gemoc.executionframework.debugger.Activator +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.gemoc.dsl.debug.ide, + org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.emf.ecore, + org.eclipse.gemoc.trace.commons.model, + org.eclipse.ui.workbench, + org.eclipse.swt;bundle-version="3.105.3", + org.eclipse.jface;bundle-version="3.12.2", + org.eclipse.debug.ui, + org.eclipse.gemoc.dsl.debug;bundle-version="2.3.0", + org.eclipse.core.runtime;bundle-version="3.12.0", + org.eclipse.gemoc.executionframework.engine;bundle-version="2.3.0", + org.eclipse.emf.transaction;bundle-version="1.9.0", + org.eclipse.gemoc.xdsmlframework.commons;bundle-version="2.3.0", + org.eclipse.xtext;bundle-version="2.10.0", + org.eclipse.gemoc.commons.eclipse;bundle-version="2.3.0", + org.eclipse.gemoc.commons.eclipse.pde;bundle-version="2.3.0", + org.eclipse.gemoc.commons.eclipse.messagingsystem.api;bundle-version="1.0.0" +Export-Package: org.eclipse.gemoc.executionframework.debugger +Bundle-ActivationPolicy: lazy + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/build.properties new file mode 100644 index 000000000..2bea6db63 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/pom.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/pom.xml new file mode 100644 index 000000000..6fd21ca53 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/pom.xml @@ -0,0 +1,64 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.executionframework + org.gemoc.modeldebugging.executionframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.executionframework.debugger + 2.3.0-SNAPSHOT + eclipse-plugin + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AbstractGemocDebugger.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebugger.java similarity index 88% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AbstractGemocDebugger.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebugger.java index 5894f447d..864819f00 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AbstractGemocDebugger.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebugger.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,13 +8,15 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.debug; +package org.eclipse.gemoc.executionframework.debugger; +import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; +import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -44,22 +46,19 @@ import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PlatformUI; -import org.gemoc.executionframework.engine.ui.Activator; -import org.gemoc.executionframework.engine.ui.debug.semanticsopener.OpenSemanticsHandler; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.core.IExecutionContext; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -import org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.FieldChange; -import org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.IModelChangeListenerAddon; -import org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.SimpleModelChangeListenerAddon; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.ide.AbstractDSLDebugger; -import fr.obeo.dsl.debug.ide.adapter.DSLStackFrameAdapter; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; +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 org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.FieldChange; +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 { @@ -103,15 +102,8 @@ public AbstractGemocDebugger(IDSLDebugEventProcessor target, IExecutionEngine en registerModelChangeListener(); Activator openSourceActivator = Activator.getDefault(); - if (openSourceActivator != null) { - OpenSemanticsHandler openSourceHandler = openSourceActivator.getHandler(); - if (openSourceHandler != null) { - openSourceHandler.setBundleSymbolicName(bundleSymbolicName); - openSourceHandler.setEngine(this.engine); - } else { - openSourceActivator.setHandlerFieldSuppliers(() -> this.engine, () -> this.bundleSymbolicName); - } - } + openSourceActivator.setHandlerFieldSuppliers(() -> this.engine, () -> this.bundleSymbolicName); + } protected void registerModelChangeListener() { @@ -199,7 +191,7 @@ private void initializeMutableDatas() { // We fetch all resources concerned by the execution, // since they may contain mutable fields Resource executedResource = executedModelRoot.eResource(); - Set allResources = org.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(executedResource); + Set allResources = org.eclipse.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(executedResource); allResources.add(executedResource); allResources.removeIf(r -> r == null); @@ -253,7 +245,7 @@ private boolean mutableDataChanged(MutableField mutableData, Object value) { } abstract protected void updateStack(String threadName, EObject instruction); - + protected void updateVariables(String threadName) { List changes = modelChangeListenerAddon.getChanges(this); for (FieldChange change : changes) { @@ -303,7 +295,11 @@ protected void updateVariables(String threadName) { String frameName = "Global context : " + executedModelRoot.eClass().getName(); for (MutableField m : changed) { variable(threadName, frameName, "mutable data", m.getName(), m.getValue(), true); - // m.getMutableProperty().eContainer(); + } + for (String name : stackFrameNames) { + for (MutableField m : changed) { + variable(threadName, name, "mutable data", m.getName(), m.getValue(), true); + } } if (!nextSuspendMutableFields.isEmpty()) { @@ -358,15 +354,24 @@ private Object getValue(MutableField data, String value) { return res; } + private Deque stackFrameNames = new ArrayDeque<>(); + @Override public void pushStackFrame(String threadName, String frameName, EObject context, EObject instruction) { super.pushStackFrame(threadName, frameName, context, instruction); + stackFrameNames.push(frameName); for (MutableField m : mutableFields) { - if (m.geteObject().eContainer() == context) { +// if (m.geteObject().eContainer() == context) { variable(threadName, frameName, "mutable data", m.getName(), m.getValue(), true); - } +// } } } + + @Override + public void popStackFrame(String threadName) { + super.popStackFrame(threadName); + stackFrameNames.pop(); + } @Override public Object getVariableValue(String threadName, String stackName, String variableName, String value) { @@ -426,6 +431,10 @@ private void selectLastStackframe() { () -> { 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); @@ -477,15 +486,15 @@ public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus) { } @Override - public void aboutToSelectStep(IExecutionEngine engine, Collection logicalSteps) { + public void aboutToSelectStep(IExecutionEngine engine, Collection> logicalSteps) { } @Override - public void proposedStepsChanged(IExecutionEngine engine, Collection logicalSteps) { + public void proposedStepsChanged(IExecutionEngine engine, Collection> logicalSteps) { } @Override - public void stepSelected(IExecutionEngine engine, Step selectedLogicalStep) { + public void stepSelected(IExecutionEngine engine, Step selectedLogicalStep) { } @Override diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebuggerFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebuggerFactory.java new file mode 100644 index 000000000..9f5abb73f --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AbstractGemocDebuggerFactory.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; + +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; + +public abstract class AbstractGemocDebuggerFactory { + + public AbstractGemocDebuggerFactory(){ + + } + + public abstract AbstractGemocDebugger createDebugger(IDSLDebugEventProcessor target, IExecutionEngine engine); +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/Activator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/Activator.java new file mode 100644 index 000000000..0c58758f1 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/Activator.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import java.util.function.Supplier; + +import org.eclipse.gemoc.commons.eclipse.logging.backends.DefaultLoggingBackend; +import org.eclipse.gemoc.commons.eclipse.pde.GemocPlugin; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.osgi.framework.BundleContext; + +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystemManager; +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystem; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends GemocPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.executionframework.debugger"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + private Supplier engineSupplier; + + private Supplier bundleSymbolicNameSupplier; + + public void setHandlerFieldSuppliers(Supplier engineSupplier, + Supplier bundleSymbolicNameSupplier) { + this.engineSupplier = engineSupplier; + this.bundleSymbolicNameSupplier = bundleSymbolicNameSupplier; + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return Activator.plugin; + } + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext ) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + Activator.plugin = this; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext ) + */ + @Override + public void stop(BundleContext context) throws Exception { + Activator.plugin = null; + super.stop(context); + } + + @Override + public String getId() { + return PLUGIN_ID; + } + + private DefaultLoggingBackend _loggingBackend; + + @Override + public DefaultLoggingBackend resolveLoggingBackend() { + if (_loggingBackend == null) { + _loggingBackend = new DefaultLoggingBackend(this); + MessagingSystemManager msm = new MessagingSystemManager(); + MessagingSystem ms = msm.createBestPlatformMessagingSystem(PLUGIN_ID, "Debugger"); + _loggingBackend.setMessagingSystem(ms); + } + return _loggingBackend; + } + + public Supplier getEngineSupplier() { + return engineSupplier; + } + + public Supplier getBundleSymbolicNameSupplier() { + return bundleSymbolicNameSupplier; + } + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AnnotationMutableFieldExtractor.xtend b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AnnotationMutableFieldExtractor.xtend new file mode 100644 index 000000000..974eb7e94 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/AnnotationMutableFieldExtractor.xtend @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 + +import java.text.DecimalFormat +import java.text.NumberFormat +import java.util.ArrayList +import java.util.HashMap +import java.util.List +import java.util.Map +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.transaction.RecordingCommand +import org.eclipse.emf.transaction.util.TransactionUtil +import org.eclipse.gemoc.executionframework.engine.core.CommandExecution +import org.eclipse.gemoc.xdsmlframework.commons.DynamicAnnotationHelper +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider + +class AnnotationMutableFieldExtractor implements IMutableFieldExtractor { + + private val Map counters = new HashMap + + private val org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider nameprovider = new DefaultDeclarativeQualifiedNameProvider() + + override extractMutableField(EObject eObject) { + + val List result = new ArrayList() + + val idProp = eObject.eClass.getEIDAttribute + val String objectName = if (idProp != null) { + val id = eObject.eGet(idProp); + if (id != null) { + val NumberFormat formatter = new DecimalFormat("00"); + val String idString = if(id instanceof Integer) formatter.format((id as Integer)) else id.toString; + eObject.eClass.name + "_" + idString // "returned" value + } else { + if (!counters.containsKey(eObject.eClass)) { + counters.put(eObject.eClass, 0) + } + val Integer counter = counters.get(eObject.eClass) + counters.put(eObject.eClass, counter + 1) + eObject.eClass.name + "_" + counter + } + + } else { + val qname = nameprovider.getFullyQualifiedName(eObject) + if(qname == null) + eObject.toString + else + qname.toString + } + + for (prop : eObject.eClass.getEAllStructuralFeatures) { + if (DynamicAnnotationHelper.isDynamic(prop)) { + val mut = new MutableField( + /* name */ prop.name+" ("+objectName+ " :"+eObject.eClass.getName +")", + /* eObject */ eObject, + /* mutProp */ prop, + /* getter */ [eObject.eGet(prop)], + /* setter */ [ o | + + val ed = TransactionUtil.getEditingDomain(eObject.eResource); + var RecordingCommand command = new RecordingCommand(ed, + "Setting value " + o + " in " + objectName +"."+prop.name+ " from the debugger") { + protected override void doExecute() { + eObject.eSet(prop, o) + } + }; + CommandExecution.execute(ed, command); + + ] + ) + result.add(mut) + + } + } + return result + } + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/GemocBreakpoint.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/GemocBreakpoint.java similarity index 92% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/GemocBreakpoint.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/GemocBreakpoint.java index 8804220ad..1cf6f31f1 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/breakpoint/GemocBreakpoint.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/GemocBreakpoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,16 +8,15 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.debug.breakpoint; +package org.eclipse.gemoc.executionframework.debugger; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; import org.eclipse.emf.ecore.EObject; -import org.gemoc.executionframework.engine.ui.Activator; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; public class GemocBreakpoint extends DSLBreakpoint { @@ -104,7 +103,7 @@ public void setBreakOnLogicalStep(boolean value) { try { getMarker().setAttribute(GemocBreakpoint.BREAK_ON_LOGICAL_STEP, String.valueOf(breakOnLogicalStep)); } catch (CoreException e) { - Activator.error(e.getMessage(), e); + Activator.getDefault().error(e.getMessage(), e); } } @@ -120,7 +119,7 @@ public void setBreakOnMSE(boolean value) { getMarker().setAttribute(GemocBreakpoint.BREAK_ON_MSE_OCCURRENCE, String.valueOf(breakOnMSE) ); } catch (CoreException e) { - Activator.error(e.getMessage(), e); + Activator.getDefault().error(e.getMessage(), e); } } diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IGemocDebugger.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IGemocDebugger.java new file mode 100644 index 000000000..495ced112 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IGemocDebugger.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import java.util.function.BiPredicate; + +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; + +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; + +public interface IGemocDebugger extends IEngineAddon { + + public abstract void addPredicateBreak(BiPredicate predicate); + + public abstract void addPredicateBreakpoint(BiPredicate predicate); + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IMutableFieldExtractor.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IMutableFieldExtractor.java similarity index 86% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IMutableFieldExtractor.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IMutableFieldExtractor.java index 4a6ff70b6..75390bb53 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IMutableFieldExtractor.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IMutableFieldExtractor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.debug; +package org.eclipse.gemoc.executionframework.debugger; import java.util.List; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IntrospectiveMutableFieldExtractor.xtend b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IntrospectiveMutableFieldExtractor.xtend similarity index 88% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IntrospectiveMutableFieldExtractor.xtend rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IntrospectiveMutableFieldExtractor.xtend index 5ed26cec3..faeaabd21 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IntrospectiveMutableFieldExtractor.xtend +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/IntrospectiveMutableFieldExtractor.xtend @@ -1,4 +1,14 @@ -package org.gemoc.executionframework.engine.ui.debug +/******************************************************************************* + * Copyright (c) 2016, 2017 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 import java.util.ArrayList import java.util.Arrays @@ -11,7 +21,7 @@ import java.util.Map import org.eclipse.emf.ecore.EClass import org.eclipse.emf.ecore.EObject import org.eclipse.emf.ecore.impl.EObjectImpl -import org.gemoc.executionframework.engine.commons.MelangeHelper +import org.eclipse.gemoc.executionframework.engine.commons.MelangeHelper class IntrospectiveMutableFieldExtractor implements IMutableFieldExtractor { @@ -23,11 +33,11 @@ class IntrospectiveMutableFieldExtractor implements IMutableFieldExtractor { this.languageName = languageName } - private def String capitalize(String string) { - val c = string.toCharArray() - c.set(0, Character.toUpperCase(c.get(0))) - return new String(c) - } +// private def String capitalize(String string) { +// val c = string.toCharArray() +// c.set(0, Character.toUpperCase(c.get(0))) +// return new String(c) +// } private def String decapitalize(String string) { val c = string.toCharArray() @@ -186,7 +196,7 @@ class IntrospectiveMutableFieldExtractor implements IMutableFieldExtractor { return res } - private def getAllInterfaces(Class cls, HashSet> interfacesFound) { + private def void getAllInterfaces(Class cls, HashSet> interfacesFound) { var currCls = cls; while (currCls != null) { currCls.getInterfaces().forEach [ i | @@ -233,4 +243,5 @@ class IntrospectiveMutableFieldExtractor implements IMutableFieldExtractor { return res } -} \ No newline at end of file +} + \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/MutableField.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/MutableField.java similarity index 94% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/MutableField.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/MutableField.java index 85b2973a6..00c3209a6 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/MutableField.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.debugger/src/org/eclipse/gemoc/executionframework/debugger/MutableField.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.debug; +package org.eclipse.gemoc.executionframework.debugger; import java.util.function.Consumer; import java.util.function.Supplier; diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.checkstyle b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.classpath new file mode 100644 index 000000000..8ec67028c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.gitignore b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.gitignore similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.gitignore rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.gitignore diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.project new file mode 100644 index 000000000..916618875 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.project @@ -0,0 +1,40 @@ + + + org.eclipse.gemoc.executionframework.engine.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sourceforge.metrics.builder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sourceforge.metrics.nature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.settings/org.eclipse.jdt.core.prefs rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/META-INF/MANIFEST.MF new file mode 100644 index 000000000..7bdc1d6eb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Execution Engine UI +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.engine.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.executionframework.engine.ui.Activator +Require-Bundle: org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.commons.eclipse, + org.eclipse.emf.transaction, + org.eclipse.gemoc.dsl.debug.ide, + org.eclipse.debug.ui, + org.eclipse.gemoc.executionframework.engine, + org.eclipse.ui, + org.eclipse.gemoc.commons.eclipse.ui, + org.eclipse.xtend.lib, + org.eclipse.gemoc.xdsmlframework.commons, + org.eclipse.gemoc.dsl.debug.ide.sirius.ui;bundle-version="1.0.0", + org.eclipse.sirius;bundle-version="2.0.7", + org.eclipse.xtext, + org.eclipse.gemoc.executionframework.extensions.sirius, + org.eclipse.gemoc.commons.eclipse.messagingsystem.api, + org.eclipse.gemoc.dsl.debug.ide.ui;bundle-version="1.0.0", + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0", + org.eclipse.gemoc.dsl.debug, + fr.inria.diverse.melange +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.executionframework.engine.ui, + org.eclipse.gemoc.executionframework.engine.ui.commons, + org.eclipse.gemoc.executionframework.engine.ui.launcher diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/about.html b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/about.html similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/about.html rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/about.html diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/build.properties similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/build.properties rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/build.properties diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/pom.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/pom.xml new file mode 100644 index 000000000..2d300dbea --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.executionframework + org.gemoc.modeldebugging.executionframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.executionframework.engine.ui + 2.3.0-SNAPSHOT + eclipse-plugin + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/Activator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/Activator.java new file mode 100644 index 000000000..4766fffcb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/Activator.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * 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.engine.ui; + +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +//import org.gemoc.gemoc_language_workbench.extensions.sirius.services.AbstractGemocDebuggerServices; +import org.osgi.framework.BundleContext; + + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.executionframework.engine.ui"; //$NON-NLS-1$ + + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + // AbstractGemocDebuggerServices.LISTENER.uninstall(); + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + public static void warn(String msg, Throwable e){ + Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, + Status.OK, + msg, + e)); + } + public static void error(String msg, Throwable e){ + Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, + Status.OK, + msg, + e)); + } + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/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 similarity index 83% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/commons/RunConfiguration.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/commons/RunConfiguration.java index 3c496e4c1..935ade899 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.commons; +package org.eclipse.gemoc.executionframework.engine.ui.commons; import java.util.ArrayList; import java.util.Collection; @@ -18,11 +18,11 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.emf.common.util.URI; -import org.gemoc.xdsmlframework.api.core.IRunConfiguration; -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint; -import fr.obeo.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; +import org.eclipse.gemoc.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; public class RunConfiguration implements IRunConfiguration { @@ -33,6 +33,7 @@ public class RunConfiguration implements IRunConfiguration { public RunConfiguration(ILaunchConfiguration launchConfiguration) throws CoreException { _launchConfiguration = launchConfiguration; extractInformation(); + } protected void extractInformation() throws CoreException { @@ -49,12 +50,14 @@ protected void extractInformation() throws CoreException { _modelEntryPoint = getAttribute(LAUNCH_MODEL_ENTRY_POINT, ""); _modelInitializationMethod = getAttribute(LAUNCH_INITIALIZATION_METHOD, ""); _modelInitializationArguments = getAttribute(LAUNCH_INITIALIZATION_ARGUMENTS, ""); + _melangeQuery = getAttribute(LAUNCH_MELANGE_QUERY, ""); for (EngineAddonSpecificationExtension extension : EngineAddonSpecificationExtensionPoint.getSpecifications()) { _engineAddonExtensions.put(extension, getAttribute(extension.getName(), false)); } _breakStart = getAttribute(LAUNCH_BREAK_START, Boolean.FALSE); + _debugModelID = getAttribute(DEBUG_MODEL_ID, ".debugModel"); } protected String getAttribute(String attributeName, String defaultValue) throws CoreException { @@ -92,13 +95,11 @@ public String getMelangeQuery() { } @Override - public URI getExecutedModelAsMelangeURI() { - //TODO: disabled until we have Melange Resource - return _modelURI; -// if (_melangeQuery.isEmpty()) -// return _modelURI; -// String melangeURIString = _modelURI.toString().replace("platform:/", "melange:/") + _melangeQuery; -// return URI.createURI(melangeURIString); + public URI getExecutedModelAsMelangeURI() { + if (_melangeQuery.isEmpty()) + return _modelURI; + String melangeURIString = _modelURI.toString().replace("platform:/", "melange:/") + _melangeQuery; + return URI.createURI(melangeURIString); } private URI _animatorURI; @@ -161,10 +162,19 @@ public String getModelInitializationArguments() { } private boolean _breakStart; - + + @Override public boolean getBreakStart() { return _breakStart; } + + private String _debugModelID; + + @Override + public String getDebugModelID() { + return _debugModelID; + } + } 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 new file mode 100644 index 000000000..075b8b2bc --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/launcher/AbstractGemocLauncher.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * 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.engine.ui.launcher; + +import java.util.Collections; +import java.util.Map; + +import org.eclipse.gemoc.commons.eclipse.ui.ViewHelper; +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; + + +abstract public class AbstractGemocLauncher extends org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch.AbstractDSLLaunchConfigurationDelegateUI { + + // 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"; + + public Map parseLaunchConfiguration(LaunchConfiguration launchConfiguration) { + return Collections.emptyMap(); + } + + protected void openViewsRecommandedByAddons(IRunConfiguration runConfiguration){ + for (EngineAddonSpecificationExtension extension : runConfiguration.getEngineAddonExtensions()) + { + for(String viewId : extension.getOpenViewIds()){ + ViewHelper.showView(viewId); + } + + } + } +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/launcher/AbstractSequentialGemocLauncher.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/launcher/AbstractSequentialGemocLauncher.java similarity index 84% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/launcher/AbstractSequentialGemocLauncher.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/launcher/AbstractSequentialGemocLauncher.java index 8831023a0..6ee17a384 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/launcher/AbstractSequentialGemocLauncher.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine.ui/src/org/eclipse/gemoc/executionframework/engine/ui/launcher/AbstractSequentialGemocLauncher.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.ui.launcher; +package org.eclipse.gemoc.executionframework.engine.ui.launcher; import java.util.Collection; import java.util.List; @@ -33,27 +33,31 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.PlatformUI; -import org.gemoc.executionframework.engine.commons.EngineContextException; -import org.gemoc.executionframework.engine.ui.commons.RunConfiguration; -import org.gemoc.executionframework.extensions.sirius.services.AbstractGemocAnimatorServices; -import org.gemoc.executionframework.extensions.sirius.services.AbstractGemocDebuggerServices; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.ExecutionMode; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; - -import fr.inria.diverse.commons.messagingsystem.api.MessagingSystem; -import fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; +import org.eclipse.gemoc.executionframework.engine.commons.EngineContextException; +import org.eclipse.gemoc.executionframework.engine.ui.commons.RunConfiguration; +import org.eclipse.gemoc.executionframework.extensions.sirius.services.AbstractGemocAnimatorServices; +import org.eclipse.gemoc.executionframework.extensions.sirius.services.AbstractGemocDebuggerServices; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; + +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystem; +import org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; abstract public class AbstractSequentialGemocLauncher extends AbstractGemocLauncher { // 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.gemoc.executionframework.extensions.sirius.Activator.PLUGIN_ID + ".debugModel"; + public final static String MODEL_ID = org.eclipse.gemoc.executionframework.extensions.sirius.Activator.PLUGIN_ID + ".debugModel"; protected IExecutionEngine _executionEngine; + // progress monitor used during launch; useful for operations that wish to contribute to the progress bar + protected IProgressMonitor launchProgressMonitor = null; + + protected final static String executionStartedMessage = "Execution started successfully."; + protected abstract IExecutionEngine createExecutionEngine(RunConfiguration runConfiguration, ExecutionMode executionMode) throws CoreException, EngineContextException; @@ -75,6 +79,7 @@ public final void launch(final ILaunchConfiguration configuration, final String try { debug("About to initialize and run the GEMOC Execution Engine..."); + launchProgressMonitor = monitor; // make sure to have the engine view when starting the engine PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { @@ -115,7 +120,7 @@ protected IStatus run(IProgressMonitor monitor) { _executionEngine.getExecutionContext().getExecutionPlatform().addEngineAddon(animator); try { AbstractSequentialGemocLauncher.super.launch(configuration, mode, launch, monitor); - return new Status(IStatus.OK, getPluginID(), "Execution was launched successfully."); + return new Status(IStatus.OK, getPluginID(), executionStartedMessage); } catch (CoreException e) { e.printStackTrace(); return new Status(IStatus.ERROR, getPluginID(), "Could not start execution engine."); @@ -126,8 +131,8 @@ protected IStatus run(IProgressMonitor monitor) { // from the current job else { _executionEngine.start(); - debug("Execution finished."); - return new Status(IStatus.OK, getPluginID(), "Execution finished."); + debug(executionStartedMessage); + return new Status(IStatus.OK, getPluginID(), executionStartedMessage); } } }; @@ -147,7 +152,7 @@ protected IStatus run(IProgressMonitor monitor) { private boolean isEngineAlreadyRunning(URI launchedModelURI) throws CoreException { // make sure there is no other running engine on this model - Collection engines = org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry + Collection engines = org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry .getRunningEngines().values(); for (IExecutionEngine engine : engines) { IExecutionEngine observable = (IExecutionEngine) engine; diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.checkstyle b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.checkstyle new file mode 100644 index 000000000..a16590b7c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.checkstyle @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.classpath similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/.classpath rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.classpath diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/.gitignore b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.gitignore similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/.gitignore rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.gitignore diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.project new file mode 100644 index 000000000..d915d0a90 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.project @@ -0,0 +1,46 @@ + + + org.eclipse.gemoc.executionframework.engine + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sourceforge.metrics.builder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sourceforge.metrics.nature + org.eclipse.xtext.ui.shared.xtextNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/.settings/org.eclipse.core.resources.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/.settings/org.eclipse.core.resources.prefs rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.settings/org.eclipse.core.resources.prefs diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/.settings/org.eclipse.jdt.core.prefs rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/.settings/org.eclipse.jdt.core.prefs 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 new file mode 100644 index 000000000..54a7e8c68 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Gemoc Engine +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.engine;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.executionframework.engine.Activator +Require-Bundle: org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.commons.eclipse, + org.eclipse.gemoc.commons.eclipse.messagingsystem.api;bundle-version="1.0.0", + org.eclipse.gemoc.executionframework.reflectivetrace.model;visibility:=reexport, + org.eclipse.gemoc.commons.eclipse.pde;bundle-version="0.1.0", + org.eclipse.xtend.lib, + 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" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.gemoc.executionframework.engine, + org.eclipse.gemoc.executionframework.engine.commons, + org.eclipse.gemoc.executionframework.engine.core, + org.eclipse.gemoc.executionframework.engine.profiler diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/about.html b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/about.html similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/about.html rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/about.html diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/build.properties similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/build.properties rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/build.properties diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/icons/sample.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/icons/sample.gif similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/icons/sample.gif rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/icons/sample.gif diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/plugin.xml similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/plugin.xml rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/plugin.xml diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/pom.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/pom.xml new file mode 100644 index 000000000..15eb5bee5 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/pom.xml @@ -0,0 +1,65 @@ + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.executionframework + org.gemoc.modeldebugging.executionframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.executionframework.engine + 2.3.0-SNAPSHOT + eclipse-plugin + + + + + + + + + + + + + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + + + \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/Activator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/Activator.java new file mode 100644 index 000000000..8ae540a3c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/Activator.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * 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.engine; + +import org.eclipse.gemoc.commons.eclipse.logging.backends.DefaultLoggingBackend; +import org.eclipse.gemoc.commons.eclipse.pde.GemocPlugin; +import org.eclipse.gemoc.executionframework.engine.core.GemocRunningEnginesRegistry; +import org.osgi.framework.BundleContext; + +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystemManager; +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystem; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends GemocPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.executionframework.engine"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return Activator.plugin; + } + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + Activator.plugin = this; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + @Override + public void stop(BundleContext context) throws Exception { + Activator.plugin = null; + super.stop(context); + } + + /** + * List of engines that have registered to be running in this eclipse + */ + public GemocRunningEnginesRegistry gemocRunningEngineRegistry = new GemocRunningEnginesRegistry(); + + @Override + public String getId() { + return PLUGIN_ID; + } + +// @Override +// public DefaultLoggingBackend resolveLoggingBackend() { +// return org.eclipse.gemoc.executionframework.engine.commons.Activator.getDefault().resolveLoggingBackend(); +// } + + private DefaultLoggingBackend _loggingBackend; + @Override + public DefaultLoggingBackend resolveLoggingBackend() { + if (_loggingBackend == null) + { + _loggingBackend = new DefaultLoggingBackend(this); + MessagingSystemManager msm = new MessagingSystemManager(); + MessagingSystem ms = msm.createBestPlatformMessagingSystem(PLUGIN_ID, "Execution Engine"); + _loggingBackend.setMessagingSystem(ms); + } + return _loggingBackend; + } + + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/DefaultExecutionPlatform.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/DefaultExecutionPlatform.java similarity index 78% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/DefaultExecutionPlatform.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/DefaultExecutionPlatform.java index d8ba7bc34..873eec97c 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/DefaultExecutionPlatform.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/DefaultExecutionPlatform.java @@ -8,19 +8,19 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.commons; +package org.eclipse.gemoc.executionframework.engine.commons; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import org.eclipse.core.runtime.CoreException; -import org.gemoc.xdsmlframework.api.core.IExecutionPlatform; -import org.gemoc.xdsmlframework.api.core.IModelLoader; -import org.gemoc.xdsmlframework.api.core.IRunConfiguration; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; -import org.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionPlatform; +import org.eclipse.gemoc.xdsmlframework.api.core.IModelLoader; +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; +import org.eclipse.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; public class DefaultExecutionPlatform implements IExecutionPlatform { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/EngineContextException.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/EngineContextException.java similarity index 93% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/EngineContextException.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/EngineContextException.java index bb055bb94..84b753cf7 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/EngineContextException.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/EngineContextException.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.commons; +package org.eclipse.gemoc.executionframework.engine.commons; public class EngineContextException extends Exception { diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/MelangeHelper.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/MelangeHelper.java new file mode 100644 index 000000000..158ee2316 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/MelangeHelper.java @@ -0,0 +1,350 @@ +/******************************************************************************* + * 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.engine.commons; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.osgi.framework.Bundle; + +import fr.inria.diverse.k3.al.annotationprocessor.Aspect; + +/** + * Helper class to get informations about languages defined in Melange + */ +public class MelangeHelper { + + /** + * Return a bundle with a .melange declaring 'language' + */ + public static Bundle getMelangeBundle(String languageName){ + + IConfigurationElement[] melangeLanguages = Platform + .getExtensionRegistry().getConfigurationElementsFor( + "fr.inria.diverse.melange.language"); + String melangeBundleName = ""; + + for (IConfigurationElement lang : melangeLanguages) { + if(lang.getAttribute("id").equals(languageName)){ + melangeBundleName = lang.getContributor().getName(); + return Platform.getBundle(melangeBundleName); + } + } + + return null; + } + + /** + * Return all Languages defined with Melange + */ + public static List getAllLanguages(){ + List languagesNames = new ArrayList(); + IConfigurationElement[] melangeLanguages = Platform + .getExtensionRegistry().getConfigurationElementsFor( + "fr.inria.diverse.melange.language"); + for (IConfigurationElement lang : melangeLanguages) { + languagesNames.add(lang.getAttribute("id")); + } + return languagesNames; + } + + /** + * @param languageId + * @return the URI of the given language or null if no such language exists in the registry + */ + public static String getLanguageURI(String languageId){ + IConfigurationElement[] melangeLanguages = Platform + .getExtensionRegistry().getConfigurationElementsFor( + "fr.inria.diverse.melange.language"); + for (IConfigurationElement lang : melangeLanguages) { + if(lang.getAttribute("id").equals(languageId)){ + return lang.getAttribute("uri"); + } + } + return null; + } + + + /** + * Note: in some situations, the same uri can be declared for several languages ! (for example using external keyword) + * this is usually a deployment issue + * @param uri + * @return the first language with the given URI or null if no such language exists in the registry + */ + public static String getLanguageNameForURI(String uri){ + IConfigurationElement[] melangeLanguages = Platform + .getExtensionRegistry().getConfigurationElementsFor( + "fr.inria.diverse.melange.language"); + for (IConfigurationElement lang : melangeLanguages) { + if(lang.getAttribute("uri").equals(uri)){ + return lang.getAttribute("id"); + } + } + return null; + } + public static List getLanguageNamesForURI(String uri){ + List languagesNames = new ArrayList(); + IConfigurationElement[] melangeLanguages = Platform + .getExtensionRegistry().getConfigurationElementsFor( + "fr.inria.diverse.melange.language"); + for (IConfigurationElement lang : melangeLanguages) { + if(lang.getAttribute("uri").equals(uri)){ + String id = lang.getAttribute("id"); + if(!languagesNames.contains(id)){ + languagesNames.add(id); + } + } + } + return languagesNames; + } + + /** + * Find in the given resource the native languages corresponding to the element at the root of the resource + * (built as a set in order to have no duplicate) + * @param res + * @return a list of all the native languages of the root elements of the resource + */ + public static List getNativeLanguagesUsedByResource(Resource res){ + LinkedHashSet usedLanguages = new LinkedHashSet(); + for(EObject eobj : res.getContents()){ + usedLanguages.addAll(getLanguageNamesForURI(eobj.eClass().eResource().getURI().toString())); + } + List languagesNames = new ArrayList(); + languagesNames.addAll(usedLanguages); + return languagesNames; + } + + /** + * @return Aspects defined in 'languageName' + */ + public static Set> getAspects(String languageName){ + Set> res = new HashSet>(); + + IConfigurationElement[] melangeLanguages = Platform + .getExtensionRegistry().getConfigurationElementsFor( + "fr.inria.diverse.melange.language"); + + String serializedAspects = ""; + for (IConfigurationElement lang : melangeLanguages) { + if (lang.getAttribute("id").equals(languageName)) { + serializedAspects = lang.getAttribute("aspects"); + break; + } + } + if(serializedAspects.isEmpty()) return res; + Set classNames = new HashSet(); + //serializedAspects is a list of pairs (target : aspects) + for (String rawPair : serializedAspects.split(";")) { // ; is the separator between pairs + String[] pair = rawPair.split(":"); // : the separator between target & aspects + String[] weavedAsp = pair[1].split(","); // , the separator between aspects + for (String asp : weavedAsp) { + classNames.add(asp); + } + } + for (String asp : classNames) { + Class cls = loadAspect(languageName, asp); + res.add(cls); + } + + return res; + } + + /** + * Return all ModelTypes matching 'language' + */ + public static List getModelTypes(String language){ + List modelTypeNames = new ArrayList(); + IConfigurationElement[] melangeLanguages = Platform + .getExtensionRegistry().getConfigurationElementsFor( + "fr.inria.diverse.melange.language"); + for (IConfigurationElement lang : melangeLanguages) { + if (lang.getAttribute("id").equals(language)) { + IConfigurationElement[] adapters = lang + .getChildren("adapter"); + for (IConfigurationElement adapter : adapters) { + modelTypeNames.add(adapter + .getAttribute("modeltypeId")); + } + } + } + return modelTypeNames; + } + + /** + * Return the ModelType for 'language' or null if not found + */ + public static String getModelType(String language){ + IConfigurationElement[] melangeLanguages = Platform + .getExtensionRegistry().getConfigurationElementsFor( + "fr.inria.diverse.melange.language"); + for (IConfigurationElement lang : melangeLanguages) { + if (lang.getAttribute("id").equals(language)) { + return lang.getAttribute("modeltypeId"); + } + } + return null; + } + + /** + * Return a class matching 'aspectName' or null if can't be loaded. + */ + public static Class loadAspect(String languageName, String aspectName){ + try { + return getMelangeBundle(languageName).loadClass(aspectName); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + return null; + } + + /** + * Get all methods from Aspects of 'Language' tagged @Main + */ + public static List getEntryPoints(String language){ + + List res = new ArrayList(); + + Set> aspects = getAspects(language); + for (Class asp : aspects) { + for(Method m : asp.getMethods()) + { + if(isAnnotedMain(m)) + { + res.add(m); + } + } + } + + return res; + } + + + public static String[] getSignatures(String entryPoints){ + return entryPoints.split(";"); + } + + /** + * Expected format for signature: + * qualifiedClassName.methodName(qualifiedClassName,qualifiedClassName,...) + * + * @return qualified class name before '(' without method name + */ + public static String getClassName(String signature){ + String method = signature.substring(0, signature.indexOf("(")); + String className = method.substring(0,method.lastIndexOf(".")); + return className; + } + + /** + * Expected format for signature: + * qualifiedClassName.methodName(qualifiedClassName,qualifiedClassName,...) + * + * @return method name before '(' without class name + */ + public static String getMethodName(String signature) { + String method = signature.substring(0, signature.indexOf("(")); + String methodName = method.substring(method.lastIndexOf(".")); + return methodName; + } + + /** + * Expected format for signature: + * qualifiedClassName.methodName(qualifiedClassName,qualifiedClassName,...) + * + * @return qualified class names between '(' and ')' + */ + public static String[] getParametersType(String signature){ + String args = signature.substring(signature.indexOf("(")+1,signature.indexOf(")")); + return args.split(","); + } + + /** + * Search in 'aspect' for a method named 'calledMethodName' and with one parameter. + * The type of this parameter has the same simple name as the EClass of 'caller'. + * + * @return Found method from 'aspect' + * + * @throws NoSuchMethodException + */ + public static Method findMethod(Class aspect, EObject caller, String calledMethodName) throws NoSuchMethodException{ + String callerClassName = caller.eClass().getName(); + for(Method method : aspect.getMethods()){ + String methodName = method.getName(); + Class[] paramTypes = method.getParameterTypes(); + if(methodName.equals(calledMethodName) + && paramTypes.length == 1 + && paramTypes[0].getSimpleName().equals(callerClassName)){ + return method; + } + } + + throw new java.lang.NoSuchMethodException(); + } + + /** + * Return the substring after the last '.' or the whole 'qualifiedName' if + * no dot character. + */ + public static String lastSegment(String qualifiedName){ + try{ + return qualifiedName.substring(qualifiedName.lastIndexOf(".")+1); + } + catch(IndexOutOfBoundsException e){ + //The String end with '.' + } + return ""; + } + + /** + * Return true is their is @Main + */ + public static boolean isAnnotedMain(Method m){ + return m.isAnnotationPresent(fr.inria.diverse.k3.al.annotationprocessor.Main.class); + } + + /** + * Return the targeted class from the @Aspect + */ + public static Class getTarget(Class aspect){ + Annotation annotation = aspect.getAnnotation(fr.inria.diverse.k3.al.annotationprocessor.Aspect.class); + if(annotation != null){ + Aspect k3tag = (Aspect) annotation; + return k3tag.className(); + } + + return null; + } + + /** + * Return all classes from 'languageName' weaved on 'target' + */ + public static List> getAspectsOn(String languageName, Class target){ + List> res = new ArrayList>(); + + for(Class aspect : getAspects(languageName)){ + Class aspectTarget = getTarget(aspect); + if(aspectTarget.isAssignableFrom(target)){ + res.add(aspect); + } + } + + return res; + } +} \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/ModelExecutionContext.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/ModelExecutionContext.java similarity index 84% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/ModelExecutionContext.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/ModelExecutionContext.java index 5bdd1d048..bd01ba3e6 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/ModelExecutionContext.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/commons/ModelExecutionContext.java @@ -8,24 +8,24 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.commons; +package org.eclipse.gemoc.executionframework.engine.commons; import org.eclipse.core.runtime.CoreException; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.emf.transaction.util.TransactionUtil; -import org.gemoc.executionframework.engine.Activator; -import org.gemoc.executionframework.engine.core.ExecutionWorkspace; -import org.gemoc.xdsmlframework.api.core.ExecutionMode; -import org.gemoc.xdsmlframework.api.core.IExecutionContext; -import org.gemoc.xdsmlframework.api.core.IExecutionPlatform; -import org.gemoc.xdsmlframework.api.core.IExecutionWorkspace; -import org.gemoc.xdsmlframework.api.core.IRunConfiguration; -import org.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; +import org.eclipse.gemoc.executionframework.engine.Activator; +import org.eclipse.gemoc.executionframework.engine.core.ExecutionWorkspace; +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionPlatform; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionWorkspace; +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration; +import org.eclipse.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; import org.osgi.framework.Bundle; -abstract public class ModelExecutionContext implements IExecutionContext { +public abstract class ModelExecutionContext implements IExecutionContext { protected IRunConfiguration _runConfiguration; @@ -75,6 +75,11 @@ public void initializeResourceModel() { setUpEditingDomain(); + //checkResourceSetContent(); + + } + + protected void checkResourceSetContent(){ // check that the initial resource hasn't been loaded more than once // (e.g. via melange) // pure debug code: has no side effect on anything @@ -92,14 +97,13 @@ public void initializeResourceModel() { foundOnce = true; } } - } protected IExecutionPlatform createExecutionPlatform() throws CoreException { return new DefaultExecutionPlatform(_languageDefinition, _runConfiguration); } - abstract protected LanguageDefinitionExtension getLanguageDefinition(String languageName) throws EngineContextException; + protected abstract LanguageDefinitionExtension getLanguageDefinition(String languageName) throws EngineContextException; private ResourceSet getResourceSet() { return _resourceModel.getResourceSet(); diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractCommandBasedSequentialExecutionEngine.xtend b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractCommandBasedSequentialExecutionEngine.xtend new file mode 100644 index 000000000..4b531489c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractCommandBasedSequentialExecutionEngine.xtend @@ -0,0 +1,40 @@ +/******************************************************************************* + * 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.engine.core + +import org.eclipse.emf.transaction.RecordingCommand + +abstract class AbstractCommandBasedSequentialExecutionEngine extends AbstractSequentialExecutionEngine { + + /** + * Must be called in a callback from the executed code from the operational + * semantics. + * + * @param caller + * @param operationName + * @param operation + */ + protected def void executeOperation(Object caller, String className, String operationName, Runnable operation) { + val RecordingCommand rc = new RecordingCommand(editingDomain) { + override doExecute() { + operation.run() + } + } + try { + beforeExecutionStep(caller, className, operationName, rc) + rc.execute + afterExecutionStep + } finally { + // Important to remove notifiers. + rc.dispose + } + } +} \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/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 similarity index 85% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractExecutionEngine.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractExecutionEngine.java index 1cc16fdb8..98e2b6345 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.core; +package org.eclipse.gemoc.executionframework.engine.core; import java.io.PrintWriter; import java.io.StringWriter; @@ -23,17 +23,31 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.emf.transaction.impl.EMFCommandTransaction; import org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain; -import org.gemoc.executionframework.engine.Activator; -import org.gemoc.xdsmlframework.api.core.EngineStatus; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.IDisposable; -import org.gemoc.xdsmlframework.api.core.IExecutionContext; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.Step; - +import org.eclipse.gemoc.executionframework.engine.Activator; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.core.IDisposable; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; + +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; +import org.eclipse.gemoc.trace.commons.model.trace.Step; + + + +/** + * Common implementation of {@link IExecutionEngine}. + * It provides the following services: + *
    + *
  • a basic implementation of the notification for the engine addons ({@link IEngineAddon}).
  • + *
  • registration into the engine registry.
  • + *
  • basic step service (with transaction)
  • + *
+ * This class is intended to be subclassed. + * @author Didier Vojtisek + * + */ public abstract class AbstractExecutionEngine implements IExecutionEngine, IDisposable { private RunStatus _runningStatus = RunStatus.Initializing; @@ -50,7 +64,7 @@ public abstract class AbstractExecutionEngine implements IExecutionEngine, IDisp public Throwable error = null; protected InternalTransactionalEditingDomain editingDomain; private EMFCommandTransaction currentTransaction; - private Deque currentSteps = new ArrayDeque<>(); + private Deque> currentSteps = new ArrayDeque<>(); abstract protected void performStart(); @@ -75,7 +89,7 @@ public final void initialize(IExecutionContext executionContext) { /* * (non-Javadoc) * - * @see org.gemoc.executionframework.engine.core.IExecutionEngine# + * @see org.eclipse.gemoc.executionframework.engine.core.IExecutionEngine# * getExecutionContext() */ @Override @@ -87,7 +101,7 @@ public final IExecutionContext getExecutionContext() { * (non-Javadoc) * * @see - * org.gemoc.executionframework.engine.core.IExecutionEngine#getEngineStatus + * org.eclipse.gemoc.executionframework.engine.core.IExecutionEngine#getEngineStatus * () */ @Override @@ -144,6 +158,16 @@ protected void notifyEngineStarted() { } } } + + protected void notifyEngineInitialized() { + for (IEngineAddon addon : getExecutionContext().getExecutionPlatform().getEngineAddons()) { + try { + addon.engineInitialized(this); + } catch (Exception e) { + addonError(addon, e); + } + } + } protected final void notifyAboutToStop() { for (IEngineAddon addon : getExecutionContext().getExecutionPlatform().getEngineAddons()) { @@ -185,7 +209,7 @@ protected void notifyEngineStatusChanged(RunStatus newStatus) { } } - protected void notifyAboutToExecuteLogicalStep(Step l) { + protected void notifyAboutToExecuteLogicalStep(Step l) { for (IEngineAddon addon : getExecutionContext().getExecutionPlatform().getEngineAddons()) { try { addon.aboutToExecuteStep(this, l); @@ -200,7 +224,7 @@ protected void notifyAboutToExecuteLogicalStep(Step l) { } } - protected void notifyLogicalStepExecuted(Step l) { + protected void notifyLogicalStepExecuted(Step l) { for (IEngineAddon addon : getExecutionContext().getExecutionPlatform().getEngineAddons()) { try { addon.stepExecuted(this, l); @@ -217,7 +241,7 @@ protected void notifyLogicalStepExecuted(Step l) { * (non-Javadoc) * * @see - * org.gemoc.executionframework.engine.core.IExecutionEngine#hasAddon(java. + * org.eclipse.gemoc.executionframework.engine.core.IExecutionEngine#hasAddon(java. * lang.Class) */ @Override @@ -233,7 +257,7 @@ public final boolean hasAddon(Class type) { * (non-Javadoc) * * @see - * org.gemoc.executionframework.engine.core.IExecutionEngine#getAddon(java. + * org.eclipse.gemoc.executionframework.engine.core.IExecutionEngine#getAddon(java. * lang.Class) */ @SuppressWarnings("unchecked") @@ -249,7 +273,7 @@ public final T getAddon(Class type) { /* * (non-Javadoc) * - * @see org.gemoc.executionframework.engine.core.IExecutionEngine# + * @see org.eclipse.gemoc.executionframework.engine.core.IExecutionEngine# * getAddonsTypedBy(java.lang.Class) */ @SuppressWarnings("unchecked") @@ -365,7 +389,7 @@ private void commitCurrentTransaction() { @Override public final Deque getCurrentStack() { Deque result = new ArrayDeque(); - for (Step ls : currentSteps) { + for (Step ls : currentSteps) { result.add(ls.getMseoccurrence()); } return result; @@ -375,6 +399,11 @@ private EMFCommandTransaction createTransaction(InternalTransactionalEditingDoma return new EMFCommandTransaction(command, editingDomain, null); } + + /* (non-Javadoc) + * @see org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine#getCurrentMSEOccurrence() + */ + @Override public final MSEOccurrence getCurrentMSEOccurrence() { if (currentSteps.size() > 0) return currentSteps.getFirst().getMseoccurrence(); @@ -404,7 +433,7 @@ protected final void stopExecutionIfAsked() { } } - protected final void beforeExecutionStep(Step step) { + protected final void beforeExecutionStep(Step step) { // We will trick the transaction with an empty command. This most // probably make rollbacks impossible, but at least we can manage @@ -423,7 +452,7 @@ protected void doExecute() { * To be called just after each execution step by an implementing engine. If * the step was done through a RecordingCommand, it can be given. */ - protected final void beforeExecutionStep(Step step, RecordingCommand rc) { + protected final void beforeExecutionStep(Step step, RecordingCommand rc) { try { @@ -456,7 +485,7 @@ private boolean isInStep() { boolean containsNotNull = false; - for (Step ls : currentSteps) { + for (Step ls : currentSteps) { if (ls != null && ls.getMseoccurrence() != null) { containsNotNull = true; break; @@ -470,13 +499,13 @@ private boolean isInStep() { /** * To be called just after each execution step by an implementing engine. */ - protected final void afterExecutionStep() { + protected void afterExecutionStep() { RecordingCommand emptyrc = null; try { - Step step = currentSteps.pop(); + Step step = currentSteps.pop(); // We commit the transaction (which might be a different one // than the one created earlier, or null if two operations 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 new file mode 100644 index 000000000..a252a4eec --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java @@ -0,0 +1,265 @@ +/******************************************************************************* + * 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.engine.core; + + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Set; + +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.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; + + +/** + * 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; + + protected abstract void executeEntryPoint(); + + /** + * if it exists, calls the method tagged as @Initialize + */ + protected abstract void initializeModel(); + + /** + * search for an applicable entry point for the simulation, this is typically a method having the @Main annotation + * @param executionContext the execution context of the simulation + */ + protected abstract void prepareEntryPoint(IExecutionContext executionContext); + + /** + * search for an applicable method tagged as @Initialize + */ + protected abstract void prepareInitializeModel(IExecutionContext executionContext); + + @Override + public final void performInitialize(IExecutionContext executionContext) { + @SuppressWarnings("rawtypes") + Set traceManagers = this.getAddonsTypedBy(IMultiDimensionalTraceAddon.class); + if (!traceManagers.isEmpty()) + this.traceAddon = traceManagers.iterator().next(); + prepareEntryPoint(executionContext); + prepareInitializeModel(executionContext); + } + + @Override + protected final void performStart() { + initializeModel(); + notifyEngineInitialized(); + 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(); + } + } + } + } + + @Override + protected final void afterExecutionStep() { + manageEvents(); + super.afterExecutionStep(); + } + + /** + * To be called just before each execution step by an implementing engine. + */ + protected final void beforeExecutionStep(Object caller, String className, String operationName) { + // We will trick the transaction with an empty command. This most + // probably make rollbacks impossible, but at least we can manage + // transactions the way we want. + RecordingCommand rc = new RecordingCommand(editingDomain) { + @Override + protected void doExecute() { + } + }; + + beforeExecutionStep(caller, className, operationName, rc); + rc.execute(); + } + + /** + * To be called just after each execution step by an implementing engine. If + * the step was done through a RecordingCommand, it can be given. + */ + protected final void beforeExecutionStep(Object caller, String className, String operationName, RecordingCommand rc) { + if (caller != null && caller instanceof EObject && editingDomain != null) { + // Call expected to be done from an EMF model, hence EObjects + EObject callerCast = (EObject) caller; + // We create a step + Step step = createStep(callerCast, className, operationName); + + manageEvents(); + + beforeExecutionStep(step, rc); + } + } + + private Step createStep(EObject caller, String className, String methodName) { + MSE mse = findOrCreateMSE(caller, className, methodName); + Step result; + if (traceAddon == null) { + GenericSequentialStep step = GenerictraceFactory.eINSTANCE.createGenericSequentialStep(); + MSEOccurrence occurrence = null; + occurrence = TraceFactory.eINSTANCE.createMSEOccurrence(); + step.setMseoccurrence(occurrence); + occurrence.setMse(mse); + result = step; + } else { + result = traceAddon.getFactory().createStep(mse, new ArrayList(), new ArrayList()); + } + + return result; + } + + private EOperation findOperation(EObject object, String className, String methodName) { + // We try to find the corresponding EOperation in the execution + // metamodel + for (EOperation operation : object.eClass().getEAllOperations()) { + // TODO !!! this is not super correct yet as overloading allows the + // definition of 2 methods with the same name !!! + if (operation.getName().equalsIgnoreCase(methodName)) { + return operation; + } + } + + // If we didn't find it, we try to find the class that should contain + // this operation + EClass containingEClass = null; + if (object.eClass().getName().equalsIgnoreCase(className)) { + containingEClass = object.eClass(); + } else { + for (EClass candidate : object.eClass().getEAllSuperTypes()) { + if (candidate.getName().equalsIgnoreCase(className)) { + containingEClass = candidate; + } + } + } + + // Then we create the missing operation (VERY approximatively) + EOperation operation = EcoreFactory.eINSTANCE.createEOperation(); + if (containingEClass != null) { + containingEClass.getEOperations().add(operation); + } + operation.setName(methodName); + 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. + * @param caller the caller object + * @param className the class containing the method + * @param methodName the name of the method + * @return the retrieved or created MSE + */ + public final MSE findOrCreateMSE(EObject caller, String className, String methodName) { + EOperation operation = findOperation(caller, className, methodName); + // TODO Should be created/loaded before execution by analyzing the + // model? + if (_actionModel == null) { + _actionModel = TraceFactory.eINSTANCE.createMSEModel(); + } + + if (_actionModel != null) { + for (MSE existingMSE : _actionModel.getOwnedMSEs()) { + if (existingMSE.getCaller().equals(caller) && ((existingMSE.getAction() != null && existingMSE.getAction().equals(operation)) || (existingMSE.getAction() == null && operation == null))) { + // no need to create one, we already have it + return existingMSE; + } + } + } + // let's create a MSE + final GenericMSE mse = TraceFactory.eINSTANCE.createGenericMSE(); + mse.setCallerReference(caller); + mse.setActionReference(operation); + if (operation != null) + mse.setName("MSE_" + caller.getClass().getSimpleName() + "_" + operation.getName()); + else + mse.setName("MSE_" + caller.getClass().getSimpleName() + "_" + methodName); + // and add it for possible reuse + if (_actionModel != null) { + + if (_actionModel.eResource() != null) { + TransactionUtil.getEditingDomain(_actionModel.eResource()); + RecordingCommand command = new RecordingCommand(TransactionUtil.getEditingDomain(_actionModel.eResource()), "Saving new MSE ") { + @Override + protected void doExecute() { + _actionModel.getOwnedMSEs().add(mse); + try { + _actionModel.eResource().save(null); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + }; + TransactionUtil.getEditingDomain(_actionModel.eResource()).getCommandStack().execute(command); + } + } else { + _actionModel.getOwnedMSEs().add(mse); + } + return mse; + } + + @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.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/CommandExecution.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/CommandExecution.java similarity index 91% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/CommandExecution.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/CommandExecution.java index e8a3db7c5..fc69c013a 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/CommandExecution.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/CommandExecution.java @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.core; +package org.eclipse.gemoc.executionframework.engine.core; import org.eclipse.emf.common.command.CommandStack; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.transaction.RecordingCommand; import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.gemoc.xdsmlframework.api.core.IExecutionCheckpoint; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionCheckpoint; public final class CommandExecution { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/EngineStoppedException.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/EngineStoppedException.java similarity index 89% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/EngineStoppedException.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/EngineStoppedException.java index 771856eef..c9d2a7a8d 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/EngineStoppedException.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/EngineStoppedException.java @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.core; +package org.eclipse.gemoc.executionframework.engine.core; /** * Exception thrown when the user stop the engine in plainK3 mode or if the engine is stopped normally * This allows to catch it and adapt the Engine response in this normal situation - * @author dvojtise + * @author Didier Vojtisek * */ public class EngineStoppedException extends RuntimeException { @@ -23,6 +23,8 @@ public class EngineStoppedException extends RuntimeException { */ private static final long serialVersionUID = -8485492707115640348L; + + public EngineStoppedException(String message) { super(message); } diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/ExecutionWorkspace.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/ExecutionWorkspace.java similarity index 94% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/ExecutionWorkspace.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/ExecutionWorkspace.java index ada513eaa..94e6bff3d 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/ExecutionWorkspace.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/ExecutionWorkspace.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.core; +package org.eclipse.gemoc.executionframework.engine.core; import java.text.SimpleDateFormat; import java.util.Calendar; @@ -20,8 +20,8 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.emf.common.util.URI; -import org.gemoc.commons.eclipse.emf.URIHelper; -import org.gemoc.xdsmlframework.api.core.IExecutionWorkspace; +import org.eclipse.gemoc.commons.eclipse.emf.URIHelper; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionWorkspace; public class ExecutionWorkspace implements IExecutionWorkspace { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/GemocRunningEnginesRegistry.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/GemocRunningEnginesRegistry.java similarity index 87% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/GemocRunningEnginesRegistry.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/GemocRunningEnginesRegistry.java index 7c9a0e1bb..590871038 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/GemocRunningEnginesRegistry.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/GemocRunningEnginesRegistry.java @@ -8,14 +8,14 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.core; +package org.eclipse.gemoc.executionframework.engine.core; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; public class GemocRunningEnginesRegistry { @@ -26,12 +26,12 @@ public class GemocRunningEnginesRegistry { /** - * Add the given engine with this name, return the unique name really used for this engine - * @param baseName - * @param engine - * @return + * Add the given engine with this name + * @param baseName (not used !? should be removed from API) + * @param engine to add + * @return the unique name really used for this engine */ - synchronized public String registerEngine(String baseName, IExecutionEngine engine){ + public synchronized String registerEngine(String baseName, IExecutionEngine engine){ int uniqueInstance = 0; String engineName = Thread.currentThread().getName() + " ("+uniqueInstance+")"; synchronized(runningEngines) diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/IEngineRegistrationListener.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/IEngineRegistrationListener.java new file mode 100644 index 000000000..7e6fd72e1 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/IEngineRegistrationListener.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * 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.engine.core; + +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; + +/** + * Listener interface used to be notified when engines are registered and unregistered from the Engine registry + * + * @author Didier Vojtisek + * + */ +public interface IEngineRegistrationListener { + + /** + * method called by the registry when an engine is registered + * @param engine the registered engine + */ + void engineRegistered(IExecutionEngine engine); + + /** + * method called by the registry when an engine is unregistered + * @param engine the unregistered engine + */ + void engineUnregistered(IExecutionEngine engine); + +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/SequentialExecutionException.xtend b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/SequentialExecutionException.xtend new file mode 100644 index 000000000..7484d6ef9 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/core/SequentialExecutionException.xtend @@ -0,0 +1,49 @@ +/******************************************************************************* + * 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.engine.core; + +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence +import org.eclipse.emf.transaction.RollbackException + +/** + * An exception that is caused by anything thrown from the execution of + * sequential operational semantics. + * + */ +public class SequentialExecutionException extends RuntimeException { + + private MSEOccurrence pendingMSEOccurrence; + + new(MSEOccurrence pendingMSE, Throwable cause) { + this.pendingMSEOccurrence = pendingMSE; + this.initCause(cause) + } + + private def String prettyPrintMSEOcc() { + if (pendingMSEOccurrence != null) + return '''Pending MSEOccurrence: «pendingMSEOccurrence.mse.caller.eClass.name».«pendingMSEOccurrence.mse.action.name» called on «pendingMSEOccurrence.mse.caller».''' + else + return "No pending MSE." + } + + override getMessage() { + if (this.getCause() != null && this.getCause() instanceof RollbackException) { + return "An error occured during the execution of the operational semantics (originally catched as a RollbackException during the transaction commit).\n" + + prettyPrintMSEOcc; + } else if (this.getCause() != null && this.getCause() instanceof InterruptedException) { + return "The engine thread was interrupted while it was waiting for being allowed to start an execution step's transaction.\n" + + prettyPrintMSEOcc; + } else { + return super.getMessage(); + } + } + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/profiler/Profiler.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/profiler/Profiler.java similarity index 97% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/profiler/Profiler.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/profiler/Profiler.java index 741071089..465382c1e 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/profiler/Profiler.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/profiler/Profiler.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.profiler; +package org.eclipse.gemoc.executionframework.engine.profiler; import java.util.ArrayList; import java.util.Date; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/profiler/Unit.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/profiler/Unit.java similarity index 91% rename from framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/profiler/Unit.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/profiler/Unit.java index 1c3498ce9..e3e47b9b9 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/profiler/Unit.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.engine/src/org/eclipse/gemoc/executionframework/engine/profiler/Unit.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.engine.profiler; +package org.eclipse.gemoc.executionframework.engine.profiler; public class Unit { diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.checkstyle b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.checkstyle new file mode 100644 index 000000000..a16590b7c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.checkstyle @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.classpath similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/.classpath rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.classpath diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.project new file mode 100644 index 000000000..06a6b42f2 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.executionframework.eventmanager + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.settings/org.eclipse.jdt.core.prefs rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/.settings/org.eclipse.jdt.core.prefs 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 new file mode 100644 index 000000000..8dc575384 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Eventmanager +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.eventmanager;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.executionframework.eventmanager.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.gemoc.executionframework.ui, + org.eclipse.gemoc.xdsmlframework.api, + 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" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/build.properties new file mode 100644 index 000000000..2ad9a3dcb --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/build.properties @@ -0,0 +1,17 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/,\ + contexts.xml diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/contexts.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/contexts.xml new file mode 100644 index 000000000..e37ff7d8b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/contexts.xml @@ -0,0 +1,24 @@ + + + + + + This is the context help for the sample view with a table viewer. It was generated by a PDE template. + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/IconeGemocModel-16.png b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/icons/IconeGemocModel-16.png similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/IconeGemocModel-16.png rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/icons/IconeGemocModel-16.png diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/plugin.xml new file mode 100644 index 000000000..0c5fd364b --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/plugin.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/Activator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/Activator.java new file mode 100644 index 000000000..a0c876979 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/Activator.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.eventmanager; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.executionframework.eventmanager"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } +} 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 new file mode 100644 index 000000000..52792cf02 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerRenderer.java @@ -0,0 +1,246 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.eventmanager.views; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +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; +import javafx.collections.ObservableList; +import javafx.scene.control.Button; +import javafx.scene.control.ListView; +import javafx.scene.control.ScrollPane; +import javafx.scene.control.cell.ComboBoxListCell; +import javafx.scene.layout.Border; +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Pane; +import javafx.scene.layout.VBox; +import javafx.util.StringConverter; + +public class EventManagerRenderer extends Pane implements IEngineAddon { + + private IEventManager eventManager; + + private Resource executedModel; + + private final ObservableList eventList = FXCollections.observableArrayList(); + + private final ObservableList pushedEvents = FXCollections.observableArrayList(); + + private final Map eventTypeToEventTableView = 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 BorderPane borderPane = new BorderPane(); + + private final Button pushButton = new Button("Push"); + + private final Button sendButton = new Button("Send"); + + private final HBox header = new HBox(); + + public EventManagerRenderer() { + getChildren().add(borderPane); + + borderPane.minWidthProperty().bind(widthProperty()); + borderPane.maxWidthProperty().bind(widthProperty()); + borderPane.minHeightProperty().bind(heightProperty()); + borderPane.maxHeightProperty().bind(heightProperty()); + + pushButton.setOnAction(e -> { + eventTypeToSelectedEvents.get(eventListView.getSelectionModel().getSelectedItem()).forEach(event -> { + pushedEvents.add(event); + }); + }); + + sendButton.setOnAction(e -> { + pushedEvents.forEach(eventManager::sendEvent); + pushedEvents.clear(); + }); + + header.getChildren().addAll(pushButton, sendButton); + + eventListView.setCellFactory((l) -> new ComboBoxListCell(new StringConverter() { + @Override + public String toString(EClass object) { + return object.getName(); + } + + @Override + public EClass fromString(String string) { + return null; + } + })); + + eventListView.getSelectionModel().selectedItemProperty().addListener((c, o, n) -> { + scrollPane.setContent(eventTypeToEventTableView.get(n)); + }); + + final VBox leftPanel = new VBox(); + leftPanel.getChildren().addAll(eventListView, pushedEventListView); + + borderPane.setTop(header); + borderPane.setLeft(leftPanel); + borderPane.setCenter(scrollPane); + + scrollPane.setFitToWidth(true); + scrollPane.setBorder(Border.EMPTY); + scrollPane.minHeightProperty().bind(leftPanel.heightProperty()); + scrollPane.maxHeightProperty().bind(leftPanel.heightProperty()); + final ListChangeListener eventTypesChangeListener = c -> { + while (c.next()) { + c.getRemoved().stream().forEach(e -> { + eventTypeToEventTableView.remove(e); + eventTypeToSelectedEvents.remove(e); + }); + c.getAddedSubList().stream().forEach(e -> { + final EventTableView tableView = new EventTableView(e, executedModel, eventManager); + eventTypeToEventTableView.put(e, tableView); + final List selectedEvents = new ArrayList<>(); + eventTypeToSelectedEvents.put(e, selectedEvents); + + final ListChangeListener selectedEventsChangeListener = c1 -> { + while (c1.next()) { + selectedEvents.removeAll(c1.getRemoved()); + selectedEvents.addAll(c1.getAddedSubList()); + } + }; + + tableView.getSelectionModel().getSelectedItems().addListener(selectedEventsChangeListener); + tableView.refreshEvents(); + tableView.minHeightProperty().bind(scrollPane.heightProperty().subtract(2)); + }); + } + }; + eventList.addListener(eventTypesChangeListener); + } + + public void setEventManager(IEventManager eventManager) { + Runnable runnable = () -> { + this.eventManager = eventManager; + eventList.clear(); + if (eventManager != null) { + eventList.addAll(this.eventManager.getEventClasses()); + } + }; + if (!Platform.isFxApplicationThread()) { + Platform.runLater(runnable); + } else { + runnable.run(); + } + } + + public void setExecutedModel(Resource executedModel) { + this.executedModel = executedModel; + } + + private void refreshEvents() { + eventTypeToEventTableView.entrySet().forEach(e -> { + final EventTableView tableView = e.getValue(); + tableView.refreshEvents(); + }); + final EClass selectedItem = eventListView.getSelectionModel().getSelectedItem(); + if (selectedItem != null) { + final EventTableView selectedTableView = eventTypeToEventTableView.get(selectedItem); + if (selectedTableView != null) { + scrollPane.setContent(selectedTableView); + } else { + scrollPane.setContent(null); + } + } + } + + @Override + public void engineAboutToStart(IExecutionEngine engine) { + } + + @Override + public void engineStarted(IExecutionEngine executionEngine) { + executedModel = executionEngine.getExecutionContext().getResourceModel(); + } + + @Override + public void engineInitialized(IExecutionEngine executionEngine) { + setEventManager(EventManagerRegistry.getInstance().findEventManager()); + } + + @Override + public void engineAboutToStop(IExecutionEngine engine) { + } + + @Override + public void engineStopped(IExecutionEngine engine) { + executedModel = null; + eventTypeToEventTableView.clear(); + Platform.runLater(() -> { + eventList.clear(); + scrollPane.setContent(null); + }); + } + + @Override + public void engineAboutToDispose(IExecutionEngine engine) { + } + + @Override + public void stepSelected(IExecutionEngine engine, Step selectedStep) { + } + + @Override + public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute) { + refreshEvents(); + } + + @Override + public void stepExecuted(IExecutionEngine engine, Step stepExecuted) { + refreshEvents(); + } + + @Override + public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus) { + } + + @Override + public List validate(List otherAddons) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void aboutToSelectStep(IExecutionEngine engine, Collection> steps) { + } + + @Override + public void proposedStepsChanged(IExecutionEngine engine, Collection> steps) { + } +} 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 new file mode 100644 index 000000000..e68c92458 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventManagerViewPart.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.eventmanager.views; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.gemoc.executionframework.ui.views.engine.EngineSelectionDependentViewPart; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; + +import javafx.embed.swt.FXCanvas; +import javafx.scene.Scene; + +public class EventManagerViewPart extends EngineSelectionDependentViewPart { + + /** + * The ID of the view as specified by the extension. + */ + public static final String ID = "org.eclipse.gemoc.executionframework.eventmanager.views.EventManager"; + + private FXCanvas fxCanvas; + + private EventManagerRenderer eventManagerRenderer; + + public void createPartControl(Composite parent) { + fxCanvas = new FXCanvas(parent, SWT.NONE); + eventManagerRenderer = new EventManagerRenderer(); + Scene scene = new Scene(eventManagerRenderer); + fxCanvas.setScene(scene); + + parent.getShell().addListener(SWT.Resize, (e) -> { + + }); + } + + public void setFocus() { + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + eventManagerRenderer.setExecutedModel(engine.getExecutionContext().getResourceModel()); + engine.getExecutionContext().getExecutionPlatform().addEngineAddon(eventManagerRenderer); + } +} 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 new file mode 100644 index 000000000..7b9d39a94 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventPane.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.eventmanager.views; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.resource.Resource; + +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) { + 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 new file mode 100644 index 000000000..bfbeb5622 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.eventmanager/src/org/eclipse/gemoc/executionframework/eventmanager/views/EventTableView.java @@ -0,0 +1,199 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.eventmanager.views; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EFactory; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.resource.Resource; +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; +import javafx.collections.FXCollections; +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.util.Callback; + +public class EventTableView extends TableView { + + private final EClass eventClass; + + private final EFactory factory; + + private final Resource executedModel; + + private final List eventParameterClasses = new ArrayList<>(); + + private final Map> referenceToMatchingModelElements = new HashMap<>(); + + private final ObservableList events = FXCollections.observableArrayList(); + + private final Function canDisplayEventFunction; + + public EventTableView(final EClass eventClass, final Resource executedModel, final IEventManager eventManager) { + this.eventClass = eventClass; + this.factory = eventClass.getEPackage().getEFactoryInstance(); + this.executedModel = executedModel; + eventParameterClasses + .addAll(eventClass.getEReferences().stream().map(r -> r.eClass()).collect(Collectors.toList())); + setItems(events); + + 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; + }); + + getColumns().setAll(columns); + + } + + 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()); + }); + return event; + }).filter(event -> canDisplayEventFunction.apply(event)).collect(Collectors.toList())); + }); + } + + private void gatherPotentialParameters() { + final List eventParameters = eventClass.getEReferences(); + 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 -> { + List elements = referenceToMatchingModelElements.get(r); + if (elements == null) { + elements = new ArrayList<>(); + referenceToMatchingModelElements.put(r, elements); + } + elements.add(modelElement); + }); + }); + } + + 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<>(); + for (Map.Entry> entry : entries) { + final List modelElements = entry.getValue(); + parametersAssociation.put(entry.getKey(), modelElements.get((i / j) % modelElements.size())); + j *= modelElements.size(); + } + result.add(parametersAssociation); + } + return result; + } + + static class EObjectPropertyValueFactory + implements Callback, ObservableValue> { + + private final EReference reference; + private final Function stringGetter; + private final DefaultDeclarativeQualifiedNameProvider nameprovider = new DefaultDeclarativeQualifiedNameProvider(); + + public EObjectPropertyValueFactory(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); + if (refValue != null) { + String string = stringGetter.apply(refValue); + ObservableValue result = new ReadOnlyObjectWrapper(string); + return result; + } + return null; + } + } +} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.checkstyle b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.checkstyle new file mode 100644 index 000000000..a16590b7c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.checkstyle @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.classpath similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/.classpath rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.classpath diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.project new file mode 100644 index 000000000..ad4e8ea25 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.executionframework.extensions.sirius + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/.settings/org.eclipse.jdt.core.prefs rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/META-INF/MANIFEST.MF new file mode 100644 index 000000000..bc7040783 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/META-INF/MANIFEST.MF @@ -0,0 +1,31 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Sirius +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.extensions.sirius;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.executionframework.extensions.sirius.Activator +Require-Bundle: org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.sirius.diagram.ui;bundle-version="4.0.0", + org.eclipse.sirius.common;bundle-version="1.0.1", + org.eclipse.gemoc.dsl.debug.ide.sirius.ui;bundle-version="1.0.0";visibility:=reexport, + org.eclipse.sirius.ecore.extender;bundle-version="2.0.3", + org.eclipse.xtext, + org.eclipse.debug.core;bundle-version="3.9.1", + org.eclipse.gemoc.dsl.debug;bundle-version="1.0.0", + org.eclipse.gemoc.dsl.debug.ide;bundle-version="1.0.0", + org.eclipse.gemoc.commons.eclipse, + org.eclipse.emf.codegen.ecore, + org.eclipse.emf.edit.ui, + org.eclipse.gemoc.executionframework.engine, + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0", + org.eclipse.ui.ide;bundle-version="3.10.2", + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0", + fr.inria.diverse.melange.resource;bundle-version="0.1.0", + fr.inria.diverse.melange.adapters +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.gemoc.executionframework.extensions.sirius, + org.eclipse.gemoc.executionframework.extensions.sirius.debug, + org.eclipse.gemoc.executionframework.extensions.sirius.modelloader, + org.eclipse.gemoc.executionframework.extensions.sirius.services +Import-Package: org.eclipse.gemoc.trace.commons.model.trace diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/about.html b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/about.html similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/about.html rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/about.html diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/build.properties new file mode 100644 index 000000000..53abd8f58 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + about.html +src.includes = about.html diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/icons/breakpoint_disabled.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint_disabled.gif similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/icons/breakpoint_disabled.gif rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint_disabled.gif diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/icons/breakpoint_enabled.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint_enabled.gif similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/icons/breakpoint_enabled.gif rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint_enabled.gif diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/plugin.xml new file mode 100644 index 000000000..6b368a54a --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/plugin.xml @@ -0,0 +1,22 @@ + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/pom.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/pom.xml new file mode 100644 index 000000000..d9e16fe58 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/pom.xml @@ -0,0 +1,38 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.executionframework + org.gemoc.modeldebugging.executionframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.executionframework.extensions.sirius + 2.3.0-SNAPSHOT + eclipse-plugin + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/Activator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/Activator.java new file mode 100644 index 000000000..343652302 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/Activator.java @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.extensions.sirius; + +import java.util.Map.Entry; + +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.common.util.URI; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.business.api.session.SessionManager; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchListener; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.executionframework.extensions.sirius"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + IWorkbench workbench = PlatformUI.getWorkbench(); + //final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage(); + workbench.addWorkbenchListener(new IWorkbenchListener() { + public boolean preShutdown(IWorkbench workbench, boolean forced) { + + // close all editors (a bit too strong ;-) ) + // activePage.closeEditors(activePage.getEditorReferences(), false); + + // try to close only Sirius sessions related to engines + for (Entry engineEntry : org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.getRunningEngines().entrySet()) + { + try{ + // stop any running engine + IExecutionEngine engine = engineEntry.getValue(); + if(engine.getRunningStatus() != RunStatus.Stopped){ + + engine.dispose(); + } + + // ensure to clear sirius session + URI uri = engine.getExecutionContext().getRunConfiguration().getAnimatorURI(); + if (uri != null) { + Session session = SessionManager.INSTANCE.getSession(uri, new NullProgressMonitor()); + session.close(new NullProgressMonitor()); + SessionManager.INSTANCE.remove(session); + } + + } catch (Exception e){ /* we don't care try the other */} + } + + return true; + } + public void postShutdown(IWorkbench workbench) { + } + }); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/debug/DebugSessionFactory.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/debug/DebugSessionFactory.java similarity index 98% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/debug/DebugSessionFactory.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/debug/DebugSessionFactory.java index 81d3e188f..d1aa0cf30 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/debug/DebugSessionFactory.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/debug/DebugSessionFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 THALES GLOBAL SERVICES. + * Copyright (c) 2008, 2017 THALES GLOBAL SERVICES. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.extensions.sirius.debug; +package org.eclipse.gemoc.executionframework.extensions.sirius.debug; import java.io.IOException; import java.io.InputStream; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionAuthority.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionAuthority.java similarity index 94% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionAuthority.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionAuthority.java index c8c0628ce..e956f30d9 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionAuthority.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionAuthority.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.extensions.sirius.modelloader; +package org.eclipse.gemoc.executionframework.extensions.sirius.modelloader; import java.util.Collection; import java.util.HashMap; @@ -19,7 +19,7 @@ import org.eclipse.sirius.ecore.extender.business.api.permission.IAuthorityListener; import org.eclipse.sirius.ecore.extender.business.api.permission.LockStatus; import org.eclipse.sirius.ecore.extender.business.internal.permission.AbstractPermissionAuthority; -import org.gemoc.xdsmlframework.api.core.IExecutionCheckpoint; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionCheckpoint; public class DebugPermissionAuthority extends AbstractPermissionAuthority implements IExecutionCheckpoint { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionProvider.java similarity index 91% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionProvider.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionProvider.java index c305e8dc7..f87b2f908 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionProvider.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.extensions.sirius.modelloader; +package org.eclipse.gemoc.executionframework.extensions.sirius.modelloader; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.URIConverter; @@ -17,7 +17,7 @@ import org.eclipse.sirius.business.api.session.SessionManager; import org.eclipse.sirius.ecore.extender.business.api.permission.IPermissionAuthority; import org.eclipse.sirius.ecore.extender.business.api.permission.IPermissionProvider; -import org.gemoc.xdsmlframework.api.core.IExecutionCheckpoint; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionCheckpoint; public class DebugPermissionProvider implements IPermissionProvider { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugURIHandler.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugURIHandler.java similarity index 90% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugURIHandler.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugURIHandler.java index 5067b0b0a..f7e161594 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugURIHandler.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DebugURIHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.extensions.sirius.modelloader; +package org.eclipse.gemoc.executionframework.extensions.sirius.modelloader; import java.io.IOException; import java.io.InputStream; @@ -41,7 +41,7 @@ public DebugURIHandler(EList uriHandlers) { @Override public boolean canHandle(URI uri) { - return !uri.fileExtension().equals("trace"); + return uri.fileExtension() == null || !uri.fileExtension().equals("trace"); } @Override 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 new file mode 100644 index 000000000..96820626d --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/DefaultModelLoader.java @@ -0,0 +1,522 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.extensions.sirius.modelloader; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.xmi.XMLResource; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette; +import org.eclipse.sirius.business.api.resource.ResourceDescriptor; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.business.api.session.SessionManager; +import org.eclipse.sirius.business.internal.session.SessionTransientAttachment; +import org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl; +import org.eclipse.sirius.common.tools.api.resource.ResourceSetFactory; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.DSemanticDiagram; +import org.eclipse.sirius.diagram.description.DiagramExtensionDescription; +import org.eclipse.sirius.diagram.description.Layer; +import org.eclipse.sirius.diagram.tools.api.command.ChangeLayerActivationCommand; +import org.eclipse.sirius.diagram.ui.business.internal.command.RefreshDiagramOnOpeningCommand; +import org.eclipse.sirius.diagram.ui.tools.api.editor.DDiagramEditor; +import org.eclipse.sirius.diagram.ui.tools.api.graphical.edit.palette.ToolFilter; +import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; +import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; +import org.eclipse.sirius.ui.business.api.session.IEditingSession; +import org.eclipse.sirius.ui.business.api.session.SessionUIManager; +import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.sirius.viewpoint.DRepresentationDescriptor; +import org.eclipse.sirius.viewpoint.DView; +import org.eclipse.sirius.viewpoint.description.RepresentationExtensionDescription; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.sirius.viewpoint.description.tool.AbstractToolDescription; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.PlatformUI; +import org.eclipse.xtext.resource.XtextPlatformResourceURIHandler; +import org.eclipse.xtext.util.StringInputStream; +import org.eclipse.gemoc.commons.eclipse.emf.EMFResource; +import org.eclipse.gemoc.executionframework.engine.core.CommandExecution; +import org.eclipse.gemoc.executionframework.extensions.sirius.Activator; +import org.eclipse.gemoc.executionframework.extensions.sirius.debug.DebugSessionFactory; +import org.eclipse.gemoc.executionframework.extensions.sirius.services.AbstractGemocAnimatorServices; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext; +import org.eclipse.gemoc.xdsmlframework.api.core.IModelLoader; + +import fr.inria.diverse.melange.adapters.EObjectAdapter; +import fr.inria.diverse.melange.resource.MelangeRegistry; +import fr.inria.diverse.melange.resource.MelangeResourceImpl; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.services.AbstractDSLDebuggerServices; + +/** + * Default and main class to load models for execution. Can load with or without + * Sirius animation (which opens a Sirius session) and with or without a Melange + * query (to upcast or convert to a supermetamodel (ie "downcast")) + * + * @author Didier Vojtisek + * @author Erwan Bousse + * + */ +@SuppressWarnings("restriction") +public class DefaultModelLoader implements IModelLoader { + + IProgressMonitor progressMonitor; + + @Override + public void setProgressMonitor(IProgressMonitor progressMonitor) { + this.progressMonitor = progressMonitor; + } + + /** + * Load the executed model without Sirius animation. + * + * @param context + * The ExecutionContext of the GEMOC execution, to access the + * model URI, the melange query, etc. + * @return the loaded Resource + * @throws RuntimeException + * if anything goes wrong (eg. the model cannot be found). + */ + public Resource loadModel(IExecutionContext context) throws RuntimeException { + return loadModel(context, false, progressMonitor); + } + + /** + * Load the executed model with Sirius animation. + * + * @param context + * The ExecutionContext of the GEMOC execution, to access the + * model URI, the melange query, etc. + * @return the loaded Resource (created by Sirius) + * @throws RuntimeException + * if anything goes wrong (eg. the model cannot be found) + */ + public Resource loadModelForAnimation(IExecutionContext context) throws RuntimeException { + return loadModel(context, true, progressMonitor); + } + + /** + * Common private method to load a model with or without animation. + * + * @param context + * The ExecutionContext of the GEMOC execution, to access the + * model URI, the melange query, etc. + * @param withAnimation + * True if the model should be loaded with animation, false + * otherwise. + * @return the loaded Resource + * @throws RuntimeException + * if anything goes wrong (eg. the model cannot be found) + */ + private static Resource loadModel(IExecutionContext context, boolean withAnimation, IProgressMonitor progressMonitor) throws RuntimeException { + + // Common part: preparing URI + resource set + SubMonitor subMonitor = SubMonitor.convert(progressMonitor, 10); + boolean useMelange = context.getRunConfiguration().getMelangeQuery() != null + && !context.getRunConfiguration().getMelangeQuery().isEmpty(); + URI modelURI = null; + if (useMelange) { + subMonitor.setTaskName("Loading model with melange"); + modelURI = context.getRunConfiguration().getExecutedModelAsMelangeURI(); + } else { + subMonitor.setTaskName("Loading model without melange"); + modelURI = context.getRunConfiguration().getExecutedModelURI(); + } + HashMap nsURIMapping = getnsURIMapping(context); + ResourceSet resourceSet = createAndConfigureResourceSet(modelURI, nsURIMapping, subMonitor); + + // If there is animation, we ask sirius to create the resource + if (withAnimation && context.getRunConfiguration().getAnimatorURI() != null) { + + try { + // Killing + restarting Sirius session for animation + killPreviousSiriusSession(context.getRunConfiguration().getAnimatorURI()); + openNewSiriusSession(context, context.getRunConfiguration().getAnimatorURI(), resourceSet, modelURI, + subMonitor); + + // At this point Sirius has loaded the model, we just need to + // find it + for (Resource r : resourceSet.getResources()) { + if (r.getURI().equals(modelURI)) { + return r; + } + } + } catch (CoreException e) { + throw new RuntimeException("The model could not be loaded.", e); + } + throw new RuntimeException("The model could not be loaded."); + } + + // 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; + } + + } + + private static void killPreviousSiriusSession(URI sessionResourceURI) { + final Session session = SessionManager.INSTANCE.getExistingSession(sessionResourceURI); + if (session != null) { + final IEditingSession uiSession = SessionUIManager.INSTANCE.getUISession(session); + DebugPermissionProvider permProvider = new DebugPermissionProvider(); + if (!permProvider.provides(session.getTransactionalEditingDomain().getResourceSet())) { + // this is a not debugSession (ie. a normal editing session) + if (uiSession != null) { + for (final DialectEditor editor : uiSession.getEditors()) { + final IEditorSite editorSite = editor.getEditorSite(); + if (editor.getSite() == null) { + editorSite.getShell().getDisplay().syncExec(new Runnable() { + @Override + public void run() { + editorSite.getPage().closeEditor(editor, true); + } + }); + } + } + PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { + @Override + public void run() { + uiSession.close(); + } + }); + } + } + PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { + @Override + public void run() { + session.close(new NullProgressMonitor()); + SessionManager.INSTANCE.remove(session); + } + }); + } + } + + private static Session openNewSiriusSession(final IExecutionContext context, URI sessionResourceURI, ResourceSet rs, + URI modelURI, SubMonitor subMonitor) 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); + + // force adaptee model resource in the main ResourceSet + if (r instanceof MelangeResourceImpl) { + MelangeResourceImpl mr = (MelangeResourceImpl) r; + rs.getResources().add(mr.getWrappedResource()); + if (!r.getContents().isEmpty() && r.getContents().get(0) instanceof EObjectAdapter) { + Resource realResource = ((EObjectAdapter) r.getContents().get(0)).getAdaptee().eResource(); + rs.getResources().add(realResource); + } + } + + // calculating aird URI + URI airdURI = sessionResourceURI; + + subMonitor.subTask("Creating Sirius session"); + subMonitor.newChild(1); + + // create sirius session + final Session session = DebugSessionFactory.INSTANCE.createSession(rs, airdURI); + final TransactionalEditingDomain editingDomain = session.getTransactionalEditingDomain(); + + if (r.getContents().size() > 0) { + + // get the used resource + Resource res = r.getContents().get(0).eResource(); + + // link the resource with Sirius session + res.eAdapters().add(new SessionTransientAttachment(session)); + RecordingCommand cmd = new RecordingCommand(editingDomain) { + @Override + protected void doExecute() { + DAnalysisSessionImpl sessionImpl = (DAnalysisSessionImpl) session; + EList srList = sessionImpl.getAnalyses().get(0).getSemanticResources(); + srList.clear(); + srList.add(new ResourceDescriptor(modelURI)); + } + }; + try { + CommandExecution.execute(editingDomain, cmd); + } catch (Exception e) { + throw new RuntimeException("Could not link the resource to the sirius session", e); + } + + } + + // load sirius session + subMonitor.subTask("Opening Sirius session"); + session.open(subMonitor.newChild(2)); + + // activating layers + subMonitor.subTask("Opening Sirius editors"); + SubMonitor openEditorSubMonitor = subMonitor.newChild(2); + + // for each representation in the selected views + for (DView view : session.getSelectedViews()) { + for (DRepresentationDescriptor repDescriptor : view.getOwnedRepresentationDescriptors()) { + DRepresentation representation = repDescriptor.getRepresentation(); + + final DSemanticDiagram diagram = (DSemanticDiagram) representation; + openEditorSubMonitor.subTask(diagram.getName()); + final List elements = new ArrayList(); + elements.add(diagram); + + final IEditorPart editorPart = DialectUIManager.INSTANCE.openEditor(session, representation, + openEditorSubMonitor.newChild(1)); + if (editorPart instanceof DDiagramEditor) { + ((DDiagramEditor) editorPart).getPaletteManager().addToolFilter(new ToolFilter() { + @Override + public boolean filter(DDiagram diagram, AbstractToolDescription tool) { + return true; + } + }); + } + try { + RefreshDiagramOnOpeningCommand refresh = new RefreshDiagramOnOpeningCommand(editingDomain, diagram); + CommandExecution.execute(editingDomain, refresh); + } catch (Exception e) { + Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, + "Problem refreshing diagrams : " + diagram, e)); + } + + if (editorPart instanceof DiagramEditorWithFlyOutPalette) { + PaletteUtils.colapsePalette((DiagramEditorWithFlyOutPalette) editorPart); + } + + RecordingCommand command = new RecordingCommand(editingDomain, "Activating animator and debug layers") { + @Override + protected void doExecute() { + boolean hasADebugLayer = false; + Set layers = new HashSet(); + layers.addAll(diagram.getDescription().getAdditionalLayers()); + Collection selectedVp = session.getSelectedViewpoints(true); + for (Viewpoint vp : selectedVp) { + for (RepresentationExtensionDescription extension : vp.getOwnedRepresentationExtensions()) { + if (extension instanceof DiagramExtensionDescription) { + layers.addAll(((DiagramExtensionDescription) extension).getLayers()); + } + } + } + for (Layer l : layers) { + String descName = diagram.getDescription().getName(); + String layerName = l.getName(); + boolean mustBeActiveForDebug = AbstractDSLDebuggerServices.LISTENER + .isRepresentationToRefresh(context.getRunConfiguration().getDebugModelID(), + descName, layerName) + || layerName.equalsIgnoreCase("Debug"); + boolean mustBeActiveForAnimation = AbstractGemocAnimatorServices.ANIMATOR + .isRepresentationToRefresh(descName, layerName) + || layerName.equalsIgnoreCase("Animation"); + boolean mustBeActive = mustBeActiveForAnimation || mustBeActiveForDebug; + hasADebugLayer = hasADebugLayer || mustBeActiveForDebug; + if (mustBeActive && !diagram.getActivatedLayers().contains(l)) { + ChangeLayerActivationCommand c = new ChangeLayerActivationCommand(editingDomain, + diagram, l, openEditorSubMonitor.newChild(1)); + c.execute(); + } + } + if (!hasADebugLayer) { + // no debug layer defined in the odesign for + // debugmodelID + Activator.getDefault().getLog() + .log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, + "No debug service defined in the odesign for the debug model id : " + + context.getRunConfiguration().getDebugModelID())); + } + } + }; + CommandExecution.execute(editingDomain, command); + } + } + + return session; + } + + private static ResourceSet createAndConfigureResourceSet(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 + // use to resolve cross ref URI during XMI parsing + final XMLURIHandler handler = new XMLURIHandler(modelURI.query(), fileExtension); + handler.setResourceSet(rs); + rs.getLoadOptions().put(XMLResource.OPTION_URI_HANDLER, handler); + + final MelangeURIConverter converter = new MelangeURIConverter(nsURIMapping); + rs.setURIConverter(converter); + // fix sirius to prevent non intentional model savings + converter.getURIHandlers().add(0, new DebugURIHandler(converter.getURIHandlers())); + + return rs; + } + + // TODO must be extended to support more complex mappings, currently use + // only the first package in the genmodel + protected static HashMap getnsURIMapping(IExecutionContext context) { + HashMap nsURIMapping = new HashMap(); + + final String langQuery = "lang="; + String melangeQuery = context.getRunConfiguration().getExecutedModelAsMelangeURI().query(); + if (melangeQuery != null && !melangeQuery.isEmpty() && melangeQuery.contains(langQuery)) { + + String targetLanguage = melangeQuery.substring(melangeQuery.indexOf(langQuery) + langQuery.length()); + if (targetLanguage.contains("&")) { + targetLanguage = targetLanguage.substring(0, targetLanguage.indexOf("&")); + } + String targetLanguageNsURI = MelangeRegistry.INSTANCE.getLanguageByIdentifier(targetLanguage).getUri(); + + // simply open the original model file in a separate ResourceSet + // and ask its root element class nsURI + Object o = EMFResource.getFirstContent(context.getRunConfiguration().getExecutedModelURI()); + if (o instanceof EObject) { + EPackage rootPackage = ((EObject) o).eClass().getEPackage(); + while (rootPackage.getESuperPackage() != null) { + rootPackage = rootPackage.getESuperPackage(); + } + nsURIMapping.put(rootPackage.getNsURI(), targetLanguageNsURI); + } + } + + return nsURIMapping; + } + + private static class MelangeURIConverter extends ExtensibleURIConverterImpl { + + private HashMap _nsURIMapping; + + MelangeURIConverter(HashMap nsURIMapping) { + _nsURIMapping = nsURIMapping; + } + + @Override + public InputStream createInputStream(URI uri, Map options) throws IOException { + InputStream result = null; + + // do not modify content of files loaded using melange:/ scheme + // melange is supposed to do the job + // if (uri.scheme()!= null && uri.scheme().equals("melange")) { + // return super.createInputStream(uri); + // } + if (uri.fileExtension() == null || !uri.fileExtension().equals("aird")) { + // only the root aird must be adapted + return super.createInputStream(uri, options); + } + + InputStream originalInputStream = null; + try { + originalInputStream = super.createInputStream(uri, options); + String originalContent = convertStreamToString(originalInputStream); + String modifiedContent = originalContent; + for (Entry entry : _nsURIMapping.entrySet()) { + modifiedContent = modifiedContent.replace(entry.getKey(), entry.getValue()); + } + result = new StringInputStream(modifiedContent); + return result; + } finally { + if (originalInputStream != null) { + originalInputStream.close(); + } + } + + } + + private static String convertStreamToString(java.io.InputStream is) { + java.util.Scanner s1 = new java.util.Scanner(is); + java.util.Scanner s2 = s1.useDelimiter("\\A"); + String result = s2.hasNext() ? s2.next() : ""; + s1.close(); + s2.close(); + return result; + } + } + + /** + * change scheme to melange:// for files with the given fileextension when a + * melange query is active + * + * @author dvojtise + * + */ + private static class XMLURIHandler extends XtextPlatformResourceURIHandler { + + private String _queryParameters; + private String _fileExtension; + + XMLURIHandler(String queryParameters, String fileExtension) { + _queryParameters = queryParameters; + if (_queryParameters == null) + _queryParameters = ""; + else + _queryParameters = "?" + _queryParameters; + _fileExtension = fileExtension; + } + + @Override + public URI resolve(URI uri) { + URI resolvedURI = super.resolve(uri); + if (!_queryParameters.isEmpty() && resolvedURI.scheme() != null && !resolvedURI.scheme().equals("melange") + && resolvedURI.fileExtension() != null && resolvedURI.fileExtension().equals(_fileExtension)) { + + String fileExtensionWithPoint = "." + _fileExtension; + int lastIndexOfFileExtension = resolvedURI.toString().lastIndexOf(fileExtensionWithPoint); + String part1 = resolvedURI.toString().substring(0, lastIndexOfFileExtension); + part1 = part1.replaceFirst("platform:/", "melange:/"); + String part2 = fileExtensionWithPoint + _queryParameters; + String part3 = resolvedURI.toString() + .substring(lastIndexOfFileExtension + fileExtensionWithPoint.length()); + String newURIAsString = part1 + part2 + part3; + return URI.createURI(newURIAsString); + } + return resolvedURI; + } + } + + + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/PaletteUtils.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/PaletteUtils.java similarity index 95% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/PaletteUtils.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/PaletteUtils.java index e57a74d32..07e0d5021 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/PaletteUtils.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/modelloader/PaletteUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.extensions.sirius.modelloader; +package org.eclipse.gemoc.executionframework.extensions.sirius.modelloader; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/AbstractGemocAnimatorServices.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/AbstractGemocAnimatorServices.java similarity index 85% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/AbstractGemocAnimatorServices.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/AbstractGemocAnimatorServices.java index 1666f9225..3f4c598c6 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/AbstractGemocAnimatorServices.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/AbstractGemocAnimatorServices.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.extensions.sirius.services; +package org.eclipse.gemoc.executionframework.extensions.sirius.services; import java.util.ArrayList; import java.util.Collection; @@ -17,8 +17,11 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.ResourceSet; @@ -35,15 +38,15 @@ import org.eclipse.sirius.ui.business.api.session.SessionUIManager; import org.eclipse.sirius.viewpoint.DRepresentation; import org.eclipse.sirius.viewpoint.description.RepresentationDescription; -import org.gemoc.executionframework.engine.core.CommandExecution; -import org.gemoc.executionframework.extensions.sirius.services.AbstractGemocDebuggerServices.BreakpointListener; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.executionframework.engine.core.CommandExecution; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.Activator; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; +import org.eclipse.gemoc.trace.commons.model.trace.ParallelStep; +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; public abstract class AbstractGemocAnimatorServices { @@ -155,7 +158,13 @@ public void refreshRepresentations( transactionalEditingDomain, new NullProgressMonitor(), representations); - CommandExecution.execute(transactionalEditingDomain, refresh); + try { + CommandExecution.execute(transactionalEditingDomain, refresh); + } catch (Exception e){ + String repString = representations.stream().map(r -> r.getName()).collect(Collectors.joining(", ")); + Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "Failed to refresh Sirius representation(s)["+repString+"], we hope to be able to do it later", e)); + } + } } @@ -272,12 +281,21 @@ public void addRepresentationToRefresh(String representationID, } @Override - public void activate(Object context, Step step) { + public void activate(Object context, Step step) { final Set instructionURIs = new HashSet(); MSEOccurrence mseOccurrence = step.getMseoccurrence(); if (mseOccurrence != null && mseOccurrence.getMse() != null && mseOccurrence.getMse().getCaller() != null) { instructionURIs.add(EcoreUtil.getURI(mseOccurrence.getMse().getCaller())); } + if(step instanceof ParallelStep){ + for(Step substep: ((ParallelStep)step).getSubSteps()){ + if (substep.getMseoccurrence() != null && + substep.getMseoccurrence().getMse() != null && + substep.getMseoccurrence().getMse().getCaller() != null) { + instructionURIs.add(EcoreUtil.getURI(substep.getMseoccurrence().getMse().getCaller())); + } + } + } clear(context); Set oldInstructions = activatedInstructions.get(context); if (oldInstructions == null) { @@ -345,7 +363,7 @@ public boolean isRepresentationToRefresh(String representationId, } @Override - public void proposedStepsChanged(IExecutionEngine engine, Collection logicalSteps) { + public void proposedStepsChanged(IExecutionEngine engine, Collection> logicalSteps) { } @Override @@ -366,20 +384,22 @@ public List validate(List otherAddons) { } @Override - public void aboutToSelectStep(IExecutionEngine engine, Collection logicalSteps) { + public void aboutToSelectStep(IExecutionEngine engine, Collection> logicalSteps) { } @Override - public void stepSelected(IExecutionEngine engine, Step selectedLogicalStep) { + public void stepSelected(IExecutionEngine engine, Step selectedLogicalStep) { } @Override - public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute) { - activate(engine, stepToExecute); + public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute) { + if(!(stepToExecute.eContainer() instanceof ParallelStep)){ + activate(engine, stepToExecute); + } } @Override - public void stepExecuted(IExecutionEngine engine, Step stepExecuted) { + public void stepExecuted(IExecutionEngine engine, Step stepExecuted) { } } @@ -428,6 +448,9 @@ public static IModelAnimator getAnimator() { * Tells if the given {@link EObject instruction} is a currently * {@link IModelAnimator#activate(LogicalStep) activated}. * + * This service works in a similar way as {@link AbstractGemocDebuggerServices isCurrentInstruction} + * but will be activated even if the engine in not paused in order to act as an animation. + * * @param instruction * the {@link EObject instruction} * @return true if the given {@link EObject instruction} is a diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/AbstractGemocDebuggerServices.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/AbstractGemocDebuggerServices.java new file mode 100644 index 000000000..2323b5475 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/AbstractGemocDebuggerServices.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.extensions.sirius.services; + +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.services.AbstractDSLDebuggerServices; + +public abstract class AbstractGemocDebuggerServices extends AbstractDSLDebuggerServices{ + + /** + * Gets the debug model identifier. + * + * @return the debug model identifier + */ + public abstract String getModelIdentifier(); + +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/IModelAnimator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/IModelAnimator.java similarity index 77% rename from framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/IModelAnimator.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/IModelAnimator.java index 7895062d2..09f12920a 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/IModelAnimator.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.extensions.sirius/src/org/eclipse/gemoc/executionframework/extensions/sirius/services/IModelAnimator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.extensions.sirius.services; +package org.eclipse.gemoc.executionframework.extensions.sirius.services; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -import fr.inria.diverse.trace.commons.model.trace.Step; +import org.eclipse.gemoc.trace.commons.model.trace.Step; /** * Animator interface. @@ -30,7 +30,7 @@ public interface IModelAnimator extends IEngineAddon { * @param context * the context {@link Object} */ - void activate(Object context, Step step); + void activate(Object context, Step step); /** * Clears {@link IModelAnimator#activate(LogicalStep) activated} diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.checkstyle b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.checkstyle new file mode 100644 index 000000000..a16590b7c --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.checkstyle @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/.classpath b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.classpath similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/.classpath rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.classpath diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/.gitignore b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.gitignore similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/.gitignore rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.gitignore diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.project b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.project new file mode 100644 index 000000000..6b3939997 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.executionframework.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/.settings/org.eclipse.jdt.core.prefs rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/META-INF/MANIFEST.MF new file mode 100644 index 000000000..85e470245 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Execution framework UI +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.executionframework.ui.Activator +Require-Bundle: org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.commons.eclipse, + org.eclipse.core.runtime;bundle-version="3.10.0", + org.eclipse.core.resources;bundle-version="3.9.1", + org.eclipse.ui.workbench, + org.eclipse.jface, + org.eclipse.gemoc.executionframework.engine;bundle-version="0.1.0", + org.eclipse.gemoc.commons.eclipse.ui;bundle-version="0.1.0", + org.eclipse.xtext.util, + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-Vendor: GEMOC +Export-Package: org.eclipse.gemoc.executionframework.ui, + org.eclipse.gemoc.executionframework.ui.utils, + org.eclipse.gemoc.executionframework.ui.views.engine, + org.eclipse.gemoc.executionframework.ui.views.engine.actions, + org.eclipse.gemoc.executionframework.ui.xdsml.activefile + diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/about.html b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/about.html similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/about.html rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/about.html diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/build.properties b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/build.properties new file mode 100644 index 000000000..f97be2687 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + icons/,\ + plugin.xml,\ + about.html +src.includes = about.html diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/icons/IconeGemocModel-16.png b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/IconeGemocModel-16.png similarity index 100% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/icons/IconeGemocModel-16.png rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/IconeGemocModel-16.png diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/resume_co.png b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/resume_co.png similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/resume_co.png rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/resume_co.png diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/services-16-blue.png b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/services-16-blue.png similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/services-16-blue.png rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/services-16-blue.png diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/services-16-green.png b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/services-16-green.png similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/services-16-green.png rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/services-16-green.png diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/services-16-red.png b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/services-16-red.png similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/services-16-red.png rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/services-16-red.png diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/settings-5-16.png b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/settings-5-16.png similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/settings-5-16.png rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/settings-5-16.png diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/suspend_co.png b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/suspend_co.png similarity index 100% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/icons/suspend_co.png rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/icons/suspend_co.png diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/plugin.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/plugin.xml new file mode 100644 index 000000000..f02b95865 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/plugin.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/pom.xml b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/pom.xml new file mode 100644 index 000000000..673dcbc06 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/pom.xml @@ -0,0 +1,38 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.executionframework + org.gemoc.modeldebugging.executionframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.executionframework.ui + 2.3.0-SNAPSHOT + eclipse-plugin + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/Activator.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/Activator.java new file mode 100644 index 000000000..ba999f234 --- /dev/null +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/Activator.java @@ -0,0 +1,134 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.ui; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.eclipse.gemoc.executionframework.ui.views.engine.EngineSelectionManager; +import org.osgi.framework.BundleContext; + + +/** + * The activator class controls the plug-in life cycle + * + * @author dvojtise + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.gemoc.gemoc_language_workbench.ui"; //$NON-NLS-1$ + + public static final String GEMOC_PROJECT_CONFIGURATION_FILE_EXTENSION = "xdsml"; + public static final String GEMOC_PROJECT_CONFIGURATION_FILE = "project." + + GEMOC_PROJECT_CONFIGURATION_FILE_EXTENSION; + + // extension point constants + + + public static final String MODEL_LOADER_CLASS_NAMEPART = "ModelLoader"; + public static final String CODEEXECUTOR_CLASS_NAMEPART = "CodeExecutor"; + public static final String SOLVER_CLASS_NAMEPART = "Solver"; + public static final String EXTENSION_GENERATED_CLASS_FOLDER_NAME = "src/main/xdsml-java-gen/"; + + // The shared instance + private static Activator plugin; + + private final EngineSelectionManager engineSelectionManager = new EngineSelectionManager(); + + + + + private final List eventPresenters = new ArrayList<>(); + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + /* (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given plug-in + * relative path + * + * @param path + * the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + public static void warn(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); + } + + public static void error(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); + } + + + + /** + * Gets the {@link List} of registered {@link IMSEPresenter}s. + * + * @return the {@link List} of registered {@link IMSEPresenter}s + */ + public List getEventPresenters() { + return eventPresenters; + } + + + public EngineSelectionManager getEngineSelectionManager() { + return engineSelectionManager; + } +} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/IMSEPresenter.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/IMSEPresenter.java similarity index 91% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/IMSEPresenter.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/IMSEPresenter.java index 246981b19..481420450 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/IMSEPresenter.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/IMSEPresenter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui; +package org.eclipse.gemoc.executionframework.ui; import java.util.List; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/SharedIcons.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/SharedIcons.java similarity index 94% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/SharedIcons.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/SharedIcons.java index dbd4f0514..592b3b4b8 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/SharedIcons.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/SharedIcons.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui; +package org.eclipse.gemoc.executionframework.ui; import java.util.HashMap; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/utils/ENamedElementQualifiedNameLabelProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/utils/ENamedElementQualifiedNameLabelProvider.java similarity index 91% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/utils/ENamedElementQualifiedNameLabelProvider.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/utils/ENamedElementQualifiedNameLabelProvider.java index 739997c91..23e38533c 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/utils/ENamedElementQualifiedNameLabelProvider.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/utils/ENamedElementQualifiedNameLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.utils; +package org.eclipse.gemoc.executionframework.ui.utils; import org.eclipse.emf.ecore.ENamedElement; import org.eclipse.jface.viewers.LabelProvider; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/utils/ViewUtils.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/utils/ViewUtils.java similarity index 86% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/utils/ViewUtils.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/utils/ViewUtils.java index 1041b69a7..8e841f568 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/utils/ViewUtils.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/utils/ViewUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.utils; +package org.eclipse.gemoc.executionframework.ui.utils; import org.eclipse.xtext.util.SimpleAttributeResolver; -import fr.inria.diverse.trace.commons.model.trace.MSE; +import org.eclipse.gemoc.trace.commons.model.trace.MSE; public class ViewUtils { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EngineSelectionDependentViewPart.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EngineSelectionDependentViewPart.java similarity index 87% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EngineSelectionDependentViewPart.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EngineSelectionDependentViewPart.java index 81674bd27..70368cebb 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EngineSelectionDependentViewPart.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EngineSelectionDependentViewPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine; +package org.eclipse.gemoc.executionframework.ui.views.engine; import org.eclipse.ui.IViewSite; import org.eclipse.ui.PartInitException; import org.eclipse.ui.part.ViewPart; -import org.gemoc.commons.eclipse.ui.ViewHelper; -import org.gemoc.executionframework.ui.Activator; +import org.eclipse.gemoc.commons.eclipse.ui.ViewHelper; +import org.eclipse.gemoc.executionframework.ui.Activator; /** * Views that are dependent on the engine selection in the EnginesStatusView may subclass this to get registered to it diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EngineSelectionManager.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EngineSelectionManager.java similarity index 91% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EngineSelectionManager.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EngineSelectionManager.java index ec333a820..e6768b6fb 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EngineSelectionManager.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EngineSelectionManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,12 +8,12 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine; +package org.eclipse.gemoc.executionframework.ui.views.engine; import java.util.ArrayList; import java.util.List; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; /** * This class is in charge of knowing what was the last selected engine and keeping the list of all EngineSelectionListener diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EnginesStatusView.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EnginesStatusView.java similarity index 80% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EnginesStatusView.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EnginesStatusView.java index a29c00794..bee082261 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/EnginesStatusView.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/EnginesStatusView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine; +package org.eclipse.gemoc.executionframework.ui.views.engine; import java.util.ArrayList; import java.util.Collection; @@ -36,28 +36,28 @@ import org.eclipse.ui.IActionBars; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.part.ViewPart; -import org.gemoc.commons.eclipse.ui.TreeViewerHelper; -import org.gemoc.executionframework.engine.core.GemocRunningEnginesRegistry; -import org.gemoc.executionframework.engine.core.IEngineRegistrationListener; -import org.gemoc.executionframework.ui.Activator; -import org.gemoc.executionframework.ui.SharedIcons; -import org.gemoc.executionframework.ui.views.engine.actions.DisposeAllStoppedEnginesAction; -import org.gemoc.executionframework.ui.views.engine.actions.DisposeStoppedEngineAction; -//import org.gemoc.executionframework.ui.views.engine.actions.PauseResumeEngineDeciderAction; -import org.gemoc.executionframework.ui.views.engine.actions.StopEngineAction; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -//import org.gemoc.executionframework.ui.views.engine.actions.SwitchDeciderAction; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; - -import fr.inria.diverse.trace.commons.model.trace.Step; +import org.eclipse.gemoc.commons.eclipse.ui.TreeViewerHelper; +import org.eclipse.gemoc.executionframework.engine.core.GemocRunningEnginesRegistry; +import org.eclipse.gemoc.executionframework.engine.core.IEngineRegistrationListener; +import org.eclipse.gemoc.executionframework.ui.Activator; +import org.eclipse.gemoc.executionframework.ui.SharedIcons; +import org.eclipse.gemoc.executionframework.ui.views.engine.actions.DisposeAllStoppedEnginesAction; +import org.eclipse.gemoc.executionframework.ui.views.engine.actions.DisposeStoppedEngineAction; +//import org.eclipse.gemoc.executionframework.ui.views.engine.actions.PauseResumeEngineDeciderAction; +import org.eclipse.gemoc.executionframework.ui.views.engine.actions.StopEngineAction; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +//import org.eclipse.gemoc.executionframework.ui.views.engine.actions.SwitchDeciderAction; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; + +import org.eclipse.gemoc.trace.commons.model.trace.Step; public class EnginesStatusView extends ViewPart implements IEngineAddon, IEngineRegistrationListener { /** * The ID of the view as specified by the extension. */ - public static final String ID = "org.gemoc.executionframework.ui.views.engine.EnginesStatusView"; + public static final String ID = "org.eclipse.gemoc.executionframework.ui.views.engine.EnginesStatusView"; public TreeViewer _viewer; private ViewContentProvider _contentProvider; @@ -70,8 +70,8 @@ public EnginesStatusView() { @Override public void dispose() { -// org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.deleteObserver(this); - org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.removeEngineRegistrationListener(this); +// org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.deleteObserver(this); + org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.removeEngineRegistrationListener(this); super.dispose(); } @@ -98,14 +98,14 @@ public void selectionChanged(SelectionChangedEvent event) { _viewer.getTree().setFont(mono); // Create the help context id for the viewer's control - PlatformUI.getWorkbench().getHelpSystem().setHelp(_viewer.getControl(), "org.gemoc.executionframework.ui.views.engine.EngineStatusView"); + PlatformUI.getWorkbench().getHelpSystem().setHelp(_viewer.getControl(), "org.eclipse.gemoc.executionframework.ui.views.engine.EngineStatusView"); // register for changes in the RunningEngineRegistry - //org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.addObserver(this); + //org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.addObserver(this); buildMenu(); - org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.addEngineRegistrationListener(this); + org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.addEngineRegistrationListener(this); } private void buildMenu() @@ -249,7 +249,7 @@ public String getToolTipText(Object element) if (element instanceof IExecutionEngine) { IExecutionEngine engine = (IExecutionEngine)element; - GemocRunningEnginesRegistry registry = org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry; + GemocRunningEnginesRegistry registry = org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry; for (Entry e : registry.getRunningEngines().entrySet()) { if (e.getValue() == engine) @@ -331,18 +331,18 @@ public void removeStoppedEngines(){ public void run() { // we may be triggered by a registry change or by an engine change // if registry changes, then may need to observe the new engine - for (Entry engineEntry : org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.getRunningEngines().entrySet()) + for (Entry engineEntry : org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.getRunningEngines().entrySet()) { switch(engineEntry.getValue().getRunningStatus()) { case Stopped: engineEntry.getValue().dispose(); - org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.unregisterEngine(engineEntry.getKey()); + org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.unregisterEngine(engineEntry.getKey()); break; default: } } - _viewer.setInput(org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry); + _viewer.setInput(org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry); } }); } @@ -365,7 +365,7 @@ public void engineRegistered(final IExecutionEngine engine) Display.getDefault().syncExec(new Runnable() { public void run() { engine.getExecutionContext().getExecutionPlatform().addEngineAddon(EnginesStatusView.this); - _viewer.setInput(org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry); + _viewer.setInput(org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry); TreeViewerHelper.resizeColumns(_viewer); TreePath treePath = new TreePath(new Object[] {engine}); TreeSelection newSelection = new TreeSelection(treePath); @@ -410,7 +410,7 @@ public void engineStarted(IExecutionEngine engine) } @Override - public void aboutToExecuteStep(IExecutionEngine executionEngine, Step logicalStepToApply) + public void aboutToExecuteStep(IExecutionEngine executionEngine, Step logicalStepToApply) { } @@ -426,19 +426,19 @@ public void engineStopped(IExecutionEngine engine) } @Override - public void aboutToSelectStep(IExecutionEngine engine, Collection logicalSteps) + public void aboutToSelectStep(IExecutionEngine engine, Collection> logicalSteps) { reselectEngine(engine); } @Override - public void stepSelected(IExecutionEngine engine, Step selectedLogicalStep) { + public void stepSelected(IExecutionEngine engine, Step selectedLogicalStep) { // TODO Auto-generated method stub } @Override - public void stepExecuted(IExecutionEngine engine, Step logicalStepExecuted) { + public void stepExecuted(IExecutionEngine engine, Step logicalStepExecuted) { reselectEngine(engine); // need to update the executed step count in the view } @@ -450,7 +450,7 @@ public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus) { } @Override - public void proposedStepsChanged(IExecutionEngine engine, Collection logicalSteps) { + public void proposedStepsChanged(IExecutionEngine engine, Collection> logicalSteps) { reselectEngine(engine); } diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/IEngineSelectionListener.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/IEngineSelectionListener.java similarity index 79% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/IEngineSelectionListener.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/IEngineSelectionListener.java index 57ec03041..64513bde0 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/IEngineSelectionListener.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/IEngineSelectionListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,9 +8,9 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine; +package org.eclipse.gemoc.executionframework.ui.views.engine; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; public interface IEngineSelectionListener { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/ViewContentProvider.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/ViewContentProvider.java similarity index 82% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/ViewContentProvider.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/ViewContentProvider.java index 73b4ae845..2836b4f67 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/ViewContentProvider.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/ViewContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine; +package org.eclipse.gemoc.executionframework.ui.views.engine; import java.util.ArrayList; import java.util.Collections; @@ -17,8 +17,8 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; -import org.gemoc.executionframework.engine.core.GemocRunningEnginesRegistry; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.executionframework.engine.core.GemocRunningEnginesRegistry; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; class ViewContentProvider implements ITreeContentProvider { @@ -32,7 +32,7 @@ public void dispose() { public Object[] getElements(Object parent) { if (parent instanceof GemocRunningEnginesRegistry) { - GemocRunningEnginesRegistry registry = org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry; + GemocRunningEnginesRegistry registry = org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry; List engines = new ArrayList(registry.getRunningEngines().values()); Collections.sort(engines, getComparator()); return engines.toArray(); diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/AbstractEngineAction.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/AbstractEngineAction.java similarity index 83% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/AbstractEngineAction.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/AbstractEngineAction.java index 128880b64..41a0ab977 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/AbstractEngineAction.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/AbstractEngineAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine.actions; +package org.eclipse.gemoc.executionframework.ui.views.engine.actions; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IMenuCreator; @@ -16,11 +16,11 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; import org.eclipse.ui.IWorkbenchPartSite; -import org.gemoc.executionframework.ui.Activator; -import org.gemoc.executionframework.ui.views.engine.IEngineSelectionListener; -import org.gemoc.xdsmlframework.api.core.ExecutionMode; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.executionframework.ui.Activator; +import org.eclipse.gemoc.executionframework.ui.views.engine.IEngineSelectionListener; +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; public abstract class AbstractEngineAction extends Action implements IMenuCreator, IEngineSelectionListener{ diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/DisposeAllStoppedEnginesAction.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/DisposeAllStoppedEnginesAction.java similarity index 77% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/DisposeAllStoppedEnginesAction.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/DisposeAllStoppedEnginesAction.java index e868f0f55..22e402aec 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/DisposeAllStoppedEnginesAction.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/DisposeAllStoppedEnginesAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,14 +8,14 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine.actions; +package org.eclipse.gemoc.executionframework.ui.views.engine.actions; import org.eclipse.jface.action.Action; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.ISharedImages; -import org.gemoc.commons.eclipse.ui.ViewHelper; -import org.gemoc.executionframework.ui.Activator; -import org.gemoc.executionframework.ui.views.engine.EnginesStatusView; +import org.eclipse.gemoc.commons.eclipse.ui.ViewHelper; +import org.eclipse.gemoc.executionframework.ui.Activator; +import org.eclipse.gemoc.executionframework.ui.views.engine.EnginesStatusView; public class DisposeAllStoppedEnginesAction extends Action { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/DisposeStoppedEngineAction.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/DisposeStoppedEngineAction.java similarity index 78% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/DisposeStoppedEngineAction.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/DisposeStoppedEngineAction.java index f91727b2f..bbc626128 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/DisposeStoppedEngineAction.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/DisposeStoppedEngineAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,15 +8,15 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine.actions; +package org.eclipse.gemoc.executionframework.ui.views.engine.actions; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.ISharedImages; -import org.gemoc.commons.eclipse.ui.ViewHelper; -import org.gemoc.executionframework.ui.Activator; -import org.gemoc.executionframework.ui.views.engine.EnginesStatusView; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.commons.eclipse.ui.ViewHelper; +import org.eclipse.gemoc.executionframework.ui.Activator; +import org.eclipse.gemoc.executionframework.ui.views.engine.EnginesStatusView; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; public class DisposeStoppedEngineAction extends AbstractEngineAction { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/StopEngineAction.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/StopEngineAction.java similarity index 77% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/StopEngineAction.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/StopEngineAction.java index 80b8a47cc..48a4f55cf 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/views/engine/actions/StopEngineAction.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/views/engine/actions/StopEngineAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,15 +8,15 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.views.engine.actions; +package org.eclipse.gemoc.executionframework.ui.views.engine.actions; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.ISharedImages; -import org.gemoc.commons.eclipse.ui.ViewHelper; -import org.gemoc.executionframework.ui.Activator; -import org.gemoc.executionframework.ui.views.engine.EnginesStatusView; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.commons.eclipse.ui.ViewHelper; +import org.eclipse.gemoc.executionframework.ui.Activator; +import org.eclipse.gemoc.executionframework.ui.views.engine.EnginesStatusView; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; public class StopEngineAction extends AbstractEngineAction { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFile.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFile.java similarity index 88% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFile.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFile.java index 79ce205b2..11a163a27 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFile.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.xdsml.activefile; +package org.eclipse.gemoc.executionframework.ui.xdsml.activefile; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFileEcore.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFileEcore.java similarity index 83% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFileEcore.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFileEcore.java index 321464854..a60b3c1db 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFileEcore.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFileEcore.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.xdsml.activefile; +package org.eclipse.gemoc.executionframework.ui.xdsml.activefile; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.executionframework.ui.Activator; +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.executionframework.ui.Activator; public class ActiveFileEcore extends ActiveFile { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFileGenmodel.java b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFileGenmodel.java similarity index 83% rename from framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFileGenmodel.java rename to framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFileGenmodel.java index 33d3a39a4..81cd83f33 100644 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/xdsml/activefile/ActiveFileGenmodel.java +++ b/framework/execution_framework/plugins/org.eclipse.gemoc.executionframework.ui/src/org/eclipse/gemoc/executionframework/ui/xdsml/activefile/ActiveFileGenmodel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.executionframework.ui.xdsml.activefile; +package org.eclipse.gemoc.executionframework.ui.xdsml.activefile; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.executionframework.ui.Activator; +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.executionframework.ui.Activator; public class ActiveFileGenmodel extends ActiveFileEcore { diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.classpath b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.classpath deleted file mode 100644 index 96d4ad218..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.classpath +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.project b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.project deleted file mode 100644 index a1b91a0b9..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/.project +++ /dev/null @@ -1,40 +0,0 @@ - - - org.gemoc.executionframework.engine.ui - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - net.sourceforge.metrics.builder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - net.sourceforge.metrics.nature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 365dccd72..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,44 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Execution Engine UI -Bundle-SymbolicName: org.gemoc.executionframework.engine.ui;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.executionframework.engine.ui.Activator -Require-Bundle: org.gemoc.xdsmlframework.api, - org.gemoc.commons.eclipse, - org.eclipse.emf.transaction, - fr.obeo.dsl.debug.ide, - org.eclipse.debug.ui, - org.gemoc.executionframework.engine, - org.eclipse.ui, - org.gemoc.commons.eclipse.ui, - org.eclipse.xtend.lib, - org.gemoc.xdsmlframework.commons, - fr.obeo.dsl.debug.ide.sirius.ui;bundle-version="1.0.0", - org.eclipse.sirius;bundle-version="2.0.7", - org.eclipse.xtext, - org.gemoc.executionframework.extensions.sirius, - fr.inria.diverse.commons.eclipse.messagingsystem.api, - fr.obeo.dsl.debug.ide.ui;bundle-version="1.0.0", - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0", - fr.obeo.dsl.debug -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: org.gemoc.executionframework.engine.ui; - uses:="org.osgi.framework, - org.eclipse.jface.resource, - org.gemoc.executionframework.engine.debug.ui.semanticsopener, - org.eclipse.ui.plugin", - org.gemoc.executionframework.engine.ui.commons;uses:="org.eclipse.emf.common.util,org.gemoc.xdsmlframework.api.core,org.eclipse.debug.core", - org.gemoc.executionframework.engine.ui.debug;uses:="org.eclipse.emf.ecore", - org.gemoc.executionframework.engine.ui.debug.breakpoint; - uses:="org.eclipse.emf.ecore, - org.eclipse.ui, - fr.obeo.dsl.debug.ide, - org.eclipse.swt.widgets, - org.eclipse.core.resources, - org.eclipse.debug.ui, - org.eclipse.jface.viewers", - org.gemoc.executionframework.engine.ui.debug.semanticsopener;uses:="org.gemoc.xdsmlframework.api.core,org.eclipse.core.commands,org.eclipse.jface.viewers", - org.gemoc.executionframework.engine.ui.debug.sirius.action, - org.gemoc.executionframework.engine.ui.launcher diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/build.properties b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/build.properties deleted file mode 100644 index 5e63db887..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - about.html -src.includes = about.html diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/plugin.xml b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/plugin.xml deleted file mode 100644 index 43f28086b..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/plugin.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/pom.xml b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/pom.xml deleted file mode 100644 index 7baec609a..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.executionframework - org.gemoc.modeldebugging.executionframework.root - 0.1.0-SNAPSHOT - - - org.gemoc.executionframework.engine.ui - 0.1.0-SNAPSHOT - eclipse-plugin - - - - - - - - - - - - \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/Activator.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/Activator.java deleted file mode 100644 index 34dddccd4..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/Activator.java +++ /dev/null @@ -1,117 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine.ui; - -import java.util.function.Supplier; - -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.gemoc.executionframework.engine.ui.debug.semanticsopener.OpenSemanticsHandler; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -//import org.gemoc.gemoc_language_workbench.extensions.sirius.services.AbstractGemocDebuggerServices; -import org.osgi.framework.BundleContext; - - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.executionframework.engine.ui"; //$NON-NLS-1$ - - - // The shared instance - private static Activator plugin; - - private OpenSemanticsHandler handler; - - private Supplier engineSupplier; - - private Supplier bundleSymbolicNameSupplier; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - // AbstractGemocDebuggerServices.LISTENER.uninstall(); - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - public static void warn(String msg, Throwable e){ - Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, - Status.OK, - msg, - e)); - } - public static void error(String msg, Throwable e){ - Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, - Status.OK, - msg, - e)); - } - - public void setHandler(OpenSemanticsHandler handler) { - this.handler = handler; - if(engineSupplier != null && bundleSymbolicNameSupplier != null) { - this.handler.setEngine(engineSupplier.get()); - this.handler.setBundleSymbolicName(bundleSymbolicNameSupplier.get()); - } - } - - public void setHandlerFieldSuppliers(Supplier engineSupplier, Supplier bundleSymbolicNameSupplier) { - this.engineSupplier = engineSupplier; - this.bundleSymbolicNameSupplier = bundleSymbolicNameSupplier; - } - - public OpenSemanticsHandler getHandler() { - return handler; - } - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AbstractGemocDebuggerFactory.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AbstractGemocDebuggerFactory.java deleted file mode 100644 index 13512c9ba..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AbstractGemocDebuggerFactory.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine.ui.debug; - -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; - -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; - -public abstract class AbstractGemocDebuggerFactory { - - public AbstractGemocDebuggerFactory(){ - - } - - public abstract AbstractGemocDebugger createDebugger(IDSLDebugEventProcessor target, IExecutionEngine engine); -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AnnotationMutableFieldExtractor.xtend b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AnnotationMutableFieldExtractor.xtend deleted file mode 100644 index 54a49f284..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AnnotationMutableFieldExtractor.xtend +++ /dev/null @@ -1,80 +0,0 @@ -package org.gemoc.executionframework.engine.ui.debug - -import java.text.DecimalFormat -import java.text.NumberFormat -import java.util.ArrayList -import java.util.HashMap -import java.util.List -import java.util.Map -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.transaction.RecordingCommand -import org.eclipse.emf.transaction.util.TransactionUtil -import org.gemoc.executionframework.engine.core.CommandExecution -import org.gemoc.executionframework.engine.ui.debug.IMutableFieldExtractor -import org.gemoc.executionframework.engine.ui.debug.MutableField -import org.gemoc.xdsmlframework.commons.DynamicAnnotationHelper -import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider - -class AnnotationMutableFieldExtractor implements IMutableFieldExtractor { - - private val Map counters = new HashMap - - private val org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider nameprovider = new DefaultDeclarativeQualifiedNameProvider() - - override extractMutableField(EObject eObject) { - - val List result = new ArrayList() - - val idProp = eObject.eClass.EIDAttribute - val String objectName = if (idProp != null) { - val id = eObject.eGet(idProp); - if (id != null) { - val NumberFormat formatter = new DecimalFormat("00"); - val String idString = if(id instanceof Integer) formatter.format((id as Integer)) else id.toString; - eObject.eClass.name + "_" + idString // "returned" value - } else { - if (!counters.containsKey(eObject.eClass)) { - counters.put(eObject.eClass, 0) - } - val Integer counter = counters.get(eObject.eClass) - counters.put(eObject.eClass, counter + 1) - eObject.eClass.name + "_" + counter - } - - } else { - val qname = nameprovider.getFullyQualifiedName(eObject) - if(qname == null) - eObject.toString - else - qname.toString - } - - for (prop : eObject.eClass.EAllStructuralFeatures) { - if (DynamicAnnotationHelper.isDynamic(prop)) { - val mut = new MutableField( - /* name */ prop.name+" ("+objectName+ " :"+eObject.eClass.getName +")", - /* eObject */ eObject, - /* mutProp */ prop, - /* getter */ [eObject.eGet(prop)], - /* setter */ [ o | - - val ed = TransactionUtil.getEditingDomain(eObject.eResource); - var RecordingCommand command = new RecordingCommand(ed, - "Setting value " + o + " in " + objectName +"."+prop.name+ " from the debugger") { - protected override void doExecute() { - eObject.eSet(prop, o) - } - }; - CommandExecution.execute(ed, command); - - ] - ) - result.add(mut) - - } - } - return result - } - -} \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IGemocDebugger.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IGemocDebugger.java deleted file mode 100644 index 459c6dead..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/IGemocDebugger.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine.ui.debug; - -import java.util.function.BiPredicate; - -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; - -public interface IGemocDebugger extends IEngineAddon { - - public abstract void addPredicateBreak(BiPredicate predicate); - - public abstract void addPredicateBreakpoint(BiPredicate predicate); - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/MutableFieldNameProvider.xtend b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/MutableFieldNameProvider.xtend deleted file mode 100644 index 0d21aba3b..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/MutableFieldNameProvider.xtend +++ /dev/null @@ -1,14 +0,0 @@ -package org.gemoc.executionframework.engine.ui.debug - -import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; -import org.eclipse.xtext.naming.QualifiedName; - -public class MutableFieldNameProvider extends DefaultDeclarativeQualifiedNameProvider{ - - def QualifiedName qualifiedName(MutableField e) { - var qnameSegments = this.getFullyQualifiedName(e.geteObject).segments - qnameSegments.add(e.mutableProperty.name) - return QualifiedName.create(qnameSegments); - } - -} \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/sirius/action/GemocToggleBreakpointAction.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/sirius/action/GemocToggleBreakpointAction.java deleted file mode 100644 index 37c157ad7..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/sirius/action/GemocToggleBreakpointAction.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine.ui.debug.sirius.action; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.emf.ecore.EObject; -import org.gemoc.executionframework.engine.ui.debug.breakpoint.GemocBreakpoint; -import org.gemoc.executionframework.engine.ui.launcher.AbstractGemocLauncher; - -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.sirius.ui.DSLToggleBreakpointsUtils; -import fr.obeo.dsl.debug.ide.sirius.ui.action.AbstractToggleBreakpointAction; - -/** - * commons class for all Gemoc based models - * @author dvojtise - * - */ -public class GemocToggleBreakpointAction extends AbstractToggleBreakpointAction { - - @Override - protected String getModelIdentifier() { - return AbstractGemocLauncher.MODEL_ID; - } - - @Override - protected DSLToggleBreakpointsUtils createToggleBreakpointsUtils() { - return new DSLToggleBreakpointsUtils(getModelIdentifier()){ - - @Override - protected DSLBreakpoint createBreakpoint(Object selected, - EObject instruction) throws CoreException { - return new GemocBreakpoint(identifier, instruction, true); - } - - }; - } - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/launcher/AbstractGemocLauncher.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/launcher/AbstractGemocLauncher.java deleted file mode 100644 index 2f29bd034..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/launcher/AbstractGemocLauncher.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine.ui.launcher; - -import java.util.Collections; -import java.util.Map; - -import org.gemoc.commons.eclipse.ui.ViewHelper; -import org.gemoc.xdsmlframework.api.core.IRunConfiguration; -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; - - -abstract public class AbstractGemocLauncher extends fr.obeo.dsl.debug.ide.sirius.ui.launch.AbstractDSLLaunchConfigurationDelegateUI { - - // 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.gemoc.executionframework.engine.ui.Activator.PLUGIN_ID+".debugModel"; - - public Map parseLaunchConfiguration(LaunchConfiguration launchConfiguration) { - return Collections.emptyMap(); - } - - protected void openViewsRecommandedByAddons(IRunConfiguration runConfiguration){ - for (EngineAddonSpecificationExtension extension : runConfiguration.getEngineAddonExtensions()) - { - for(String viewId : extension.getOpenViewIds()){ - ViewHelper.showView(viewId); - } - - } - } -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/.project b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/.project deleted file mode 100644 index 9c853d539..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/.project +++ /dev/null @@ -1,40 +0,0 @@ - - - org.gemoc.executionframework.engine - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - net.sourceforge.metrics.builder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - net.sourceforge.metrics.nature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/META-INF/MANIFEST.MF deleted file mode 100644 index c6d073abc..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Gemoc Engine -Bundle-SymbolicName: org.gemoc.executionframework.engine;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.executionframework.engine.Activator -Require-Bundle: org.gemoc.xdsmlframework.api, - org.gemoc.commons.eclipse, - fr.inria.diverse.commons.eclipse.messagingsystem.api;bundle-version="1.0.0", - org.gemoc.executionframework.reflectivetrace.model;visibility:=reexport, - org.gemoc.commons.eclipse.pde;bundle-version="0.1.0", - org.eclipse.xtend.lib, - org.eclipse.emf.transaction;bundle-version="1.8.0", - fr.inria.diverse.trace.gemoc.api;bundle-version="1.0.0", - fr.inria.diverse.k3.al.annotationprocessor.plugin, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Export-Package: org.gemoc.executionframework.engine, - org.gemoc.executionframework.engine.commons, - org.gemoc.executionframework.engine.core, - org.gemoc.executionframework.engine.profiler diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/pom.xml b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/pom.xml deleted file mode 100644 index 729aa9ebb..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.executionframework - org.gemoc.modeldebugging.executionframework.root - 0.1.0-SNAPSHOT - - - org.gemoc.executionframework.engine - 0.1.0-SNAPSHOT - eclipse-plugin - - - - - - - - - - - - - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - - - \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/Activator.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/Activator.java deleted file mode 100644 index ba4f3eb07..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/Activator.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine; - -import org.gemoc.commons.eclipse.logging.backends.DefaultLoggingBackend; -import org.gemoc.commons.eclipse.pde.GemocPlugin; -import org.gemoc.executionframework.engine.core.GemocRunningEnginesRegistry; -import org.osgi.framework.BundleContext; - -import fr.inria.diverse.commons.eclipse.messagingsystem.api.MessagingSystemManager; -import fr.inria.diverse.commons.messagingsystem.api.MessagingSystem; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends GemocPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.executionframework.engine"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return Activator.plugin; - } - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - Activator.plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - @Override - public void stop(BundleContext context) throws Exception { - Activator.plugin = null; - super.stop(context); - } - - /** - * List of engines that have registered to be running in this eclipse - */ - public GemocRunningEnginesRegistry gemocRunningEngineRegistry = new GemocRunningEnginesRegistry(); - - @Override - public String getId() { - return PLUGIN_ID; - } - -// @Override -// public DefaultLoggingBackend resolveLoggingBackend() { -// return org.gemoc.executionframework.engine.commons.Activator.getDefault().resolveLoggingBackend(); -// } - - private DefaultLoggingBackend _loggingBackend; - @Override - public DefaultLoggingBackend resolveLoggingBackend() { - if (_loggingBackend == null) - { - _loggingBackend = new DefaultLoggingBackend(this); - MessagingSystemManager msm = new MessagingSystemManager(); - MessagingSystem ms = msm.createBestPlatformMessagingSystem(PLUGIN_ID, "Execution Engine"); - _loggingBackend.setMessagingSystem(ms); - } - return _loggingBackend; - } - - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/MelangeHelper.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/MelangeHelper.java deleted file mode 100644 index f4ea33058..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/commons/MelangeHelper.java +++ /dev/null @@ -1,267 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine.commons; - -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.Platform; -import org.eclipse.emf.ecore.EObject; -import org.osgi.framework.Bundle; - -import fr.inria.diverse.k3.al.annotationprocessor.Aspect; - -/** - * Helper class to get informations about languages defined in Melange - */ -public class MelangeHelper { - - /** - * Return a bundle with a .melange declaring 'language' - */ - public static Bundle getMelangeBundle(String languageName){ - - IConfigurationElement[] melangeLanguages = Platform - .getExtensionRegistry().getConfigurationElementsFor( - "fr.inria.diverse.melange.language"); - String melangeBundleName = ""; - - for (IConfigurationElement lang : melangeLanguages) { - if(lang.getAttribute("id").equals(languageName)){ - melangeBundleName = lang.getContributor().getName(); - return Platform.getBundle(melangeBundleName); - } - } - - return null; - } - - /** - * Return all Languages defined with Melange - */ - public static List getAllLanguages(){ - List languagesNames = new ArrayList(); - IConfigurationElement[] melangeLanguages = Platform - .getExtensionRegistry().getConfigurationElementsFor( - "fr.inria.diverse.melange.language"); - for (IConfigurationElement lang : melangeLanguages) { - languagesNames.add(lang.getAttribute("id")); - } - return languagesNames; - } - - /** - * @return Aspects defined in 'languageName' - */ - public static Set> getAspects(String languageName){ - Set> res = new HashSet>(); - - IConfigurationElement[] melangeLanguages = Platform - .getExtensionRegistry().getConfigurationElementsFor( - "fr.inria.diverse.melange.language"); - - String serializedAspects = ""; - for (IConfigurationElement lang : melangeLanguages) { - if (lang.getAttribute("id").equals(languageName)) { - serializedAspects = lang.getAttribute("aspects"); - break; - } - } - if(serializedAspects.isEmpty()) return res; - Set classNames = new HashSet(); - //serializedAspects is a list of pairs (target : aspects) - for (String rawPair : serializedAspects.split(";")) { // ; is the separator between pairs - String[] pair = rawPair.split(":"); // : the separator between target & aspects - String[] weavedAsp = pair[1].split(","); // , the separator between aspects - for (String asp : weavedAsp) { - classNames.add(asp); - } - } - for (String asp : classNames) { - Class cls = loadAspect(languageName, asp); - res.add(cls); - } - - return res; - } - - /** - * Return all ModelTypes matching 'language' - */ - public static List getModelTypes(String language){ - List modelTypeNames = new ArrayList(); - IConfigurationElement[] melangeLanguages = Platform - .getExtensionRegistry().getConfigurationElementsFor( - "fr.inria.diverse.melange.language"); - for (IConfigurationElement lang : melangeLanguages) { - if (lang.getAttribute("id").equals(language)) { - IConfigurationElement[] adapters = lang - .getChildren("adapter"); - for (IConfigurationElement adapter : adapters) { - modelTypeNames.add(adapter - .getAttribute("modeltypeId")); - } - } - } - return modelTypeNames; - } - - /** - * Return a class matching 'aspectName' or null if can't be loaded. - */ - public static Class loadAspect(String languageName, String aspectName){ - try { - return getMelangeBundle(languageName).loadClass(aspectName); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } - return null; - } - - /** - * Get all methods from Aspects of 'Language' tagged @Main - */ - public static List getEntryPoints(String language){ - - List res = new ArrayList(); - - Set> aspects = getAspects(language); - for (Class asp : aspects) { - for(Method m : asp.getMethods()) - { - if(isAnnotedMain(m)) - { - res.add(m); - } - } - } - - return res; - } - - - public static String[] getSignatures(String entryPoints){ - return entryPoints.split(";"); - } - - /** - * Expected format for signature: - * qualifiedClassName.methodName(qualifiedClassName,qualifiedClassName,...) - * - * @return qualified class name before '(' without method name - */ - public static String getClassName(String signature){ - String method = signature.substring(0, signature.indexOf("(")); - String className = method.substring(0,method.lastIndexOf(".")); - return className; - } - - /** - * Expected format for signature: - * qualifiedClassName.methodName(qualifiedClassName,qualifiedClassName,...) - * - * @return method name before '(' without class name - */ - public static String getMethodName(String signature) { - String method = signature.substring(0, signature.indexOf("(")); - String methodName = method.substring(method.lastIndexOf(".")); - return methodName; - } - - /** - * Expected format for signature: - * qualifiedClassName.methodName(qualifiedClassName,qualifiedClassName,...) - * - * @return qualified class names between '(' and ')' - */ - public static String[] getParametersType(String signature){ - String args = signature.substring(signature.indexOf("(")+1,signature.indexOf(")")); - return args.split(","); - } - - /** - * Search in 'aspect' for a method named 'calledMethodName' and with one parameter. - * The type of this parameter has the same simple name as the EClass of 'caller'. - * - * @return Found method from 'aspect' - * - * @throws NoSuchMethodException - */ - public static Method findMethod(Class aspect, EObject caller, String calledMethodName) throws NoSuchMethodException{ - String callerClassName = caller.eClass().getName(); - for(Method method : aspect.getMethods()){ - String methodName = method.getName(); - Class[] paramTypes = method.getParameterTypes(); - if(methodName.equals(calledMethodName) - && paramTypes.length == 1 - && paramTypes[0].getSimpleName().equals(callerClassName)){ - return method; - } - } - - throw new java.lang.NoSuchMethodException(); - } - - /** - * Return the substring after the last '.' or the whole 'qualifiedName' if - * no dot character. - */ - public static String lastSegment(String qualifiedName){ - try{ - return qualifiedName.substring(qualifiedName.lastIndexOf(".")+1); - } - catch(IndexOutOfBoundsException e){ - //The String end with '.' - } - return ""; - } - - /** - * Return true is their is @Main - */ - public static boolean isAnnotedMain(Method m){ - return m.isAnnotationPresent(fr.inria.diverse.k3.al.annotationprocessor.Main.class); - } - - /** - * Return the targeted class from the @Aspect - */ - public static Class getTarget(Class aspect){ - Annotation annotation = aspect.getAnnotation(fr.inria.diverse.k3.al.annotationprocessor.Aspect.class); - if(annotation != null){ - Aspect k3tag = (Aspect) annotation; - return k3tag.className(); - } - - return null; - } - - /** - * Return all classes from 'languageName' weaved on 'target' - */ - public static List> getAspectsOn(String languageName, Class target){ - List> res = new ArrayList>(); - - for(Class aspect : getAspects(languageName)){ - Class aspectTarget = getTarget(aspect); - if(aspectTarget.isAssignableFrom(target)){ - res.add(aspect); - } - } - - return res; - } -} \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractCommandBasedSequentialExecutionEngine.xtend b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractCommandBasedSequentialExecutionEngine.xtend deleted file mode 100644 index df4f84219..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractCommandBasedSequentialExecutionEngine.xtend +++ /dev/null @@ -1,33 +0,0 @@ -package org.gemoc.executionframework.engine.core - -import org.eclipse.emf.transaction.RecordingCommand - -abstract class AbstractCommandBasedSequentialExecutionEngine extends AbstractSequentialExecutionEngine { - - /** - * Must be called in a callback from the executed code from the operational - * semantics. - * - * @param caller - * @param operationName - * @param operation - */ - protected def void executeOperation(Object caller, String className, String operationName, Runnable operation) { - - val RecordingCommand rc = new RecordingCommand(editingDomain) { - override doExecute() { - operation.run(); - } - }; - try { - beforeExecutionStep(caller, className, operationName, rc); - rc.execute(); - afterExecutionStep(); - } finally { - - // Important to remove notifiers. - rc.dispose - } - } - -} \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java deleted file mode 100644 index 563dc809b..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java +++ /dev/null @@ -1,221 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine.core; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Set; - -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.gemoc.executionframework.engine.Activator; -import org.gemoc.xdsmlframework.api.core.IExecutionContext; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; - -import fr.inria.diverse.trace.commons.model.trace.GenericMSE; -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.MSEModel; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.SequentialStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.TraceFactory; -import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon; - -public abstract class AbstractSequentialExecutionEngine extends AbstractExecutionEngine implements IExecutionEngine { - - private MSEModel _actionModel; - private IMultiDimensionalTraceAddon traceAddon; - - abstract protected void executeEntryPoint(); - - abstract protected void initializeModel(); - - abstract protected void prepareEntryPoint(IExecutionContext executionContext); - - abstract protected void prepareInitializeModel(IExecutionContext executionContext); - - @Override - public final void performInitialize(IExecutionContext executionContext) { - Set traceManagers = this.getAddonsTypedBy(IMultiDimensionalTraceAddon.class); - if (!traceManagers.isEmpty()) - this.traceAddon = traceManagers.iterator().next(); - prepareEntryPoint(executionContext); - prepareInitializeModel(executionContext); - } - - @Override - protected final void performStart() { - initializeModel(); - executeEntryPoint(); - Activator.getDefault().info("Execution finished"); - } - - /** - * To be called just before each execution step by an implementing engine. - */ - protected final void beforeExecutionStep(Object caller, String className, String operationName) { - - // We will trick the transaction with an empty command. This most - // probably make rollbacks impossible, but at least we can manage - // transactions the way we want. - RecordingCommand rc = new RecordingCommand(editingDomain) { - @Override - protected void doExecute() { - } - }; - - beforeExecutionStep(caller, className, operationName, rc); - rc.execute(); - } - - /** - * To be called just after each execution step by an implementing engine. If - * the step was done through a RecordingCommand, it can be given. - */ - protected final void beforeExecutionStep(Object caller, String className, String operationName, RecordingCommand rc) { - - if (caller != null && caller instanceof EObject && editingDomain != null) { - - // Call expected to be done from an EMF model, hence EObjects - EObject caller_cast = (EObject) caller; - - // We create a step - Step step = createStep(caller_cast, className, operationName); - - beforeExecutionStep(step, rc); - - } - - } - - private Step createStep(EObject caller, String className, String methodName) { - MSE mse = findOrCreateMSE(caller, className, methodName); - Step result; - if (traceAddon == null) { - SequentialStep step = TraceFactory.eINSTANCE.createGenericSequentialStep(); - MSEOccurrence occurrence = null; - occurrence = TraceFactory.eINSTANCE.createMSEOccurrence(); - step.setMseoccurrence(occurrence); - occurrence.setMse(mse); - result = step; - } else { - result = traceAddon.getFactory().createStep(mse, new ArrayList(), new ArrayList()); - } - - return result; - } - - private EOperation findOperation(EObject object, String className, String methodName) { - - // We try to find the corresponding EOperation in the execution - // metamodel - for (EOperation operation : object.eClass().getEAllOperations()) { - // TODO !!! this is not super correct yet as overloading allows the - // definition of 2 methods with the same name !!! - if (operation.getName().equalsIgnoreCase(methodName)) { - return operation; - } - } - - // If we didn't find it, we try to find the class that should contain - // this operation - EClass containingEClass = null; - if (object.eClass().getName().equalsIgnoreCase(className)) { - containingEClass = object.eClass(); - } else { - for (EClass candidate : object.eClass().getEAllSuperTypes()) { - if (candidate.getName().equalsIgnoreCase(className)) { - containingEClass = candidate; - } - } - } - - // Then we create the missing operation (VERY approximatively) - EOperation operation = EcoreFactory.eINSTANCE.createEOperation(); - if (containingEClass != null) { - containingEClass.getEOperations().add(operation); - } - operation.setName(methodName); - return operation; - } - - public final MSE findOrCreateMSE(EObject caller, String className, String methodName) { - - EOperation operation = findOperation(caller, className, methodName); - - // TODO Should be created/loaded before execution by analyzing the - // model? - if (_actionModel == null) { - _actionModel = TraceFactory.eINSTANCE.createMSEModel(); - } - - if (_actionModel != null) { - for (MSE existingMSE : _actionModel.getOwnedMSEs()) { - if (existingMSE.getCaller().equals(caller) && ((existingMSE.getAction() != null && existingMSE.getAction().equals(operation)) || (existingMSE.getAction() == null && operation == null))) { - // no need to create one, we already have it - return existingMSE; - } - } - } - // let's create a MSE - final GenericMSE mse = TraceFactory.eINSTANCE.createGenericMSE(); - mse.setCallerReference(caller); - mse.setActionReference(operation); - if (operation != null) - mse.setName("MSE_" + caller.getClass().getSimpleName() + "_" + operation.getName()); - else - mse.setName("MSE_" + caller.getClass().getSimpleName() + "_" + methodName); - // and add it for possible reuse - if (_actionModel != null) { - - if (_actionModel.eResource() != null) { - TransactionUtil.getEditingDomain(_actionModel.eResource()); - RecordingCommand command = new RecordingCommand(TransactionUtil.getEditingDomain(_actionModel.eResource()), "Saving new MSE ") { - @Override - protected void doExecute() { - _actionModel.getOwnedMSEs().add(mse); - try { - _actionModel.eResource().save(null); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - }; - TransactionUtil.getEditingDomain(_actionModel.eResource()).getCommandStack().execute(command); - } - } else { - _actionModel.getOwnedMSEs().add(mse); - } - return mse; - } - - @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.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/IEngineRegistrationListener.java b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/IEngineRegistrationListener.java deleted file mode 100644 index 756033843..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/IEngineRegistrationListener.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.engine.core; - -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; - -public interface IEngineRegistrationListener { - - void engineRegistered(IExecutionEngine engine); - - void engineUnregistered(IExecutionEngine engine); - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/SequentialExecutionException.xtend b/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/SequentialExecutionException.xtend deleted file mode 100644 index ab6a465dd..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/SequentialExecutionException.xtend +++ /dev/null @@ -1,39 +0,0 @@ -package org.gemoc.executionframework.engine.core; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence -import org.eclipse.emf.transaction.RollbackException - -/** - * An exception that is caused by anything thrown from the execution of - * sequential operational semantics. - * - */ -public class SequentialExecutionException extends RuntimeException { - - private MSEOccurrence pendingMSEOccurrence; - - new(MSEOccurrence pendingMSE, Throwable cause) { - this.pendingMSEOccurrence = pendingMSE; - this.initCause(cause) - } - - private def String prettyPrintMSEOcc() { - if (pendingMSEOccurrence != null) - return '''Pending MSEOccurrence: «pendingMSEOccurrence.mse.caller.eClass.name».«pendingMSEOccurrence.mse.action.name» called on «pendingMSEOccurrence.mse.caller».''' - else - return "No pending MSE." - } - - override getMessage() { - if (this.getCause() != null && this.getCause() instanceof RollbackException) { - return "An error occured during the execution of the operational semantics (originally catched as a RollbackException during the transaction commit).\n" + - prettyPrintMSEOcc; - } else if (this.getCause() != null && this.getCause() instanceof InterruptedException) { - return "The engine thread was interrupted while it was waiting for being allowed to start an execution step's transaction.\n" + - prettyPrintMSEOcc; - } else { - return super.getMessage(); - } - } - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/.project b/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/.project deleted file mode 100644 index 4660f6755..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.executionframework.extensions.sirius - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/META-INF/MANIFEST.MF deleted file mode 100644 index 4cbbfd090..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/META-INF/MANIFEST.MF +++ /dev/null @@ -1,29 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Sirius -Bundle-SymbolicName: org.gemoc.executionframework.extensions.sirius;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.executionframework.extensions.sirius.Activator -Require-Bundle: org.gemoc.xdsmlframework.api, - org.eclipse.sirius.diagram.ui;bundle-version="3.0.0", - org.eclipse.sirius.common;bundle-version="1.0.1", - fr.obeo.dsl.debug.ide.sirius.ui;bundle-version="1.0.0", - org.eclipse.sirius.ecore.extender;bundle-version="2.0.3", - org.eclipse.xtext, - org.eclipse.debug.core;bundle-version="3.9.1", - fr.obeo.dsl.debug;bundle-version="1.0.0", - fr.obeo.dsl.debug.ide;bundle-version="1.0.0", - org.gemoc.commons.eclipse, - org.eclipse.emf.codegen.ecore, - org.eclipse.emf.edit.ui, - org.gemoc.executionframework.engine, - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0", - org.eclipse.ui.ide;bundle-version="3.10.2", - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ActivationPolicy: lazy -Export-Package: org.gemoc.executionframework.extensions.sirius, - org.gemoc.executionframework.extensions.sirius.debug, - org.gemoc.executionframework.extensions.sirius.modelloader, - org.gemoc.executionframework.extensions.sirius.services -Import-Package: fr.inria.diverse.trace.commons.model.trace diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/build.properties b/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/build.properties deleted file mode 100644 index 461e56128..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/,\ - about.html -src.includes = about.html diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/plugin.xml b/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/plugin.xml deleted file mode 100644 index eca65d61a..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/plugin.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/pom.xml b/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/pom.xml deleted file mode 100644 index fcb12cbf1..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.executionframework - org.gemoc.modeldebugging.executionframework.root - 0.1.0-SNAPSHOT - - - org.gemoc.executionframework.extensions.sirius - 0.1.0-SNAPSHOT - eclipse-plugin - - - - - - - - - - - - \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/Activator.java b/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/Activator.java deleted file mode 100644 index 174b788b9..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/Activator.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.extensions.sirius; - -import java.util.Map.Entry; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.emf.common.util.URI; -import org.eclipse.sirius.business.api.session.Session; -import org.eclipse.sirius.business.api.session.SessionManager; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchListener; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.executionframework.extensions.sirius"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - IWorkbench workbench = PlatformUI.getWorkbench(); - //final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage(); - workbench.addWorkbenchListener(new IWorkbenchListener() { - public boolean preShutdown(IWorkbench workbench, boolean forced) { - - // close all editors (a bit too strong ;-) ) - // activePage.closeEditors(activePage.getEditorReferences(), false); - - // try to close only Sirius sessions related to engines - for (Entry engineEntry : org.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.getRunningEngines().entrySet()) - { - try{ - // stop any running engine - IExecutionEngine engine = engineEntry.getValue(); - if(engine.getRunningStatus() != RunStatus.Stopped){ - - engine.dispose(); - } - - // ensure to clear sirius session - URI uri = engine.getExecutionContext().getRunConfiguration().getAnimatorURI(); - if (uri != null) { - Session session = SessionManager.INSTANCE.getSession(uri, new NullProgressMonitor()); - session.close(new NullProgressMonitor()); - SessionManager.INSTANCE.remove(session); - } - - } catch (Exception e){ /* we don't care try the other */} - } - - return true; - } - public void postShutdown(IWorkbench workbench) { - } - }); - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DefaultModelLoader.java b/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DefaultModelLoader.java deleted file mode 100644 index 6d1486547..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DefaultModelLoader.java +++ /dev/null @@ -1,445 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.extensions.sirius.modelloader; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.emf.transaction.RecordingCommand; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette; -import org.eclipse.sirius.business.api.session.Session; -import org.eclipse.sirius.business.api.session.SessionManager; -import org.eclipse.sirius.common.tools.api.resource.ResourceSetFactory; -import org.eclipse.sirius.diagram.DDiagram; -import org.eclipse.sirius.diagram.DSemanticDiagram; -import org.eclipse.sirius.diagram.description.Layer; -import org.eclipse.sirius.diagram.tools.api.command.ChangeLayerActivationCommand; -import org.eclipse.sirius.diagram.ui.tools.api.editor.DDiagramEditor; -import org.eclipse.sirius.diagram.ui.tools.api.graphical.edit.palette.ToolFilter; -import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; -import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; -import org.eclipse.sirius.ui.business.api.session.IEditingSession; -import org.eclipse.sirius.ui.business.api.session.SessionUIManager; -import org.eclipse.sirius.viewpoint.DRepresentation; -import org.eclipse.sirius.viewpoint.DView; -import org.eclipse.sirius.viewpoint.description.tool.AbstractToolDescription; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.PlatformUI; -import org.eclipse.xtext.resource.XtextPlatformResourceURIHandler; -import org.eclipse.xtext.util.StringInputStream; -import org.gemoc.commons.eclipse.emf.EMFResource; -import org.gemoc.executionframework.engine.core.CommandExecution; -import org.gemoc.executionframework.extensions.sirius.Activator; -import org.gemoc.executionframework.extensions.sirius.debug.DebugSessionFactory; -import org.gemoc.executionframework.extensions.sirius.services.AbstractGemocAnimatorServices; -import org.gemoc.xdsmlframework.api.core.IExecutionContext; -import org.gemoc.xdsmlframework.api.core.IModelLoader; - -import fr.obeo.dsl.debug.ide.sirius.ui.services.AbstractDSLDebuggerServices; - -public class DefaultModelLoader implements IModelLoader { - - public final static String MODEL_ID = Activator.PLUGIN_ID + ".debugModel"; - - public Resource loadModel(IExecutionContext context) - throws RuntimeException { - Resource resource = null; - ResourceSet resourceSet; - resourceSet = new ResourceSetImpl(); - resource = resourceSet.createResource(context.getRunConfiguration() - .getExecutedModelURI()); - try { - resource.load(null); - } catch (IOException e) { - new RuntimeException(e); - } - return resource; - } - - public Resource loadModelForAnimation(IExecutionContext context) - throws RuntimeException { - Resource resource = null; - ResourceSet resourceSet; - if (context.getRunConfiguration().getAnimatorURI() != null) { - killPreviousSiriusSession(context.getRunConfiguration() - .getAnimatorURI()); - Session session; - try { - session = openNewSiriusSession(context, context - .getRunConfiguration().getAnimatorURI()); - resourceSet = session.getTransactionalEditingDomain() - .getResourceSet(); - } catch (CoreException e) { - throw new RuntimeException(e); - } - // At this point Sirius has loaded the model, so we just need to - // find it - for (Resource r : resourceSet.getResources()) { - if (r.getURI().equals( - context.getRunConfiguration().getExecutedModelURI())) { - resource = r; - break; - } - } - return resource; - } else { - // animator not available; fall back to classic load - return loadModel(context); - } - } - - private void killPreviousSiriusSession(URI sessionResourceURI) { - final Session session = SessionManager.INSTANCE - .getExistingSession(sessionResourceURI); - if (session != null) { - final IEditingSession uiSession = SessionUIManager.INSTANCE - .getUISession(session); - DebugPermissionProvider permProvider = new DebugPermissionProvider(); - if (!permProvider.provides(session.getTransactionalEditingDomain() - .getResourceSet())) { - // this is a not debugSession (ie. a normal editing session) - if (uiSession != null) { - for (final DialectEditor editor : uiSession.getEditors()) { - final IEditorSite editorSite = editor.getEditorSite(); - if (editor.getSite() == null) { - editorSite.getShell().getDisplay() - .syncExec(new Runnable() { - @Override - public void run() { - editorSite.getPage().closeEditor( - editor, true); - } - }); - } - } - PlatformUI.getWorkbench().getDisplay() - .syncExec(new Runnable() { - @Override - public void run() { - uiSession.close(); - } - }); - } - } - PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { - @Override - public void run() { - session.close(new NullProgressMonitor()); - SessionManager.INSTANCE.remove(session); - } - }); - } - } - - private Session openNewSiriusSession(IExecutionContext context, - URI sessionResourceURI) throws CoreException { - boolean useMelange = context.getRunConfiguration().getMelangeQuery() != null - && !context.getRunConfiguration().getMelangeQuery().isEmpty(); - // calculating model URI as MelangeURI - URI modelURI = useMelange ? context.getRunConfiguration() - .getExecutedModelAsMelangeURI() : context.getRunConfiguration() - .getExecutedModelURI(); - - // create and configure resource set - HashMap nsURIMapping = getnsURIMapping(context); - final ResourceSet rs = createAndConfigureResourceSet(modelURI, - nsURIMapping); - - // load model resource and resolve all proxies - // Resource r = rs.getResource(modelURI, true); - - // calculating aird URI - URI airdURI = useMelange ? URI.createURI(sessionResourceURI.toString() - .replace("platform:/", "melange:/")) : sessionResourceURI; - // URI airdURI = sessionResourceURI; - - // create and load sirius session - final Session session = DebugSessionFactory.INSTANCE.createSession(rs, - airdURI); - final IProgressMonitor monitor = new NullProgressMonitor(); - final TransactionalEditingDomain editingDomain = session - .getTransactionalEditingDomain(); - session.open(monitor); - // EcoreUtil.resolveAll(rs); - // activating layers - for (DView view : session.getSelectedViews()) { - for (DRepresentation representation : view - .getOwnedRepresentations()) { - final DSemanticDiagram diagram = (DSemanticDiagram) representation; - - final List elements = new ArrayList(); - elements.add(diagram); - - final IEditorPart editorPart = DialectUIManager.INSTANCE - .openEditor(session, representation, monitor); - if (editorPart instanceof DDiagramEditor) { - ((DDiagramEditor) editorPart).getPaletteManager() - .addToolFilter(new ToolFilter() { - @Override - public boolean filter(DDiagram diagram, - AbstractToolDescription tool) { - return true; - } - }); - } - if (editorPart instanceof DiagramEditorWithFlyOutPalette) { - PaletteUtils - .colapsePalette((DiagramEditorWithFlyOutPalette) editorPart); - } - - RecordingCommand command = new RecordingCommand(editingDomain, - "Activating animator and debug layers") { - @Override - protected void doExecute() { - for (Layer l : diagram.getDescription() - .getAdditionalLayers()) { - String descName = diagram.getDescription() - .getName(); - String layerName = l.getName(); - boolean mustBeActiveForDebug = AbstractDSLDebuggerServices.LISTENER - .isRepresentationToRefresh(MODEL_ID, - descName, layerName); - boolean mustBeActiveForAnimation = AbstractGemocAnimatorServices.ANIMATOR - .isRepresentationToRefresh(descName, - layerName); - boolean mustBeActive = mustBeActiveForAnimation - || mustBeActiveForDebug; - if (mustBeActive - && !diagram.getActivatedLayers() - .contains(l)) { - ChangeLayerActivationCommand c = new ChangeLayerActivationCommand( - editingDomain, diagram, l, monitor); - c.execute(); - } - } - } - }; - CommandExecution.execute(editingDomain, command); - } - } - return session; - } - - private ResourceSet createAndConfigureResourceSet(URI modelURI, - HashMap nsURIMapping) { - 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 - final XMLURIHandler handler = new XMLURIHandler(modelURI.query(), - fileExtension); // use to resolve cross ref - // URI during XMI parsing - handler.setResourceSet(rs); - rs.getLoadOptions().put(XMLResource.OPTION_URI_HANDLER, handler); - final MelangeURIConverter converter = new MelangeURIConverter( - fileExtension, nsURIMapping); - rs.setURIConverter(converter); - // fix sirius to prevent non intentional model savings - converter.getURIHandlers().add(0, new DebugURIHandler(converter.getURIHandlers())); - return rs; - } - - // TODO must be extended to support more complex mappings, currently use - // only the first package in the genmodel - // TODO actually, melange should produce the nsURI mapping and register it - // in some way so we can retreive it - protected HashMap getnsURIMapping(IExecutionContext context) { - HashMap nsURIMapping = new HashMap(); - // dirty hack, simply open the original file in a separate ResourceSet - // and ask its root element class nsURI - String melangeQuery = context.getRunConfiguration() - .getExecutedModelAsMelangeURI().query(); - if (melangeQuery != null && !melangeQuery.isEmpty() - && melangeQuery.startsWith("mt=")) { - String targetNsUri = melangeQuery.substring(melangeQuery - .indexOf('=') + 1); - Object o = EMFResource.getFirstContent(context - .getRunConfiguration().getExecutedModelURI()); - if (o instanceof EObject) { - // DIRTY, try to find best nsURI, need major refactoring in - // Melange, - EPackage rootPackage = ((EObject) o).eClass().getEPackage(); - while (rootPackage.getESuperPackage() != null) { - rootPackage = rootPackage.getESuperPackage(); - } - nsURIMapping.put(rootPackage.getNsURI(), targetNsUri); - } - } - // a better solution would be to add the relevant data in xdsml and look - // for the mapping there - /* - * String xdsmluri = - * context.getLanguageDefinitionExtension().getXDSMLFilePath(); if - * (!xdsmluri.startsWith("platform:/plugin")) xdsmluri = - * "platform:/plugin" + xdsmluri; Object o = - * EMFResource.getFirstContent(xdsmluri); if(o != null && o instanceof - * LanguageDefinition){ LanguageDefinition ld = (LanguageDefinition)o; - * ... } - */ - return nsURIMapping; - } - - class MelangeURIConverter extends ExtensibleURIConverterImpl { - - private String _fileExtension; - private HashMap _nsURIMapping; - - public MelangeURIConverter(String fileExtension, - HashMap nsURIMapping) { - _fileExtension = fileExtension; - _nsURIMapping = nsURIMapping; - } - - @SuppressWarnings("resource") - @Override - public InputStream createInputStream(URI uri, Map options) - throws IOException { - InputStream result = null; - // the URI to use for model loading is not melange:/... but - // platform:/... and without the ?xx=... - URI uriToUse = uri; - boolean useSuperMethod = true; - - if (uri.scheme().equals("melange")) { - String uriAsString = uri.toString().replace("melange:/", - "platform:/"); - if (uri.fileExtension() != null - && uri.fileExtension().equals(_fileExtension)) { - useSuperMethod = false; - uriAsString = uriAsString.substring(0, - uriAsString.indexOf('?')); - uriToUse = URI.createURI(uriAsString); - InputStream originalInputStream = null; - try { - originalInputStream = super.createInputStream(uriToUse, - options); - String originalContent = convertStreamToString(originalInputStream); - String modifiedContent = originalContent; - for (Entry entry : _nsURIMapping - .entrySet()) { - modifiedContent = modifiedContent.replace( - entry.getKey(), entry.getValue()); - } - result = new StringInputStream(modifiedContent); - } finally { - if (originalInputStream != null) { - originalInputStream.close(); - } - } - } else { - uriToUse = URI.createURI(uriAsString); - } - } - - if (useSuperMethod) { - result = super.createInputStream(uriToUse, options); - } - - // // making sure that uri can be modified - // if (uri.fileExtension() != null - // && uri.fileExtension().equals(_fileExtension) - // && uri.scheme().equals("melange")) - // { - // String uriAsString = uri.toString().replace("melange:/", - // "platform:/"); - // uriAsString = uriAsString.substring(0, uriAsString.indexOf('?')); - // uriToUse = URI.createURI(uriAsString); - // InputStream originalInputStream = null; - // try - // { - // originalInputStream = super.createInputStream(uriToUse, options); - // String originalContent = - // convertStreamToString(originalInputStream); - // String modifiedContent = - // originalContent.replace("http://www.gemoc.org/sample/tfsm", - // "http://tfsmextended"); - // result = new StringInputStream(modifiedContent); - // } - // finally - // { - // if (originalInputStream != null) - // { - // originalInputStream.close(); - // } - // } - // } - // else - // { - // } - return result; - } - - private String convertStreamToString(java.io.InputStream is) { - java.util.Scanner s1 = new java.util.Scanner(is); - java.util.Scanner s2 = s1.useDelimiter("\\A"); - String result = s2.hasNext() ? s2.next() : ""; - s1.close(); - s2.close(); - return result; - } - } - - class XMLURIHandler extends XtextPlatformResourceURIHandler { - - private String _queryParameters; - private String _fileExtension; - - public XMLURIHandler(String queryParameters, String fileExtension) { - _queryParameters = queryParameters; - if (_queryParameters == null) - _queryParameters = ""; - else - _queryParameters = "?" + _queryParameters; - _fileExtension = fileExtension; - } - - @Override - public URI resolve(URI uri) { - URI resolvedURI = super.resolve(uri); - if (resolvedURI.scheme().equals("melange") - && resolvedURI.fileExtension().equals(_fileExtension) - && !resolvedURI.toString().contains("?")) { - String fileExtensionWithPoint = "." + _fileExtension; - int lastIndexOfFileExtension = resolvedURI.toString() - .lastIndexOf(fileExtensionWithPoint); - String part1 = resolvedURI.toString().substring(0, - lastIndexOfFileExtension); - String part2 = fileExtensionWithPoint + _queryParameters; - String part3 = resolvedURI.toString().substring( - lastIndexOfFileExtension - + fileExtensionWithPoint.length()); - String newURIAsString = part1 + part2 + part3; - return URI.createURI(newURIAsString); - } - return resolvedURI; - } - } - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/AbstractGemocDebuggerServices.java b/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/AbstractGemocDebuggerServices.java deleted file mode 100644 index 6ecf85464..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/services/AbstractGemocDebuggerServices.java +++ /dev/null @@ -1,676 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.extensions.sirius.services; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointListener; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.sirius.business.api.dialect.DialectManager; -import org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand; -import org.eclipse.sirius.diagram.DDiagram; -import org.eclipse.sirius.diagram.description.Layer; -import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; -import org.eclipse.sirius.ui.business.api.session.IEditingSession; -import org.eclipse.sirius.ui.business.api.session.SessionUIManager; -import org.eclipse.sirius.viewpoint.DRepresentation; -import org.eclipse.sirius.viewpoint.description.RepresentationDescription; -import org.gemoc.executionframework.engine.core.CommandExecution; -import org.gemoc.executionframework.extensions.sirius.modelloader.DefaultModelLoader; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; -import fr.obeo.dsl.debug.ide.sirius.ui.services.AbstractDSLDebuggerServices; - -public abstract class AbstractGemocDebuggerServices { - - /** - * A couple of {@link String}. - * - * @author Yvan Lussaud - */ - public static final class StringCouple { - - /** - * The first string of the couple. - */ - private final String first; - - /** - * The second string of the couple. - */ - private final String second; - - /** - * Constructor. - * - * @param first - * the first string of the couple - * @param second - * the second string of the couple - */ - public StringCouple(String first, String second) { - this.first = first; - this.second = second; - } - - /** - * Gets the first string of the couple. - * - * @return the first string of the couple - */ - public String getFirst() { - return first; - } - - /** - * Gets the second string of the couple. - * - * @return the second string of the couple - */ - public String getSecond() { - return second; - } - } - - /** - * An {@link IBreakpointListener} maintaining the breakpoints. - * - * @author Yvan Lussaud - */ - public static final class BreakpointListener implements - IBreakpointListener, IDSLCurrentInstructionListener { - - /** - * Any layer {@link Set}, means always refresh the given - * {@link DRepresentation} no matter what its layer are. It should be - * used for trees and tables since they don't have layers. - */ - private static final Set ANY_LAYER = new HashSet(); - - /** - * Mapping of the {@link RepresentationDescription#getName() - * representation identifier} to a {@link Layer#getName() layer - * identifier} or {@link BreakpointListener#ANY_LAYER any layer}. - */ - private final Map>> representationToRefresh = new HashMap>>(); - - /** - * The current {@link StackFrame}. - */ - private StackFrame currentFrame; - - public BreakpointListener() { - install(); - } - - /** - * Installs this {@link IBreakpointListener}. - */ - public void install() { - DebugPlugin.getDefault().getBreakpointManager() - .addBreakpointListener(this); - for (IBreakpoint breakpoint : DebugPlugin.getDefault() - .getBreakpointManager().getBreakpoints()) { - if (breakpoint instanceof DSLBreakpoint) { - addBreakpoint((DSLBreakpoint) breakpoint); - } - } - } - - /** - * Uninstalls this {@link IBreakpointListener}. - */ - public void uninstall() { - DebugPlugin.getDefault().getBreakpointManager() - .removeBreakpointListener(this); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint) - */ - public void breakpointAdded(IBreakpoint breakpoint) { - if (breakpoint instanceof DSLBreakpoint) { - addBreakpoint((DSLBreakpoint) breakpoint); - final DSLBreakpoint dslBreakpoint = (DSLBreakpoint) breakpoint; - final Set instructionURIs = new HashSet(); - instructionURIs.add(dslBreakpoint.getURI()); - notifySirius(instructionURIs, - dslBreakpoint.getModelIdentifier()); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, - * org.eclipse.core.resources.IMarkerDelta) - */ - public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) { - if (breakpoint instanceof DSLBreakpoint) { - removeBreakpoint((DSLBreakpoint) breakpoint); - final DSLBreakpoint dslBreakpoint = (DSLBreakpoint) breakpoint; - final Set instructionURIs = new HashSet(); - instructionURIs.add(dslBreakpoint.getURI()); - notifySirius(instructionURIs, - dslBreakpoint.getModelIdentifier()); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, - * org.eclipse.core.resources.IMarkerDelta) - */ - public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) { - try { - if (breakpoint instanceof DSLBreakpoint - && delta.getAttribute(IBreakpoint.ENABLED) != null - && breakpoint.isEnabled() != ((Boolean) delta - .getAttribute(IBreakpoint.ENABLED)) - .booleanValue()) { - final DSLBreakpoint dslBreakpoint = (DSLBreakpoint) breakpoint; - final Set instructionURIs = new HashSet(); - instructionURIs.add(dslBreakpoint.getURI()); - notifySirius(instructionURIs, - dslBreakpoint.getModelIdentifier()); - } - } catch (CoreException e) { - // ignore - } - } - - /** - * Adds the given {@link DSLBreakpoint}. - * - * @param breakpoint - * the {@link DSLBreakpoint} - */ - protected void addBreakpoint(DSLBreakpoint breakpoint) { - Set brkps = BREAKPOINTS.get(breakpoint.getURI()); - if (brkps == null) { - brkps = new HashSet(); - BREAKPOINTS.put(breakpoint.getURI(), brkps); - } - brkps.add(breakpoint); - } - - /** - * Removes the given {@link DSLBreakpoint}. - * - * @param breakpoint - * the {@link DSLBreakpoint} - */ - protected void removeBreakpoint(DSLBreakpoint breakpoint) { - Set brkps = BREAKPOINTS.get(breakpoint.getURI()); - if (brkps != null) { - brkps.remove(breakpoint); - } - } - - /** - * Notifies Sirius about a change in the given {@link DSLBreakpoint}. - * - * @param instructionUri - * the {@link URI} of the instruction to refresh. - * @param debugModelID - * the debug model identifier - */ - public void notifySirius(Set instructionUris, String debugModelID) { - Map> toRefresh = representationToRefresh - .get(debugModelID); - if (toRefresh != null) { - for (IEditingSession session : SessionUIManager.INSTANCE - .getUISessions()) { - final TransactionalEditingDomain transactionalEditingDomain = session - .getSession().getTransactionalEditingDomain(); - final boolean instructionPresent = isOneInstructionPresent( - instructionUris, transactionalEditingDomain - .getResourceSet()); - if (instructionPresent) { - final List representations = getRepresentationsToRefresh( - toRefresh, session); - refreshRepresentations(transactionalEditingDomain, - representations); - } - } - } - } - - /**Refreshes given {@link DRepresentation} in the given {@link TransactionalEditingDomain}. - * @param transactionalEditingDomain the {@link TransactionalEditingDomain} - * @param representations the {@link List} of {@link DRepresentation} to refresh - */ - public void refreshRepresentations( - final TransactionalEditingDomain transactionalEditingDomain, - final List representations) { - // TODO prevent the editors from getting dirty - if (representations.size() != 0) { - final RefreshRepresentationsCommand refresh = new RefreshRepresentationsCommand( - transactionalEditingDomain, - new NullProgressMonitor(), - representations); - CommandExecution.execute(transactionalEditingDomain, refresh); - } - } - - /**Gets the {@link List} of {@link DRepresentation} to refresh in the given {@link IEditingSession}. - * @param toRefresh the representation names and layers to refresh - * @param session the {@link IEditingSession} - * @return the {@link List} of {@link DRepresentation} to refresh in the given {@link IEditingSession} - */ - private List getRepresentationsToRefresh( - Map> toRefresh, IEditingSession session) { - final List representations = new ArrayList(); - for (DialectEditor editor : session.getEditors()) { - final DRepresentation representation = editor - .getRepresentation(); - if (representation == null) { - System.out.println("Dammit"); - } else { - final RepresentationDescription description = DialectManager.INSTANCE - .getDescription(representation); - if (description != null) { - final String representationId = description - .getName(); - final Set layerIDs = toRefresh - .get(representationId); - if (layerIDs == ANY_LAYER) { - representations.add(representation); - } else if (layerIDs != null - && representation instanceof DDiagram - && isActiveLayer((DDiagram) representation, - layerIDs)) { - representations.add(representation); - } - } - } - } - return representations; - } - - /**Tells if at least one of the given instruction {@link URI} is present in the given {@link ResourceSet}. - * @param instructionUris the {@link Set} of instructions {@link URI} - * @param resourceSet the {@link ResourceSet} - * @return true if at least one of the given instruction {@link URI} is present in the given {@link ResourceSet}, false otherwise - */ - private boolean isOneInstructionPresent(Set instructionUris, - final ResourceSet resourceSet) { - boolean instructionPresent = false; - for (URI instructionUri : instructionUris) { - if (resourceSet.getEObject(instructionUri, false) != null) { - instructionPresent = true; - break; - } - } - return instructionPresent; - } - - /** - * Tells if any of the given {@link Layer#getName() layer identifier} is - * active for the given {@link DDiagram}. - * - * @param diagram - * the {@link DDiagram} - * @param layerIDs - * the {@link Set} of {@link Layer#getName() layer - * identifiers} - * @return true if any of the given {@link Layer#getName() - * layer identifier} is active for the given {@link DDiagram}, - * false otherwise - */ - private boolean isActiveLayer(DDiagram diagram, Set layerIDs) { - boolean res = false; - - for (Layer layer : diagram.getActivatedLayers()) { - if (layerIDs.contains(layer.getName())) { - res = true; - break; - } - } - - return res; - } - - /** - * Add the given {@link RepresentationDescription#getName() - * representation identifier} for {@link DRepresentation} refresh. - * - * @param debugModelID - * the debug model identifier - * @param representationID - * the {@link RepresentationDescription#getName() - * representation identifier} - */ - public void addRepresentationToRefresh(String debugModelID, - String representationID) { - Map> toRefresh = representationToRefresh - .get(debugModelID); - if (toRefresh == null) { - toRefresh = new HashMap>(); - representationToRefresh.put(debugModelID, toRefresh); - } - toRefresh.put(representationID, ANY_LAYER); - } - - /** - * Add the given {@link RepresentationDescription#getName() - * representation identifier} and {@link Layer#getName() layer - * identifier} for {@link DRepresentation} refresh. - * - * @param debugModelID - * the debug model identifier - * @param representationID - * the {@link RepresentationDescription#getName() - * representation identifier} - * @param layerID - * the {@link Layer#getName() layer identifier} - */ - public void addRepresentationToRefresh(String debugModelID, - String representationID, String layerID) { - Map> toRefresh = representationToRefresh - .get(debugModelID); - if (toRefresh == null) { - toRefresh = new HashMap>(); - representationToRefresh.put(debugModelID, toRefresh); - } - Set layerIDs = toRefresh.get(representationID); - if (layerIDs != ANY_LAYER) { - if (layerIDs == null) { - layerIDs = new HashSet(); - toRefresh.put(representationID, layerIDs); - } - layerIDs.add(layerID); - } - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener#currentInstructionChanged(java.lang.String, - * fr.obeo.dsl.debug.StackFrame) - */ - public void currentInstructionChanged(String debugModelID, - StackFrame frame) { - EObject currentInstruction = frame.getCurrentInstruction(); - final Set instructionURIs = new HashSet(); - if (currentInstruction instanceof Step) { - MSEOccurrence mseOccurrence = ((Step)currentInstruction).getMseoccurrence(); - instructionURIs.add(EcoreUtil.getURI(mseOccurrence.getMse())); - if (mseOccurrence.getMse().getCaller() != null) { - instructionURIs.add(EcoreUtil.getURI(mseOccurrence.getMse() - .getCaller())); - } - } else { - instructionURIs.add(EcoreUtil.getURI(currentInstruction)); - } - final Set lastInstructions = CURRENT_INSTRUCTIONS_PER_FRAME - .remove(frame); - if (lastInstructions != null) { - notifySirius(lastInstructions, debugModelID); - } - CURRENT_INSTRUCTIONS_PER_FRAME.put(frame, instructionURIs); - notifySirius(instructionURIs, debugModelID); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener#terminated(java.lang.String, - * fr.obeo.dsl.debug.StackFrame) - */ - public void terminated(String debugModelID, StackFrame frame) { - final Set lastInstructions = CURRENT_INSTRUCTIONS_PER_FRAME - .remove(frame); - if (lastInstructions != null) { - notifySirius(lastInstructions, debugModelID); - } - } - - /** - * Gets the current {@link StackFrame}. - * - * @return the current {@link StackFrame} - */ - protected StackFrame getCurrentFrame() { - return currentFrame; - } - - @Override - public void setCurrentFrame(String debugModelID, StackFrame frame) { - if (currentFrame != frame) { - currentFrame = frame; - Set instructionUris = CURRENT_INSTRUCTIONS_PER_FRAME - .get(getCurrentFrame()); - if (instructionUris != null) { - notifySirius(instructionUris, debugModelID); - } - } - } - - /** - * Tells if the given layer id and representation id should be refreshed while debugging the given - * debug model id. - * - * @param debugModelID - * the debug model id - * @param representationId - * the representation id - * @param layerID - * the layer id, it can be null - * @return true if the given layer id and representation id should be refreshed while - * debugging the given debug model id, false otherwise - */ - public boolean isRepresentationToRefresh(String debugModelID, String representationId, String layerID) { - final boolean res; - - final Map> representations = representationToRefresh.get(debugModelID); - if (representations != null) { - final Set layerIDs = representations.get(representationId); - res = layerIDs == ANY_LAYER || layerIDs.contains(layerID); - } else { - res = false; - } - - return res; - } - - } - - /** - * {@link Map} of {@link URI} pointing {@link DSLBreakpoint}. - */ - private static final Map> BREAKPOINTS = new HashMap>(); - - /** - * The {@link IBreakpointListener} maintaining breakpoints. - */ - public static final BreakpointListener LISTENER = new BreakpointListener(); - - /** - * Current instruction for a given {@link StackFrame}. - */ - private static final Map> CURRENT_INSTRUCTIONS_PER_FRAME = new HashMap>(); - - /** - * Constructor. - */ - public AbstractGemocDebuggerServices() { - for (StringCouple couple : getRepresentationRefreshList()) { - if (couple.getSecond() != null) { - LISTENER.addRepresentationToRefresh(getModelIdentifier(), - couple.getFirst(), couple.getSecond()); - } else { - LISTENER.addRepresentationToRefresh(getModelIdentifier(), - couple.getFirst()); - } - } - } - - /** - * Gets the {@link List} of {@link StringCouple} representing the - * {@link RepresentationDescription#getName() representation identifier} and - * the {@link Layer#getName() layer identifier} or null where - * services from this class are used. - * - * @return the {@link List} of {@link StringCouple} representing the - * {@link RepresentationDescription#getName() representation - * identifier} and the {@link Layer#getName() layer identifier} or - * null where services from this class are used - */ - protected abstract List getRepresentationRefreshList(); - - /** - * Tells if the given {@link EObject instruction} has a breakpoint. - * - * @param instruction - * the {@link EObject instruction} - * @return true if the given {@link EObject instruction} has a - * breakpoint, false otherwise - */ - public boolean hasBreakpoint(EObject instruction) { - final Set brkps = getBreakpoints(instruction); - return brkps != null && brkps.size() != 0; - } - - /** - * Tells if the given {@link EObject instruction} has an enabled breakpoint. - * - * @param instruction - * the {@link EObject instruction} - * @return true if the given {@link EObject instruction} has an - * enabled breakpoint, false otherwise - */ - public boolean hasEnabledBreakpoint(EObject instruction) { - boolean res = false; - final Set brkps = getBreakpoints(instruction); - - if (brkps != null && brkps.size() != 0) { - for (DSLBreakpoint breakpoint : brkps) { - try { - if (breakpoint.isEnabled()) { - res = true; - break; - } - } catch (CoreException e) { - // ignore - } - } - } - - return res; - } - - /** - * Tells if the given {@link EObject instruction} has an disabled - * breakpoint. - * - * @param instruction - * the {@link EObject instruction} - * @return true if the given {@link EObject instruction} has an - * disabled breakpoint, false otherwise - */ - public boolean hasDisabledBreakpoint(EObject instruction) { - boolean res = false; - final Set brkps = getBreakpoints(instruction); - - if (brkps != null && brkps.size() != 0) { - res = true; - for (DSLBreakpoint breakpoint : brkps) { - try { - if (breakpoint.isEnabled()) { - res = false; - break; - } - } catch (CoreException e) { - // ignore - } - } - } - - return res; - } - - /** - * Gets the {@link Set} of {@link DSLBreakpoint} for the - * {@link AbstractDSLDebuggerServices#getModelIdentifier() model identifier} - * . - * - * @param instruction - * the instruction to check - * @return the {@link Set} of {@link DSLBreakpoint} for the - * {@link AbstractDSLDebuggerServices#getModelIdentifier() model - * identifier} - */ - protected Set getBreakpoints(EObject instruction) { - Set res = new HashSet(); - - Set brkps = BREAKPOINTS.get(EcoreUtil - .getURI(instruction)); - if (brkps != null) { - for (DSLBreakpoint breakpoint : brkps) { - if (breakpoint.getModelIdentifier() - .equals(getModelIdentifier())) { - res.add(breakpoint); - } - } - } - - return res; - } - - /** - * Tells if the given {@link EObject instruction} is a currently debugged - * instruction. A debugged instruction in this context is an instruction a - * debug target is suspended on. - * - * @param instruction - * the {@link EObject instruction} - * @return true if the given {@link EObject instruction} is a - * currently debugged instruction, false otherwise - */ - public boolean isCurrentInstruction(EObject instruction) { - final Set instructions = CURRENT_INSTRUCTIONS_PER_FRAME - .get(LISTENER.getCurrentFrame()); - return instructions != null - && instructions.contains(EcoreUtil.getURI(instruction)); - } - - /** - * Gets the debug model identifier. - * - * @return the debug model identifier - */ - public String getModelIdentifier() { - return DefaultModelLoader.MODEL_ID; - } - -} diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/.project b/framework/execution_framework/plugins/org.gemoc.executionframework.ui/.project deleted file mode 100644 index 1d8560ef9..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.executionframework.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/META-INF/MANIFEST.MF b/framework/execution_framework/plugins/org.gemoc.executionframework.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 8e12e1f5f..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,25 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Execution framework UI -Bundle-SymbolicName: org.gemoc.executionframework.ui;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.executionframework.ui.Activator -Require-Bundle: org.gemoc.xdsmlframework.api, - org.gemoc.commons.eclipse, - org.eclipse.core.runtime;bundle-version="3.10.0", - org.eclipse.core.resources;bundle-version="3.9.1", - org.eclipse.ui.workbench, - org.eclipse.jface, - org.gemoc.executionframework.engine;bundle-version="0.1.0", - org.gemoc.commons.eclipse.ui;bundle-version="0.1.0", - org.eclipse.xtext.util, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Bundle-Vendor: GEMOC -Export-Package: org.gemoc.executionframework.ui, - org.gemoc.executionframework.ui.utils, - org.gemoc.executionframework.ui.views.engine, - org.gemoc.executionframework.ui.views.engine.actions, - org.gemoc.executionframework.ui.xdsml.activefile - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/build.properties b/framework/execution_framework/plugins/org.gemoc.executionframework.ui/build.properties deleted file mode 100644 index 79a6d663f..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - icons/,\ - plugin.xml,\ - about.html -src.includes = about.html diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/plugin.xml b/framework/execution_framework/plugins/org.gemoc.executionframework.ui/plugin.xml deleted file mode 100644 index f7d2dd6e4..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/plugin.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/pom.xml b/framework/execution_framework/plugins/org.gemoc.executionframework.ui/pom.xml deleted file mode 100644 index f925581a6..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.executionframework - org.gemoc.modeldebugging.executionframework.root - 0.1.0-SNAPSHOT - - - org.gemoc.executionframework.ui - 0.1.0-SNAPSHOT - eclipse-plugin - - - - - - - - - - - - \ No newline at end of file diff --git a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/Activator.java b/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/Activator.java deleted file mode 100644 index 31b6ffd70..000000000 --- a/framework/execution_framework/plugins/org.gemoc.executionframework.ui/src/org/gemoc/executionframework/ui/Activator.java +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************* - * 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.gemoc.executionframework.ui; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.gemoc.executionframework.ui.views.engine.EngineSelectionManager; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.gemoc_language_workbench.ui"; //$NON-NLS-1$ - - public static final String GEMOC_PROJECT_CONFIGURATION_FILE_EXTENSION = "xdsml"; - public static final String GEMOC_PROJECT_CONFIGURATION_FILE = "project." - + GEMOC_PROJECT_CONFIGURATION_FILE_EXTENSION; - - // extension point constants - - - public static final String MODEL_LOADER_CLASS_NAMEPART = "ModelLoader"; - public static final String CODEEXECUTOR_CLASS_NAMEPART = "CodeExecutor"; - public static final String SOLVER_CLASS_NAMEPART = "Solver"; - public static final String EXTENSION_GENERATED_CLASS_FOLDER_NAME = "src/main/xdsml-java-gen/"; - - // The shared instance - private static Activator plugin; - - private final EngineSelectionManager engineSelectionManager = new EngineSelectionManager(); - - - - - private final List eventPresenters = new ArrayList<>(); - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given plug-in - * relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - public static void warn(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); - } - - public static void error(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); - } - - - - /** - * Gets the {@link List} of registered {@link IMSEPresenter}s. - * - * @return the {@link List} of registered {@link IMSEPresenter}s - */ - public List getEventPresenters() { - return eventPresenters; - } - - - public EngineSelectionManager getEngineSelectionManager() { - return engineSelectionManager; - } -} diff --git a/framework/execution_framework/pom.xml b/framework/execution_framework/pom.xml index ddff32c18..6639a1c53 100644 --- a/framework/execution_framework/pom.xml +++ b/framework/execution_framework/pom.xml @@ -3,29 +3,30 @@ 4.0.0 org.gemoc.modeldebugging.executionframework org.gemoc.modeldebugging.executionframework.root - 0.1.0-SNAPSHOT + 2.3.0-SNAPSHOT pom - org.gemoc - org.gemoc.siriusanimation.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.root + 2.3.0-SNAPSHOT ../.. - plugins/org.gemoc.executionframework.engine - plugins/org.gemoc.executionframework.engine.ui - plugins/org.gemoc.executionframework.ui - plugins/org.gemoc.executionframework.extensions.sirius + plugins/org.eclipse.gemoc.executionframework.engine + plugins/org.eclipse.gemoc.executionframework.engine.ui + plugins/org.eclipse.gemoc.executionframework.ui + plugins/org.eclipse.gemoc.executionframework.extensions.sirius + plugins/org.eclipse.gemoc.executionframework.debugger + plugins/org.eclipse.gemoc.executionframework.debugger.ui - - releng/org.gemoc.modeldebugging.executionframework.feature - releng/org.gemoc.modeldebugging.executionframework.repository + + releng/org.eclipse.gemoc.executionframework.feature - + @@ -55,12 +56,7 @@ gemoc-studio_commons on CI p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.gemoc.commons.repository/target/repository/ - - - gemoc-studio_gemoc_commons on CI - p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_gemoc_commons/lastSuccessfulBuild/artifact/gemoc_commons/releng/org.gemoc.gemoc_commons.repository/target/repository/ + https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.eclipse.gemoc.commons.repository/target/repository/ modelanimation_siriusmodelanimation on CI diff --git a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/.gitignore b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.gitignore similarity index 100% rename from framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/.gitignore rename to framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.gitignore diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.project b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.project new file mode 100644 index 000000000..ca3fc3996 --- /dev/null +++ b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.project @@ -0,0 +1,29 @@ + + + org.eclipse.gemoc.executionframework.feature + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.FeatureNature + + diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.settings/org.eclipse.core.resources.prefs b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..1ba0aed79 --- /dev/null +++ b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF8 diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.settings/org.eclipse.xtend.core.Xtend.prefs b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.settings/org.eclipse.xtend.core.Xtend.prefs new file mode 100644 index 000000000..9682a4c0a --- /dev/null +++ b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/.settings/org.eclipse.xtend.core.Xtend.prefs @@ -0,0 +1,7 @@ +//outlet.DEFAULT_OUTPUT.sourceFolder.src/main/java.directory=xtend-gen +//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend +BuilderConfiguration.is_project_specific=true +eclipse.preferences.version=1 +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/build.properties b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/build.properties new file mode 100644 index 000000000..f6d2f3ebf --- /dev/null +++ b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/feature.properties b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/feature.xml b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/feature.xml new file mode 100644 index 000000000..d6526c306 --- /dev/null +++ b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/feature.xml @@ -0,0 +1,79 @@ + + + + + + + List of plugins that are part of the execution framework + + + + Copyright (c) 2012, 2017 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 + + + + %license + + + + + + + + + + + + + + + + diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/gemocstudio32.png b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/gemocstudio32.png differ diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/license.html b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/pom.xml b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/pom.xml new file mode 100644 index 000000000..85905e373 --- /dev/null +++ b/framework/execution_framework/releng/org.eclipse.gemoc.executionframework.feature/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + ../../pom.xml + org.gemoc.modeldebugging.executionframework + org.gemoc.modeldebugging.executionframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.executionframework.feature + eclipse-feature + + \ No newline at end of file diff --git a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/build.properties b/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/build.properties deleted file mode 100644 index 25f8b7f02..000000000 --- a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = feature.xml,\ - . diff --git a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/feature.xml b/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/feature.xml deleted file mode 100644 index 98f8ad4f8..000000000 --- a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/feature.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - List of plugins that are part of the execution framework - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - - - diff --git a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/pom.xml b/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/pom.xml deleted file mode 100644 index 2cf14a6b9..000000000 --- a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.feature/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../../pom.xml - org.gemoc.modeldebugging.executionframework - org.gemoc.modeldebugging.executionframework.root - 0.1.0-SNAPSHOT - - - org.gemoc.modeldebugging.executionframework.feature - eclipse-feature - - \ No newline at end of file diff --git a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/category.xml b/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/category.xml deleted file mode 100644 index e455e0446..000000000 --- a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/category.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/pom.xml b/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/pom.xml deleted file mode 100644 index d16634b9e..000000000 --- a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../../pom.xml - org.gemoc.modeldebugging.executionframework - 0.1.0-SNAPSHOT - org.gemoc.modeldebugging.executionframework.root - - - org.gemoc.modeldebugging.executionframework.repository - eclipse-repository - - \ No newline at end of file diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/.classpath b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/.classpath rename to framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/.classpath diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/.project b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/.project new file mode 100644 index 000000000..8a5418d67 --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.executionframework.test.lib + + + + + + 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/trace/commons/plugins/fr.inria.diverse.trace.api/.settings/org.eclipse.jdt.core.prefs b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.api/.settings/org.eclipse.jdt.core.prefs rename to framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/META-INF/MANIFEST.MF b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/META-INF/MANIFEST.MF new file mode 100644 index 000000000..354939278 --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Test +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.test.lib +Bundle-Version: 1.0.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.junit;bundle-version="4.12.0", + org.eclipse.core.runtime;bundle-version="3.12.0", + org.eclipse.core.resources;bundle-version="3.11.1", + org.eclipse.gemoc.xdsmlframework.api;bundle-version="2.3.0", + org.eclipse.emf.ecore;bundle-version="2.12.0", + org.eclipse.swt;bundle-version="3.105.3", + org.eclipse.ui;bundle-version="3.108.1", + org.eclipse.gemoc.trace.gemoc;bundle-version="2.3.0", + org.eclipse.gemoc.executionframework.engine;bundle-version="2.3.0" +Export-Package: org.eclipse.gemoc.executionframework.test.lib, + org.eclipse.gemoc.executionframework.test.lib.impl + diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/build.properties b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/build.properties new file mode 100644 index 000000000..2bea6db63 --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/IEngineWrapper.xtend b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/IEngineWrapper.xtend new file mode 100644 index 000000000..8387c02fb --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/IEngineWrapper.xtend @@ -0,0 +1,15 @@ +package org.eclipse.gemoc.executionframework.test.lib + +import java.util.Set +import org.eclipse.emf.common.util.URI +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine + +interface IEngineWrapper { + + def void prepare(ILanguageWrapper wrapper,IExecutableModel model, Set addons, URI uri) + + def void run() + + def IExecutionEngine getRealEngine() + +} \ No newline at end of file diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/IExecutableModel.xtend b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/IExecutableModel.xtend new file mode 100644 index 000000000..54ac4e0f2 --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/IExecutableModel.xtend @@ -0,0 +1,12 @@ +package org.eclipse.gemoc.executionframework.test.lib + +interface IExecutableModel { + + def String getFileName() + def String getPluginName() + def String getFolderPath() + def String getMelangeQuery() + def String getInitArgument() + def int getShouldStopAfter() + +} diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/ILanguageWrapper.xtend b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/ILanguageWrapper.xtend new file mode 100644 index 000000000..9ae71e63f --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/ILanguageWrapper.xtend @@ -0,0 +1,11 @@ +package org.eclipse.gemoc.executionframework.test.lib + +interface ILanguageWrapper { + + def String getEntryPoint() + + def String getLanguageName() + + def String getInitializationMethod() + +} \ No newline at end of file diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestEngineAddon.xtend b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestEngineAddon.xtend new file mode 100644 index 000000000..a8689aa89 --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestEngineAddon.xtend @@ -0,0 +1,77 @@ +package org.eclipse.gemoc.executionframework.test.lib.impl + +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine +import org.eclipse.gemoc.trace.commons.model.trace.Step +import java.util.Collection +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus +import java.util.List +import org.eclipse.xtend.lib.annotations.Accessors + +class TestEngineAddon implements IEngineAddon { + + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + var int amountOfStepsExecuted = 0 + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + var boolean engineAboutToStart = false + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + var boolean engineAboutToStop = false + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + var boolean engineStarted = false + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + var boolean engineStopped = false + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + var boolean engineAboutToDispose = false + + val int shouldStopAfter + + new(int shouldStopAfter) { + this.shouldStopAfter = shouldStopAfter + } + + override aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute) { + } + + override aboutToSelectStep(IExecutionEngine engine, Collection> steps) { + } + + override engineAboutToDispose(IExecutionEngine engine) { + engineAboutToDispose = true + } + + override engineAboutToStart(IExecutionEngine engine) { + engineAboutToStart = true + } + + override engineAboutToStop(IExecutionEngine engine) { + engineAboutToStop = true + } + + override engineStarted(IExecutionEngine executionEngine) { + engineStarted = true + } + + override engineStatusChanged(IExecutionEngine engine, RunStatus newStatus) { + } + + override engineStopped(IExecutionEngine engine) { + engineStopped = true + } + + override proposedStepsChanged(IExecutionEngine engine, Collection> steps) { + } + + override stepExecuted(IExecutionEngine engine, Step stepExecuted) { + amountOfStepsExecuted++ + if (shouldStopAfter != -1 && shouldStopAfter < 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 new file mode 100644 index 000000000..aa1ab6d0e --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestHelper.xtend @@ -0,0 +1,94 @@ +package org.eclipse.gemoc.executionframework.test.lib.impl + +import java.io.File +import java.io.PrintWriter +import java.io.StringWriter +import java.util.Random +import java.util.Set +import org.eclipse.core.resources.IFile +import org.eclipse.core.resources.ResourcesPlugin +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.core.runtime.Status +import org.eclipse.core.runtime.jobs.Job +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 static org.junit.Assert.* + +class TestHelper { + + private static def testInternal(IProgressMonitor m, IEngineWrapper engine, ILanguageWrapper language, + Set addons, IExecutableModel model) { + + // Create eclipse project in test WS + val eclipseProject = ResourcesPlugin::getWorkspace().getRoot().getProject(Math::abs(new Random().nextInt).toString); + if (eclipseProject.exists) + eclipseProject.delete(true, m) + eclipseProject.create(m) + eclipseProject.open(m) + + // Copy model to execute in WS + val IFile file = eclipseProject.getFile(model.getFileName()); + val String filePath = new File(new File(model.getFolderPath()), model.getFileName()).absolutePath + TestUtil::copyFileFromPlugin(model.pluginName, filePath, file, m) + + // Create model URI + val modelURI = URI::createPlatformResourceURI(file.fullPath.toString, true) + + // Prepare engine + val TestEngineAddon testAddon = new TestEngineAddon(model.shouldStopAfter) + engine.prepare(language, model, addons, modelURI) + engine.realEngine.executionContext.executionPlatform.addEngineAddon(testAddon) + + // 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 + } + + def static void testWithAddons(IEngineWrapper engine, ILanguageWrapper language, Set addons, + IExecutableModel model) { + val job = new Job("single test case") { + + override protected run(IProgressMonitor m) { + try { + return testInternal(m, engine, language, addons, model) + } 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) + return errorStatus + } + } + } + job.schedule + TestUtil::waitForJobs + if (job.result != null && job.result.exception != null) { + throw job.result.exception + } + } + + def static void testWithGenericTrace(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model) { + testWithAddons(engine, language, #{"Generic MultiDimensional Trace"}, model) + } + + def static void testWithoutExtraAddons(IEngineWrapper engine, ILanguageWrapper language, IExecutableModel model) { + testWithAddons(engine, language, #{}, model) + } + +} diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestModel.xtend b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestModel.xtend new file mode 100644 index 000000000..f1cfddf33 --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestModel.xtend @@ -0,0 +1,40 @@ +package org.eclipse.gemoc.executionframework.test.lib.impl + +import org.eclipse.xtend.lib.annotations.Accessors +import org.eclipse.gemoc.executionframework.test.lib.IExecutableModel + +class TestModel implements IExecutableModel { + + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + val String fileName + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + val String pluginName + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + val String folderPath + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + val String initArgument + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + val String melangeQuery + @Accessors(PRIVATE_SETTER,PUBLIC_GETTER) + val int shouldStopAfter + + new(String pluginName, String folderPath, String fileName, String initArgument, String melangeQuery, + int shouldStopAfter) { + this.pluginName = pluginName + this.folderPath = folderPath + this.fileName = fileName + this.initArgument = initArgument + this.melangeQuery = melangeQuery + this.shouldStopAfter = shouldStopAfter + } + + new(String pluginName, String folderPath, String fileName) { + this(pluginName, folderPath, fileName, "", "", -1) + } + + new(String pluginName, String folderPath, String fileName, String initArgument, String melangeQuery) { + this(pluginName, folderPath, fileName, initArgument, melangeQuery, -1) + } + + +} 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 new file mode 100644 index 000000000..ee2a26002 --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestRunConfiguration.xtend @@ -0,0 +1,99 @@ +package org.eclipse.gemoc.executionframework.test.lib.impl + +import java.util.ArrayList +import java.util.List +import java.util.Set +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.resource.impl.ResourceSetImpl +import org.eclipse.gemoc.executionframework.test.lib.ILanguageWrapper +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint +import org.eclipse.gemoc.executionframework.test.lib.IExecutableModel + +class TestRunConfiguration implements IRunConfiguration { + private val ILanguageWrapper language + private val IExecutableModel model + private val Set addonsToLoad + private val URI modelURI + + new(IExecutableModel model, URI modelURI, ILanguageWrapper language, Set addonsToLoad) { + this.language = language + this.model = model + this.addonsToLoad = addonsToLoad + this.modelURI = modelURI + } + + override getAnimationDelay() { + return 0; + } + + override getAnimatorURI() { + return null; + } + + override getDeadlockDetectionDepth() { + return 0; + } + + override getEngineAddonExtensions() { + val List result = new ArrayList(); + val loadedAddons = EngineAddonSpecificationExtensionPoint.getSpecifications() + for (ext : loadedAddons) { + if (addonsToLoad.contains(ext.name)) { + result.add(ext) + } + } + return result + } + + override getExecutedModelAsMelangeURI() { + if (melangeQuery.isEmpty()) + return modelURI; + val String melangeURIString = modelURI.toString().replace("platform:/", "melange:/") + melangeQuery; + return URI.createURI(melangeURIString); + } + + override getExecutedModelURI() { + modelURI + } + + override getExecutionEntryPoint() { + language.entryPoint + } + + override getLanguageName() { + language.languageName + } + + override getMelangeQuery() { + model.melangeQuery + } + + override getBreakStart() { + false + } + + override getDebugModelID() { + "org.eclipse.gemoc.execution.sequential.javaengine.ui.debugModel" + } + + override getModelEntryPoint() { + val ResourceSet resourceSet = new ResourceSetImpl(); + val Resource modelResource = resourceSet.createResource(modelURI); + modelResource.load(null); + val result = modelResource.getURIFragment(modelResource.contents.head) + modelResource.unload + return result + } + + override getModelInitializationArguments() { + model.initArgument + } + + override getModelInitializationMethod() { + language.initializationMethod + } +} diff --git a/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestUtil.xtend b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestUtil.xtend new file mode 100644 index 000000000..30fe8416f --- /dev/null +++ b/framework/execution_framework/tests/org.eclipse.gemoc.executionframework.test.lib/src/org/eclipse/gemoc/executionframework/test/lib/impl/TestUtil.xtend @@ -0,0 +1,133 @@ +package org.eclipse.gemoc.executionframework.test.lib.impl + +import java.io.File +import java.io.FileInputStream +import java.io.InputStream +import java.util.Map.Entry +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.runtime.FileLocator +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.core.runtime.Path +import org.eclipse.core.runtime.Platform +import org.eclipse.core.runtime.jobs.Job +import org.eclipse.swt.widgets.Display +import org.eclipse.ui.IWindowListener +import org.eclipse.ui.IWorkbenchWindow +import org.eclipse.ui.PlatformUI +import org.eclipse.gemoc.executionframework.engine.Activator +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine +import org.osgi.framework.Bundle + +class TestUtil { + + public static def void copyFileInWS(File file, IFolder destination, IProgressMonitor m) { + val fileInProject = destination.getFile(file.name) + if (!fileInProject.exists) + fileInProject.create(new FileInputStream(file), true, m); + } + + public static def IFolder copyFolderInWS(File folder, IResource destination, IProgressMonitor m) { + val folderCopy = if (destination instanceof IProject) { + destination.getFolder(folder.name) + } else if (destination instanceof IFolder) { + destination.getFolder(folder.name) + } else + null + + if (!folderCopy.exists) + folderCopy.create(true, true, m) + for (File f : folder.listFiles) { + if (f.isFile) { + copyFileInWS(f, folderCopy, m) + } else if (f.isDirectory) { + copyFolderInWS(f, folderCopy, m) + } + } + return folderCopy + } + + public static def void waitForJobs() { + while (!Job.getJobManager().isIdle()) + delay(100); + } + + public static def void waitForJobsThenWindowClosed() { + waitForJobsThenWait(1000000000); + } + + public static def void waitForJobsThenWait(long waitTimeMillis) { + waitForJobs(); + delay(waitTimeMillis); + } + + public static def void waitUIThread(long waitTimeMillis) { + delay(waitTimeMillis); + } + + static var closed = false; + + private static def void delay(long waitTimeMillis) { + val Display display = Display.getCurrent(); + + // We try to capture when the window is closed by the tester + PlatformUI.getWorkbench.addWindowListener( + new IWindowListener() { + + override windowActivated(IWorkbenchWindow window) { + } + + override windowClosed(IWorkbenchWindow window) { + closed = true + } + + override windowDeactivated(IWorkbenchWindow window) { + } + + override windowOpened(IWorkbenchWindow window) { + } + + } + ) + + // If this is the UI thread, + // then process input. + if (display != null) { + val long endTimeMillis = System.currentTimeMillis() + waitTimeMillis; + while (System.currentTimeMillis() < endTimeMillis && !closed) { + if (!display.readAndDispatch()) + display.sleep(); + } + display.update(); + } // Otherwise, perform a simple sleep. + else { + try { + Thread.sleep(waitTimeMillis); + } catch (InterruptedException e) { + // Ignored. + } + } + } + + def static public void removeStoppedEngines() { + val registry = Activator.getDefault().gemocRunningEngineRegistry + for (Entry engineEntry : registry.getRunningEngines().entrySet()) { + if (engineEntry.value.runningStatus.equals(EngineStatus.RunStatus.Stopped)) { + registry.unregisterEngine(engineEntry.getKey()) + } + + } + } + + def static copyFileFromPlugin(String pluginName, String pathInPlugin, IFile targetFile, IProgressMonitor m) { + val Bundle bundle = Platform::getBundle(pluginName); + val path = new Path(pathInPlugin) + val InputStream stream = FileLocator::openStream(bundle, path, false); + targetFile.create(stream, true, m); + } + + +} diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.checkstyle b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/.classpath b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.classpath similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/.classpath rename to framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.classpath diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/.gitignore b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.gitignore similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/.gitignore rename to framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.gitignore diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.project b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.project new file mode 100644 index 000000000..3d13da12d --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.executionframework.reflectivetrace.model + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/META-INF/MANIFEST.MF new file mode 100644 index 000000000..6bc5e1dbc --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.executionframework.reflectivetrace.model;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: INRIA +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace, + org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl, + org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/about.html b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/about.html similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/about.html rename to framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/about.html diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/build.properties b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/build.properties new file mode 100644 index 000000000..fa30c97ad --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/build.properties @@ -0,0 +1,22 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + about.html +jars.compile.order = . +source.. = src/ +output.. = bin/ +src.includes = about.html diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.aird b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.aird similarity index 98% rename from framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.aird rename to framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.aird index 8ff0c774d..40338cfa6 100644 --- a/framework/framework_commons/plugins/org.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.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.ecore b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.ecore similarity index 94% rename from framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.ecore rename to framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/model/GemocExecutionEngineTrace.ecore index 1e4ddcc54..618a3c0cd 100644 --- a/framework/framework_commons/plugins/org.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 + + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/pom.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/pom.xml new file mode 100644 index 000000000..f71fbbc52 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.framework.commons + org.gemoc.modeldebugging.framework.commons.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.executionframework.reflectivetrace.model + eclipse-plugin + 2.3.0-SNAPSHOT + \ No newline at end of file diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Branch.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Branch.java new file mode 100644 index 000000000..53a04c3ca --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Branch.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Branch'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStartIndex Start Index}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStopIndex Stop Index}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices Choices}
  • + *
+ * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch() + * @model + * @generated + */ +public interface Branch extends EObject { + /** + * Returns the value of the 'Start Index' attribute. + * + *

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

+ * + * @return the value of the 'Start Index' attribute. + * @see #setStartIndex(int) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_StartIndex() + * @model + * @generated + */ + int getStartIndex(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStartIndex Start Index}' attribute. + * + * + * @param value the new value of the 'Start Index' attribute. + * @see #getStartIndex() + * @generated + */ + void setStartIndex(int value); + + /** + * Returns the value of the 'Stop Index' attribute. + * + *

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

+ * + * @return the value of the 'Stop Index' attribute. + * @see #setStopIndex(int) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_StopIndex() + * @model + * @generated + */ + int getStopIndex(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStopIndex Stop Index}' attribute. + * + * + * @param value the new value of the 'Stop Index' attribute. + * @see #getStopIndex() + * @generated + */ + void setStopIndex(int value); + + /** + * Returns the value of the 'Choices' reference list. + * The list contents are of type {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice}. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch Branch}'. + * + *

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

+ * + * @return the value of the 'Choices' reference list. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_Choices() + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch + * @model opposite="branch" + * @generated + */ + EList getChoices(); + +} // Branch diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Choice.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Choice.java new file mode 100644 index 000000000..c21a7bfb2 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Choice.java @@ -0,0 +1,212 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +/** + * + * A representation of the model object 'Choice'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices Next Choices}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPossibleLogicalSteps Possible Logical Steps}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState Context State}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch Branch}
  • + *
+ * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice() + * @model + * @generated + */ +public interface Choice extends EObject { + /** + * Returns the value of the 'Next Choices' reference list. + * The list contents are of type {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice}. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}'. + * + *

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

+ * + * @return the value of the 'Next Choices' reference list. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_NextChoices() + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice + * @model opposite="previousChoice" + * @generated + */ + EList getNextChoices(); + + /** + * Returns the value of the 'Possible Logical Steps' containment reference list. + * The list contents are of type {@link org.eclipse.gemoc.trace.commons.model.trace.Step}. + * + *

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

+ * + * @return the value of the 'Possible Logical Steps' containment reference list. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_PossibleLogicalSteps() + * @model containment="true" + * @generated + */ + EList getPossibleLogicalSteps(); + + /** + * Returns the value of the 'Chosen Logical Step' reference. + * + *

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

+ * + * @return the value of the 'Chosen Logical Step' reference. + * @see #setChosenLogicalStep(Step) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_ChosenLogicalStep() + * @model + * @generated + */ + Step getChosenLogicalStep(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}' reference. + * + * + * @param value the new value of the 'Chosen Logical Step' reference. + * @see #getChosenLogicalStep() + * @generated + */ + void setChosenLogicalStep(Step value); + + /** + * Returns the value of the 'Context State' containment reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice Choice}'. + * + *

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

+ * + * @return the value of the 'Context State' containment reference. + * @see #setContextState(ContextState) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_ContextState() + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice + * @model opposite="choice" containment="true" + * @generated + */ + ContextState getContextState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState Context State}' containment reference. + * + * + * @param value the new value of the 'Context State' containment reference. + * @see #getContextState() + * @generated + */ + void setContextState(ContextState value); + + /** + * Returns the value of the 'Previous Choice' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices Next Choices}'. + * + *

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

+ * + * @return the value of the 'Previous Choice' reference. + * @see #setPreviousChoice(Choice) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_PreviousChoice() + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices + * @model opposite="nextChoices" + * @generated + */ + Choice getPreviousChoice(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}' reference. + * + * + * @param value the new value of the 'Previous Choice' reference. + * @see #getPreviousChoice() + * @generated + */ + void setPreviousChoice(Choice value); + + /** + * Returns the value of the 'Selected Next Choice' reference. + * + *

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

+ * + * @return the value of the 'Selected Next Choice' reference. + * @see #setSelectedNextChoice(Choice) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_SelectedNextChoice() + * @model + * @generated + */ + Choice getSelectedNextChoice(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}' reference. + * + * + * @param value the new value of the 'Selected Next Choice' reference. + * @see #getSelectedNextChoice() + * @generated + */ + void setSelectedNextChoice(Choice value); + + /** + * Returns the value of the 'Branch' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices Choices}'. + * + *

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

+ * + * @return the value of the 'Branch' reference. + * @see #setBranch(Branch) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_Branch() + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices + * @model opposite="choices" required="true" + * @generated + */ + Branch getBranch(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch Branch}' reference. + * + * + * @param value the new value of the 'Branch' reference. + * @see #getBranch() + * @generated + */ + void setBranch(Branch value); + +} // Choice diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ContextState.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ContextState.java new file mode 100644 index 000000000..a9132d989 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ContextState.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Context State'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState Model State}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getSolverState Solver State}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice Choice}
  • + *
+ * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState() + * @model + * @generated + */ +public interface ContextState extends EObject { + /** + * Returns the value of the 'Model State' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState Context State}'. + * + *

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

+ * + * @return the value of the 'Model State' reference. + * @see #setModelState(ModelState) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_ModelState() + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState + * @model opposite="contextState" required="true" + * @generated + */ + ModelState getModelState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState Model State}' reference. + * + * + * @param value the new value of the 'Model State' reference. + * @see #getModelState() + * @generated + */ + void setModelState(ModelState value); + + /** + * Returns the value of the 'Solver State' containment reference. + * + *

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

+ * + * @return the value of the 'Solver State' containment reference. + * @see #setSolverState(SolverState) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_SolverState() + * @model containment="true" required="true" + * @generated + */ + SolverState getSolverState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getSolverState Solver State}' containment reference. + * + * + * @param value the new value of the 'Solver State' containment reference. + * @see #getSolverState() + * @generated + */ + void setSolverState(SolverState value); + + /** + * Returns the value of the 'Choice' container reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState Context State}'. + * + *

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

+ * + * @return the value of the 'Choice' container reference. + * @see #setChoice(Choice) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_Choice() + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState + * @model opposite="contextState" transient="false" + * @generated + */ + Choice getChoice(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice Choice}' container reference. + * + * + * @param value the new value of the 'Choice' container reference. + * @see #getChoice() + * @generated + */ + void setChoice(Choice value); + +} // ContextState diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ExecutionTraceModel.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ExecutionTraceModel.java new file mode 100644 index 000000000..261b3d56b --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ExecutionTraceModel.java @@ -0,0 +1,86 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Execution Trace Model'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getChoices Choices}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getBranches Branches}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getReachedStates Reached States}
  • + *
+ * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel() + * @model + * @generated + */ +public interface ExecutionTraceModel extends EObject { + /** + * Returns the value of the 'Choices' containment reference list. + * The list contents are of type {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice}. + * + *

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

+ * + * @return the value of the 'Choices' containment reference list. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_Choices() + * @model containment="true" + * @generated + */ + EList getChoices(); + + /** + * Returns the value of the 'Branches' containment reference list. + * The list contents are of type {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch}. + * + *

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

+ * + * @return the value of the 'Branches' containment reference list. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_Branches() + * @model containment="true" + * @generated + */ + EList getBranches(); + + /** + * Returns the value of the 'Reached States' containment reference list. + * The list contents are of type {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState}. + * + *

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

+ * + * @return the value of the 'Reached States' containment reference list. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_ReachedStates() + * @model containment="true" + * @generated + */ + EList getReachedStates(); + +} // ExecutionTraceModel diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_traceFactory.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_traceFactory.java new file mode 100644 index 000000000..52dcac3f2 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_traceFactory.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace; + +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.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage + * @generated + */ +public interface Gemoc_execution_traceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + Gemoc_execution_traceFactory eINSTANCE = org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_traceFactoryImpl.init(); + + /** + * Returns a new object of class 'Choice'. + * + * + * @return a new object of class 'Choice'. + * @generated + */ + Choice createChoice(); + + /** + * Returns a new object of class 'Execution Trace Model'. + * + * + * @return a new object of class 'Execution Trace Model'. + * @generated + */ + ExecutionTraceModel createExecutionTraceModel(); + + /** + * Returns a new object of class 'Solver State'. + * + * + * @return a new object of class 'Solver State'. + * @generated + */ + SolverState createSolverState(); + + /** + * Returns a new object of class 'Model State'. + * + * + * @return a new object of class 'Model State'. + * @generated + */ + ModelState createModelState(); + + /** + * Returns a new object of class 'Context State'. + * + * + * @return a new object of class 'Context State'. + * @generated + */ + ContextState createContextState(); + + /** + * Returns a new object of class 'Branch'. + * + * + * @return a new object of class 'Branch'. + * @generated + */ + Branch createBranch(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + Gemoc_execution_tracePackage getGemoc_execution_tracePackage(); + +} //Gemoc_execution_traceFactory diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_tracePackage.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_tracePackage.java new file mode 100644 index 000000000..8cee89efc --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_tracePackage.java @@ -0,0 +1,972 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +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.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_traceFactory + * @model kind="package" + * @generated + */ +public interface Gemoc_execution_tracePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "gemoc_execution_trace"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.inira.fr/gemoc_execution_trace"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "gemoc_execution_trace"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + Gemoc_execution_tracePackage eINSTANCE = org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl Choice}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getChoice() + * @generated + */ + int CHOICE = 0; + + /** + * The feature id for the 'Next Choices' reference list. + * + * + * @generated + * @ordered + */ + int CHOICE__NEXT_CHOICES = 0; + + /** + * The feature id for the 'Possible Logical Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int CHOICE__POSSIBLE_LOGICAL_STEPS = 1; + + /** + * The feature id for the 'Chosen Logical Step' reference. + * + * + * @generated + * @ordered + */ + int CHOICE__CHOSEN_LOGICAL_STEP = 2; + + /** + * The feature id for the 'Context State' containment reference. + * + * + * @generated + * @ordered + */ + int CHOICE__CONTEXT_STATE = 3; + + /** + * The feature id for the 'Previous Choice' reference. + * + * + * @generated + * @ordered + */ + int CHOICE__PREVIOUS_CHOICE = 4; + + /** + * The feature id for the 'Selected Next Choice' reference. + * + * + * @generated + * @ordered + */ + int CHOICE__SELECTED_NEXT_CHOICE = 5; + + /** + * The feature id for the 'Branch' reference. + * + * + * @generated + * @ordered + */ + int CHOICE__BRANCH = 6; + + /** + * The number of structural features of the 'Choice' class. + * + * + * @generated + * @ordered + */ + int CHOICE_FEATURE_COUNT = 7; + + /** + * The number of operations of the 'Choice' class. + * + * + * @generated + * @ordered + */ + int CHOICE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl Execution Trace Model}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getExecutionTraceModel() + * @generated + */ + int EXECUTION_TRACE_MODEL = 1; + + /** + * The feature id for the 'Choices' containment reference list. + * + * + * @generated + * @ordered + */ + int EXECUTION_TRACE_MODEL__CHOICES = 0; + + /** + * The feature id for the 'Branches' containment reference list. + * + * + * @generated + * @ordered + */ + int EXECUTION_TRACE_MODEL__BRANCHES = 1; + + /** + * The feature id for the 'Reached States' containment reference list. + * + * + * @generated + * @ordered + */ + int EXECUTION_TRACE_MODEL__REACHED_STATES = 2; + + /** + * The number of structural features of the 'Execution Trace Model' class. + * + * + * @generated + * @ordered + */ + int EXECUTION_TRACE_MODEL_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Execution Trace Model' class. + * + * + * @generated + * @ordered + */ + int EXECUTION_TRACE_MODEL_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl Solver State}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getSolverState() + * @generated + */ + int SOLVER_STATE = 2; + + /** + * The feature id for the 'Model' reference. + * + * + * @generated + * @ordered + */ + int SOLVER_STATE__MODEL = 0; + + /** + * The feature id for the 'Serializable Model' attribute. + * + * + * @generated + * @ordered + */ + int SOLVER_STATE__SERIALIZABLE_MODEL = 1; + + /** + * The number of structural features of the 'Solver State' class. + * + * + * @generated + * @ordered + */ + int SOLVER_STATE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Solver State' class. + * + * + * @generated + * @ordered + */ + int SOLVER_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl Model State}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getModelState() + * @generated + */ + int MODEL_STATE = 3; + + /** + * The feature id for the 'Model' reference. + * + * + * @generated + * @ordered + */ + int MODEL_STATE__MODEL = 0; + + /** + * The feature id for the 'Context State' reference list. + * + * + * @generated + * @ordered + */ + int MODEL_STATE__CONTEXT_STATE = 1; + + /** + * The number of structural features of the 'Model State' class. + * + * + * @generated + * @ordered + */ + int MODEL_STATE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Model State' class. + * + * + * @generated + * @ordered + */ + int MODEL_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl Context State}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getContextState() + * @generated + */ + int CONTEXT_STATE = 4; + + /** + * The feature id for the 'Model State' reference. + * + * + * @generated + * @ordered + */ + int CONTEXT_STATE__MODEL_STATE = 0; + + /** + * The feature id for the 'Solver State' containment reference. + * + * + * @generated + * @ordered + */ + int CONTEXT_STATE__SOLVER_STATE = 1; + + /** + * The feature id for the 'Choice' container reference. + * + * + * @generated + * @ordered + */ + int CONTEXT_STATE__CHOICE = 2; + + /** + * The number of structural features of the 'Context State' class. + * + * + * @generated + * @ordered + */ + int CONTEXT_STATE_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Context State' class. + * + * + * @generated + * @ordered + */ + int CONTEXT_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl Branch}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getBranch() + * @generated + */ + int BRANCH = 5; + + /** + * The feature id for the 'Start Index' attribute. + * + * + * @generated + * @ordered + */ + int BRANCH__START_INDEX = 0; + + /** + * The feature id for the 'Stop Index' attribute. + * + * + * @generated + * @ordered + */ + int BRANCH__STOP_INDEX = 1; + + /** + * The feature id for the 'Choices' reference list. + * + * + * @generated + * @ordered + */ + int BRANCH__CHOICES = 2; + + /** + * The number of structural features of the 'Branch' class. + * + * + * @generated + * @ordered + */ + int BRANCH_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Branch' class. + * + * + * @generated + * @ordered + */ + int BRANCH_OPERATION_COUNT = 0; + + /** + * The meta object id for the 'ISerializable' data type. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getISerializable() + * @generated + */ + int ISERIALIZABLE = 6; + + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice Choice}'. + * + * + * @return the meta object for class 'Choice'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice + * @generated + */ + EClass getChoice(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices Next Choices}'. + * + * + * @return the meta object for the reference list 'Next Choices'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices() + * @see #getChoice() + * @generated + */ + EReference getChoice_NextChoices(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPossibleLogicalSteps Possible Logical Steps}'. + * + * + * @return the meta object for the containment reference list 'Possible Logical Steps'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPossibleLogicalSteps() + * @see #getChoice() + * @generated + */ + EReference getChoice_PossibleLogicalSteps(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}'. + * + * + * @return the meta object for the reference 'Chosen Logical Step'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getChosenLogicalStep() + * @see #getChoice() + * @generated + */ + EReference getChoice_ChosenLogicalStep(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState Context State}'. + * + * + * @return the meta object for the containment reference 'Context State'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState() + * @see #getChoice() + * @generated + */ + EReference getChoice_ContextState(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}'. + * + * + * @return the meta object for the reference 'Previous Choice'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice() + * @see #getChoice() + * @generated + */ + EReference getChoice_PreviousChoice(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}'. + * + * + * @return the meta object for the reference 'Selected Next Choice'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getSelectedNextChoice() + * @see #getChoice() + * @generated + */ + EReference getChoice_SelectedNextChoice(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch Branch}'. + * + * + * @return the meta object for the reference 'Branch'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch() + * @see #getChoice() + * @generated + */ + EReference getChoice_Branch(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel Execution Trace Model}'. + * + * + * @return the meta object for class 'Execution Trace Model'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel + * @generated + */ + EClass getExecutionTraceModel(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getChoices Choices}'. + * + * + * @return the meta object for the containment reference list 'Choices'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getChoices() + * @see #getExecutionTraceModel() + * @generated + */ + EReference getExecutionTraceModel_Choices(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getBranches Branches}'. + * + * + * @return the meta object for the containment reference list 'Branches'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getBranches() + * @see #getExecutionTraceModel() + * @generated + */ + EReference getExecutionTraceModel_Branches(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getReachedStates Reached States}'. + * + * + * @return the meta object for the containment reference list 'Reached States'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getReachedStates() + * @see #getExecutionTraceModel() + * @generated + */ + EReference getExecutionTraceModel_ReachedStates(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState Solver State}'. + * + * + * @return the meta object for class 'Solver State'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState + * @generated + */ + EClass getSolverState(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getModel Model}'. + * + * + * @return the meta object for the reference 'Model'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getModel() + * @see #getSolverState() + * @generated + */ + EReference getSolverState_Model(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}'. + * + * + * @return the meta object for the attribute 'Serializable Model'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getSerializableModel() + * @see #getSolverState() + * @generated + */ + EAttribute getSolverState_SerializableModel(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState Model State}'. + * + * + * @return the meta object for class 'Model State'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState + * @generated + */ + EClass getModelState(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getModel Model}'. + * + * + * @return the meta object for the reference 'Model'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getModel() + * @see #getModelState() + * @generated + */ + EReference getModelState_Model(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState Context State}'. + * + * + * @return the meta object for the reference list 'Context State'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState() + * @see #getModelState() + * @generated + */ + EReference getModelState_ContextState(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState Context State}'. + * + * + * @return the meta object for class 'Context State'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState + * @generated + */ + EClass getContextState(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState Model State}'. + * + * + * @return the meta object for the reference 'Model State'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState() + * @see #getContextState() + * @generated + */ + EReference getContextState_ModelState(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getSolverState Solver State}'. + * + * + * @return the meta object for the containment reference 'Solver State'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getSolverState() + * @see #getContextState() + * @generated + */ + EReference getContextState_SolverState(); + + /** + * Returns the meta object for the container reference '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice Choice}'. + * + * + * @return the meta object for the container reference 'Choice'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice() + * @see #getContextState() + * @generated + */ + EReference getContextState_Choice(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch Branch}'. + * + * + * @return the meta object for class 'Branch'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch + * @generated + */ + EClass getBranch(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStartIndex Start Index}'. + * + * + * @return the meta object for the attribute 'Start Index'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStartIndex() + * @see #getBranch() + * @generated + */ + EAttribute getBranch_StartIndex(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStopIndex Stop Index}'. + * + * + * @return the meta object for the attribute 'Stop Index'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStopIndex() + * @see #getBranch() + * @generated + */ + EAttribute getBranch_StopIndex(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices Choices}'. + * + * + * @return the meta object for the reference list 'Choices'. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices() + * @see #getBranch() + * @generated + */ + EReference getBranch_Choices(); + + /** + * Returns the meta object for data type 'ISerializable'. + * + * + * @return the meta object for data type 'ISerializable'. + * @model instanceClass="byte[]" + * @generated + */ + EDataType getISerializable(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + Gemoc_execution_traceFactory getGemoc_execution_traceFactory(); + + /** + * + * 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.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl Choice}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getChoice() + * @generated + */ + EClass CHOICE = eINSTANCE.getChoice(); + + /** + * The meta object literal for the 'Next Choices' reference list feature. + * + * + * @generated + */ + EReference CHOICE__NEXT_CHOICES = eINSTANCE.getChoice_NextChoices(); + + /** + * The meta object literal for the 'Possible Logical Steps' containment reference list feature. + * + * + * @generated + */ + EReference CHOICE__POSSIBLE_LOGICAL_STEPS = eINSTANCE.getChoice_PossibleLogicalSteps(); + + /** + * The meta object literal for the 'Chosen Logical Step' reference feature. + * + * + * @generated + */ + EReference CHOICE__CHOSEN_LOGICAL_STEP = eINSTANCE.getChoice_ChosenLogicalStep(); + + /** + * The meta object literal for the 'Context State' containment reference feature. + * + * + * @generated + */ + EReference CHOICE__CONTEXT_STATE = eINSTANCE.getChoice_ContextState(); + + /** + * The meta object literal for the 'Previous Choice' reference feature. + * + * + * @generated + */ + EReference CHOICE__PREVIOUS_CHOICE = eINSTANCE.getChoice_PreviousChoice(); + + /** + * The meta object literal for the 'Selected Next Choice' reference feature. + * + * + * @generated + */ + EReference CHOICE__SELECTED_NEXT_CHOICE = eINSTANCE.getChoice_SelectedNextChoice(); + + /** + * The meta object literal for the 'Branch' reference feature. + * + * + * @generated + */ + EReference CHOICE__BRANCH = eINSTANCE.getChoice_Branch(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl Execution Trace Model}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getExecutionTraceModel() + * @generated + */ + EClass EXECUTION_TRACE_MODEL = eINSTANCE.getExecutionTraceModel(); + + /** + * The meta object literal for the 'Choices' containment reference list feature. + * + * + * @generated + */ + EReference EXECUTION_TRACE_MODEL__CHOICES = eINSTANCE.getExecutionTraceModel_Choices(); + + /** + * The meta object literal for the 'Branches' containment reference list feature. + * + * + * @generated + */ + EReference EXECUTION_TRACE_MODEL__BRANCHES = eINSTANCE.getExecutionTraceModel_Branches(); + + /** + * The meta object literal for the 'Reached States' containment reference list feature. + * + * + * @generated + */ + EReference EXECUTION_TRACE_MODEL__REACHED_STATES = eINSTANCE.getExecutionTraceModel_ReachedStates(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl Solver State}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getSolverState() + * @generated + */ + EClass SOLVER_STATE = eINSTANCE.getSolverState(); + + /** + * The meta object literal for the 'Model' reference feature. + * + * + * @generated + */ + EReference SOLVER_STATE__MODEL = eINSTANCE.getSolverState_Model(); + + /** + * The meta object literal for the 'Serializable Model' attribute feature. + * + * + * @generated + */ + EAttribute SOLVER_STATE__SERIALIZABLE_MODEL = eINSTANCE.getSolverState_SerializableModel(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl Model State}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getModelState() + * @generated + */ + EClass MODEL_STATE = eINSTANCE.getModelState(); + + /** + * The meta object literal for the 'Model' reference feature. + * + * + * @generated + */ + EReference MODEL_STATE__MODEL = eINSTANCE.getModelState_Model(); + + /** + * The meta object literal for the 'Context State' reference list feature. + * + * + * @generated + */ + EReference MODEL_STATE__CONTEXT_STATE = eINSTANCE.getModelState_ContextState(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl Context State}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getContextState() + * @generated + */ + EClass CONTEXT_STATE = eINSTANCE.getContextState(); + + /** + * The meta object literal for the 'Model State' reference feature. + * + * + * @generated + */ + EReference CONTEXT_STATE__MODEL_STATE = eINSTANCE.getContextState_ModelState(); + + /** + * The meta object literal for the 'Solver State' containment reference feature. + * + * + * @generated + */ + EReference CONTEXT_STATE__SOLVER_STATE = eINSTANCE.getContextState_SolverState(); + + /** + * The meta object literal for the 'Choice' container reference feature. + * + * + * @generated + */ + EReference CONTEXT_STATE__CHOICE = eINSTANCE.getContextState_Choice(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl Branch}' class. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getBranch() + * @generated + */ + EClass BRANCH = eINSTANCE.getBranch(); + + /** + * The meta object literal for the 'Start Index' attribute feature. + * + * + * @generated + */ + EAttribute BRANCH__START_INDEX = eINSTANCE.getBranch_StartIndex(); + + /** + * The meta object literal for the 'Stop Index' attribute feature. + * + * + * @generated + */ + EAttribute BRANCH__STOP_INDEX = eINSTANCE.getBranch_StopIndex(); + + /** + * The meta object literal for the 'Choices' reference list feature. + * + * + * @generated + */ + EReference BRANCH__CHOICES = eINSTANCE.getBranch_Choices(); + + /** + * The meta object literal for the 'ISerializable' data type. + * + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getISerializable() + * @generated + */ + EDataType ISERIALIZABLE = eINSTANCE.getISerializable(); + + } + +} //Gemoc_execution_tracePackage diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ModelState.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ModelState.java new file mode 100644 index 000000000..b84f46217 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ModelState.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Model State'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getModel Model}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState Context State}
  • + *
+ * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState() + * @model + * @generated + */ +public interface ModelState extends EObject { + /** + * Returns the value of the 'Model' reference. + * + *

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

+ * + * @return the value of the 'Model' reference. + * @see #setModel(EObject) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState_Model() + * @model required="true" + * @generated + */ + EObject getModel(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getModel Model}' reference. + * + * + * @param value the new value of the 'Model' reference. + * @see #getModel() + * @generated + */ + void setModel(EObject value); + + /** + * Returns the value of the 'Context State' reference list. + * The list contents are of type {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState}. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState Model State}'. + * + *

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

+ * + * @return the value of the 'Context State' reference list. + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState_ContextState() + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState + * @model opposite="modelState" + * @generated + */ + EList getContextState(); + +} // ModelState diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/SolverState.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/SolverState.java new file mode 100644 index 000000000..0f0d3f6d4 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/SolverState.java @@ -0,0 +1,87 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Solver State'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getModel Model}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}
  • + *
+ * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState() + * @model + * @generated + */ +public interface SolverState extends EObject { + /** + * Returns the value of the 'Model' reference. + * + *

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

+ * + * @return the value of the 'Model' reference. + * @see #setModel(EObject) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState_Model() + * @model required="true" + * @generated + */ + EObject getModel(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getModel Model}' reference. + * + * + * @param value the new value of the 'Model' reference. + * @see #getModel() + * @generated + */ + void setModel(EObject value); + + /** + * Returns the value of the 'Serializable Model' attribute. + * + *

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

+ * + * @return the value of the 'Serializable Model' attribute. + * @see #setSerializableModel(byte[]) + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState_SerializableModel() + * @model dataType="org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ISerializable" + * @generated + */ + byte[] getSerializableModel(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}' attribute. + * + * + * @param value the new value of the 'Serializable Model' attribute. + * @see #getSerializableModel() + * @generated + */ + void setSerializableModel(byte[] value); + +} // SolverState diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/BranchImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/BranchImpl.java new file mode 100644 index 000000000..c8e77b142 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/BranchImpl.java @@ -0,0 +1,301 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.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.executionframework.reflectivetrace.gemoc_execution_trace.Branch; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; + +/** + * + * An implementation of the model object 'Branch'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl#getStartIndex Start Index}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl#getStopIndex Stop Index}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl#getChoices Choices}
  • + *
+ * + * @generated + */ +public class BranchImpl extends MinimalEObjectImpl.Container implements Branch { + /** + * The default value of the '{@link #getStartIndex() Start Index}' attribute. + * + * + * @see #getStartIndex() + * @generated + * @ordered + */ + protected static final int START_INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getStartIndex() Start Index}' attribute. + * + * + * @see #getStartIndex() + * @generated + * @ordered + */ + protected int startIndex = START_INDEX_EDEFAULT; + + /** + * The default value of the '{@link #getStopIndex() Stop Index}' attribute. + * + * + * @see #getStopIndex() + * @generated + * @ordered + */ + protected static final int STOP_INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getStopIndex() Stop Index}' attribute. + * + * + * @see #getStopIndex() + * @generated + * @ordered + */ + protected int stopIndex = STOP_INDEX_EDEFAULT; + + /** + * The cached value of the '{@link #getChoices() Choices}' reference list. + * + * + * @see #getChoices() + * @generated + * @ordered + */ + protected EList choices; + + /** + * + * + * @generated + */ + protected BranchImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Gemoc_execution_tracePackage.Literals.BRANCH; + } + + /** + * + * + * @generated + */ + public int getStartIndex() { + return startIndex; + } + + /** + * + * + * @generated + */ + public void setStartIndex(int newStartIndex) { + int oldStartIndex = startIndex; + startIndex = newStartIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.BRANCH__START_INDEX, oldStartIndex, startIndex)); + } + + /** + * + * + * @generated + */ + public int getStopIndex() { + return stopIndex; + } + + /** + * + * + * @generated + */ + public void setStopIndex(int newStopIndex) { + int oldStopIndex = stopIndex; + stopIndex = newStopIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.BRANCH__STOP_INDEX, oldStopIndex, stopIndex)); + } + + /** + * + * + * @generated + */ + public EList getChoices() { + if (choices == null) { + choices = new EObjectWithInverseResolvingEList(Choice.class, this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Gemoc_execution_tracePackage.CHOICE__BRANCH); + } + return choices; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.BRANCH__CHOICES: + return ((InternalEList)(InternalEList)getChoices()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.BRANCH__CHOICES: + return ((InternalEList)getChoices()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Gemoc_execution_tracePackage.BRANCH__START_INDEX: + return getStartIndex(); + case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: + return getStopIndex(); + case Gemoc_execution_tracePackage.BRANCH__CHOICES: + return getChoices(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Gemoc_execution_tracePackage.BRANCH__START_INDEX: + setStartIndex((Integer)newValue); + return; + case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: + setStopIndex((Integer)newValue); + return; + case Gemoc_execution_tracePackage.BRANCH__CHOICES: + getChoices().clear(); + getChoices().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.BRANCH__START_INDEX: + setStartIndex(START_INDEX_EDEFAULT); + return; + case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: + setStopIndex(STOP_INDEX_EDEFAULT); + return; + case Gemoc_execution_tracePackage.BRANCH__CHOICES: + getChoices().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.BRANCH__START_INDEX: + return startIndex != START_INDEX_EDEFAULT; + case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: + return stopIndex != STOP_INDEX_EDEFAULT; + case Gemoc_execution_tracePackage.BRANCH__CHOICES: + return choices != null && !choices.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (startIndex: "); + result.append(startIndex); + result.append(", stopIndex: "); + result.append(stopIndex); + result.append(')'); + return result.toString(); + } + +} //BranchImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ChoiceImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ChoiceImpl.java new file mode 100644 index 000000000..fa117aeb2 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ChoiceImpl.java @@ -0,0 +1,579 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.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.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +/** + * + * An implementation of the model object 'Choice'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getNextChoices Next Choices}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getPossibleLogicalSteps Possible Logical Steps}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getChosenLogicalStep Chosen Logical Step}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getContextState Context State}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getPreviousChoice Previous Choice}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getSelectedNextChoice Selected Next Choice}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getBranch Branch}
  • + *
+ * + * @generated + */ +public class ChoiceImpl extends MinimalEObjectImpl.Container implements Choice { + /** + * The cached value of the '{@link #getNextChoices() Next Choices}' reference list. + * + * + * @see #getNextChoices() + * @generated + * @ordered + */ + protected EList nextChoices; + + /** + * The cached value of the '{@link #getPossibleLogicalSteps() Possible Logical Steps}' containment reference list. + * + * + * @see #getPossibleLogicalSteps() + * @generated + * @ordered + */ + protected EList possibleLogicalSteps; + + /** + * The cached value of the '{@link #getChosenLogicalStep() Chosen Logical Step}' reference. + * + * + * @see #getChosenLogicalStep() + * @generated + * @ordered + */ + protected Step chosenLogicalStep; + + /** + * The cached value of the '{@link #getContextState() Context State}' containment reference. + * + * + * @see #getContextState() + * @generated + * @ordered + */ + protected ContextState contextState; + + /** + * The cached value of the '{@link #getPreviousChoice() Previous Choice}' reference. + * + * + * @see #getPreviousChoice() + * @generated + * @ordered + */ + protected Choice previousChoice; + + /** + * The cached value of the '{@link #getSelectedNextChoice() Selected Next Choice}' reference. + * + * + * @see #getSelectedNextChoice() + * @generated + * @ordered + */ + protected Choice selectedNextChoice; + + /** + * The cached value of the '{@link #getBranch() Branch}' reference. + * + * + * @see #getBranch() + * @generated + * @ordered + */ + protected Branch branch; + + /** + * + * + * @generated + */ + protected ChoiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Gemoc_execution_tracePackage.Literals.CHOICE; + } + + /** + * + * + * @generated + */ + public EList getNextChoices() { + if (nextChoices == null) { + nextChoices = new EObjectWithInverseResolvingEList(Choice.class, this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE); + } + return nextChoices; + } + + /** + * + * + * @generated + */ + public EList getPossibleLogicalSteps() { + if (possibleLogicalSteps == null) { + possibleLogicalSteps = new EObjectContainmentEList(Step.class, this, Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS); + } + return possibleLogicalSteps; + } + + /** + * + * + * @generated + */ + public Step getChosenLogicalStep() { + if (chosenLogicalStep != null && chosenLogicalStep.eIsProxy()) { + InternalEObject oldChosenLogicalStep = (InternalEObject)chosenLogicalStep; + chosenLogicalStep = (Step)eResolveProxy(oldChosenLogicalStep); + if (chosenLogicalStep != oldChosenLogicalStep) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP, oldChosenLogicalStep, chosenLogicalStep)); + } + } + return chosenLogicalStep; + } + + /** + * + * + * @generated + */ + public Step basicGetChosenLogicalStep() { + return chosenLogicalStep; + } + + /** + * + * + * @generated + */ + public void setChosenLogicalStep(Step newChosenLogicalStep) { + Step oldChosenLogicalStep = chosenLogicalStep; + chosenLogicalStep = newChosenLogicalStep; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP, oldChosenLogicalStep, chosenLogicalStep)); + } + + /** + * + * + * @generated + */ + public ContextState getContextState() { + return contextState; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetContextState(ContextState newContextState, NotificationChain msgs) { + ContextState oldContextState = contextState; + contextState = newContextState; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, oldContextState, newContextState); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setContextState(ContextState newContextState) { + if (newContextState != contextState) { + NotificationChain msgs = null; + if (contextState != null) + msgs = ((InternalEObject)contextState).eInverseRemove(this, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, ContextState.class, msgs); + if (newContextState != null) + msgs = ((InternalEObject)newContextState).eInverseAdd(this, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, ContextState.class, msgs); + msgs = basicSetContextState(newContextState, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, newContextState, newContextState)); + } + + /** + * + * + * @generated + */ + public Choice getPreviousChoice() { + if (previousChoice != null && previousChoice.eIsProxy()) { + InternalEObject oldPreviousChoice = (InternalEObject)previousChoice; + previousChoice = (Choice)eResolveProxy(oldPreviousChoice); + if (previousChoice != oldPreviousChoice) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, oldPreviousChoice, previousChoice)); + } + } + return previousChoice; + } + + /** + * + * + * @generated + */ + public Choice basicGetPreviousChoice() { + return previousChoice; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetPreviousChoice(Choice newPreviousChoice, NotificationChain msgs) { + Choice oldPreviousChoice = previousChoice; + previousChoice = newPreviousChoice; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, oldPreviousChoice, newPreviousChoice); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setPreviousChoice(Choice newPreviousChoice) { + if (newPreviousChoice != previousChoice) { + NotificationChain msgs = null; + if (previousChoice != null) + msgs = ((InternalEObject)previousChoice).eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); + if (newPreviousChoice != null) + msgs = ((InternalEObject)newPreviousChoice).eInverseAdd(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); + msgs = basicSetPreviousChoice(newPreviousChoice, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, newPreviousChoice, newPreviousChoice)); + } + + /** + * + * + * @generated + */ + public Choice getSelectedNextChoice() { + if (selectedNextChoice != null && selectedNextChoice.eIsProxy()) { + InternalEObject oldSelectedNextChoice = (InternalEObject)selectedNextChoice; + selectedNextChoice = (Choice)eResolveProxy(oldSelectedNextChoice); + if (selectedNextChoice != oldSelectedNextChoice) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE, oldSelectedNextChoice, selectedNextChoice)); + } + } + return selectedNextChoice; + } + + /** + * + * + * @generated + */ + public Choice basicGetSelectedNextChoice() { + return selectedNextChoice; + } + + /** + * + * + * @generated + */ + public void setSelectedNextChoice(Choice newSelectedNextChoice) { + Choice oldSelectedNextChoice = selectedNextChoice; + selectedNextChoice = newSelectedNextChoice; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE, oldSelectedNextChoice, selectedNextChoice)); + } + + /** + * + * + * @generated + */ + public Branch getBranch() { + if (branch != null && branch.eIsProxy()) { + InternalEObject oldBranch = (InternalEObject)branch; + branch = (Branch)eResolveProxy(oldBranch); + if (branch != oldBranch) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__BRANCH, oldBranch, branch)); + } + } + return branch; + } + + /** + * + * + * @generated + */ + public Branch basicGetBranch() { + return branch; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetBranch(Branch newBranch, NotificationChain msgs) { + Branch oldBranch = branch; + branch = newBranch; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__BRANCH, oldBranch, newBranch); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setBranch(Branch newBranch) { + if (newBranch != branch) { + NotificationChain msgs = null; + if (branch != null) + msgs = ((InternalEObject)branch).eInverseRemove(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); + if (newBranch != null) + msgs = ((InternalEObject)newBranch).eInverseAdd(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); + msgs = basicSetBranch(newBranch, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__BRANCH, newBranch, newBranch)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: + return ((InternalEList)(InternalEList)getNextChoices()).basicAdd(otherEnd, msgs); + case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: + if (contextState != null) + msgs = ((InternalEObject)contextState).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, null, msgs); + return basicSetContextState((ContextState)otherEnd, msgs); + case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: + if (previousChoice != null) + msgs = ((InternalEObject)previousChoice).eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); + return basicSetPreviousChoice((Choice)otherEnd, msgs); + case Gemoc_execution_tracePackage.CHOICE__BRANCH: + if (branch != null) + msgs = ((InternalEObject)branch).eInverseRemove(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); + return basicSetBranch((Branch)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: + return ((InternalEList)getNextChoices()).basicRemove(otherEnd, msgs); + case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: + return ((InternalEList)getPossibleLogicalSteps()).basicRemove(otherEnd, msgs); + case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: + return basicSetContextState(null, msgs); + case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: + return basicSetPreviousChoice(null, msgs); + case Gemoc_execution_tracePackage.CHOICE__BRANCH: + return basicSetBranch(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: + return getNextChoices(); + case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: + return getPossibleLogicalSteps(); + case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: + if (resolve) return getChosenLogicalStep(); + return basicGetChosenLogicalStep(); + case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: + return getContextState(); + case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: + if (resolve) return getPreviousChoice(); + return basicGetPreviousChoice(); + case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: + if (resolve) return getSelectedNextChoice(); + return basicGetSelectedNextChoice(); + case Gemoc_execution_tracePackage.CHOICE__BRANCH: + if (resolve) return getBranch(); + return basicGetBranch(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: + getNextChoices().clear(); + getNextChoices().addAll((Collection)newValue); + return; + case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: + getPossibleLogicalSteps().clear(); + getPossibleLogicalSteps().addAll((Collection)newValue); + return; + case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: + setChosenLogicalStep((Step)newValue); + return; + case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: + setContextState((ContextState)newValue); + return; + case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: + setPreviousChoice((Choice)newValue); + return; + case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: + setSelectedNextChoice((Choice)newValue); + return; + case Gemoc_execution_tracePackage.CHOICE__BRANCH: + setBranch((Branch)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: + getNextChoices().clear(); + return; + case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: + getPossibleLogicalSteps().clear(); + return; + case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: + setChosenLogicalStep((Step)null); + return; + case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: + setContextState((ContextState)null); + return; + case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: + setPreviousChoice((Choice)null); + return; + case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: + setSelectedNextChoice((Choice)null); + return; + case Gemoc_execution_tracePackage.CHOICE__BRANCH: + setBranch((Branch)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: + return nextChoices != null && !nextChoices.isEmpty(); + case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: + return possibleLogicalSteps != null && !possibleLogicalSteps.isEmpty(); + case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: + return chosenLogicalStep != null; + case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: + return contextState != null; + case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: + return previousChoice != null; + case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: + return selectedNextChoice != null; + case Gemoc_execution_tracePackage.CHOICE__BRANCH: + return branch != null; + } + return super.eIsSet(featureID); + } + +} //ChoiceImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ContextStateImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ContextStateImpl.java new file mode 100644 index 000000000..585f3f868 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ContextStateImpl.java @@ -0,0 +1,362 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.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.emf.ecore.util.EcoreUtil; + +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState; + +/** + * + * An implementation of the model object 'Context State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl#getModelState Model State}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl#getSolverState Solver State}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl#getChoice Choice}
  • + *
+ * + * @generated + */ +public class ContextStateImpl extends MinimalEObjectImpl.Container implements ContextState { + /** + * The cached value of the '{@link #getModelState() Model State}' reference. + * + * + * @see #getModelState() + * @generated + * @ordered + */ + protected ModelState modelState; + + /** + * The cached value of the '{@link #getSolverState() Solver State}' containment reference. + * + * + * @see #getSolverState() + * @generated + * @ordered + */ + protected SolverState solverState; + + /** + * + * + * @generated + */ + protected ContextStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Gemoc_execution_tracePackage.Literals.CONTEXT_STATE; + } + + /** + * + * + * @generated + */ + public ModelState getModelState() { + if (modelState != null && modelState.eIsProxy()) { + InternalEObject oldModelState = (InternalEObject)modelState; + modelState = (ModelState)eResolveProxy(oldModelState); + if (modelState != oldModelState) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, oldModelState, modelState)); + } + } + return modelState; + } + + /** + * + * + * @generated + */ + public ModelState basicGetModelState() { + return modelState; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetModelState(ModelState newModelState, NotificationChain msgs) { + ModelState oldModelState = modelState; + modelState = newModelState; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, oldModelState, newModelState); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setModelState(ModelState newModelState) { + if (newModelState != modelState) { + NotificationChain msgs = null; + if (modelState != null) + msgs = ((InternalEObject)modelState).eInverseRemove(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); + if (newModelState != null) + msgs = ((InternalEObject)newModelState).eInverseAdd(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); + msgs = basicSetModelState(newModelState, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, newModelState, newModelState)); + } + + /** + * + * + * @generated + */ + public SolverState getSolverState() { + return solverState; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSolverState(SolverState newSolverState, NotificationChain msgs) { + SolverState oldSolverState = solverState; + solverState = newSolverState; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, oldSolverState, newSolverState); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSolverState(SolverState newSolverState) { + if (newSolverState != solverState) { + NotificationChain msgs = null; + if (solverState != null) + msgs = ((InternalEObject)solverState).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, null, msgs); + if (newSolverState != null) + msgs = ((InternalEObject)newSolverState).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, null, msgs); + msgs = basicSetSolverState(newSolverState, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, newSolverState, newSolverState)); + } + + /** + * + * + * @generated + */ + public Choice getChoice() { + if (eContainerFeatureID() != Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE) return null; + return (Choice)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetChoice(Choice newChoice, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newChoice, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setChoice(Choice newChoice) { + if (newChoice != eInternalContainer() || (eContainerFeatureID() != Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE && newChoice != null)) { + if (EcoreUtil.isAncestor(this, newChoice)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newChoice != null) + msgs = ((InternalEObject)newChoice).eInverseAdd(this, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, Choice.class, msgs); + msgs = basicSetChoice(newChoice, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, newChoice, newChoice)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: + if (modelState != null) + msgs = ((InternalEObject)modelState).eInverseRemove(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); + return basicSetModelState((ModelState)otherEnd, msgs); + case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetChoice((Choice)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: + return basicSetModelState(null, msgs); + case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: + return basicSetSolverState(null, msgs); + case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: + return basicSetChoice(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: + return eInternalContainer().eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, Choice.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: + if (resolve) return getModelState(); + return basicGetModelState(); + case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: + return getSolverState(); + case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: + return getChoice(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: + setModelState((ModelState)newValue); + return; + case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: + setSolverState((SolverState)newValue); + return; + case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: + setChoice((Choice)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: + setModelState((ModelState)null); + return; + case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: + setSolverState((SolverState)null); + return; + case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: + setChoice((Choice)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: + return modelState != null; + case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: + return solverState != null; + case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: + return getChoice() != null; + } + return super.eIsSet(featureID); + } + +} //ContextStateImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java new file mode 100644 index 000000000..1ea641dd6 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java @@ -0,0 +1,236 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.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.executionframework.reflectivetrace.gemoc_execution_trace.Branch; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState; + +/** + * + * An implementation of the model object 'Execution Trace Model'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl#getChoices Choices}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl#getBranches Branches}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl#getReachedStates Reached States}
  • + *
+ * + * @generated + */ +public class ExecutionTraceModelImpl extends MinimalEObjectImpl.Container implements ExecutionTraceModel { + /** + * The cached value of the '{@link #getChoices() Choices}' containment reference list. + * + * + * @see #getChoices() + * @generated + * @ordered + */ + protected EList choices; + + /** + * The cached value of the '{@link #getBranches() Branches}' containment reference list. + * + * + * @see #getBranches() + * @generated + * @ordered + */ + protected EList branches; + + /** + * The cached value of the '{@link #getReachedStates() Reached States}' containment reference list. + * + * + * @see #getReachedStates() + * @generated + * @ordered + */ + protected EList reachedStates; + + /** + * + * + * @generated + */ + protected ExecutionTraceModelImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Gemoc_execution_tracePackage.Literals.EXECUTION_TRACE_MODEL; + } + + /** + * + * + * @generated + */ + public EList getChoices() { + if (choices == null) { + choices = new EObjectContainmentEList(Choice.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES); + } + return choices; + } + + /** + * + * + * @generated + */ + public EList getBranches() { + if (branches == null) { + branches = new EObjectContainmentEList(Branch.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES); + } + return branches; + } + + /** + * + * + * @generated + */ + public EList getReachedStates() { + if (reachedStates == null) { + reachedStates = new EObjectContainmentEList(ModelState.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES); + } + return reachedStates; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: + return ((InternalEList)getChoices()).basicRemove(otherEnd, msgs); + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: + return ((InternalEList)getBranches()).basicRemove(otherEnd, msgs); + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: + return ((InternalEList)getReachedStates()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: + return getChoices(); + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: + return getBranches(); + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: + return getReachedStates(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: + getChoices().clear(); + getChoices().addAll((Collection)newValue); + return; + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: + getBranches().clear(); + getBranches().addAll((Collection)newValue); + return; + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: + getReachedStates().clear(); + getReachedStates().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: + getChoices().clear(); + return; + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: + getBranches().clear(); + return; + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: + getReachedStates().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: + return choices != null && !choices.isEmpty(); + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: + return branches != null && !branches.isEmpty(); + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: + return reachedStates != null && !reachedStates.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ExecutionTraceModelImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java new file mode 100644 index 000000000..90e3ae1fb --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java @@ -0,0 +1,209 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.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.executionframework.reflectivetrace.gemoc_execution_trace.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class Gemoc_execution_traceFactoryImpl extends EFactoryImpl implements Gemoc_execution_traceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static Gemoc_execution_traceFactory init() { + try { + Gemoc_execution_traceFactory theGemoc_execution_traceFactory = (Gemoc_execution_traceFactory)EPackage.Registry.INSTANCE.getEFactory(Gemoc_execution_tracePackage.eNS_URI); + if (theGemoc_execution_traceFactory != null) { + return theGemoc_execution_traceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new Gemoc_execution_traceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public Gemoc_execution_traceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case Gemoc_execution_tracePackage.CHOICE: return createChoice(); + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL: return createExecutionTraceModel(); + case Gemoc_execution_tracePackage.SOLVER_STATE: return createSolverState(); + case Gemoc_execution_tracePackage.MODEL_STATE: return createModelState(); + case Gemoc_execution_tracePackage.CONTEXT_STATE: return createContextState(); + case Gemoc_execution_tracePackage.BRANCH: return createBranch(); + 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 Gemoc_execution_tracePackage.ISERIALIZABLE: + return createISerializableFromString(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 Gemoc_execution_tracePackage.ISERIALIZABLE: + return convertISerializableToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Choice createChoice() { + ChoiceImpl choice = new ChoiceImpl(); + return choice; + } + + /** + * + * + * @generated + */ + public ExecutionTraceModel createExecutionTraceModel() { + ExecutionTraceModelImpl executionTraceModel = new ExecutionTraceModelImpl(); + return executionTraceModel; + } + + /** + * + * + * @generated + */ + public SolverState createSolverState() { + SolverStateImpl solverState = new SolverStateImpl(); + return solverState; + } + + /** + * + * + * @generated + */ + public ModelState createModelState() { + ModelStateImpl modelState = new ModelStateImpl(); + return modelState; + } + + /** + * + * + * @generated + */ + public ContextState createContextState() { + ContextStateImpl contextState = new ContextStateImpl(); + return contextState; + } + + /** + * + * + * @generated + */ + public Branch createBranch() { + BranchImpl branch = new BranchImpl(); + return branch; + } + + /** + * + * + * @generated + */ + public byte[] createISerializableFromString(EDataType eDataType, String initialValue) { + return (byte[])super.createFromString(initialValue); + } + + /** + * + * + * @generated + */ + public String convertISerializableToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(instanceValue); + } + + /** + * + * + * @generated + */ + public Gemoc_execution_tracePackage getGemoc_execution_tracePackage() { + return (Gemoc_execution_tracePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static Gemoc_execution_tracePackage getPackage() { + return Gemoc_execution_tracePackage.eINSTANCE; + } + +} //Gemoc_execution_traceFactoryImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java new file mode 100644 index 000000000..958d245e6 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java @@ -0,0 +1,532 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_traceFactory; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class Gemoc_execution_tracePackageImpl extends EPackageImpl implements Gemoc_execution_tracePackage { + /** + * + * + * @generated + */ + private EClass choiceEClass = null; + + /** + * + * + * @generated + */ + private EClass executionTraceModelEClass = null; + + /** + * + * + * @generated + */ + private EClass solverStateEClass = null; + + /** + * + * + * @generated + */ + private EClass modelStateEClass = null; + + /** + * + * + * @generated + */ + private EClass contextStateEClass = null; + + /** + * + * + * @generated + */ + private EClass branchEClass = null; + + /** + * + * + * @generated + */ + private EDataType iSerializableEDataType = 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.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#eNS_URI + * @see #init() + * @generated + */ + private Gemoc_execution_tracePackageImpl() { + super(eNS_URI, Gemoc_execution_traceFactory.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 Gemoc_execution_tracePackage#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 Gemoc_execution_tracePackage init() { + if (isInited) return (Gemoc_execution_tracePackage)EPackage.Registry.INSTANCE.getEPackage(Gemoc_execution_tracePackage.eNS_URI); + + // Obtain or create and register package + Gemoc_execution_tracePackageImpl theGemoc_execution_tracePackage = (Gemoc_execution_tracePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Gemoc_execution_tracePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Gemoc_execution_tracePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + TracePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theGemoc_execution_tracePackage.createPackageContents(); + + // Initialize created meta-data + theGemoc_execution_tracePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theGemoc_execution_tracePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(Gemoc_execution_tracePackage.eNS_URI, theGemoc_execution_tracePackage); + return theGemoc_execution_tracePackage; + } + + /** + * + * + * @generated + */ + public EClass getChoice() { + return choiceEClass; + } + + /** + * + * + * @generated + */ + public EReference getChoice_NextChoices() { + return (EReference)choiceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getChoice_PossibleLogicalSteps() { + return (EReference)choiceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getChoice_ChosenLogicalStep() { + return (EReference)choiceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getChoice_ContextState() { + return (EReference)choiceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getChoice_PreviousChoice() { + return (EReference)choiceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getChoice_SelectedNextChoice() { + return (EReference)choiceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getChoice_Branch() { + return (EReference)choiceEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getExecutionTraceModel() { + return executionTraceModelEClass; + } + + /** + * + * + * @generated + */ + public EReference getExecutionTraceModel_Choices() { + return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getExecutionTraceModel_Branches() { + return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getExecutionTraceModel_ReachedStates() { + return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getSolverState() { + return solverStateEClass; + } + + /** + * + * + * @generated + */ + public EReference getSolverState_Model() { + return (EReference)solverStateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSolverState_SerializableModel() { + return (EAttribute)solverStateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getModelState() { + return modelStateEClass; + } + + /** + * + * + * @generated + */ + public EReference getModelState_Model() { + return (EReference)modelStateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getModelState_ContextState() { + return (EReference)modelStateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getContextState() { + return contextStateEClass; + } + + /** + * + * + * @generated + */ + public EReference getContextState_ModelState() { + return (EReference)contextStateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getContextState_SolverState() { + return (EReference)contextStateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getContextState_Choice() { + return (EReference)contextStateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getBranch() { + return branchEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getBranch_StartIndex() { + return (EAttribute)branchEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getBranch_StopIndex() { + return (EAttribute)branchEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getBranch_Choices() { + return (EReference)branchEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EDataType getISerializable() { + return iSerializableEDataType; + } + + /** + * + * + * @generated + */ + public Gemoc_execution_traceFactory getGemoc_execution_traceFactory() { + return (Gemoc_execution_traceFactory)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 + choiceEClass = createEClass(CHOICE); + createEReference(choiceEClass, CHOICE__NEXT_CHOICES); + createEReference(choiceEClass, CHOICE__POSSIBLE_LOGICAL_STEPS); + createEReference(choiceEClass, CHOICE__CHOSEN_LOGICAL_STEP); + createEReference(choiceEClass, CHOICE__CONTEXT_STATE); + createEReference(choiceEClass, CHOICE__PREVIOUS_CHOICE); + createEReference(choiceEClass, CHOICE__SELECTED_NEXT_CHOICE); + createEReference(choiceEClass, CHOICE__BRANCH); + + executionTraceModelEClass = createEClass(EXECUTION_TRACE_MODEL); + createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__CHOICES); + createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__BRANCHES); + createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__REACHED_STATES); + + solverStateEClass = createEClass(SOLVER_STATE); + createEReference(solverStateEClass, SOLVER_STATE__MODEL); + createEAttribute(solverStateEClass, SOLVER_STATE__SERIALIZABLE_MODEL); + + modelStateEClass = createEClass(MODEL_STATE); + createEReference(modelStateEClass, MODEL_STATE__MODEL); + createEReference(modelStateEClass, MODEL_STATE__CONTEXT_STATE); + + contextStateEClass = createEClass(CONTEXT_STATE); + createEReference(contextStateEClass, CONTEXT_STATE__MODEL_STATE); + createEReference(contextStateEClass, CONTEXT_STATE__SOLVER_STATE); + createEReference(contextStateEClass, CONTEXT_STATE__CHOICE); + + branchEClass = createEClass(BRANCH); + createEAttribute(branchEClass, BRANCH__START_INDEX); + createEAttribute(branchEClass, BRANCH__STOP_INDEX); + createEReference(branchEClass, BRANCH__CHOICES); + + // Create data types + iSerializableEDataType = createEDataType(ISERIALIZABLE); + } + + /** + * + * + * @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 + TracePackage theTracePackage = (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass(choiceEClass, Choice.class, "Choice", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getChoice_NextChoices(), this.getChoice(), this.getChoice_PreviousChoice(), "nextChoices", null, 0, -1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getChoice_PossibleLogicalSteps(), theTracePackage.getStep(), null, "possibleLogicalSteps", null, 0, -1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getChoice_ChosenLogicalStep(), theTracePackage.getStep(), null, "chosenLogicalStep", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getChoice_ContextState(), this.getContextState(), this.getContextState_Choice(), "contextState", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getChoice_PreviousChoice(), this.getChoice(), this.getChoice_NextChoices(), "previousChoice", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getChoice_SelectedNextChoice(), this.getChoice(), null, "selectedNextChoice", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getChoice_Branch(), this.getBranch(), this.getBranch_Choices(), "branch", null, 1, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(executionTraceModelEClass, ExecutionTraceModel.class, "ExecutionTraceModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getExecutionTraceModel_Choices(), this.getChoice(), null, "choices", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getExecutionTraceModel_Branches(), this.getBranch(), null, "branches", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getExecutionTraceModel_ReachedStates(), this.getModelState(), null, "reachedStates", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(solverStateEClass, SolverState.class, "SolverState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSolverState_Model(), ecorePackage.getEObject(), null, "model", null, 1, 1, SolverState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSolverState_SerializableModel(), this.getISerializable(), "serializableModel", null, 0, 1, SolverState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(modelStateEClass, ModelState.class, "ModelState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getModelState_Model(), ecorePackage.getEObject(), null, "model", null, 1, 1, ModelState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModelState_ContextState(), this.getContextState(), this.getContextState_ModelState(), "contextState", null, 0, -1, ModelState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(contextStateEClass, ContextState.class, "ContextState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getContextState_ModelState(), this.getModelState(), this.getModelState_ContextState(), "modelState", null, 1, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getContextState_SolverState(), this.getSolverState(), null, "solverState", null, 1, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getContextState_Choice(), this.getChoice(), this.getChoice_ContextState(), "choice", null, 0, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(branchEClass, Branch.class, "Branch", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBranch_StartIndex(), theEcorePackage.getEInt(), "startIndex", null, 0, 1, Branch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getBranch_StopIndex(), theEcorePackage.getEInt(), "stopIndex", null, 0, 1, Branch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getBranch_Choices(), this.getChoice(), this.getChoice_Branch(), "choices", null, 0, -1, Branch.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); + + // Create resource + createResource(eNS_URI); + } + +} //Gemoc_execution_tracePackageImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ModelStateImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ModelStateImpl.java new file mode 100644 index 000000000..d46b17f46 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ModelStateImpl.java @@ -0,0 +1,240 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.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.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.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState; + +/** + * + * An implementation of the model object 'Model State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl#getModel Model}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl#getContextState Context State}
  • + *
+ * + * @generated + */ +public class ModelStateImpl extends MinimalEObjectImpl.Container implements ModelState { + /** + * The cached value of the '{@link #getModel() Model}' reference. + * + * + * @see #getModel() + * @generated + * @ordered + */ + protected EObject model; + + /** + * The cached value of the '{@link #getContextState() Context State}' reference list. + * + * + * @see #getContextState() + * @generated + * @ordered + */ + protected EList contextState; + + /** + * + * + * @generated + */ + protected ModelStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Gemoc_execution_tracePackage.Literals.MODEL_STATE; + } + + /** + * + * + * @generated + */ + public EObject getModel() { + if (model != null && model.eIsProxy()) { + InternalEObject oldModel = (InternalEObject)model; + model = eResolveProxy(oldModel); + if (model != oldModel) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.MODEL_STATE__MODEL, oldModel, model)); + } + } + return model; + } + + /** + * + * + * @generated + */ + public EObject basicGetModel() { + return model; + } + + /** + * + * + * @generated + */ + public void setModel(EObject newModel) { + EObject oldModel = model; + model = newModel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.MODEL_STATE__MODEL, oldModel, model)); + } + + /** + * + * + * @generated + */ + public EList getContextState() { + if (contextState == null) { + contextState = new EObjectWithInverseResolvingEList(ContextState.class, this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE); + } + return contextState; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: + return ((InternalEList)(InternalEList)getContextState()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: + return ((InternalEList)getContextState()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: + if (resolve) return getModel(); + return basicGetModel(); + case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: + return getContextState(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: + setModel((EObject)newValue); + return; + case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: + getContextState().clear(); + getContextState().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: + setModel((EObject)null); + return; + case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: + getContextState().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: + return model != null; + case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: + return contextState != null && !contextState.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ModelStateImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/SolverStateImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/SolverStateImpl.java new file mode 100644 index 000000000..f055b04f6 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/SolverStateImpl.java @@ -0,0 +1,235 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.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.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState; + +/** + * + * An implementation of the model object 'Solver State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl#getModel Model}
  • + *
  • {@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl#getSerializableModel Serializable Model}
  • + *
+ * + * @generated + */ +public class SolverStateImpl extends MinimalEObjectImpl.Container implements SolverState { + /** + * The cached value of the '{@link #getModel() Model}' reference. + * + * + * @see #getModel() + * @generated + * @ordered + */ + protected EObject model; + + /** + * The default value of the '{@link #getSerializableModel() Serializable Model}' attribute. + * + * + * @see #getSerializableModel() + * @generated + * @ordered + */ + protected static final byte[] SERIALIZABLE_MODEL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSerializableModel() Serializable Model}' attribute. + * + * + * @see #getSerializableModel() + * @generated + * @ordered + */ + protected byte[] serializableModel = SERIALIZABLE_MODEL_EDEFAULT; + + /** + * + * + * @generated + */ + protected SolverStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Gemoc_execution_tracePackage.Literals.SOLVER_STATE; + } + + /** + * + * + * @generated + */ + public EObject getModel() { + if (model != null && model.eIsProxy()) { + InternalEObject oldModel = (InternalEObject)model; + model = eResolveProxy(oldModel); + if (model != oldModel) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.SOLVER_STATE__MODEL, oldModel, model)); + } + } + return model; + } + + /** + * + * + * @generated + */ + public EObject basicGetModel() { + return model; + } + + /** + * + * + * @generated + */ + public void setModel(EObject newModel) { + EObject oldModel = model; + model = newModel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.SOLVER_STATE__MODEL, oldModel, model)); + } + + /** + * + * + * @generated + */ + public byte[] getSerializableModel() { + return serializableModel; + } + + /** + * + * + * @generated + */ + public void setSerializableModel(byte[] newSerializableModel) { + byte[] oldSerializableModel = serializableModel; + serializableModel = newSerializableModel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL, oldSerializableModel, serializableModel)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: + if (resolve) return getModel(); + return basicGetModel(); + case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: + return getSerializableModel(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: + setModel((EObject)newValue); + return; + case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: + setSerializableModel((byte[])newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: + setModel((EObject)null); + return; + case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: + setSerializableModel(SERIALIZABLE_MODEL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: + return model != null; + case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: + return SERIALIZABLE_MODEL_EDEFAULT == null ? serializableModel != null : !SERIALIZABLE_MODEL_EDEFAULT.equals(serializableModel); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (serializableModel: "); + result.append(serializableModel); + result.append(')'); + return result.toString(); + } + +} //SolverStateImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java new file mode 100644 index 000000000..32398bd56 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java @@ -0,0 +1,220 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.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.executionframework.reflectivetrace.gemoc_execution_trace.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage + * @generated + */ +public class Gemoc_execution_traceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static Gemoc_execution_tracePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public Gemoc_execution_traceAdapterFactory() { + if (modelPackage == null) { + modelPackage = Gemoc_execution_tracePackage.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 Gemoc_execution_traceSwitch modelSwitch = + new Gemoc_execution_traceSwitch() { + @Override + public Adapter caseChoice(Choice object) { + return createChoiceAdapter(); + } + @Override + public Adapter caseExecutionTraceModel(ExecutionTraceModel object) { + return createExecutionTraceModelAdapter(); + } + @Override + public Adapter caseSolverState(SolverState object) { + return createSolverStateAdapter(); + } + @Override + public Adapter caseModelState(ModelState object) { + return createModelStateAdapter(); + } + @Override + public Adapter caseContextState(ContextState object) { + return createContextStateAdapter(); + } + @Override + public Adapter caseBranch(Branch object) { + return createBranchAdapter(); + } + @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.executionframework.reflectivetrace.gemoc_execution_trace.Choice Choice}'. + * + * 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.executionframework.reflectivetrace.gemoc_execution_trace.Choice + * @generated + */ + public Adapter createChoiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel Execution Trace Model}'. + * + * 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.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel + * @generated + */ + public Adapter createExecutionTraceModelAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState Solver 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.executionframework.reflectivetrace.gemoc_execution_trace.SolverState + * @generated + */ + public Adapter createSolverStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState Model 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.executionframework.reflectivetrace.gemoc_execution_trace.ModelState + * @generated + */ + public Adapter createModelStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState Context 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.executionframework.reflectivetrace.gemoc_execution_trace.ContextState + * @generated + */ + public Adapter createContextStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch Branch}'. + * + * 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.executionframework.reflectivetrace.gemoc_execution_trace.Branch + * @generated + */ + public Adapter createBranchAdapter() { + 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; + } + +} //Gemoc_execution_traceAdapterFactory diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java new file mode 100644 index 000000000..418800ec7 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model/src/org/eclipse/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java @@ -0,0 +1,225 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.reflectivetrace.gemoc_execution_trace.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.*; + +/** + * + * 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.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage + * @generated + */ +public class Gemoc_execution_traceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static Gemoc_execution_tracePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public Gemoc_execution_traceSwitch() { + if (modelPackage == null) { + modelPackage = Gemoc_execution_tracePackage.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 Gemoc_execution_tracePackage.CHOICE: { + Choice choice = (Choice)theEObject; + T result = caseChoice(choice); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL: { + ExecutionTraceModel executionTraceModel = (ExecutionTraceModel)theEObject; + T result = caseExecutionTraceModel(executionTraceModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Gemoc_execution_tracePackage.SOLVER_STATE: { + SolverState solverState = (SolverState)theEObject; + T result = caseSolverState(solverState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Gemoc_execution_tracePackage.MODEL_STATE: { + ModelState modelState = (ModelState)theEObject; + T result = caseModelState(modelState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Gemoc_execution_tracePackage.CONTEXT_STATE: { + ContextState contextState = (ContextState)theEObject; + T result = caseContextState(contextState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Gemoc_execution_tracePackage.BRANCH: { + Branch branch = (Branch)theEObject; + T result = caseBranch(branch); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Choice'. + * + * 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 'Choice'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseChoice(Choice object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Execution Trace Model'. + * + * 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 'Execution Trace Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseExecutionTraceModel(ExecutionTraceModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Solver 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 'Solver State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSolverState(SolverState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Model 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 'Model State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModelState(ModelState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Context 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 'Context State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseContextState(ContextState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Branch'. + * + * 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 'Branch'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBranch(Branch 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; + } + +} //Gemoc_execution_traceSwitch diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/.classpath b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/.classpath new file mode 100644 index 000000000..428337e56 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/.project b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/.project new file mode 100644 index 000000000..88e7a45b7 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.opsemanticsview.gen.k3 + + + + + + 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/trace/commons/plugins/fr.inria.diverse.trace.commons.model/.settings/org.eclipse.jdt.core.prefs b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.commons.model/.settings/org.eclipse.jdt.core.prefs rename to framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/META-INF/MANIFEST.MF new file mode 100644 index 000000000..152f90527 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: K3 +Bundle-SymbolicName: org.eclipse.gemoc.opsemanticsview.gen.k3;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.gemoc.opsemanticsview.gen;bundle-version="1.0.0", + fr.inria.diverse.melange.metamodel;bundle-version="0.2.0", + org.eclipse.gemoc.opsemanticsview.model;bundle-version="0.1.0", + org.eclipse.jdt.core, + org.eclipse.core.runtime, + org.eclipse.jdt.ui, + com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.core.resources;bundle-version="3.11.1", + org.eclipse.gemoc.xdsmlframework.commons;bundle-version="2.3.0", + org.eclipse.gemoc.commons.eclipse.jdt;bundle-version="2.3.0" diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/build.properties b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/build.properties new file mode 100644 index 000000000..804c6065d --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/plugin.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/plugin.xml new file mode 100644 index 000000000..9a5096826 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/plugin.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/pom.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/pom.xml new file mode 100644 index 000000000..4f112dd6e --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/pom.xml @@ -0,0 +1,62 @@ + + + + + 4.0.0 + org.gemoc.modeldebugging.framework.commons + org.eclipse.gemoc.opsemanticsview.gen.k3 + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.gemoc.modeldebugging.framework.commons + org.gemoc.modeldebugging.framework.commons.root + 2.3.0-SNAPSHOT + ../.. + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3DynamicElementsFinder.xtend b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3DynamicElementsFinder.xtend new file mode 100644 index 000000000..a1776f5ac --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3DynamicElementsFinder.xtend @@ -0,0 +1,87 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.opsemanticsview.gen.k3 + +import opsemanticsview.OperationalSemanticsView +import opsemanticsview.OpsemanticsviewFactory +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EPackage +import org.eclipse.xtend.lib.annotations.Accessors +import org.eclipse.gemoc.xdsmlframework.commons.DynamicAnnotationHelper + +class K3DynamicElementsFinder { + + // Input + private val EPackage abstractSyntax + private val EPackage executionMetamodel + + // In-out + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) + private var OperationalSemanticsView view + + new(EPackage abstractSyntax, EPackage executionMetamodel, OperationalSemanticsView view) { + this.abstractSyntax = abstractSyntax + this.executionMetamodel = executionMetamodel + this.view = view + } + + def void find() { + findDynamicParts + if (abstractSyntax != null) + findMappingAsToExe + } + + private def void findDynamicParts() { + + for (c : executionMetamodel.eAllContents.filter(EClass).toSet) { + + // Either partially mutable or not mutable at all + if (!DynamicAnnotationHelper.isDynamic(c)) { + + val mutableProperties = c.EStructuralFeatures.filter[p|DynamicAnnotationHelper.isDynamic(p)] + if (mutableProperties != null && !mutableProperties.empty) { + for (p : mutableProperties) { + view.dynamicProperties.add(p) + } + } + } // Or completely mutable + else { + view.dynamicClasses.add(c) + for (p : c.EStructuralFeatures) { + view.dynamicProperties.add(p) + } + + } + } + + } + + private def void findMappingAsToExe() { + explorePackageRecursively(abstractSyntax, executionMetamodel) + } + + private def void explorePackageRecursively(EPackage asPackage, EPackage exePackage) { + for (asClass : asPackage.EClassifiers.filter(EClass)) { + val exeClass = exePackage.EClassifiers.filter(EClass).findFirst[exeC|asClass.name.equals(exeC.name)] + val mappingEntry = OpsemanticsviewFactory.eINSTANCE.createExecutionToASEntry => [ + ASclass = asClass + executionClass = exeClass + ] + view.executionToASmapping.add(mappingEntry) + } + + for (asSubPackage : asPackage.ESubpackages) { + val exeSubPackage = asPackage.ESubpackages.findFirst[p|p.name.equals(asSubPackage.name)] + explorePackageRecursively(asSubPackage, exeSubPackage) + } + } + +} diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3OperationalSemanticsViewGenerator.xtend b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3OperationalSemanticsViewGenerator.xtend new file mode 100644 index 000000000..1b2fca098 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3OperationalSemanticsViewGenerator.xtend @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.opsemanticsview.gen.k3 + +import org.eclipse.gemoc.opsemanticsview.gen.OperationalSemanticsViewGenerator +import fr.inria.diverse.melange.metamodel.melange.Language +import java.util.Set +import org.eclipse.jdt.core.IType +import org.eclipse.jdt.core.IJavaProject +import org.eclipse.jdt.core.JavaCore +import org.eclipse.core.resources.IProject +import opsemanticsview.OpsemanticsviewFactory +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.EPackage +import fr.inria.diverse.melange.metamodel.melange.Inheritance +import fr.inria.diverse.melange.metamodel.melange.LanguageOperator + + +class K3OperationalSemanticsViewGenerator implements OperationalSemanticsViewGenerator { + + override generate(Language language, IProject melangeProject) { + val aspectClasses = findAspects(language, melangeProject) + + val result = OpsemanticsviewFactory.eINSTANCE.createOperationalSemanticsView + + val selectedLanguage = language.name + val rs = new ResourceSetImpl + val executionMetamodelResource = rs.getResource(URI.createURI(language.syntax.ecoreUri), true) + val executionMetamodel = executionMetamodelResource.contents.filter(EPackage).head + + + val LanguageOperator inheritance = language.operators.filter(Inheritance).head + val abstractSyntax = if (inheritance != null) { + val asURI = URI.createURI(inheritance.getTargetLanguage().syntax.ecoreUri) + val asResource = rs.getResource(asURI,true) + asResource.contents.filter(EPackage).head + } else { + null + } + + val K3DynamicElementsFinder dynFinder = new K3DynamicElementsFinder(abstractSyntax, executionMetamodel, result); + dynFinder.find(); + + + val K3StepExtractor eventsgen = new K3StepExtractor(aspectClasses, selectedLanguage, executionMetamodel, result); + eventsgen.generate(); + + result.abstractSyntax = abstractSyntax + result.executionMetamodel = executionMetamodel + + return result + } + + private static def Set findAspects(Language language, IProject melangeProject) { + val aspectNames = language.semantics.map[aspectTypeRef.type.qualifiedName].toList + val IJavaProject javaProject = JavaCore.create(melangeProject); + val aspectClasses = aspectNames.map[it|javaProject.findType(it)].toSet + return aspectClasses + + } + + override canHandle(Language language, IProject melangeProject) { + !language.semantics.empty + } + +} diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3StepExtractor.xtend b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3StepExtractor.xtend new file mode 100644 index 000000000..36350f965 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen.k3/src/org/eclipse/gemoc/opsemanticsview/gen/k3/K3StepExtractor.xtend @@ -0,0 +1,495 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.opsemanticsview.gen.k3 + +import java.util.ArrayList +import java.util.HashMap +import java.util.HashSet +import java.util.List +import java.util.Map +import java.util.Set +import opsemanticsview.OperationalSemanticsView +import opsemanticsview.OpsemanticsviewFactory +import opsemanticsview.Rule +import org.eclipse.core.runtime.NullProgressMonitor +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EOperation +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EcoreFactory +import org.eclipse.jdt.core.IAnnotation +import org.eclipse.jdt.core.IMethod +import org.eclipse.jdt.core.IType +import org.eclipse.gemoc.commons.eclipse.jdt.CallHierarchyHelper + +class K3StepExtractor { + + // Input + private val Set allClasses + private val EPackage extendedMetamodel + + // Input / Output + private val OperationalSemanticsView ecoreExtension + + // Transient + private val Map stepAspectsClassToAspectedClasses = new HashMap + private val Set allMethods = new HashSet + private val Set allk3Methods = new HashSet + private val Set allSuperMethods = new HashSet + private val Set stepFunctions = new HashSet + private val Set eventFunctions = new HashSet + private val Map functionToRule = new HashMap + private val Set inspectedClasses = new HashSet + + private val Map methodToK3Method = new HashMap + private val Map k3MethodToMethod = new HashMap + private val Map superMethodTok3Method = new HashMap + private val Map> k3MethodToCalledMethods = new HashMap + private val Map> methodToOverridingMethods = new HashMap + private val Map> callGraph = new HashMap + private val Map> classToSubClasses = new HashMap + private val Map> classToSuperClasses = new HashMap + + new(Set aspects, String languageName, EPackage extendedMetamodel, + OperationalSemanticsView inConstructionOperationalSemanticsView) { + this.allClasses = aspects + this.extendedMetamodel = extendedMetamodel + this.ecoreExtension = inConstructionOperationalSemanticsView + } + + public def void generate() { + generateStepFromXtend(allClasses) + } + + private def Rule getRuleOfFunction(IMethod function) { + if (functionToRule.containsKey(function)) + return functionToRule.get(function) + else { + val Rule rule = OpsemanticsviewFactory.eINSTANCE.createRule; + this.ecoreExtension.rules.add(rule) + + // We find the ecore class matching the aspected java class + val containingClass = function.declaringType + rule.containingClass = stepAspectsClassToAspectedClasses.get(containingClass) + + var EOperation candidate = null + if (rule.containingClass != null) { + candidate = rule.containingClass.EAllOperations.findFirst [ o | + o.name.equals(function.elementName) + ] + + } + if (candidate != null) { + rule.operation = candidate + } else { + rule.operation = xtendFunctionToEOperation(function) + } + + rule.stepRule = stepFunctions.contains(function) + rule.main = isMain(function) + functionToRule.put(function, rule) + return rule + } + } + + private def void inspectForBigStep(IMethod function) { + + // We consider that each Kermeta function is a transformation rule (even through we cannot know if it modifies anything) + val Rule rule = getRuleOfFunction(function) + + // We retrieve which functions are called by the function + val calledFunctions = callGraph.get(function) + if (calledFunctions != null) { + for (calledFunction : calledFunctions) { + if (calledFunction !== null) { + val Rule calledRule = getRuleOfFunction(calledFunction) + rule.calledRules.add(calledRule) + } + } + } + + // Finally we look if this function was overriden/implemented by subtypes + // TODO use annotation? + val subtypes = classToSubClasses.get(function.declaringType) + if (subtypes != null) { + for (t : subtypes) { + for (f : t.methods) { + if (f.elementName.equals(function.elementName)) { + val Rule overridingRule = getRuleOfFunction(f) + rule.overridenBy.add(overridingRule) + } + } + } + } + } + + private def EOperation xtendFunctionToEOperation(IMethod function) { + val result = EcoreFactory.eINSTANCE.createEOperation + result.name = function.elementName + // TODO finish the translation and/or ask Thomas + // TODO or consider it is already in the ecore? + return result + } + + private def void inspectClass(IType type) { + if (!inspectedClasses.contains(type)) { + // Gather all the actual bodies of the methods (_privk3_ methods) + val typeK3Methods = type.methods.filter[elementName.startsWith("_privk3_")] + allk3Methods.addAll(typeK3Methods) + + // Gather the methods calling those k3 methods + val typeMethods = type.methods.filter [m| + typeK3Methods.exists [ c | + c.elementName.substring(8).equals(m.elementName) + ] + ] + allMethods.addAll(typeMethods) + + typeMethods.forEach [ m | + val k3m = typeK3Methods.findFirst[c|c.elementName.substring(8).equals(m.elementName)] + k3MethodToMethod.put(k3m, m) + methodToK3Method.put(m, k3m) + ] + + val Set candidateSupers = new HashSet + candidateSupers.addAll(type.methods.filter[elementName.startsWith("super_")]) + + // Gather all k3 generated super methods + allSuperMethods.addAll(candidateSupers.filter [c| + type.methods.exists [ m | + c.elementName.substring(6).equals(m.elementName) + ] + ]) + + // For each aspect annotation of the class + for (a : getAspectAnnotations(type)) { + + // We find the JVM aspected class + val aspectedEClass = getAspectized(a) + + // We store the aspect class and the aspected class + stepAspectsClassToAspectedClasses.put(type, aspectedEClass) + + // We store all the functions with @Step + stepFunctions.addAll(type.methods.filter[isStep]) + + // And we store all the functions with @EventProcessor + eventFunctions.addAll(type.methods.filter[isEvent]) + } + inspectedClasses.add(type) + } + } + + private def void gatherCallsFromK3(IMethod function) { + val callingSites = CallHierarchyHelper.getCallLocationsOf(function) + callingSites.forEach [ cl | + val f = function + val member = cl.member + val method = getContainingAspectMethod(member as IMethod) + allk3Methods// Filter out non-k3 methods + .filter[m|m == method]// And add 'function' to the called methods of each calling k3 method + .forEach [ m | + var calledMethods = k3MethodToCalledMethods.get(m) + if (calledMethods == null) { + calledMethods = new HashSet + k3MethodToCalledMethods.put(m, calledMethods) + } + calledMethods.add(f) + ] + ] + } + + private def void gatherCallsFromSuper(IMethod function) { + val callingSites = CallHierarchyHelper.getCallLocationsOf(function) + callingSites.forEach [ cl | + allSuperMethods// TODO unfold lambdas + // Filter out non-super methods + .filter[m|m == cl.member]// And set 'function' to be the called method of each calling super method + .forEach[m|superMethodTok3Method.put(m, function)] + ] + } + + private def void gatherOverridenMethods(IMethod method) { + if (method.override) { + val methodName = method.elementName + val declaringType = method.declaringType + val superClasses = classToSuperClasses.get(declaringType) + if (superClasses != null) { + superClasses.forEach [ c | + val overridenMethod = c.methods.findFirst[m|m.elementName.equals(methodName)] + if (overridenMethod != null) { + var overridingMethods = methodToOverridingMethods.get(overridenMethod) + if (overridingMethods == null) { + overridingMethods = new HashSet + methodToOverridingMethods.put(overridenMethod, overridingMethods) + } + overridingMethods.add(method) + } + ] + } + } + } + + private def generateStepFromXtend(Set files) { + // First we store the class hierarchy of each class. + allClasses.forEach [ c | + val allSuperClasses = c.allSuperClasses.filter[t|allClasses.contains(t)].toSet + classToSuperClasses.put(c, allSuperClasses) + val allSubClasses = c.allSubClasses.filter[t|allClasses.contains(t)].toSet + classToSubClasses.put(c, allSubClasses) + ] + + // Then we look for functions, step aspects and step functions + for (c : allClasses) { + inspectClass(c) + } + + allk3Methods.forEach[gatherCallsFromSuper] + allMethods.forEach[gatherOverridenMethods] + allMethods.forEach[gatherCallsFromK3] + allSuperMethods.forEach[gatherCallsFromK3] + + // We establish the base callgraph. + allMethods.forEach [ m | + val k3m = methodToK3Method.get(m) + if (k3m != null) { + val calledMethods = k3MethodToCalledMethods.get(k3m) + if (calledMethods != null) { + calledMethods.forEach [ c | + if (allMethods.contains(c)) { + var tmp = callGraph.get(m) + if (tmp == null) { + tmp = new HashSet + callGraph.put(m, tmp) + } + tmp.add(c) + } + ] + } + } + ] + + val callGraphTotalLengthComputer = [|callGraph.values.map[s|s.size].reduce[i1, i2|i1 + i2]] + + // For each method, we add to its called methods the methods that can be called + // from each of its overriding methods. + var totalLength = callGraphTotalLengthComputer.apply() + var previousTotalLength = -1 + while (totalLength > previousTotalLength) { + allMethods.forEach [ m | + val calledMethods = if (callGraph.get(m) == null) { + val tmp = new HashSet + callGraph.put(m, tmp) + tmp + } else { + callGraph.get(m) + } + val overridingMethods = methodToOverridingMethods.get(m) + if (overridingMethods != null) { + overridingMethods.forEach [ n | + val calledByOverride = callGraph.get(n) + if (calledByOverride != null) { + calledMethods.addAll(calledByOverride) + } + ] + } + ] + previousTotalLength = totalLength + totalLength = callGraphTotalLengthComputer.apply() + } + + // For each method, we add to their called methods the methods overriding + // those called methods. + totalLength = callGraphTotalLengthComputer.apply() + previousTotalLength = -1 + while (totalLength > previousTotalLength) { + allMethods.forEach [ m | + val calledMethods = callGraph.get(m) + if (calledMethods != null) { + val tmp = new HashSet + calledMethods.forEach [ n | + val overridingMethods = methodToOverridingMethods.get(n) + if (overridingMethods != null) { + tmp.addAll(overridingMethods) + } + ] + calledMethods.addAll(tmp) + } + ] + previousTotalLength = totalLength + totalLength = callGraphTotalLengthComputer.apply() + } + + allMethods.forEach [ m | + var calledMethods = callGraph.get(m) + if (calledMethods == null) { + calledMethods = new HashSet + callGraph.put(m, calledMethods) + } + calledMethods.addAll(eventFunctions) + ] + + // We then add in the support for calls to super methods. + allMethods.forEach [ m | + val k3m = methodToK3Method.get(m) + if (k3m != null) { + val calledMethods = k3MethodToCalledMethods.get(k3m) + if (calledMethods != null) { + calledMethods.forEach [ c | + if (allSuperMethods.contains(c)) { + val actualk3Method = superMethodTok3Method.get(c) + if (actualk3Method != null) { + val actualMethod = k3MethodToMethod.get(actualk3Method) + if (actualMethod != null && allMethods.contains(actualMethod)) { + var tmp = callGraph.get(m) + if (tmp == null) { + tmp = new HashSet + callGraph.put(m, tmp) + } + tmp.add(actualMethod) + } + } + } + ] + } + } + ] + + println("Callgraph : \n\n") + callGraph.forEach [ m, s | + println(m.declaringType.elementName + "." + m.elementName + " : \n" + s.map [ n | + n.declaringType.elementName + "." + n.elementName + ].reduce[s1, s2|s1 + ", " + s2] + "\n") + ] + + // Next we create the Rule objects with all that + for (function : allMethods) { + inspectForBigStep(function) + } + } + + /** + * Find annotations "@Aspect" + */ + private def List getAspectAnnotations(IType type) { + // TODO compare with: fr.inria.diverse.k3.al.annotationprocessor.Aspect + if (type.isClass) { + return type.annotations.filter [ annot | + val name = annot.elementName // may be qualified + val lastDotIndex = name.lastIndexOf('.') + var simpleName = name + if (lastDotIndex !== -1) { + simpleName = name.substring(lastDotIndex + 1) + } + simpleName.equals("Aspect") + ].toList + } + return new ArrayList() + } + + private def boolean testAnnotation(IMethod method, String annotationSimpleName) { + // TODO compare with: fr.inria.diverse.k3.al.annotationprocessor.XXX + return method.annotations.exists [ annot | + val name = annot.elementName // may be qualified + val lastDotIndex = name.lastIndexOf('.') + var simpleName = name + if (lastDotIndex !== -1) { + simpleName = name.substring(lastDotIndex + 1) + } + return simpleName.equals(annotationSimpleName) + ] + } + + /** + * Return true if 'method' is tagged with "@Step" + */ + private def boolean isStep(IMethod method) { + testAnnotation(method, "Step") + } + + /** + * Return true if 'method' is tagged with "@EventProcessor" + */ + private def boolean isEvent(IMethod method) { + val annotation = method.annotations.findFirst [ a | + val name = a.elementName + val lastDotIndex = name.lastIndexOf('.') + var simpleName = name + if (lastDotIndex !== -1) { + simpleName = name.substring(lastDotIndex + 1) + } + return simpleName == "Step" + ] + annotation != null && annotation.memberValuePairs.exists [ p | + p.memberName == "eventTriggerable" && p.value instanceof Boolean && p.value as Boolean + ] + } + + /** + * Return true if 'method' is tagged with "@OverrideAspectMethod" + */ + private def boolean isOverride(IMethod method) { + testAnnotation(method, "OverrideAspectMethod") + } + + /** + * Return true if 'method' is tagged with "@Main" + */ + private def boolean isMain(IMethod method) { + testAnnotation(method, "Main") + } + + /** + * Return all sub types + */ + private def Set getAllSubClasses(IType type) { + val hierarchy = type.newTypeHierarchy(new NullProgressMonitor) + return hierarchy.getAllSubtypes(type).toSet + } + + /** + * Return all super types + */ + private def Set getAllSuperClasses(IType type) { + val hierarchy = type.newTypeHierarchy(new NullProgressMonitor) + return hierarchy.getAllSuperclasses(type).toSet + } + + private def EClass getAspectized(IAnnotation annot) { + val aspectedClassName = annot.memberValuePairs.findFirst[p|p.memberName == "className"].value as String + return extendedMetamodel.eAllContents.filter(EClass).findFirst[c1|aspectedClassName.equals(c1.name)] + } + + /** + * Return the top level method in a type tagged @aspect + * that contains 'function'
+ *
+ * Return 'function' if it is already a top level method.
+ *
+ * Return null if not inside a type with @aspect + */ + private def IMethod getContainingAspectMethod(IMethod function) { + val container = function.declaringType + if (allClasses.contains(container)) { + return function + } + + // function can be in annonymous/inner classes (e.g in lamba) + var parent = function.parent + while (parent !== null) { + if (parent instanceof IMethod) { + return getContainingAspectMethod(parent) + } + parent = parent.parent + } + + return null + } +} diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/.classpath b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/.classpath new file mode 100644 index 000000000..428337e56 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/.project b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/.project new file mode 100644 index 000000000..8d46562ab --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.opsemanticsview.gen + + + + + + 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/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/.settings/org.eclipse.jdt.core.prefs b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/.settings/org.eclipse.jdt.core.prefs rename to framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/META-INF/MANIFEST.MF new file mode 100644 index 000000000..d6d9efc44 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Opsemanticsviewgen +Bundle-SymbolicName: org.eclipse.gemoc.opsemanticsview.gen;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.gemoc.opsemanticsview.model;bundle-version="0.1.0", + fr.inria.diverse.melange.metamodel;bundle-version="0.2.0", + org.eclipse.core.resources;bundle-version="3.11.1" +Export-Package: org.eclipse.gemoc.opsemanticsview.gen + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/build.properties b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/build.properties new file mode 100644 index 000000000..804c6065d --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/plugin.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/plugin.xml new file mode 100644 index 000000000..76bea83b5 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/plugin.xml @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/pom.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/pom.xml new file mode 100644 index 000000000..1a33e93ca --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/pom.xml @@ -0,0 +1,62 @@ + + + + + 4.0.0 + org.gemoc.modeldebugging.framework.commons + org.eclipse.gemoc.opsemanticsview.gen + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.gemoc.modeldebugging.framework.commons + org.gemoc.modeldebugging.framework.commons.root + 2.3.0-SNAPSHOT + ../.. + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/schema/fr.inria.diverse.opsemanticsview.gen.exsd b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/schema/fr.inria.diverse.opsemanticsview.gen.exsd new file mode 100644 index 000000000..b353cf44e --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/schema/fr.inria.diverse.opsemanticsview.gen.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/src/org/eclipse/gemoc/opsemanticsview/gen/OperationalSemanticsViewGenerator.xtend b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/src/org/eclipse/gemoc/opsemanticsview/gen/OperationalSemanticsViewGenerator.xtend new file mode 100644 index 000000000..2c1121759 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.gen/src/org/eclipse/gemoc/opsemanticsview/gen/OperationalSemanticsViewGenerator.xtend @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.opsemanticsview.gen + +import opsemanticsview.OperationalSemanticsView +import fr.inria.diverse.melange.metamodel.melange.Language +import org.eclipse.core.resources.IProject + +interface OperationalSemanticsViewGenerator { + + public def boolean canHandle(Language language, IProject melangeProject) + + public def OperationalSemanticsView generate(Language language, IProject melangeProject) + + +} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/.classpath b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/.classpath rename to framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/.classpath diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/.project b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/.project new file mode 100644 index 000000000..c25c7201d --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/.project @@ -0,0 +1,28 @@ + + + org.eclipse.gemoc.opsemanticsview.model + + + + + + 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/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/META-INF/MANIFEST.MF new file mode 100644 index 000000000..3cf28990b --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.opsemanticsview.model;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: opsemanticsview, + opsemanticsview.impl, + opsemanticsview.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/build.properties b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/build.properties new file mode 100644 index 000000000..a5d67a32d --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/model/opsemanticsview.ecore b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/model/opsemanticsview.ecore new file mode 100644 index 000000000..b6e4568a3 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/model/opsemanticsview.ecore @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/model/opsemanticsview.genmodel b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/model/opsemanticsview.genmodel new file mode 100644 index 000000000..a4e5912a9 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/model/opsemanticsview.genmodel @@ -0,0 +1,32 @@ + + + opsemanticsview.ecore + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/plugin.properties b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/plugin.properties new file mode 100644 index 000000000..4d325d22d --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/plugin.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +pluginName = Operationalsemanticsview Model +providerName = www.example.org diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/plugin.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/plugin.xml new file mode 100644 index 000000000..b71265cc5 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/plugin.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/pom.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/pom.xml new file mode 100644 index 000000000..b22da614a --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/pom.xml @@ -0,0 +1,30 @@ + + + + + 4.0.0 + org.gemoc.modeldebugging.framework.commons + org.eclipse.gemoc.opsemanticsview.model + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.gemoc.modeldebugging.framework.commons + org.gemoc.modeldebugging.framework.commons.root + 2.3.0-SNAPSHOT + ../.. + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/ExecutionToASEntry.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/ExecutionToASEntry.java new file mode 100644 index 000000000..609320491 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/ExecutionToASEntry.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Execution To AS Entry'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link opsemanticsview.ExecutionToASEntry#getExecutionClass Execution Class}
  • + *
  • {@link opsemanticsview.ExecutionToASEntry#getASclass ASclass}
  • + *
+ * + * @see opsemanticsview.OpsemanticsviewPackage#getExecutionToASEntry() + * @model + * @generated + */ +public interface ExecutionToASEntry extends EObject { + /** + * Returns the value of the 'Execution Class' reference. + * + *

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

+ * + * @return the value of the 'Execution Class' reference. + * @see #setExecutionClass(EClass) + * @see opsemanticsview.OpsemanticsviewPackage#getExecutionToASEntry_ExecutionClass() + * @model required="true" + * @generated + */ + EClass getExecutionClass(); + + /** + * Sets the value of the '{@link opsemanticsview.ExecutionToASEntry#getExecutionClass Execution Class}' reference. + * + * + * @param value the new value of the 'Execution Class' reference. + * @see #getExecutionClass() + * @generated + */ + void setExecutionClass(EClass value); + + /** + * Returns the value of the 'ASclass' reference. + * + *

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

+ * + * @return the value of the 'ASclass' reference. + * @see #setASclass(EClass) + * @see opsemanticsview.OpsemanticsviewPackage#getExecutionToASEntry_ASclass() + * @model required="true" + * @generated + */ + EClass getASclass(); + + /** + * Sets the value of the '{@link opsemanticsview.ExecutionToASEntry#getASclass ASclass}' reference. + * + * + * @param value the new value of the 'ASclass' reference. + * @see #getASclass() + * @generated + */ + void setASclass(EClass value); + +} // ExecutionToASEntry diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OperationalSemanticsView.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OperationalSemanticsView.java new file mode 100644 index 000000000..cf4b91931 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OperationalSemanticsView.java @@ -0,0 +1,160 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; + +/** + * + * A representation of the model object 'Operational Semantics View'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link opsemanticsview.OperationalSemanticsView#getRules Rules}
  • + *
  • {@link opsemanticsview.OperationalSemanticsView#getDynamicProperties Dynamic Properties}
  • + *
  • {@link opsemanticsview.OperationalSemanticsView#getDynamicClasses Dynamic Classes}
  • + *
  • {@link opsemanticsview.OperationalSemanticsView#getExecutionToASmapping Execution To ASmapping}
  • + *
  • {@link opsemanticsview.OperationalSemanticsView#getExecutionMetamodel Execution Metamodel}
  • + *
  • {@link opsemanticsview.OperationalSemanticsView#getAbstractSyntax Abstract Syntax}
  • + *
+ * + * @see opsemanticsview.OpsemanticsviewPackage#getOperationalSemanticsView() + * @model + * @generated + */ +public interface OperationalSemanticsView extends EObject { + /** + * Returns the value of the 'Rules' containment reference list. + * The list contents are of type {@link opsemanticsview.Rule}. + * + *

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

+ * + * @return the value of the 'Rules' containment reference list. + * @see opsemanticsview.OpsemanticsviewPackage#getOperationalSemanticsView_Rules() + * @model containment="true" + * @generated + */ + EList getRules(); + + /** + * Returns the value of the 'Dynamic Properties' reference list. + * The list contents are of type {@link org.eclipse.emf.ecore.EStructuralFeature}. + * + *

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

+ * + * @return the value of the 'Dynamic Properties' reference list. + * @see opsemanticsview.OpsemanticsviewPackage#getOperationalSemanticsView_DynamicProperties() + * @model + * @generated + */ + EList getDynamicProperties(); + + /** + * Returns the value of the 'Dynamic Classes' reference list. + * The list contents are of type {@link org.eclipse.emf.ecore.EClass}. + * + *

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

+ * + * @return the value of the 'Dynamic Classes' reference list. + * @see opsemanticsview.OpsemanticsviewPackage#getOperationalSemanticsView_DynamicClasses() + * @model + * @generated + */ + EList getDynamicClasses(); + + /** + * Returns the value of the 'Execution To ASmapping' containment reference list. + * The list contents are of type {@link opsemanticsview.ExecutionToASEntry}. + * + *

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

+ * + * @return the value of the 'Execution To ASmapping' containment reference list. + * @see opsemanticsview.OpsemanticsviewPackage#getOperationalSemanticsView_ExecutionToASmapping() + * @model containment="true" + * @generated + */ + EList getExecutionToASmapping(); + + /** + * Returns the value of the 'Execution Metamodel' reference. + * + *

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

+ * + * @return the value of the 'Execution Metamodel' reference. + * @see #setExecutionMetamodel(EPackage) + * @see opsemanticsview.OpsemanticsviewPackage#getOperationalSemanticsView_ExecutionMetamodel() + * @model required="true" + * @generated + */ + EPackage getExecutionMetamodel(); + + /** + * Sets the value of the '{@link opsemanticsview.OperationalSemanticsView#getExecutionMetamodel Execution Metamodel}' reference. + * + * + * @param value the new value of the 'Execution Metamodel' reference. + * @see #getExecutionMetamodel() + * @generated + */ + void setExecutionMetamodel(EPackage value); + + /** + * Returns the value of the 'Abstract Syntax' reference. + * + *

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

+ * + * @return the value of the 'Abstract Syntax' reference. + * @see #setAbstractSyntax(EPackage) + * @see opsemanticsview.OpsemanticsviewPackage#getOperationalSemanticsView_AbstractSyntax() + * @model + * @generated + */ + EPackage getAbstractSyntax(); + + /** + * Sets the value of the '{@link opsemanticsview.OperationalSemanticsView#getAbstractSyntax Abstract Syntax}' reference. + * + * + * @param value the new value of the 'Abstract Syntax' reference. + * @see #getAbstractSyntax() + * @generated + */ + void setAbstractSyntax(EPackage value); + +} // OperationalSemanticsView diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OpsemanticsviewFactory.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OpsemanticsviewFactory.java new file mode 100644 index 000000000..70036f045 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OpsemanticsviewFactory.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview; + +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 opsemanticsview.OpsemanticsviewPackage + * @generated + */ +public interface OpsemanticsviewFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + OpsemanticsviewFactory eINSTANCE = opsemanticsview.impl.OpsemanticsviewFactoryImpl.init(); + + /** + * Returns a new object of class 'Operational Semantics View'. + * + * + * @return a new object of class 'Operational Semantics View'. + * @generated + */ + OperationalSemanticsView createOperationalSemanticsView(); + + /** + * Returns a new object of class 'Rule'. + * + * + * @return a new object of class 'Rule'. + * @generated + */ + Rule createRule(); + + /** + * Returns a new object of class 'Execution To AS Entry'. + * + * + * @return a new object of class 'Execution To AS Entry'. + * @generated + */ + ExecutionToASEntry createExecutionToASEntry(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + OpsemanticsviewPackage getOpsemanticsviewPackage(); + +} //OpsemanticsviewFactory diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OpsemanticsviewPackage.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OpsemanticsviewPackage.java new file mode 100644 index 000000000..6910a72b0 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/OpsemanticsviewPackage.java @@ -0,0 +1,687 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview; + +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 opsemanticsview.OpsemanticsviewFactory + * @model kind="package" + * @generated + */ +public interface OpsemanticsviewPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "opsemanticsview"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://opsemanticsview/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "opsemanticsview"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + OpsemanticsviewPackage eINSTANCE = opsemanticsview.impl.OpsemanticsviewPackageImpl.init(); + + /** + * The meta object id for the '{@link opsemanticsview.impl.OperationalSemanticsViewImpl Operational Semantics View}' class. + * + * + * @see opsemanticsview.impl.OperationalSemanticsViewImpl + * @see opsemanticsview.impl.OpsemanticsviewPackageImpl#getOperationalSemanticsView() + * @generated + */ + int OPERATIONAL_SEMANTICS_VIEW = 0; + + /** + * The feature id for the 'Rules' containment reference list. + * + * + * @generated + * @ordered + */ + int OPERATIONAL_SEMANTICS_VIEW__RULES = 0; + + /** + * The feature id for the 'Dynamic Properties' reference list. + * + * + * @generated + * @ordered + */ + int OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_PROPERTIES = 1; + + /** + * The feature id for the 'Dynamic Classes' reference list. + * + * + * @generated + * @ordered + */ + int OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_CLASSES = 2; + + /** + * The feature id for the 'Execution To ASmapping' containment reference list. + * + * + * @generated + * @ordered + */ + int OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING = 3; + + /** + * The feature id for the 'Execution Metamodel' reference. + * + * + * @generated + * @ordered + */ + int OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL = 4; + + /** + * The feature id for the 'Abstract Syntax' reference. + * + * + * @generated + * @ordered + */ + int OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX = 5; + + /** + * The number of structural features of the 'Operational Semantics View' class. + * + * + * @generated + * @ordered + */ + int OPERATIONAL_SEMANTICS_VIEW_FEATURE_COUNT = 6; + + /** + * The number of operations of the 'Operational Semantics View' class. + * + * + * @generated + * @ordered + */ + int OPERATIONAL_SEMANTICS_VIEW_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link opsemanticsview.impl.RuleImpl Rule}' class. + * + * + * @see opsemanticsview.impl.RuleImpl + * @see opsemanticsview.impl.OpsemanticsviewPackageImpl#getRule() + * @generated + */ + int RULE = 1; + + /** + * The feature id for the 'Called Rules' reference list. + * + * + * @generated + * @ordered + */ + int RULE__CALLED_RULES = 0; + + /** + * The feature id for the 'Operation' containment reference. + * + * + * @generated + * @ordered + */ + int RULE__OPERATION = 1; + + /** + * The feature id for the 'Step Rule' attribute. + * + * + * @generated + * @ordered + */ + int RULE__STEP_RULE = 2; + + /** + * The feature id for the 'Overriden By' reference list. + * + * + * @generated + * @ordered + */ + int RULE__OVERRIDEN_BY = 3; + + /** + * The feature id for the 'Overrides' reference. + * + * + * @generated + * @ordered + */ + int RULE__OVERRIDES = 4; + + /** + * The feature id for the 'Containing Class' reference. + * + * + * @generated + * @ordered + */ + int RULE__CONTAINING_CLASS = 5; + + /** + * The feature id for the 'Abstract' attribute. + * + * + * @generated + * @ordered + */ + int RULE__ABSTRACT = 6; + + /** + * The feature id for the 'Main' attribute. + * + * + * @generated + * @ordered + */ + int RULE__MAIN = 7; + + /** + * The number of structural features of the 'Rule' class. + * + * + * @generated + * @ordered + */ + int RULE_FEATURE_COUNT = 8; + + /** + * The number of operations of the 'Rule' class. + * + * + * @generated + * @ordered + */ + int RULE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link opsemanticsview.impl.ExecutionToASEntryImpl Execution To AS Entry}' class. + * + * + * @see opsemanticsview.impl.ExecutionToASEntryImpl + * @see opsemanticsview.impl.OpsemanticsviewPackageImpl#getExecutionToASEntry() + * @generated + */ + int EXECUTION_TO_AS_ENTRY = 2; + + /** + * The feature id for the 'Execution Class' reference. + * + * + * @generated + * @ordered + */ + int EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS = 0; + + /** + * The feature id for the 'ASclass' reference. + * + * + * @generated + * @ordered + */ + int EXECUTION_TO_AS_ENTRY__ASCLASS = 1; + + /** + * The number of structural features of the 'Execution To AS Entry' class. + * + * + * @generated + * @ordered + */ + int EXECUTION_TO_AS_ENTRY_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Execution To AS Entry' class. + * + * + * @generated + * @ordered + */ + int EXECUTION_TO_AS_ENTRY_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link opsemanticsview.OperationalSemanticsView Operational Semantics View}'. + * + * + * @return the meta object for class 'Operational Semantics View'. + * @see opsemanticsview.OperationalSemanticsView + * @generated + */ + EClass getOperationalSemanticsView(); + + /** + * Returns the meta object for the containment reference list '{@link opsemanticsview.OperationalSemanticsView#getRules Rules}'. + * + * + * @return the meta object for the containment reference list 'Rules'. + * @see opsemanticsview.OperationalSemanticsView#getRules() + * @see #getOperationalSemanticsView() + * @generated + */ + EReference getOperationalSemanticsView_Rules(); + + /** + * Returns the meta object for the reference list '{@link opsemanticsview.OperationalSemanticsView#getDynamicProperties Dynamic Properties}'. + * + * + * @return the meta object for the reference list 'Dynamic Properties'. + * @see opsemanticsview.OperationalSemanticsView#getDynamicProperties() + * @see #getOperationalSemanticsView() + * @generated + */ + EReference getOperationalSemanticsView_DynamicProperties(); + + /** + * Returns the meta object for the reference list '{@link opsemanticsview.OperationalSemanticsView#getDynamicClasses Dynamic Classes}'. + * + * + * @return the meta object for the reference list 'Dynamic Classes'. + * @see opsemanticsview.OperationalSemanticsView#getDynamicClasses() + * @see #getOperationalSemanticsView() + * @generated + */ + EReference getOperationalSemanticsView_DynamicClasses(); + + /** + * Returns the meta object for the containment reference list '{@link opsemanticsview.OperationalSemanticsView#getExecutionToASmapping Execution To ASmapping}'. + * + * + * @return the meta object for the containment reference list 'Execution To ASmapping'. + * @see opsemanticsview.OperationalSemanticsView#getExecutionToASmapping() + * @see #getOperationalSemanticsView() + * @generated + */ + EReference getOperationalSemanticsView_ExecutionToASmapping(); + + /** + * Returns the meta object for the reference '{@link opsemanticsview.OperationalSemanticsView#getExecutionMetamodel Execution Metamodel}'. + * + * + * @return the meta object for the reference 'Execution Metamodel'. + * @see opsemanticsview.OperationalSemanticsView#getExecutionMetamodel() + * @see #getOperationalSemanticsView() + * @generated + */ + EReference getOperationalSemanticsView_ExecutionMetamodel(); + + /** + * Returns the meta object for the reference '{@link opsemanticsview.OperationalSemanticsView#getAbstractSyntax Abstract Syntax}'. + * + * + * @return the meta object for the reference 'Abstract Syntax'. + * @see opsemanticsview.OperationalSemanticsView#getAbstractSyntax() + * @see #getOperationalSemanticsView() + * @generated + */ + EReference getOperationalSemanticsView_AbstractSyntax(); + + /** + * Returns the meta object for class '{@link opsemanticsview.Rule Rule}'. + * + * + * @return the meta object for class 'Rule'. + * @see opsemanticsview.Rule + * @generated + */ + EClass getRule(); + + /** + * Returns the meta object for the reference list '{@link opsemanticsview.Rule#getCalledRules Called Rules}'. + * + * + * @return the meta object for the reference list 'Called Rules'. + * @see opsemanticsview.Rule#getCalledRules() + * @see #getRule() + * @generated + */ + EReference getRule_CalledRules(); + + /** + * Returns the meta object for the containment reference '{@link opsemanticsview.Rule#getOperation Operation}'. + * + * + * @return the meta object for the containment reference 'Operation'. + * @see opsemanticsview.Rule#getOperation() + * @see #getRule() + * @generated + */ + EReference getRule_Operation(); + + /** + * Returns the meta object for the attribute '{@link opsemanticsview.Rule#isStepRule Step Rule}'. + * + * + * @return the meta object for the attribute 'Step Rule'. + * @see opsemanticsview.Rule#isStepRule() + * @see #getRule() + * @generated + */ + EAttribute getRule_StepRule(); + + /** + * Returns the meta object for the reference list '{@link opsemanticsview.Rule#getOverridenBy Overriden By}'. + * + * + * @return the meta object for the reference list 'Overriden By'. + * @see opsemanticsview.Rule#getOverridenBy() + * @see #getRule() + * @generated + */ + EReference getRule_OverridenBy(); + + /** + * Returns the meta object for the reference '{@link opsemanticsview.Rule#getOverrides Overrides}'. + * + * + * @return the meta object for the reference 'Overrides'. + * @see opsemanticsview.Rule#getOverrides() + * @see #getRule() + * @generated + */ + EReference getRule_Overrides(); + + /** + * Returns the meta object for the reference '{@link opsemanticsview.Rule#getContainingClass Containing Class}'. + * + * + * @return the meta object for the reference 'Containing Class'. + * @see opsemanticsview.Rule#getContainingClass() + * @see #getRule() + * @generated + */ + EReference getRule_ContainingClass(); + + /** + * Returns the meta object for the attribute '{@link opsemanticsview.Rule#isAbstract Abstract}'. + * + * + * @return the meta object for the attribute 'Abstract'. + * @see opsemanticsview.Rule#isAbstract() + * @see #getRule() + * @generated + */ + EAttribute getRule_Abstract(); + + /** + * Returns the meta object for the attribute '{@link opsemanticsview.Rule#isMain Main}'. + * + * + * @return the meta object for the attribute 'Main'. + * @see opsemanticsview.Rule#isMain() + * @see #getRule() + * @generated + */ + EAttribute getRule_Main(); + + /** + * Returns the meta object for class '{@link opsemanticsview.ExecutionToASEntry Execution To AS Entry}'. + * + * + * @return the meta object for class 'Execution To AS Entry'. + * @see opsemanticsview.ExecutionToASEntry + * @generated + */ + EClass getExecutionToASEntry(); + + /** + * Returns the meta object for the reference '{@link opsemanticsview.ExecutionToASEntry#getExecutionClass Execution Class}'. + * + * + * @return the meta object for the reference 'Execution Class'. + * @see opsemanticsview.ExecutionToASEntry#getExecutionClass() + * @see #getExecutionToASEntry() + * @generated + */ + EReference getExecutionToASEntry_ExecutionClass(); + + /** + * Returns the meta object for the reference '{@link opsemanticsview.ExecutionToASEntry#getASclass ASclass}'. + * + * + * @return the meta object for the reference 'ASclass'. + * @see opsemanticsview.ExecutionToASEntry#getASclass() + * @see #getExecutionToASEntry() + * @generated + */ + EReference getExecutionToASEntry_ASclass(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + OpsemanticsviewFactory getOpsemanticsviewFactory(); + + /** + * + * 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 opsemanticsview.impl.OperationalSemanticsViewImpl Operational Semantics View}' class. + * + * + * @see opsemanticsview.impl.OperationalSemanticsViewImpl + * @see opsemanticsview.impl.OpsemanticsviewPackageImpl#getOperationalSemanticsView() + * @generated + */ + EClass OPERATIONAL_SEMANTICS_VIEW = eINSTANCE.getOperationalSemanticsView(); + + /** + * The meta object literal for the 'Rules' containment reference list feature. + * + * + * @generated + */ + EReference OPERATIONAL_SEMANTICS_VIEW__RULES = eINSTANCE.getOperationalSemanticsView_Rules(); + + /** + * The meta object literal for the 'Dynamic Properties' reference list feature. + * + * + * @generated + */ + EReference OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_PROPERTIES = eINSTANCE.getOperationalSemanticsView_DynamicProperties(); + + /** + * The meta object literal for the 'Dynamic Classes' reference list feature. + * + * + * @generated + */ + EReference OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_CLASSES = eINSTANCE.getOperationalSemanticsView_DynamicClasses(); + + /** + * The meta object literal for the 'Execution To ASmapping' containment reference list feature. + * + * + * @generated + */ + EReference OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING = eINSTANCE.getOperationalSemanticsView_ExecutionToASmapping(); + + /** + * The meta object literal for the 'Execution Metamodel' reference feature. + * + * + * @generated + */ + EReference OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL = eINSTANCE.getOperationalSemanticsView_ExecutionMetamodel(); + + /** + * The meta object literal for the 'Abstract Syntax' reference feature. + * + * + * @generated + */ + EReference OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX = eINSTANCE.getOperationalSemanticsView_AbstractSyntax(); + + /** + * The meta object literal for the '{@link opsemanticsview.impl.RuleImpl Rule}' class. + * + * + * @see opsemanticsview.impl.RuleImpl + * @see opsemanticsview.impl.OpsemanticsviewPackageImpl#getRule() + * @generated + */ + EClass RULE = eINSTANCE.getRule(); + + /** + * The meta object literal for the 'Called Rules' reference list feature. + * + * + * @generated + */ + EReference RULE__CALLED_RULES = eINSTANCE.getRule_CalledRules(); + + /** + * The meta object literal for the 'Operation' containment reference feature. + * + * + * @generated + */ + EReference RULE__OPERATION = eINSTANCE.getRule_Operation(); + + /** + * The meta object literal for the 'Step Rule' attribute feature. + * + * + * @generated + */ + EAttribute RULE__STEP_RULE = eINSTANCE.getRule_StepRule(); + + /** + * The meta object literal for the 'Overriden By' reference list feature. + * + * + * @generated + */ + EReference RULE__OVERRIDEN_BY = eINSTANCE.getRule_OverridenBy(); + + /** + * The meta object literal for the 'Overrides' reference feature. + * + * + * @generated + */ + EReference RULE__OVERRIDES = eINSTANCE.getRule_Overrides(); + + /** + * The meta object literal for the 'Containing Class' reference feature. + * + * + * @generated + */ + EReference RULE__CONTAINING_CLASS = eINSTANCE.getRule_ContainingClass(); + + /** + * The meta object literal for the 'Abstract' attribute feature. + * + * + * @generated + */ + EAttribute RULE__ABSTRACT = eINSTANCE.getRule_Abstract(); + + /** + * The meta object literal for the 'Main' attribute feature. + * + * + * @generated + */ + EAttribute RULE__MAIN = eINSTANCE.getRule_Main(); + + /** + * The meta object literal for the '{@link opsemanticsview.impl.ExecutionToASEntryImpl Execution To AS Entry}' class. + * + * + * @see opsemanticsview.impl.ExecutionToASEntryImpl + * @see opsemanticsview.impl.OpsemanticsviewPackageImpl#getExecutionToASEntry() + * @generated + */ + EClass EXECUTION_TO_AS_ENTRY = eINSTANCE.getExecutionToASEntry(); + + /** + * The meta object literal for the 'Execution Class' reference feature. + * + * + * @generated + */ + EReference EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS = eINSTANCE.getExecutionToASEntry_ExecutionClass(); + + /** + * The meta object literal for the 'ASclass' reference feature. + * + * + * @generated + */ + EReference EXECUTION_TO_AS_ENTRY__ASCLASS = eINSTANCE.getExecutionToASEntry_ASclass(); + + } + +} //OpsemanticsviewPackage diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/Rule.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/Rule.java new file mode 100644 index 000000000..bbd6b7940 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/Rule.java @@ -0,0 +1,237 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; + +/** + * + * A representation of the model object 'Rule'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link opsemanticsview.Rule#getCalledRules Called Rules}
  • + *
  • {@link opsemanticsview.Rule#getOperation Operation}
  • + *
  • {@link opsemanticsview.Rule#isStepRule Step Rule}
  • + *
  • {@link opsemanticsview.Rule#getOverridenBy Overriden By}
  • + *
  • {@link opsemanticsview.Rule#getOverrides Overrides}
  • + *
  • {@link opsemanticsview.Rule#getContainingClass Containing Class}
  • + *
  • {@link opsemanticsview.Rule#isAbstract Abstract}
  • + *
  • {@link opsemanticsview.Rule#isMain Main}
  • + *
+ * + * @see opsemanticsview.OpsemanticsviewPackage#getRule() + * @model + * @generated + */ +public interface Rule extends EObject { + /** + * Returns the value of the 'Called Rules' reference list. + * The list contents are of type {@link opsemanticsview.Rule}. + * + *

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

+ * + * @return the value of the 'Called Rules' reference list. + * @see opsemanticsview.OpsemanticsviewPackage#getRule_CalledRules() + * @model ordered="false" + * @generated + */ + EList getCalledRules(); + + /** + * Returns the value of the 'Operation' containment reference. + * + *

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

+ * + * @return the value of the 'Operation' containment reference. + * @see #setOperation(EOperation) + * @see opsemanticsview.OpsemanticsviewPackage#getRule_Operation() + * @model containment="true" required="true" + * @generated + */ + EOperation getOperation(); + + /** + * Sets the value of the '{@link opsemanticsview.Rule#getOperation Operation}' containment reference. + * + * + * @param value the new value of the 'Operation' containment reference. + * @see #getOperation() + * @generated + */ + void setOperation(EOperation value); + + /** + * Returns the value of the 'Step Rule' attribute. + * + *

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

+ * + * @return the value of the 'Step Rule' attribute. + * @see #setStepRule(boolean) + * @see opsemanticsview.OpsemanticsviewPackage#getRule_StepRule() + * @model required="true" + * @generated + */ + boolean isStepRule(); + + /** + * Sets the value of the '{@link opsemanticsview.Rule#isStepRule Step Rule}' attribute. + * + * + * @param value the new value of the 'Step Rule' attribute. + * @see #isStepRule() + * @generated + */ + void setStepRule(boolean value); + + /** + * Returns the value of the 'Overriden By' reference list. + * The list contents are of type {@link opsemanticsview.Rule}. + * It is bidirectional and its opposite is '{@link opsemanticsview.Rule#getOverrides Overrides}'. + * + *

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

+ * + * @return the value of the 'Overriden By' reference list. + * @see opsemanticsview.OpsemanticsviewPackage#getRule_OverridenBy() + * @see opsemanticsview.Rule#getOverrides + * @model opposite="overrides" ordered="false" + * @generated + */ + EList getOverridenBy(); + + /** + * Returns the value of the 'Overrides' reference. + * It is bidirectional and its opposite is '{@link opsemanticsview.Rule#getOverridenBy Overriden By}'. + * + *

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

+ * + * @return the value of the 'Overrides' reference. + * @see #setOverrides(Rule) + * @see opsemanticsview.OpsemanticsviewPackage#getRule_Overrides() + * @see opsemanticsview.Rule#getOverridenBy + * @model opposite="overridenBy" + * @generated + */ + Rule getOverrides(); + + /** + * Sets the value of the '{@link opsemanticsview.Rule#getOverrides Overrides}' reference. + * + * + * @param value the new value of the 'Overrides' reference. + * @see #getOverrides() + * @generated + */ + void setOverrides(Rule value); + + /** + * Returns the value of the 'Containing Class' reference. + * + *

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

+ * + * @return the value of the 'Containing Class' reference. + * @see #setContainingClass(EClass) + * @see opsemanticsview.OpsemanticsviewPackage#getRule_ContainingClass() + * @model + * @generated + */ + EClass getContainingClass(); + + /** + * Sets the value of the '{@link opsemanticsview.Rule#getContainingClass Containing Class}' reference. + * + * + * @param value the new value of the 'Containing Class' reference. + * @see #getContainingClass() + * @generated + */ + void setContainingClass(EClass value); + + /** + * Returns the value of the 'Abstract' attribute. + * + *

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

+ * + * @return the value of the 'Abstract' attribute. + * @see #setAbstract(boolean) + * @see opsemanticsview.OpsemanticsviewPackage#getRule_Abstract() + * @model required="true" + * @generated + */ + boolean isAbstract(); + + /** + * Sets the value of the '{@link opsemanticsview.Rule#isAbstract Abstract}' attribute. + * + * + * @param value the new value of the 'Abstract' attribute. + * @see #isAbstract() + * @generated + */ + void setAbstract(boolean value); + + /** + * Returns the value of the 'Main' attribute. + * + *

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

+ * + * @return the value of the 'Main' attribute. + * @see #setMain(boolean) + * @see opsemanticsview.OpsemanticsviewPackage#getRule_Main() + * @model + * @generated + */ + boolean isMain(); + + /** + * Sets the value of the '{@link opsemanticsview.Rule#isMain Main}' attribute. + * + * + * @param value the new value of the 'Main' attribute. + * @see #isMain() + * @generated + */ + void setMain(boolean value); + +} // Rule diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/ExecutionToASEntryImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/ExecutionToASEntryImpl.java new file mode 100644 index 000000000..05b258503 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/ExecutionToASEntryImpl.java @@ -0,0 +1,226 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview.impl; + +import opsemanticsview.ExecutionToASEntry; +import opsemanticsview.OpsemanticsviewPackage; + +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.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Execution To AS Entry'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link opsemanticsview.impl.ExecutionToASEntryImpl#getExecutionClass Execution Class}
  • + *
  • {@link opsemanticsview.impl.ExecutionToASEntryImpl#getASclass ASclass}
  • + *
+ * + * @generated + */ +public class ExecutionToASEntryImpl extends MinimalEObjectImpl.Container implements ExecutionToASEntry { + /** + * The cached value of the '{@link #getExecutionClass() Execution Class}' reference. + * + * + * @see #getExecutionClass() + * @generated + * @ordered + */ + protected EClass executionClass; + + /** + * The cached value of the '{@link #getASclass() ASclass}' reference. + * + * + * @see #getASclass() + * @generated + * @ordered + */ + protected EClass aSclass; + + /** + * + * + * @generated + */ + protected ExecutionToASEntryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return OpsemanticsviewPackage.Literals.EXECUTION_TO_AS_ENTRY; + } + + /** + * + * + * @generated + */ + public EClass getExecutionClass() { + if (executionClass != null && executionClass.eIsProxy()) { + InternalEObject oldExecutionClass = (InternalEObject)executionClass; + executionClass = (EClass)eResolveProxy(oldExecutionClass); + if (executionClass != oldExecutionClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS, oldExecutionClass, executionClass)); + } + } + return executionClass; + } + + /** + * + * + * @generated + */ + public EClass basicGetExecutionClass() { + return executionClass; + } + + /** + * + * + * @generated + */ + public void setExecutionClass(EClass newExecutionClass) { + EClass oldExecutionClass = executionClass; + executionClass = newExecutionClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS, oldExecutionClass, executionClass)); + } + + /** + * + * + * @generated + */ + public EClass getASclass() { + if (aSclass != null && aSclass.eIsProxy()) { + InternalEObject oldASclass = (InternalEObject)aSclass; + aSclass = (EClass)eResolveProxy(oldASclass); + if (aSclass != oldASclass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__ASCLASS, oldASclass, aSclass)); + } + } + return aSclass; + } + + /** + * + * + * @generated + */ + public EClass basicGetASclass() { + return aSclass; + } + + /** + * + * + * @generated + */ + public void setASclass(EClass newASclass) { + EClass oldASclass = aSclass; + aSclass = newASclass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__ASCLASS, oldASclass, aSclass)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS: + if (resolve) return getExecutionClass(); + return basicGetExecutionClass(); + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__ASCLASS: + if (resolve) return getASclass(); + return basicGetASclass(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS: + setExecutionClass((EClass)newValue); + return; + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__ASCLASS: + setASclass((EClass)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS: + setExecutionClass((EClass)null); + return; + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__ASCLASS: + setASclass((EClass)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS: + return executionClass != null; + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY__ASCLASS: + return aSclass != null; + } + return super.eIsSet(featureID); + } + +} //ExecutionToASEntryImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OperationalSemanticsViewImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OperationalSemanticsViewImpl.java new file mode 100644 index 000000000..a0a04c553 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OperationalSemanticsViewImpl.java @@ -0,0 +1,392 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview.impl; + +import java.util.Collection; + +import opsemanticsview.ExecutionToASEntry; +import opsemanticsview.OperationalSemanticsView; +import opsemanticsview.OpsemanticsviewPackage; +import opsemanticsview.Rule; + +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.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +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; + +/** + * + * An implementation of the model object 'Operational Semantics View'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link opsemanticsview.impl.OperationalSemanticsViewImpl#getRules Rules}
  • + *
  • {@link opsemanticsview.impl.OperationalSemanticsViewImpl#getDynamicProperties Dynamic Properties}
  • + *
  • {@link opsemanticsview.impl.OperationalSemanticsViewImpl#getDynamicClasses Dynamic Classes}
  • + *
  • {@link opsemanticsview.impl.OperationalSemanticsViewImpl#getExecutionToASmapping Execution To ASmapping}
  • + *
  • {@link opsemanticsview.impl.OperationalSemanticsViewImpl#getExecutionMetamodel Execution Metamodel}
  • + *
  • {@link opsemanticsview.impl.OperationalSemanticsViewImpl#getAbstractSyntax Abstract Syntax}
  • + *
+ * + * @generated + */ +public class OperationalSemanticsViewImpl extends MinimalEObjectImpl.Container implements OperationalSemanticsView { + /** + * The cached value of the '{@link #getRules() Rules}' containment reference list. + * + * + * @see #getRules() + * @generated + * @ordered + */ + protected EList rules; + + /** + * The cached value of the '{@link #getDynamicProperties() Dynamic Properties}' reference list. + * + * + * @see #getDynamicProperties() + * @generated + * @ordered + */ + protected EList dynamicProperties; + + /** + * The cached value of the '{@link #getDynamicClasses() Dynamic Classes}' reference list. + * + * + * @see #getDynamicClasses() + * @generated + * @ordered + */ + protected EList dynamicClasses; + + /** + * The cached value of the '{@link #getExecutionToASmapping() Execution To ASmapping}' containment reference list. + * + * + * @see #getExecutionToASmapping() + * @generated + * @ordered + */ + protected EList executionToASmapping; + + /** + * The cached value of the '{@link #getExecutionMetamodel() Execution Metamodel}' reference. + * + * + * @see #getExecutionMetamodel() + * @generated + * @ordered + */ + protected EPackage executionMetamodel; + + /** + * The cached value of the '{@link #getAbstractSyntax() Abstract Syntax}' reference. + * + * + * @see #getAbstractSyntax() + * @generated + * @ordered + */ + protected EPackage abstractSyntax; + + /** + * + * + * @generated + */ + protected OperationalSemanticsViewImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return OpsemanticsviewPackage.Literals.OPERATIONAL_SEMANTICS_VIEW; + } + + /** + * + * + * @generated + */ + public EList getRules() { + if (rules == null) { + rules = new EObjectContainmentEList(Rule.class, this, OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__RULES); + } + return rules; + } + + /** + * + * + * @generated + */ + public EList getDynamicProperties() { + if (dynamicProperties == null) { + dynamicProperties = new EObjectResolvingEList(EStructuralFeature.class, this, OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_PROPERTIES); + } + return dynamicProperties; + } + + /** + * + * + * @generated + */ + public EList getDynamicClasses() { + if (dynamicClasses == null) { + dynamicClasses = new EObjectResolvingEList(EClass.class, this, OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_CLASSES); + } + return dynamicClasses; + } + + /** + * + * + * @generated + */ + public EList getExecutionToASmapping() { + if (executionToASmapping == null) { + executionToASmapping = new EObjectContainmentEList(ExecutionToASEntry.class, this, OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING); + } + return executionToASmapping; + } + + /** + * + * + * @generated + */ + public EPackage getExecutionMetamodel() { + if (executionMetamodel != null && executionMetamodel.eIsProxy()) { + InternalEObject oldExecutionMetamodel = (InternalEObject)executionMetamodel; + executionMetamodel = (EPackage)eResolveProxy(oldExecutionMetamodel); + if (executionMetamodel != oldExecutionMetamodel) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL, oldExecutionMetamodel, executionMetamodel)); + } + } + return executionMetamodel; + } + + /** + * + * + * @generated + */ + public EPackage basicGetExecutionMetamodel() { + return executionMetamodel; + } + + /** + * + * + * @generated + */ + public void setExecutionMetamodel(EPackage newExecutionMetamodel) { + EPackage oldExecutionMetamodel = executionMetamodel; + executionMetamodel = newExecutionMetamodel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL, oldExecutionMetamodel, executionMetamodel)); + } + + /** + * + * + * @generated + */ + public EPackage getAbstractSyntax() { + if (abstractSyntax != null && abstractSyntax.eIsProxy()) { + InternalEObject oldAbstractSyntax = (InternalEObject)abstractSyntax; + abstractSyntax = (EPackage)eResolveProxy(oldAbstractSyntax); + if (abstractSyntax != oldAbstractSyntax) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX, oldAbstractSyntax, abstractSyntax)); + } + } + return abstractSyntax; + } + + /** + * + * + * @generated + */ + public EPackage basicGetAbstractSyntax() { + return abstractSyntax; + } + + /** + * + * + * @generated + */ + public void setAbstractSyntax(EPackage newAbstractSyntax) { + EPackage oldAbstractSyntax = abstractSyntax; + abstractSyntax = newAbstractSyntax; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX, oldAbstractSyntax, abstractSyntax)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__RULES: + return ((InternalEList)getRules()).basicRemove(otherEnd, msgs); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING: + return ((InternalEList)getExecutionToASmapping()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__RULES: + return getRules(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_PROPERTIES: + return getDynamicProperties(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_CLASSES: + return getDynamicClasses(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING: + return getExecutionToASmapping(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL: + if (resolve) return getExecutionMetamodel(); + return basicGetExecutionMetamodel(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX: + if (resolve) return getAbstractSyntax(); + return basicGetAbstractSyntax(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__RULES: + getRules().clear(); + getRules().addAll((Collection)newValue); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_PROPERTIES: + getDynamicProperties().clear(); + getDynamicProperties().addAll((Collection)newValue); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_CLASSES: + getDynamicClasses().clear(); + getDynamicClasses().addAll((Collection)newValue); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING: + getExecutionToASmapping().clear(); + getExecutionToASmapping().addAll((Collection)newValue); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL: + setExecutionMetamodel((EPackage)newValue); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX: + setAbstractSyntax((EPackage)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__RULES: + getRules().clear(); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_PROPERTIES: + getDynamicProperties().clear(); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_CLASSES: + getDynamicClasses().clear(); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING: + getExecutionToASmapping().clear(); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL: + setExecutionMetamodel((EPackage)null); + return; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX: + setAbstractSyntax((EPackage)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__RULES: + return rules != null && !rules.isEmpty(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_PROPERTIES: + return dynamicProperties != null && !dynamicProperties.isEmpty(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_CLASSES: + return dynamicClasses != null && !dynamicClasses.isEmpty(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING: + return executionToASmapping != null && !executionToASmapping.isEmpty(); + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL: + return executionMetamodel != null; + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX: + return abstractSyntax != null; + } + return super.eIsSet(featureID); + } + +} //OperationalSemanticsViewImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OpsemanticsviewFactoryImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OpsemanticsviewFactoryImpl.java new file mode 100644 index 000000000..de3519064 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OpsemanticsviewFactoryImpl.java @@ -0,0 +1,127 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview.impl; + +import opsemanticsview.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class OpsemanticsviewFactoryImpl extends EFactoryImpl implements OpsemanticsviewFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static OpsemanticsviewFactory init() { + try { + OpsemanticsviewFactory theOpsemanticsviewFactory = (OpsemanticsviewFactory)EPackage.Registry.INSTANCE.getEFactory(OpsemanticsviewPackage.eNS_URI); + if (theOpsemanticsviewFactory != null) { + return theOpsemanticsviewFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new OpsemanticsviewFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public OpsemanticsviewFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW: return createOperationalSemanticsView(); + case OpsemanticsviewPackage.RULE: return createRule(); + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY: return createExecutionToASEntry(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public OperationalSemanticsView createOperationalSemanticsView() { + OperationalSemanticsViewImpl operationalSemanticsView = new OperationalSemanticsViewImpl(); + return operationalSemanticsView; + } + + /** + * + * + * @generated + */ + public Rule createRule() { + RuleImpl rule = new RuleImpl(); + return rule; + } + + /** + * + * + * @generated + */ + public ExecutionToASEntry createExecutionToASEntry() { + ExecutionToASEntryImpl executionToASEntry = new ExecutionToASEntryImpl(); + return executionToASEntry; + } + + /** + * + * + * @generated + */ + public OpsemanticsviewPackage getOpsemanticsviewPackage() { + return (OpsemanticsviewPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static OpsemanticsviewPackage getPackage() { + return OpsemanticsviewPackage.eINSTANCE; + } + +} //OpsemanticsviewFactoryImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OpsemanticsviewPackageImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OpsemanticsviewPackageImpl.java new file mode 100644 index 000000000..981b09b03 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/OpsemanticsviewPackageImpl.java @@ -0,0 +1,395 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview.impl; + +import opsemanticsview.ExecutionToASEntry; +import opsemanticsview.OperationalSemanticsView; +import opsemanticsview.OpsemanticsviewFactory; +import opsemanticsview.OpsemanticsviewPackage; +import opsemanticsview.Rule; + +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; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class OpsemanticsviewPackageImpl extends EPackageImpl implements OpsemanticsviewPackage { + /** + * + * + * @generated + */ + private EClass operationalSemanticsViewEClass = null; + + /** + * + * + * @generated + */ + private EClass ruleEClass = null; + + /** + * + * + * @generated + */ + private EClass executionToASEntryEClass = 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 opsemanticsview.OpsemanticsviewPackage#eNS_URI + * @see #init() + * @generated + */ + private OpsemanticsviewPackageImpl() { + super(eNS_URI, OpsemanticsviewFactory.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 OpsemanticsviewPackage#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 OpsemanticsviewPackage init() { + if (isInited) return (OpsemanticsviewPackage)EPackage.Registry.INSTANCE.getEPackage(OpsemanticsviewPackage.eNS_URI); + + // Obtain or create and register package + OpsemanticsviewPackageImpl theOpsemanticsviewPackage = (OpsemanticsviewPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof OpsemanticsviewPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new OpsemanticsviewPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theOpsemanticsviewPackage.createPackageContents(); + + // Initialize created meta-data + theOpsemanticsviewPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theOpsemanticsviewPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(OpsemanticsviewPackage.eNS_URI, theOpsemanticsviewPackage); + return theOpsemanticsviewPackage; + } + + /** + * + * + * @generated + */ + public EClass getOperationalSemanticsView() { + return operationalSemanticsViewEClass; + } + + /** + * + * + * @generated + */ + public EReference getOperationalSemanticsView_Rules() { + return (EReference)operationalSemanticsViewEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getOperationalSemanticsView_DynamicProperties() { + return (EReference)operationalSemanticsViewEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getOperationalSemanticsView_DynamicClasses() { + return (EReference)operationalSemanticsViewEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getOperationalSemanticsView_ExecutionToASmapping() { + return (EReference)operationalSemanticsViewEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getOperationalSemanticsView_ExecutionMetamodel() { + return (EReference)operationalSemanticsViewEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getOperationalSemanticsView_AbstractSyntax() { + return (EReference)operationalSemanticsViewEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getRule() { + return ruleEClass; + } + + /** + * + * + * @generated + */ + public EReference getRule_CalledRules() { + return (EReference)ruleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getRule_Operation() { + return (EReference)ruleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getRule_StepRule() { + return (EAttribute)ruleEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getRule_OverridenBy() { + return (EReference)ruleEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getRule_Overrides() { + return (EReference)ruleEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getRule_ContainingClass() { + return (EReference)ruleEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getRule_Abstract() { + return (EAttribute)ruleEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getRule_Main() { + return (EAttribute)ruleEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EClass getExecutionToASEntry() { + return executionToASEntryEClass; + } + + /** + * + * + * @generated + */ + public EReference getExecutionToASEntry_ExecutionClass() { + return (EReference)executionToASEntryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getExecutionToASEntry_ASclass() { + return (EReference)executionToASEntryEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public OpsemanticsviewFactory getOpsemanticsviewFactory() { + return (OpsemanticsviewFactory)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 + operationalSemanticsViewEClass = createEClass(OPERATIONAL_SEMANTICS_VIEW); + createEReference(operationalSemanticsViewEClass, OPERATIONAL_SEMANTICS_VIEW__RULES); + createEReference(operationalSemanticsViewEClass, OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_PROPERTIES); + createEReference(operationalSemanticsViewEClass, OPERATIONAL_SEMANTICS_VIEW__DYNAMIC_CLASSES); + createEReference(operationalSemanticsViewEClass, OPERATIONAL_SEMANTICS_VIEW__EXECUTION_TO_ASMAPPING); + createEReference(operationalSemanticsViewEClass, OPERATIONAL_SEMANTICS_VIEW__EXECUTION_METAMODEL); + createEReference(operationalSemanticsViewEClass, OPERATIONAL_SEMANTICS_VIEW__ABSTRACT_SYNTAX); + + ruleEClass = createEClass(RULE); + createEReference(ruleEClass, RULE__CALLED_RULES); + createEReference(ruleEClass, RULE__OPERATION); + createEAttribute(ruleEClass, RULE__STEP_RULE); + createEReference(ruleEClass, RULE__OVERRIDEN_BY); + createEReference(ruleEClass, RULE__OVERRIDES); + createEReference(ruleEClass, RULE__CONTAINING_CLASS); + createEAttribute(ruleEClass, RULE__ABSTRACT); + createEAttribute(ruleEClass, RULE__MAIN); + + executionToASEntryEClass = createEClass(EXECUTION_TO_AS_ENTRY); + createEReference(executionToASEntryEClass, EXECUTION_TO_AS_ENTRY__EXECUTION_CLASS); + createEReference(executionToASEntryEClass, EXECUTION_TO_AS_ENTRY__ASCLASS); + } + + /** + * + * + * @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); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass(operationalSemanticsViewEClass, OperationalSemanticsView.class, "OperationalSemanticsView", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getOperationalSemanticsView_Rules(), this.getRule(), null, "rules", null, 0, -1, OperationalSemanticsView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOperationalSemanticsView_DynamicProperties(), ecorePackage.getEStructuralFeature(), null, "dynamicProperties", null, 0, -1, OperationalSemanticsView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOperationalSemanticsView_DynamicClasses(), ecorePackage.getEClass(), null, "dynamicClasses", null, 0, -1, OperationalSemanticsView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOperationalSemanticsView_ExecutionToASmapping(), this.getExecutionToASEntry(), null, "executionToASmapping", null, 0, -1, OperationalSemanticsView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOperationalSemanticsView_ExecutionMetamodel(), ecorePackage.getEPackage(), null, "executionMetamodel", null, 1, 1, OperationalSemanticsView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOperationalSemanticsView_AbstractSyntax(), ecorePackage.getEPackage(), null, "abstractSyntax", null, 0, 1, OperationalSemanticsView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(ruleEClass, Rule.class, "Rule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRule_CalledRules(), this.getRule(), null, "calledRules", null, 0, -1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getRule_Operation(), ecorePackage.getEOperation(), null, "operation", null, 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRule_StepRule(), ecorePackage.getEBoolean(), "stepRule", null, 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRule_OverridenBy(), this.getRule(), this.getRule_Overrides(), "overridenBy", null, 0, -1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getRule_Overrides(), this.getRule(), this.getRule_OverridenBy(), "overrides", null, 0, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRule_ContainingClass(), ecorePackage.getEClass(), null, "containingClass", null, 0, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRule_Abstract(), ecorePackage.getEBoolean(), "abstract", null, 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRule_Main(), ecorePackage.getEBoolean(), "main", null, 0, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(executionToASEntryEClass, ExecutionToASEntry.class, "ExecutionToASEntry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getExecutionToASEntry_ExecutionClass(), ecorePackage.getEClass(), null, "executionClass", null, 1, 1, ExecutionToASEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getExecutionToASEntry_ASclass(), ecorePackage.getEClass(), null, "ASclass", null, 1, 1, ExecutionToASEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //OpsemanticsviewPackageImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/RuleImpl.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/RuleImpl.java new file mode 100644 index 000000000..1ebbc8805 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/impl/RuleImpl.java @@ -0,0 +1,604 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview.impl; + +import java.util.Collection; + +import opsemanticsview.OpsemanticsviewPackage; +import opsemanticsview.Rule; + +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.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Rule'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link opsemanticsview.impl.RuleImpl#getCalledRules Called Rules}
  • + *
  • {@link opsemanticsview.impl.RuleImpl#getOperation Operation}
  • + *
  • {@link opsemanticsview.impl.RuleImpl#isStepRule Step Rule}
  • + *
  • {@link opsemanticsview.impl.RuleImpl#getOverridenBy Overriden By}
  • + *
  • {@link opsemanticsview.impl.RuleImpl#getOverrides Overrides}
  • + *
  • {@link opsemanticsview.impl.RuleImpl#getContainingClass Containing Class}
  • + *
  • {@link opsemanticsview.impl.RuleImpl#isAbstract Abstract}
  • + *
  • {@link opsemanticsview.impl.RuleImpl#isMain Main}
  • + *
+ * + * @generated + */ +public class RuleImpl extends MinimalEObjectImpl.Container implements Rule { + /** + * The cached value of the '{@link #getCalledRules() Called Rules}' reference list. + * + * + * @see #getCalledRules() + * @generated + * @ordered + */ + protected EList calledRules; + + /** + * The cached value of the '{@link #getOperation() Operation}' containment reference. + * + * + * @see #getOperation() + * @generated + * @ordered + */ + protected EOperation operation; + + /** + * The default value of the '{@link #isStepRule() Step Rule}' attribute. + * + * + * @see #isStepRule() + * @generated + * @ordered + */ + protected static final boolean STEP_RULE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isStepRule() Step Rule}' attribute. + * + * + * @see #isStepRule() + * @generated + * @ordered + */ + protected boolean stepRule = STEP_RULE_EDEFAULT; + + /** + * The cached value of the '{@link #getOverridenBy() Overriden By}' reference list. + * + * + * @see #getOverridenBy() + * @generated + * @ordered + */ + protected EList overridenBy; + + /** + * The cached value of the '{@link #getOverrides() Overrides}' reference. + * + * + * @see #getOverrides() + * @generated + * @ordered + */ + protected Rule overrides; + + /** + * The cached value of the '{@link #getContainingClass() Containing Class}' reference. + * + * + * @see #getContainingClass() + * @generated + * @ordered + */ + protected EClass containingClass; + + /** + * The default value of the '{@link #isAbstract() Abstract}' attribute. + * + * + * @see #isAbstract() + * @generated + * @ordered + */ + protected static final boolean ABSTRACT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isAbstract() Abstract}' attribute. + * + * + * @see #isAbstract() + * @generated + * @ordered + */ + protected boolean abstract_ = ABSTRACT_EDEFAULT; + + /** + * The default value of the '{@link #isMain() Main}' attribute. + * + * + * @see #isMain() + * @generated + * @ordered + */ + protected static final boolean MAIN_EDEFAULT = false; + + /** + * The cached value of the '{@link #isMain() Main}' attribute. + * + * + * @see #isMain() + * @generated + * @ordered + */ + protected boolean main = MAIN_EDEFAULT; + + /** + * + * + * @generated + */ + protected RuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return OpsemanticsviewPackage.Literals.RULE; + } + + /** + * + * + * @generated + */ + public EList getCalledRules() { + if (calledRules == null) { + calledRules = new EObjectResolvingEList(Rule.class, this, OpsemanticsviewPackage.RULE__CALLED_RULES); + } + return calledRules; + } + + /** + * + * + * @generated + */ + public EOperation getOperation() { + return operation; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetOperation(EOperation newOperation, NotificationChain msgs) { + EOperation oldOperation = operation; + operation = newOperation; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.RULE__OPERATION, oldOperation, newOperation); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setOperation(EOperation newOperation) { + if (newOperation != operation) { + NotificationChain msgs = null; + if (operation != null) + msgs = ((InternalEObject)operation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OpsemanticsviewPackage.RULE__OPERATION, null, msgs); + if (newOperation != null) + msgs = ((InternalEObject)newOperation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OpsemanticsviewPackage.RULE__OPERATION, null, msgs); + msgs = basicSetOperation(newOperation, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.RULE__OPERATION, newOperation, newOperation)); + } + + /** + * + * + * @generated + */ + public boolean isStepRule() { + return stepRule; + } + + /** + * + * + * @generated + */ + public void setStepRule(boolean newStepRule) { + boolean oldStepRule = stepRule; + stepRule = newStepRule; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.RULE__STEP_RULE, oldStepRule, stepRule)); + } + + /** + * + * + * @generated + */ + public EList getOverridenBy() { + if (overridenBy == null) { + overridenBy = new EObjectWithInverseResolvingEList(Rule.class, this, OpsemanticsviewPackage.RULE__OVERRIDEN_BY, OpsemanticsviewPackage.RULE__OVERRIDES); + } + return overridenBy; + } + + /** + * + * + * @generated + */ + public Rule getOverrides() { + if (overrides != null && overrides.eIsProxy()) { + InternalEObject oldOverrides = (InternalEObject)overrides; + overrides = (Rule)eResolveProxy(oldOverrides); + if (overrides != oldOverrides) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, OpsemanticsviewPackage.RULE__OVERRIDES, oldOverrides, overrides)); + } + } + return overrides; + } + + /** + * + * + * @generated + */ + public Rule basicGetOverrides() { + return overrides; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetOverrides(Rule newOverrides, NotificationChain msgs) { + Rule oldOverrides = overrides; + overrides = newOverrides; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.RULE__OVERRIDES, oldOverrides, newOverrides); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setOverrides(Rule newOverrides) { + if (newOverrides != overrides) { + NotificationChain msgs = null; + if (overrides != null) + msgs = ((InternalEObject)overrides).eInverseRemove(this, OpsemanticsviewPackage.RULE__OVERRIDEN_BY, Rule.class, msgs); + if (newOverrides != null) + msgs = ((InternalEObject)newOverrides).eInverseAdd(this, OpsemanticsviewPackage.RULE__OVERRIDEN_BY, Rule.class, msgs); + msgs = basicSetOverrides(newOverrides, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.RULE__OVERRIDES, newOverrides, newOverrides)); + } + + /** + * + * + * @generated + */ + public EClass getContainingClass() { + if (containingClass != null && containingClass.eIsProxy()) { + InternalEObject oldContainingClass = (InternalEObject)containingClass; + containingClass = (EClass)eResolveProxy(oldContainingClass); + if (containingClass != oldContainingClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, OpsemanticsviewPackage.RULE__CONTAINING_CLASS, oldContainingClass, containingClass)); + } + } + return containingClass; + } + + /** + * + * + * @generated + */ + public EClass basicGetContainingClass() { + return containingClass; + } + + /** + * + * + * @generated + */ + public void setContainingClass(EClass newContainingClass) { + EClass oldContainingClass = containingClass; + containingClass = newContainingClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.RULE__CONTAINING_CLASS, oldContainingClass, containingClass)); + } + + /** + * + * + * @generated + */ + public boolean isAbstract() { + return abstract_; + } + + /** + * + * + * @generated + */ + public void setAbstract(boolean newAbstract) { + boolean oldAbstract = abstract_; + abstract_ = newAbstract; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.RULE__ABSTRACT, oldAbstract, abstract_)); + } + + /** + * + * + * @generated + */ + public boolean isMain() { + return main; + } + + /** + * + * + * @generated + */ + public void setMain(boolean newMain) { + boolean oldMain = main; + main = newMain; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsemanticsviewPackage.RULE__MAIN, oldMain, main)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case OpsemanticsviewPackage.RULE__OVERRIDEN_BY: + return ((InternalEList)(InternalEList)getOverridenBy()).basicAdd(otherEnd, msgs); + case OpsemanticsviewPackage.RULE__OVERRIDES: + if (overrides != null) + msgs = ((InternalEObject)overrides).eInverseRemove(this, OpsemanticsviewPackage.RULE__OVERRIDEN_BY, Rule.class, msgs); + return basicSetOverrides((Rule)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case OpsemanticsviewPackage.RULE__OPERATION: + return basicSetOperation(null, msgs); + case OpsemanticsviewPackage.RULE__OVERRIDEN_BY: + return ((InternalEList)getOverridenBy()).basicRemove(otherEnd, msgs); + case OpsemanticsviewPackage.RULE__OVERRIDES: + return basicSetOverrides(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case OpsemanticsviewPackage.RULE__CALLED_RULES: + return getCalledRules(); + case OpsemanticsviewPackage.RULE__OPERATION: + return getOperation(); + case OpsemanticsviewPackage.RULE__STEP_RULE: + return isStepRule(); + case OpsemanticsviewPackage.RULE__OVERRIDEN_BY: + return getOverridenBy(); + case OpsemanticsviewPackage.RULE__OVERRIDES: + if (resolve) return getOverrides(); + return basicGetOverrides(); + case OpsemanticsviewPackage.RULE__CONTAINING_CLASS: + if (resolve) return getContainingClass(); + return basicGetContainingClass(); + case OpsemanticsviewPackage.RULE__ABSTRACT: + return isAbstract(); + case OpsemanticsviewPackage.RULE__MAIN: + return isMain(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case OpsemanticsviewPackage.RULE__CALLED_RULES: + getCalledRules().clear(); + getCalledRules().addAll((Collection)newValue); + return; + case OpsemanticsviewPackage.RULE__OPERATION: + setOperation((EOperation)newValue); + return; + case OpsemanticsviewPackage.RULE__STEP_RULE: + setStepRule((Boolean)newValue); + return; + case OpsemanticsviewPackage.RULE__OVERRIDEN_BY: + getOverridenBy().clear(); + getOverridenBy().addAll((Collection)newValue); + return; + case OpsemanticsviewPackage.RULE__OVERRIDES: + setOverrides((Rule)newValue); + return; + case OpsemanticsviewPackage.RULE__CONTAINING_CLASS: + setContainingClass((EClass)newValue); + return; + case OpsemanticsviewPackage.RULE__ABSTRACT: + setAbstract((Boolean)newValue); + return; + case OpsemanticsviewPackage.RULE__MAIN: + setMain((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case OpsemanticsviewPackage.RULE__CALLED_RULES: + getCalledRules().clear(); + return; + case OpsemanticsviewPackage.RULE__OPERATION: + setOperation((EOperation)null); + return; + case OpsemanticsviewPackage.RULE__STEP_RULE: + setStepRule(STEP_RULE_EDEFAULT); + return; + case OpsemanticsviewPackage.RULE__OVERRIDEN_BY: + getOverridenBy().clear(); + return; + case OpsemanticsviewPackage.RULE__OVERRIDES: + setOverrides((Rule)null); + return; + case OpsemanticsviewPackage.RULE__CONTAINING_CLASS: + setContainingClass((EClass)null); + return; + case OpsemanticsviewPackage.RULE__ABSTRACT: + setAbstract(ABSTRACT_EDEFAULT); + return; + case OpsemanticsviewPackage.RULE__MAIN: + setMain(MAIN_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case OpsemanticsviewPackage.RULE__CALLED_RULES: + return calledRules != null && !calledRules.isEmpty(); + case OpsemanticsviewPackage.RULE__OPERATION: + return operation != null; + case OpsemanticsviewPackage.RULE__STEP_RULE: + return stepRule != STEP_RULE_EDEFAULT; + case OpsemanticsviewPackage.RULE__OVERRIDEN_BY: + return overridenBy != null && !overridenBy.isEmpty(); + case OpsemanticsviewPackage.RULE__OVERRIDES: + return overrides != null; + case OpsemanticsviewPackage.RULE__CONTAINING_CLASS: + return containingClass != null; + case OpsemanticsviewPackage.RULE__ABSTRACT: + return abstract_ != ABSTRACT_EDEFAULT; + case OpsemanticsviewPackage.RULE__MAIN: + return main != MAIN_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (stepRule: "); + result.append(stepRule); + result.append(", abstract: "); + result.append(abstract_); + result.append(", main: "); + result.append(main); + result.append(')'); + return result.toString(); + } + +} //RuleImpl diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/util/OpsemanticsviewAdapterFactory.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/util/OpsemanticsviewAdapterFactory.java new file mode 100644 index 000000000..c8bde3376 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/util/OpsemanticsviewAdapterFactory.java @@ -0,0 +1,166 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview.util; + +import opsemanticsview.*; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see opsemanticsview.OpsemanticsviewPackage + * @generated + */ +public class OpsemanticsviewAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static OpsemanticsviewPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public OpsemanticsviewAdapterFactory() { + if (modelPackage == null) { + modelPackage = OpsemanticsviewPackage.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 OpsemanticsviewSwitch modelSwitch = + new OpsemanticsviewSwitch() { + @Override + public Adapter caseOperationalSemanticsView(OperationalSemanticsView object) { + return createOperationalSemanticsViewAdapter(); + } + @Override + public Adapter caseRule(Rule object) { + return createRuleAdapter(); + } + @Override + public Adapter caseExecutionToASEntry(ExecutionToASEntry object) { + return createExecutionToASEntryAdapter(); + } + @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 opsemanticsview.OperationalSemanticsView Operational Semantics View}'. + * + * 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 opsemanticsview.OperationalSemanticsView + * @generated + */ + public Adapter createOperationalSemanticsViewAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link opsemanticsview.Rule Rule}'. + * + * 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 opsemanticsview.Rule + * @generated + */ + public Adapter createRuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link opsemanticsview.ExecutionToASEntry Execution To AS Entry}'. + * + * 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 opsemanticsview.ExecutionToASEntry + * @generated + */ + public Adapter createExecutionToASEntryAdapter() { + 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; + } + +} //OpsemanticsviewAdapterFactory diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/util/OpsemanticsviewSwitch.java b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/util/OpsemanticsviewSwitch.java new file mode 100644 index 000000000..6d0e1ecd7 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.opsemanticsview.model/src/opsemanticsview/util/OpsemanticsviewSwitch.java @@ -0,0 +1,162 @@ +/******************************************************************************* + * Copyright (c) 2017 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 opsemanticsview.util; + +import opsemanticsview.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * 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 opsemanticsview.OpsemanticsviewPackage + * @generated + */ +public class OpsemanticsviewSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static OpsemanticsviewPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public OpsemanticsviewSwitch() { + if (modelPackage == null) { + modelPackage = OpsemanticsviewPackage.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 OpsemanticsviewPackage.OPERATIONAL_SEMANTICS_VIEW: { + OperationalSemanticsView operationalSemanticsView = (OperationalSemanticsView)theEObject; + T result = caseOperationalSemanticsView(operationalSemanticsView); + if (result == null) result = defaultCase(theEObject); + return result; + } + case OpsemanticsviewPackage.RULE: { + Rule rule = (Rule)theEObject; + T result = caseRule(rule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case OpsemanticsviewPackage.EXECUTION_TO_AS_ENTRY: { + ExecutionToASEntry executionToASEntry = (ExecutionToASEntry)theEObject; + T result = caseExecutionToASEntry(executionToASEntry); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Operational Semantics View'. + * + * 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 'Operational Semantics View'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOperationalSemanticsView(OperationalSemanticsView object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Rule'. + * + * 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 'Rule'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRule(Rule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Execution To AS Entry'. + * + * 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 'Execution To AS Entry'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseExecutionToASEntry(ExecutionToASEntry 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; + } + +} //OpsemanticsviewSwitch diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.checkstyle b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.classpath b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.classpath new file mode 100644 index 000000000..428337e56 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.gitignore b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.gitignore similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.gitignore rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.gitignore diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.project b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.project new file mode 100644 index 000000000..f4f6c455b --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.project @@ -0,0 +1,40 @@ + + + org.eclipse.gemoc.xdsmlframework.api + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/.settings/org.eclipse.jdt.core.prefs b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/.settings/org.eclipse.jdt.core.prefs rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/META-INF/MANIFEST.MF new file mode 100644 index 000000000..375e76d1f --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Gemoc Language Api +Bundle-SymbolicName: org.eclipse.gemoc.xdsmlframework.api;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.xdsmlframework.api.Activator +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore, + org.eclipse.gemoc.executionframework.reflectivetrace.model;bundle-version="0.1.0", + org.eclipse.gemoc.commons.eclipse;bundle-version="0.1.0", + org.eclipse.xtend.lib, + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.xdsmlframework.api.core, + org.eclipse.gemoc.xdsmlframework.api.engine_addon, + org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener, + org.eclipse.gemoc.xdsmlframework.api.extensions, + org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon, + org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon_group, + org.eclipse.gemoc.xdsmlframework.api.extensions.languages diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/about.html b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/about.html similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/about.html rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/about.html diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/build.properties b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/build.properties new file mode 100644 index 000000000..073456b44 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/build.properties @@ -0,0 +1,19 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + schema/,\ + about.html +src.includes = about.html diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/plugin.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/plugin.xml new file mode 100644 index 000000000..c9c199e76 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/plugin.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/pom.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/pom.xml new file mode 100644 index 000000000..f343a0488 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/pom.xml @@ -0,0 +1,60 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.framework.commons + org.gemoc.modeldebugging.framework.commons.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.xdsmlframework.api + eclipse-plugin + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + \ No newline at end of file diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.engine_addon.exsd b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.engine_addon.exsd similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.engine_addon.exsd rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.engine_addon.exsd diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.engine_addon_group.exsd b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.engine_addon_group.exsd similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.engine_addon_group.exsd rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.engine_addon_group.exsd diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.xdsml.exsd b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.xdsml.exsd similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.xdsml.exsd rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/schema/org.gemoc.gemoc_language_workbench.xdsml.exsd diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/Activator.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/Activator.java new file mode 100644 index 000000000..50b2a911e --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/Activator.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.api; + +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends Plugin +{ + + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.xdsmlframework.api"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/EngineStatus.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/EngineStatus.java similarity index 82% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/EngineStatus.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/EngineStatus.java index 111e591c4..8f774bd1e 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/EngineStatus.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/EngineStatus.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,14 +8,14 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; -import fr.inria.diverse.trace.commons.model.trace.Step; +import org.eclipse.gemoc.trace.commons.model.trace.Step; public class EngineStatus { long nbLogicalStepRun = 0; - Step chosenLogicalStep; + Step chosenLogicalStep; public enum RunStatus { Initializing, Running, WaitingLogicalStepSelection, Stopped} diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/ExecutionMode.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/ExecutionMode.java similarity index 84% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/ExecutionMode.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/ExecutionMode.java index 045c9b2cd..53fc332b3 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/ExecutionMode.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/ExecutionMode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; public enum ExecutionMode { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IDisposable.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IDisposable.java similarity index 85% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IDisposable.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IDisposable.java index d67992917..48c92879b 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IDisposable.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IDisposable.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; public interface IDisposable { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionCheckpoint.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionCheckpoint.java similarity index 92% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionCheckpoint.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionCheckpoint.java index da709e81b..fc123cbd4 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionCheckpoint.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionCheckpoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; import java.util.HashMap; import java.util.Map; diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionContext.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionContext.java similarity index 79% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionContext.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionContext.java index 3bd722c3d..efd4bdfc4 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionContext.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; import org.eclipse.emf.ecore.resource.Resource; -import org.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; +import org.eclipse.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; import org.osgi.framework.Bundle; -import fr.inria.diverse.trace.commons.model.trace.MSEModel; +import org.eclipse.gemoc.trace.commons.model.trace.MSEModel; public interface IExecutionContext extends IDisposable { diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionEngine.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionEngine.java new file mode 100644 index 000000000..c2fa3a8db --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionEngine.java @@ -0,0 +1,127 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.api.core; + +import java.util.Deque; +import java.util.Set; + +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; + +/** + * The interface of the GEMOC Execution Engine. The Execution Engine is an + * entity able to execute models conforming to an xDSML as defined in the GEMOC + * ANR INS project. This API allows the caller to initialize the engine for a + * given model, and to run the engine in different ways. It also allows the + * caller to influence the constraints of the MoC at runtime. + * + * @author Didier Vojtisek + * + */ +public interface IExecutionEngine extends IDisposable { + + /** + * In case of nested calls, indicate the current stack of model specific event occurrences. + * @return the current stack of {@link MSEOccurrence} + */ + Deque getCurrentStack(); + + /** + * Provides the model specific event occurrence of the current step + * @return the current MSEOccurrence + */ + MSEOccurrence getCurrentMSEOccurrence(); + + /** + * Starts the {@link IExecutionEngine}. + */ + void start(); + + /** + * Asks the engine to stop + */ + void stop(); + + /** + * indicates the engine status {@link EngineStatus} + * @return the engine status + */ + EngineStatus getEngineStatus(); + + /** + * set the engine status {@link EngineStatus} + * @param status the new status + */ + void setEngineStatus(RunStatus status); + + /** + * Indicates if an {@link IEngineAddon} of the given type is linked to the engine + * @param type of the searched addon + * @return true if the engine has the addon, false otherwise. + */ + boolean hasAddon(Class type); + + /** + * get the first {@link IEngineAddon} of the required type associated to this engine. + * @param type searched type + * @return The {@link IEngineAddon} of the given type if it exists. + */ + T getAddon(Class type); + + /** + * get the execution context + * @return the {@link IExecutionContext} + */ + IExecutionContext getExecutionContext(); + + /** + * get the run status + * @return the {@link RunStatus} + */ + RunStatus getRunningStatus(); + + /** + * get all the {@link IEngineAddon} of the required type associated to this engine. + * @param type searched type + * @return a set of {@link IEngineAddon} of the given type. + */ + Set getAddonsTypedBy(Class type); + + /** + * Ask the engine to initialize + * @param executionContext the {@link IExecutionContext} + */ + void initialize(IExecutionContext executionContext); + + /** + * Create a {@link LaunchConfiguration} for the Trace based on the engine RunConfiguration. + * @return a {@link org.eclipse.gemoc.trace.commons.model.trace.LaunchConfiguration} + */ + default LaunchConfiguration extractLaunchConfiguration() { + return null; + } + + /** + * get the engine kind name + * @return a user display name for the engine kind (will be used to compute + * the full name of the engine instance) + */ + String engineKindName(); + + /** + * get the engine name + * @return a display name to identify this engine + */ + String getName(); +} diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionPlatform.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionPlatform.java similarity index 82% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionPlatform.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionPlatform.java index f684c5384..9f8a8e5ce 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionPlatform.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionPlatform.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,9 +8,9 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; public interface IExecutionPlatform extends IDisposable { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionWorkspace.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionWorkspace.java similarity index 89% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionWorkspace.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionWorkspace.java index fc54d82cc..2c13b24f6 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionWorkspace.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IExecutionWorkspace.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IModelLoader.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IModelLoader.java similarity index 75% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IModelLoader.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IModelLoader.java index 424e68b21..c48e5b2a4 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IModelLoader.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IModelLoader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,8 +8,9 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; +import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.ecore.resource.Resource; /** @@ -24,5 +25,7 @@ public interface IModelLoader { Resource loadModel(IExecutionContext context); /** load model when running in animation mode */ Resource loadModelForAnimation(IExecutionContext context); + /** if not null, the progress monitor used to report load progress */ + void setProgressMonitor(IProgressMonitor progressMonitor); } diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IRunConfiguration.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IRunConfiguration.java similarity index 85% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IRunConfiguration.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IRunConfiguration.java index b24ef2acf..ccf9e54dd 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IRunConfiguration.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/core/IRunConfiguration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,12 +8,12 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.core; +package org.eclipse.gemoc.xdsmlframework.api.core; import java.util.Collection; import org.eclipse.emf.common.util.URI; -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; public interface IRunConfiguration { @@ -27,6 +27,7 @@ public interface IRunConfiguration { public static final String LAUNCH_INITIALIZATION_METHOD = "GEMOC_LAUNCH_INITIALIZATION_METHOD"; public static final String LAUNCH_INITIALIZATION_ARGUMENTS = "GEMOC_LAUNCH_INITIALIZATION_ARGUMENTS"; public static final String LAUNCH_BREAK_START = "GEMOC_LAUNCH_BREAK_START"; + public static final String DEBUG_MODEL_ID = "GEMOC_DEBUG_MODEL_ID"; // parameters that should be derived from the language in future version public static final String LAUNCH_DEADLOCK_DETECTION_DEPTH = "GEMOC_LAUNCH_DEADLOCK_DETECTION_DEPTH"; @@ -55,4 +56,9 @@ public interface IRunConfiguration { String getModelInitializationArguments(); + String getDebugModelID(); + + boolean getBreakStart(); + + } diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/DefaultEngineAddon.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/DefaultEngineAddon.java new file mode 100644 index 000000000..fc570fbed --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/DefaultEngineAddon.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.api.engine_addon; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; + +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +public class DefaultEngineAddon implements IEngineAddon { + + @Override + public void engineAboutToStart(IExecutionEngine engine) { + } + + @Override + public void engineStarted(IExecutionEngine executionEngine) { + } + + @Override + public void aboutToSelectStep(IExecutionEngine engine, Collection> 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 new file mode 100644 index 000000000..187ad8c24 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.api.engine_addon; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; + +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +public interface IEngineAddon { + + /** + * Operation called before the engine starts + */ + public void engineAboutToStart(IExecutionEngine engine); + + /** + * Operation called after the engine have started + */ + public void engineStarted(IExecutionEngine executionEngine); + + default public void engineInitialized(IExecutionEngine executionEngine) { + + } + + public void engineAboutToStop(IExecutionEngine engine); + + /** + * Operation called after the engine has been stopped + */ + public void engineStopped(IExecutionEngine engine); + + + /** + * Operation before the engine has been disposed (and after the engine has + * been stopped) + */ + public void engineAboutToDispose(IExecutionEngine engine); + + /** + * Operation called before the Step has been chosen + */ + public void aboutToSelectStep(IExecutionEngine engine, Collection> steps); + + 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); + + public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute); + + public void stepExecuted(IExecutionEngine engine, Step stepExecuted); + + public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus); + + /** + * This operation check the current addon compatibility with elements in + * 'otherAddons' + * + * @return A list of error messages if the check failed or an empty list + * otherwise. + */ + public List validate(List otherAddons); + +} diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/BatchModelChangeListener.xtend b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/BatchModelChangeListener.xtend new file mode 100644 index 000000000..205a9c644 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/BatchModelChangeListener.xtend @@ -0,0 +1,271 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.api.engine_addon.modelchangelistener; + +import java.util.ArrayList +import java.util.Collection +import java.util.HashMap +import java.util.HashSet +import java.util.List +import java.util.Map +import java.util.Set +import org.eclipse.emf.common.notify.Notification +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.emf.ecore.util.EContentAdapter + +/** + * This model listener gathers EMF notifications, and computes when asked a + * set of ModelChange objects to reflect what happened in a more abstract + * and concise way. + * + * For instance, if a field changed multiple times in between two queries to + * the model listener, a single ModelChange object will be computed to reflect that change, + * instead of a list of many EMF Notifications. + * + * A ModelChange can be a new/removed object in the model, or a change in a field. + * See associated class. + * + */ +public class BatchModelChangeListener { + + private val EContentAdapter adapter; + private val Map> changes = new HashMap + private val Set registeredObservers = new HashSet + private val Set observedResources = new HashSet + + public new(Set resources) { + /* + * We create an adapter that stores and sort all the notifications for each object and field. + * This avoids us to sort everything afterwards. + */ + this.adapter = new EContentAdapter() { + override void notifyChanged(Notification notification) { + super.notifyChanged(notification); + for (obs : registeredObservers) { + changes.get(obs).add(notification) + } + } + }; + + observedResources.addAll(resources) + + observedResources.forEach [ r | + if (r != null) { + r.eAdapters().add(adapter); + } + ] + } + + /** + * When an observer asks for the changes, we process all the notifications gathered for it since the last time. + */ + def List getChanges(Object addon) { + val List result = new ArrayList() + val List allNotifs = changes.get(addon); + if (registeredObservers.contains(addon)) { + changes.put( + addon, + new ArrayList() + ); + } + + // First we sort everything per object and field + val Map>> sortedNotifications = new HashMap + val Map> resourcesNotifications = new HashMap + for (Notification notification : allNotifs) { + val int eventType = notification.getEventType(); + if (eventType < Notification.EVENT_TYPE_COUNT && !notification.isTouch()) { + + if (notification.getNotifier() instanceof EObject && + notification.getFeature() instanceof EStructuralFeature) { + val EStructuralFeature feature = notification.getFeature() as EStructuralFeature; + val EObject changedObject = notification.getNotifier() as EObject; + if (!sortedNotifications.containsKey(changedObject)) { + sortedNotifications.put(changedObject, new HashMap) + } + val Map> objectsNotifications = sortedNotifications.get( + changedObject); + if (!objectsNotifications.containsKey(feature)) { + objectsNotifications.put(feature, new ArrayList) + } + val List fieldNotifications = objectsNotifications.get(feature); + fieldNotifications.addUnique(notification); + } else if (notification.getNotifier() instanceof Resource) { + val Resource resource = notification.notifier as Resource + if (!resourcesNotifications.containsKey(resource)) + resourcesNotifications.put(resource, new ArrayList) + val resourceNotifications = resourcesNotifications.get(resource) + resourceNotifications.addUnique(notification) + } + } + } + + val newObjects = new HashSet + val removedObjects = new HashSet + val eventuallyRemoved = new HashSet + + // First we find new objects added or removed at the root of the resource + for (resource : resourcesNotifications.keySet) { + val resourceNotifications = resourcesNotifications.get(resource) + for (Notification notif : resourceNotifications) { + BatchModelChangeListener.manageCollectionContainmentNotification(eventuallyRemoved, removedObjects, + newObjects, notif) + } + } + + // Next we read all that and try to interpret everything as coarse grained model changes + for (object : sortedNotifications.keySet) { + val featureMap = sortedNotifications.get(object) + for (feature : featureMap.keySet) { + val notifs = featureMap.get(feature) + + // Case multiplicity 0..1: we compare the original value and the new one at the end of the step + if (!feature.isMany) { + + val previousValue = notifs.head.oldValue + val newValue = notifs.last.newValue + + // Case objects: we compare references + if (feature instanceof EReference) { + if (previousValue != newValue) { + + // Register model change + result.add(new NonCollectionFieldModelChange(object, feature)) + + // Register potentially new or removed object + if ((feature as EReference).containment) { + if (previousValue != null && previousValue instanceof EObject) + addToRemovedObjects(eventuallyRemoved, removedObjects, newObjects, + previousValue as EObject) + if (newValue != null && newValue instanceof EObject) + addToNewObjects(eventuallyRemoved, removedObjects, newObjects, newValue as EObject) + } + } + } // Case data types: we compare values + else if (if (previousValue == null) { + newValue != null + } else { + !previousValue.equals(newValue) + }) { + + // Register model change + result.add(new NonCollectionFieldModelChange(object, feature)) + } + + } // Case multiplicity 0..*: we consider that there was a potential change, but maybe following + // all the adds ands remove, the collection went back to its state before the step + else { + + // Very hard to decide if a collection has changed or not based on the notifications, + // (e.g. if we remove and add the same object, the collection in fact doesn't change) + // and we don't have a direct access to the previous content of the collection to compare + // similarly to what we do in a trace manager. + // So for now we simply state a "potential change", and the trace manager will have to compute + // itself if there was a real change. + result.add(new PotentialCollectionFieldModelChange(object, feature, notifs)) + + // Yet we must still find new/removed objects + for (notif : notifs) { + + if (feature instanceof EReference && (feature as EReference).containment) { + BatchModelChangeListener. + manageCollectionContainmentNotification(eventuallyRemoved, removedObjects, newObjects, + notif) + } + } + } + } + } + + // Finally we register the new and removed objects from the model + for (newObject : newObjects) { + result.add(0, new NewObjectModelChange(newObject)) + } + for (removedObject : removedObjects) { + result.add(0, new RemovedObjectModelChange(removedObject)) + } + + // And we remove changes registered in new/deleted objects + result.removeIf([ c | + c instanceof FieldModelChange && + (newObjects.contains(c.changedObject) || removedObjects.contains(c.changedObject) || eventuallyRemoved.contains(c.changedObject)) + ]) + + return result; + } + + def boolean registerObserver(Object observer) { + val boolean res = registeredObservers.add(observer); + if (res) { + changes.put(observer, new ArrayList()); + } + return res; + } + + def void removeObserver(Object observer) { + changes.remove(observer) + registeredObservers.remove(observer) + } + + private static def void addToNewObjects(Collection eventuallyRemoved, Collection removedObjects, + Collection newObjects, EObject object) { + eventuallyRemoved.remove(object) + if (object != null) { + val hasMoved = removedObjects.remove(object) + if (!hasMoved) { + newObjects.add(object) + + } + } + } + + private static def void addToRemovedObjects(Collection eventuallyRemoved, + Collection removedObjects, Collection newObjects, EObject object) { + eventuallyRemoved.add(object) + if (object != null) { + val hasMoved = newObjects.remove(object) + if (!hasMoved) + removedObjects.add(object) + } + } + + // TODO manage objects already contained in new objects ... ? + private static def void manageCollectionContainmentNotification(Collection eventuallyRemoved, + Collection removedObjects, Collection newObjects, Notification notif) { + switch (notif.eventType) { + case Notification.ADD: + addToNewObjects(eventuallyRemoved, removedObjects, newObjects, notif.newValue as EObject) + case Notification.ADD_MANY: + for (add : notif.newValue as List) + addToNewObjects(eventuallyRemoved, removedObjects, newObjects, add) + case Notification.REMOVE: + addToRemovedObjects(eventuallyRemoved, removedObjects, newObjects, notif.oldValue as EObject) + case Notification.REMOVE_MANY: + for (remove : notif.oldValue as List) + addToNewObjects(eventuallyRemoved, removedObjects, newObjects, remove) + } + } + + public def void cleanUp() { + for (r : observedResources.filter[r|r != null]) { + r.eAdapters().remove(adapter); + } + } + + private static def addUnique(List list, T o) { + if (!list.contains(o)) { + list.add(o); + } + } +} diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/FieldChange.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/FieldChange.java similarity index 90% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/FieldChange.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/FieldChange.java index 24df53cd1..dd33b564f 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/FieldChange.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/FieldChange.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener; +package org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/IModelChangeListenerAddon.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/IModelChangeListenerAddon.java similarity index 77% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/IModelChangeListenerAddon.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/IModelChangeListenerAddon.java index 71d7971b4..c2febd5e6 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/IModelChangeListenerAddon.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/IModelChangeListenerAddon.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener; +package org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener; import java.util.List; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; public interface IModelChangeListenerAddon { diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/ModelChange.xtend b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/ModelChange.xtend new file mode 100644 index 000000000..1f9671bac --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/ModelChange.xtend @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.api.engine_addon.modelchangelistener + +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.xtend.lib.annotations.Accessors +import java.util.List +import org.eclipse.emf.common.notify.Notification + +abstract class ModelChange { + + @Accessors(PROTECTED_SETTER,PUBLIC_GETTER) + EObject changedObject + + new(EObject changedObject) { + this.changedObject = changedObject + } + +} + +class NewObjectModelChange extends ModelChange { + + new(EObject changedObject) { + super(changedObject) + } + +} + +class RemovedObjectModelChange extends ModelChange { + + new(EObject changedObject) { + super(changedObject) + } + +} + +abstract class FieldModelChange extends ModelChange { + + @Accessors(PROTECTED_SETTER,PUBLIC_GETTER) + EStructuralFeature changedField + + new(EObject changedObject, EStructuralFeature changedField) { + super(changedObject) + this.changedField = changedField + + } + +} + +class PotentialCollectionFieldModelChange extends FieldModelChange { + + @Accessors(PROTECTED_SETTER,PUBLIC_GETTER) + Object emfNotifications + + new(EObject changedObject, EStructuralFeature changedField, List notifications) { + super(changedObject, changedField) + this.emfNotifications = notifications + } + +} + +class NonCollectionFieldModelChange extends FieldModelChange { + + + new(EObject changedObject, EStructuralFeature changedField) { + super(changedObject, changedField) + } + +} + \ No newline at end of file diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/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 similarity index 86% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/SimpleModelChangeListenerAddon.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/SimpleModelChangeListenerAddon.java index d82913f29..0b35376a5 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener; +package org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener; import java.util.ArrayList; import java.util.HashMap; @@ -22,9 +22,9 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EContentAdapter; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.engine_addon.DefaultEngineAddon; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +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 { @@ -76,7 +76,7 @@ public void notifyChanged(Notification notification) { } } }; - Set allResources = org.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(this.engine + Set allResources = org.eclipse.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(this.engine .getExecutionContext().getResourceModel()); allResources.stream().forEach(r -> { if (r != null) { @@ -105,7 +105,7 @@ public boolean registerAddon(IEngineAddon addon) { @Override public void engineAboutToStop(IExecutionEngine engine) { - Set allResources = org.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(this.engine + Set allResources = org.eclipse.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(this.engine .getExecutionContext().getResourceModel()); allResources.stream().forEach(r -> { r.eAdapters().remove(adapter); diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/Extension.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/Extension.java similarity index 91% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/Extension.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/Extension.java index c4215dc82..5de74bc83 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/Extension.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/Extension.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,12 +8,12 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.extensions; +package org.eclipse.gemoc.xdsmlframework.api.extensions; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.Status; -import org.gemoc.xdsmlframework.api.Activator; +import org.eclipse.gemoc.xdsmlframework.api.Activator; public class Extension { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/ExtensionPoint.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/ExtensionPoint.java similarity index 94% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/ExtensionPoint.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/ExtensionPoint.java index 9119f2072..24c077519 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/ExtensionPoint.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/ExtensionPoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.extensions; +package org.eclipse.gemoc.xdsmlframework.api.extensions; import java.util.ArrayList; import java.util.Collection; diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtension.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtension.java similarity index 89% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtension.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtension.java index 66f2cbe66..ce19375d1 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtension.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtension.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,14 +8,14 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.extensions.engine_addon; +package org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon; import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.CoreException; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -import org.gemoc.xdsmlframework.api.extensions.Extension; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.xdsmlframework.api.extensions.Extension; public class EngineAddonSpecificationExtension extends Extension { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtensionPoint.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtensionPoint.java similarity index 90% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtensionPoint.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtensionPoint.java index 1c4d36b96..16981ed02 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtensionPoint.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon/EngineAddonSpecificationExtensionPoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.extensions.engine_addon; +package org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon; import java.util.Collection; import org.eclipse.core.runtime.CoreException; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -import org.gemoc.xdsmlframework.api.extensions.ExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.xdsmlframework.api.extensions.ExtensionPoint; public class EngineAddonSpecificationExtensionPoint extends ExtensionPoint { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtension.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtension.java similarity index 81% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtension.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtension.java index 3db571fad..89a572171 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtension.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtension.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,9 +8,9 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.extensions.engine_addon_group; +package org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon_group; -import org.gemoc.xdsmlframework.api.extensions.Extension; +import org.eclipse.gemoc.xdsmlframework.api.extensions.Extension; public class EngineAddonGroupSpecificationExtension extends Extension { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtensionPoint.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtensionPoint.java similarity index 89% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtensionPoint.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtensionPoint.java index 67c2e2e20..c9307cc8f 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtensionPoint.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/engine_addon_group/EngineAddonGroupSpecificationExtensionPoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.extensions.engine_addon_group; +package org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon_group; import java.util.Collection; -import org.gemoc.xdsmlframework.api.extensions.ExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.api.extensions.ExtensionPoint; public class EngineAddonGroupSpecificationExtensionPoint extends ExtensionPoint { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtension.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtension.java similarity index 92% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtension.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtension.java index 0ab24aa9a..4274931f6 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtension.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtension.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.extensions.languages; +package org.eclipse.gemoc.xdsmlframework.api.extensions.languages; //import java.io.IOException; import java.util.ArrayList; @@ -17,9 +17,9 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; -import org.gemoc.xdsmlframework.api.core.IModelLoader; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -import org.gemoc.xdsmlframework.api.extensions.Extension; +import org.eclipse.gemoc.xdsmlframework.api.core.IModelLoader; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.xdsmlframework.api.extensions.Extension; public class LanguageDefinitionExtension extends Extension { diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtensionPoint.java b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtensionPoint.java similarity index 93% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtensionPoint.java rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtensionPoint.java index a319d7bb9..626a2b9d8 100644 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtensionPoint.java +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.api/src/org/eclipse/gemoc/xdsmlframework/api/extensions/languages/LanguageDefinitionExtensionPoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,9 +8,9 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.api.extensions.languages; +package org.eclipse.gemoc.xdsmlframework.api.extensions.languages; -import org.gemoc.xdsmlframework.api.extensions.ExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.api.extensions.ExtensionPoint; public abstract class LanguageDefinitionExtensionPoint extends ExtensionPoint { diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.checkstyle b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.classpath b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.classpath similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.classpath rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.classpath diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.gitignore b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.gitignore similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.gitignore rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.gitignore diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.project b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.project new file mode 100644 index 000000000..bb553f17e --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.project @@ -0,0 +1,40 @@ + + + org.eclipse.gemoc.xdsmlframework.commons + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.settings/org.eclipse.jdt.core.prefs b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.settings/org.eclipse.jdt.core.prefs rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/META-INF/MANIFEST.MF new file mode 100644 index 000000000..8eb7fa371 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.xdsmlframework.commons +Bundle-SymbolicName: org.eclipse.gemoc.xdsmlframework.commons +Bundle-Version: 2.3.0.qualifier +Require-Bundle: org.eclipse.emf.ecore, + org.eclipse.xtend.lib +Export-Package: org.eclipse.gemoc.xdsmlframework.commons +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/about.html b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/about.html similarity index 100% rename from framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/about.html rename to framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/about.html diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/build.properties b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/build.properties new file mode 100644 index 000000000..1f9c2a761 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/build.properties @@ -0,0 +1,17 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +bin.includes = META-INF/,\ + .,\ + about.html +output.. = bin/ +src.includes = about.html diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/pom.xml b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/pom.xml new file mode 100644 index 000000000..febb80443 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/pom.xml @@ -0,0 +1,59 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.framework.commons + org.gemoc.modeldebugging.framework.commons.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.xdsmlframework.commons + eclipse-plugin + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + diff --git a/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/src/org/eclipse/gemoc/xdsmlframework/commons/DynamicAnnotationHelper.xtend b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/src/org/eclipse/gemoc/xdsmlframework/commons/DynamicAnnotationHelper.xtend new file mode 100644 index 000000000..567e32842 --- /dev/null +++ b/framework/framework_commons/plugins/org.eclipse.gemoc.xdsmlframework.commons/src/org/eclipse/gemoc/xdsmlframework/commons/DynamicAnnotationHelper.xtend @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.commons + +import org.eclipse.emf.ecore.EModelElement +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EAnnotation +import org.eclipse.emf.ecore.EcoreFactory + +class DynamicAnnotationHelper { + public static val DYNAMIC_ANNOTATION_URI = "aspect" + + private static def boolean isDynamic(EModelElement o) { + return o.EAnnotations.exists[a|a.source.equals(DYNAMIC_ANNOTATION_URI)] + } + + public static def boolean isDynamic(EClass c) { + return isDynamic(c as EModelElement) + } + + public static def boolean isDynamic(EStructuralFeature p) { + return isDynamic(p as EModelElement) || isDynamic(p.EContainingClass) + } + + public static def EAnnotation createDynamicAnnotation() { + val EAnnotation dynamicAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); + dynamicAnnotation.setSource(DYNAMIC_ANNOTATION_URI); + return dynamicAnnotation; + } +} diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/.project b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/.project deleted file mode 100644 index df3aef49c..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.executionframework.reflectivetrace.model - - - - - - 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/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/META-INF/MANIFEST.MF deleted file mode 100644 index 7f0ef9a78..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.gemoc.executionframework.reflectivetrace.model;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-ClassPath: . -Bundle-Vendor: INRIA -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace, - org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl, - org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.util -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.ecore.xmi;visibility:=reexport, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0";visibility:=reexport -Bundle-ActivationPolicy: lazy diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/build.properties b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/build.properties deleted file mode 100644 index 8a899917a..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/build.properties +++ /dev/null @@ -1,12 +0,0 @@ -# - -bin.includes = .,\ - model/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties,\ - about.html -jars.compile.order = . -source.. = src/ -output.. = bin/ -src.includes = about.html diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/plugin.properties b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/plugin.properties deleted file mode 100644 index 722a388b1..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/plugin.properties +++ /dev/null @@ -1,4 +0,0 @@ -# - -pluginName = GemocExecutionEngineTrace Model -providerName = www.example.org diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/plugin.xml b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/plugin.xml deleted file mode 100644 index 1bc90924c..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/plugin.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/pom.xml b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/pom.xml deleted file mode 100644 index 052ab25ec..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.framework.commons - org.gemoc.modeldebugging.framework.commons.root - 0.1.0-SNAPSHOT - - - org.gemoc.executionframework.reflectivetrace.model - eclipse-plugin - 0.1.0-SNAPSHOT - \ No newline at end of file diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Branch.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Branch.java deleted file mode 100644 index 7e5a6a641..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Branch.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - */ -package gemoc_execution_trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Branch'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link gemoc_execution_trace.Branch#getStartIndex Start Index}
  • - *
  • {@link gemoc_execution_trace.Branch#getStopIndex Stop Index}
  • - *
  • {@link gemoc_execution_trace.Branch#getChoices Choices}
  • - *
- * - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch() - * @model - * @generated - */ -public interface Branch extends EObject { - /** - * Returns the value of the 'Start Index' attribute. - * - *

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

- * - * @return the value of the 'Start Index' attribute. - * @see #setStartIndex(int) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_StartIndex() - * @model - * @generated - */ - int getStartIndex(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.Branch#getStartIndex Start Index}' attribute. - * - * - * @param value the new value of the 'Start Index' attribute. - * @see #getStartIndex() - * @generated - */ - void setStartIndex(int value); - - /** - * Returns the value of the 'Stop Index' attribute. - * - *

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

- * - * @return the value of the 'Stop Index' attribute. - * @see #setStopIndex(int) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_StopIndex() - * @model - * @generated - */ - int getStopIndex(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.Branch#getStopIndex Stop Index}' attribute. - * - * - * @param value the new value of the 'Stop Index' attribute. - * @see #getStopIndex() - * @generated - */ - void setStopIndex(int value); - - /** - * Returns the value of the 'Choices' reference list. - * The list contents are of type {@link gemoc_execution_trace.Choice}. - * It is bidirectional and its opposite is '{@link gemoc_execution_trace.Choice#getBranch Branch}'. - * - *

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

- * - * @return the value of the 'Choices' reference list. - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_Choices() - * @see gemoc_execution_trace.Choice#getBranch - * @model opposite="branch" - * @generated - */ - EList getChoices(); - -} // Branch diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Choice.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Choice.java deleted file mode 100644 index cde0e1be3..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Choice.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - */ -package gemoc_execution_trace; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.Step; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Choice'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link gemoc_execution_trace.Choice#getNextChoices Next Choices}
  • - *
  • {@link gemoc_execution_trace.Choice#getPossibleLogicalSteps Possible Logical Steps}
  • - *
  • {@link gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}
  • - *
  • {@link gemoc_execution_trace.Choice#getContextState Context State}
  • - *
  • {@link gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}
  • - *
  • {@link gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}
  • - *
  • {@link gemoc_execution_trace.Choice#getBranch Branch}
  • - *
  • {@link gemoc_execution_trace.Choice#getOwnedMSEOccurrences Owned MSE Occurrences}
  • - *
- * - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice() - * @model - * @generated - */ -public interface Choice extends EObject { - /** - * Returns the value of the 'Next Choices' reference list. - * The list contents are of type {@link gemoc_execution_trace.Choice}. - * It is bidirectional and its opposite is '{@link gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}'. - * - *

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

- * - * @return the value of the 'Next Choices' reference list. - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_NextChoices() - * @see gemoc_execution_trace.Choice#getPreviousChoice - * @model opposite="previousChoice" - * @generated - */ - EList getNextChoices(); - - /** - * Returns the value of the 'Possible Logical Steps' containment reference list. - * The list contents are of type {@link fr.inria.diverse.trace.commons.model.trace.Step}. - * - *

- * If the meaning of the 'Possible Logical Steps' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Possible Logical Steps' containment reference list. - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_PossibleLogicalSteps() - * @model containment="true" - * @generated - */ - EList getPossibleLogicalSteps(); - - /** - * Returns the value of the 'Chosen Logical Step' reference. - * - *

- * If the meaning of the 'Chosen Logical Step' reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Chosen Logical Step' reference. - * @see #setChosenLogicalStep(Step) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_ChosenLogicalStep() - * @model - * @generated - */ - Step getChosenLogicalStep(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}' reference. - * - * - * @param value the new value of the 'Chosen Logical Step' reference. - * @see #getChosenLogicalStep() - * @generated - */ - void setChosenLogicalStep(Step value); - - /** - * Returns the value of the 'Context State' containment reference. - * It is bidirectional and its opposite is '{@link gemoc_execution_trace.ContextState#getChoice Choice}'. - * - *

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

- * - * @return the value of the 'Context State' containment reference. - * @see #setContextState(ContextState) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_ContextState() - * @see gemoc_execution_trace.ContextState#getChoice - * @model opposite="choice" containment="true" - * @generated - */ - ContextState getContextState(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.Choice#getContextState Context State}' containment reference. - * - * - * @param value the new value of the 'Context State' containment reference. - * @see #getContextState() - * @generated - */ - void setContextState(ContextState value); - - /** - * Returns the value of the 'Previous Choice' reference. - * It is bidirectional and its opposite is '{@link gemoc_execution_trace.Choice#getNextChoices Next Choices}'. - * - *

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

- * - * @return the value of the 'Previous Choice' reference. - * @see #setPreviousChoice(Choice) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_PreviousChoice() - * @see gemoc_execution_trace.Choice#getNextChoices - * @model opposite="nextChoices" - * @generated - */ - Choice getPreviousChoice(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}' reference. - * - * - * @param value the new value of the 'Previous Choice' reference. - * @see #getPreviousChoice() - * @generated - */ - void setPreviousChoice(Choice value); - - /** - * Returns the value of the 'Selected Next Choice' reference. - * - *

- * If the meaning of the 'Selected Next Choice' reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Selected Next Choice' reference. - * @see #setSelectedNextChoice(Choice) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_SelectedNextChoice() - * @model - * @generated - */ - Choice getSelectedNextChoice(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}' reference. - * - * - * @param value the new value of the 'Selected Next Choice' reference. - * @see #getSelectedNextChoice() - * @generated - */ - void setSelectedNextChoice(Choice value); - - /** - * Returns the value of the 'Branch' reference. - * It is bidirectional and its opposite is '{@link gemoc_execution_trace.Branch#getChoices Choices}'. - * - *

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

- * - * @return the value of the 'Branch' reference. - * @see #setBranch(Branch) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_Branch() - * @see gemoc_execution_trace.Branch#getChoices - * @model opposite="choices" required="true" - * @generated - */ - Branch getBranch(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.Choice#getBranch Branch}' reference. - * - * - * @param value the new value of the 'Branch' reference. - * @see #getBranch() - * @generated - */ - void setBranch(Branch value); - - /** - * Returns the value of the 'Owned MSE Occurrences' containment reference list. - * The list contents are of type {@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence}. - * - *

- * If the meaning of the 'Owned MSE Occurrences' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Owned MSE Occurrences' containment reference list. - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_OwnedMSEOccurrences() - * @model containment="true" - * @generated - */ - EList getOwnedMSEOccurrences(); - -} // Choice diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ContextState.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ContextState.java deleted file mode 100644 index c16ed0923..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ContextState.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - */ -package gemoc_execution_trace; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Context State'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link gemoc_execution_trace.ContextState#getModelState Model State}
  • - *
  • {@link gemoc_execution_trace.ContextState#getSolverState Solver State}
  • - *
  • {@link gemoc_execution_trace.ContextState#getChoice Choice}
  • - *
- * - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState() - * @model - * @generated - */ -public interface ContextState extends EObject { - /** - * Returns the value of the 'Model State' reference. - * It is bidirectional and its opposite is '{@link gemoc_execution_trace.ModelState#getContextState Context State}'. - * - *

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

- * - * @return the value of the 'Model State' reference. - * @see #setModelState(ModelState) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_ModelState() - * @see gemoc_execution_trace.ModelState#getContextState - * @model opposite="contextState" required="true" - * @generated - */ - ModelState getModelState(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.ContextState#getModelState Model State}' reference. - * - * - * @param value the new value of the 'Model State' reference. - * @see #getModelState() - * @generated - */ - void setModelState(ModelState value); - - /** - * Returns the value of the 'Solver State' containment reference. - * - *

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

- * - * @return the value of the 'Solver State' containment reference. - * @see #setSolverState(SolverState) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_SolverState() - * @model containment="true" required="true" - * @generated - */ - SolverState getSolverState(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.ContextState#getSolverState Solver State}' containment reference. - * - * - * @param value the new value of the 'Solver State' containment reference. - * @see #getSolverState() - * @generated - */ - void setSolverState(SolverState value); - - /** - * Returns the value of the 'Choice' container reference. - * It is bidirectional and its opposite is '{@link gemoc_execution_trace.Choice#getContextState Context State}'. - * - *

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

- * - * @return the value of the 'Choice' container reference. - * @see #setChoice(Choice) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_Choice() - * @see gemoc_execution_trace.Choice#getContextState - * @model opposite="contextState" transient="false" - * @generated - */ - Choice getChoice(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.ContextState#getChoice Choice}' container reference. - * - * - * @param value the new value of the 'Choice' container reference. - * @see #getChoice() - * @generated - */ - void setChoice(Choice value); - -} // ContextState diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ExecutionTraceModel.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ExecutionTraceModel.java deleted file mode 100644 index 80134897d..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ExecutionTraceModel.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - */ -package gemoc_execution_trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Execution Trace Model'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link gemoc_execution_trace.ExecutionTraceModel#getChoices Choices}
  • - *
  • {@link gemoc_execution_trace.ExecutionTraceModel#getBranches Branches}
  • - *
  • {@link gemoc_execution_trace.ExecutionTraceModel#getReachedStates Reached States}
  • - *
- * - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel() - * @model - * @generated - */ -public interface ExecutionTraceModel extends EObject { - /** - * Returns the value of the 'Choices' containment reference list. - * The list contents are of type {@link gemoc_execution_trace.Choice}. - * - *

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

- * - * @return the value of the 'Choices' containment reference list. - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_Choices() - * @model containment="true" - * @generated - */ - EList getChoices(); - - /** - * Returns the value of the 'Branches' containment reference list. - * The list contents are of type {@link gemoc_execution_trace.Branch}. - * - *

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

- * - * @return the value of the 'Branches' containment reference list. - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_Branches() - * @model containment="true" - * @generated - */ - EList getBranches(); - - /** - * Returns the value of the 'Reached States' containment reference list. - * The list contents are of type {@link gemoc_execution_trace.ModelState}. - * - *

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

- * - * @return the value of the 'Reached States' containment reference list. - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_ReachedStates() - * @model containment="true" - * @generated - */ - EList getReachedStates(); - -} // ExecutionTraceModel diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Gemoc_execution_traceFactory.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Gemoc_execution_traceFactory.java deleted file mode 100644 index 70c3f3fe1..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Gemoc_execution_traceFactory.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - */ -package gemoc_execution_trace; - -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 gemoc_execution_trace.Gemoc_execution_tracePackage - * @generated - */ -public interface Gemoc_execution_traceFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - Gemoc_execution_traceFactory eINSTANCE = gemoc_execution_trace.impl.Gemoc_execution_traceFactoryImpl.init(); - - /** - * Returns a new object of class 'Choice'. - * - * - * @return a new object of class 'Choice'. - * @generated - */ - Choice createChoice(); - - /** - * Returns a new object of class 'Execution Trace Model'. - * - * - * @return a new object of class 'Execution Trace Model'. - * @generated - */ - ExecutionTraceModel createExecutionTraceModel(); - - /** - * Returns a new object of class 'Solver State'. - * - * - * @return a new object of class 'Solver State'. - * @generated - */ - SolverState createSolverState(); - - /** - * Returns a new object of class 'Model State'. - * - * - * @return a new object of class 'Model State'. - * @generated - */ - ModelState createModelState(); - - /** - * Returns a new object of class 'Context State'. - * - * - * @return a new object of class 'Context State'. - * @generated - */ - ContextState createContextState(); - - /** - * Returns a new object of class 'Branch'. - * - * - * @return a new object of class 'Branch'. - * @generated - */ - Branch createBranch(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - Gemoc_execution_tracePackage getGemoc_execution_tracePackage(); - -} //Gemoc_execution_traceFactory diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Gemoc_execution_tracePackage.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Gemoc_execution_tracePackage.java deleted file mode 100644 index 266b19e24..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/Gemoc_execution_tracePackage.java +++ /dev/null @@ -1,990 +0,0 @@ -/** - */ -package gemoc_execution_trace; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -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 gemoc_execution_trace.Gemoc_execution_traceFactory - * @model kind="package" - * @generated - */ -public interface Gemoc_execution_tracePackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "gemoc_execution_trace"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.inira.fr/gemoc_execution_trace"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "gemoc_execution_trace"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - Gemoc_execution_tracePackage eINSTANCE = gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl.init(); - - /** - * The meta object id for the '{@link gemoc_execution_trace.impl.ChoiceImpl Choice}' class. - * - * - * @see gemoc_execution_trace.impl.ChoiceImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getChoice() - * @generated - */ - int CHOICE = 0; - - /** - * The feature id for the 'Next Choices' reference list. - * - * - * @generated - * @ordered - */ - int CHOICE__NEXT_CHOICES = 0; - - /** - * The feature id for the 'Possible Logical Steps' containment reference list. - * - * - * @generated - * @ordered - */ - int CHOICE__POSSIBLE_LOGICAL_STEPS = 1; - - /** - * The feature id for the 'Chosen Logical Step' reference. - * - * - * @generated - * @ordered - */ - int CHOICE__CHOSEN_LOGICAL_STEP = 2; - - /** - * The feature id for the 'Context State' containment reference. - * - * - * @generated - * @ordered - */ - int CHOICE__CONTEXT_STATE = 3; - - /** - * The feature id for the 'Previous Choice' reference. - * - * - * @generated - * @ordered - */ - int CHOICE__PREVIOUS_CHOICE = 4; - - /** - * The feature id for the 'Selected Next Choice' reference. - * - * - * @generated - * @ordered - */ - int CHOICE__SELECTED_NEXT_CHOICE = 5; - - /** - * The feature id for the 'Branch' reference. - * - * - * @generated - * @ordered - */ - int CHOICE__BRANCH = 6; - - /** - * The feature id for the 'Owned MSE Occurrences' containment reference list. - * - * - * @generated - * @ordered - */ - int CHOICE__OWNED_MSE_OCCURRENCES = 7; - - /** - * The number of structural features of the 'Choice' class. - * - * - * @generated - * @ordered - */ - int CHOICE_FEATURE_COUNT = 8; - - /** - * The number of operations of the 'Choice' class. - * - * - * @generated - * @ordered - */ - int CHOICE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link gemoc_execution_trace.impl.ExecutionTraceModelImpl Execution Trace Model}' class. - * - * - * @see gemoc_execution_trace.impl.ExecutionTraceModelImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getExecutionTraceModel() - * @generated - */ - int EXECUTION_TRACE_MODEL = 1; - - /** - * The feature id for the 'Choices' containment reference list. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL__CHOICES = 0; - - /** - * The feature id for the 'Branches' containment reference list. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL__BRANCHES = 1; - - /** - * The feature id for the 'Reached States' containment reference list. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL__REACHED_STATES = 2; - - /** - * The number of structural features of the 'Execution Trace Model' class. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL_FEATURE_COUNT = 3; - - /** - * The number of operations of the 'Execution Trace Model' class. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link gemoc_execution_trace.impl.SolverStateImpl Solver State}' class. - * - * - * @see gemoc_execution_trace.impl.SolverStateImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getSolverState() - * @generated - */ - int SOLVER_STATE = 2; - - /** - * The feature id for the 'Model' reference. - * - * - * @generated - * @ordered - */ - int SOLVER_STATE__MODEL = 0; - - /** - * The feature id for the 'Serializable Model' attribute. - * - * - * @generated - * @ordered - */ - int SOLVER_STATE__SERIALIZABLE_MODEL = 1; - - /** - * The number of structural features of the 'Solver State' class. - * - * - * @generated - * @ordered - */ - int SOLVER_STATE_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Solver State' class. - * - * - * @generated - * @ordered - */ - int SOLVER_STATE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link gemoc_execution_trace.impl.ModelStateImpl Model State}' class. - * - * - * @see gemoc_execution_trace.impl.ModelStateImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getModelState() - * @generated - */ - int MODEL_STATE = 3; - - /** - * The feature id for the 'Model' reference. - * - * - * @generated - * @ordered - */ - int MODEL_STATE__MODEL = 0; - - /** - * The feature id for the 'Context State' reference list. - * - * - * @generated - * @ordered - */ - int MODEL_STATE__CONTEXT_STATE = 1; - - /** - * The number of structural features of the 'Model State' class. - * - * - * @generated - * @ordered - */ - int MODEL_STATE_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Model State' class. - * - * - * @generated - * @ordered - */ - int MODEL_STATE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link gemoc_execution_trace.impl.ContextStateImpl Context State}' class. - * - * - * @see gemoc_execution_trace.impl.ContextStateImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getContextState() - * @generated - */ - int CONTEXT_STATE = 4; - - /** - * The feature id for the 'Model State' reference. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE__MODEL_STATE = 0; - - /** - * The feature id for the 'Solver State' containment reference. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE__SOLVER_STATE = 1; - - /** - * The feature id for the 'Choice' container reference. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE__CHOICE = 2; - - /** - * The number of structural features of the 'Context State' class. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE_FEATURE_COUNT = 3; - - /** - * The number of operations of the 'Context State' class. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link gemoc_execution_trace.impl.BranchImpl Branch}' class. - * - * - * @see gemoc_execution_trace.impl.BranchImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getBranch() - * @generated - */ - int BRANCH = 5; - - /** - * The feature id for the 'Start Index' attribute. - * - * - * @generated - * @ordered - */ - int BRANCH__START_INDEX = 0; - - /** - * The feature id for the 'Stop Index' attribute. - * - * - * @generated - * @ordered - */ - int BRANCH__STOP_INDEX = 1; - - /** - * The feature id for the 'Choices' reference list. - * - * - * @generated - * @ordered - */ - int BRANCH__CHOICES = 2; - - /** - * The number of structural features of the 'Branch' class. - * - * - * @generated - * @ordered - */ - int BRANCH_FEATURE_COUNT = 3; - - /** - * The number of operations of the 'Branch' class. - * - * - * @generated - * @ordered - */ - int BRANCH_OPERATION_COUNT = 0; - - /** - * The meta object id for the 'ISerializable' data type. - * - * - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getISerializable() - * @generated - */ - int ISERIALIZABLE = 6; - - - /** - * Returns the meta object for class '{@link gemoc_execution_trace.Choice Choice}'. - * - * - * @return the meta object for class 'Choice'. - * @see gemoc_execution_trace.Choice - * @generated - */ - EClass getChoice(); - - /** - * Returns the meta object for the reference list '{@link gemoc_execution_trace.Choice#getNextChoices Next Choices}'. - * - * - * @return the meta object for the reference list 'Next Choices'. - * @see gemoc_execution_trace.Choice#getNextChoices() - * @see #getChoice() - * @generated - */ - EReference getChoice_NextChoices(); - - /** - * Returns the meta object for the containment reference list '{@link gemoc_execution_trace.Choice#getPossibleLogicalSteps Possible Logical Steps}'. - * - * - * @return the meta object for the containment reference list 'Possible Logical Steps'. - * @see gemoc_execution_trace.Choice#getPossibleLogicalSteps() - * @see #getChoice() - * @generated - */ - EReference getChoice_PossibleLogicalSteps(); - - /** - * Returns the meta object for the reference '{@link gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}'. - * - * - * @return the meta object for the reference 'Chosen Logical Step'. - * @see gemoc_execution_trace.Choice#getChosenLogicalStep() - * @see #getChoice() - * @generated - */ - EReference getChoice_ChosenLogicalStep(); - - /** - * Returns the meta object for the containment reference '{@link gemoc_execution_trace.Choice#getContextState Context State}'. - * - * - * @return the meta object for the containment reference 'Context State'. - * @see gemoc_execution_trace.Choice#getContextState() - * @see #getChoice() - * @generated - */ - EReference getChoice_ContextState(); - - /** - * Returns the meta object for the reference '{@link gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}'. - * - * - * @return the meta object for the reference 'Previous Choice'. - * @see gemoc_execution_trace.Choice#getPreviousChoice() - * @see #getChoice() - * @generated - */ - EReference getChoice_PreviousChoice(); - - /** - * Returns the meta object for the reference '{@link gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}'. - * - * - * @return the meta object for the reference 'Selected Next Choice'. - * @see gemoc_execution_trace.Choice#getSelectedNextChoice() - * @see #getChoice() - * @generated - */ - EReference getChoice_SelectedNextChoice(); - - /** - * Returns the meta object for the reference '{@link gemoc_execution_trace.Choice#getBranch Branch}'. - * - * - * @return the meta object for the reference 'Branch'. - * @see gemoc_execution_trace.Choice#getBranch() - * @see #getChoice() - * @generated - */ - EReference getChoice_Branch(); - - /** - * Returns the meta object for the containment reference list '{@link gemoc_execution_trace.Choice#getOwnedMSEOccurrences Owned MSE Occurrences}'. - * - * - * @return the meta object for the containment reference list 'Owned MSE Occurrences'. - * @see gemoc_execution_trace.Choice#getOwnedMSEOccurrences() - * @see #getChoice() - * @generated - */ - EReference getChoice_OwnedMSEOccurrences(); - - /** - * Returns the meta object for class '{@link gemoc_execution_trace.ExecutionTraceModel Execution Trace Model}'. - * - * - * @return the meta object for class 'Execution Trace Model'. - * @see gemoc_execution_trace.ExecutionTraceModel - * @generated - */ - EClass getExecutionTraceModel(); - - /** - * Returns the meta object for the containment reference list '{@link gemoc_execution_trace.ExecutionTraceModel#getChoices Choices}'. - * - * - * @return the meta object for the containment reference list 'Choices'. - * @see gemoc_execution_trace.ExecutionTraceModel#getChoices() - * @see #getExecutionTraceModel() - * @generated - */ - EReference getExecutionTraceModel_Choices(); - - /** - * Returns the meta object for the containment reference list '{@link gemoc_execution_trace.ExecutionTraceModel#getBranches Branches}'. - * - * - * @return the meta object for the containment reference list 'Branches'. - * @see gemoc_execution_trace.ExecutionTraceModel#getBranches() - * @see #getExecutionTraceModel() - * @generated - */ - EReference getExecutionTraceModel_Branches(); - - /** - * Returns the meta object for the containment reference list '{@link gemoc_execution_trace.ExecutionTraceModel#getReachedStates Reached States}'. - * - * - * @return the meta object for the containment reference list 'Reached States'. - * @see gemoc_execution_trace.ExecutionTraceModel#getReachedStates() - * @see #getExecutionTraceModel() - * @generated - */ - EReference getExecutionTraceModel_ReachedStates(); - - /** - * Returns the meta object for class '{@link gemoc_execution_trace.SolverState Solver State}'. - * - * - * @return the meta object for class 'Solver State'. - * @see gemoc_execution_trace.SolverState - * @generated - */ - EClass getSolverState(); - - /** - * Returns the meta object for the reference '{@link gemoc_execution_trace.SolverState#getModel Model}'. - * - * - * @return the meta object for the reference 'Model'. - * @see gemoc_execution_trace.SolverState#getModel() - * @see #getSolverState() - * @generated - */ - EReference getSolverState_Model(); - - /** - * Returns the meta object for the attribute '{@link gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}'. - * - * - * @return the meta object for the attribute 'Serializable Model'. - * @see gemoc_execution_trace.SolverState#getSerializableModel() - * @see #getSolverState() - * @generated - */ - EAttribute getSolverState_SerializableModel(); - - /** - * Returns the meta object for class '{@link gemoc_execution_trace.ModelState Model State}'. - * - * - * @return the meta object for class 'Model State'. - * @see gemoc_execution_trace.ModelState - * @generated - */ - EClass getModelState(); - - /** - * Returns the meta object for the reference '{@link gemoc_execution_trace.ModelState#getModel Model}'. - * - * - * @return the meta object for the reference 'Model'. - * @see gemoc_execution_trace.ModelState#getModel() - * @see #getModelState() - * @generated - */ - EReference getModelState_Model(); - - /** - * Returns the meta object for the reference list '{@link gemoc_execution_trace.ModelState#getContextState Context State}'. - * - * - * @return the meta object for the reference list 'Context State'. - * @see gemoc_execution_trace.ModelState#getContextState() - * @see #getModelState() - * @generated - */ - EReference getModelState_ContextState(); - - /** - * Returns the meta object for class '{@link gemoc_execution_trace.ContextState Context State}'. - * - * - * @return the meta object for class 'Context State'. - * @see gemoc_execution_trace.ContextState - * @generated - */ - EClass getContextState(); - - /** - * Returns the meta object for the reference '{@link gemoc_execution_trace.ContextState#getModelState Model State}'. - * - * - * @return the meta object for the reference 'Model State'. - * @see gemoc_execution_trace.ContextState#getModelState() - * @see #getContextState() - * @generated - */ - EReference getContextState_ModelState(); - - /** - * Returns the meta object for the containment reference '{@link gemoc_execution_trace.ContextState#getSolverState Solver State}'. - * - * - * @return the meta object for the containment reference 'Solver State'. - * @see gemoc_execution_trace.ContextState#getSolverState() - * @see #getContextState() - * @generated - */ - EReference getContextState_SolverState(); - - /** - * Returns the meta object for the container reference '{@link gemoc_execution_trace.ContextState#getChoice Choice}'. - * - * - * @return the meta object for the container reference 'Choice'. - * @see gemoc_execution_trace.ContextState#getChoice() - * @see #getContextState() - * @generated - */ - EReference getContextState_Choice(); - - /** - * Returns the meta object for class '{@link gemoc_execution_trace.Branch Branch}'. - * - * - * @return the meta object for class 'Branch'. - * @see gemoc_execution_trace.Branch - * @generated - */ - EClass getBranch(); - - /** - * Returns the meta object for the attribute '{@link gemoc_execution_trace.Branch#getStartIndex Start Index}'. - * - * - * @return the meta object for the attribute 'Start Index'. - * @see gemoc_execution_trace.Branch#getStartIndex() - * @see #getBranch() - * @generated - */ - EAttribute getBranch_StartIndex(); - - /** - * Returns the meta object for the attribute '{@link gemoc_execution_trace.Branch#getStopIndex Stop Index}'. - * - * - * @return the meta object for the attribute 'Stop Index'. - * @see gemoc_execution_trace.Branch#getStopIndex() - * @see #getBranch() - * @generated - */ - EAttribute getBranch_StopIndex(); - - /** - * Returns the meta object for the reference list '{@link gemoc_execution_trace.Branch#getChoices Choices}'. - * - * - * @return the meta object for the reference list 'Choices'. - * @see gemoc_execution_trace.Branch#getChoices() - * @see #getBranch() - * @generated - */ - EReference getBranch_Choices(); - - /** - * Returns the meta object for data type 'ISerializable'. - * - * - * @return the meta object for data type 'ISerializable'. - * @model instanceClass="byte[]" - * @generated - */ - EDataType getISerializable(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - Gemoc_execution_traceFactory getGemoc_execution_traceFactory(); - - /** - * - * 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 gemoc_execution_trace.impl.ChoiceImpl Choice}' class. - * - * - * @see gemoc_execution_trace.impl.ChoiceImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getChoice() - * @generated - */ - EClass CHOICE = eINSTANCE.getChoice(); - - /** - * The meta object literal for the 'Next Choices' reference list feature. - * - * - * @generated - */ - EReference CHOICE__NEXT_CHOICES = eINSTANCE.getChoice_NextChoices(); - - /** - * The meta object literal for the 'Possible Logical Steps' containment reference list feature. - * - * - * @generated - */ - EReference CHOICE__POSSIBLE_LOGICAL_STEPS = eINSTANCE.getChoice_PossibleLogicalSteps(); - - /** - * The meta object literal for the 'Chosen Logical Step' reference feature. - * - * - * @generated - */ - EReference CHOICE__CHOSEN_LOGICAL_STEP = eINSTANCE.getChoice_ChosenLogicalStep(); - - /** - * The meta object literal for the 'Context State' containment reference feature. - * - * - * @generated - */ - EReference CHOICE__CONTEXT_STATE = eINSTANCE.getChoice_ContextState(); - - /** - * The meta object literal for the 'Previous Choice' reference feature. - * - * - * @generated - */ - EReference CHOICE__PREVIOUS_CHOICE = eINSTANCE.getChoice_PreviousChoice(); - - /** - * The meta object literal for the 'Selected Next Choice' reference feature. - * - * - * @generated - */ - EReference CHOICE__SELECTED_NEXT_CHOICE = eINSTANCE.getChoice_SelectedNextChoice(); - - /** - * The meta object literal for the 'Branch' reference feature. - * - * - * @generated - */ - EReference CHOICE__BRANCH = eINSTANCE.getChoice_Branch(); - - /** - * The meta object literal for the 'Owned MSE Occurrences' containment reference list feature. - * - * - * @generated - */ - EReference CHOICE__OWNED_MSE_OCCURRENCES = eINSTANCE.getChoice_OwnedMSEOccurrences(); - - /** - * The meta object literal for the '{@link gemoc_execution_trace.impl.ExecutionTraceModelImpl Execution Trace Model}' class. - * - * - * @see gemoc_execution_trace.impl.ExecutionTraceModelImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getExecutionTraceModel() - * @generated - */ - EClass EXECUTION_TRACE_MODEL = eINSTANCE.getExecutionTraceModel(); - - /** - * The meta object literal for the 'Choices' containment reference list feature. - * - * - * @generated - */ - EReference EXECUTION_TRACE_MODEL__CHOICES = eINSTANCE.getExecutionTraceModel_Choices(); - - /** - * The meta object literal for the 'Branches' containment reference list feature. - * - * - * @generated - */ - EReference EXECUTION_TRACE_MODEL__BRANCHES = eINSTANCE.getExecutionTraceModel_Branches(); - - /** - * The meta object literal for the 'Reached States' containment reference list feature. - * - * - * @generated - */ - EReference EXECUTION_TRACE_MODEL__REACHED_STATES = eINSTANCE.getExecutionTraceModel_ReachedStates(); - - /** - * The meta object literal for the '{@link gemoc_execution_trace.impl.SolverStateImpl Solver State}' class. - * - * - * @see gemoc_execution_trace.impl.SolverStateImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getSolverState() - * @generated - */ - EClass SOLVER_STATE = eINSTANCE.getSolverState(); - - /** - * The meta object literal for the 'Model' reference feature. - * - * - * @generated - */ - EReference SOLVER_STATE__MODEL = eINSTANCE.getSolverState_Model(); - - /** - * The meta object literal for the 'Serializable Model' attribute feature. - * - * - * @generated - */ - EAttribute SOLVER_STATE__SERIALIZABLE_MODEL = eINSTANCE.getSolverState_SerializableModel(); - - /** - * The meta object literal for the '{@link gemoc_execution_trace.impl.ModelStateImpl Model State}' class. - * - * - * @see gemoc_execution_trace.impl.ModelStateImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getModelState() - * @generated - */ - EClass MODEL_STATE = eINSTANCE.getModelState(); - - /** - * The meta object literal for the 'Model' reference feature. - * - * - * @generated - */ - EReference MODEL_STATE__MODEL = eINSTANCE.getModelState_Model(); - - /** - * The meta object literal for the 'Context State' reference list feature. - * - * - * @generated - */ - EReference MODEL_STATE__CONTEXT_STATE = eINSTANCE.getModelState_ContextState(); - - /** - * The meta object literal for the '{@link gemoc_execution_trace.impl.ContextStateImpl Context State}' class. - * - * - * @see gemoc_execution_trace.impl.ContextStateImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getContextState() - * @generated - */ - EClass CONTEXT_STATE = eINSTANCE.getContextState(); - - /** - * The meta object literal for the 'Model State' reference feature. - * - * - * @generated - */ - EReference CONTEXT_STATE__MODEL_STATE = eINSTANCE.getContextState_ModelState(); - - /** - * The meta object literal for the 'Solver State' containment reference feature. - * - * - * @generated - */ - EReference CONTEXT_STATE__SOLVER_STATE = eINSTANCE.getContextState_SolverState(); - - /** - * The meta object literal for the 'Choice' container reference feature. - * - * - * @generated - */ - EReference CONTEXT_STATE__CHOICE = eINSTANCE.getContextState_Choice(); - - /** - * The meta object literal for the '{@link gemoc_execution_trace.impl.BranchImpl Branch}' class. - * - * - * @see gemoc_execution_trace.impl.BranchImpl - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getBranch() - * @generated - */ - EClass BRANCH = eINSTANCE.getBranch(); - - /** - * The meta object literal for the 'Start Index' attribute feature. - * - * - * @generated - */ - EAttribute BRANCH__START_INDEX = eINSTANCE.getBranch_StartIndex(); - - /** - * The meta object literal for the 'Stop Index' attribute feature. - * - * - * @generated - */ - EAttribute BRANCH__STOP_INDEX = eINSTANCE.getBranch_StopIndex(); - - /** - * The meta object literal for the 'Choices' reference list feature. - * - * - * @generated - */ - EReference BRANCH__CHOICES = eINSTANCE.getBranch_Choices(); - - /** - * The meta object literal for the 'ISerializable' data type. - * - * - * @see gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getISerializable() - * @generated - */ - EDataType ISERIALIZABLE = eINSTANCE.getISerializable(); - - } - -} //Gemoc_execution_tracePackage diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ModelState.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ModelState.java deleted file mode 100644 index bc3ea11ed..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/ModelState.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - */ -package gemoc_execution_trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Model State'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link gemoc_execution_trace.ModelState#getModel Model}
  • - *
  • {@link gemoc_execution_trace.ModelState#getContextState Context State}
  • - *
- * - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState() - * @model - * @generated - */ -public interface ModelState extends EObject { - /** - * Returns the value of the 'Model' reference. - * - *

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

- * - * @return the value of the 'Model' reference. - * @see #setModel(EObject) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState_Model() - * @model required="true" - * @generated - */ - EObject getModel(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.ModelState#getModel Model}' reference. - * - * - * @param value the new value of the 'Model' reference. - * @see #getModel() - * @generated - */ - void setModel(EObject value); - - /** - * Returns the value of the 'Context State' reference list. - * The list contents are of type {@link gemoc_execution_trace.ContextState}. - * It is bidirectional and its opposite is '{@link gemoc_execution_trace.ContextState#getModelState Model State}'. - * - *

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

- * - * @return the value of the 'Context State' reference list. - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState_ContextState() - * @see gemoc_execution_trace.ContextState#getModelState - * @model opposite="modelState" - * @generated - */ - EList getContextState(); - -} // ModelState diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/SolverState.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/SolverState.java deleted file mode 100644 index e9599f494..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/SolverState.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - */ -package gemoc_execution_trace; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Solver State'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link gemoc_execution_trace.SolverState#getModel Model}
  • - *
  • {@link gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}
  • - *
- * - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState() - * @model - * @generated - */ -public interface SolverState extends EObject { - /** - * Returns the value of the 'Model' reference. - * - *

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

- * - * @return the value of the 'Model' reference. - * @see #setModel(EObject) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState_Model() - * @model required="true" - * @generated - */ - EObject getModel(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.SolverState#getModel Model}' reference. - * - * - * @param value the new value of the 'Model' reference. - * @see #getModel() - * @generated - */ - void setModel(EObject value); - - /** - * Returns the value of the 'Serializable Model' attribute. - * - *

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

- * - * @return the value of the 'Serializable Model' attribute. - * @see #setSerializableModel(byte[]) - * @see gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState_SerializableModel() - * @model dataType="gemoc_execution_trace.ISerializable" - * @generated - */ - byte[] getSerializableModel(); - - /** - * Sets the value of the '{@link gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}' attribute. - * - * - * @param value the new value of the 'Serializable Model' attribute. - * @see #getSerializableModel() - * @generated - */ - void setSerializableModel(byte[] value); - -} // SolverState diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/BranchImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/BranchImpl.java deleted file mode 100644 index 355cd5154..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/BranchImpl.java +++ /dev/null @@ -1,291 +0,0 @@ -/** - */ -package gemoc_execution_trace.impl; - -import gemoc_execution_trace.Branch; -import gemoc_execution_trace.Choice; -import gemoc_execution_trace.Gemoc_execution_tracePackage; - -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; - -/** - * - * An implementation of the model object 'Branch'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link gemoc_execution_trace.impl.BranchImpl#getStartIndex Start Index}
  • - *
  • {@link gemoc_execution_trace.impl.BranchImpl#getStopIndex Stop Index}
  • - *
  • {@link gemoc_execution_trace.impl.BranchImpl#getChoices Choices}
  • - *
- * - * @generated - */ -public class BranchImpl extends MinimalEObjectImpl.Container implements Branch { - /** - * The default value of the '{@link #getStartIndex() Start Index}' attribute. - * - * - * @see #getStartIndex() - * @generated - * @ordered - */ - protected static final int START_INDEX_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getStartIndex() Start Index}' attribute. - * - * - * @see #getStartIndex() - * @generated - * @ordered - */ - protected int startIndex = START_INDEX_EDEFAULT; - - /** - * The default value of the '{@link #getStopIndex() Stop Index}' attribute. - * - * - * @see #getStopIndex() - * @generated - * @ordered - */ - protected static final int STOP_INDEX_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getStopIndex() Stop Index}' attribute. - * - * - * @see #getStopIndex() - * @generated - * @ordered - */ - protected int stopIndex = STOP_INDEX_EDEFAULT; - - /** - * The cached value of the '{@link #getChoices() Choices}' reference list. - * - * - * @see #getChoices() - * @generated - * @ordered - */ - protected EList choices; - - /** - * - * - * @generated - */ - protected BranchImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.BRANCH; - } - - /** - * - * - * @generated - */ - public int getStartIndex() { - return startIndex; - } - - /** - * - * - * @generated - */ - public void setStartIndex(int newStartIndex) { - int oldStartIndex = startIndex; - startIndex = newStartIndex; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.BRANCH__START_INDEX, oldStartIndex, startIndex)); - } - - /** - * - * - * @generated - */ - public int getStopIndex() { - return stopIndex; - } - - /** - * - * - * @generated - */ - public void setStopIndex(int newStopIndex) { - int oldStopIndex = stopIndex; - stopIndex = newStopIndex; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.BRANCH__STOP_INDEX, oldStopIndex, stopIndex)); - } - - /** - * - * - * @generated - */ - public EList getChoices() { - if (choices == null) { - choices = new EObjectWithInverseResolvingEList(Choice.class, this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Gemoc_execution_tracePackage.CHOICE__BRANCH); - } - return choices; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - return ((InternalEList)(InternalEList)getChoices()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - return ((InternalEList)getChoices()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__START_INDEX: - return getStartIndex(); - case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: - return getStopIndex(); - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - return getChoices(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__START_INDEX: - setStartIndex((Integer)newValue); - return; - case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: - setStopIndex((Integer)newValue); - return; - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - getChoices().clear(); - getChoices().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__START_INDEX: - setStartIndex(START_INDEX_EDEFAULT); - return; - case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: - setStopIndex(STOP_INDEX_EDEFAULT); - return; - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - getChoices().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__START_INDEX: - return startIndex != START_INDEX_EDEFAULT; - case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: - return stopIndex != STOP_INDEX_EDEFAULT; - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - return choices != null && !choices.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (startIndex: "); - result.append(startIndex); - result.append(", stopIndex: "); - result.append(stopIndex); - result.append(')'); - return result.toString(); - } - -} //BranchImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ChoiceImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ChoiceImpl.java deleted file mode 100644 index 52f81f84c..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ChoiceImpl.java +++ /dev/null @@ -1,612 +0,0 @@ -/** - */ -package gemoc_execution_trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.Step; - -import gemoc_execution_trace.Branch; -import gemoc_execution_trace.Choice; -import gemoc_execution_trace.ContextState; -import gemoc_execution_trace.Gemoc_execution_tracePackage; - -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.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Choice'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link gemoc_execution_trace.impl.ChoiceImpl#getNextChoices Next Choices}
  • - *
  • {@link gemoc_execution_trace.impl.ChoiceImpl#getPossibleLogicalSteps Possible Logical Steps}
  • - *
  • {@link gemoc_execution_trace.impl.ChoiceImpl#getChosenLogicalStep Chosen Logical Step}
  • - *
  • {@link gemoc_execution_trace.impl.ChoiceImpl#getContextState Context State}
  • - *
  • {@link gemoc_execution_trace.impl.ChoiceImpl#getPreviousChoice Previous Choice}
  • - *
  • {@link gemoc_execution_trace.impl.ChoiceImpl#getSelectedNextChoice Selected Next Choice}
  • - *
  • {@link gemoc_execution_trace.impl.ChoiceImpl#getBranch Branch}
  • - *
  • {@link gemoc_execution_trace.impl.ChoiceImpl#getOwnedMSEOccurrences Owned MSE Occurrences}
  • - *
- * - * @generated - */ -public class ChoiceImpl extends MinimalEObjectImpl.Container implements Choice { - /** - * The cached value of the '{@link #getNextChoices() Next Choices}' reference list. - * - * - * @see #getNextChoices() - * @generated - * @ordered - */ - protected EList nextChoices; - - /** - * The cached value of the '{@link #getPossibleLogicalSteps() Possible Logical Steps}' containment reference list. - * - * - * @see #getPossibleLogicalSteps() - * @generated - * @ordered - */ - protected EList possibleLogicalSteps; - - /** - * The cached value of the '{@link #getChosenLogicalStep() Chosen Logical Step}' reference. - * - * - * @see #getChosenLogicalStep() - * @generated - * @ordered - */ - protected Step chosenLogicalStep; - - /** - * The cached value of the '{@link #getContextState() Context State}' containment reference. - * - * - * @see #getContextState() - * @generated - * @ordered - */ - protected ContextState contextState; - - /** - * The cached value of the '{@link #getPreviousChoice() Previous Choice}' reference. - * - * - * @see #getPreviousChoice() - * @generated - * @ordered - */ - protected Choice previousChoice; - - /** - * The cached value of the '{@link #getSelectedNextChoice() Selected Next Choice}' reference. - * - * - * @see #getSelectedNextChoice() - * @generated - * @ordered - */ - protected Choice selectedNextChoice; - - /** - * The cached value of the '{@link #getBranch() Branch}' reference. - * - * - * @see #getBranch() - * @generated - * @ordered - */ - protected Branch branch; - - /** - * The cached value of the '{@link #getOwnedMSEOccurrences() Owned MSE Occurrences}' containment reference list. - * - * - * @see #getOwnedMSEOccurrences() - * @generated - * @ordered - */ - protected EList ownedMSEOccurrences; - - /** - * - * - * @generated - */ - protected ChoiceImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.CHOICE; - } - - /** - * - * - * @generated - */ - public EList getNextChoices() { - if (nextChoices == null) { - nextChoices = new EObjectWithInverseResolvingEList(Choice.class, this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE); - } - return nextChoices; - } - - /** - * - * - * @generated - */ - public EList getPossibleLogicalSteps() { - if (possibleLogicalSteps == null) { - possibleLogicalSteps = new EObjectContainmentEList(Step.class, this, Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS); - } - return possibleLogicalSteps; - } - - /** - * - * - * @generated - */ - public Step getChosenLogicalStep() { - if (chosenLogicalStep != null && chosenLogicalStep.eIsProxy()) { - InternalEObject oldChosenLogicalStep = (InternalEObject)chosenLogicalStep; - chosenLogicalStep = (Step)eResolveProxy(oldChosenLogicalStep); - if (chosenLogicalStep != oldChosenLogicalStep) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP, oldChosenLogicalStep, chosenLogicalStep)); - } - } - return chosenLogicalStep; - } - - /** - * - * - * @generated - */ - public Step basicGetChosenLogicalStep() { - return chosenLogicalStep; - } - - /** - * - * - * @generated - */ - public void setChosenLogicalStep(Step newChosenLogicalStep) { - Step oldChosenLogicalStep = chosenLogicalStep; - chosenLogicalStep = newChosenLogicalStep; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP, oldChosenLogicalStep, chosenLogicalStep)); - } - - /** - * - * - * @generated - */ - public ContextState getContextState() { - return contextState; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetContextState(ContextState newContextState, NotificationChain msgs) { - ContextState oldContextState = contextState; - contextState = newContextState; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, oldContextState, newContextState); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setContextState(ContextState newContextState) { - if (newContextState != contextState) { - NotificationChain msgs = null; - if (contextState != null) - msgs = ((InternalEObject)contextState).eInverseRemove(this, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, ContextState.class, msgs); - if (newContextState != null) - msgs = ((InternalEObject)newContextState).eInverseAdd(this, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, ContextState.class, msgs); - msgs = basicSetContextState(newContextState, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, newContextState, newContextState)); - } - - /** - * - * - * @generated - */ - public Choice getPreviousChoice() { - if (previousChoice != null && previousChoice.eIsProxy()) { - InternalEObject oldPreviousChoice = (InternalEObject)previousChoice; - previousChoice = (Choice)eResolveProxy(oldPreviousChoice); - if (previousChoice != oldPreviousChoice) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, oldPreviousChoice, previousChoice)); - } - } - return previousChoice; - } - - /** - * - * - * @generated - */ - public Choice basicGetPreviousChoice() { - return previousChoice; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetPreviousChoice(Choice newPreviousChoice, NotificationChain msgs) { - Choice oldPreviousChoice = previousChoice; - previousChoice = newPreviousChoice; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, oldPreviousChoice, newPreviousChoice); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setPreviousChoice(Choice newPreviousChoice) { - if (newPreviousChoice != previousChoice) { - NotificationChain msgs = null; - if (previousChoice != null) - msgs = ((InternalEObject)previousChoice).eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); - if (newPreviousChoice != null) - msgs = ((InternalEObject)newPreviousChoice).eInverseAdd(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); - msgs = basicSetPreviousChoice(newPreviousChoice, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, newPreviousChoice, newPreviousChoice)); - } - - /** - * - * - * @generated - */ - public Choice getSelectedNextChoice() { - if (selectedNextChoice != null && selectedNextChoice.eIsProxy()) { - InternalEObject oldSelectedNextChoice = (InternalEObject)selectedNextChoice; - selectedNextChoice = (Choice)eResolveProxy(oldSelectedNextChoice); - if (selectedNextChoice != oldSelectedNextChoice) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE, oldSelectedNextChoice, selectedNextChoice)); - } - } - return selectedNextChoice; - } - - /** - * - * - * @generated - */ - public Choice basicGetSelectedNextChoice() { - return selectedNextChoice; - } - - /** - * - * - * @generated - */ - public void setSelectedNextChoice(Choice newSelectedNextChoice) { - Choice oldSelectedNextChoice = selectedNextChoice; - selectedNextChoice = newSelectedNextChoice; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE, oldSelectedNextChoice, selectedNextChoice)); - } - - /** - * - * - * @generated - */ - public Branch getBranch() { - if (branch != null && branch.eIsProxy()) { - InternalEObject oldBranch = (InternalEObject)branch; - branch = (Branch)eResolveProxy(oldBranch); - if (branch != oldBranch) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__BRANCH, oldBranch, branch)); - } - } - return branch; - } - - /** - * - * - * @generated - */ - public Branch basicGetBranch() { - return branch; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetBranch(Branch newBranch, NotificationChain msgs) { - Branch oldBranch = branch; - branch = newBranch; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__BRANCH, oldBranch, newBranch); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setBranch(Branch newBranch) { - if (newBranch != branch) { - NotificationChain msgs = null; - if (branch != null) - msgs = ((InternalEObject)branch).eInverseRemove(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); - if (newBranch != null) - msgs = ((InternalEObject)newBranch).eInverseAdd(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); - msgs = basicSetBranch(newBranch, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__BRANCH, newBranch, newBranch)); - } - - /** - * - * - * @generated - */ - public EList getOwnedMSEOccurrences() { - if (ownedMSEOccurrences == null) { - ownedMSEOccurrences = new EObjectContainmentEList(MSEOccurrence.class, this, Gemoc_execution_tracePackage.CHOICE__OWNED_MSE_OCCURRENCES); - } - return ownedMSEOccurrences; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - return ((InternalEList)(InternalEList)getNextChoices()).basicAdd(otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - if (contextState != null) - msgs = ((InternalEObject)contextState).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, null, msgs); - return basicSetContextState((ContextState)otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - if (previousChoice != null) - msgs = ((InternalEObject)previousChoice).eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); - return basicSetPreviousChoice((Choice)otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - if (branch != null) - msgs = ((InternalEObject)branch).eInverseRemove(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); - return basicSetBranch((Branch)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - return ((InternalEList)getNextChoices()).basicRemove(otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - return ((InternalEList)getPossibleLogicalSteps()).basicRemove(otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - return basicSetContextState(null, msgs); - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - return basicSetPreviousChoice(null, msgs); - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - return basicSetBranch(null, msgs); - case Gemoc_execution_tracePackage.CHOICE__OWNED_MSE_OCCURRENCES: - return ((InternalEList)getOwnedMSEOccurrences()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - return getNextChoices(); - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - return getPossibleLogicalSteps(); - case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: - if (resolve) return getChosenLogicalStep(); - return basicGetChosenLogicalStep(); - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - return getContextState(); - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - if (resolve) return getPreviousChoice(); - return basicGetPreviousChoice(); - case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: - if (resolve) return getSelectedNextChoice(); - return basicGetSelectedNextChoice(); - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - if (resolve) return getBranch(); - return basicGetBranch(); - case Gemoc_execution_tracePackage.CHOICE__OWNED_MSE_OCCURRENCES: - return getOwnedMSEOccurrences(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - getNextChoices().clear(); - getNextChoices().addAll((Collection)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - getPossibleLogicalSteps().clear(); - getPossibleLogicalSteps().addAll((Collection)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: - setChosenLogicalStep((Step)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - setContextState((ContextState)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - setPreviousChoice((Choice)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: - setSelectedNextChoice((Choice)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - setBranch((Branch)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__OWNED_MSE_OCCURRENCES: - getOwnedMSEOccurrences().clear(); - getOwnedMSEOccurrences().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - getNextChoices().clear(); - return; - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - getPossibleLogicalSteps().clear(); - return; - case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: - setChosenLogicalStep((Step)null); - return; - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - setContextState((ContextState)null); - return; - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - setPreviousChoice((Choice)null); - return; - case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: - setSelectedNextChoice((Choice)null); - return; - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - setBranch((Branch)null); - return; - case Gemoc_execution_tracePackage.CHOICE__OWNED_MSE_OCCURRENCES: - getOwnedMSEOccurrences().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - return nextChoices != null && !nextChoices.isEmpty(); - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - return possibleLogicalSteps != null && !possibleLogicalSteps.isEmpty(); - case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: - return chosenLogicalStep != null; - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - return contextState != null; - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - return previousChoice != null; - case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: - return selectedNextChoice != null; - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - return branch != null; - case Gemoc_execution_tracePackage.CHOICE__OWNED_MSE_OCCURRENCES: - return ownedMSEOccurrences != null && !ownedMSEOccurrences.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ChoiceImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ContextStateImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ContextStateImpl.java deleted file mode 100644 index ce609b600..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ContextStateImpl.java +++ /dev/null @@ -1,352 +0,0 @@ -/** - */ -package gemoc_execution_trace.impl; - -import gemoc_execution_trace.Choice; -import gemoc_execution_trace.ContextState; -import gemoc_execution_trace.Gemoc_execution_tracePackage; -import gemoc_execution_trace.ModelState; -import gemoc_execution_trace.SolverState; - -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.emf.ecore.util.EcoreUtil; - -/** - * - * An implementation of the model object 'Context State'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link gemoc_execution_trace.impl.ContextStateImpl#getModelState Model State}
  • - *
  • {@link gemoc_execution_trace.impl.ContextStateImpl#getSolverState Solver State}
  • - *
  • {@link gemoc_execution_trace.impl.ContextStateImpl#getChoice Choice}
  • - *
- * - * @generated - */ -public class ContextStateImpl extends MinimalEObjectImpl.Container implements ContextState { - /** - * The cached value of the '{@link #getModelState() Model State}' reference. - * - * - * @see #getModelState() - * @generated - * @ordered - */ - protected ModelState modelState; - - /** - * The cached value of the '{@link #getSolverState() Solver State}' containment reference. - * - * - * @see #getSolverState() - * @generated - * @ordered - */ - protected SolverState solverState; - - /** - * - * - * @generated - */ - protected ContextStateImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.CONTEXT_STATE; - } - - /** - * - * - * @generated - */ - public ModelState getModelState() { - if (modelState != null && modelState.eIsProxy()) { - InternalEObject oldModelState = (InternalEObject)modelState; - modelState = (ModelState)eResolveProxy(oldModelState); - if (modelState != oldModelState) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, oldModelState, modelState)); - } - } - return modelState; - } - - /** - * - * - * @generated - */ - public ModelState basicGetModelState() { - return modelState; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetModelState(ModelState newModelState, NotificationChain msgs) { - ModelState oldModelState = modelState; - modelState = newModelState; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, oldModelState, newModelState); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setModelState(ModelState newModelState) { - if (newModelState != modelState) { - NotificationChain msgs = null; - if (modelState != null) - msgs = ((InternalEObject)modelState).eInverseRemove(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); - if (newModelState != null) - msgs = ((InternalEObject)newModelState).eInverseAdd(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); - msgs = basicSetModelState(newModelState, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, newModelState, newModelState)); - } - - /** - * - * - * @generated - */ - public SolverState getSolverState() { - return solverState; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSolverState(SolverState newSolverState, NotificationChain msgs) { - SolverState oldSolverState = solverState; - solverState = newSolverState; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, oldSolverState, newSolverState); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setSolverState(SolverState newSolverState) { - if (newSolverState != solverState) { - NotificationChain msgs = null; - if (solverState != null) - msgs = ((InternalEObject)solverState).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, null, msgs); - if (newSolverState != null) - msgs = ((InternalEObject)newSolverState).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, null, msgs); - msgs = basicSetSolverState(newSolverState, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, newSolverState, newSolverState)); - } - - /** - * - * - * @generated - */ - public Choice getChoice() { - if (eContainerFeatureID() != Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE) return null; - return (Choice)eInternalContainer(); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetChoice(Choice newChoice, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newChoice, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, msgs); - return msgs; - } - - /** - * - * - * @generated - */ - public void setChoice(Choice newChoice) { - if (newChoice != eInternalContainer() || (eContainerFeatureID() != Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE && newChoice != null)) { - if (EcoreUtil.isAncestor(this, newChoice)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newChoice != null) - msgs = ((InternalEObject)newChoice).eInverseAdd(this, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, Choice.class, msgs); - msgs = basicSetChoice(newChoice, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, newChoice, newChoice)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - if (modelState != null) - msgs = ((InternalEObject)modelState).eInverseRemove(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); - return basicSetModelState((ModelState)otherEnd, msgs); - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetChoice((Choice)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - return basicSetModelState(null, msgs); - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - return basicSetSolverState(null, msgs); - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - return basicSetChoice(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID()) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - return eInternalContainer().eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, Choice.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - if (resolve) return getModelState(); - return basicGetModelState(); - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - return getSolverState(); - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - return getChoice(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - setModelState((ModelState)newValue); - return; - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - setSolverState((SolverState)newValue); - return; - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - setChoice((Choice)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - setModelState((ModelState)null); - return; - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - setSolverState((SolverState)null); - return; - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - setChoice((Choice)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - return modelState != null; - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - return solverState != null; - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - return getChoice() != null; - } - return super.eIsSet(featureID); - } - -} //ContextStateImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java deleted file mode 100644 index a6a935835..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - */ -package gemoc_execution_trace.impl; - -import gemoc_execution_trace.Branch; -import gemoc_execution_trace.Choice; -import gemoc_execution_trace.ExecutionTraceModel; -import gemoc_execution_trace.Gemoc_execution_tracePackage; -import gemoc_execution_trace.ModelState; - -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; - -/** - * - * An implementation of the model object 'Execution Trace Model'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link gemoc_execution_trace.impl.ExecutionTraceModelImpl#getChoices Choices}
  • - *
  • {@link gemoc_execution_trace.impl.ExecutionTraceModelImpl#getBranches Branches}
  • - *
  • {@link gemoc_execution_trace.impl.ExecutionTraceModelImpl#getReachedStates Reached States}
  • - *
- * - * @generated - */ -public class ExecutionTraceModelImpl extends MinimalEObjectImpl.Container implements ExecutionTraceModel { - /** - * The cached value of the '{@link #getChoices() Choices}' containment reference list. - * - * - * @see #getChoices() - * @generated - * @ordered - */ - protected EList choices; - - /** - * The cached value of the '{@link #getBranches() Branches}' containment reference list. - * - * - * @see #getBranches() - * @generated - * @ordered - */ - protected EList branches; - - /** - * The cached value of the '{@link #getReachedStates() Reached States}' containment reference list. - * - * - * @see #getReachedStates() - * @generated - * @ordered - */ - protected EList reachedStates; - - /** - * - * - * @generated - */ - protected ExecutionTraceModelImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.EXECUTION_TRACE_MODEL; - } - - /** - * - * - * @generated - */ - public EList getChoices() { - if (choices == null) { - choices = new EObjectContainmentEList(Choice.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES); - } - return choices; - } - - /** - * - * - * @generated - */ - public EList getBranches() { - if (branches == null) { - branches = new EObjectContainmentEList(Branch.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES); - } - return branches; - } - - /** - * - * - * @generated - */ - public EList getReachedStates() { - if (reachedStates == null) { - reachedStates = new EObjectContainmentEList(ModelState.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES); - } - return reachedStates; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - return ((InternalEList)getChoices()).basicRemove(otherEnd, msgs); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - return ((InternalEList)getBranches()).basicRemove(otherEnd, msgs); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - return ((InternalEList)getReachedStates()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - return getChoices(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - return getBranches(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - return getReachedStates(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - getChoices().clear(); - getChoices().addAll((Collection)newValue); - return; - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - getBranches().clear(); - getBranches().addAll((Collection)newValue); - return; - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - getReachedStates().clear(); - getReachedStates().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - getChoices().clear(); - return; - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - getBranches().clear(); - return; - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - getReachedStates().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - return choices != null && !choices.isEmpty(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - return branches != null && !branches.isEmpty(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - return reachedStates != null && !reachedStates.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ExecutionTraceModelImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java deleted file mode 100644 index 0b4ec5adf..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - */ -package gemoc_execution_trace.impl; - -import gemoc_execution_trace.*; - -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; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class Gemoc_execution_traceFactoryImpl extends EFactoryImpl implements Gemoc_execution_traceFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static Gemoc_execution_traceFactory init() { - try { - Gemoc_execution_traceFactory theGemoc_execution_traceFactory = (Gemoc_execution_traceFactory)EPackage.Registry.INSTANCE.getEFactory(Gemoc_execution_tracePackage.eNS_URI); - if (theGemoc_execution_traceFactory != null) { - return theGemoc_execution_traceFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new Gemoc_execution_traceFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public Gemoc_execution_traceFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case Gemoc_execution_tracePackage.CHOICE: return createChoice(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL: return createExecutionTraceModel(); - case Gemoc_execution_tracePackage.SOLVER_STATE: return createSolverState(); - case Gemoc_execution_tracePackage.MODEL_STATE: return createModelState(); - case Gemoc_execution_tracePackage.CONTEXT_STATE: return createContextState(); - case Gemoc_execution_tracePackage.BRANCH: return createBranch(); - 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 Gemoc_execution_tracePackage.ISERIALIZABLE: - return createISerializableFromString(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 Gemoc_execution_tracePackage.ISERIALIZABLE: - return convertISerializableToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Choice createChoice() { - ChoiceImpl choice = new ChoiceImpl(); - return choice; - } - - /** - * - * - * @generated - */ - public ExecutionTraceModel createExecutionTraceModel() { - ExecutionTraceModelImpl executionTraceModel = new ExecutionTraceModelImpl(); - return executionTraceModel; - } - - /** - * - * - * @generated - */ - public SolverState createSolverState() { - SolverStateImpl solverState = new SolverStateImpl(); - return solverState; - } - - /** - * - * - * @generated - */ - public ModelState createModelState() { - ModelStateImpl modelState = new ModelStateImpl(); - return modelState; - } - - /** - * - * - * @generated - */ - public ContextState createContextState() { - ContextStateImpl contextState = new ContextStateImpl(); - return contextState; - } - - /** - * - * - * @generated - */ - public Branch createBranch() { - BranchImpl branch = new BranchImpl(); - return branch; - } - - /** - * - * - * @generated - */ - public byte[] createISerializableFromString(EDataType eDataType, String initialValue) { - return (byte[])super.createFromString(initialValue); - } - - /** - * - * - * @generated - */ - public String convertISerializableToString(EDataType eDataType, Object instanceValue) { - return super.convertToString(instanceValue); - } - - /** - * - * - * @generated - */ - public Gemoc_execution_tracePackage getGemoc_execution_tracePackage() { - return (Gemoc_execution_tracePackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static Gemoc_execution_tracePackage getPackage() { - return Gemoc_execution_tracePackage.eINSTANCE; - } - -} //Gemoc_execution_traceFactoryImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java deleted file mode 100644 index 36fcd0308..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java +++ /dev/null @@ -1,536 +0,0 @@ -/** - */ -package gemoc_execution_trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import gemoc_execution_trace.Branch; -import gemoc_execution_trace.Choice; -import gemoc_execution_trace.ContextState; -import gemoc_execution_trace.ExecutionTraceModel; -import gemoc_execution_trace.Gemoc_execution_traceFactory; -import gemoc_execution_trace.Gemoc_execution_tracePackage; -import gemoc_execution_trace.ModelState; -import gemoc_execution_trace.SolverState; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class Gemoc_execution_tracePackageImpl extends EPackageImpl implements Gemoc_execution_tracePackage { - /** - * - * - * @generated - */ - private EClass choiceEClass = null; - - /** - * - * - * @generated - */ - private EClass executionTraceModelEClass = null; - - /** - * - * - * @generated - */ - private EClass solverStateEClass = null; - - /** - * - * - * @generated - */ - private EClass modelStateEClass = null; - - /** - * - * - * @generated - */ - private EClass contextStateEClass = null; - - /** - * - * - * @generated - */ - private EClass branchEClass = null; - - /** - * - * - * @generated - */ - private EDataType iSerializableEDataType = 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 gemoc_execution_trace.Gemoc_execution_tracePackage#eNS_URI - * @see #init() - * @generated - */ - private Gemoc_execution_tracePackageImpl() { - super(eNS_URI, Gemoc_execution_traceFactory.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 Gemoc_execution_tracePackage#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 Gemoc_execution_tracePackage init() { - if (isInited) return (Gemoc_execution_tracePackage)EPackage.Registry.INSTANCE.getEPackage(Gemoc_execution_tracePackage.eNS_URI); - - // Obtain or create and register package - Gemoc_execution_tracePackageImpl theGemoc_execution_tracePackage = (Gemoc_execution_tracePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Gemoc_execution_tracePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Gemoc_execution_tracePackageImpl()); - - isInited = true; - - // Initialize simple dependencies - TracePackage.eINSTANCE.eClass(); - - // Create package meta-data objects - theGemoc_execution_tracePackage.createPackageContents(); - - // Initialize created meta-data - theGemoc_execution_tracePackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theGemoc_execution_tracePackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(Gemoc_execution_tracePackage.eNS_URI, theGemoc_execution_tracePackage); - return theGemoc_execution_tracePackage; - } - - /** - * - * - * @generated - */ - public EClass getChoice() { - return choiceEClass; - } - - /** - * - * - * @generated - */ - public EReference getChoice_NextChoices() { - return (EReference)choiceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getChoice_PossibleLogicalSteps() { - return (EReference)choiceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getChoice_ChosenLogicalStep() { - return (EReference)choiceEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getChoice_ContextState() { - return (EReference)choiceEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getChoice_PreviousChoice() { - return (EReference)choiceEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getChoice_SelectedNextChoice() { - return (EReference)choiceEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getChoice_Branch() { - return (EReference)choiceEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getChoice_OwnedMSEOccurrences() { - return (EReference)choiceEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EClass getExecutionTraceModel() { - return executionTraceModelEClass; - } - - /** - * - * - * @generated - */ - public EReference getExecutionTraceModel_Choices() { - return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getExecutionTraceModel_Branches() { - return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getExecutionTraceModel_ReachedStates() { - return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getSolverState() { - return solverStateEClass; - } - - /** - * - * - * @generated - */ - public EReference getSolverState_Model() { - return (EReference)solverStateEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getSolverState_SerializableModel() { - return (EAttribute)solverStateEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getModelState() { - return modelStateEClass; - } - - /** - * - * - * @generated - */ - public EReference getModelState_Model() { - return (EReference)modelStateEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getModelState_ContextState() { - return (EReference)modelStateEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getContextState() { - return contextStateEClass; - } - - /** - * - * - * @generated - */ - public EReference getContextState_ModelState() { - return (EReference)contextStateEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getContextState_SolverState() { - return (EReference)contextStateEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getContextState_Choice() { - return (EReference)contextStateEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getBranch() { - return branchEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getBranch_StartIndex() { - return (EAttribute)branchEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getBranch_StopIndex() { - return (EAttribute)branchEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getBranch_Choices() { - return (EReference)branchEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EDataType getISerializable() { - return iSerializableEDataType; - } - - /** - * - * - * @generated - */ - public Gemoc_execution_traceFactory getGemoc_execution_traceFactory() { - return (Gemoc_execution_traceFactory)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 - choiceEClass = createEClass(CHOICE); - createEReference(choiceEClass, CHOICE__NEXT_CHOICES); - createEReference(choiceEClass, CHOICE__POSSIBLE_LOGICAL_STEPS); - createEReference(choiceEClass, CHOICE__CHOSEN_LOGICAL_STEP); - createEReference(choiceEClass, CHOICE__CONTEXT_STATE); - createEReference(choiceEClass, CHOICE__PREVIOUS_CHOICE); - createEReference(choiceEClass, CHOICE__SELECTED_NEXT_CHOICE); - createEReference(choiceEClass, CHOICE__BRANCH); - createEReference(choiceEClass, CHOICE__OWNED_MSE_OCCURRENCES); - - executionTraceModelEClass = createEClass(EXECUTION_TRACE_MODEL); - createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__CHOICES); - createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__BRANCHES); - createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__REACHED_STATES); - - solverStateEClass = createEClass(SOLVER_STATE); - createEReference(solverStateEClass, SOLVER_STATE__MODEL); - createEAttribute(solverStateEClass, SOLVER_STATE__SERIALIZABLE_MODEL); - - modelStateEClass = createEClass(MODEL_STATE); - createEReference(modelStateEClass, MODEL_STATE__MODEL); - createEReference(modelStateEClass, MODEL_STATE__CONTEXT_STATE); - - contextStateEClass = createEClass(CONTEXT_STATE); - createEReference(contextStateEClass, CONTEXT_STATE__MODEL_STATE); - createEReference(contextStateEClass, CONTEXT_STATE__SOLVER_STATE); - createEReference(contextStateEClass, CONTEXT_STATE__CHOICE); - - branchEClass = createEClass(BRANCH); - createEAttribute(branchEClass, BRANCH__START_INDEX); - createEAttribute(branchEClass, BRANCH__STOP_INDEX); - createEReference(branchEClass, BRANCH__CHOICES); - - // Create data types - iSerializableEDataType = createEDataType(ISERIALIZABLE); - } - - /** - * - * - * @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 - TracePackage theTracePackage = (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); - EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - - // Initialize classes, features, and operations; add parameters - initEClass(choiceEClass, Choice.class, "Choice", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getChoice_NextChoices(), this.getChoice(), this.getChoice_PreviousChoice(), "nextChoices", null, 0, -1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_PossibleLogicalSteps(), theTracePackage.getStep(), null, "possibleLogicalSteps", null, 0, -1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_ChosenLogicalStep(), theTracePackage.getStep(), null, "chosenLogicalStep", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_ContextState(), this.getContextState(), this.getContextState_Choice(), "contextState", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_PreviousChoice(), this.getChoice(), this.getChoice_NextChoices(), "previousChoice", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_SelectedNextChoice(), this.getChoice(), null, "selectedNextChoice", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_Branch(), this.getBranch(), this.getBranch_Choices(), "branch", null, 1, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_OwnedMSEOccurrences(), theTracePackage.getMSEOccurrence(), null, "ownedMSEOccurrences", null, 0, -1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(executionTraceModelEClass, ExecutionTraceModel.class, "ExecutionTraceModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getExecutionTraceModel_Choices(), this.getChoice(), null, "choices", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExecutionTraceModel_Branches(), this.getBranch(), null, "branches", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExecutionTraceModel_ReachedStates(), this.getModelState(), null, "reachedStates", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(solverStateEClass, SolverState.class, "SolverState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getSolverState_Model(), ecorePackage.getEObject(), null, "model", null, 1, 1, SolverState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSolverState_SerializableModel(), this.getISerializable(), "serializableModel", null, 0, 1, SolverState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(modelStateEClass, ModelState.class, "ModelState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getModelState_Model(), ecorePackage.getEObject(), null, "model", null, 1, 1, ModelState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getModelState_ContextState(), this.getContextState(), this.getContextState_ModelState(), "contextState", null, 0, -1, ModelState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(contextStateEClass, ContextState.class, "ContextState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getContextState_ModelState(), this.getModelState(), this.getModelState_ContextState(), "modelState", null, 1, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getContextState_SolverState(), this.getSolverState(), null, "solverState", null, 1, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getContextState_Choice(), this.getChoice(), this.getChoice_ContextState(), "choice", null, 0, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(branchEClass, Branch.class, "Branch", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getBranch_StartIndex(), theEcorePackage.getEInt(), "startIndex", null, 0, 1, Branch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBranch_StopIndex(), theEcorePackage.getEInt(), "stopIndex", null, 0, 1, Branch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getBranch_Choices(), this.getChoice(), this.getChoice_Branch(), "choices", null, 0, -1, Branch.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); - - // Create resource - createResource(eNS_URI); - } - -} //Gemoc_execution_tracePackageImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ModelStateImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ModelStateImpl.java deleted file mode 100644 index 300b9315d..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/ModelStateImpl.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - */ -package gemoc_execution_trace.impl; - -import gemoc_execution_trace.ContextState; -import gemoc_execution_trace.Gemoc_execution_tracePackage; -import gemoc_execution_trace.ModelState; - -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.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.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Model State'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link gemoc_execution_trace.impl.ModelStateImpl#getModel Model}
  • - *
  • {@link gemoc_execution_trace.impl.ModelStateImpl#getContextState Context State}
  • - *
- * - * @generated - */ -public class ModelStateImpl extends MinimalEObjectImpl.Container implements ModelState { - /** - * The cached value of the '{@link #getModel() Model}' reference. - * - * - * @see #getModel() - * @generated - * @ordered - */ - protected EObject model; - - /** - * The cached value of the '{@link #getContextState() Context State}' reference list. - * - * - * @see #getContextState() - * @generated - * @ordered - */ - protected EList contextState; - - /** - * - * - * @generated - */ - protected ModelStateImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.MODEL_STATE; - } - - /** - * - * - * @generated - */ - public EObject getModel() { - if (model != null && model.eIsProxy()) { - InternalEObject oldModel = (InternalEObject)model; - model = eResolveProxy(oldModel); - if (model != oldModel) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.MODEL_STATE__MODEL, oldModel, model)); - } - } - return model; - } - - /** - * - * - * @generated - */ - public EObject basicGetModel() { - return model; - } - - /** - * - * - * @generated - */ - public void setModel(EObject newModel) { - EObject oldModel = model; - model = newModel; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.MODEL_STATE__MODEL, oldModel, model)); - } - - /** - * - * - * @generated - */ - public EList getContextState() { - if (contextState == null) { - contextState = new EObjectWithInverseResolvingEList(ContextState.class, this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE); - } - return contextState; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - return ((InternalEList)(InternalEList)getContextState()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - return ((InternalEList)getContextState()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: - if (resolve) return getModel(); - return basicGetModel(); - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - return getContextState(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: - setModel((EObject)newValue); - return; - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - getContextState().clear(); - getContextState().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: - setModel((EObject)null); - return; - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - getContextState().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: - return model != null; - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - return contextState != null && !contextState.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ModelStateImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/SolverStateImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/SolverStateImpl.java deleted file mode 100644 index 9ce5e834a..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/impl/SolverStateImpl.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - */ -package gemoc_execution_trace.impl; - -import gemoc_execution_trace.Gemoc_execution_tracePackage; -import gemoc_execution_trace.SolverState; - -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.emf.ecore.impl.MinimalEObjectImpl; - -/** - * - * An implementation of the model object 'Solver State'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link gemoc_execution_trace.impl.SolverStateImpl#getModel Model}
  • - *
  • {@link gemoc_execution_trace.impl.SolverStateImpl#getSerializableModel Serializable Model}
  • - *
- * - * @generated - */ -public class SolverStateImpl extends MinimalEObjectImpl.Container implements SolverState { - /** - * The cached value of the '{@link #getModel() Model}' reference. - * - * - * @see #getModel() - * @generated - * @ordered - */ - protected EObject model; - - /** - * The default value of the '{@link #getSerializableModel() Serializable Model}' attribute. - * - * - * @see #getSerializableModel() - * @generated - * @ordered - */ - protected static final byte[] SERIALIZABLE_MODEL_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSerializableModel() Serializable Model}' attribute. - * - * - * @see #getSerializableModel() - * @generated - * @ordered - */ - protected byte[] serializableModel = SERIALIZABLE_MODEL_EDEFAULT; - - /** - * - * - * @generated - */ - protected SolverStateImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.SOLVER_STATE; - } - - /** - * - * - * @generated - */ - public EObject getModel() { - if (model != null && model.eIsProxy()) { - InternalEObject oldModel = (InternalEObject)model; - model = eResolveProxy(oldModel); - if (model != oldModel) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.SOLVER_STATE__MODEL, oldModel, model)); - } - } - return model; - } - - /** - * - * - * @generated - */ - public EObject basicGetModel() { - return model; - } - - /** - * - * - * @generated - */ - public void setModel(EObject newModel) { - EObject oldModel = model; - model = newModel; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.SOLVER_STATE__MODEL, oldModel, model)); - } - - /** - * - * - * @generated - */ - public byte[] getSerializableModel() { - return serializableModel; - } - - /** - * - * - * @generated - */ - public void setSerializableModel(byte[] newSerializableModel) { - byte[] oldSerializableModel = serializableModel; - serializableModel = newSerializableModel; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL, oldSerializableModel, serializableModel)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: - if (resolve) return getModel(); - return basicGetModel(); - case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: - return getSerializableModel(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: - setModel((EObject)newValue); - return; - case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: - setSerializableModel((byte[])newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: - setModel((EObject)null); - return; - case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: - setSerializableModel(SERIALIZABLE_MODEL_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: - return model != null; - case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: - return SERIALIZABLE_MODEL_EDEFAULT == null ? serializableModel != null : !SERIALIZABLE_MODEL_EDEFAULT.equals(serializableModel); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (serializableModel: "); - result.append(serializableModel); - result.append(')'); - return result.toString(); - } - -} //SolverStateImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java deleted file mode 100644 index b243fda12..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - */ -package gemoc_execution_trace.util; - -import gemoc_execution_trace.*; - -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; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see gemoc_execution_trace.Gemoc_execution_tracePackage - * @generated - */ -public class Gemoc_execution_traceAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static Gemoc_execution_tracePackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public Gemoc_execution_traceAdapterFactory() { - if (modelPackage == null) { - modelPackage = Gemoc_execution_tracePackage.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 Gemoc_execution_traceSwitch modelSwitch = - new Gemoc_execution_traceSwitch() { - @Override - public Adapter caseChoice(Choice object) { - return createChoiceAdapter(); - } - @Override - public Adapter caseExecutionTraceModel(ExecutionTraceModel object) { - return createExecutionTraceModelAdapter(); - } - @Override - public Adapter caseSolverState(SolverState object) { - return createSolverStateAdapter(); - } - @Override - public Adapter caseModelState(ModelState object) { - return createModelStateAdapter(); - } - @Override - public Adapter caseContextState(ContextState object) { - return createContextStateAdapter(); - } - @Override - public Adapter caseBranch(Branch object) { - return createBranchAdapter(); - } - @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 gemoc_execution_trace.Choice Choice}'. - * - * 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 gemoc_execution_trace.Choice - * @generated - */ - public Adapter createChoiceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link gemoc_execution_trace.ExecutionTraceModel Execution Trace Model}'. - * - * 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 gemoc_execution_trace.ExecutionTraceModel - * @generated - */ - public Adapter createExecutionTraceModelAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link gemoc_execution_trace.SolverState Solver 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 gemoc_execution_trace.SolverState - * @generated - */ - public Adapter createSolverStateAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link gemoc_execution_trace.ModelState Model 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 gemoc_execution_trace.ModelState - * @generated - */ - public Adapter createModelStateAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link gemoc_execution_trace.ContextState Context 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 gemoc_execution_trace.ContextState - * @generated - */ - public Adapter createContextStateAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link gemoc_execution_trace.Branch Branch}'. - * - * 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 gemoc_execution_trace.Branch - * @generated - */ - public Adapter createBranchAdapter() { - 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; - } - -} //Gemoc_execution_traceAdapterFactory diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java deleted file mode 100644 index 866137c3e..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - */ -package gemoc_execution_trace.util; - -import gemoc_execution_trace.*; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.util.Switch; - -/** - * - * 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 gemoc_execution_trace.Gemoc_execution_tracePackage - * @generated - */ -public class Gemoc_execution_traceSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static Gemoc_execution_tracePackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public Gemoc_execution_traceSwitch() { - if (modelPackage == null) { - modelPackage = Gemoc_execution_tracePackage.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 Gemoc_execution_tracePackage.CHOICE: { - Choice choice = (Choice)theEObject; - T result = caseChoice(choice); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL: { - ExecutionTraceModel executionTraceModel = (ExecutionTraceModel)theEObject; - T result = caseExecutionTraceModel(executionTraceModel); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.SOLVER_STATE: { - SolverState solverState = (SolverState)theEObject; - T result = caseSolverState(solverState); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.MODEL_STATE: { - ModelState modelState = (ModelState)theEObject; - T result = caseModelState(modelState); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.CONTEXT_STATE: { - ContextState contextState = (ContextState)theEObject; - T result = caseContextState(contextState); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.BRANCH: { - Branch branch = (Branch)theEObject; - T result = caseBranch(branch); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Choice'. - * - * 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 'Choice'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseChoice(Choice object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Execution Trace Model'. - * - * 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 'Execution Trace Model'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseExecutionTraceModel(ExecutionTraceModel object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Solver 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 'Solver State'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSolverState(SolverState object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Model 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 'Model State'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseModelState(ModelState object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Context 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 'Context State'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseContextState(ContextState object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Branch'. - * - * 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 'Branch'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBranch(Branch 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; - } - -} //Gemoc_execution_traceSwitch diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Branch.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Branch.java deleted file mode 100644 index 4125fbd4d..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Branch.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Branch'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStartIndex Start Index}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStopIndex Stop Index}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices Choices}
  • - *
- * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch() - * @model - * @generated - */ -public interface Branch extends EObject { - /** - * Returns the value of the 'Start Index' attribute. - * - *

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

- * - * @return the value of the 'Start Index' attribute. - * @see #setStartIndex(int) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_StartIndex() - * @model - * @generated - */ - int getStartIndex(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStartIndex Start Index}' attribute. - * - * - * @param value the new value of the 'Start Index' attribute. - * @see #getStartIndex() - * @generated - */ - void setStartIndex(int value); - - /** - * Returns the value of the 'Stop Index' attribute. - * - *

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

- * - * @return the value of the 'Stop Index' attribute. - * @see #setStopIndex(int) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_StopIndex() - * @model - * @generated - */ - int getStopIndex(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStopIndex Stop Index}' attribute. - * - * - * @param value the new value of the 'Stop Index' attribute. - * @see #getStopIndex() - * @generated - */ - void setStopIndex(int value); - - /** - * Returns the value of the 'Choices' reference list. - * The list contents are of type {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice}. - * It is bidirectional and its opposite is '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch Branch}'. - * - *

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

- * - * @return the value of the 'Choices' reference list. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getBranch_Choices() - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch - * @model opposite="branch" - * @generated - */ - EList getChoices(); - -} // Branch diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Choice.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Choice.java deleted file mode 100644 index 4f0347fb0..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Choice.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; -import fr.inria.diverse.trace.commons.model.trace.Step; - -/** - * - * A representation of the model object 'Choice'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices Next Choices}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPossibleLogicalSteps Possible Logical Steps}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState Context State}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch Branch}
  • - *
- * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice() - * @model - * @generated - */ -public interface Choice extends EObject { - /** - * Returns the value of the 'Next Choices' reference list. - * The list contents are of type {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice}. - * It is bidirectional and its opposite is '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}'. - * - *

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

- * - * @return the value of the 'Next Choices' reference list. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_NextChoices() - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice - * @model opposite="previousChoice" - * @generated - */ - EList getNextChoices(); - - /** - * Returns the value of the 'Possible Logical Steps' containment reference list. - * The list contents are of type {@link fr.inria.diverse.trace.commons.model.trace.Step}. - * - *

- * If the meaning of the 'Possible Logical Steps' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Possible Logical Steps' containment reference list. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_PossibleLogicalSteps() - * @model containment="true" - * @generated - */ - EList getPossibleLogicalSteps(); - - /** - * Returns the value of the 'Chosen Logical Step' reference. - * - *

- * If the meaning of the 'Chosen Logical Step' reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Chosen Logical Step' reference. - * @see #setChosenLogicalStep(Step) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_ChosenLogicalStep() - * @model - * @generated - */ - Step getChosenLogicalStep(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}' reference. - * - * - * @param value the new value of the 'Chosen Logical Step' reference. - * @see #getChosenLogicalStep() - * @generated - */ - void setChosenLogicalStep(Step value); - - /** - * Returns the value of the 'Context State' containment reference. - * It is bidirectional and its opposite is '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice Choice}'. - * - *

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

- * - * @return the value of the 'Context State' containment reference. - * @see #setContextState(ContextState) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_ContextState() - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice - * @model opposite="choice" containment="true" - * @generated - */ - ContextState getContextState(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState Context State}' containment reference. - * - * - * @param value the new value of the 'Context State' containment reference. - * @see #getContextState() - * @generated - */ - void setContextState(ContextState value); - - /** - * Returns the value of the 'Previous Choice' reference. - * It is bidirectional and its opposite is '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices Next Choices}'. - * - *

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

- * - * @return the value of the 'Previous Choice' reference. - * @see #setPreviousChoice(Choice) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_PreviousChoice() - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices - * @model opposite="nextChoices" - * @generated - */ - Choice getPreviousChoice(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}' reference. - * - * - * @param value the new value of the 'Previous Choice' reference. - * @see #getPreviousChoice() - * @generated - */ - void setPreviousChoice(Choice value); - - /** - * Returns the value of the 'Selected Next Choice' reference. - * - *

- * If the meaning of the 'Selected Next Choice' reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Selected Next Choice' reference. - * @see #setSelectedNextChoice(Choice) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_SelectedNextChoice() - * @model - * @generated - */ - Choice getSelectedNextChoice(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}' reference. - * - * - * @param value the new value of the 'Selected Next Choice' reference. - * @see #getSelectedNextChoice() - * @generated - */ - void setSelectedNextChoice(Choice value); - - /** - * Returns the value of the 'Branch' reference. - * It is bidirectional and its opposite is '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices Choices}'. - * - *

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

- * - * @return the value of the 'Branch' reference. - * @see #setBranch(Branch) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getChoice_Branch() - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices - * @model opposite="choices" required="true" - * @generated - */ - Branch getBranch(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch Branch}' reference. - * - * - * @param value the new value of the 'Branch' reference. - * @see #getBranch() - * @generated - */ - void setBranch(Branch value); - -} // Choice diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ContextState.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ContextState.java deleted file mode 100644 index efb4f9213..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ContextState.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Context State'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState Model State}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getSolverState Solver State}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice Choice}
  • - *
- * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState() - * @model - * @generated - */ -public interface ContextState extends EObject { - /** - * Returns the value of the 'Model State' reference. - * It is bidirectional and its opposite is '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState Context State}'. - * - *

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

- * - * @return the value of the 'Model State' reference. - * @see #setModelState(ModelState) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_ModelState() - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState - * @model opposite="contextState" required="true" - * @generated - */ - ModelState getModelState(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState Model State}' reference. - * - * - * @param value the new value of the 'Model State' reference. - * @see #getModelState() - * @generated - */ - void setModelState(ModelState value); - - /** - * Returns the value of the 'Solver State' containment reference. - * - *

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

- * - * @return the value of the 'Solver State' containment reference. - * @see #setSolverState(SolverState) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_SolverState() - * @model containment="true" required="true" - * @generated - */ - SolverState getSolverState(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getSolverState Solver State}' containment reference. - * - * - * @param value the new value of the 'Solver State' containment reference. - * @see #getSolverState() - * @generated - */ - void setSolverState(SolverState value); - - /** - * Returns the value of the 'Choice' container reference. - * It is bidirectional and its opposite is '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState Context State}'. - * - *

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

- * - * @return the value of the 'Choice' container reference. - * @see #setChoice(Choice) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getContextState_Choice() - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState - * @model opposite="contextState" transient="false" - * @generated - */ - Choice getChoice(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice Choice}' container reference. - * - * - * @param value the new value of the 'Choice' container reference. - * @see #getChoice() - * @generated - */ - void setChoice(Choice value); - -} // ContextState diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ExecutionTraceModel.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ExecutionTraceModel.java deleted file mode 100644 index efef3cb32..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ExecutionTraceModel.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Execution Trace Model'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getChoices Choices}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getBranches Branches}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getReachedStates Reached States}
  • - *
- * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel() - * @model - * @generated - */ -public interface ExecutionTraceModel extends EObject { - /** - * Returns the value of the 'Choices' containment reference list. - * The list contents are of type {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice}. - * - *

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

- * - * @return the value of the 'Choices' containment reference list. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_Choices() - * @model containment="true" - * @generated - */ - EList getChoices(); - - /** - * Returns the value of the 'Branches' containment reference list. - * The list contents are of type {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch}. - * - *

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

- * - * @return the value of the 'Branches' containment reference list. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_Branches() - * @model containment="true" - * @generated - */ - EList getBranches(); - - /** - * Returns the value of the 'Reached States' containment reference list. - * The list contents are of type {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState}. - * - *

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

- * - * @return the value of the 'Reached States' containment reference list. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getExecutionTraceModel_ReachedStates() - * @model containment="true" - * @generated - */ - EList getReachedStates(); - -} // ExecutionTraceModel diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_traceFactory.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_traceFactory.java deleted file mode 100644 index 823a93bb7..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_traceFactory.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace; - -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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage - * @generated - */ -public interface Gemoc_execution_traceFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - Gemoc_execution_traceFactory eINSTANCE = org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_traceFactoryImpl.init(); - - /** - * Returns a new object of class 'Choice'. - * - * - * @return a new object of class 'Choice'. - * @generated - */ - Choice createChoice(); - - /** - * Returns a new object of class 'Execution Trace Model'. - * - * - * @return a new object of class 'Execution Trace Model'. - * @generated - */ - ExecutionTraceModel createExecutionTraceModel(); - - /** - * Returns a new object of class 'Solver State'. - * - * - * @return a new object of class 'Solver State'. - * @generated - */ - SolverState createSolverState(); - - /** - * Returns a new object of class 'Model State'. - * - * - * @return a new object of class 'Model State'. - * @generated - */ - ModelState createModelState(); - - /** - * Returns a new object of class 'Context State'. - * - * - * @return a new object of class 'Context State'. - * @generated - */ - ContextState createContextState(); - - /** - * Returns a new object of class 'Branch'. - * - * - * @return a new object of class 'Branch'. - * @generated - */ - Branch createBranch(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - Gemoc_execution_tracePackage getGemoc_execution_tracePackage(); - -} //Gemoc_execution_traceFactory diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_tracePackage.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_tracePackage.java deleted file mode 100644 index 73fd19fb8..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/Gemoc_execution_tracePackage.java +++ /dev/null @@ -1,962 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_traceFactory - * @model kind="package" - * @generated - */ -public interface Gemoc_execution_tracePackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "gemoc_execution_trace"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.inira.fr/gemoc_execution_trace"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "gemoc_execution_trace"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - Gemoc_execution_tracePackage eINSTANCE = org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl.init(); - - /** - * The meta object id for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl Choice}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getChoice() - * @generated - */ - int CHOICE = 0; - - /** - * The feature id for the 'Next Choices' reference list. - * - * - * @generated - * @ordered - */ - int CHOICE__NEXT_CHOICES = 0; - - /** - * The feature id for the 'Possible Logical Steps' containment reference list. - * - * - * @generated - * @ordered - */ - int CHOICE__POSSIBLE_LOGICAL_STEPS = 1; - - /** - * The feature id for the 'Chosen Logical Step' reference. - * - * - * @generated - * @ordered - */ - int CHOICE__CHOSEN_LOGICAL_STEP = 2; - - /** - * The feature id for the 'Context State' containment reference. - * - * - * @generated - * @ordered - */ - int CHOICE__CONTEXT_STATE = 3; - - /** - * The feature id for the 'Previous Choice' reference. - * - * - * @generated - * @ordered - */ - int CHOICE__PREVIOUS_CHOICE = 4; - - /** - * The feature id for the 'Selected Next Choice' reference. - * - * - * @generated - * @ordered - */ - int CHOICE__SELECTED_NEXT_CHOICE = 5; - - /** - * The feature id for the 'Branch' reference. - * - * - * @generated - * @ordered - */ - int CHOICE__BRANCH = 6; - - /** - * The number of structural features of the 'Choice' class. - * - * - * @generated - * @ordered - */ - int CHOICE_FEATURE_COUNT = 7; - - /** - * The number of operations of the 'Choice' class. - * - * - * @generated - * @ordered - */ - int CHOICE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl Execution Trace Model}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getExecutionTraceModel() - * @generated - */ - int EXECUTION_TRACE_MODEL = 1; - - /** - * The feature id for the 'Choices' containment reference list. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL__CHOICES = 0; - - /** - * The feature id for the 'Branches' containment reference list. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL__BRANCHES = 1; - - /** - * The feature id for the 'Reached States' containment reference list. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL__REACHED_STATES = 2; - - /** - * The number of structural features of the 'Execution Trace Model' class. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL_FEATURE_COUNT = 3; - - /** - * The number of operations of the 'Execution Trace Model' class. - * - * - * @generated - * @ordered - */ - int EXECUTION_TRACE_MODEL_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl Solver State}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getSolverState() - * @generated - */ - int SOLVER_STATE = 2; - - /** - * The feature id for the 'Model' reference. - * - * - * @generated - * @ordered - */ - int SOLVER_STATE__MODEL = 0; - - /** - * The feature id for the 'Serializable Model' attribute. - * - * - * @generated - * @ordered - */ - int SOLVER_STATE__SERIALIZABLE_MODEL = 1; - - /** - * The number of structural features of the 'Solver State' class. - * - * - * @generated - * @ordered - */ - int SOLVER_STATE_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Solver State' class. - * - * - * @generated - * @ordered - */ - int SOLVER_STATE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl Model State}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getModelState() - * @generated - */ - int MODEL_STATE = 3; - - /** - * The feature id for the 'Model' reference. - * - * - * @generated - * @ordered - */ - int MODEL_STATE__MODEL = 0; - - /** - * The feature id for the 'Context State' reference list. - * - * - * @generated - * @ordered - */ - int MODEL_STATE__CONTEXT_STATE = 1; - - /** - * The number of structural features of the 'Model State' class. - * - * - * @generated - * @ordered - */ - int MODEL_STATE_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Model State' class. - * - * - * @generated - * @ordered - */ - int MODEL_STATE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl Context State}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getContextState() - * @generated - */ - int CONTEXT_STATE = 4; - - /** - * The feature id for the 'Model State' reference. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE__MODEL_STATE = 0; - - /** - * The feature id for the 'Solver State' containment reference. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE__SOLVER_STATE = 1; - - /** - * The feature id for the 'Choice' container reference. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE__CHOICE = 2; - - /** - * The number of structural features of the 'Context State' class. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE_FEATURE_COUNT = 3; - - /** - * The number of operations of the 'Context State' class. - * - * - * @generated - * @ordered - */ - int CONTEXT_STATE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl Branch}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getBranch() - * @generated - */ - int BRANCH = 5; - - /** - * The feature id for the 'Start Index' attribute. - * - * - * @generated - * @ordered - */ - int BRANCH__START_INDEX = 0; - - /** - * The feature id for the 'Stop Index' attribute. - * - * - * @generated - * @ordered - */ - int BRANCH__STOP_INDEX = 1; - - /** - * The feature id for the 'Choices' reference list. - * - * - * @generated - * @ordered - */ - int BRANCH__CHOICES = 2; - - /** - * The number of structural features of the 'Branch' class. - * - * - * @generated - * @ordered - */ - int BRANCH_FEATURE_COUNT = 3; - - /** - * The number of operations of the 'Branch' class. - * - * - * @generated - * @ordered - */ - int BRANCH_OPERATION_COUNT = 0; - - /** - * The meta object id for the 'ISerializable' data type. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getISerializable() - * @generated - */ - int ISERIALIZABLE = 6; - - - /** - * Returns the meta object for class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice Choice}'. - * - * - * @return the meta object for class 'Choice'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice - * @generated - */ - EClass getChoice(); - - /** - * Returns the meta object for the reference list '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices Next Choices}'. - * - * - * @return the meta object for the reference list 'Next Choices'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getNextChoices() - * @see #getChoice() - * @generated - */ - EReference getChoice_NextChoices(); - - /** - * Returns the meta object for the containment reference list '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPossibleLogicalSteps Possible Logical Steps}'. - * - * - * @return the meta object for the containment reference list 'Possible Logical Steps'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPossibleLogicalSteps() - * @see #getChoice() - * @generated - */ - EReference getChoice_PossibleLogicalSteps(); - - /** - * Returns the meta object for the reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getChosenLogicalStep Chosen Logical Step}'. - * - * - * @return the meta object for the reference 'Chosen Logical Step'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getChosenLogicalStep() - * @see #getChoice() - * @generated - */ - EReference getChoice_ChosenLogicalStep(); - - /** - * Returns the meta object for the containment reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState Context State}'. - * - * - * @return the meta object for the containment reference 'Context State'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getContextState() - * @see #getChoice() - * @generated - */ - EReference getChoice_ContextState(); - - /** - * Returns the meta object for the reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice Previous Choice}'. - * - * - * @return the meta object for the reference 'Previous Choice'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getPreviousChoice() - * @see #getChoice() - * @generated - */ - EReference getChoice_PreviousChoice(); - - /** - * Returns the meta object for the reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getSelectedNextChoice Selected Next Choice}'. - * - * - * @return the meta object for the reference 'Selected Next Choice'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getSelectedNextChoice() - * @see #getChoice() - * @generated - */ - EReference getChoice_SelectedNextChoice(); - - /** - * Returns the meta object for the reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch Branch}'. - * - * - * @return the meta object for the reference 'Branch'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice#getBranch() - * @see #getChoice() - * @generated - */ - EReference getChoice_Branch(); - - /** - * Returns the meta object for class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel Execution Trace Model}'. - * - * - * @return the meta object for class 'Execution Trace Model'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel - * @generated - */ - EClass getExecutionTraceModel(); - - /** - * Returns the meta object for the containment reference list '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getChoices Choices}'. - * - * - * @return the meta object for the containment reference list 'Choices'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getChoices() - * @see #getExecutionTraceModel() - * @generated - */ - EReference getExecutionTraceModel_Choices(); - - /** - * Returns the meta object for the containment reference list '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getBranches Branches}'. - * - * - * @return the meta object for the containment reference list 'Branches'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getBranches() - * @see #getExecutionTraceModel() - * @generated - */ - EReference getExecutionTraceModel_Branches(); - - /** - * Returns the meta object for the containment reference list '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getReachedStates Reached States}'. - * - * - * @return the meta object for the containment reference list 'Reached States'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel#getReachedStates() - * @see #getExecutionTraceModel() - * @generated - */ - EReference getExecutionTraceModel_ReachedStates(); - - /** - * Returns the meta object for class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState Solver State}'. - * - * - * @return the meta object for class 'Solver State'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState - * @generated - */ - EClass getSolverState(); - - /** - * Returns the meta object for the reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getModel Model}'. - * - * - * @return the meta object for the reference 'Model'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getModel() - * @see #getSolverState() - * @generated - */ - EReference getSolverState_Model(); - - /** - * Returns the meta object for the attribute '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}'. - * - * - * @return the meta object for the attribute 'Serializable Model'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getSerializableModel() - * @see #getSolverState() - * @generated - */ - EAttribute getSolverState_SerializableModel(); - - /** - * Returns the meta object for class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState Model State}'. - * - * - * @return the meta object for class 'Model State'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState - * @generated - */ - EClass getModelState(); - - /** - * Returns the meta object for the reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getModel Model}'. - * - * - * @return the meta object for the reference 'Model'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getModel() - * @see #getModelState() - * @generated - */ - EReference getModelState_Model(); - - /** - * Returns the meta object for the reference list '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState Context State}'. - * - * - * @return the meta object for the reference list 'Context State'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState() - * @see #getModelState() - * @generated - */ - EReference getModelState_ContextState(); - - /** - * Returns the meta object for class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState Context State}'. - * - * - * @return the meta object for class 'Context State'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState - * @generated - */ - EClass getContextState(); - - /** - * Returns the meta object for the reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState Model State}'. - * - * - * @return the meta object for the reference 'Model State'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState() - * @see #getContextState() - * @generated - */ - EReference getContextState_ModelState(); - - /** - * Returns the meta object for the containment reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getSolverState Solver State}'. - * - * - * @return the meta object for the containment reference 'Solver State'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getSolverState() - * @see #getContextState() - * @generated - */ - EReference getContextState_SolverState(); - - /** - * Returns the meta object for the container reference '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice Choice}'. - * - * - * @return the meta object for the container reference 'Choice'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getChoice() - * @see #getContextState() - * @generated - */ - EReference getContextState_Choice(); - - /** - * Returns the meta object for class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch Branch}'. - * - * - * @return the meta object for class 'Branch'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch - * @generated - */ - EClass getBranch(); - - /** - * Returns the meta object for the attribute '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStartIndex Start Index}'. - * - * - * @return the meta object for the attribute 'Start Index'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStartIndex() - * @see #getBranch() - * @generated - */ - EAttribute getBranch_StartIndex(); - - /** - * Returns the meta object for the attribute '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStopIndex Stop Index}'. - * - * - * @return the meta object for the attribute 'Stop Index'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getStopIndex() - * @see #getBranch() - * @generated - */ - EAttribute getBranch_StopIndex(); - - /** - * Returns the meta object for the reference list '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices Choices}'. - * - * - * @return the meta object for the reference list 'Choices'. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch#getChoices() - * @see #getBranch() - * @generated - */ - EReference getBranch_Choices(); - - /** - * Returns the meta object for data type 'ISerializable'. - * - * - * @return the meta object for data type 'ISerializable'. - * @model instanceClass="byte[]" - * @generated - */ - EDataType getISerializable(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - Gemoc_execution_traceFactory getGemoc_execution_traceFactory(); - - /** - * - * 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl Choice}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getChoice() - * @generated - */ - EClass CHOICE = eINSTANCE.getChoice(); - - /** - * The meta object literal for the 'Next Choices' reference list feature. - * - * - * @generated - */ - EReference CHOICE__NEXT_CHOICES = eINSTANCE.getChoice_NextChoices(); - - /** - * The meta object literal for the 'Possible Logical Steps' containment reference list feature. - * - * - * @generated - */ - EReference CHOICE__POSSIBLE_LOGICAL_STEPS = eINSTANCE.getChoice_PossibleLogicalSteps(); - - /** - * The meta object literal for the 'Chosen Logical Step' reference feature. - * - * - * @generated - */ - EReference CHOICE__CHOSEN_LOGICAL_STEP = eINSTANCE.getChoice_ChosenLogicalStep(); - - /** - * The meta object literal for the 'Context State' containment reference feature. - * - * - * @generated - */ - EReference CHOICE__CONTEXT_STATE = eINSTANCE.getChoice_ContextState(); - - /** - * The meta object literal for the 'Previous Choice' reference feature. - * - * - * @generated - */ - EReference CHOICE__PREVIOUS_CHOICE = eINSTANCE.getChoice_PreviousChoice(); - - /** - * The meta object literal for the 'Selected Next Choice' reference feature. - * - * - * @generated - */ - EReference CHOICE__SELECTED_NEXT_CHOICE = eINSTANCE.getChoice_SelectedNextChoice(); - - /** - * The meta object literal for the 'Branch' reference feature. - * - * - * @generated - */ - EReference CHOICE__BRANCH = eINSTANCE.getChoice_Branch(); - - /** - * The meta object literal for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl Execution Trace Model}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getExecutionTraceModel() - * @generated - */ - EClass EXECUTION_TRACE_MODEL = eINSTANCE.getExecutionTraceModel(); - - /** - * The meta object literal for the 'Choices' containment reference list feature. - * - * - * @generated - */ - EReference EXECUTION_TRACE_MODEL__CHOICES = eINSTANCE.getExecutionTraceModel_Choices(); - - /** - * The meta object literal for the 'Branches' containment reference list feature. - * - * - * @generated - */ - EReference EXECUTION_TRACE_MODEL__BRANCHES = eINSTANCE.getExecutionTraceModel_Branches(); - - /** - * The meta object literal for the 'Reached States' containment reference list feature. - * - * - * @generated - */ - EReference EXECUTION_TRACE_MODEL__REACHED_STATES = eINSTANCE.getExecutionTraceModel_ReachedStates(); - - /** - * The meta object literal for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl Solver State}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getSolverState() - * @generated - */ - EClass SOLVER_STATE = eINSTANCE.getSolverState(); - - /** - * The meta object literal for the 'Model' reference feature. - * - * - * @generated - */ - EReference SOLVER_STATE__MODEL = eINSTANCE.getSolverState_Model(); - - /** - * The meta object literal for the 'Serializable Model' attribute feature. - * - * - * @generated - */ - EAttribute SOLVER_STATE__SERIALIZABLE_MODEL = eINSTANCE.getSolverState_SerializableModel(); - - /** - * The meta object literal for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl Model State}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getModelState() - * @generated - */ - EClass MODEL_STATE = eINSTANCE.getModelState(); - - /** - * The meta object literal for the 'Model' reference feature. - * - * - * @generated - */ - EReference MODEL_STATE__MODEL = eINSTANCE.getModelState_Model(); - - /** - * The meta object literal for the 'Context State' reference list feature. - * - * - * @generated - */ - EReference MODEL_STATE__CONTEXT_STATE = eINSTANCE.getModelState_ContextState(); - - /** - * The meta object literal for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl Context State}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getContextState() - * @generated - */ - EClass CONTEXT_STATE = eINSTANCE.getContextState(); - - /** - * The meta object literal for the 'Model State' reference feature. - * - * - * @generated - */ - EReference CONTEXT_STATE__MODEL_STATE = eINSTANCE.getContextState_ModelState(); - - /** - * The meta object literal for the 'Solver State' containment reference feature. - * - * - * @generated - */ - EReference CONTEXT_STATE__SOLVER_STATE = eINSTANCE.getContextState_SolverState(); - - /** - * The meta object literal for the 'Choice' container reference feature. - * - * - * @generated - */ - EReference CONTEXT_STATE__CHOICE = eINSTANCE.getContextState_Choice(); - - /** - * The meta object literal for the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl Branch}' class. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getBranch() - * @generated - */ - EClass BRANCH = eINSTANCE.getBranch(); - - /** - * The meta object literal for the 'Start Index' attribute feature. - * - * - * @generated - */ - EAttribute BRANCH__START_INDEX = eINSTANCE.getBranch_StartIndex(); - - /** - * The meta object literal for the 'Stop Index' attribute feature. - * - * - * @generated - */ - EAttribute BRANCH__STOP_INDEX = eINSTANCE.getBranch_StopIndex(); - - /** - * The meta object literal for the 'Choices' reference list feature. - * - * - * @generated - */ - EReference BRANCH__CHOICES = eINSTANCE.getBranch_Choices(); - - /** - * The meta object literal for the 'ISerializable' data type. - * - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.Gemoc_execution_tracePackageImpl#getISerializable() - * @generated - */ - EDataType ISERIALIZABLE = eINSTANCE.getISerializable(); - - } - -} //Gemoc_execution_tracePackage diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ModelState.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ModelState.java deleted file mode 100644 index 2a4655658..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/ModelState.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Model State'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getModel Model}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getContextState Context State}
  • - *
- * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState() - * @model - * @generated - */ -public interface ModelState extends EObject { - /** - * Returns the value of the 'Model' reference. - * - *

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

- * - * @return the value of the 'Model' reference. - * @see #setModel(EObject) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState_Model() - * @model required="true" - * @generated - */ - EObject getModel(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState#getModel Model}' reference. - * - * - * @param value the new value of the 'Model' reference. - * @see #getModel() - * @generated - */ - void setModel(EObject value); - - /** - * Returns the value of the 'Context State' reference list. - * The list contents are of type {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState}. - * It is bidirectional and its opposite is '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState Model State}'. - * - *

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

- * - * @return the value of the 'Context State' reference list. - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getModelState_ContextState() - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState#getModelState - * @model opposite="modelState" - * @generated - */ - EList getContextState(); - -} // ModelState diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/SolverState.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/SolverState.java deleted file mode 100644 index fa3864131..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/SolverState.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Solver State'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getModel Model}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}
  • - *
- * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState() - * @model - * @generated - */ -public interface SolverState extends EObject { - /** - * Returns the value of the 'Model' reference. - * - *

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

- * - * @return the value of the 'Model' reference. - * @see #setModel(EObject) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState_Model() - * @model required="true" - * @generated - */ - EObject getModel(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getModel Model}' reference. - * - * - * @param value the new value of the 'Model' reference. - * @see #getModel() - * @generated - */ - void setModel(EObject value); - - /** - * Returns the value of the 'Serializable Model' attribute. - * - *

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

- * - * @return the value of the 'Serializable Model' attribute. - * @see #setSerializableModel(byte[]) - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#getSolverState_SerializableModel() - * @model dataType="org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ISerializable" - * @generated - */ - byte[] getSerializableModel(); - - /** - * Sets the value of the '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState#getSerializableModel Serializable Model}' attribute. - * - * - * @param value the new value of the 'Serializable Model' attribute. - * @see #getSerializableModel() - * @generated - */ - void setSerializableModel(byte[] value); - -} // SolverState diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/BranchImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/BranchImpl.java deleted file mode 100644 index c4a3b242f..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/BranchImpl.java +++ /dev/null @@ -1,291 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; - -/** - * - * An implementation of the model object 'Branch'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl#getStartIndex Start Index}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl#getStopIndex Stop Index}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.BranchImpl#getChoices Choices}
  • - *
- * - * @generated - */ -public class BranchImpl extends MinimalEObjectImpl.Container implements Branch { - /** - * The default value of the '{@link #getStartIndex() Start Index}' attribute. - * - * - * @see #getStartIndex() - * @generated - * @ordered - */ - protected static final int START_INDEX_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getStartIndex() Start Index}' attribute. - * - * - * @see #getStartIndex() - * @generated - * @ordered - */ - protected int startIndex = START_INDEX_EDEFAULT; - - /** - * The default value of the '{@link #getStopIndex() Stop Index}' attribute. - * - * - * @see #getStopIndex() - * @generated - * @ordered - */ - protected static final int STOP_INDEX_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getStopIndex() Stop Index}' attribute. - * - * - * @see #getStopIndex() - * @generated - * @ordered - */ - protected int stopIndex = STOP_INDEX_EDEFAULT; - - /** - * The cached value of the '{@link #getChoices() Choices}' reference list. - * - * - * @see #getChoices() - * @generated - * @ordered - */ - protected EList choices; - - /** - * - * - * @generated - */ - protected BranchImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.BRANCH; - } - - /** - * - * - * @generated - */ - public int getStartIndex() { - return startIndex; - } - - /** - * - * - * @generated - */ - public void setStartIndex(int newStartIndex) { - int oldStartIndex = startIndex; - startIndex = newStartIndex; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.BRANCH__START_INDEX, oldStartIndex, startIndex)); - } - - /** - * - * - * @generated - */ - public int getStopIndex() { - return stopIndex; - } - - /** - * - * - * @generated - */ - public void setStopIndex(int newStopIndex) { - int oldStopIndex = stopIndex; - stopIndex = newStopIndex; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.BRANCH__STOP_INDEX, oldStopIndex, stopIndex)); - } - - /** - * - * - * @generated - */ - public EList getChoices() { - if (choices == null) { - choices = new EObjectWithInverseResolvingEList(Choice.class, this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Gemoc_execution_tracePackage.CHOICE__BRANCH); - } - return choices; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - return ((InternalEList)(InternalEList)getChoices()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - return ((InternalEList)getChoices()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__START_INDEX: - return getStartIndex(); - case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: - return getStopIndex(); - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - return getChoices(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__START_INDEX: - setStartIndex((Integer)newValue); - return; - case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: - setStopIndex((Integer)newValue); - return; - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - getChoices().clear(); - getChoices().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__START_INDEX: - setStartIndex(START_INDEX_EDEFAULT); - return; - case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: - setStopIndex(STOP_INDEX_EDEFAULT); - return; - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - getChoices().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.BRANCH__START_INDEX: - return startIndex != START_INDEX_EDEFAULT; - case Gemoc_execution_tracePackage.BRANCH__STOP_INDEX: - return stopIndex != STOP_INDEX_EDEFAULT; - case Gemoc_execution_tracePackage.BRANCH__CHOICES: - return choices != null && !choices.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (startIndex: "); - result.append(startIndex); - result.append(", stopIndex: "); - result.append(stopIndex); - result.append(')'); - return result.toString(); - } - -} //BranchImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ChoiceImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ChoiceImpl.java deleted file mode 100644 index dd8590414..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ChoiceImpl.java +++ /dev/null @@ -1,569 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.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.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; -import fr.inria.diverse.trace.commons.model.trace.Step; - -/** - * - * An implementation of the model object 'Choice'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getNextChoices Next Choices}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getPossibleLogicalSteps Possible Logical Steps}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getChosenLogicalStep Chosen Logical Step}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getContextState Context State}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getPreviousChoice Previous Choice}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getSelectedNextChoice Selected Next Choice}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ChoiceImpl#getBranch Branch}
  • - *
- * - * @generated - */ -public class ChoiceImpl extends MinimalEObjectImpl.Container implements Choice { - /** - * The cached value of the '{@link #getNextChoices() Next Choices}' reference list. - * - * - * @see #getNextChoices() - * @generated - * @ordered - */ - protected EList nextChoices; - - /** - * The cached value of the '{@link #getPossibleLogicalSteps() Possible Logical Steps}' containment reference list. - * - * - * @see #getPossibleLogicalSteps() - * @generated - * @ordered - */ - protected EList possibleLogicalSteps; - - /** - * The cached value of the '{@link #getChosenLogicalStep() Chosen Logical Step}' reference. - * - * - * @see #getChosenLogicalStep() - * @generated - * @ordered - */ - protected Step chosenLogicalStep; - - /** - * The cached value of the '{@link #getContextState() Context State}' containment reference. - * - * - * @see #getContextState() - * @generated - * @ordered - */ - protected ContextState contextState; - - /** - * The cached value of the '{@link #getPreviousChoice() Previous Choice}' reference. - * - * - * @see #getPreviousChoice() - * @generated - * @ordered - */ - protected Choice previousChoice; - - /** - * The cached value of the '{@link #getSelectedNextChoice() Selected Next Choice}' reference. - * - * - * @see #getSelectedNextChoice() - * @generated - * @ordered - */ - protected Choice selectedNextChoice; - - /** - * The cached value of the '{@link #getBranch() Branch}' reference. - * - * - * @see #getBranch() - * @generated - * @ordered - */ - protected Branch branch; - - /** - * - * - * @generated - */ - protected ChoiceImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.CHOICE; - } - - /** - * - * - * @generated - */ - public EList getNextChoices() { - if (nextChoices == null) { - nextChoices = new EObjectWithInverseResolvingEList(Choice.class, this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE); - } - return nextChoices; - } - - /** - * - * - * @generated - */ - public EList getPossibleLogicalSteps() { - if (possibleLogicalSteps == null) { - possibleLogicalSteps = new EObjectContainmentEList(Step.class, this, Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS); - } - return possibleLogicalSteps; - } - - /** - * - * - * @generated - */ - public Step getChosenLogicalStep() { - if (chosenLogicalStep != null && chosenLogicalStep.eIsProxy()) { - InternalEObject oldChosenLogicalStep = (InternalEObject)chosenLogicalStep; - chosenLogicalStep = (Step)eResolveProxy(oldChosenLogicalStep); - if (chosenLogicalStep != oldChosenLogicalStep) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP, oldChosenLogicalStep, chosenLogicalStep)); - } - } - return chosenLogicalStep; - } - - /** - * - * - * @generated - */ - public Step basicGetChosenLogicalStep() { - return chosenLogicalStep; - } - - /** - * - * - * @generated - */ - public void setChosenLogicalStep(Step newChosenLogicalStep) { - Step oldChosenLogicalStep = chosenLogicalStep; - chosenLogicalStep = newChosenLogicalStep; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP, oldChosenLogicalStep, chosenLogicalStep)); - } - - /** - * - * - * @generated - */ - public ContextState getContextState() { - return contextState; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetContextState(ContextState newContextState, NotificationChain msgs) { - ContextState oldContextState = contextState; - contextState = newContextState; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, oldContextState, newContextState); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setContextState(ContextState newContextState) { - if (newContextState != contextState) { - NotificationChain msgs = null; - if (contextState != null) - msgs = ((InternalEObject)contextState).eInverseRemove(this, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, ContextState.class, msgs); - if (newContextState != null) - msgs = ((InternalEObject)newContextState).eInverseAdd(this, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, ContextState.class, msgs); - msgs = basicSetContextState(newContextState, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, newContextState, newContextState)); - } - - /** - * - * - * @generated - */ - public Choice getPreviousChoice() { - if (previousChoice != null && previousChoice.eIsProxy()) { - InternalEObject oldPreviousChoice = (InternalEObject)previousChoice; - previousChoice = (Choice)eResolveProxy(oldPreviousChoice); - if (previousChoice != oldPreviousChoice) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, oldPreviousChoice, previousChoice)); - } - } - return previousChoice; - } - - /** - * - * - * @generated - */ - public Choice basicGetPreviousChoice() { - return previousChoice; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetPreviousChoice(Choice newPreviousChoice, NotificationChain msgs) { - Choice oldPreviousChoice = previousChoice; - previousChoice = newPreviousChoice; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, oldPreviousChoice, newPreviousChoice); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setPreviousChoice(Choice newPreviousChoice) { - if (newPreviousChoice != previousChoice) { - NotificationChain msgs = null; - if (previousChoice != null) - msgs = ((InternalEObject)previousChoice).eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); - if (newPreviousChoice != null) - msgs = ((InternalEObject)newPreviousChoice).eInverseAdd(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); - msgs = basicSetPreviousChoice(newPreviousChoice, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE, newPreviousChoice, newPreviousChoice)); - } - - /** - * - * - * @generated - */ - public Choice getSelectedNextChoice() { - if (selectedNextChoice != null && selectedNextChoice.eIsProxy()) { - InternalEObject oldSelectedNextChoice = (InternalEObject)selectedNextChoice; - selectedNextChoice = (Choice)eResolveProxy(oldSelectedNextChoice); - if (selectedNextChoice != oldSelectedNextChoice) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE, oldSelectedNextChoice, selectedNextChoice)); - } - } - return selectedNextChoice; - } - - /** - * - * - * @generated - */ - public Choice basicGetSelectedNextChoice() { - return selectedNextChoice; - } - - /** - * - * - * @generated - */ - public void setSelectedNextChoice(Choice newSelectedNextChoice) { - Choice oldSelectedNextChoice = selectedNextChoice; - selectedNextChoice = newSelectedNextChoice; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE, oldSelectedNextChoice, selectedNextChoice)); - } - - /** - * - * - * @generated - */ - public Branch getBranch() { - if (branch != null && branch.eIsProxy()) { - InternalEObject oldBranch = (InternalEObject)branch; - branch = (Branch)eResolveProxy(oldBranch); - if (branch != oldBranch) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CHOICE__BRANCH, oldBranch, branch)); - } - } - return branch; - } - - /** - * - * - * @generated - */ - public Branch basicGetBranch() { - return branch; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetBranch(Branch newBranch, NotificationChain msgs) { - Branch oldBranch = branch; - branch = newBranch; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__BRANCH, oldBranch, newBranch); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setBranch(Branch newBranch) { - if (newBranch != branch) { - NotificationChain msgs = null; - if (branch != null) - msgs = ((InternalEObject)branch).eInverseRemove(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); - if (newBranch != null) - msgs = ((InternalEObject)newBranch).eInverseAdd(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); - msgs = basicSetBranch(newBranch, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CHOICE__BRANCH, newBranch, newBranch)); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - return ((InternalEList)(InternalEList)getNextChoices()).basicAdd(otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - if (contextState != null) - msgs = ((InternalEObject)contextState).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, null, msgs); - return basicSetContextState((ContextState)otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - if (previousChoice != null) - msgs = ((InternalEObject)previousChoice).eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES, Choice.class, msgs); - return basicSetPreviousChoice((Choice)otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - if (branch != null) - msgs = ((InternalEObject)branch).eInverseRemove(this, Gemoc_execution_tracePackage.BRANCH__CHOICES, Branch.class, msgs); - return basicSetBranch((Branch)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - return ((InternalEList)getNextChoices()).basicRemove(otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - return ((InternalEList)getPossibleLogicalSteps()).basicRemove(otherEnd, msgs); - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - return basicSetContextState(null, msgs); - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - return basicSetPreviousChoice(null, msgs); - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - return basicSetBranch(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - return getNextChoices(); - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - return getPossibleLogicalSteps(); - case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: - if (resolve) return getChosenLogicalStep(); - return basicGetChosenLogicalStep(); - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - return getContextState(); - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - if (resolve) return getPreviousChoice(); - return basicGetPreviousChoice(); - case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: - if (resolve) return getSelectedNextChoice(); - return basicGetSelectedNextChoice(); - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - if (resolve) return getBranch(); - return basicGetBranch(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - getNextChoices().clear(); - getNextChoices().addAll((Collection)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - getPossibleLogicalSteps().clear(); - getPossibleLogicalSteps().addAll((Collection)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: - setChosenLogicalStep((Step)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - setContextState((ContextState)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - setPreviousChoice((Choice)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: - setSelectedNextChoice((Choice)newValue); - return; - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - setBranch((Branch)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - getNextChoices().clear(); - return; - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - getPossibleLogicalSteps().clear(); - return; - case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: - setChosenLogicalStep((Step)null); - return; - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - setContextState((ContextState)null); - return; - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - setPreviousChoice((Choice)null); - return; - case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: - setSelectedNextChoice((Choice)null); - return; - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - setBranch((Branch)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.CHOICE__NEXT_CHOICES: - return nextChoices != null && !nextChoices.isEmpty(); - case Gemoc_execution_tracePackage.CHOICE__POSSIBLE_LOGICAL_STEPS: - return possibleLogicalSteps != null && !possibleLogicalSteps.isEmpty(); - case Gemoc_execution_tracePackage.CHOICE__CHOSEN_LOGICAL_STEP: - return chosenLogicalStep != null; - case Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE: - return contextState != null; - case Gemoc_execution_tracePackage.CHOICE__PREVIOUS_CHOICE: - return previousChoice != null; - case Gemoc_execution_tracePackage.CHOICE__SELECTED_NEXT_CHOICE: - return selectedNextChoice != null; - case Gemoc_execution_tracePackage.CHOICE__BRANCH: - return branch != null; - } - return super.eIsSet(featureID); - } - -} //ChoiceImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ContextStateImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ContextStateImpl.java deleted file mode 100644 index 0ee01d923..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ContextStateImpl.java +++ /dev/null @@ -1,352 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.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.emf.ecore.util.EcoreUtil; - -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState; - -/** - * - * An implementation of the model object 'Context State'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl#getModelState Model State}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl#getSolverState Solver State}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ContextStateImpl#getChoice Choice}
  • - *
- * - * @generated - */ -public class ContextStateImpl extends MinimalEObjectImpl.Container implements ContextState { - /** - * The cached value of the '{@link #getModelState() Model State}' reference. - * - * - * @see #getModelState() - * @generated - * @ordered - */ - protected ModelState modelState; - - /** - * The cached value of the '{@link #getSolverState() Solver State}' containment reference. - * - * - * @see #getSolverState() - * @generated - * @ordered - */ - protected SolverState solverState; - - /** - * - * - * @generated - */ - protected ContextStateImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.CONTEXT_STATE; - } - - /** - * - * - * @generated - */ - public ModelState getModelState() { - if (modelState != null && modelState.eIsProxy()) { - InternalEObject oldModelState = (InternalEObject)modelState; - modelState = (ModelState)eResolveProxy(oldModelState); - if (modelState != oldModelState) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, oldModelState, modelState)); - } - } - return modelState; - } - - /** - * - * - * @generated - */ - public ModelState basicGetModelState() { - return modelState; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetModelState(ModelState newModelState, NotificationChain msgs) { - ModelState oldModelState = modelState; - modelState = newModelState; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, oldModelState, newModelState); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setModelState(ModelState newModelState) { - if (newModelState != modelState) { - NotificationChain msgs = null; - if (modelState != null) - msgs = ((InternalEObject)modelState).eInverseRemove(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); - if (newModelState != null) - msgs = ((InternalEObject)newModelState).eInverseAdd(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); - msgs = basicSetModelState(newModelState, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE, newModelState, newModelState)); - } - - /** - * - * - * @generated - */ - public SolverState getSolverState() { - return solverState; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSolverState(SolverState newSolverState, NotificationChain msgs) { - SolverState oldSolverState = solverState; - solverState = newSolverState; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, oldSolverState, newSolverState); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setSolverState(SolverState newSolverState) { - if (newSolverState != solverState) { - NotificationChain msgs = null; - if (solverState != null) - msgs = ((InternalEObject)solverState).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, null, msgs); - if (newSolverState != null) - msgs = ((InternalEObject)newSolverState).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, null, msgs); - msgs = basicSetSolverState(newSolverState, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE, newSolverState, newSolverState)); - } - - /** - * - * - * @generated - */ - public Choice getChoice() { - if (eContainerFeatureID() != Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE) return null; - return (Choice)eInternalContainer(); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetChoice(Choice newChoice, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newChoice, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, msgs); - return msgs; - } - - /** - * - * - * @generated - */ - public void setChoice(Choice newChoice) { - if (newChoice != eInternalContainer() || (eContainerFeatureID() != Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE && newChoice != null)) { - if (EcoreUtil.isAncestor(this, newChoice)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newChoice != null) - msgs = ((InternalEObject)newChoice).eInverseAdd(this, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, Choice.class, msgs); - msgs = basicSetChoice(newChoice, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE, newChoice, newChoice)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - if (modelState != null) - msgs = ((InternalEObject)modelState).eInverseRemove(this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, ModelState.class, msgs); - return basicSetModelState((ModelState)otherEnd, msgs); - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetChoice((Choice)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - return basicSetModelState(null, msgs); - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - return basicSetSolverState(null, msgs); - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - return basicSetChoice(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID()) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - return eInternalContainer().eInverseRemove(this, Gemoc_execution_tracePackage.CHOICE__CONTEXT_STATE, Choice.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - if (resolve) return getModelState(); - return basicGetModelState(); - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - return getSolverState(); - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - return getChoice(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - setModelState((ModelState)newValue); - return; - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - setSolverState((SolverState)newValue); - return; - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - setChoice((Choice)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - setModelState((ModelState)null); - return; - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - setSolverState((SolverState)null); - return; - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - setChoice((Choice)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE: - return modelState != null; - case Gemoc_execution_tracePackage.CONTEXT_STATE__SOLVER_STATE: - return solverState != null; - case Gemoc_execution_tracePackage.CONTEXT_STATE__CHOICE: - return getChoice() != null; - } - return super.eIsSet(featureID); - } - -} //ContextStateImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java deleted file mode 100644 index 653bf1611..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ExecutionTraceModelImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState; - -/** - * - * An implementation of the model object 'Execution Trace Model'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl#getChoices Choices}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl#getBranches Branches}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ExecutionTraceModelImpl#getReachedStates Reached States}
  • - *
- * - * @generated - */ -public class ExecutionTraceModelImpl extends MinimalEObjectImpl.Container implements ExecutionTraceModel { - /** - * The cached value of the '{@link #getChoices() Choices}' containment reference list. - * - * - * @see #getChoices() - * @generated - * @ordered - */ - protected EList choices; - - /** - * The cached value of the '{@link #getBranches() Branches}' containment reference list. - * - * - * @see #getBranches() - * @generated - * @ordered - */ - protected EList branches; - - /** - * The cached value of the '{@link #getReachedStates() Reached States}' containment reference list. - * - * - * @see #getReachedStates() - * @generated - * @ordered - */ - protected EList reachedStates; - - /** - * - * - * @generated - */ - protected ExecutionTraceModelImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.EXECUTION_TRACE_MODEL; - } - - /** - * - * - * @generated - */ - public EList getChoices() { - if (choices == null) { - choices = new EObjectContainmentEList(Choice.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES); - } - return choices; - } - - /** - * - * - * @generated - */ - public EList getBranches() { - if (branches == null) { - branches = new EObjectContainmentEList(Branch.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES); - } - return branches; - } - - /** - * - * - * @generated - */ - public EList getReachedStates() { - if (reachedStates == null) { - reachedStates = new EObjectContainmentEList(ModelState.class, this, Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES); - } - return reachedStates; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - return ((InternalEList)getChoices()).basicRemove(otherEnd, msgs); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - return ((InternalEList)getBranches()).basicRemove(otherEnd, msgs); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - return ((InternalEList)getReachedStates()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - return getChoices(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - return getBranches(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - return getReachedStates(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - getChoices().clear(); - getChoices().addAll((Collection)newValue); - return; - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - getBranches().clear(); - getBranches().addAll((Collection)newValue); - return; - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - getReachedStates().clear(); - getReachedStates().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - getChoices().clear(); - return; - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - getBranches().clear(); - return; - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - getReachedStates().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__CHOICES: - return choices != null && !choices.isEmpty(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__BRANCHES: - return branches != null && !branches.isEmpty(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL__REACHED_STATES: - return reachedStates != null && !reachedStates.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ExecutionTraceModelImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java deleted file mode 100644 index 0137b1af9..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_traceFactoryImpl.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.*; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class Gemoc_execution_traceFactoryImpl extends EFactoryImpl implements Gemoc_execution_traceFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static Gemoc_execution_traceFactory init() { - try { - Gemoc_execution_traceFactory theGemoc_execution_traceFactory = (Gemoc_execution_traceFactory)EPackage.Registry.INSTANCE.getEFactory(Gemoc_execution_tracePackage.eNS_URI); - if (theGemoc_execution_traceFactory != null) { - return theGemoc_execution_traceFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new Gemoc_execution_traceFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public Gemoc_execution_traceFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case Gemoc_execution_tracePackage.CHOICE: return createChoice(); - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL: return createExecutionTraceModel(); - case Gemoc_execution_tracePackage.SOLVER_STATE: return createSolverState(); - case Gemoc_execution_tracePackage.MODEL_STATE: return createModelState(); - case Gemoc_execution_tracePackage.CONTEXT_STATE: return createContextState(); - case Gemoc_execution_tracePackage.BRANCH: return createBranch(); - 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 Gemoc_execution_tracePackage.ISERIALIZABLE: - return createISerializableFromString(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 Gemoc_execution_tracePackage.ISERIALIZABLE: - return convertISerializableToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Choice createChoice() { - ChoiceImpl choice = new ChoiceImpl(); - return choice; - } - - /** - * - * - * @generated - */ - public ExecutionTraceModel createExecutionTraceModel() { - ExecutionTraceModelImpl executionTraceModel = new ExecutionTraceModelImpl(); - return executionTraceModel; - } - - /** - * - * - * @generated - */ - public SolverState createSolverState() { - SolverStateImpl solverState = new SolverStateImpl(); - return solverState; - } - - /** - * - * - * @generated - */ - public ModelState createModelState() { - ModelStateImpl modelState = new ModelStateImpl(); - return modelState; - } - - /** - * - * - * @generated - */ - public ContextState createContextState() { - ContextStateImpl contextState = new ContextStateImpl(); - return contextState; - } - - /** - * - * - * @generated - */ - public Branch createBranch() { - BranchImpl branch = new BranchImpl(); - return branch; - } - - /** - * - * - * @generated - */ - public byte[] createISerializableFromString(EDataType eDataType, String initialValue) { - return (byte[])super.createFromString(initialValue); - } - - /** - * - * - * @generated - */ - public String convertISerializableToString(EDataType eDataType, Object instanceValue) { - return super.convertToString(instanceValue); - } - - /** - * - * - * @generated - */ - public Gemoc_execution_tracePackage getGemoc_execution_tracePackage() { - return (Gemoc_execution_tracePackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static Gemoc_execution_tracePackage getPackage() { - return Gemoc_execution_tracePackage.eINSTANCE; - } - -} //Gemoc_execution_traceFactoryImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java deleted file mode 100644 index 59fc1efa9..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/Gemoc_execution_tracePackageImpl.java +++ /dev/null @@ -1,522 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.TracePackage; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_traceFactory; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class Gemoc_execution_tracePackageImpl extends EPackageImpl implements Gemoc_execution_tracePackage { - /** - * - * - * @generated - */ - private EClass choiceEClass = null; - - /** - * - * - * @generated - */ - private EClass executionTraceModelEClass = null; - - /** - * - * - * @generated - */ - private EClass solverStateEClass = null; - - /** - * - * - * @generated - */ - private EClass modelStateEClass = null; - - /** - * - * - * @generated - */ - private EClass contextStateEClass = null; - - /** - * - * - * @generated - */ - private EClass branchEClass = null; - - /** - * - * - * @generated - */ - private EDataType iSerializableEDataType = 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage#eNS_URI - * @see #init() - * @generated - */ - private Gemoc_execution_tracePackageImpl() { - super(eNS_URI, Gemoc_execution_traceFactory.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 Gemoc_execution_tracePackage#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 Gemoc_execution_tracePackage init() { - if (isInited) return (Gemoc_execution_tracePackage)EPackage.Registry.INSTANCE.getEPackage(Gemoc_execution_tracePackage.eNS_URI); - - // Obtain or create and register package - Gemoc_execution_tracePackageImpl theGemoc_execution_tracePackage = (Gemoc_execution_tracePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Gemoc_execution_tracePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Gemoc_execution_tracePackageImpl()); - - isInited = true; - - // Initialize simple dependencies - TracePackage.eINSTANCE.eClass(); - - // Create package meta-data objects - theGemoc_execution_tracePackage.createPackageContents(); - - // Initialize created meta-data - theGemoc_execution_tracePackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theGemoc_execution_tracePackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(Gemoc_execution_tracePackage.eNS_URI, theGemoc_execution_tracePackage); - return theGemoc_execution_tracePackage; - } - - /** - * - * - * @generated - */ - public EClass getChoice() { - return choiceEClass; - } - - /** - * - * - * @generated - */ - public EReference getChoice_NextChoices() { - return (EReference)choiceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getChoice_PossibleLogicalSteps() { - return (EReference)choiceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getChoice_ChosenLogicalStep() { - return (EReference)choiceEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getChoice_ContextState() { - return (EReference)choiceEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getChoice_PreviousChoice() { - return (EReference)choiceEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getChoice_SelectedNextChoice() { - return (EReference)choiceEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getChoice_Branch() { - return (EReference)choiceEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EClass getExecutionTraceModel() { - return executionTraceModelEClass; - } - - /** - * - * - * @generated - */ - public EReference getExecutionTraceModel_Choices() { - return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getExecutionTraceModel_Branches() { - return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getExecutionTraceModel_ReachedStates() { - return (EReference)executionTraceModelEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getSolverState() { - return solverStateEClass; - } - - /** - * - * - * @generated - */ - public EReference getSolverState_Model() { - return (EReference)solverStateEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getSolverState_SerializableModel() { - return (EAttribute)solverStateEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getModelState() { - return modelStateEClass; - } - - /** - * - * - * @generated - */ - public EReference getModelState_Model() { - return (EReference)modelStateEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getModelState_ContextState() { - return (EReference)modelStateEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getContextState() { - return contextStateEClass; - } - - /** - * - * - * @generated - */ - public EReference getContextState_ModelState() { - return (EReference)contextStateEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getContextState_SolverState() { - return (EReference)contextStateEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getContextState_Choice() { - return (EReference)contextStateEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getBranch() { - return branchEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getBranch_StartIndex() { - return (EAttribute)branchEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getBranch_StopIndex() { - return (EAttribute)branchEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getBranch_Choices() { - return (EReference)branchEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EDataType getISerializable() { - return iSerializableEDataType; - } - - /** - * - * - * @generated - */ - public Gemoc_execution_traceFactory getGemoc_execution_traceFactory() { - return (Gemoc_execution_traceFactory)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 - choiceEClass = createEClass(CHOICE); - createEReference(choiceEClass, CHOICE__NEXT_CHOICES); - createEReference(choiceEClass, CHOICE__POSSIBLE_LOGICAL_STEPS); - createEReference(choiceEClass, CHOICE__CHOSEN_LOGICAL_STEP); - createEReference(choiceEClass, CHOICE__CONTEXT_STATE); - createEReference(choiceEClass, CHOICE__PREVIOUS_CHOICE); - createEReference(choiceEClass, CHOICE__SELECTED_NEXT_CHOICE); - createEReference(choiceEClass, CHOICE__BRANCH); - - executionTraceModelEClass = createEClass(EXECUTION_TRACE_MODEL); - createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__CHOICES); - createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__BRANCHES); - createEReference(executionTraceModelEClass, EXECUTION_TRACE_MODEL__REACHED_STATES); - - solverStateEClass = createEClass(SOLVER_STATE); - createEReference(solverStateEClass, SOLVER_STATE__MODEL); - createEAttribute(solverStateEClass, SOLVER_STATE__SERIALIZABLE_MODEL); - - modelStateEClass = createEClass(MODEL_STATE); - createEReference(modelStateEClass, MODEL_STATE__MODEL); - createEReference(modelStateEClass, MODEL_STATE__CONTEXT_STATE); - - contextStateEClass = createEClass(CONTEXT_STATE); - createEReference(contextStateEClass, CONTEXT_STATE__MODEL_STATE); - createEReference(contextStateEClass, CONTEXT_STATE__SOLVER_STATE); - createEReference(contextStateEClass, CONTEXT_STATE__CHOICE); - - branchEClass = createEClass(BRANCH); - createEAttribute(branchEClass, BRANCH__START_INDEX); - createEAttribute(branchEClass, BRANCH__STOP_INDEX); - createEReference(branchEClass, BRANCH__CHOICES); - - // Create data types - iSerializableEDataType = createEDataType(ISERIALIZABLE); - } - - /** - * - * - * @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 - TracePackage theTracePackage = (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); - EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - - // Initialize classes, features, and operations; add parameters - initEClass(choiceEClass, Choice.class, "Choice", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getChoice_NextChoices(), this.getChoice(), this.getChoice_PreviousChoice(), "nextChoices", null, 0, -1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_PossibleLogicalSteps(), theTracePackage.getStep(), null, "possibleLogicalSteps", null, 0, -1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_ChosenLogicalStep(), theTracePackage.getStep(), null, "chosenLogicalStep", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_ContextState(), this.getContextState(), this.getContextState_Choice(), "contextState", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_PreviousChoice(), this.getChoice(), this.getChoice_NextChoices(), "previousChoice", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_SelectedNextChoice(), this.getChoice(), null, "selectedNextChoice", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getChoice_Branch(), this.getBranch(), this.getBranch_Choices(), "branch", null, 1, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(executionTraceModelEClass, ExecutionTraceModel.class, "ExecutionTraceModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getExecutionTraceModel_Choices(), this.getChoice(), null, "choices", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExecutionTraceModel_Branches(), this.getBranch(), null, "branches", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExecutionTraceModel_ReachedStates(), this.getModelState(), null, "reachedStates", null, 0, -1, ExecutionTraceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(solverStateEClass, SolverState.class, "SolverState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getSolverState_Model(), ecorePackage.getEObject(), null, "model", null, 1, 1, SolverState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSolverState_SerializableModel(), this.getISerializable(), "serializableModel", null, 0, 1, SolverState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(modelStateEClass, ModelState.class, "ModelState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getModelState_Model(), ecorePackage.getEObject(), null, "model", null, 1, 1, ModelState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getModelState_ContextState(), this.getContextState(), this.getContextState_ModelState(), "contextState", null, 0, -1, ModelState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(contextStateEClass, ContextState.class, "ContextState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getContextState_ModelState(), this.getModelState(), this.getModelState_ContextState(), "modelState", null, 1, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getContextState_SolverState(), this.getSolverState(), null, "solverState", null, 1, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getContextState_Choice(), this.getChoice(), this.getChoice_ContextState(), "choice", null, 0, 1, ContextState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(branchEClass, Branch.class, "Branch", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getBranch_StartIndex(), theEcorePackage.getEInt(), "startIndex", null, 0, 1, Branch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBranch_StopIndex(), theEcorePackage.getEInt(), "stopIndex", null, 0, 1, Branch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getBranch_Choices(), this.getChoice(), this.getChoice_Branch(), "choices", null, 0, -1, Branch.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); - - // Create resource - createResource(eNS_URI); - } - -} //Gemoc_execution_tracePackageImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ModelStateImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ModelStateImpl.java deleted file mode 100644 index e8d5c6075..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/ModelStateImpl.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.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.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.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState; - -/** - * - * An implementation of the model object 'Model State'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl#getModel Model}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.ModelStateImpl#getContextState Context State}
  • - *
- * - * @generated - */ -public class ModelStateImpl extends MinimalEObjectImpl.Container implements ModelState { - /** - * The cached value of the '{@link #getModel() Model}' reference. - * - * - * @see #getModel() - * @generated - * @ordered - */ - protected EObject model; - - /** - * The cached value of the '{@link #getContextState() Context State}' reference list. - * - * - * @see #getContextState() - * @generated - * @ordered - */ - protected EList contextState; - - /** - * - * - * @generated - */ - protected ModelStateImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.MODEL_STATE; - } - - /** - * - * - * @generated - */ - public EObject getModel() { - if (model != null && model.eIsProxy()) { - InternalEObject oldModel = (InternalEObject)model; - model = eResolveProxy(oldModel); - if (model != oldModel) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.MODEL_STATE__MODEL, oldModel, model)); - } - } - return model; - } - - /** - * - * - * @generated - */ - public EObject basicGetModel() { - return model; - } - - /** - * - * - * @generated - */ - public void setModel(EObject newModel) { - EObject oldModel = model; - model = newModel; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.MODEL_STATE__MODEL, oldModel, model)); - } - - /** - * - * - * @generated - */ - public EList getContextState() { - if (contextState == null) { - contextState = new EObjectWithInverseResolvingEList(ContextState.class, this, Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE, Gemoc_execution_tracePackage.CONTEXT_STATE__MODEL_STATE); - } - return contextState; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - return ((InternalEList)(InternalEList)getContextState()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - return ((InternalEList)getContextState()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: - if (resolve) return getModel(); - return basicGetModel(); - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - return getContextState(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: - setModel((EObject)newValue); - return; - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - getContextState().clear(); - getContextState().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: - setModel((EObject)null); - return; - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - getContextState().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.MODEL_STATE__MODEL: - return model != null; - case Gemoc_execution_tracePackage.MODEL_STATE__CONTEXT_STATE: - return contextState != null && !contextState.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ModelStateImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/SolverStateImpl.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/SolverStateImpl.java deleted file mode 100644 index 1cc67502b..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/impl/SolverStateImpl.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.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.emf.ecore.impl.MinimalEObjectImpl; - -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage; -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState; - -/** - * - * An implementation of the model object 'Solver State'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl#getModel Model}
  • - *
  • {@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl.SolverStateImpl#getSerializableModel Serializable Model}
  • - *
- * - * @generated - */ -public class SolverStateImpl extends MinimalEObjectImpl.Container implements SolverState { - /** - * The cached value of the '{@link #getModel() Model}' reference. - * - * - * @see #getModel() - * @generated - * @ordered - */ - protected EObject model; - - /** - * The default value of the '{@link #getSerializableModel() Serializable Model}' attribute. - * - * - * @see #getSerializableModel() - * @generated - * @ordered - */ - protected static final byte[] SERIALIZABLE_MODEL_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSerializableModel() Serializable Model}' attribute. - * - * - * @see #getSerializableModel() - * @generated - * @ordered - */ - protected byte[] serializableModel = SERIALIZABLE_MODEL_EDEFAULT; - - /** - * - * - * @generated - */ - protected SolverStateImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Gemoc_execution_tracePackage.Literals.SOLVER_STATE; - } - - /** - * - * - * @generated - */ - public EObject getModel() { - if (model != null && model.eIsProxy()) { - InternalEObject oldModel = (InternalEObject)model; - model = eResolveProxy(oldModel); - if (model != oldModel) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Gemoc_execution_tracePackage.SOLVER_STATE__MODEL, oldModel, model)); - } - } - return model; - } - - /** - * - * - * @generated - */ - public EObject basicGetModel() { - return model; - } - - /** - * - * - * @generated - */ - public void setModel(EObject newModel) { - EObject oldModel = model; - model = newModel; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.SOLVER_STATE__MODEL, oldModel, model)); - } - - /** - * - * - * @generated - */ - public byte[] getSerializableModel() { - return serializableModel; - } - - /** - * - * - * @generated - */ - public void setSerializableModel(byte[] newSerializableModel) { - byte[] oldSerializableModel = serializableModel; - serializableModel = newSerializableModel; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL, oldSerializableModel, serializableModel)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: - if (resolve) return getModel(); - return basicGetModel(); - case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: - return getSerializableModel(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: - setModel((EObject)newValue); - return; - case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: - setSerializableModel((byte[])newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: - setModel((EObject)null); - return; - case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: - setSerializableModel(SERIALIZABLE_MODEL_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Gemoc_execution_tracePackage.SOLVER_STATE__MODEL: - return model != null; - case Gemoc_execution_tracePackage.SOLVER_STATE__SERIALIZABLE_MODEL: - return SERIALIZABLE_MODEL_EDEFAULT == null ? serializableModel != null : !SERIALIZABLE_MODEL_EDEFAULT.equals(serializableModel); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (serializableModel: "); - result.append(serializableModel); - result.append(')'); - return result.toString(); - } - -} //SolverStateImpl diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java deleted file mode 100644 index 01a9ede92..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceAdapterFactory.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.*; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage - * @generated - */ -public class Gemoc_execution_traceAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static Gemoc_execution_tracePackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public Gemoc_execution_traceAdapterFactory() { - if (modelPackage == null) { - modelPackage = Gemoc_execution_tracePackage.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 Gemoc_execution_traceSwitch modelSwitch = - new Gemoc_execution_traceSwitch() { - @Override - public Adapter caseChoice(Choice object) { - return createChoiceAdapter(); - } - @Override - public Adapter caseExecutionTraceModel(ExecutionTraceModel object) { - return createExecutionTraceModelAdapter(); - } - @Override - public Adapter caseSolverState(SolverState object) { - return createSolverStateAdapter(); - } - @Override - public Adapter caseModelState(ModelState object) { - return createModelStateAdapter(); - } - @Override - public Adapter caseContextState(ContextState object) { - return createContextStateAdapter(); - } - @Override - public Adapter caseBranch(Branch object) { - return createBranchAdapter(); - } - @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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice Choice}'. - * - * 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Choice - * @generated - */ - public Adapter createChoiceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel Execution Trace Model}'. - * - * 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel - * @generated - */ - public Adapter createExecutionTraceModelAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState Solver 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.SolverState - * @generated - */ - public Adapter createSolverStateAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState Model 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ModelState - * @generated - */ - public Adapter createModelStateAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState Context 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ContextState - * @generated - */ - public Adapter createContextStateAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch Branch}'. - * - * 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Branch - * @generated - */ - public Adapter createBranchAdapter() { - 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; - } - -} //Gemoc_execution_traceAdapterFactory diff --git a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java b/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java deleted file mode 100644 index 31f7e2afe..000000000 --- a/framework/framework_commons/plugins/org.gemoc.executionframework.reflectivetrace.model/src/org/gemoc/executionframework/reflectivetrace/gemoc_execution_trace/util/Gemoc_execution_traceSwitch.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - */ -package org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.util; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.util.Switch; - -import org.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.*; - -/** - * - * 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.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.Gemoc_execution_tracePackage - * @generated - */ -public class Gemoc_execution_traceSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static Gemoc_execution_tracePackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public Gemoc_execution_traceSwitch() { - if (modelPackage == null) { - modelPackage = Gemoc_execution_tracePackage.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 Gemoc_execution_tracePackage.CHOICE: { - Choice choice = (Choice)theEObject; - T result = caseChoice(choice); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.EXECUTION_TRACE_MODEL: { - ExecutionTraceModel executionTraceModel = (ExecutionTraceModel)theEObject; - T result = caseExecutionTraceModel(executionTraceModel); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.SOLVER_STATE: { - SolverState solverState = (SolverState)theEObject; - T result = caseSolverState(solverState); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.MODEL_STATE: { - ModelState modelState = (ModelState)theEObject; - T result = caseModelState(modelState); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.CONTEXT_STATE: { - ContextState contextState = (ContextState)theEObject; - T result = caseContextState(contextState); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Gemoc_execution_tracePackage.BRANCH: { - Branch branch = (Branch)theEObject; - T result = caseBranch(branch); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Choice'. - * - * 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 'Choice'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseChoice(Choice object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Execution Trace Model'. - * - * 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 'Execution Trace Model'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseExecutionTraceModel(ExecutionTraceModel object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Solver 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 'Solver State'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSolverState(SolverState object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Model 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 'Model State'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseModelState(ModelState object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Context 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 'Context State'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseContextState(ContextState object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Branch'. - * - * 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 'Branch'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBranch(Branch 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; - } - -} //Gemoc_execution_traceSwitch diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.project b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.project deleted file mode 100644 index a3cd1130e..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.gemoc.xdsmlframework.api - - - - - - 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/framework_commons/plugins/org.gemoc.xdsmlframework.api/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/META-INF/MANIFEST.MF deleted file mode 100644 index e9c6caf98..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Gemoc Language Api -Bundle-SymbolicName: org.gemoc.xdsmlframework.api;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.xdsmlframework.api.Activator -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore, - org.gemoc.executionframework.reflectivetrace.model;bundle-version="0.1.0", - org.gemoc.commons.eclipse;bundle-version="0.1.0", - org.eclipse.xtend.lib, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: org.gemoc.xdsmlframework.api, - org.gemoc.xdsmlframework.api.core, - org.gemoc.xdsmlframework.api.engine_addon, - org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener, - org.gemoc.xdsmlframework.api.extensions, - org.gemoc.xdsmlframework.api.extensions.engine_addon, - org.gemoc.xdsmlframework.api.extensions.engine_addon_group, - org.gemoc.xdsmlframework.api.extensions.languages diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/build.properties b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/build.properties deleted file mode 100644 index f66ac1fbd..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - schema/,\ - about.html -src.includes = about.html diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/plugin.xml b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/plugin.xml deleted file mode 100644 index c890c12a3..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/plugin.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/pom.xml b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/pom.xml deleted file mode 100644 index 694ed8965..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.framework.commons - org.gemoc.modeldebugging.framework.commons.root - 0.1.0-SNAPSHOT - - - org.gemoc.xdsmlframework.api - eclipse-plugin - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - \ No newline at end of file diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/Activator.java b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/Activator.java deleted file mode 100644 index 5944524bd..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/Activator.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.api; - -import org.eclipse.core.runtime.Plugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends Plugin -{ - - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.xdsmlframework.api"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionEngine.java b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionEngine.java deleted file mode 100644 index 38b8c6d64..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/core/IExecutionEngine.java +++ /dev/null @@ -1,90 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.api.core; - -import java.util.Deque; -import java.util.Set; - -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; - -/** - * The interface of the GEMOC Execution Engine. The Execution Engine is an - * entity able to execute models conforming to an xDSML as defined in the GEMOC - * ANR INS project. This API allows the caller to initialize the engine for a - * given model, and to run the engine in different ways. It also allows the - * caller to influence the constraints of the MoC at runtime. - * - * @author didier.vojtisek@inria.fr - * - */ -public interface IExecutionEngine extends IDisposable { - - Deque getCurrentStack(); - - MSEOccurrence getCurrentMSEOccurrence(); - - /** - * Starts the {@link IExecutionEngine}. - */ - void start(); - - /** - * Asks the engine to stop - */ - void stop(); - - EngineStatus getEngineStatus(); - - void setEngineStatus(RunStatus status); - - /** - * - * @param type - * @return true if the engine has the addon, false otherwise. - */ - boolean hasAddon(Class type); - - /** - * - * @param type - * @return The capability of the given type if it exists. - */ - T getAddon(Class type); - - IExecutionContext getExecutionContext(); - - RunStatus getRunningStatus(); - - Set getAddonsTypedBy(Class type); - - void initialize(IExecutionContext executionContext); - - default LaunchConfiguration extractLaunchConfiguration() { - return null; - } - - /** - * - * @return a user display name for the engine kind (will be used to compute - * the full name of the engine instance) - */ - String engineKindName(); - - /** - * - * @return a displayable name to identify this engine - */ - String getName(); -} diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/DefaultEngineAddon.java b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/DefaultEngineAddon.java deleted file mode 100644 index 29aba0913..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/DefaultEngineAddon.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.api.engine_addon; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; - -import fr.inria.diverse.trace.commons.model.trace.Step; - -public class DefaultEngineAddon implements IEngineAddon { - - @Override - public void engineAboutToStart(IExecutionEngine engine) { - } - - @Override - public void engineStarted(IExecutionEngine executionEngine) { - } - - @Override - public void aboutToSelectStep(IExecutionEngine engine, Collection 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.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java deleted file mode 100644 index 2ff88e17f..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.api.engine_addon; - -import java.util.Collection; -import java.util.List; - -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; - -import fr.inria.diverse.trace.commons.model.trace.Step; - -public interface IEngineAddon { - - /** - * Operation called before the engine starts - */ - public void engineAboutToStart(IExecutionEngine engine); - - /** - * Operation called after the engine have started - */ - public void engineStarted(IExecutionEngine executionEngine); - - public void engineAboutToStop(IExecutionEngine engine); - - /** - * Operation called after the engine has been stopped - */ - public void engineStopped(IExecutionEngine engine); - - /** - * Operation before the engine has been disposed (and after the engine has - * been stopped) - */ - public void engineAboutToDispose(IExecutionEngine engine); - - /** - * Operation called before the Step has been chosen - */ - public void aboutToSelectStep(IExecutionEngine engine, Collection steps); - - 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); - - public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute); - - public void stepExecuted(IExecutionEngine engine, Step stepExecuted); - - public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus); - - /** - * This operation check the current addon compatibility with elements in - * 'otherAddons' - * - * @return A list of error messages if the check failed or an empty list - * otherwise. - */ - public List validate(List otherAddons); - -} diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/BatchModelChangeListenerAddon.xtend b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/BatchModelChangeListenerAddon.xtend deleted file mode 100644 index e7cde8654..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/BatchModelChangeListenerAddon.xtend +++ /dev/null @@ -1,246 +0,0 @@ -package org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener; - -import java.util.ArrayList -import java.util.Collection -import java.util.HashMap -import java.util.HashSet -import java.util.List -import java.util.Map -import java.util.Set -import org.eclipse.emf.common.notify.Notification -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.emf.ecore.util.EContentAdapter -import org.gemoc.commons.eclipse.emf.EMFResource -import org.gemoc.xdsmlframework.api.engine_addon.DefaultEngineAddon -import org.gemoc.xdsmlframework.api.core.IExecutionEngine - -/** - * This model listener gathers EMF notifications, and computes when asked a - * set of ModelChange objects to reflect what happened in a more abstract - * and concise way. - * - * For instance, if a field changed multiple times in between two queries to - * the model listener, a single ModelChange object will be computed to reflect that change, - * instead of a list of many EMF Notifications. - * - * A ModelChange can be a new/removed object in the model, or a change in a field. - * See associated class. - * - */ -public class BatchModelChangeListenerAddon extends DefaultEngineAddon { - - private EContentAdapter adapter; - private IExecutionEngine engine; - private Map> changes = new HashMap - private Set registeredObservers = new HashSet - - public new(IExecutionEngine engine) { - this.engine = engine; - engine.executionContext.executionPlatform.addEngineAddon(this) - /* - * We create an adapter that stores and sort all the notifications for each object and field. - * This avoids us to sort everything afterwards. - */ - this.adapter = new EContentAdapter() { - override void notifyChanged(Notification notification) { - super.notifyChanged(notification); - for (obs : registeredObservers) { - changes.get(obs).add(notification) - } - } - }; - val Set allResources = EMFResource.getRelatedResources( - this.engine.getExecutionContext().getResourceModel()); - allResources.forEach [ r | - if (r != null) { - r.eAdapters().add(adapter); - } - ] - - } - - /** - * When an observer asks for the changes, we process all the notifications gathered for it since the last time. - */ - def List getChanges(Object addon) { - val List result = new ArrayList() - val List allNotifs = changes.get(addon); - if (registeredObservers.contains(addon)) { - changes.put( - addon, - new ArrayList() - ); - } - - // First we sort everything per object and field - val Map>> sortedNotifications = new HashMap - val Map> resourcesNotifications = new HashMap - for (Notification notification : allNotifs) { - val int eventType = notification.getEventType(); - if (eventType < Notification.EVENT_TYPE_COUNT && !notification.isTouch()) { - - if (notification.getNotifier() instanceof EObject && - notification.getFeature() instanceof EStructuralFeature) { - val EStructuralFeature feature = notification.getFeature() as EStructuralFeature; - val EObject changedObject = notification.getNotifier() as EObject; - if (!sortedNotifications.containsKey(changedObject)) { - sortedNotifications.put(changedObject, new HashMap) - } - val Map> objectsNotifications = sortedNotifications.get( - changedObject); - if (!objectsNotifications.containsKey(feature)) { - objectsNotifications.put(feature, new ArrayList) - } - val List fieldNotifications = objectsNotifications.get(feature); - fieldNotifications.add(notification); - } else if (notification.getNotifier() instanceof Resource) { - val Resource resource = notification.notifier as Resource - if (!resourcesNotifications.containsKey(resource)) - resourcesNotifications.put(resource, new ArrayList) - val resourceNotifications = resourcesNotifications.get(resource) - resourceNotifications.add(notification) - } - } - } - - val newObjects = new HashSet - val removedObjects = new HashSet - - // First we find new objects added or removed at the root of the resource - for (resource : resourcesNotifications.keySet) { - val resourceNotifications = resourcesNotifications.get(resource) - for (Notification notif : resourceNotifications) { - org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.BatchModelChangeListenerAddon. - manageCollectionContainmentNotification(removedObjects, newObjects, notif) - } - } - - // Next we read all that and try to interpret everything as coarse grained model changes - for (object : sortedNotifications.keySet) { - val featureMap = sortedNotifications.get(object) - for (feature : featureMap.keySet) { - val notifs = featureMap.get(feature) - - // Case multiplicity 0..1: we compare the original value and the new one at the end of the step - if (!feature.isMany) { - - val previousValue = notifs.head.oldValue - val newValue = notifs.last.newValue - - // Case objects: we compare references - if (feature instanceof EReference) { - if (previousValue != newValue) { - - // Register model change - result.add(new NonCollectionFieldModelChange(object, feature)) - - // Register potentially new or removed object - if ((feature as EReference).containment) { - if (previousValue != null && previousValue instanceof EObject) - addToRemovedObjects(removedObjects, newObjects, previousValue as EObject) - if (newValue != null && newValue instanceof EObject) - addToNewObjects(removedObjects, newObjects, newValue as EObject) - } - } - } // Case data types: we compare values - else if (if (previousValue == null) { - newValue != null - } else { - !previousValue.equals(newValue) - }) { - - // Register model change - result.add(new NonCollectionFieldModelChange(object, feature)) - } - - } // Case multiplicity 0..*: we consider that there was a potential change, but maybe following - // all the adds ands remove, the collection went back to its state before the step - else { - - // Very hard to decide if a collection has changed or not based on the notifications, - // (e.g. if we remove and add the same object, the collection in fact doesn't change) - // and we don't have a direct access to the previous content of the collection to compare - // similarly to what we do in a trace manager. - // So for now we simply state a "potential change", and the trace manager will have to compute - // itself if there was a real change. - result.add(new PotentialCollectionFieldModelChange(object, feature, notifs)) - - // Yet we must still find new/removed objects - for (notif : notifs) { - - if (feature instanceof EReference && (feature as EReference).containment) { - org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.BatchModelChangeListenerAddon. - manageCollectionContainmentNotification(removedObjects, newObjects, notif) - } - } - } - } - } - - // Finally we register the new and removed objects from the model - for (newObject : newObjects) { - result.add(0, new NewObjectModelChange(newObject)) - } - for (removedObject : removedObjects) { - result.add(0, new RemovedObjectModelChange(removedObject)) - } - - return result; - } - - def boolean registerObserver(Object observer) { - val boolean res = registeredObservers.add(observer); - if (res) { - changes.put(observer, new ArrayList()); - } - return res; - } - - private static def void addToNewObjects(Collection removedObjects, Collection newObjects, - EObject object) { - if (object != null) { - val hasMoved = removedObjects.remove(object) - if (!hasMoved) - newObjects.add(object) - } - } - - private static def void addToRemovedObjects(Collection removedObjects, Collection newObjects, - EObject object) { - if (object != null) { - val hasMoved = newObjects.remove(object) - if (!hasMoved) - removedObjects.add(object) - - } - } - - // TODO manage objects already contained in new objects ... ? - private static def void manageCollectionContainmentNotification(Collection removedObjects, - Collection newObjects, Notification notif) { - switch (notif.eventType) { - case Notification.ADD: - addToNewObjects(removedObjects, newObjects, notif.newValue as EObject) - case Notification.ADD_MANY: - for (add : notif.newValue as List) - addToNewObjects(removedObjects, newObjects, add) - case Notification.REMOVE: - addToRemovedObjects(removedObjects, newObjects, notif.oldValue as EObject) - case Notification.REMOVE_MANY: - for (remove : notif.oldValue as List) - addToNewObjects(removedObjects, newObjects, remove) - } - } - - override void engineAboutToStop(IExecutionEngine engine) { - val Set allResources = EMFResource.getRelatedResources( - this.engine.getExecutionContext().getResourceModel()); - for (r : allResources.filter[r|r != null]) { - r.eAdapters().remove(adapter); - } - } - -} diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/ModelChange.xtend b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/ModelChange.xtend deleted file mode 100644 index cd3509dc1..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/ModelChange.xtend +++ /dev/null @@ -1,69 +0,0 @@ -package org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener - -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.ecore.EStructuralFeature -import org.eclipse.xtend.lib.annotations.Accessors -import java.util.List -import org.eclipse.emf.common.notify.Notification - -abstract class ModelChange { - - @Accessors(PROTECTED_SETTER,PUBLIC_GETTER) - EObject changedObject - - new(EObject changedObject) { - this.changedObject = changedObject - } - -} - -class NewObjectModelChange extends ModelChange { - - new(EObject changedObject) { - super(changedObject) - } - -} - -class RemovedObjectModelChange extends ModelChange { - - new(EObject changedObject) { - super(changedObject) - } - -} - -abstract class FieldModelChange extends ModelChange { - - @Accessors(PROTECTED_SETTER,PUBLIC_GETTER) - EStructuralFeature changedField - - new(EObject changedObject, EStructuralFeature changedField) { - super(changedObject) - this.changedField = changedField - - } - -} - -class PotentialCollectionFieldModelChange extends FieldModelChange { - - @Accessors(PROTECTED_SETTER,PUBLIC_GETTER) - Object emfNotifications - - new(EObject changedObject, EStructuralFeature changedField, List notifications) { - super(changedObject, changedField) - this.emfNotifications = notifications - } - -} - -class NonCollectionFieldModelChange extends FieldModelChange { - - - new(EObject changedObject, EStructuralFeature changedField) { - super(changedObject, changedField) - } - -} - \ No newline at end of file diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.project b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.project deleted file mode 100644 index 09d6198de..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.gemoc.xdsmlframework.commons - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/META-INF/MANIFEST.MF b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/META-INF/MANIFEST.MF deleted file mode 100644 index 798a44347..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: org.gemoc.xdsmlframework.commons -Bundle-SymbolicName: org.gemoc.xdsmlframework.commons -Bundle-Version: 0.1.0.qualifier -Require-Bundle: org.eclipse.emf.ecore, - org.eclipse.xtend.lib -Export-Package: org.gemoc.xdsmlframework.commons -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/build.properties b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/build.properties deleted file mode 100644 index 5fcf9a32a..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/,\ - xtend-gen/ -bin.includes = META-INF/,\ - .,\ - about.html -output.. = bin/ -src.includes = about.html diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/pom.xml b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/pom.xml deleted file mode 100644 index b4ffb3f95..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.framework.commons - org.gemoc.modeldebugging.framework.commons.root - 0.1.0-SNAPSHOT - - - org.gemoc.xdsmlframework.commons - eclipse-plugin - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - diff --git a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/src/org/gemoc/xdsmlframework/commons/DynamicAnnotationHelper.xtend b/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/src/org/gemoc/xdsmlframework/commons/DynamicAnnotationHelper.xtend deleted file mode 100644 index 8b30a10b4..000000000 --- a/framework/framework_commons/plugins/org.gemoc.xdsmlframework.commons/src/org/gemoc/xdsmlframework/commons/DynamicAnnotationHelper.xtend +++ /dev/null @@ -1,21 +0,0 @@ -package org.gemoc.xdsmlframework.commons - -import org.eclipse.emf.ecore.EModelElement -import org.eclipse.emf.ecore.EStructuralFeature -import org.eclipse.emf.ecore.EClass - -class DynamicAnnotationHelper { - public static val DYNAMIC_ANNOTATION_URI = "aspect" - - private static def boolean isDynamic(EModelElement o) { - return o.EAnnotations.exists[a|a.source.equals(DYNAMIC_ANNOTATION_URI)] - } - - public static def boolean isDynamic(EClass c) { - return isDynamic(c as EModelElement) - } - - public static def boolean isDynamic(EStructuralFeature p) { - return isDynamic(p as EModelElement) || isDynamic(p.EContainingClass) - } -} \ No newline at end of file diff --git a/framework/framework_commons/pom.xml b/framework/framework_commons/pom.xml index ad2a53abb..08d1fc0c4 100644 --- a/framework/framework_commons/pom.xml +++ b/framework/framework_commons/pom.xml @@ -3,29 +3,31 @@ 4.0.0 org.gemoc.modeldebugging.framework.commons org.gemoc.modeldebugging.framework.commons.root - 0.1.0-SNAPSHOT + 2.3.0-SNAPSHOT pom - org.gemoc - org.gemoc.siriusanimation.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.root + 2.3.0-SNAPSHOT ../.. - plugins/org.gemoc.xdsmlframework.api - plugins/org.gemoc.executionframework.reflectivetrace.model - - plugins/org.gemoc.xdsmlframework.commons + plugins/org.eclipse.gemoc.xdsmlframework.api + plugins/org.eclipse.gemoc.executionframework.reflectivetrace.model + plugins/org.eclipse.gemoc.xdsmlframework.commons + + plugins/org.eclipse.gemoc.opsemanticsview.gen + plugins/org.eclipse.gemoc.opsemanticsview.gen.k3 + plugins/org.eclipse.gemoc.opsemanticsview.model - - releng/org.gemoc.modeldebugging.framework.commons.feature - releng/org.gemoc.modeldebugging.framework.commons.repository + + releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature - + @@ -55,12 +57,7 @@ gemoc-studio_commons on CI p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.gemoc.commons.repository/target/repository/ - - - gemoc-studio_gemoc_commons on CI - p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_gemoc_commons/lastSuccessfulBuild/artifact/gemoc_commons/releng/org.gemoc.gemoc_commons.repository/target/repository/ + https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.eclipse.gemoc.commons.repository/target/repository/ diff --git a/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/.gitignore b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.gitignore similarity index 100% rename from framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/.gitignore rename to framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.gitignore diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.project b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.project new file mode 100644 index 000000000..9525cae94 --- /dev/null +++ b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.project @@ -0,0 +1,29 @@ + + + org.eclipse.gemoc.modeldebugging.framework.commons.feature + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.pde.FeatureBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.FeatureNature + + diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.settings/org.eclipse.core.resources.prefs b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..1ba0aed79 --- /dev/null +++ b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF8 diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.settings/org.eclipse.xtend.core.Xtend.prefs b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.settings/org.eclipse.xtend.core.Xtend.prefs new file mode 100644 index 000000000..9682a4c0a --- /dev/null +++ b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/.settings/org.eclipse.xtend.core.Xtend.prefs @@ -0,0 +1,7 @@ +//outlet.DEFAULT_OUTPUT.sourceFolder.src/main/java.directory=xtend-gen +//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend +BuilderConfiguration.is_project_specific=true +eclipse.preferences.version=1 +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/build.properties b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/build.properties new file mode 100644 index 000000000..f6d2f3ebf --- /dev/null +++ b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/feature.properties b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/feature.xml b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/feature.xml new file mode 100644 index 000000000..4f1cc7ec0 --- /dev/null +++ b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/feature.xml @@ -0,0 +1,79 @@ + + + + + + + List of plugins that are part of the execution framework + + + + Copyright (c) 2012, 2017 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 + + + + %license + + + + + + + + + + + + + + + + diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/gemocstudio32.png b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/gemocstudio32.png differ diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/license.html b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/pom.xml b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/pom.xml new file mode 100644 index 000000000..b074db679 --- /dev/null +++ b/framework/framework_commons/releng/org.eclipse.gemoc.modeldebugging.framework.commons.feature/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + ../../pom.xml + org.gemoc.modeldebugging.framework.commons + org.gemoc.modeldebugging.framework.commons.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.modeldebugging.framework.commons.feature + eclipse-feature + + \ No newline at end of file diff --git a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/build.properties b/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/build.properties deleted file mode 100644 index 25f8b7f02..000000000 --- a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = feature.xml,\ - . diff --git a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/feature.xml b/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/feature.xml deleted file mode 100644 index 52a62b261..000000000 --- a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/feature.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - List of plugins that are part of the execution framework - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - diff --git a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/pom.xml b/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/pom.xml deleted file mode 100644 index 3cf2ebb81..000000000 --- a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.feature/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../../pom.xml - org.gemoc.modeldebugging.framework.commons - org.gemoc.modeldebugging.framework.commons.root - 0.1.0-SNAPSHOT - - - org.gemoc.modeldebugging.framework.commons.feature - eclipse-feature - - \ No newline at end of file diff --git a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/category.xml b/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/category.xml deleted file mode 100644 index 366f7be8f..000000000 --- a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/category.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/pom.xml b/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/pom.xml deleted file mode 100644 index 78638e32a..000000000 --- a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../../pom.xml - org.gemoc.modeldebugging.framework.commons - 0.1.0-SNAPSHOT - org.gemoc.modeldebugging.framework.commons.root - - - org.gemoc.modeldebugging.framework.commons.repository - eclipse-repository - - \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.checkstyle b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/.classpath b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.classpath similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/.classpath rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.classpath diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.project b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.project new file mode 100644 index 000000000..8342ee142 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.xdsmlframework.extensions.sirius + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/.settings/org.eclipse.jdt.core.prefs b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/.settings/org.eclipse.jdt.core.prefs rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/META-INF/MANIFEST.MF b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/META-INF/MANIFEST.MF new file mode 100644 index 000000000..e75d13b45 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/META-INF/MANIFEST.MF @@ -0,0 +1,33 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Gemoc extension for Sirius +Bundle-SymbolicName: org.eclipse.gemoc.xdsmlframework.extensions.sirius;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.xdsmlframework.extensions.sirius.Activator +Require-Bundle: org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.sirius.diagram.ui;bundle-version="2.0.0", + org.eclipse.sirius.common;bundle-version="1.0.1", + org.eclipse.gmf.runtime.emf.core;bundle-version="1.7.0", + org.eclipse.gemoc.dsl.debug.ide.sirius.ui;bundle-version="1.0.0", + org.eclipse.sirius.ecore.extender;bundle-version="2.0.3", + org.eclipse.gef, + org.eclipse.xtext, + org.eclipse.debug.core;bundle-version="3.9.1", + org.eclipse.gemoc.dsl.debug;bundle-version="1.0.0", + org.eclipse.gemoc.dsl.debug.ide;bundle-version="1.0.0", + org.eclipse.gemoc.commons.eclipse, + org.eclipse.emf.codegen.ecore, + org.eclipse.ui.ide;bundle-version="3.10.2", + org.eclipse.emf.edit.ui, + org.eclipse.sirius.ext.base;bundle-version="2.0.7", + org.eclipse.core.filesystem, + org.eclipse.sirius.editor;bundle-version="2.0.7", + 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.pde +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.gemoc.xdsmlframework.extensions.sirius, + org.eclipse.gemoc.xdsmlframework.extensions.sirius.command, + org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards, + org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.pages diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/about.html b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/about.html similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/about.html rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/about.html diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/build.properties b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/build.properties new file mode 100644 index 000000000..6f7a25199 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/main/java/ +output.. = target/classes/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + about.html +src.includes = about.html diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/icons/IconeGemocLanguage-16.png b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/icons/IconeGemocLanguage-16.png similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/icons/IconeGemocLanguage-16.png rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/icons/IconeGemocLanguage-16.png diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/plugin.xml b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/plugin.xml new file mode 100644 index 000000000..aeb3eac69 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/plugin.xml @@ -0,0 +1,71 @@ + + + + + + + + + Create a debug/animation representation for a GEMOC language. May create a new project, or modify or extend an existing Viewpoint Specification. + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/pom.xml b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/pom.xml new file mode 100644 index 000000000..d7d7ad742 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/pom.xml @@ -0,0 +1,25 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.xdsmlframework + org.gemoc.modeldebugging.xdsmlframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.xdsmlframework.extensions.sirius + eclipse-plugin + \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/Activator.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/Activator.java new file mode 100644 index 000000000..e5037fe1e --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/Activator.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.extensions.sirius; + +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystem; +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystemManager; +import org.eclipse.gemoc.commons.eclipse.messagingsystem.ui.ConsoleLogLevel; +import org.eclipse.gemoc.commons.eclipse.messagingsystem.ui.EclipseMessagingSystem; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + + +public class Activator implements BundleActivator { + + private static BundleContext context; + + public static BundleContext getContext() { + return context; + } + + public static final String PLUGIN_ID = "org.eclipse.gemoc.xdsmlframework.extensions.sirius"; //$NON-NLS-1$ + + + protected static MessagingSystem messagingSystem = null; + + public static MessagingSystem getMessagingSystem() { + if (messagingSystem == null) + { + MessagingSystemManager msm = new MessagingSystemManager(); + messagingSystem = msm.createBestPlatformMessagingSystem(PLUGIN_ID, "Execution Engine"); + if (messagingSystem instanceof EclipseMessagingSystem) + ((EclipseMessagingSystem) messagingSystem).setConsoleLogLevel(ConsoleLogLevel.DEV_DEBUG); + } + return messagingSystem; + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/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 similarity index 91% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/command/AddDebugLayerHandler.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/command/AddDebugLayerHandler.java index 430b12df9..aca83ee41 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.extensions.sirius.command; +package org.eclipse.gemoc.xdsmlframework.extensions.sirius.command; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -66,6 +66,10 @@ import org.eclipse.sirius.viewpoint.description.tool.ToolPackage; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.Activator; +import org.osgi.framework.BundleException; + public class AddDebugLayerHandler extends AbstractHandler { @@ -114,6 +118,8 @@ protected void doExecute() { qualifiedServiceClassName); } }); + + updateManifest(project); } } catch (IOException e) { throw new ExecutionException( @@ -124,6 +130,18 @@ protected void doExecute() { } return null; } + + public static void updateManifest(final IProject project){ + ManifestChanger changer = new ManifestChanger(project); + try { + changer.addPluginDependency("org.eclipse.gemoc.executionframework.extensions.sirius"); + changer.addPluginDependency("org.eclipse.gemoc.execution.sequential.javaengine.ui"); + changer.commit(); + } catch (BundleException | IOException | CoreException e) { + Activator.getMessagingSystem().error(e.getMessage(), + Activator.PLUGIN_ID, e); + } + } public static void emfModifications(final IProgressMonitor monitor, final String layerName, final DiagramDescription description, @@ -236,15 +254,15 @@ public static Layer createLayer(DiagramDescription description, .createOperationAction(); debugAction.setName("Debug"); debugAction - .setIcon("/org.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); popupMenu.getMenuItemDescription().add(debugAction); ExternalJavaAction debugJavaAction = ToolPackage.eINSTANCE .getToolFactory().createExternalJavaAction(); debugJavaAction.setName("Debug"); debugJavaAction - .setId("org.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.gemocDebugAs"); + .setId("org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.gemocDebugAs"); debugJavaAction - .setIcon("/org.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); InitialOperation initialOperation = ToolPackage.eINSTANCE .getToolFactory().createInitialOperation(); initialOperation.setFirstModelOperations(debugJavaAction); @@ -254,15 +272,15 @@ public static Layer createLayer(DiagramDescription description, .getToolFactory().createOperationAction(); toogleBreakpointAction.setName("Toggle breakpoint"); toogleBreakpointAction - .setIcon("/org.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); popupMenu.getMenuItemDescription().add(toogleBreakpointAction); ExternalJavaAction toogleBreakpointJavaAction = ToolPackage.eINSTANCE .getToolFactory().createExternalJavaAction(); toogleBreakpointJavaAction.setName("Toggle Gemoc breakpoint"); toogleBreakpointJavaAction - .setId("org.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.GemocSequentialToggleBreakpointAction"); + .setId("org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.GemocSequentialToggleBreakpointAction"); toogleBreakpointJavaAction - .setIcon("/org.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif"); + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif"); initialOperation = ToolPackage.eINSTANCE.getToolFactory() .createInitialOperation(); initialOperation.setFirstModelOperations(toogleBreakpointJavaAction); @@ -279,7 +297,7 @@ public static Layer createLayer(DiagramDescription description, enabledBreakpoint.setName("Enabled breakpoint"); enabledBreakpoint.setPosition(Position.WEST_LITERAL); enabledBreakpoint - .setDecoratorPath("/org.gemoc.executionframework.extensions.sirius/icons/breakpoint_enabled.gif"); + .setDecoratorPath("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint_enabled.gif"); enabledBreakpoint .setPreconditionExpression("service:self.hasEnabledBreakpoint"); enabledBreakpoint.getMappings().addAll(mappings); @@ -290,7 +308,7 @@ public static Layer createLayer(DiagramDescription description, disabledBreakpoint.setName("Disabled breakpoint"); disabledBreakpoint.setPosition(Position.WEST_LITERAL); disabledBreakpoint - .setDecoratorPath("/org.gemoc.executionframework.extensions.sirius/icons/breakpoint_disabled.gif"); + .setDecoratorPath("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint_disabled.gif"); disabledBreakpoint .setPreconditionExpression("service:self.hasDisabledBreakpoint"); disabledBreakpoint.getMappings().addAll(mappings); @@ -354,15 +372,15 @@ public static Layer createLayer(DiagramExtensionDescription descriptionExtension .createOperationAction(); debugAction.setName("Debug"); debugAction - .setIcon("/org.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); popupMenu.getMenuItemDescription().add(debugAction); ExternalJavaAction debugJavaAction = ToolPackage.eINSTANCE .getToolFactory().createExternalJavaAction(); debugJavaAction.setName("Debug"); debugJavaAction - .setId("org.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.gemocDebugAs"); + .setId("org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.gemocDebugAs"); debugJavaAction - .setIcon("/org.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); InitialOperation initialOperation = ToolPackage.eINSTANCE .getToolFactory().createInitialOperation(); initialOperation.setFirstModelOperations(debugJavaAction); @@ -372,15 +390,15 @@ public static Layer createLayer(DiagramExtensionDescription descriptionExtension .getToolFactory().createOperationAction(); toogleBreakpointAction.setName("Toggle breakpoint"); toogleBreakpointAction - .setIcon("/org.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/debug_exc.gif"); popupMenu.getMenuItemDescription().add(toogleBreakpointAction); ExternalJavaAction toogleBreakpointJavaAction = ToolPackage.eINSTANCE .getToolFactory().createExternalJavaAction(); toogleBreakpointJavaAction.setName("Toggle Gemoc breakpoint"); toogleBreakpointJavaAction - .setId("org.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.GemocSequentialToggleBreakpointAction"); + .setId("org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.sirius.action.GemocSequentialToggleBreakpointAction"); toogleBreakpointJavaAction - .setIcon("/org.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif"); + .setIcon("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint.gif"); initialOperation = ToolPackage.eINSTANCE.getToolFactory() .createInitialOperation(); initialOperation.setFirstModelOperations(toogleBreakpointJavaAction); @@ -397,7 +415,7 @@ public static Layer createLayer(DiagramExtensionDescription descriptionExtension enabledBreakpoint.setName("Enabled breakpoint"); enabledBreakpoint.setPosition(Position.WEST_LITERAL); enabledBreakpoint - .setDecoratorPath("/org.gemoc.executionframework.extensions.sirius/icons/breakpoint_enabled.gif"); + .setDecoratorPath("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint_enabled.gif"); enabledBreakpoint .setPreconditionExpression("service:self.hasEnabledBreakpoint"); enabledBreakpoint.getMappings().addAll(mappings); @@ -408,7 +426,7 @@ public static Layer createLayer(DiagramExtensionDescription descriptionExtension disabledBreakpoint.setName("Disabled breakpoint"); disabledBreakpoint.setPosition(Position.WEST_LITERAL); disabledBreakpoint - .setDecoratorPath("/org.gemoc.executionframework.extensions.sirius/icons/breakpoint_disabled.gif"); + .setDecoratorPath("/org.eclipse.gemoc.executionframework.extensions.sirius/icons/breakpoint_disabled.gif"); disabledBreakpoint .setPreconditionExpression("service:self.hasDisabledBreakpoint"); disabledBreakpoint.getMappings().addAll(mappings); @@ -798,6 +816,7 @@ 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()) { @@ -806,11 +825,19 @@ public static void setContent(File file, String charsetName, String content) throw new IOException(file.getAbsolutePath() + " is not writable."); } - OutputStreamWriter output = new OutputStreamWriter( - new BufferedOutputStream(new FileOutputStream(file)), - charsetName); - output.write(content.toString()); - output.close(); + FileOutputStream fos = null; + try { + fos = new FileOutputStream(file); + OutputStreamWriter output = new OutputStreamWriter( + new BufferedOutputStream(fos), + charsetName); + output.write(content.toString()); + } finally{ + if(fos != null) { + fos.close(); + } + } + } } diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/command/debug_services_template.txt b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/command/debug_services_template.txt new file mode 100644 index 000000000..24d64009b --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/command/debug_services_template.txt @@ -0,0 +1,38 @@ +package PACKAGE; + +import java.util.ArrayList; +import java.util.List; + +import org.gemoc.executionframework.extensions.sirius.services.AbstractGemocDebuggerServices; + +public class CLASS_NAME extends AbstractGemocDebuggerServices { + + @Override + protected List getRepresentationRefreshList() { + // Add in res the list of layers that should be activated and refreshed while debugging the model + // in case of a single odesign with all layers in a single viewpoint: + // - the first String is the id of the Diagram Description + // - the second String is the id of the Layer + // + // in case of a diagram extension: + // - the first String is the Representation Name of the Diagram Extension (do not confuse with the Name !!) + // - the second String is the id of the Layer + final List res = new ArrayList(); + + res.add(new StringCouple("LANGUAGE_NAME", "LAYER_NAME")); + + return res; + } + + @Override + public String getModelIdentifier(){ + // Important Note: + // by default the wizard generates a ModelIdentifier linked with the sequential engine. + // ie. return org.gemoc.execution.sequential.javaengine.ui.Activator.DEBUG_MODEL_ID; + // however, if the Debug service is to be used by another engine, you must use the targeted engine's + // debug model id and update the manifest dependencies accordingly. + // for example, org.gemoc.execution.concurrent.ccsljavaengine.ui.Activator.DEBUG_MODEL_ID for the concurrent engine. + return org.gemoc.execution.sequential.javaengine.ui.Activator.DEBUG_MODEL_ID; + } + +} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocDebugRepresentationWizard.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocDebugRepresentationWizard.java similarity index 90% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocDebugRepresentationWizard.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocDebugRepresentationWizard.java index 55681678a..ccf9c9a17 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocDebugRepresentationWizard.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocDebugRepresentationWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.extensions.sirius.wizards; +package org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards; import java.io.IOException; import java.lang.reflect.InvocationTargetException; @@ -44,15 +44,12 @@ import org.eclipse.ui.IWorkbenchWizard; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.part.FileEditorInput; -import org.gemoc.xdsmlframework.extensions.sirius.Activator; -import org.gemoc.xdsmlframework.extensions.sirius.command.AddDebugLayerHandler; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.pages.AddDebugRepresentationPage; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.pages.DebugRepresentationSelectionPage; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.pages.NewViewPointProjectPage; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.pages.SelectDiagramDefinitionPage; -import org.osgi.framework.BundleException; - -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.Activator; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.command.AddDebugLayerHandler; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.pages.AddDebugRepresentationPage; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.pages.DebugRepresentationSelectionPage; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.pages.NewViewPointProjectPage; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.pages.SelectDiagramDefinitionPage; /** * Wizard to create a new debug representation. @@ -63,8 +60,8 @@ public class NewGemocDebugRepresentationWizard extends Wizard implements IWorkbenchWizard { - private String initialProjectName; - private String initialLanguageName; + private String initialLanguageName = "myLanguage"; + private String initialProjectName = initialLanguageName.toLowerCase(); private class FinishRunnable implements IRunnableWithProgress { @@ -100,15 +97,7 @@ group, getNewViewPointProjectPage() AddDebugLayerHandler.emfModifications(monitor, layerName, diagramDescription, languageName, qualifiedServiceClassName); - // Additional project configurations - ManifestChanger changer = new ManifestChanger(project); - try { - changer.addPluginDependency("org.gemoc.executionframework.extensions.sirius"); - changer.commit(); - } catch (BundleException | IOException | CoreException e) { - Activator.getMessagingSystem().error(e.getMessage(), - Activator.PLUGIN_ID, e); - } + AddDebugLayerHandler.updateManifest(project); } catch (CoreException e) { Activator.getMessagingSystem().error(e.getMessage(), Activator.PLUGIN_ID, e); @@ -149,15 +138,7 @@ group, getNewViewPointProjectPage() AddDebugLayerHandler.emfModifications(monitor, layerName, diagramExtensionDescription, languageName, qualifiedServiceClassName); - // Additional project configurations - ManifestChanger changer = new ManifestChanger(project); - try { - changer.addPluginDependency("org.gemoc.executionframework.extensions.sirius"); - changer.commit(); - } catch (BundleException | IOException | CoreException e) { - Activator.getMessagingSystem().error(e.getMessage(), - Activator.PLUGIN_ID, e); - } + AddDebugLayerHandler.updateManifest(project); } catch (CoreException e) { Activator.getMessagingSystem().error(e.getMessage(), Activator.PLUGIN_ID, e); @@ -215,6 +196,7 @@ group, getNewViewPointProjectPage() AddDebugLayerHandler.emfModifications(monitor, layerName, diagramDescription, languageName, qualifiedServiceClassName); + AddDebugLayerHandler.updateManifest(project); } catch (IOException e) { Activator.getMessagingSystem().error(e.getMessage(), Activator.PLUGIN_ID, e); diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocModelingProjectCreationWizardPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocModelingProjectCreationWizardPage.java similarity index 98% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocModelingProjectCreationWizardPage.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocModelingProjectCreationWizardPage.java index 24232a957..f58706073 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocModelingProjectCreationWizardPage.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocModelingProjectCreationWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014, 2015 Obeo. + * Copyright (c) 2014, 2017 Obeo. * 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,7 +10,7 @@ * Gemoc - Copy the initial {@link ViewpointSpecificationProjectWizard} to set an initial project name *******************************************************************************/ -package org.gemoc.xdsmlframework.extensions.sirius.wizards; +package org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards; import java.io.File; import java.text.MessageFormat; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocSiriusProjectWizard.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocSiriusProjectWizard.java similarity index 97% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocSiriusProjectWizard.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocSiriusProjectWizard.java index b60dba9de..3cf5a8158 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocSiriusProjectWizard.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/NewGemocSiriusProjectWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014, 2015 Obeo. + * Copyright (c) 2014, 2017 Obeo. * 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,7 +10,7 @@ * Gemoc - Copy the initial {@link ViewpointSpecificationProjectWizard} to set an initial project name *******************************************************************************/ -package org.gemoc.xdsmlframework.extensions.sirius.wizards; +package org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards; import java.util.ArrayList; import java.util.Collection; @@ -48,7 +48,7 @@ public class NewGemocSiriusProjectWizard extends Wizard implements INewWizard { /** * Wizard id. */ - public static final String ID = "org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocSiriusProjectWizard"; //$NON-NLS-1$ + public static final String ID = "org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocSiriusProjectWizard"; //$NON-NLS-1$ private IProject project; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/AddDebugRepresentationPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/AddDebugRepresentationPage.java similarity index 92% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/AddDebugRepresentationPage.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/AddDebugRepresentationPage.java index 178569822..9b7dbd586 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/AddDebugRepresentationPage.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/AddDebugRepresentationPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.extensions.sirius.wizards.pages; +package org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.pages; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.sirius.diagram.description.DiagramDescription; @@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; public class AddDebugRepresentationPage extends WizardPage { diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/DebugRepresentationSelectionPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/DebugRepresentationSelectionPage.java new file mode 100644 index 000000000..455f271c7 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/DebugRepresentationSelectionPage.java @@ -0,0 +1,174 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.extensions.sirius.wizards.pages; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jface.wizard.IWizardPage; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.diagram.description.DiagramDescription; +import org.eclipse.sirius.viewpoint.description.RepresentationDescription; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; + +/** + * The representation selection page. + * + * @author Yvan Lussaud + * + */ +public class DebugRepresentationSelectionPage extends WizardPage { + + private final NewGemocDebugRepresentationWizard newGemocDebugRepresentationWizard; + + /** array id for viewpoint definition */ + public static final int CREATE_VIEWPOINT_DEFINITION = 0; + + /** array id for viewpoint extension */ + public static final int CREATE_VIEWPOINT_EXTENSION = 1; + + /** array id for new_layer */ + public static final int ADD_DEBUG_LAYER = 2; + + private final Button[] radio = new Button[3]; + + private int selected = -1; + + public DebugRepresentationSelectionPage(NewGemocDebugRepresentationWizard newGemocDebugRepresentationWizard) { + super("Select debug representation mode"); + this.newGemocDebugRepresentationWizard = newGemocDebugRepresentationWizard; + } + + @Override + public void createControl(Composite parent) { + final Composite composite = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + composite.setLayout(layout); + + radio[CREATE_VIEWPOINT_DEFINITION] = new Button(composite, SWT.RADIO); + radio[CREATE_VIEWPOINT_DEFINITION].setText("Create a debug diagram description."); + radio[CREATE_VIEWPOINT_DEFINITION] + .setToolTipText("creates a dedicated Viewpoint Specification in a new project"); + radio[CREATE_VIEWPOINT_DEFINITION].setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + radio[CREATE_VIEWPOINT_DEFINITION].addListener(SWT.Selection, new Listener() { + @Override + public void handleEvent(Event event) { + selected = CREATE_VIEWPOINT_DEFINITION; + setPageComplete(true); + } + }); + + radio[CREATE_VIEWPOINT_EXTENSION] = new Button(composite, SWT.RADIO); + radio[CREATE_VIEWPOINT_EXTENSION].setText("Extends an existing diagram description."); + radio[CREATE_VIEWPOINT_EXTENSION].setToolTipText( + "creates a dedicated Viewpoint Specification in a new project as an extension of an existing Viewpoint Specification."); + radio[CREATE_VIEWPOINT_EXTENSION].setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + radio[CREATE_VIEWPOINT_EXTENSION].addListener(SWT.Selection, new Listener() { + @Override + public void handleEvent(Event event) { + selected = CREATE_VIEWPOINT_EXTENSION; + final List descriptions = new ArrayList(); + for (Viewpoint viewpoint : ViewpointRegistry.getInstance().getViewpoints()) { + for (RepresentationDescription description : viewpoint.getOwnedRepresentations()) { + if (description instanceof DiagramDescription) { + descriptions.add((DiagramDescription) description); + } + } + // TODO extensions ? + // for (RepresentationDescription description : + // viewpoint.getOwnedRepresentationExtensions()) + // { + // if (description instanceof + // DiagramDescription) { + // descriptions.add((DiagramDescription) + // description); + // } + // } + } + newGemocDebugRepresentationWizard.getSelectDiagramDefinitionPage().setDescriptions(descriptions); + setPageComplete(true); + } + }); + + radio[ADD_DEBUG_LAYER] = new Button(composite, SWT.RADIO); + radio[ADD_DEBUG_LAYER].setText("Add a debug layer to an existing diagram description."); + radio[ADD_DEBUG_LAYER].setToolTipText("modifies an existing Viewpoint Specification to add a layer."); + + radio[ADD_DEBUG_LAYER].setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + radio[ADD_DEBUG_LAYER].addListener(SWT.Selection, new Listener() { + @Override + public void handleEvent(Event event) { + selected = ADD_DEBUG_LAYER; + final List descriptions = new ArrayList(); + for (Viewpoint viewpoint : ViewpointRegistry.getInstance().getViewpoints()) { + if (!ViewpointRegistry.getInstance().isFromPlugin(viewpoint)) { + for (RepresentationDescription description : viewpoint.getOwnedRepresentations()) { + if (description instanceof DiagramDescription) { + descriptions.add((DiagramDescription) description); + } + } + // TODO extensions ? + // for (RepresentationDescription description : + // viewpoint.getOwnedRepresentationExtensions()) { + // if (description instanceof DiagramDescription) { + // descriptions.add((DiagramDescription) + // description); + // } + // } + } + } + newGemocDebugRepresentationWizard.getSelectDiagramDefinitionPage().setDescriptions(descriptions); + setPageComplete(true); + } + }); + + setControl(composite); + setPageComplete(false); + } + + public int getSelected() { + return selected; + } + + @Override + public IWizardPage getNextPage() { + final IWizardPage res; + + if (selected == CREATE_VIEWPOINT_DEFINITION) { + res = newGemocDebugRepresentationWizard.getNewViewPointProjectPage(); + } else if (selected == CREATE_VIEWPOINT_EXTENSION || selected == ADD_DEBUG_LAYER) { + res = newGemocDebugRepresentationWizard.getSelectDiagramDefinitionPage(); + } else { + res = null; + } + + return res; + } + + @Override + public void dispose() { + super.dispose(); + radio[CREATE_VIEWPOINT_DEFINITION].dispose(); + radio[CREATE_VIEWPOINT_EXTENSION].dispose(); + radio[ADD_DEBUG_LAYER].dispose(); + } + +} \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/NewViewPointProjectPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/NewViewPointProjectPage.java similarity index 96% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/NewViewPointProjectPage.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/NewViewPointProjectPage.java index 0e884d4e3..9c6e234e7 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/NewViewPointProjectPage.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/NewViewPointProjectPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.extensions.sirius.wizards.pages; +package org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.pages; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.WizardPage; @@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; public class NewViewPointProjectPage extends WizardPage { diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/SelectDiagramDefinitionPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/SelectDiagramDefinitionPage.java similarity index 96% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/SelectDiagramDefinitionPage.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/SelectDiagramDefinitionPage.java index 7ae91ec3d..7c93d290a 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/SelectDiagramDefinitionPage.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/eclipse/gemoc/xdsmlframework/extensions/sirius/wizards/pages/SelectDiagramDefinitionPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.extensions.sirius.wizards.pages; +package org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.pages; import java.util.List; @@ -28,7 +28,7 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; /** * The diagram selection page. diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.checkstyle b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/.classpath b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.classpath similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.api/.classpath rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.classpath diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.gitignore b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.gitignore similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.gitignore rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.gitignore diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.project b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.project new file mode 100644 index 000000000..5a0286865 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.xdsmlframework.ide.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.settings/org.eclipse.jdt.core.prefs b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.settings/org.eclipse.jdt.core.prefs rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/.settings/org.eclipse.jdt.core.prefs 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 new file mode 100644 index 000000000..5d063052b --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/META-INF/MANIFEST.MF @@ -0,0 +1,36 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: ExecutionFramework Language Workbench UI +Bundle-SymbolicName: org.eclipse.gemoc.xdsmlframework.ide.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.xdsmlframework.ide.ui.Activator +Bundle-Vendor: INRIA +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.codegen.ecore.ui;bundle-version="2.8.0", + org.eclipse.acceleo.engine;bundle-version="3.3.0", + org.eclipse.gemoc.xdsmlframework.api;bundle-version="0.1.0", + fr.inria.diverse.k3.ui;bundle-version="1.0.0", + org.eclipse.gemoc.commons.eclipse, + org.eclipse.gemoc.commons.eclipse.ui, + org.eclipse.emf.ecore.editor, + org.eclipse.gemoc.xdsmlframework.ui.utils, + org.eclipse.gemoc.xdsmlframework.extensions.sirius;bundle-version="0.1.0", + fr.inria.diverse.melange.metamodel, + org.eclipse.xtext.ui, + org.eclipse.xtext, + org.eclipse.sirius.ui, + org.eclipse.jdt.ui, + org.eclipse.ui.console, + org.eclipse.debug.ui, + org.eclipse.emf.ecoretools.design.ui;bundle-version="3.0.0", + org.jdom2;bundle-version="2.0.6" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +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 + diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/about.html b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/about.html similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/about.html rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/about.html diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/build.properties b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/build.properties new file mode 100644 index 000000000..faabc60ff --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src +output.. = bin +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + about.html +src.includes = about.html diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/icons/IconeGemocLanguage-16.png b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/icons/IconeGemocLanguage-16.png similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/icons/IconeGemocLanguage-16.png rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/icons/IconeGemocLanguage-16.png diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/plugin.xml b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/plugin.xml new file mode 100644 index 000000000..a0545f8ca --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/plugin.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/pom.xml b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/pom.xml new file mode 100644 index 000000000..70d372349 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/pom.xml @@ -0,0 +1,25 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.xdsmlframework + org.gemoc.modeldebugging.xdsmlframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.xdsmlframework.ide.ui + eclipse-plugin + \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/Activator.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/Activator.java new file mode 100644 index 000000000..1cf7d9462 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/Activator.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.ide.ui; + +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.xdsmlframework.ide.ui"; //$NON-NLS-1$ + + public static final String GEMOC_PROJECT_CONFIGURATION_FILE_EXTENSION = "xdsml"; + public static final String GEMOC_PROJECT_CONFIGURATION_FILE = "project." + + GEMOC_PROJECT_CONFIGURATION_FILE_EXTENSION; + + // extension point constants + + + public static final String MODEL_LOADER_CLASS_NAMEPART = "ModelLoader"; + public static final String CODEEXECUTOR_CLASS_NAMEPART = "CodeExecutor"; + public static final String SOLVER_CLASS_NAMEPART = "Solver"; + public static final String EXTENSION_GENERATED_CLASS_FOLDER_NAME = "src/main/xdsml-java-gen/"; + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given plug-in + * relative path + * + * @param path + * the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + public static void warn(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); + } + + public static void error(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); + } + +} diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/builder/pde/PluginXMLHelper.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/builder/pde/PluginXMLHelper.java new file mode 100644 index 000000000..0ffbfdd3c --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/builder/pde/PluginXMLHelper.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.ide.ui.builder.pde; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.ide.ui.Activator; +import org.jdom2.Attribute; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.filter.ElementFilter; +import org.jdom2.input.SAXBuilder; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; + +public class PluginXMLHelper { + + public static final String PLUGIN_FILENAME = "plugin.xml"; + + public static final String PLUGIN_TEMPLATE = "\n" + + "\n" + "\n" + ""; + + public static void createEmptyTemplateFile(IFile pluginXmlFile, + boolean overrideIfExist) { + if (overrideIfExist && pluginXmlFile.exists()) { + try { + pluginXmlFile.delete(true, null); + } catch (CoreException e) { + Activator.error(e.getMessage(), e); + } + } + if (!pluginXmlFile.exists()) { + try { + InputStream stream = new ByteArrayInputStream( + PLUGIN_TEMPLATE.getBytes()); + if (pluginXmlFile.exists()) { + pluginXmlFile.setContents(stream, true, true, null); + } else { + pluginXmlFile.create(stream, true, null); + } + stream.close(); + } catch (IOException e) { + Activator.error(e.getMessage(), e); + } catch (CoreException e) { + Activator.error(e.getMessage(), e); + } + } + } + + protected Document document; + protected Element root; + + public void loadDocument(IFile pluginXmlFile) { + SAXBuilder sxb = new SAXBuilder(); + try { + if(!pluginXmlFile.isSynchronized(IResource.DEPTH_ZERO)){ + pluginXmlFile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor()); + } + document = sxb.build(pluginXmlFile.getContents()); + + root = document.getRootElement(); + } catch (Exception e) { + Activator.error(e.getMessage(), e); + } + } + + public void saveDocument(IFile pluginXmlFile) { + try { + XMLOutputter sortie = new XMLOutputter(Format.getPrettyFormat()); + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + + sortie.output(document, stream); + InputStream inputStream = new ByteArrayInputStream( + stream.toByteArray()); + pluginXmlFile.setContents(inputStream, IResource.FORCE, null); + } catch (IOException e) { + Activator.error(e.getMessage(), e); + } catch (CoreException e) { + Activator.error(e.getMessage(), e); + } + } + + + public Element updateXDSMLDefinitionInExtensionPoint(Element extensionPoint, String xDSMLName){ + Element result; + List elements = extensionPoint.getContent(new ElementFilter(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF)); + if(elements.size() == 0){ + // create extension point + result = new Element(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF); + extensionPoint.addContent(result); + } + else{ + result = elements.get(0); + } + result.setAttribute("name", xDSMLName); + return result; + } + public Element updateXDSMLDefinitionAttributeInExtensionPoint(Element extensionPoint, String atributeName, String value){ + Element result; + List elements = extensionPoint.getContent(new ElementFilter(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF)); + if(elements.size() == 0){ + // create extension point + result = new Element(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF); + extensionPoint.addContent(result); + } + else{ + result = elements.get(0); + } + result.setAttribute(atributeName, value); + return result; + } + public String getXDSMLDefinitionAttributeInExtensionPointValue(Element extensionPoint, String atributeName){ + Element result; + List elements = extensionPoint.getContent(new ElementFilter(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF)); + if(elements.size() == 0){ + // create extension point + result = new Element(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF); + extensionPoint.addContent(result); + } + else{ + result = elements.get(0); + } + return result.getAttributeValue(atributeName); + } + + public Element getOrCreateExtensionPoint(String extensionPointName){ + Element result; + List elements = root.getContent(new ExtensionFilter(extensionPointName)); + if(elements.size() == 0){ + // create extension point + result = new Element("extension"); + result.setAttribute("point", extensionPointName); + root.addContent(result); + } + else{ + result = elements.get(0); + } + return result; + } + + public class ExtensionFilter extends ElementFilter{ + + /** + * + */ + private static final long serialVersionUID = -1941823619643486082L; + protected String extensionPointName; + + public ExtensionFilter(String extensionPointName){ + super("extension"); + this.extensionPointName = extensionPointName; + } + + @Override + public Element filter(Object content) { + Element result = super.filter(content); + if(result == null) return null; + Attribute att = result.getAttribute("point"); + if(att == null) return null; + if(att.getValue().equals(extensionPointName)) return result; + else return null; + } + + } + + + +} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/commands/AbstractGemocLanguageProjectHandler.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/commands/AbstractGemocLanguageProjectHandler.java similarity index 98% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/commands/AbstractGemocLanguageProjectHandler.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/commands/AbstractGemocLanguageProjectHandler.java index 6bfef938c..d86159a24 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/commands/AbstractGemocLanguageProjectHandler.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/commands/AbstractGemocLanguageProjectHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.commands; +package org.eclipse.gemoc.xdsmlframework.ide.ui.commands; import java.util.Iterator; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/commands/AbstractMelangeSelectHandler.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/commands/AbstractMelangeSelectHandler.java similarity index 92% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/commands/AbstractMelangeSelectHandler.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/commands/AbstractMelangeSelectHandler.java index 3a9d4fa95..4506626a2 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/commands/AbstractMelangeSelectHandler.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/commands/AbstractMelangeSelectHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.commands; +package org.eclipse.gemoc.xdsmlframework.ide.ui.commands; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -20,9 +20,9 @@ import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.wizard.WizardDialog; -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.xdsmlframework.ide.ui.Activator; -import org.gemoc.xdsmlframework.ui.utils.dialogs.SelectAnyMelangeLanguageDialog; +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.xdsmlframework.ide.ui.Activator; +import org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs.SelectAnyMelangeLanguageDialog; import fr.inria.diverse.melange.metamodel.melange.Language; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/perspective/XDSMLPerspectiveFactory.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/perspective/XDSMLPerspectiveFactory.java similarity index 98% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/perspective/XDSMLPerspectiveFactory.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/perspective/XDSMLPerspectiveFactory.java index 1a5587831..04484abdc 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/perspective/XDSMLPerspectiveFactory.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/perspective/XDSMLPerspectiveFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.perspective; +package org.eclipse.gemoc.xdsmlframework.ide.ui.perspective; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jdt.ui.JavaUI; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/AbstractCreateNewGemocLanguageProject.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/AbstractCreateNewGemocLanguageProject.java similarity index 94% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/AbstractCreateNewGemocLanguageProject.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/AbstractCreateNewGemocLanguageProject.java index 9f710bfed..1c22ac0c1 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/AbstractCreateNewGemocLanguageProject.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/AbstractCreateNewGemocLanguageProject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; @@ -25,8 +25,8 @@ import org.eclipse.ui.INewWizard; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; -import org.gemoc.xdsmlframework.ide.ui.Activator; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.pages.AskLanguageNameWizardPage; +import org.eclipse.gemoc.xdsmlframework.ide.ui.Activator; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.pages.AskLanguageNameWizardPage; public abstract class AbstractCreateNewGemocLanguageProject extends Wizard implements INewWizard { diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizard.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizard.java similarity index 91% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizard.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizard.java index 36922bfa5..2b9ee98d7 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizard.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.core.resources.IProject; import org.eclipse.jface.wizard.Wizard; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardContextAction.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardContextAction.java similarity index 88% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardContextAction.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardContextAction.java index 98f9113c9..e5d2940a9 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardContextAction.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardContextAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; @@ -18,10 +18,10 @@ import org.eclipse.ui.IWorkbenchWizard; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.wizards.IWizardDescriptor; -import org.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; -import org.gemoc.commons.eclipse.ui.WizardFinder; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; -import org.gemoc.xdsmlframework.ide.ui.Activator; +import org.eclipse.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; +import org.eclipse.gemoc.commons.eclipse.ui.WizardFinder; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; +import org.eclipse.gemoc.xdsmlframework.ide.ui.Activator; import fr.inria.diverse.melange.metamodel.melange.Language; @@ -80,7 +80,7 @@ public void execute() { protected void createNewODProject() { final IWizardDescriptor descriptor = WizardFinder - .findNewWizardDescriptor(org.gemoc.xdsmlframework.extensions.sirius.Activator.PLUGIN_ID + .findNewWizardDescriptor(org.eclipse.gemoc.xdsmlframework.extensions.sirius.Activator.PLUGIN_ID + ".wizards.NewGemocDebugRepresentationWizard"); // Then if we have a wizard, open it. if (descriptor != null) { @@ -129,7 +129,7 @@ protected void createNewODProject() { } } else { Activator - .error("wizard with id=org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard not found", + .error("wizard with id=org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard not found", null); } } diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardPage.java similarity index 93% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardPage.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardPage.java index ed3bd9018..6ebd8f632 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardPage.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateAnimatorProjectWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Listener; import org.eclipse.ui.PlatformUI; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateAnimatorProjectWizardContextAction.CreateAnimatorProjectAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateAnimatorProjectWizardContextAction.CreateAnimatorProjectAction; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizard.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizard.java similarity index 91% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizard.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizard.java index 622f6e413..56ea70135 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizard.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.core.resources.IProject; import org.eclipse.jface.wizard.Wizard; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardContextAction.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardContextAction.java similarity index 91% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardContextAction.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardContextAction.java index 8b14a7ff9..2cae04ee0 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardContextAction.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardContextAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; @@ -20,13 +20,13 @@ import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.wizards.IWizardDescriptor; -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; -import org.gemoc.commons.eclipse.ui.WizardFinder; -import org.gemoc.xdsmlframework.ide.ui.Activator; -import org.gemoc.xdsmlframework.ui.utils.dialogs.SelectEMFIProjectDialog; +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; +import org.eclipse.gemoc.commons.eclipse.ui.WizardFinder; +import org.eclipse.gemoc.xdsmlframework.ide.ui.Activator; +import org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs.SelectEMFIProjectDialog; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; /** * This class is both a context for the wizard and a Command that will be diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardPage.java similarity index 93% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardPage.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardPage.java index 9d54b2cb9..6d45d7077 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardPage.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateDomainModelWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Listener; import org.eclipse.ui.PlatformUI; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateDomainModelWizardContextAction.CreateDomainModelAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateDomainModelWizardContextAction.CreateDomainModelAction; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizard.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizard.java similarity index 91% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizard.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizard.java index d04f36abe..5c70bd24b 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizard.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.core.resources.IProject; import org.eclipse.jface.wizard.Wizard; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardContextAction.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardContextAction.java similarity index 94% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardContextAction.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardContextAction.java index 0004cb43a..5498cc8e8 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardContextAction.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardContextAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import java.util.ArrayList; import java.util.Iterator; @@ -25,11 +25,11 @@ import org.eclipse.ui.IWorkbenchWizard; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.wizards.IWizardDescriptor; -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; -import org.gemoc.commons.eclipse.ui.WizardFinder; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocSiriusProjectWizard; -import org.gemoc.xdsmlframework.ide.ui.Activator; +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; +import org.eclipse.gemoc.commons.eclipse.ui.WizardFinder; +import org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocSiriusProjectWizard; +import org.eclipse.gemoc.xdsmlframework.ide.ui.Activator; //import org.eclipse.emf.ecoretools.design.wizard.EcoreModelerWizard; @@ -209,7 +209,7 @@ protected void createNewXTextProject() { protected void createNewODProject() { final IWizardDescriptor descriptor = WizardFinder - .findNewWizardDescriptor("org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocSiriusProjectWizard"); + .findNewWizardDescriptor("org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocSiriusProjectWizard"); // Then if we have a wizard, open it. if (descriptor != null) { NewProjectWorkspaceListener workspaceListener = new NewProjectWorkspaceListener(); diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardPage.java similarity index 95% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardPage.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardPage.java index 203b7ae55..187d25ea3 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardPage.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/CreateEditorProjectWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Listener; import org.eclipse.ui.PlatformUI; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction.CreateEditorProjectAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction.CreateEditorProjectAction; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/MelangeXDSMLProjectHelper.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/MelangeXDSMLProjectHelper.java similarity index 94% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/MelangeXDSMLProjectHelper.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/MelangeXDSMLProjectHelper.java index 4fba44326..3a4a4dec9 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/MelangeXDSMLProjectHelper.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/MelangeXDSMLProjectHelper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/pages/AskLanguageNameWizardPage.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/pages/AskLanguageNameWizardPage.java similarity index 96% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/pages/AskLanguageNameWizardPage.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/pages/AskLanguageNameWizardPage.java index 3e601a70c..92912b899 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/xdsml/wizards/pages/AskLanguageNameWizardPage.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ide.ui/src/org/eclipse/gemoc/xdsmlframework/ide/ui/xdsml/wizards/pages/AskLanguageNameWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.pages; +package org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.pages; import org.eclipse.jface.util.BidiUtils; import org.eclipse.jface.wizard.WizardPage; diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.checkstyle b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/.classpath b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.classpath similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.commons.model/.classpath rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.classpath diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.project b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.project new file mode 100644 index 000000000..fb0a0de72 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.xdsmlframework.ui.utils + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.settings/org.eclipse.jdt.core.prefs b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.settings/org.eclipse.jdt.core.prefs rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/.settings/org.eclipse.jdt.core.prefs diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/META-INF/MANIFEST.MF b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/META-INF/MANIFEST.MF new file mode 100644 index 000000000..562e567f4 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Utils +Bundle-SymbolicName: org.eclipse.gemoc.xdsmlframework.ui.utils +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.xdsmlframework.ui.utils.Activator +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.codegen.ecore.ui;bundle-version="2.8.0", + org.eclipse.gemoc.commons.eclipse, + org.eclipse.gemoc.commons.eclipse.ui, + org.eclipse.emf.ecore.editor, + fr.inria.diverse.k3.al.annotationprocessor.plugin, + fr.inria.diverse.melange.metamodel +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.gemoc.xdsmlframework.ui.utils, + org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/about.html b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/about.html similarity index 100% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/about.html rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/about.html diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/build.properties b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/build.properties new file mode 100644 index 000000000..6594e752a --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html +src.includes = about.html diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/pom.xml b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/pom.xml new file mode 100644 index 000000000..1c7681328 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/pom.xml @@ -0,0 +1,25 @@ + + + + + 4.0.0 + + + ../.. + org.gemoc.modeldebugging.xdsmlframework + org.gemoc.modeldebugging.xdsmlframework.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.xdsmlframework.ui.utils + eclipse-plugin + \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/Activator.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/Activator.java new file mode 100644 index 000000000..d288b89ec --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/Activator.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.ui.utils; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.xdsmlframework.ui.utils"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAIRDIFileDialog.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAIRDIFileDialog.java new file mode 100644 index 000000000..b9bfcf1b8 --- /dev/null +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAIRDIFileDialog.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.xdsmlframework.ui.utils.dialogs; + +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.commons.eclipse.ui.dialogs.SelectSpecificFileDialog; + + + +public class SelectAIRDIFileDialog extends SelectSpecificFileDialog { + + @Override + protected FileFinderVisitor instanciateFinder() { + return new FileFinderVisitor("aird"); + } + +} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyConcreteEClassDialog.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyConcreteEClassDialog.java similarity index 92% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyConcreteEClassDialog.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyConcreteEClassDialog.java index e32b04c73..3e460242e 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyConcreteEClassDialog.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyConcreteEClassDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ui.utils.dialogs; +package org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyEObjectDialog.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyEObjectDialog.java similarity index 93% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyEObjectDialog.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyEObjectDialog.java index cdb6da118..0b26f69aa 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyEObjectDialog.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyEObjectDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ui.utils.dialogs; +package org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs; import java.util.ArrayList; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyMelangeLanguageDialog.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyMelangeLanguageDialog.java similarity index 92% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyMelangeLanguageDialog.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyMelangeLanguageDialog.java index 083457d47..036037c86 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyMelangeLanguageDialog.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectAnyMelangeLanguageDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ui.utils.dialogs; +package org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.ResourceSet; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectEMFIProjectDialog.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectEMFIProjectDialog.java similarity index 81% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectEMFIProjectDialog.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectEMFIProjectDialog.java index 24c916d3d..b651d4d72 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectEMFIProjectDialog.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectEMFIProjectDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ui.utils.dialogs; +package org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs; import java.util.Arrays; import org.eclipse.swt.widgets.Shell; -import org.gemoc.commons.eclipse.ui.dialogs.SelectPluginIProjectWithFileExtensionDialog; +import org.eclipse.gemoc.commons.eclipse.ui.dialogs.SelectPluginIProjectWithFileExtensionDialog; /** * Dialog that allow to select an IProject that can be used as an EMF project diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectMainMethodDialog.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectMainMethodDialog.java similarity index 96% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectMainMethodDialog.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectMainMethodDialog.java index 6e981f2ec..ca39487f2 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectMainMethodDialog.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectMainMethodDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ui.utils.dialogs; +package org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs; import java.lang.annotation.Annotation; import java.lang.reflect.Method; diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectODesignIProjectDialog.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectODesignIProjectDialog.java similarity index 80% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectODesignIProjectDialog.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectODesignIProjectDialog.java index e9d05bb08..01ae63904 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectODesignIProjectDialog.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectODesignIProjectDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ui.utils.dialogs; +package org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs; import org.eclipse.swt.widgets.Shell; -import org.gemoc.commons.eclipse.ui.dialogs.SelectPluginIProjectWithFileExtensionDialog; +import org.eclipse.gemoc.commons.eclipse.ui.dialogs.SelectPluginIProjectWithFileExtensionDialog; /** * Dialog that allow to select an IProject that can be used as a Sirius Viewpoint specification project diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectXtextIProjectDialog.java b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectXtextIProjectDialog.java similarity index 80% rename from framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectXtextIProjectDialog.java rename to framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectXtextIProjectDialog.java index 965969ea6..c256210cd 100644 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectXtextIProjectDialog.java +++ b/framework/xdsml_framework/plugins/org.eclipse.gemoc.xdsmlframework.ui.utils/src/org/eclipse/gemoc/xdsmlframework/ui/utils/dialogs/SelectXtextIProjectDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.xdsmlframework.ui.utils.dialogs; +package org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs; import org.eclipse.swt.widgets.Shell; -import org.gemoc.commons.eclipse.ui.dialogs.SelectPluginIProjectWithFileExtensionDialog; +import org.eclipse.gemoc.commons.eclipse.ui.dialogs.SelectPluginIProjectWithFileExtensionDialog; /** * Dialog that allow to select an IProject that can be used as an Xtext project diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/.project b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/.project deleted file mode 100644 index 8745d8b71..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.xdsmlframework.extensions.sirius - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/META-INF/MANIFEST.MF b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/META-INF/MANIFEST.MF deleted file mode 100644 index ea5a7a373..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/META-INF/MANIFEST.MF +++ /dev/null @@ -1,33 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Gemoc extension for Sirius -Bundle-SymbolicName: org.gemoc.xdsmlframework.extensions.sirius;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.xdsmlframework.extensions.sirius.Activator -Require-Bundle: org.gemoc.xdsmlframework.api, - fr.inria.diverse.commons.eclipse.messagingsystem.api;bundle-version="1.0.0", - fr.inria.diverse.commons.eclipse.messagingsystem.ui;bundle-version="1.0.0", - org.eclipse.sirius.diagram.ui;bundle-version="2.0.0", - org.eclipse.sirius.common;bundle-version="1.0.1", - org.eclipse.gmf.runtime.emf.core;bundle-version="1.7.0", - fr.obeo.dsl.debug.ide.sirius.ui;bundle-version="1.0.0", - org.eclipse.sirius.ecore.extender;bundle-version="2.0.3", - org.eclipse.gef, - org.eclipse.xtext, - org.eclipse.debug.core;bundle-version="3.9.1", - fr.obeo.dsl.debug;bundle-version="1.0.0", - fr.obeo.dsl.debug.ide;bundle-version="1.0.0", - org.gemoc.commons.eclipse, - org.eclipse.emf.codegen.ecore, - org.eclipse.ui.ide;bundle-version="3.10.2", - org.eclipse.emf.edit.ui, - org.eclipse.sirius.ext.base;bundle-version="2.0.7", - fr.inria.diverse.commons.eclipse.pde, - org.eclipse.core.filesystem, - org.eclipse.sirius.editor;bundle-version="2.0.7" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Export-Package: org.gemoc.xdsmlframework.extensions.sirius, - org.gemoc.xdsmlframework.extensions.sirius.command, - org.gemoc.xdsmlframework.extensions.sirius.wizards, - org.gemoc.xdsmlframework.extensions.sirius.wizards.pages diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/build.properties b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/build.properties deleted file mode 100644 index fe71d2b2c..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/main/java/ -output.. = target/classes/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/,\ - about.html -src.includes = about.html diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/plugin.xml b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/plugin.xml deleted file mode 100644 index 5a17a91b5..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/plugin.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/pom.xml b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/pom.xml deleted file mode 100644 index 215594f19..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.xdsmlframework - org.gemoc.modeldebugging.xdsmlframework.root - 0.1.0-SNAPSHOT - - - org.gemoc.xdsmlframework.extensions.sirius - eclipse-plugin - \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/Activator.java b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/Activator.java deleted file mode 100644 index 2a767494a..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/Activator.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.extensions.sirius; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -import fr.inria.diverse.commons.eclipse.messagingsystem.api.MessagingSystemManager; -import fr.inria.diverse.commons.eclipse.messagingsystem.ui.ConsoleLogLevel; -import fr.inria.diverse.commons.eclipse.messagingsystem.ui.EclipseMessagingSystem; -import fr.inria.diverse.commons.messagingsystem.api.MessagingSystem; - -public class Activator implements BundleActivator { - - private static BundleContext context; - - public static BundleContext getContext() { - return context; - } - - public static final String PLUGIN_ID = "org.gemoc.xdsmlframework.extensions.sirius"; //$NON-NLS-1$ - - - protected static MessagingSystem messagingSystem = null; - - public static MessagingSystem getMessagingSystem() { - if (messagingSystem == null) - { - MessagingSystemManager msm = new MessagingSystemManager(); - messagingSystem = msm.createBestPlatformMessagingSystem(PLUGIN_ID, "Execution Engine"); - if (messagingSystem instanceof EclipseMessagingSystem) - ((EclipseMessagingSystem) messagingSystem).setConsoleLogLevel(ConsoleLogLevel.DEV_DEBUG); - } - return messagingSystem; - } - - /* - * (non-Javadoc) - * - * @see - * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext bundleContext) throws Exception { - Activator.context = bundleContext; - } - - /* - * (non-Javadoc) - * - * @see - * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext bundleContext) throws Exception { - Activator.context = null; - } - -} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/command/debug_services_template.txt b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/command/debug_services_template.txt deleted file mode 100644 index ef048779c..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/command/debug_services_template.txt +++ /dev/null @@ -1,19 +0,0 @@ -package PACKAGE; - -import java.util.ArrayList; -import java.util.List; - -import org.gemoc.executionframework.extensions.sirius.services.AbstractGemocDebuggerServices; - -public class CLASS_NAME extends AbstractGemocDebuggerServices { - - @Override - protected List getRepresentationRefreshList() { - final List res = new ArrayList(); - - res.add(new StringCouple("LANGUAGE_NAME", "LAYER_NAME")); - - return res; - } - -} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/DebugRepresentationSelectionPage.java b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/DebugRepresentationSelectionPage.java deleted file mode 100644 index e338546bf..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.extensions.sirius/src/main/java/org/gemoc/xdsmlframework/extensions/sirius/wizards/pages/DebugRepresentationSelectionPage.java +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.extensions.sirius.wizards.pages; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.wizard.IWizardPage; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; -import org.eclipse.sirius.diagram.description.DiagramDescription; -import org.eclipse.sirius.viewpoint.description.RepresentationDescription; -import org.eclipse.sirius.viewpoint.description.Viewpoint; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard; - -/** - * The representation selection page. - * - * @author Yvan Lussaud - * - */ -public class DebugRepresentationSelectionPage extends WizardPage { - - private final NewGemocDebugRepresentationWizard newGemocDebugRepresentationWizard; - - public static final int CREATE_VIEWPOINT_DEFINITION = 0; - - public static final int CREATE_VIEWPOINT_EXTENSION = 1; - - public static final int ADD_DEBUG_LAYER = 2; - - private final Button radio[] = new Button[3]; - - private int selected = -1; - - public DebugRepresentationSelectionPage( - NewGemocDebugRepresentationWizard newGemocDebugRepresentationWizard) { - super("Select debug representation mode"); - this.newGemocDebugRepresentationWizard = newGemocDebugRepresentationWizard; - } - - @Override - public void createControl(Composite parent) { - final Composite composite = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.numColumns = 1; - composite.setLayout(layout); - - radio[CREATE_VIEWPOINT_DEFINITION] = new Button(composite, SWT.RADIO); - radio[CREATE_VIEWPOINT_DEFINITION] - .setText("Create a debug diagram description."); - radio[CREATE_VIEWPOINT_DEFINITION].setLayoutData(new GridData( - GridData.FILL_HORIZONTAL)); - radio[CREATE_VIEWPOINT_DEFINITION].addListener(SWT.Selection, - new Listener() { - @Override - public void handleEvent(Event event) { - selected = CREATE_VIEWPOINT_DEFINITION; - setPageComplete(true); - } - }); - - radio[CREATE_VIEWPOINT_EXTENSION] = new Button(composite, SWT.RADIO); - radio[CREATE_VIEWPOINT_EXTENSION] - .setText("Extends an existing diagram description."); - radio[CREATE_VIEWPOINT_EXTENSION].setLayoutData(new GridData( - GridData.FILL_HORIZONTAL)); - radio[CREATE_VIEWPOINT_EXTENSION].addListener(SWT.Selection, - new Listener() { - @Override - public void handleEvent(Event event) { - selected = CREATE_VIEWPOINT_EXTENSION; - final List descriptions = new ArrayList(); - for (Viewpoint viewpoint : ViewpointRegistry - .getInstance().getViewpoints()) { - for (RepresentationDescription description : viewpoint - .getOwnedRepresentations()) { - if (description instanceof DiagramDescription) { - descriptions - .add((DiagramDescription) description); - } - } - // TODO extensions ? - // for (RepresentationDescription description : - // viewpoint.getOwnedRepresentationExtensions()) - // { - // if (description instanceof - // DiagramDescription) { - // descriptions.add((DiagramDescription) - // description); - // } - // } - } - newGemocDebugRepresentationWizard - .getSelectDiagramDefinitionPage() - .setDescriptions(descriptions); - setPageComplete(true); - } - }); - - radio[ADD_DEBUG_LAYER] = new Button(composite, SWT.RADIO); - radio[ADD_DEBUG_LAYER].setText("Add a debug layer to an existing diagram description."); - radio[ADD_DEBUG_LAYER].setLayoutData(new GridData( - GridData.FILL_HORIZONTAL)); - radio[ADD_DEBUG_LAYER].addListener(SWT.Selection, new Listener() { - @Override - public void handleEvent(Event event) { - selected = ADD_DEBUG_LAYER; - final List descriptions = new ArrayList(); - for (Viewpoint viewpoint : ViewpointRegistry.getInstance() - .getViewpoints()) { - if (!ViewpointRegistry.getInstance() - .isFromPlugin(viewpoint)) { - for (RepresentationDescription description : viewpoint - .getOwnedRepresentations()) { - if (description instanceof DiagramDescription) { - descriptions - .add((DiagramDescription) description); - } - } - // TODO extensions ? - // for (RepresentationDescription description : - // viewpoint.getOwnedRepresentationExtensions()) { - // if (description instanceof DiagramDescription) { - // descriptions.add((DiagramDescription) - // description); - // } - // } - } - } - newGemocDebugRepresentationWizard - .getSelectDiagramDefinitionPage().setDescriptions( - descriptions); - setPageComplete(true); - } - }); - - setControl(composite); - setPageComplete(false); - } - - public int getSelected() { - return selected; - } - - @Override - public IWizardPage getNextPage() { - final IWizardPage res; - - if (selected == CREATE_VIEWPOINT_DEFINITION) { - res = newGemocDebugRepresentationWizard - .getNewViewPointProjectPage(); - } else if (selected == CREATE_VIEWPOINT_EXTENSION - || selected == ADD_DEBUG_LAYER) { - res = newGemocDebugRepresentationWizard - .getSelectDiagramDefinitionPage(); - } else { - res = null; - } - - return res; - } - - @Override - public void dispose() { - super.dispose(); - radio[CREATE_VIEWPOINT_DEFINITION].dispose(); - radio[CREATE_VIEWPOINT_EXTENSION].dispose(); - radio[ADD_DEBUG_LAYER].dispose(); - } - -} \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.classpath b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.classpath deleted file mode 100644 index 86940091c..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.project b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.project deleted file mode 100644 index a8c95ee9a..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.xdsmlframework.ide.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/META-INF/MANIFEST.MF b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 9211fbc73..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,38 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: ExecutionFrmaework Language Workbench UI -Bundle-SymbolicName: org.gemoc.xdsmlframework.ide.ui;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.xdsmlframework.ide.ui.Activator -Bundle-Vendor: INRIA -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.codegen.ecore.ui;bundle-version="2.8.0", - org.eclipse.acceleo.engine;bundle-version="3.3.0", - org.gemoc.xdsmlframework.api;bundle-version="0.1.0", - fr.inria.diverse.k3.ui;bundle-version="1.0.0", - org.gemoc.commons.eclipse, - org.gemoc.commons.eclipse.ui, - org.eclipse.emf.ecore.editor, - org.gemoc.xdsmlframework.ui.utils, - org.gemoc.xdsmlframework.extensions.sirius;bundle-version="0.1.0", - fr.inria.diverse.melange.metamodel, - org.eclipse.xtext.ui, - org.eclipse.xtext, - org.eclipse.sirius.ui, - org.eclipse.jdt.ui, - org.eclipse.ui.console, - org.eclipse.debug.ui, - org.eclipse.emf.ecoretools.design.ui;bundle-version="3.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: lib/jaxen-1.1.6.jar, - lib/jdom-2.0.5.jar, - lib/xercesImpl.jar, - . -Export-Package: org.gemoc.xdsmlframework.ide.ui, - org.gemoc.xdsmlframework.ide.ui.builder.pde, - org.gemoc.xdsmlframework.ide.ui.commands, - org.gemoc.xdsmlframework.ide.ui.xdsml.wizards, - org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.pages, - org.jdom2 - diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/build.properties b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/build.properties deleted file mode 100644 index 0152f1e49..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/build.properties +++ /dev/null @@ -1,11 +0,0 @@ -source.. = src -output.. = bin -bin.includes = META-INF/,\ - .,\ - lib/jaxen-1.1.6.jar,\ - lib/jdom-2.0.5.jar,\ - lib/xercesImpl.jar,\ - plugin.xml,\ - icons/,\ - about.html -src.includes = about.html diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jaxen-1.1.6.LICENSE.txt b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jaxen-1.1.6.LICENSE.txt deleted file mode 100644 index 815a72b20..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jaxen-1.1.6.LICENSE.txt +++ /dev/null @@ -1,33 +0,0 @@ -/* - $Id: LICENSE.txt 1128 2006-02-05 21:49:04Z elharo $ - - Copyright 2003-2006 The Werken Company. All Rights Reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the Jaxen Project nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jaxen-1.1.6.jar b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jaxen-1.1.6.jar deleted file mode 100644 index 52f47a4f4..000000000 Binary files a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jaxen-1.1.6.jar and /dev/null differ diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5-sources.jar b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5-sources.jar deleted file mode 100644 index 7ccbe808c..000000000 Binary files a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5-sources.jar and /dev/null differ diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5.LICENSE b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5.LICENSE deleted file mode 100644 index c18f7bb85..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5.LICENSE +++ /dev/null @@ -1,54 +0,0 @@ -/*-- - - Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions, and the disclaimer that follows - these conditions in the documentation and/or other materials - provided with the distribution. - - 3. The name "JDOM" must not be used to endorse or promote products - derived from this software without prior written permission. For - written permission, please contact . - - 4. Products derived from this software may not be called "JDOM", nor - may "JDOM" appear in their name, without prior written permission - from the JDOM Project Management . - - In addition, we request (but do not require) that you include in the - end-user documentation provided with the redistribution and/or in the - software itself an acknowledgement equivalent to the following: - "This product includes software developed by the - JDOM Project (http://www.jdom.org/)." - Alternatively, the acknowledgment may be graphical using the logos - available at http://www.jdom.org/images/logos. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - This software consists of voluntary contributions made by many - individuals on behalf of the JDOM Project and was originally - created by Jason Hunter and - Brett McLaughlin . For more information - on the JDOM Project, please see . - - */ - diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5.jar b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5.jar deleted file mode 100644 index b6996c725..000000000 Binary files a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/jdom-2.0.5.jar and /dev/null differ diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xerces.2.11.LICENSE b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xerces.2.11.LICENSE deleted file mode 100644 index d64569567..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xerces.2.11.LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xerces.2.11.NOTICE b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xerces.2.11.NOTICE deleted file mode 100644 index 85e6e4eee..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xerces.2.11.NOTICE +++ /dev/null @@ -1,17 +0,0 @@ - ========================================================================= - == NOTICE file corresponding to section 4(d) of the Apache License, == - == Version 2.0, in this case for the Apache Xerces Java distribution. == - ========================================================================= - - Apache Xerces Java - Copyright 1999-2010 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - Portions of this software were originally based on the following: - - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - - voluntary contributions made by Paul Eng on behalf of the - Apache Software Foundation that were originally developed at iClick, Inc., - software copyright (c) 1999. \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xercesImpl.jar b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xercesImpl.jar deleted file mode 100644 index 0aaa990f3..000000000 Binary files a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xercesImpl.jar and /dev/null differ diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xml-apis.jar b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xml-apis.jar deleted file mode 100644 index 46733464f..000000000 Binary files a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/lib/xml-apis.jar and /dev/null differ diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/plugin.xml b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/plugin.xml deleted file mode 100644 index 095b5ba6d..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/plugin.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/pom.xml b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/pom.xml deleted file mode 100644 index ddd7192f8..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.xdsmlframework - org.gemoc.modeldebugging.xdsmlframework.root - 0.1.0-SNAPSHOT - - - org.gemoc.xdsmlframework.ide.ui - eclipse-plugin - \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/Activator.java b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/Activator.java deleted file mode 100644 index b897dbcfd..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/Activator.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.ide.ui; - -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.xdsmlframework.ide.ui"; //$NON-NLS-1$ - - public static final String GEMOC_PROJECT_CONFIGURATION_FILE_EXTENSION = "xdsml"; - public static final String GEMOC_PROJECT_CONFIGURATION_FILE = "project." - + GEMOC_PROJECT_CONFIGURATION_FILE_EXTENSION; - - // extension point constants - - - public static final String MODEL_LOADER_CLASS_NAMEPART = "ModelLoader"; - public static final String CODEEXECUTOR_CLASS_NAMEPART = "CodeExecutor"; - public static final String SOLVER_CLASS_NAMEPART = "Solver"; - public static final String EXTENSION_GENERATED_CLASS_FOLDER_NAME = "src/main/xdsml-java-gen/"; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given plug-in - * relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - public static void warn(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); - } - - public static void error(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); - } - -} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/builder/pde/PluginXMLHelper.java b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/builder/pde/PluginXMLHelper.java deleted file mode 100644 index daae3ee68..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ide.ui/src/org/gemoc/xdsmlframework/ide/ui/builder/pde/PluginXMLHelper.java +++ /dev/null @@ -1,186 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.ide.ui.builder.pde; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtensionPoint; -import org.gemoc.xdsmlframework.ide.ui.Activator; -import org.jdom2.Attribute; -import org.jdom2.Document; -import org.jdom2.Element; -import org.jdom2.filter.ElementFilter; -import org.jdom2.input.SAXBuilder; -import org.jdom2.output.Format; -import org.jdom2.output.XMLOutputter; - -public class PluginXMLHelper { - - public static final String PLUGIN_FILENAME = "plugin.xml"; - - public static final String PLUGIN_TEMPLATE = "\n" - + "\n" + "\n" + ""; - - public static void createEmptyTemplateFile(IFile pluginXmlFile, - boolean overrideIfExist) { - if (overrideIfExist && pluginXmlFile.exists()) { - try { - pluginXmlFile.delete(true, null); - } catch (CoreException e) { - Activator.error(e.getMessage(), e); - } - } - if (!pluginXmlFile.exists()) { - try { - InputStream stream = new ByteArrayInputStream( - PLUGIN_TEMPLATE.getBytes()); - if (pluginXmlFile.exists()) { - pluginXmlFile.setContents(stream, true, true, null); - } else { - pluginXmlFile.create(stream, true, null); - } - stream.close(); - } catch (IOException e) { - Activator.error(e.getMessage(), e); - } catch (CoreException e) { - Activator.error(e.getMessage(), e); - } - } - } - - protected Document document; - protected Element root; - - public void loadDocument(IFile pluginXmlFile) { - SAXBuilder sxb = new SAXBuilder(); - try { - if(!pluginXmlFile.isSynchronized(IResource.DEPTH_ZERO)){ - pluginXmlFile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor()); - } - document = sxb.build(pluginXmlFile.getContents()); - - root = document.getRootElement(); - } catch (Exception e) { - Activator.error(e.getMessage(), e); - } - } - - public void saveDocument(IFile pluginXmlFile) { - try { - XMLOutputter sortie = new XMLOutputter(Format.getPrettyFormat()); - - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - - sortie.output(document, stream); - InputStream inputStream = new ByteArrayInputStream( - stream.toByteArray()); - pluginXmlFile.setContents(inputStream, IResource.FORCE, null); - } catch (IOException e) { - Activator.error(e.getMessage(), e); - } catch (CoreException e) { - Activator.error(e.getMessage(), e); - } - } - - - public Element updateXDSMLDefinitionInExtensionPoint(Element extensionPoint, String xDSMLName){ - Element result; - List elements = extensionPoint.getContent(new ElementFilter(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF)); - if(elements.size() == 0){ - // create extension point - result = new Element(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF); - extensionPoint.addContent(result); - } - else{ - result = elements.get(0); - } - result.setAttribute("name", xDSMLName); - return result; - } - public Element updateXDSMLDefinitionAttributeInExtensionPoint(Element extensionPoint, String atributeName, String value){ - Element result; - List elements = extensionPoint.getContent(new ElementFilter(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF)); - if(elements.size() == 0){ - // create extension point - result = new Element(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF); - extensionPoint.addContent(result); - } - else{ - result = elements.get(0); - } - result.setAttribute(atributeName, value); - return result; - } - public String getXDSMLDefinitionAttributeInExtensionPointValue(Element extensionPoint, String atributeName){ - Element result; - List elements = extensionPoint.getContent(new ElementFilter(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF)); - if(elements.size() == 0){ - // create extension point - result = new Element(LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF); - extensionPoint.addContent(result); - } - else{ - result = elements.get(0); - } - return result.getAttributeValue(atributeName); - } - - public Element getOrCreateExtensionPoint(String extensionPointName){ - Element result; - List elements = root.getContent(new ExtensionFilter(extensionPointName)); - if(elements.size() == 0){ - // create extension point - result = new Element("extension"); - result.setAttribute("point", extensionPointName); - root.addContent(result); - } - else{ - result = elements.get(0); - } - return result; - } - - public class ExtensionFilter extends ElementFilter{ - - /** - * - */ - private static final long serialVersionUID = -1941823619643486082L; - protected String extensionPointName; - - public ExtensionFilter(String extensionPointName){ - super("extension"); - this.extensionPointName = extensionPointName; - } - - @Override - public Element filter(Object content) { - Element result = super.filter(content); - if(result == null) return null; - Attribute att = result.getAttribute("point"); - if(att == null) return null; - if(att.getValue().equals(extensionPointName)) return result; - else return null; - } - - } - - - -} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/.project b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/.project deleted file mode 100644 index 3be71689c..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.xdsmlframework.ui.utils - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/META-INF/MANIFEST.MF b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/META-INF/MANIFEST.MF deleted file mode 100644 index c44e0fe09..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Utils -Bundle-SymbolicName: org.gemoc.xdsmlframework.ui.utils -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.xdsmlframework.ui.utils.Activator -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.codegen.ecore.ui;bundle-version="2.8.0", - org.gemoc.commons.eclipse, - org.gemoc.commons.eclipse.ui, - org.eclipse.emf.ecore.editor, - fr.inria.diverse.k3.al.annotationprocessor.plugin, - fr.inria.diverse.melange.metamodel -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ActivationPolicy: lazy -Export-Package: org.gemoc.xdsmlframework.ui.utils, - org.gemoc.xdsmlframework.ui.utils.dialogs diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/pom.xml b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/pom.xml deleted file mode 100644 index 1da46d878..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.xdsmlframework - org.gemoc.modeldebugging.xdsmlframework.root - 0.1.0-SNAPSHOT - - - org.gemoc.xdsmlframework.ui.utils - eclipse-plugin - \ No newline at end of file diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/Activator.java b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/Activator.java deleted file mode 100644 index 15ca90e22..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/Activator.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.ui.utils; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.xdsmlframework.ui.utils"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAIRDIFileDialog.java b/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAIRDIFileDialog.java deleted file mode 100644 index 66175888a..000000000 --- a/framework/xdsml_framework/plugins/org.gemoc.xdsmlframework.ui.utils/src/org/gemoc/xdsmlframework/ui/utils/dialogs/SelectAIRDIFileDialog.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * 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.gemoc.xdsmlframework.ui.utils.dialogs; - -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.commons.eclipse.ui.dialogs.SelectSpecificFileDialog; - - - -public class SelectAIRDIFileDialog extends SelectSpecificFileDialog { - - @Override - protected FileFinderVisitor instanciateFinder() { - return new FileFinderVisitor("aird"); - } - -} diff --git a/framework/xdsml_framework/pom.xml b/framework/xdsml_framework/pom.xml index 4137ec88e..53fcef4b0 100644 --- a/framework/xdsml_framework/pom.xml +++ b/framework/xdsml_framework/pom.xml @@ -3,28 +3,28 @@ 4.0.0 org.gemoc.modeldebugging.xdsmlframework org.gemoc.modeldebugging.xdsmlframework.root - 0.1.0-SNAPSHOT + 2.3.0-SNAPSHOT pom - org.gemoc - org.gemoc.siriusanimation.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.root + 2.3.0-SNAPSHOT ../.. - plugins/org.gemoc.xdsmlframework.ui.utils - plugins/org.gemoc.xdsmlframework.ide.ui - plugins/org.gemoc.xdsmlframework.extensions.sirius + plugins/org.eclipse.gemoc.xdsmlframework.ui.utils + plugins/org.eclipse.gemoc.xdsmlframework.ide.ui + plugins/org.eclipse.gemoc.xdsmlframework.extensions.sirius + tests/org.eclipse.gemoc.xdsmlframework.test.lib - - releng/org.gemoc.modeldebugging.xdsmlframework.feature - releng/org.gemoc.modeldebugging.xdsmlframework.repository + + releng/org.eclipse.gemoc.xdsmlframework.feature - + @@ -54,12 +54,7 @@ gemoc-studio_commons on CI p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.gemoc.commons.repository/target/repository/ - - - gemoc-studio_gemoc_commons on CI - p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_gemoc_commons/lastSuccessfulBuild/artifact/gemoc_commons/releng/org.gemoc.gemoc_commons.repository/target/repository/ + https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.eclipse.gemoc.commons.repository/target/repository/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/pom.xml b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/pom.xml new file mode 100644 index 000000000..d630f31c3 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/pom.xml @@ -0,0 +1,62 @@ + + + + + 4.0.0 + + + ../../.. + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.execution.sequential.javaengine.ui + eclipse-plugin + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + .gitignore + + + + + + + + \ No newline at end of file diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/Activator.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/Activator.java new file mode 100644 index 000000000..d750a2d62 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/Activator.java @@ -0,0 +1,120 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import java.util.function.Supplier; + +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; +import org.eclipse.gemoc.executionframework.extensions.sirius.services.AbstractGemocDebuggerServices; +import org.osgi.framework.BundleContext; + +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystemManager; +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystem; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.execution.sequential.javaengine.ui"; //$NON-NLS-1$ + + public static final String DEBUG_MODEL_ID = PLUGIN_ID + ".debugModel"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + protected MessagingSystem messaggingSystem = null; + + private Supplier debuggerSupplier; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + // start the messagin system ui plugin to load default settings. + org.eclipse.gemoc.commons.eclipse.messagingsystem.ui.Activator.getDefault(); + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + public void stop(BundleContext context) throws Exception { + AbstractGemocDebuggerServices.LISTENER.uninstall(); + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given plug-in + * relative path + * + * @param path + * the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + public static void warn(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); + } + + public static void error(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); + } + + public MessagingSystem getMessaggingSystem() { + if (messaggingSystem == null) { + MessagingSystemManager msm = new MessagingSystemManager(); + messaggingSystem = msm.createBestPlatformMessagingSystem(PLUGIN_ID, "Modeling workbench console"); + } + return messaggingSystem; + } + + public Supplier getDebuggerSupplier() { + return debuggerSupplier; + } + + public void setDebuggerSupplier(Supplier debuggerSupplier) { + this.debuggerSupplier = debuggerSupplier; + } + +} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/ModelingWorkbenchEarlyStartup.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/ModelingWorkbenchEarlyStartup.java similarity index 87% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/ModelingWorkbenchEarlyStartup.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/ModelingWorkbenchEarlyStartup.java index 7cf5ba24b..878fe6465 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/ModelingWorkbenchEarlyStartup.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/ModelingWorkbenchEarlyStartup.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui; +package org.eclipse.gemoc.execution.sequential.javaengine.ui; import org.eclipse.ui.IStartup; 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 new file mode 100644 index 000000000..cc80425a1 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/commands/GemocToggleBreakpointHandler.java @@ -0,0 +1,129 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.commands; + +import java.util.Iterator; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.ISelectionService; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.Launcher; +import org.eclipse.gemoc.executionframework.debugger.GemocBreakpoint; + +import fr.inria.diverse.melange.resource.MelangeResource; +import org.eclipse.gemoc.trace.commons.model.trace.MSE; +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.DSLToggleBreakpointsUtils; + +public class GemocToggleBreakpointHandler extends AbstractHandler { + + /** + * The {@link DSLToggleBreakpointsUtils}. + */ + protected final DSLToggleBreakpointsUtils breakpointUtils; + org.eclipse.ui.ide.IGotoMarker f; + /** + * Constructor. + */ + public GemocToggleBreakpointHandler() { + breakpointUtils = new DSLToggleBreakpointsUtils(Launcher.MODEL_ID) { + + @Override + protected EObject getInstruction(Object selected) { + final EObject res; + + if (selected instanceof MSE) + { + res = ((MSE) selected); + } + else if (selected instanceof MSEOccurrence) + { + res = ((MSEOccurrence) selected).getMse(); + } + else + { + res = super.getInstruction(selected); + } + + return res; + } + + @Override + protected DSLBreakpoint createBreakpoint(Object selected, + EObject instruction) throws CoreException { + final Resource res = ((EObject)instruction).eResource(); + final ResourceSet resSet = res.getResourceSet(); + final MelangeResource mr = resSet.getResources().stream().filter(r -> { + return r instanceof MelangeResource; + }).map(r -> (MelangeResource)r).findFirst().orElse(null); + if (mr != null) { + final String fragmentURI = res.getURIFragment(instruction); + instruction = mr.getWrappedResource().getEObject(fragmentURI); + } + return new GemocBreakpoint(identifier, instruction, true); + } + + }; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent) + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + final ISelection selection = HandlerUtil + .getCurrentSelectionChecked(event); + try { + breakpointUtils.toggleBreakpoints(selection); + } catch (CoreException e) { + throw new ExecutionException("Error while toggling breakpoint.", e); + } + + return null; + } + + @Override + public boolean isEnabled() { + final boolean res; + + ISelectionService service = (ISelectionService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ISelectionService.class); + if (service != null) { + final ISelection selection = service.getSelection(); + if (selection instanceof IStructuredSelection) { + boolean allValidMSE = true; + final Iterator it = ((IStructuredSelection) selection).iterator(); + while (allValidMSE && it.hasNext()) { + Object current = it.next(); + allValidMSE = current instanceof MSE /*&& ((MSE) current).getAction() != null*/; + } + res = allValidMSE; + } else { + res = false; + } + } else { + res = false; + } + + return res; + } + +} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/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 similarity index 79% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/GenericSequentialModelDebugger.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/GenericSequentialModelDebugger.java index d623bf0d6..85e755d58 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.debug; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.debug; import java.util.ArrayDeque; import java.util.ArrayList; @@ -19,18 +19,20 @@ 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.gemoc.executionframework.engine.core.EngineStoppedException; -import org.gemoc.executionframework.engine.ui.debug.AbstractGemocDebugger; -import org.gemoc.executionframework.engine.ui.debug.breakpoint.GemocBreakpoint; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; - -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; +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; public class GenericSequentialModelDebugger extends AbstractGemocDebugger { @@ -39,10 +41,12 @@ public class GenericSequentialModelDebugger extends AbstractGemocDebugger { */ private static final EObject FAKE_INSTRUCTION = EcorePackage.eINSTANCE; + private List toPushPop = new ArrayList<>(); + protected final String threadName = "Model debugging"; protected int nbStackFrames = 0; - + protected boolean executionTerminated = false; public GenericSequentialModelDebugger(IDSLDebugEventProcessor target, IExecutionEngine engine) { @@ -54,7 +58,7 @@ public GenericSequentialModelDebugger(IDSLDebugEventProcessor target, IExecution * This method is eventually called within a new engine thread. * (non-Javadoc) * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#start() + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#start() */ public void start() { engine.start(); @@ -135,22 +139,18 @@ public boolean test(IExecutionEngine t, MSEOccurrence u) { }); } - Deque stackFrameNames = new ArrayDeque<>(); - @Override public void pushStackFrame(String threadName, String frameName, EObject context, EObject instruction) { super.pushStackFrame(threadName, frameName, context, instruction); - stackFrameNames.push(frameName); nbStackFrames++; } @Override public void popStackFrame(String threadName) { super.popStackFrame(threadName); - stackFrameNames.pop(); nbStackFrames--; } - + protected final DefaultDeclarativeQualifiedNameProvider nameprovider = new DefaultDeclarativeQualifiedNameProvider(); @Override @@ -183,7 +183,10 @@ protected void updateStack(String threadName, EObject instruction) { EObject caller = mseOccurrence.getMse().getCaller(); QualifiedName qname = nameprovider.getFullyQualifiedName(caller); String objectName = ""; - if(qname != null) objectName=qname.toString(); else objectName=caller.toString(); + if (qname != null) + objectName = qname.toString(); + else + objectName = caller.toString(); String opName = mseOccurrence.getMse().getAction().getName(); String callerType = caller.eClass().getName(); String prettyName = "(" + callerType + ") " + objectName + " -> " + opName + "()"; @@ -204,8 +207,8 @@ public void updateData(String threadName, EObject instruction) { } // We don't want to deal with logical steps since we are in sequential mode - if (instruction instanceof Step) { - instruction = ((Step) instruction).getMseoccurrence().getMse().getCaller(); + if (instruction instanceof Step) { + instruction = ((Step) instruction).getMseoccurrence().getMse().getCaller(); } else if (instruction instanceof MSEOccurrence) { instruction = ((MSEOccurrence) instruction).getMse().getCaller(); } @@ -218,16 +221,39 @@ public boolean shouldBreak(EObject instruction) { if (instruction instanceof MSEOccurrence) { return shouldBreakMSEOccurence((MSEOccurrence) instruction); } else if (instruction == FAKE_INSTRUCTION) { - // Part of the breakpoint simulation to suspend the execution once the end has been reached. + // Part of the breakpoint simulation to suspend the execution once + // the end has been reached. return true; } return false; } private boolean hasRegularBreakpointTrue(EObject o) { - return super.shouldBreak(o) - && (Boolean.valueOf((String) getBreakpointAttributes(o, GemocBreakpoint.BREAK_ON_LOGICAL_STEP)) || Boolean - .valueOf((String) getBreakpointAttributes(o, GemocBreakpoint.BREAK_ON_MSE_OCCURRENCE))); + EObject target = o; + // Try to get the original object if 'o' comes from + // a downcast resource + if(this.engine instanceof PlainK3ExecutionEngine){ + Resource res = o.eResource(); + if(res != null) { + + MelangeResourceImpl mr = null; + for(Resource candidate : res.getResourceSet().getResources()) { + if(candidate instanceof MelangeResourceImpl) { + mr = (MelangeResourceImpl) candidate; + break; + } + } + + if(mr != null) { + String uriFragment = res.getURIFragment(o); + target = mr.getWrappedResource().getEObject(uriFragment); + } + } + } + + return super.shouldBreak(target) + && (Boolean.valueOf((String) getBreakpointAttributes(target, GemocBreakpoint.BREAK_ON_LOGICAL_STEP)) || Boolean + .valueOf((String) getBreakpointAttributes(target, GemocBreakpoint.BREAK_ON_MSE_OCCURRENCE))); } private boolean shouldBreakMSEOccurence(MSEOccurrence mseOccurrence) { @@ -266,7 +292,7 @@ public void engineStopped(IExecutionEngine engine) { } @Override - public void aboutToExecuteStep(IExecutionEngine executionEngine, Step step) { + public void aboutToExecuteStep(IExecutionEngine executionEngine, Step step) { MSEOccurrence mseOccurrence = step.getMseoccurrence(); if (mseOccurrence != null) { ToPushPop stackModification = new ToPushPop(mseOccurrence, true); @@ -278,20 +304,20 @@ public void aboutToExecuteStep(IExecutionEngine executionEngine, Step step) { } @Override - public void stepExecuted(IExecutionEngine engine, Step step) { + public void stepExecuted(IExecutionEngine engine, Step step) { MSEOccurrence mseOccurrence = step.getMseoccurrence(); if (mseOccurrence != null) { ToPushPop stackModification = new ToPushPop(mseOccurrence, false); toPushPop.add(stackModification); } } - + @Override public void engineAboutToStop(IExecutionEngine engine) { // Simulating breakpoint - // TODO maybe display a warning informing the user the execution has ended, - // as resuming execution will prevent further interactions with the trace and the - // debugging facilities, which might not be desirable. + // TODO maybe display a warning informing the user the execution has + // ended, as resuming execution will prevent further interactions with the + // trace and the debugging facilities, which might not be desirable. executionTerminated = true; control(threadName, FAKE_INSTRUCTION); } @@ -311,7 +337,4 @@ private static class ToPushPop { this.push = push; } } - - private List toPushPop = new ArrayList<>(); - } diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/OmniscientGenericSequentialModelDebugger.xtend b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/OmniscientGenericSequentialModelDebugger.xtend similarity index 75% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/OmniscientGenericSequentialModelDebugger.xtend rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/OmniscientGenericSequentialModelDebugger.xtend index a0eb6ae3e..0a83d7369 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/OmniscientGenericSequentialModelDebugger.xtend +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/debug/OmniscientGenericSequentialModelDebugger.xtend @@ -1,12 +1,26 @@ -package org.gemoc.execution.sequential.javaengine.ui.debug; - -import fr.inria.diverse.trace.commons.model.trace.MSE -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence -import fr.inria.diverse.trace.commons.model.trace.Step -import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon -import fr.inria.diverse.trace.gemoc.api.ITraceExplorer -import fr.inria.diverse.trace.gemoc.api.ITraceListener -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import org.eclipse.gemoc.trace.commons.model.trace.Dimension +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.State +import org.eclipse.gemoc.trace.commons.model.trace.Step +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.ITraceExplorer +import org.eclipse.gemoc.trace.gemoc.api.ITraceViewListener +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor import java.util.ArrayList import java.util.List import java.util.function.BiPredicate @@ -15,14 +29,13 @@ import org.eclipse.core.runtime.Status import org.eclipse.emf.ecore.EObject import org.eclipse.jface.dialogs.ErrorDialog import org.eclipse.xtext.naming.QualifiedName -import org.gemoc.execution.sequential.javaengine.ui.Activator -import org.gemoc.executionframework.engine.core.EngineStoppedException -import org.gemoc.xdsmlframework.api.core.IExecutionEngine -import org.gemoc.xdsmlframework.api.core.IExecutionEngine +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator +import org.eclipse.gemoc.executionframework.engine.core.EngineStoppedException +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine -public class OmniscientGenericSequentialModelDebugger extends GenericSequentialModelDebugger implements ITraceListener { +public class OmniscientGenericSequentialModelDebugger extends GenericSequentialModelDebugger implements ITraceViewListener { - private var ITraceExplorer traceExplorer + private var ITraceExplorer, State, TracedObject, Dimension, Value> traceExplorer private var steppingOverStackFrameIndex = -1 @@ -30,18 +43,18 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM private val List callerStack = new ArrayList - private val List previousCallStack = new ArrayList + private val List> previousCallStack = new ArrayList new(IDSLDebugEventProcessor target, IExecutionEngine engine) { super(target, engine) } - def private MSE getMSEFromStep(Step step) { + def private MSE getMSEFromStep(Step step) { val mseOccurrence = step.mseoccurrence if (mseOccurrence == null) { val container = step.eContainer - if (container instanceof Step) { - val parentStep = container as Step + if (container instanceof Step) { + val parentStep = container as Step val parentMseOccurrence = parentStep.mseoccurrence if (parentMseOccurrence == null) { throw new IllegalStateException("A step without MSEOccurrence cannot be contained in a step without MSEOccurrence") @@ -56,7 +69,7 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM } } - def private void pushStackFrame(String threadName, Step step) { + def private void pushStackFrame(String threadName, Step step) { var MSE mse = getMSEFromStep(step) var EObject caller = mse.caller val QualifiedName qname = nameprovider.getFullyQualifiedName(caller) @@ -73,7 +86,7 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM callerStack.remove(0) } - override void aboutToExecuteStep(IExecutionEngine executionEngine, Step step) { + override void aboutToExecuteStep(IExecutionEngine executionEngine, Step step) { val mseOccurrence = step.mseoccurrence if (mseOccurrence != null) { if (!control(threadName, mseOccurrence)) { @@ -109,7 +122,7 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM if (steppingOverStackFrameIndex != -1) { val seqEngine = engine as IExecutionEngine val stack = traceExplorer.callStack - val idx = stack.size - steppingOverStackFrameIndex + val idx = stack.size - steppingOverStackFrameIndex - 1 // We add a future break as soon as the step is over addPredicateBreak(new BiPredicate() { // The operation we want to step over @@ -152,7 +165,7 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM if (steppingReturnStackFrameIndex != -1) { val seqEngine = engine as IExecutionEngine val stack = traceExplorer.callStack - val idx = stack.size - steppingReturnStackFrameIndex + val idx = stack.size - steppingReturnStackFrameIndex - 1 addPredicateBreak(new BiPredicate() { private MSEOccurrence steppedReturn = stack.get(idx).mseoccurrence @@ -226,10 +239,10 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM val Activator activator = Activator.getDefault() activator.debuggerSupplier = [this] super.engineStarted(executionEngine) - val traceAddons = executionEngine.getAddonsTypedBy(IMultiDimensionalTraceAddon); - val traceAddon = traceAddons.iterator().next(); - traceExplorer = traceAddon.getTraceExplorer(); - traceExplorer.addListener(this) + val traceAddons = executionEngine.getAddonsTypedBy(IMultiDimensionalTraceAddon) + val traceAddon = traceAddons.iterator().next() + traceExplorer = traceAddon.getTraceExplorer() + traceExplorer.registerCommand(this, [|update]) } override void engineAboutToStop(IExecutionEngine engine) { @@ -264,7 +277,11 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM override update() { if (executedModelRoot != null) { try { - updateData(threadName, callerStack.findFirst[true]) + if(!callerStack.empty){ + updateData(threadName, callerStack.findFirst[true]) + } else { + + } } catch (IllegalStateException e) { // Shhh } 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/GemocSequentialDebugAs.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/GemocSequentialDebugAs.java new file mode 100644 index 000000000..e4de23026 --- /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/GemocSequentialDebugAs.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.launcher.Launcher; + +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.action.AbstractDebugAsAction; + +public class GemocSequentialDebugAs extends AbstractDebugAsAction { + + @Override + protected String getLaunchConfigurationTypeID() { + return Launcher.TYPE_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/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 new file mode 100644 index 000000000..7133c0b6c --- /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/GemocSequentialToggleBreakpointAction.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.GemocToggleBreakpointAction; + +/** + * commons class for all Gemoc based models + * @author dvojtise + * + */ +public class GemocSequentialToggleBreakpointAction extends GemocToggleBreakpointAction { + + @Override + protected String getModelIdentifier() { + return Activator.DEBUG_MODEL_ID; + } + + + +} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackIntoHandler.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackIntoHandler.java similarity index 86% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackIntoHandler.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackIntoHandler.java index 8913d4432..574cad174 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackIntoHandler.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackIntoHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,15 +8,15 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.handlers; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.handlers; import java.util.function.Supplier; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; -import org.gemoc.execution.sequential.javaengine.ui.Activator; -import org.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; /** * Our sample handler extends AbstractHandler, an IHandler base class. diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOutHandler.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOutHandler.java similarity index 86% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOutHandler.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOutHandler.java index 58c0681c8..dab323165 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOutHandler.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOutHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,15 +8,15 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.handlers; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.handlers; import java.util.function.Supplier; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; -import org.gemoc.execution.sequential.javaengine.ui.Activator; -import org.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; /** * Our sample handler extends AbstractHandler, an IHandler base class. diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOverHandler.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOverHandler.java similarity index 86% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOverHandler.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOverHandler.java index cde6aa099..50cd18ce9 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOverHandler.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/handlers/StepBackOverHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,15 +8,15 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.handlers; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.handlers; import java.util.function.Supplier; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; -import org.gemoc.execution.sequential.javaengine.ui.Activator; -import org.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; /** * Our sample handler extends AbstractHandler, an IHandler base class. diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/GemocDebugModelPresentation.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/GemocDebugModelPresentation.java similarity index 75% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/GemocDebugModelPresentation.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/GemocDebugModelPresentation.java index a56c5bb72..e908baf7f 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/GemocDebugModelPresentation.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/GemocDebugModelPresentation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.launcher; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher; import java.util.ArrayList; import java.util.LinkedHashSet; @@ -22,13 +22,13 @@ import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; -import org.gemoc.executionframework.ui.IMSEPresenter; +import org.eclipse.gemoc.executionframework.ui.IMSEPresenter; -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.obeo.dsl.debug.ide.adapter.DSLStackFrameAdapter; -import fr.obeo.dsl.debug.ide.sirius.ui.DSLDebugModelPresentation; -import fr.obeo.dsl.debug.ide.sirius.ui.SiriusEditorUtils; +import org.eclipse.gemoc.trace.commons.model.trace.MSE; +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLStackFrameAdapter; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.DSLDebugModelPresentation; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.SiriusEditorUtils; public class GemocDebugModelPresentation extends DSLDebugModelPresentation { @@ -36,8 +36,7 @@ public class GemocDebugModelPresentation extends DSLDebugModelPresentation { public IEditorInput getEditorInput(Object element) { final IEditorInput res; - if (element instanceof MSE - && ((MSE) element).getCaller() != null) { + if (element instanceof MSE && ((MSE) element).getCaller() != null) { res = super.getEditorInput(((MSE) element).getCaller()); } else { res = super.getEditorInput(element); @@ -50,14 +49,12 @@ public IEditorInput getEditorInput(Object element) { public String getEditorId(IEditorInput input, Object element) { final String res; - if (element instanceof MSE - && ((MSE) element).getCaller() != null) { + if (element instanceof MSE && ((MSE) element).getCaller() != null) { res = super.getEditorId(input, ((MSE) element).getCaller()); } else { res = super.getEditorId(input, element); } - return res; } @@ -66,8 +63,7 @@ public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) { if (frame instanceof DSLStackFrameAdapter) { changeCurrentStackFrame(frame); if (editorPart instanceof DialectEditor) { - EObject instruction = ((DSLStackFrameAdapter) frame) - .getCurrentInstruction(); + EObject instruction = ((DSLStackFrameAdapter) frame).getCurrentInstruction(); if (instruction instanceof Step) { final List tickedEvents = new ArrayList<>(); tickedEvents.add(((Step) instruction).getMseoccurrence().getMse()); @@ -78,7 +74,7 @@ public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) { callers.add(event.getCaller()); } } - try{ + try { SiriusEditorUtils.showInstructions((DialectEditor) editorPart, new ArrayList(callers)); } catch (Exception e) { e.printStackTrace(); @@ -95,7 +91,7 @@ public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) { } } - return true; + return false; } private void showEvents(List events) { @@ -103,12 +99,9 @@ private void showEvents(List events) { for (MSE event : events) { uris.add(EcoreUtil.getURI(event)); } - for (IMSEPresenter presenter : org.gemoc.executionframework.ui.Activator - .getDefault().getEventPresenters()) { + for (IMSEPresenter presenter : org.eclipse.gemoc.executionframework.ui.Activator.getDefault().getEventPresenters()) { presenter.present(uris); } } - - } diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/GemocSourceLocator.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/GemocSourceLocator.java new file mode 100644 index 000000000..64e26d4af --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/GemocSourceLocator.java @@ -0,0 +1,114 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.launcher; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Path; +import org.eclipse.debug.core.model.IStackFrame; +import org.eclipse.debug.internal.ui.DebugUIPlugin; +import org.eclipse.debug.internal.ui.DelegatingModelPresentation; +import org.eclipse.debug.ui.ISourcePresentation; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator; + +import fr.inria.diverse.melange.resource.MelangeResourceImpl; +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.dsl.debug.ide.DSLSourceLocator; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLStackFrameAdapter; + +public class GemocSourceLocator extends DSLSourceLocator implements ISourcePresentation { + + @Override + public Object getSourceElement(IStackFrame stackFrame) { + final Object res; + if (stackFrame instanceof DSLStackFrameAdapter) { + final DSLStackFrameAdapter eStackFrame = (DSLStackFrameAdapter) stackFrame; + final EObject instruction = eStackFrame.getCurrentInstruction(); + if (instruction instanceof Step) { + res = ((Step) instruction).getMseoccurrence().getMse(); + } else if (instruction != null) { + res = instruction; + } else { + res = eStackFrame.getContext(); + } + } else { + res = null; + } + return res; + } + + @Override + public IEditorInput getEditorInput(Object element) { + if (element instanceof EObject) { + + EObject eObject = (EObject) element; + EObject target = eObject; + + Resource res = eObject.eResource(); + if(res != null && res.getResourceSet() != null) { + + MelangeResourceImpl mr = null; + for(Resource candidate : res.getResourceSet().getResources()) { + if(candidate instanceof MelangeResourceImpl) { + mr = (MelangeResourceImpl) candidate; + break; + } + } + + if(mr != null) { + String uriFragment = res.getURIFragment(eObject); + target = mr.getWrappedResource().getEObject(uriFragment); + } + } + + Resource r = eObject.eResource(); + if (r instanceof XtextResource) { + URI uri = target.eResource().getURI(); + if(uri.toPlatformString(true) != null){ + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true))); + IFileEditorInput input = new FileEditorInput(file); + return input; + } + } + else { + //Default + return getPresentation().getEditorInput(eObject); + } + } + return null; + } + + @Override + public String getEditorId(IEditorInput input, Object element) { + if (element instanceof EObject) { + EObject eObject = (EObject) element; + Resource r = eObject.eResource(); + if (r instanceof XtextResource) { + return ((XtextResource) r).getLanguageName(); + } + } + + //Default + ISourcePresentation presentation = getPresentation(); + return presentation.getEditorId(input, element); + } + private ISourcePresentation getPresentation() { + String id = Activator.DEBUG_MODEL_ID; + return ((DelegatingModelPresentation)DebugUIPlugin.getModelPresentation()).getPresentation(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/Launcher.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/Launcher.java new file mode 100644 index 000000000..c524d3f13 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/Launcher.java @@ -0,0 +1,195 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.launcher; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.BiPredicate; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gemoc.executionframework.debugger.AnnotationMutableFieldExtractor; +import org.eclipse.gemoc.executionframework.debugger.IntrospectiveMutableFieldExtractor; +import org.eclipse.gemoc.commons.eclipse.ui.ViewHelper; +import org.eclipse.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine; +import org.eclipse.gemoc.execution.sequential.javaengine.SequentialModelExecutionContext; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.GenericSequentialModelDebugger; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; +import org.eclipse.gemoc.executionframework.debugger.AbstractGemocDebugger; +import org.eclipse.gemoc.executionframework.debugger.IMutableFieldExtractor; +import org.eclipse.gemoc.executionframework.engine.commons.EngineContextException; +import org.eclipse.gemoc.executionframework.engine.commons.ModelExecutionContext; +import org.eclipse.gemoc.executionframework.engine.ui.commons.RunConfiguration; +import org.eclipse.gemoc.executionframework.engine.ui.launcher.AbstractSequentialGemocLauncher; +import org.eclipse.gemoc.executionframework.ui.views.engine.EnginesStatusView; +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration; + +import org.eclipse.gemoc.commons.eclipse.messagingsystem.api.MessagingSystem; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; +import org.eclipse.gemoc.trace.gemoc.api.IMultiDimensionalTraceAddon; +import org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger; +import org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher; + +public class Launcher extends AbstractSequentialGemocLauncher { + + public final static String TYPE_ID = Activator.PLUGIN_ID + ".launcher"; + + @Override + protected IExecutionEngine createExecutionEngine(RunConfiguration runConfiguration, ExecutionMode executionMode) + throws CoreException, EngineContextException { + // create and initialize engine + IExecutionEngine executionEngine = new PlainK3ExecutionEngine(); + ModelExecutionContext executioncontext = new SequentialModelExecutionContext(runConfiguration, executionMode); + executioncontext.getExecutionPlatform().getModelLoader().setProgressMonitor(this.launchProgressMonitor); + executioncontext.initializeResourceModel(); + executionEngine.initialize(executioncontext); + return executionEngine; + } + + @Override + protected IDSLDebugger getDebugger(ILaunchConfiguration configuration, DSLDebugEventDispatcher dispatcher, + EObject firstInstruction, IProgressMonitor monitor) { + + IExecutionEngine engine = (IExecutionEngine) _executionEngine; + AbstractGemocDebugger res; + Set traceAddons = _executionEngine + .getAddonsTypedBy(IMultiDimensionalTraceAddon.class); + + // We don't want to use trace managers that only work with a subset of + // the execution state + traceAddons.removeIf(traceAddon -> { + return traceAddon.getTraceConstructor() != null && traceAddon.getTraceConstructor().isPartialTraceConstructor(); + }); + + if (traceAddons.isEmpty()) { + res = new GenericSequentialModelDebugger(dispatcher, engine); + } else { + res = new OmniscientGenericSequentialModelDebugger(dispatcher, engine); + } + // We create a list of all mutable data extractors we want to try + List extractors = new ArrayList(); + // We put annotation first + extractors.add(new AnnotationMutableFieldExtractor()); + // Then introspection + extractors.add(new IntrospectiveMutableFieldExtractor(_executionEngine.getExecutionContext() + .getRunConfiguration().getLanguageName())); + res.setMutableFieldExtractors(extractors); + + // If in the launch configuration it is asked to pause at the start, + // we add this dummy break + try { + if (configuration.getAttribute(RunConfiguration.LAUNCH_BREAK_START, false)) { + res.addPredicateBreak(new BiPredicate() { + @Override + public boolean test(IExecutionEngine t, MSEOccurrence u) { + return true; + } + }); + } + } catch (CoreException e) { + Activator.error(e.getMessage(), e); + } + + _executionEngine.getExecutionContext().getExecutionPlatform().addEngineAddon(res); + return res; + } + + @Override + protected String getLaunchConfigurationTypeID() { + return TYPE_ID; + } + + @Override + protected String getDebugJobName(ILaunchConfiguration configuration, EObject firstInstruction) { + return "Gemoc debug job"; + } + + @Override + protected String getPluginID() { + return Activator.PLUGIN_ID; + } + + @Override + public String getModelIdentifier() { + return Activator.DEBUG_MODEL_ID; + } + + @Override + protected void prepareViews() { + ViewHelper.retrieveView(EnginesStatusView.ID); + } + + @Override + protected RunConfiguration parseLaunchConfiguration(ILaunchConfiguration configuration) throws CoreException { + return new RunConfiguration(configuration); + } + + @Override + protected void error(String message, Exception e) { + Activator.error(message, e); + } + + @Override + protected MessagingSystem getMessagingSystem() { + return Activator.getDefault().getMessaggingSystem(); + } + + @Override + protected void setDefaultsLaunchConfiguration(ILaunchConfigurationWorkingCopy configuration) { + + } + + @Override + public Map parseLaunchConfiguration(LaunchConfiguration launchConfiguration) { + Map attributes = new HashMap<>(); + for (LaunchConfigurationParameter param : launchConfiguration.getParameters()) { + switch (param.eClass().getClassifierID()) { + case LaunchconfigurationPackage.LANGUAGE_NAME_PARAMETER: { + attributes.put(IRunConfiguration.LAUNCH_SELECTED_LANGUAGE, param.getValue()); + } + case LaunchconfigurationPackage.MODEL_URI_PARAMETER: { + attributes.put("Resource", param.getValue()); + } + case LaunchconfigurationPackage.ANIMATOR_URI_PARAMETER: { + attributes.put("airdResource", param.getValue()); + } + case LaunchconfigurationPackage.ENTRY_POINT_PARAMETER: { + attributes.put(IRunConfiguration.LAUNCH_METHOD_ENTRY_POINT, param.getValue()); + } + case LaunchconfigurationPackage.MODEL_ROOT_PARAMETER: { + attributes.put(IRunConfiguration.LAUNCH_MODEL_ENTRY_POINT, param.getValue()); + } + case LaunchconfigurationPackage.INITIALIZATION_METHOD_PARAMETER: { + attributes.put(IRunConfiguration.LAUNCH_INITIALIZATION_METHOD, param.getValue()); + } + case LaunchconfigurationPackage.INITIALIZATION_ARGUMENTS_PARAMETER: { + attributes.put(IRunConfiguration.LAUNCH_INITIALIZATION_ARGUMENTS, param.getValue()); + } + case LaunchconfigurationPackage.ADDON_EXTENSION_PARAMETER: { + attributes.put(param.getValue(), true); + } + } + } + return attributes; + } +} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.java similarity index 85% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.java index 97957bc1b..5804aa324 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation 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,12 +10,12 @@ * BEA - Daniel R Somerfield - Bug 88939 * Remy Chi Jian Suen - Bug 221973 *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.launcher; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher; import org.eclipse.osgi.util.NLS; public class LauncherMessages extends NLS { - private static final String PACKAGE_NAME = "org.gemoc.execution.sequential.javaengine.ui.launcher.LauncherMessages";//$NON-NLS-1$ + private static final String PACKAGE_NAME = "org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.LauncherMessages";//$NON-NLS-1$ diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.properties b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.properties similarity index 79% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.properties rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.properties index b726bafad..651a774fd 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.properties +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherMessages.properties @@ -1,9 +1,14 @@ ############################################################################### -# +# Copyright (c) 2017 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 ############################################################################### - - SequentialMainTab_Model_not_specified=Model not specified SequentialMainTab_model_doesnt_exist=Model {0} does not exist SequentialMainTab_invalid_model_file=Invalid model file: {0} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherTabGroup.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherTabGroup.java similarity index 77% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherTabGroup.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherTabGroup.java index 3369c3d55..334683023 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/LauncherTabGroup.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/LauncherTabGroup.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,14 +8,14 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.launcher; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher; import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; import org.eclipse.debug.ui.CommonTab; import org.eclipse.debug.ui.ILaunchConfigurationDialog; import org.eclipse.debug.ui.ILaunchConfigurationTab; -import org.gemoc.execution.sequential.javaengine.ui.launcher.tabs.LaunchConfigurationBackendsTab; -import org.gemoc.execution.sequential.javaengine.ui.launcher.tabs.LaunchConfigurationMainTab; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.tabs.LaunchConfigurationBackendsTab; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.tabs.LaunchConfigurationMainTab; public class LauncherTabGroup extends AbstractLaunchConfigurationTabGroup { diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/PlainK3DebugModelPresentation.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/PlainK3DebugModelPresentation.java new file mode 100644 index 000000000..a54db7151 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/PlainK3DebugModelPresentation.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.launcher; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator; + +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLThreadAdapter; + +public class PlainK3DebugModelPresentation extends GemocDebugModelPresentation { + + @Override + public String getText(Object element) { + + if(element instanceof Adapter) { + Object target = ((Adapter)element).getTarget(); + + if(target instanceof DebugTarget) { + return ((DebugTarget)target).getName(); + + } else if(target instanceof org.eclipse.gemoc.dsl.debug.Thread) { + return ((org.eclipse.gemoc.dsl.debug.Thread)target).getName(); + + } else if(target instanceof StackFrame) { + return ((StackFrame) target).getName(); + } + + } + return super.getText(element); + } + + private Image image; + + @Override + public Image getImage(Object element) { + if (element instanceof DSLDebugTargetAdapter || element instanceof DSLThreadAdapter) { + ImageDescriptor descriptor = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/debugt_obj.png"); + Image cachedImage = imagesCache.get(descriptor); + if (cachedImage == null) { + cachedImage = new Image(Display.getDefault(), descriptor.getImageData()); + imagesCache.put(descriptor, cachedImage); + } + return image; + } + return super.getImage(element); + } + +} \ No newline at end of file diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/SequentialRunConfiguration.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/SequentialRunConfiguration.java similarity index 80% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/SequentialRunConfiguration.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/SequentialRunConfiguration.java index a3525c288..6637decc4 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/SequentialRunConfiguration.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/SequentialRunConfiguration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.launcher; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher; import org.eclipse.core.runtime.CoreException; import org.eclipse.debug.core.ILaunchConfiguration; -import org.gemoc.executionframework.engine.ui.commons.RunConfiguration; +import org.eclipse.gemoc.executionframework.engine.ui.commons.RunConfiguration; public class SequentialRunConfiguration extends RunConfiguration { diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/XtextLocator.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/XtextLocator.java new file mode 100644 index 000000000..6b3861db3 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/XtextLocator.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.launcher; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.nodemodel.util.NodeModelUtils; + +import org.eclipse.gemoc.dsl.debug.ide.adapter.ILocator; + +public class XtextLocator implements ILocator { + + @Override + public Location getLocation(EObject eObject) { + INode node = NodeModelUtils.getNode(eObject); + if (node != null) { + return new Location(Type.XTEXT_LOCATION, node.getStartLine()); + } + return new Location(Type.XTEXT_LOCATION, -1); + } +} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationBackendsTab.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationBackendsTab.java similarity index 75% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationBackendsTab.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationBackendsTab.java index 61ce8ea30..5c0441650 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationBackendsTab.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationBackendsTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,17 +8,17 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.launcher.tabs; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.tabs; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint; -import org.gemoc.xdsmlframework.api.extensions.engine_addon_group.EngineAddonGroupSpecificationExtension; -import org.gemoc.xdsmlframework.api.extensions.engine_addon_group.EngineAddonGroupSpecificationExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon_group.EngineAddonGroupSpecificationExtension; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon_group.EngineAddonGroupSpecificationExtensionPoint; public class LaunchConfigurationBackendsTab extends LaunchConfigurationDataProcessingTab { 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/LaunchConfigurationDataProcessingTab.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationDataProcessingTab.java new file mode 100644 index 000000000..d86d53e9b --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationDataProcessingTab.java @@ -0,0 +1,167 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.launcher.tabs; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon_group.EngineAddonGroupSpecificationExtension; + +public abstract class LaunchConfigurationDataProcessingTab extends LaunchConfigurationTab { + + private HashMap _components = new HashMap<>(); + + protected LaunchConfigurationDataProcessingTab() { + for (EngineAddonSpecificationExtension extension : getExtensionSpecifications()) { + final String id = extension.getAddonGroupId(); + if (id == null || id.equals("Sequential.AddonGroup") || id.equals("General.AddonGroup")) { + _components.put(extension, null); + } + } + } + + protected abstract Collection getExtensionSpecifications(); + + protected abstract Collection getGroupExtensionSpecifications(); + + @Override + public void createControl(Composite parent) { + Composite content = new Composite(parent, SWT.NULL); + GridLayout gl = new GridLayout(1, false); + gl.marginHeight = 0; + content.setLayout(gl); + content.layout(); + setControl(content); + + createLayout(content); + } + + private void createLayout(Composite parent) { + HashMap groupmap = new HashMap(); + + for (EngineAddonGroupSpecificationExtension extension : getGroupExtensionSpecifications()) { + groupmap.put(extension.getId(), createGroup(parent, extension.getName())); + } + + groupmap.put("", createGroup(parent, "Uncategorized")); + + for (EngineAddonSpecificationExtension extension : _components.keySet()) { + Group parentGroup = groupmap.get(""); + final String addonGroupId = extension.getAddonGroupId(); + if (addonGroupId != null) { + // refine the parentGroup if specified + parentGroup = groupmap.get(extension.getAddonGroupId()); + if (parentGroup == null) { + // back to the unsorted group + parentGroup = groupmap.get(""); + } + } + + Button checkbox = createCheckButton(parentGroup, extension.getName()); + if (extension.getShortDescription() != null) { + checkbox.setToolTipText(extension.getShortDescription()); + } + // checkbox.setSelection(extension.getDefaultActivationValue()); + checkbox.addSelectionListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + updateLaunchConfigurationDialog(); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + } + }); + _components.put(extension, checkbox); + } + + // remove empty groups + for (Group g : groupmap.values()) { + if (g.getChildren().length == 0) { + g.dispose(); + parent.layout(true); + } + } + } + + @Override + public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { + for (EngineAddonSpecificationExtension entry : _components.keySet()) { + configuration.setAttribute(entry.getName(), entry.getDefaultActivationValue()); + } + } + + @Override + public void initializeFrom(ILaunchConfiguration configuration) { + for (EngineAddonSpecificationExtension extension : _components.keySet()) { + try { + boolean value = configuration.getAttribute(extension.getName(), false); + // _componentsActive.put(extension, value); + Button checkbox = _components.get(extension); + checkbox.setSelection(value); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + @Override + public void performApply(ILaunchConfigurationWorkingCopy configuration) { + for (Entry entry : _components.entrySet()) { + configuration.setAttribute(entry.getKey().getName(), entry.getValue().getSelection()); + } + } + + @Override + public boolean isValid(ILaunchConfiguration config) { + // Validate each addon + try { + List addons = new ArrayList(); + for (Entry entry : _components.entrySet()) { + if (entry.getValue().getSelection()) { + addons.add(entry.getKey().instanciateComponent()); + } + } + List errors = new ArrayList(); + for (IEngineAddon iEngineAddon : addons) { + errors.addAll(iEngineAddon.validate(addons)); + } + if (!errors.isEmpty()) { + for (String msg : errors) { + setErrorMessage(msg); + } + return false; + } + } catch (Exception e) { + e.printStackTrace(); + } + + setErrorMessage(null); + return true; + } +} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/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 similarity index 82% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationMainTab.java rename to 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 6c1f45f01..4e8ea13ce 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.launcher.tabs; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.tabs; import java.lang.reflect.Method; import java.util.List; @@ -45,22 +45,27 @@ import org.eclipse.ui.PlatformUI; import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; import org.eclipse.xtext.naming.QualifiedName; -import org.gemoc.commons.eclipse.emf.URIHelper; -import org.gemoc.commons.eclipse.ui.dialogs.SelectAnyIFileDialog; -import org.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine; -import org.gemoc.execution.sequential.javaengine.ui.Activator; -import org.gemoc.execution.sequential.javaengine.ui.launcher.LauncherMessages; -import org.gemoc.executionframework.engine.commons.MelangeHelper; -import org.gemoc.executionframework.engine.ui.commons.RunConfiguration; -import org.gemoc.executionframework.ui.utils.ENamedElementQualifiedNameLabelProvider; -import org.gemoc.xdsmlframework.ui.utils.dialogs.SelectAIRDIFileDialog; -import org.gemoc.xdsmlframework.ui.utils.dialogs.SelectAnyEObjectDialog; -import org.gemoc.xdsmlframework.ui.utils.dialogs.SelectMainMethodDialog; +import org.eclipse.gemoc.commons.eclipse.emf.URIHelper; +import org.eclipse.gemoc.commons.eclipse.ui.dialogs.SelectAnyIFileDialog; +import org.eclipse.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.Activator; +import org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.LauncherMessages; +import org.eclipse.gemoc.executionframework.engine.commons.MelangeHelper; +import org.eclipse.gemoc.executionframework.engine.ui.commons.RunConfiguration; +import org.eclipse.gemoc.executionframework.ui.utils.ENamedElementQualifiedNameLabelProvider; +import org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs.SelectAIRDIFileDialog; +import org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs.SelectAnyEObjectDialog; +import org.eclipse.gemoc.xdsmlframework.ui.utils.dialogs.SelectMainMethodDialog; import org.osgi.framework.Bundle; -import fr.obeo.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; -import fr.obeo.dsl.debug.ide.sirius.ui.launch.AbstractDSLLaunchConfigurationDelegateUI; +import org.eclipse.gemoc.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch.AbstractDSLLaunchConfigurationDelegateUI; +/** + * Sequential engine launch configuration main tab + * + * @author Didier Vojtisek + */ public class LaunchConfigurationMainTab extends LaunchConfigurationTab { protected Composite _parent; @@ -83,7 +88,10 @@ public class LaunchConfigurationMainTab extends LaunchConfigurationTab { protected Text modelofexecutionglml_LocationText; - public int GRID_DEFAULT_WIDTH = 200; + /** + * default width for the grids + */ + public int gridDefaultWidth = 200; protected IProject _modelProject; @@ -166,6 +174,8 @@ public void performApply(ILaunchConfigurationWorkingCopy configuration) { Integer.parseInt(_delayText.getText())); configuration.setAttribute(RunConfiguration.LAUNCH_SELECTED_LANGUAGE, _languageCombo.getText()); + configuration.setAttribute(RunConfiguration.LAUNCH_MELANGE_QUERY, + _melangeQueryText.getText()); configuration.setAttribute(RunConfiguration.LAUNCH_MODEL_ENTRY_POINT, _entryPointModelElementText.getText()); configuration.setAttribute(RunConfiguration.LAUNCH_METHOD_ENTRY_POINT, @@ -176,6 +186,8 @@ public void performApply(ILaunchConfigurationWorkingCopy configuration) { _modelInitializationArgumentsText.getText()); configuration.setAttribute(RunConfiguration.LAUNCH_BREAK_START, _animationFirstBreak.getSelection()); + // DebugModelID for sequential engine + configuration.setAttribute(RunConfiguration.DEBUG_MODEL_ID, Activator.DEBUG_MODEL_ID); } @Override @@ -198,11 +210,11 @@ public void modifyText(ModifyEvent arg0) { // ----------------------------------- /*** - * Create the Field where user enters model to execute + * Create the Fields where user enters model to execute * - * @param parent - * @param font - * @return + * @param parent container composite + * @param font used font + * @return the created composite containing the fields */ public Composite createModelLayout(Composite parent, Font font) { createTextLabelLayout(parent, "Model to execute"); @@ -236,6 +248,7 @@ public void widgetSelected(SelectionEvent evt) { createTextLabelLayout(parent, ""); createTextLabelLayout(parent, "Model initialization arguments"); _modelInitializationArgumentsText = new Text(parent, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); + _modelInitializationArgumentsText.setToolTipText("one argument per line"); GridData gridData = new GridData(GridData.FILL_BOTH); gridData.heightHint = 40; _modelInitializationArgumentsText.setLayoutData(gridData); @@ -316,9 +329,9 @@ private GridData createStandardLayout() { /*** * Create the Field where user enters the language used to execute * - * @param parent - * @param font - * @return + * @param parent container composite + * @param font used font + * @return the created composite containing the fields */ public Composite createLanguageLayout(Composite parent, Font font) { // Language @@ -339,6 +352,13 @@ public void widgetSelected(SelectionEvent e) { }); createTextLabelLayout(parent, ""); + createTextLabelLayout(parent, "Melange resource adapter query"); + _melangeQueryText = new Text(parent, SWT.SINGLE | SWT.BORDER); + _melangeQueryText.setLayoutData(createStandardLayout()); + _melangeQueryText.setFont(font); + _melangeQueryText.setEditable(false); + createTextLabelLayout(parent, ""); + return parent; } @@ -423,13 +443,37 @@ protected void updateLaunchConfigurationDialog() { _k3Area.setVisible(true); _modelInitializationMethodText.setText(getModelInitializationMethodName()); _modelInitializationArgumentsText.setEnabled(!_modelInitializationMethodText.getText().isEmpty()); + _melangeQueryText.setText(computeMelangeQuery()); + } + + /** + * compute the Melange query for loading the given model as the requested language + * If the language is already the good one, the query will be empty. (ie. melange downcast is not used) + * @return + */ + protected String computeMelangeQuery(){ + String result = ""; + String languageName = this._languageCombo.getText(); + if(!this._modelLocationText.getText().isEmpty() && !languageName.isEmpty()){ + Resource model = getModel(); + List modelNativeLanguages = MelangeHelper.getNativeLanguagesUsedByResource(model); + if(!modelNativeLanguages.isEmpty() && !modelNativeLanguages.get(0).equals(languageName)){ + // TODO this version consider only the first native language, we need to think about models containing elements coming from several languages + String languageMT = MelangeHelper.getModelType(languageName); + if(languageMT == null){ languageMT = languageName+"MT"; } + + // result="?lang="+languageName+"&mt="+languageMT; + result="?lang="+languageName; // we need a simple downcast without adapter + } + } + return result; } protected String getModelInitializationMethodName(){ String entryPointClassName = null; - final String PREFIX = "public static void "; - int startName = PREFIX.length(); + final String prefix = "public static void "; + int startName = prefix.length(); int endName = _entryPointMethodText.getText().lastIndexOf("("); if(endName == -1) return ""; String entryMethod = _entryPointMethodText.getText().substring(startName, endName); @@ -455,10 +499,18 @@ protected String getModelInitializationMethodName(){ return ""; } + /** + * caches the current model resource in order to avoid to reload it many times + * use {@link getModel()} in order to access it. + */ + private Resource currentModelResource; + private Resource getModel() { - URI modelURI = URI.createPlatformResourceURI( - _modelLocationText.getText(), true); - return PlainK3ExecutionEngine.loadModel(modelURI); + URI modelURI = URI.createPlatformResourceURI(_modelLocationText.getText(), true); + if(currentModelResource == null || !currentModelResource.getURI().equals(modelURI)){ + currentModelResource = PlainK3ExecutionEngine.loadModel(modelURI); + } + return currentModelResource; } /* (non-Javadoc) @@ -537,7 +589,7 @@ private void updateMainElementName(){ if(mainElement != null){ org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider nameprovider = new DefaultDeclarativeQualifiedNameProvider(); QualifiedName qname = nameprovider.getFullyQualifiedName(mainElement); - String objectName = qname != null ? qname.toString(): mainElement.toString(); + String objectName = qname != null ? qname.toString(): mainElement.toString(); String prettyName = objectName+ " : "+mainElement.eClass().getName(); _entryPointModelElementLabel.setText(prettyName); } diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationTab.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationTab.java similarity index 95% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationTab.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationTab.java index 304c61542..bccb90e86 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationTab.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.launcher.tabs; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.tabs; import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; import org.eclipse.swt.SWT; diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/propertytesters/GemocSequentialPropertyTester.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/propertytesters/GemocSequentialPropertyTester.java similarity index 89% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/propertytesters/GemocSequentialPropertyTester.java rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/propertytesters/GemocSequentialPropertyTester.java index b0d5169a7..a7cd7b8e5 100644 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/propertytesters/GemocSequentialPropertyTester.java +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/src/org/eclipse/gemoc/execution/sequential/javaengine/ui/propertytesters/GemocSequentialPropertyTester.java @@ -1,6 +1,5 @@ - /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -9,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaengine.ui.propertytesters; +package org.eclipse.gemoc.execution.sequential.javaengine.ui.propertytesters; import org.eclipse.core.expressions.PropertyTester; import org.eclipse.core.resources.IFile; @@ -18,8 +17,8 @@ import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtension; -import org.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtensionPoint; +import org.eclipse.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtension; +import org.eclipse.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtensionPoint; /** * Property tester for context launching menu. diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/xtend-gen/.gitignore b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/xtend-gen/.gitignore similarity index 100% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/xtend-gen/.gitignore rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui/xtend-gen/.gitignore diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.checkstyle b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/.classpath b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.classpath similarity index 100% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/.classpath rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.classpath diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/.gitignore b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.gitignore similarity index 100% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/.gitignore rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.gitignore diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.project b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.project new file mode 100644 index 000000000..0c102308c --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.execution.sequential.javaengine + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/META-INF/MANIFEST.MF b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/META-INF/MANIFEST.MF new file mode 100644 index 000000000..c28a6cda2 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Gemoc Sequential Language Api +Bundle-SymbolicName: org.eclipse.gemoc.execution.sequential.javaengine;singleton:=true +Bundle-Version: 2.3.0.qualifier +Require-Bundle: org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.execution.sequential.javaxdsml.api, + org.eclipse.gemoc.executionframework.engine, + fr.inria.diverse.k3.al.annotationprocessor.plugin, + org.eclipse.jdt.core, + org.eclipse.emf.transaction, + fr.inria.diverse.melange.adapters, + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0", + org.eclipse.gemoc.trace.commons;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.gemoc.execution.sequential.javaengine +Bundle-Activator: org.eclipse.gemoc.execution.sequential.javaengine.Activator +Bundle-ActivationPolicy: lazy + diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/about.html b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/about.html similarity index 100% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/about.html rename to java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/about.html diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/build.properties b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/build.properties new file mode 100644 index 000000000..6594e752a --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html +src.includes = about.html diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/pom.xml b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/pom.xml new file mode 100644 index 000000000..90e189033 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/pom.xml @@ -0,0 +1,25 @@ + + + + + 4.0.0 + + + ../../.. + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.execution.sequential.javaengine + eclipse-plugin + \ No newline at end of file diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/Activator.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/Activator.java new file mode 100644 index 000000000..74f464efb --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/Activator.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.execution.sequential.javaengine"; //$NON-NLS-1$ + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + + public static void warn(String msg, Throwable e){ + Platform.getLog(Platform.getBundle(PLUGIN_ID)).log(new Status(Status.WARNING, PLUGIN_ID, + Status.OK, + msg, + e)); + } + public static void error(String msg, Throwable e){ + Platform.getLog(Platform.getBundle(PLUGIN_ID)).log(new Status(Status.ERROR, PLUGIN_ID, + Status.OK, + msg, + e)); + } +} 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 new file mode 100644 index 000000000..60e263856 --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/PlainK3ExecutionEngine.java @@ -0,0 +1,478 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import java.io.IOException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +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.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain; +import org.eclipse.jdt.core.IPackageFragmentRoot; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.search.IJavaSearchConstants; +import org.eclipse.jdt.core.search.IJavaSearchScope; +import org.eclipse.jdt.core.search.SearchEngine; +import org.eclipse.jdt.core.search.SearchMatch; +import org.eclipse.jdt.core.search.SearchParticipant; +import org.eclipse.jdt.core.search.SearchPattern; +import org.eclipse.jdt.core.search.SearchRequestor; +import org.eclipse.gemoc.executionframework.engine.commons.MelangeHelper; +import org.eclipse.gemoc.executionframework.engine.core.AbstractCommandBasedSequentialExecutionEngine; +import org.eclipse.gemoc.executionframework.engine.core.EngineStoppedException; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext; +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration; +import org.osgi.framework.Bundle; + +import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager; +import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand; +import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepManagerRegistry; +import fr.inria.diverse.melange.adapters.EObjectAdapter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.AddonExtensionParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.AnimatorURIParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.EntryPointParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationArgumentsParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationMethodParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LanguageNameParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationFactory; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelRootParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelURIParameter; + +/** + * Implementation of the GEMOC Execution engine dedicated to run Kermeta 3 operational semantic + * + * @author Didier Vojtisek + * + */ +public class PlainK3ExecutionEngine extends AbstractCommandBasedSequentialExecutionEngine implements IStepManager { + + private Method initializeMethod; + private List initializeMethodParameters; + private Method entryPointMethod; + private List entryPointMethodParameters; + private Class entryPointClass; + + private static final String LAUNCH_CONFIGURATION_TYPE = "org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher"; + + @Override + public String engineKindName() { + return "GEMOC Kermeta Sequential Engine"; + } + + /** + * Constructs a PlainK3 execution engine using an entry point (~ a main + * operation) The entrypoint will register itself as a StepManager into the + * K3 step manager registry, and unregister itself at the end. As a + * StepManager, the PlainK3ExecutionEngine will receive callbacks through + * its "executeStep" operation. + */ + @Override + protected void prepareEntryPoint(IExecutionContext executionContext) { + /* + * Get info from the RunConfiguration + */ + String entryPoint = executionContext.getRunConfiguration().getExecutionEntryPoint(); + String mainModelElementURI = executionContext.getRunConfiguration().getModelEntryPoint(); + + /* + * Find the entry point in the workspace + */ + final String prefix = "public static void "; + int startName = prefix.length(); + int endName = entryPoint.lastIndexOf("("); + String methodFullName = entryPoint.substring(startName, endName); + + String aspectClassName = methodFullName.substring(0, methodFullName.lastIndexOf(".")); + String methodName = methodFullName.substring(methodFullName.lastIndexOf(".") + 1); + + Bundle bundle = findBundle(executionContext, aspectClassName); + if (bundle == null) + throw new RuntimeException("Could not find bundle for language \"" + + executionContext.getRunConfiguration().getLanguageName() + "\""); + + // search the class + try { + entryPointClass = bundle.loadClass(aspectClassName); + } catch (ClassNotFoundException e) { + String bundleName = bundle.getHeaders().get("Bundle-Name"); + e.printStackTrace(); + throw new RuntimeException( + "Could not find class " + executionContext.getRunConfiguration().getExecutionEntryPoint() + + " in bundle " + bundleName + "."); + } + + // search the method + this.entryPointMethodParameters = new ArrayList<>(); + EObject root = executionContext.getResourceModel().getEObject(mainModelElementURI); + if (root instanceof EObjectAdapter) { + entryPointMethodParameters.add(((EObjectAdapter) root).getAdaptee()); + } else { + entryPointMethodParameters.add(root); + } + try { + this.entryPointMethod = MelangeHelper.findMethod(entryPointClass, root, methodName); + } catch (Exception e) { + String msg = "There is no \"" + methodName + "\" method in " + entryPointClass.getName() + + " with first parameter able to handle " + entryPointMethodParameters.get(0).toString(); + msg += " from " + ((EObject) entryPointMethodParameters.get(0)).eClass().getEPackage().getNsURI(); + Activator.error(msg, e); + throw new RuntimeException("Could not find method main with correct parameters."); + } + } + + @Override + protected void prepareInitializeModel(IExecutionContext executionContext) { + + // try to get the initializeModelRunnable + String modelInitializationMethodQName = executionContext.getRunConfiguration().getModelInitializationMethod(); + if (!modelInitializationMethodQName.isEmpty()) { + // the current system supposes that the modelInitialization method + // is in the same class as the entry point + String modelInitializationMethodName = modelInitializationMethodQName + .substring(modelInitializationMethodQName.lastIndexOf(".") + 1); + boolean isListArgs = false; + boolean isEListArgs = false; + boolean isFound = false; + try { + Class[] modelInitializationParamType = new Class[] { + entryPointMethodParameters.get(0).getClass().getInterfaces()[0], String[].class }; + initializeMethod = entryPointClass.getMethod(modelInitializationMethodName, + modelInitializationParamType); + isListArgs = false; // this is a java array + isFound = true; + } catch (Exception e) { + + } + if (!isFound) { + try { + Class[] modelInitializationParamType = new Class[] { + entryPointMethodParameters.get(0).getClass().getInterfaces()[0], List.class }; + initializeMethod = entryPointClass.getMethod(modelInitializationMethodName, + modelInitializationParamType); + isListArgs = true; // this is a List + isFound = true; + } catch (Exception e) { + + } + } + if (!isFound) { + try { + Class[] modelInitializationParamType = new Class[] { + entryPointMethodParameters.get(0).getClass().getInterfaces()[0], EList.class }; + this.initializeMethod = entryPointClass.getMethod(modelInitializationMethodName, + modelInitializationParamType); + isEListArgs = true; // this is an EList + } catch (Exception e) { + String msg = "There is no \"" + modelInitializationMethodName + "\" method in " + + entryPointClass.getName() + " with first parameter able to handle " + + entryPointMethodParameters.get(0).toString(); + msg += " and String[] or List or EList args as second parameter"; + msg += " from " + ((EObject) entryPointMethodParameters.get(0)).eClass().getEPackage().getNsURI(); + Activator.error(msg, e); + // ((EObject)parameters.get(0)).eClass().getEPackage().getNsURI() + throw new RuntimeException( + "Could not find method " + modelInitializationMethodName + " with correct parameters."); + } + } + final boolean finalIsListArgs = isListArgs; + final boolean finalIsEListArgs = isEListArgs; + this.initializeMethodParameters = new ArrayList<>(); + initializeMethodParameters.add(entryPointMethodParameters.get(0)); + if (finalIsListArgs) { + final ArrayList modelInitializationListParameters = new ArrayList<>(); + for (String s : executionContext.getRunConfiguration().getModelInitializationArguments() + .split("\\r?\\n")) { + modelInitializationListParameters.add(s); + } + initializeMethodParameters.add(modelInitializationListParameters); + } else if (finalIsEListArgs) { + final EList modelInitializationListParameters = new BasicEList<>(); + for (String s : executionContext.getRunConfiguration().getModelInitializationArguments() + .split("\\r?\\n")) { + modelInitializationListParameters.add(s); + } + initializeMethodParameters.add(modelInitializationListParameters); + } else { + initializeMethodParameters + .add(executionContext.getRunConfiguration().getModelInitializationArguments().split("\\r?\\n")); + } + } + } + + /** + * Invoke the initialize method + */ + private void callInitializeModel() { + try { + initializeMethod.invoke(null, initializeMethodParameters.toArray()); + } catch (EngineStoppedException stopExeception) { + // not really an error, simply forward the stop exception + throw stopExeception; + } catch (java.lang.reflect.InvocationTargetException ite) { + // not really an error, simply forward the stop exception + if (ite.getCause() instanceof EngineStoppedException) { + throw (EngineStoppedException) ite.getCause(); + } else { + throw new RuntimeException(ite); + } + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Override + protected void initializeModel() { + 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()); + } else { + callInitializeModel(); + } + } finally { + StepManagerRegistry.getInstance().unregisterManager(PlainK3ExecutionEngine.this); + } + } + } + + @Override + protected void executeEntryPoint() { + StepManagerRegistry.getInstance().registerManager(PlainK3ExecutionEngine.this); + try { + // since aspect's methods are static, first arg is null + entryPointMethod.invoke(null, entryPointMethodParameters.get(0)); + } catch (EngineStoppedException stopExeception) { + // not really an error, simply forward the stop exception + throw stopExeception; + } catch (java.lang.reflect.InvocationTargetException ite) { + // not really an error, simply forward the stop exception + if (ite.getCause() instanceof EngineStoppedException) { + throw (EngineStoppedException) ite.getCause(); + } else { + throw new RuntimeException(ite); + } + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + StepManagerRegistry.getInstance().unregisterManager(PlainK3ExecutionEngine.this); + } + } + + @Override + /* + * This is the operation called from K3 code. We use this callback to pass + * the command to the generic executeOperation operation. (non-Javadoc) + * + * @see fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager# + * executeStep(java.lang.Object, + * fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand, + * java.lang.String) + */ + public void executeStep(Object caller, final StepCommand command, String className, String methodName) { + executeOperation(caller, className, methodName, new Runnable() { + @Override + public void run() { + command.execute(); + } + }); + } + + @Override + /* + * This is the operation used to act as a StepManager in K3. We return true + * if we have the same editing domain as the object. (non-Javadoc) + * + * @see fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager# + * canHandle (java.lang.Object) + */ + public boolean canHandle(Object caller) { + if (caller instanceof EObject) { + EObject eObj = (EObject) caller; + org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain = getEditingDomain(eObj); + return editingDomain == this.editingDomain; + + } + return false; + } + + /** + * Return a bundle containing 'aspectClassName'. + * + * Return null if not found. + */ + private Bundle findBundle(final IExecutionContext executionContext, String aspectClassName) { + + // Look using JavaWorkspaceScope as this is safer and will look in + // dependencies + IType mainIType = getITypeMainByWorkspaceScope(aspectClassName); + + Bundle bundle = null; + String bundleName = null; + if (mainIType != null) { + IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) mainIType.getPackageFragment() + .getParent(); + + bundleName = packageFragmentRoot.getPath().removeLastSegments(1).lastSegment().toString(); + if (bundleName != null) { + + // We try to look into an already loaded bundle + bundle = Platform.getBundle(bundleName); + } + } else { + // the main isn't visible directly from the workspace, try another + // method + bundle = _executionContext.getMelangeBundle(); + } + + return bundle; + } + /** + * search the bundle that contains the Main class. The search is done in the + * workspace scope (ie. if it is defined in the current workspace it will + * find it + * + * @return the name of the bundle containing the Main class or null if not + * found + */ + private IType getITypeMainByWorkspaceScope(String className) { + SearchPattern pattern = SearchPattern.createPattern(className, IJavaSearchConstants.CLASS, + IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH); + IJavaSearchScope scope = SearchEngine.createWorkspaceScope(); + + final List binaryType = new ArrayList(); + + SearchRequestor requestor = new SearchRequestor() { + @Override + public void acceptSearchMatch(SearchMatch match) throws CoreException { + binaryType.add((IType) match.getElement()); + } + }; + SearchEngine engine = new SearchEngine(); + + try { + engine.search(pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, scope, + requestor, null); + } catch (CoreException e1) { + throw new RuntimeException("Error while searching the bundle: " + e1.getMessage()); + // return new Status(IStatus.ERROR, Activator.PLUGIN_ID, ); + } + + return binaryType.isEmpty() ? null : binaryType.get(0); + } + + private static TransactionalEditingDomain getEditingDomain(EObject o) { + return getEditingDomain(o.eResource().getResourceSet()); + } + + private static InternalTransactionalEditingDomain getEditingDomain(ResourceSet rs) { + TransactionalEditingDomain edomain = org.eclipse.emf.transaction.TransactionalEditingDomain.Factory.INSTANCE + .getEditingDomain(rs); + if (edomain instanceof InternalTransactionalEditingDomain) + return (InternalTransactionalEditingDomain) edomain; + else + return null; + } + + /** + * Load the model for the given URI + * @param modelURI to load + * @return the loaded resource + */ + public static Resource loadModel(URI modelURI) { + Resource resource = null; + ResourceSet resourceSet; + resourceSet = new ResourceSetImpl(); + resource = resourceSet.createResource(modelURI); + try { + resource.load(null); + } catch (IOException e) { + // chut + } + return resource; + } + + @Override + public LaunchConfiguration extractLaunchConfiguration() { + final IRunConfiguration configuration = getExecutionContext().getRunConfiguration(); + final LaunchConfiguration launchConfiguration = LaunchconfigurationFactory.eINSTANCE.createLaunchConfiguration(); + launchConfiguration.setType(LAUNCH_CONFIGURATION_TYPE); + if (configuration.getLanguageName() != "") { + final LanguageNameParameter languageNameParam = LaunchconfigurationFactory.eINSTANCE.createLanguageNameParameter(); + languageNameParam.setValue(configuration.getLanguageName()); + launchConfiguration.getParameters().add(languageNameParam); + } + final URI modelURI = configuration.getExecutedModelURI(); + if (modelURI != null) { + final String scheme = modelURI.scheme() + ":/resource"; + final ModelURIParameter modelURIParam = LaunchconfigurationFactory.eINSTANCE.createModelURIParameter(); + modelURIParam.setValue(modelURI.toString().substring(scheme.length())); + launchConfiguration.getParameters().add(modelURIParam); + } + final URI animatorURI = configuration.getAnimatorURI(); + if (configuration.getAnimatorURI() != null) { + final String scheme = animatorURI.scheme() + ":/resource"; + 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(); + entryPointParam.setValue(configuration.getExecutionEntryPoint()); + launchConfiguration.getParameters().add(entryPointParam); + } + if (configuration.getModelEntryPoint() != null) { + final ModelRootParameter modelRootParam = LaunchconfigurationFactory.eINSTANCE.createModelRootParameter(); + modelRootParam.setValue(configuration.getModelEntryPoint()); + launchConfiguration.getParameters().add(modelRootParam); + } + if (configuration.getModelInitializationMethod() != null) { + final InitializationMethodParameter initializationMethodParam = LaunchconfigurationFactory.eINSTANCE + .createInitializationMethodParameter(); + initializationMethodParam.setValue(configuration.getModelInitializationMethod()); + launchConfiguration.getParameters().add(initializationMethodParam); + } + if (configuration.getModelInitializationArguments() != null) { + final InitializationArgumentsParameter initializationArgumentsParam = LaunchconfigurationFactory.eINSTANCE + .createInitializationArgumentsParameter(); + initializationArgumentsParam.setValue(configuration.getModelInitializationArguments()); + launchConfiguration.getParameters().add(initializationArgumentsParam); + } + configuration.getEngineAddonExtensions().forEach(extensionPoint -> { + final AddonExtensionParameter addonExtensionParam = LaunchconfigurationFactory.eINSTANCE.createAddonExtensionParameter(); + addonExtensionParam.setValue(extensionPoint.getName()); + launchConfiguration.getParameters().add(addonExtensionParam); + }); + return launchConfiguration; + } +} diff --git a/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/SequentialModelExecutionContext.java b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/SequentialModelExecutionContext.java new file mode 100644 index 000000000..71a050b8b --- /dev/null +++ b/java_execution/java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine/src/org/eclipse/gemoc/execution/sequential/javaengine/SequentialModelExecutionContext.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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; + +import org.eclipse.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtension; +import org.eclipse.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtensionPoint; +import org.eclipse.gemoc.executionframework.engine.commons.EngineContextException; +import org.eclipse.gemoc.executionframework.engine.commons.ModelExecutionContext; +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode; +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration; +import org.eclipse.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; + +import org.eclipse.gemoc.trace.commons.model.trace.MSEModel; + +public class SequentialModelExecutionContext extends ModelExecutionContext +{ + + + public SequentialModelExecutionContext(IRunConfiguration runConfiguration, ExecutionMode executionMode) + throws EngineContextException + { + super(runConfiguration, executionMode); + + } + + @Override + protected LanguageDefinitionExtension getLanguageDefinition(String languageName) throws EngineContextException + { + SequentialLanguageDefinitionExtension languageDefinition = SequentialLanguageDefinitionExtensionPoint + .findDefinition(_runConfiguration.getLanguageName()); + if (languageDefinition == null) + { + String message = "Cannot find sequential xdsml definition for the language " + _runConfiguration.getLanguageName() + + ", please verify that is is correctly deployed."; + EngineContextException exception = new EngineContextException(message); + throw exception; + } + return languageDefinition; + } + + @Override + public MSEModel getMSEModel() { + // TODO Auto-generated method stub + return null; + } + + +} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/.project b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/.project deleted file mode 100644 index c69f228ab..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.gemoc.execution.sequential.javaengine.ui - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/META-INF/MANIFEST.MF b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 05136b6be..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,43 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Gemoc Sequential Language Workbench UI -Bundle-SymbolicName: org.gemoc.execution.sequential.javaengine.ui;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.execution.sequential.javaengine.ui.Activator -Bundle-Vendor: INRIA -Require-Bundle: org.eclipse.core.expressions;bundle-version="3.4.400", - org.eclipse.debug.ui;bundle-version="3.8.2", - org.gemoc.xdsmlframework.api, - fr.obeo.dsl.debug;bundle-version="1.0.0", - fr.obeo.dsl.debug.ide;bundle-version="1.0.0", - fr.obeo.dsl.debug.ide.sirius.ui;bundle-version="1.0.0", - org.eclipse.emf.transaction;bundle-version="1.4.0", - org.gemoc.commons.eclipse, - fr.inria.diverse.commons.eclipse.messagingsystem.api;bundle-version="1.0.0", - fr.inria.diverse.commons.eclipse.messagingsystem.ui;bundle-version="1.0.0", - org.gemoc.commons.eclipse.ui;bundle-version="0.1.0", - org.eclipse.sirius.diagram.ui;bundle-version="1.0.0", - org.gemoc.xdsmlframework.extensions.sirius;bundle-version="0.1.0", - org.eclipse.emf.edit.ui, - org.gemoc.execution.sequential.javaxdsml.api;bundle-version="0.1.0", - org.gemoc.executionframework.ui, - org.gemoc.execution.sequential.javaengine;bundle-version="0.1.0", - fr.inria.diverse.trace.api, - fr.inria.diverse.trace.gemoc;bundle-version="1.0.0", - fr.inria.diverse.trace.gemoc.api;bundle-version="1.0.0", - fr.inria.diverse.k3.al.annotationprocessor.plugin, - org.gemoc.executionframework.engine, - org.gemoc.executionframework.engine.ui, - org.eclipse.ui.ide;bundle-version="3.10.2", - fr.obeo.dsl.debug.ide.ui;bundle-version="1.0.0", - fr.obeo.timeline;bundle-version="1.0.0", - org.gemoc.executionframework.extensions.sirius, - org.gemoc.xdsmlframework.ui.utils, - org.eclipse.xtext, - org.eclipse.xtend.lib -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: . -Export-Package: org.gemoc.execution.sequential.javaengine.ui, - org.gemoc.execution.sequential.javaengine.ui.debug, - org.gemoc.execution.sequential.javaengine.ui.launcher diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/build.properties b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/build.properties deleted file mode 100644 index 9933868c1..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -source.. = src,\ - xtend-gen/ -output.. = bin -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - about.html -src.includes = about.html diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/plugin.xml b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/plugin.xml deleted file mode 100644 index 10c026eb5..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/plugin.xml +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/pom.xml b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/pom.xml deleted file mode 100644 index 7dfcc7e9f..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - 4.0.0 - - - ../../.. - org.gemoc.execution.sequential.java - org.gemoc.execution.sequential.java.root - 0.1.0-SNAPSHOT - - - org.gemoc.execution.sequential.javaengine.ui - eclipse-plugin - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - .gitignore - - - - - - - - \ No newline at end of file diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/Activator.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/Activator.java deleted file mode 100644 index 91ec57406..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/Activator.java +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine.ui; - -import java.util.function.Supplier; - -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; -import org.gemoc.executionframework.extensions.sirius.services.AbstractGemocDebuggerServices; -import org.osgi.framework.BundleContext; - -import fr.inria.diverse.commons.eclipse.messagingsystem.api.MessagingSystemManager; -import fr.inria.diverse.commons.messagingsystem.api.MessagingSystem; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.execution.sequential.javaengine.ui"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - protected MessagingSystem messaggingSystem = null; - - private Supplier debuggerSupplier; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - // start the messagin system ui plugin to load default settings. - fr.inria.diverse.commons.eclipse.messagingsystem.ui.Activator.getDefault(); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - AbstractGemocDebuggerServices.LISTENER.uninstall(); - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given plug-in - * relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - public static void warn(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); - } - - public static void error(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); - } - - public MessagingSystem getMessaggingSystem() { - if (messaggingSystem == null) { - MessagingSystemManager msm = new MessagingSystemManager(); - messaggingSystem = msm.createBestPlatformMessagingSystem(PLUGIN_ID, "Modeling workbench console"); - } - return messaggingSystem; - } - - public Supplier getDebuggerSupplier() { - return debuggerSupplier; - } - - public void setDebuggerSupplier(Supplier debuggerSupplier) { - this.debuggerSupplier = debuggerSupplier; - } - -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/commands/GemocToggleBreakpointHandler.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/commands/GemocToggleBreakpointHandler.java deleted file mode 100644 index ab3da326e..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/commands/GemocToggleBreakpointHandler.java +++ /dev/null @@ -1,117 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine.ui.commands; - -import java.util.Iterator; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.ISelectionService; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.handlers.HandlerUtil; -import org.gemoc.execution.sequential.javaengine.ui.launcher.Launcher; -import org.gemoc.executionframework.engine.ui.debug.breakpoint.GemocBreakpoint; - -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.sirius.ui.DSLToggleBreakpointsUtils; - -public class GemocToggleBreakpointHandler extends AbstractHandler { - - /** - * The {@link DSLToggleBreakpointsUtils}. - */ - protected final DSLToggleBreakpointsUtils breakpointUtils; - org.eclipse.ui.ide.IGotoMarker f; - /** - * Constructor. - */ - public GemocToggleBreakpointHandler() { - breakpointUtils = new DSLToggleBreakpointsUtils(Launcher.MODEL_ID) { - - @Override - protected EObject getInstruction(Object selected) { - final EObject res; - - if (selected instanceof MSE) - { - res = ((MSE) selected); - } - else if (selected instanceof MSEOccurrence) - { - res = ((MSEOccurrence) selected).getMse(); - } - else - { - res = super.getInstruction(selected); - } - - return res; - } - - @Override - protected DSLBreakpoint createBreakpoint(Object selected, - EObject instruction) throws CoreException { - return new GemocBreakpoint(identifier, instruction, true); - } - - }; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent) - */ - public Object execute(ExecutionEvent event) throws ExecutionException { - final ISelection selection = HandlerUtil - .getCurrentSelectionChecked(event); - try { - breakpointUtils.toggleBreakpoints(selection); - } catch (CoreException e) { - throw new ExecutionException("Error while toggling breakpoint.", e); - } - - return null; - } - - @Override - public boolean isEnabled() { - final boolean res; - - ISelectionService service = (ISelectionService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ISelectionService.class); - if (service != null) { - final ISelection selection = service.getSelection(); - if (selection instanceof IStructuredSelection) { - boolean allValidMSE = true; - final Iterator it = ((IStructuredSelection) selection).iterator(); - while (allValidMSE && it.hasNext()) { - Object current = it.next(); - allValidMSE = current instanceof MSE /*&& ((MSE) current).getAction() != null*/; - } - res = allValidMSE; - } else { - res = false; - } - } else { - res = false; - } - - return res; - } - -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialDebugAs.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialDebugAs.java deleted file mode 100644 index 095feb595..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialDebugAs.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine.ui.debug.sirius.action; - - -import org.gemoc.execution.sequential.javaengine.ui.launcher.Launcher; - -import fr.obeo.dsl.debug.ide.sirius.ui.action.AbstractDebugAsAction; - -public class GemocSequentialDebugAs extends AbstractDebugAsAction { - - @Override - protected String getLaunchConfigurationTypeID() { - return Launcher.TYPE_ID; - } - -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleBreakpointAction.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleBreakpointAction.java deleted file mode 100644 index aa2a1d9cb..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/sirius/action/GemocSequentialToggleBreakpointAction.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine.ui.debug.sirius.action; - -import org.gemoc.execution.sequential.javaengine.ui.Activator; -import org.gemoc.executionframework.engine.ui.debug.sirius.action.GemocToggleBreakpointAction; - -/** - * commons class for all Gemoc based models - * @author dvojtise - * - */ -public class GemocSequentialToggleBreakpointAction extends GemocToggleBreakpointAction { - - @Override - protected String getModelIdentifier() { - return Activator.PLUGIN_ID+".debugModel"; - } - - - -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/GemocSourceLocator.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/GemocSourceLocator.java deleted file mode 100644 index 448f12420..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/GemocSourceLocator.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine.ui.launcher; - -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.obeo.dsl.debug.ide.DSLSourceLocator; -import fr.obeo.dsl.debug.ide.adapter.DSLStackFrameAdapter; - -public class GemocSourceLocator extends DSLSourceLocator { - - @Override - public Object getSourceElement(IStackFrame stackFrame) { - final Object res; - if (stackFrame instanceof DSLStackFrameAdapter) { - final DSLStackFrameAdapter eStackFrame = (DSLStackFrameAdapter) stackFrame; - final EObject instruction = eStackFrame.getCurrentInstruction(); - if (instruction instanceof Step) { - res = ((Step) instruction).getMseoccurrence().getMse(); - } else if (instruction != null) { - res = instruction; - } else { - res = eStackFrame.getContext(); - } - } else { - res = null; - } - return res; - } -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/Launcher.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/Launcher.java deleted file mode 100644 index d37f55a2f..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/Launcher.java +++ /dev/null @@ -1,198 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine.ui.launcher; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.BiPredicate; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.emf.ecore.EObject; -import org.gemoc.commons.eclipse.ui.ViewHelper; -import org.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine; -import org.gemoc.execution.sequential.javaengine.SequentialModelExecutionContext; -import org.gemoc.execution.sequential.javaengine.ui.Activator; -import org.gemoc.execution.sequential.javaengine.ui.debug.GenericSequentialModelDebugger; -import org.gemoc.execution.sequential.javaengine.ui.debug.OmniscientGenericSequentialModelDebugger; -import org.gemoc.executionframework.engine.commons.EngineContextException; -import org.gemoc.executionframework.engine.commons.ModelExecutionContext; -import org.gemoc.executionframework.engine.ui.commons.RunConfiguration; -import org.gemoc.executionframework.engine.ui.debug.AbstractGemocDebugger; -import org.gemoc.executionframework.engine.ui.debug.AnnotationMutableFieldExtractor; -import org.gemoc.executionframework.engine.ui.debug.IMutableFieldExtractor; -import org.gemoc.executionframework.engine.ui.debug.IntrospectiveMutableFieldExtractor; -import org.gemoc.executionframework.engine.ui.launcher.AbstractSequentialGemocLauncher; -import org.gemoc.executionframework.ui.views.engine.EnginesStatusView; -import org.gemoc.xdsmlframework.api.core.ExecutionMode; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.core.IRunConfiguration; - -import fr.inria.diverse.commons.messagingsystem.api.MessagingSystem; -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; -import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon; -import fr.obeo.dsl.debug.ide.IDSLDebugger; -import fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher; - -public class Launcher extends AbstractSequentialGemocLauncher { - - public final static String TYPE_ID = Activator.PLUGIN_ID + ".launcher"; - - @Override - protected IExecutionEngine createExecutionEngine(RunConfiguration runConfiguration, ExecutionMode executionMode) - throws CoreException, EngineContextException { - // create and initialize engine - IExecutionEngine executionEngine = new PlainK3ExecutionEngine(); - ModelExecutionContext executioncontext = new SequentialModelExecutionContext(runConfiguration, executionMode); - executioncontext.initializeResourceModel(); - executionEngine.initialize(executioncontext); - return executionEngine; - } - - @Override - protected IDSLDebugger getDebugger(ILaunchConfiguration configuration, DSLDebugEventDispatcher dispatcher, - EObject firstInstruction, IProgressMonitor monitor) { - - IExecutionEngine engine = (IExecutionEngine) _executionEngine; - AbstractGemocDebugger res; - Set traceAddons = _executionEngine - .getAddonsTypedBy(IMultiDimensionalTraceAddon.class); - - // We don't want to use trace managers that only work with a subset of - // the execution state - traceAddons.removeIf(traceAddon -> { - return traceAddon.getTraceConstructor() != null && traceAddon.getTraceConstructor().isPartialTraceConstructor(); - }); - - if (traceAddons.isEmpty()) { - res = new GenericSequentialModelDebugger(dispatcher, engine); - } else { - res = new OmniscientGenericSequentialModelDebugger(dispatcher, engine); - } - // We create a list of all mutable data extractors we want to try - List extractors = new ArrayList(); - // We put annotation first - extractors.add(new AnnotationMutableFieldExtractor()); - // Then introspection - extractors.add(new IntrospectiveMutableFieldExtractor(_executionEngine.getExecutionContext() - .getRunConfiguration().getLanguageName())); - res.setMutableFieldExtractors(extractors); - - // If in the launch configuration it is asked to pause at the start, - // we add this dummy break - try { - if (configuration.getAttribute(RunConfiguration.LAUNCH_BREAK_START, false)) { - res.addPredicateBreak(new BiPredicate() { - @Override - public boolean test(IExecutionEngine t, MSEOccurrence u) { - return true; - } - }); - } - } catch (CoreException e) { - Activator.error(e.getMessage(), e); - } - - _executionEngine.getExecutionContext().getExecutionPlatform().addEngineAddon(res); - return res; - } - - @Override - protected String getLaunchConfigurationTypeID() { - return TYPE_ID; - } - - @Override - protected String getDebugJobName(ILaunchConfiguration configuration, EObject firstInstruction) { - return "Gemoc debug job"; - } - - @Override - protected String getPluginID() { - return Activator.PLUGIN_ID; - } - - @Override - protected String getModelIdentifier() { - if (_executionEngine instanceof PlainK3ExecutionEngine) - return Activator.PLUGIN_ID + ".debugModel"; - else - return MODEL_ID; - } - - @Override - protected void prepareViews() { - ViewHelper.retrieveView(EnginesStatusView.ID); - } - - @Override - protected RunConfiguration parseLaunchConfiguration(ILaunchConfiguration configuration) throws CoreException { - return new RunConfiguration(configuration); - } - - @Override - protected void error(String message, Exception e) { - Activator.error(message, e); - } - - @Override - protected MessagingSystem getMessagingSystem() { - return Activator.getDefault().getMessaggingSystem(); - } - - @Override - protected void setDefaultsLaunchConfiguration(ILaunchConfigurationWorkingCopy configuration) { - - } - - @Override - public Map parseLaunchConfiguration(LaunchConfiguration launchConfiguration) { - Map attributes = new HashMap<>(); - for (LaunchConfigurationParameter param : launchConfiguration.getParameters()) { - switch (param.eClass().getClassifierID()) { - case TracePackage.LANGUAGE_NAME_PARAMETER: { - attributes.put(IRunConfiguration.LAUNCH_SELECTED_LANGUAGE, param.getValue()); - } - case TracePackage.MODEL_URI_PARAMETER: { - attributes.put("Resource", param.getValue()); - } - case TracePackage.ANIMATOR_URI_PARAMETER: { - attributes.put("airdResource", param.getValue()); - } - case TracePackage.ENTRY_POINT_PARAMETER: { - attributes.put(IRunConfiguration.LAUNCH_METHOD_ENTRY_POINT, param.getValue()); - } - case TracePackage.MODEL_ROOT_PARAMETER: { - attributes.put(IRunConfiguration.LAUNCH_MODEL_ENTRY_POINT, param.getValue()); - } - case TracePackage.INITIALIZATION_METHOD_PARAMETER: { - attributes.put(IRunConfiguration.LAUNCH_INITIALIZATION_METHOD, param.getValue()); - } - case TracePackage.INITIALIZATION_ARGUMENTS_PARAMETER: { - attributes.put(IRunConfiguration.LAUNCH_INITIALIZATION_ARGUMENTS, param.getValue()); - } - case TracePackage.ADDON_EXTENSION_PARAMETER: { - attributes.put(param.getValue(), true); - } - } - } - return attributes; - } -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/PlainK3DebugModelPresentation.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/PlainK3DebugModelPresentation.java deleted file mode 100644 index 747b4cb57..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/PlainK3DebugModelPresentation.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine.ui.launcher; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.graphics.Image; -import org.gemoc.execution.sequential.javaengine.ui.Activator; - -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter; -import fr.obeo.dsl.debug.ide.adapter.DSLThreadAdapter; - -public class PlainK3DebugModelPresentation extends GemocDebugModelPresentation { - - @Override - public String getText(Object element) { - - if(element instanceof Adapter) { - Object target = ((Adapter)element).getTarget(); - - if(target instanceof DebugTarget) { - return ((DebugTarget)target).getName(); - - } else if(target instanceof fr.obeo.dsl.debug.Thread) { - return ((fr.obeo.dsl.debug.Thread)target).getName(); - - } else if(target instanceof StackFrame) { - return ((StackFrame) target).getName(); - } - - } - return super.getText(element); - } - - @Override - public Image getImage(Object element) { - if (element instanceof DSLDebugTargetAdapter || element instanceof DSLThreadAdapter) { - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/debugt_obj.png"); - return id.createImage(); - } - return super.getImage(element); - } - -} \ No newline at end of file diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationDataProcessingTab.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationDataProcessingTab.java deleted file mode 100644 index 5faace249..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/launcher/tabs/LaunchConfigurationDataProcessingTab.java +++ /dev/null @@ -1,176 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine.ui.launcher.tabs; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension; -import org.gemoc.xdsmlframework.api.extensions.engine_addon_group.EngineAddonGroupSpecificationExtension; - -public abstract class LaunchConfigurationDataProcessingTab extends LaunchConfigurationTab -{ - - private HashMap _components = new HashMap<>(); - - protected LaunchConfigurationDataProcessingTab() - { - for (EngineAddonSpecificationExtension extension : getExtensionSpecifications()) - { - _components.put(extension, null); - } - } - - protected abstract Collection getExtensionSpecifications(); - protected abstract Collection getGroupExtensionSpecifications(); - - @Override - public void createControl(Composite parent) - { - Composite content = new Composite(parent, SWT.NULL); - GridLayout gl = new GridLayout(1, false); - gl.marginHeight = 0; - content.setLayout(gl); - content.layout(); - setControl(content); - - createLayout(content); - } - - private void createLayout(Composite parent) - { - HashMap groupmap = new HashMap(); - - - for(EngineAddonGroupSpecificationExtension extension : getGroupExtensionSpecifications()){ - groupmap.put(extension.getId(), createGroup(parent, extension.getName())); - } - - groupmap.put("", createGroup(parent, "")); - - for (EngineAddonSpecificationExtension extension : _components.keySet()) - { - Group parentGroup = groupmap.get(""); - if(extension.getAddonGroupId() != null){ - // refine the parentGroup if specified - parentGroup = groupmap.get(extension.getAddonGroupId()); - if(parentGroup == null){ - // back to the unsorted group - parentGroup = groupmap.get(""); - } - } - - Button checkbox = createCheckButton(parentGroup, extension.getName()); - if(extension.getShortDescription() != null){ - checkbox.setToolTipText(extension.getShortDescription()); - } - //checkbox.setSelection(extension.getDefaultActivationValue()); - checkbox.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - updateLaunchConfigurationDialog(); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) {} - }); - _components.put(extension, checkbox); - } - - // remove empty groups - for(Group g :groupmap.values()){ - if(g.getChildren().length == 0){ - g.dispose(); - parent.layout(true); - } - } - } - - @Override - public void setDefaults(ILaunchConfigurationWorkingCopy configuration) - { - for (EngineAddonSpecificationExtension entry : _components.keySet()) - { - configuration.setAttribute(entry.getName(), entry.getDefaultActivationValue()); - } - } - - @Override - public void initializeFrom(ILaunchConfiguration configuration) - { - for (EngineAddonSpecificationExtension extension : _components.keySet()) - { - try { - boolean value = configuration.getAttribute(extension.getName(), true); -// _componentsActive.put(extension, value); - Button checkbox = _components.get(extension); - checkbox.setSelection(value); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - - @Override - public void performApply(ILaunchConfigurationWorkingCopy configuration) - { - for (Entry entry : _components.entrySet()) - { - configuration.setAttribute(entry.getKey().getName(), entry.getValue().getSelection()); - } - } - - @Override - public boolean isValid(ILaunchConfiguration config) { - //Validate each addon - try{ - List addons = new ArrayList(); - for (Entry entry : _components.entrySet()) - { - if(entry.getValue().getSelection()){ - addons.add(entry.getKey().instanciateComponent()); - } - } - List errors = new ArrayList(); - for (IEngineAddon iEngineAddon : addons) { - errors.addAll(iEngineAddon.validate(addons)); - } - if(!errors.isEmpty()){ - for (String msg : errors) { - setErrorMessage(msg); - } - return false; - } - } - catch(Exception e){ - e.printStackTrace(); - } - - setErrorMessage(null); - return true; - } -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/.project b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/.project deleted file mode 100644 index 150dada7c..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.execution.sequential.javaengine - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/META-INF/MANIFEST.MF b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/META-INF/MANIFEST.MF deleted file mode 100644 index 0048ff3b2..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Gemoc Sequential Language Api -Bundle-SymbolicName: org.gemoc.execution.sequential.javaengine;singleton:=true -Bundle-Version: 0.1.0.qualifier -Require-Bundle: org.gemoc.xdsmlframework.api, - org.gemoc.execution.sequential.javaxdsml.api, - org.gemoc.executionframework.engine, - fr.inria.diverse.k3.al.annotationprocessor.plugin, - org.eclipse.jdt.core, - org.eclipse.emf.transaction, - fr.inria.diverse.commons.provisionner4eclipse, - fr.inria.diverse.melange.adapters, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0", - fr.inria.diverse.trace.commons;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Export-Package: org.gemoc.execution.sequential.javaengine -Bundle-Activator: org.gemoc.execution.sequential.javaengine.Activator -Bundle-ActivationPolicy: lazy - diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/pom.xml b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/pom.xml deleted file mode 100644 index 1bd9f9dd6..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - - ../../.. - org.gemoc.execution.sequential.java - org.gemoc.execution.sequential.java.root - 0.1.0-SNAPSHOT - - - org.gemoc.execution.sequential.javaengine - eclipse-plugin - \ No newline at end of file diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/Activator.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/Activator.java deleted file mode 100644 index 5bad4aa1e..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/Activator.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class Activator implements BundleActivator { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.execution.sequential.javaengine"; //$NON-NLS-1$ - - private static BundleContext context; - - static BundleContext getContext() { - return context; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext bundleContext) throws Exception { - Activator.context = bundleContext; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext bundleContext) throws Exception { - Activator.context = null; - } - - public static void warn(String msg, Throwable e){ - Platform.getLog(Platform.getBundle(PLUGIN_ID)).log(new Status(Status.WARNING, PLUGIN_ID, - Status.OK, - msg, - e)); - } - public static void error(String msg, Throwable e){ - Platform.getLog(Platform.getBundle(PLUGIN_ID)).log(new Status(Status.ERROR, PLUGIN_ID, - Status.OK, - msg, - e)); - } -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/PlainK3ExecutionEngine.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/PlainK3ExecutionEngine.java deleted file mode 100644 index da0974c74..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/PlainK3ExecutionEngine.java +++ /dev/null @@ -1,454 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine; - -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -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.transaction.TransactionalEditingDomain; -import org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.search.IJavaSearchConstants; -import org.eclipse.jdt.core.search.IJavaSearchScope; -import org.eclipse.jdt.core.search.SearchEngine; -import org.eclipse.jdt.core.search.SearchMatch; -import org.eclipse.jdt.core.search.SearchParticipant; -import org.eclipse.jdt.core.search.SearchPattern; -import org.eclipse.jdt.core.search.SearchRequestor; -import org.gemoc.executionframework.engine.commons.MelangeHelper; -import org.gemoc.executionframework.engine.core.AbstractCommandBasedSequentialExecutionEngine; -import org.gemoc.executionframework.engine.core.EngineStoppedException; -import org.gemoc.xdsmlframework.api.core.IExecutionContext; -import org.gemoc.xdsmlframework.api.core.IRunConfiguration; -import org.kermeta.utils.provisionner4eclipse.Provisionner; -import org.osgi.framework.Bundle; - -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager; -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand; -import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepManagerRegistry; -import fr.inria.diverse.melange.adapters.EObjectAdapter; -import fr.inria.diverse.trace.commons.model.trace.AddonExtensionParameter; -import fr.inria.diverse.trace.commons.model.trace.AnimatorURIParameter; -import fr.inria.diverse.trace.commons.model.trace.EntryPointParameter; -import fr.inria.diverse.trace.commons.model.trace.InitializationArgumentsParameter; -import fr.inria.diverse.trace.commons.model.trace.InitializationMethodParameter; -import fr.inria.diverse.trace.commons.model.trace.LanguageNameParameter; -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.ModelRootParameter; -import fr.inria.diverse.trace.commons.model.trace.ModelURIParameter; -import fr.inria.diverse.trace.commons.model.trace.TraceFactory; - -public class PlainK3ExecutionEngine extends AbstractCommandBasedSequentialExecutionEngine implements IStepManager { - - private Method initializeMethod; - private List initializeMethodParameters; - private Method entryPointMethod; - private List entryPointMethodParameters; - private Class entryPointClass; - - private static final String LAUNCH_CONFIGURATION_TYPE = "org.gemoc.execution.sequential.javaengine.ui.launcher"; - - @Override - public String engineKindName() { - return "GEMOC Kermeta Sequential Engine"; - } - - /** - * Constructs a PlainK3 execution engine using an entry point (~ a main operation) The entrypoint will register - * itself as a StepManager into the K3 step manager registry, and unregister itself at the end. As a StepManager, - * the PlainK3ExecutionEngine will receive callbacks through its "executeStep" operation. - */ - @Override - protected void prepareEntryPoint(IExecutionContext executionContext) { - /* - * Get info from the RunConfiguration - */ - String entryPoint = executionContext.getRunConfiguration().getExecutionEntryPoint(); - String mainModelElementURI = executionContext.getRunConfiguration().getModelEntryPoint(); - - /* - * Find the entry point in the workspace - */ - final String PREFIX = "public static void "; - int startName = PREFIX.length(); - int endName = entryPoint.lastIndexOf("("); - String methodFullName = entryPoint.substring(startName, endName); - - String aspectClassName = methodFullName.substring(0, methodFullName.lastIndexOf(".")); - String methodName = methodFullName.substring(methodFullName.lastIndexOf(".") + 1); - - Bundle bundle = findBundle(executionContext, aspectClassName); - if (bundle == null) - throw new RuntimeException("Could not find bundle for language \"" - + executionContext.getRunConfiguration().getLanguageName() + "\""); - - // search the class - try { - entryPointClass = bundle.loadClass(aspectClassName); - } catch (ClassNotFoundException e) { - String bundleName = bundle.getHeaders().get("Bundle-Name"); - e.printStackTrace(); - throw new RuntimeException("Could not find class " - + executionContext.getRunConfiguration().getExecutionEntryPoint() + " in bundle " + bundleName - + "."); - } - - // search the method - this.entryPointMethodParameters = new ArrayList<>(); - EObject root = executionContext.getResourceModel().getEObject(mainModelElementURI); - if (root instanceof EObjectAdapter) { - entryPointMethodParameters.add(((EObjectAdapter) root).getAdaptee()); - } else { - entryPointMethodParameters.add(root); - } - try { - this.entryPointMethod = MelangeHelper.findMethod(entryPointClass, root, methodName); - } catch (Exception e) { - String msg = "There is no \"" + methodName + "\" method in " + entryPointClass.getName() - + " with first parameter able to handle " + entryPointMethodParameters.get(0).toString(); - msg += " from " + ((EObject) entryPointMethodParameters.get(0)).eClass().getEPackage().getNsURI(); - Activator.error(msg, e); - throw new RuntimeException("Could not find method main with correct parameters."); - } - } - - @Override - protected void prepareInitializeModel(IExecutionContext executionContext) { - - // try to get the initializeModelRunnable - String modelInitializationMethodQName = executionContext.getRunConfiguration().getModelInitializationMethod(); - if (!modelInitializationMethodQName.isEmpty()) { - // the current system supposes that the modelInitialization method - // is in the same class as the entry point - String modelInitializationMethodName = modelInitializationMethodQName - .substring(modelInitializationMethodQName.lastIndexOf(".") + 1); - boolean isListArgs = false; - boolean isEListArgs = false; - try { - Class[] modelInitializationParamType = new Class[] { - entryPointMethodParameters.get(0).getClass().getInterfaces()[0], String[].class }; - initializeMethod = entryPointClass.getMethod(modelInitializationMethodName, - modelInitializationParamType); - isListArgs = false; // this is a java array - } catch (Exception e) { - try { - Class[] modelInitializationParamType = new Class[] { - entryPointMethodParameters.get(0).getClass().getInterfaces()[0], List.class }; - initializeMethod = entryPointClass.getMethod(modelInitializationMethodName, - modelInitializationParamType); - isListArgs = true; // this is a List - - } catch (Exception e2) { - try { - Class[] modelInitializationParamType = new Class[] { - entryPointMethodParameters.get(0).getClass().getInterfaces()[0], EList.class }; - this.initializeMethod = entryPointClass.getMethod(modelInitializationMethodName, - modelInitializationParamType); - isEListArgs = true; // this is an EList - } catch (Exception e3) { - - String msg = "There is no \"" + modelInitializationMethodName + "\" method in " - + entryPointClass.getName() + " with first parameter able to handle " - + entryPointMethodParameters.get(0).toString(); - msg += " and String[] or List or EList args as second parameter"; - msg += " from " + ((EObject) entryPointMethodParameters.get(0)).eClass().getEPackage().getNsURI(); - Activator.error(msg, e); - // ((EObject)parameters.get(0)).eClass().getEPackage().getNsURI() - throw new RuntimeException("Could not find method " + modelInitializationMethodName - + " with correct parameters."); - } - } - } - final boolean final_isListArgs = isListArgs; - final boolean final_isEListArgs = isEListArgs; - this.initializeMethodParameters = new ArrayList<>(); - initializeMethodParameters.add(entryPointMethodParameters.get(0)); - if (final_isListArgs) { - final ArrayList modelInitializationListParameters = new ArrayList<>(); - for (String s : executionContext.getRunConfiguration().getModelInitializationArguments() - .split("\\r?\\n")) { - modelInitializationListParameters.add(s); - } - initializeMethodParameters.add(modelInitializationListParameters); - } else if (final_isEListArgs) { - final EList modelInitializationListParameters = new BasicEList<>(); - for (String s : executionContext.getRunConfiguration().getModelInitializationArguments() - .split("\\r?\\n")) { - modelInitializationListParameters.add(s); - } - initializeMethodParameters.add(modelInitializationListParameters); - } else { - initializeMethodParameters.add(executionContext.getRunConfiguration() - .getModelInitializationArguments().split("\\r?\\n")); - } - - } - } - - @Override - protected void initializeModel() { - StepManagerRegistry.getInstance().registerManager(PlainK3ExecutionEngine.this); - try { - initializeMethod.invoke(null, initializeMethodParameters.toArray()); - } catch (EngineStoppedException stopExeception) { - // not really an error, simply forward the stop exception - throw stopExeception; - } catch (java.lang.reflect.InvocationTargetException ite) { - // not really an error, simply forward the stop exception - if (ite.getCause() instanceof EngineStoppedException) { - throw (EngineStoppedException) ite.getCause(); - } else { - throw new RuntimeException(ite); - } - } catch (Exception e) { - throw new RuntimeException(e); - } finally { - StepManagerRegistry.getInstance().unregisterManager(PlainK3ExecutionEngine.this); - } - } - - @Override - protected void executeEntryPoint() { - StepManagerRegistry.getInstance().registerManager(PlainK3ExecutionEngine.this); - try { - // since aspect's methods are static, first arg is null - entryPointMethod.invoke(null, entryPointMethodParameters.get(0)); - } catch (EngineStoppedException stopExeception) { - // not really an error, simply forward the stop exception - throw stopExeception; - } catch (java.lang.reflect.InvocationTargetException ite) { - // not really an error, simply forward the stop exception - if (ite.getCause() instanceof EngineStoppedException) { - throw (EngineStoppedException) ite.getCause(); - } else { - throw new RuntimeException(ite); - } - } catch (Exception e) { - throw new RuntimeException(e); - } finally { - StepManagerRegistry.getInstance().unregisterManager(PlainK3ExecutionEngine.this); - } - } - - @Override - /* - * This is the operation called from K3 code. We use this callback to pass the command to the generic - * executeOperation operation. (non-Javadoc) - * - * @see fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager# executeStep(java.lang.Object, - * fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand, java.lang.String) - */ - public void executeStep(Object caller, final StepCommand command, String className, String methodName) { - executeOperation(caller, className, methodName, new Runnable() { - @Override - public void run() { - command.execute(); - } - }); - } - - @Override - /* - * This is the operation used to act as a StepManager in K3. We return true if we have the same editing domain as - * the object. (non-Javadoc) - * - * @see fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager#canHandle (java.lang.Object) - */ - public boolean canHandle(Object caller) { - if (caller instanceof EObject) { - EObject caller_cast = (EObject) caller; - org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain = getEditingDomain(caller_cast); - return editingDomain == this.editingDomain; - - } - return false; - } - - /** - * Return a bundle containing 'aspectClassName'. - * - * Return null if not found. - */ - private Bundle findBundle(final IExecutionContext executionContext, String aspectClassName) { - - // first look using JavaWorkspaceScope as this is safer and will look in - // dependencies - IType mainIType = getITypeMainByWorkspaceScope(aspectClassName); - - Bundle bundle = null; - String bundleName = null; - if (mainIType != null) { - IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) mainIType.getPackageFragment() - .getParent(); - - bundleName = packageFragmentRoot.getPath().removeLastSegments(1).lastSegment().toString(); - if (bundleName != null) { - - // First we try to look into an already loaded bundle - bundle = Platform.getBundle(bundleName); - - // If this doesn't work, we use the provisioner to load - // the corresponding project - if (bundle == null) { - - String projectName = mainIType.getJavaProject().getElementName(); - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); - if (project != null && project.exists() - && !project.getFullPath().equals(executionContext.getWorkspace().getProjectPath())) { - Provisionner p = new Provisionner(); - IStatus status = p.provisionFromProject(project, null); - if (!status.isOK()) { - // return status; - throw new RuntimeException("Coudln't provision project."); - } - } - bundleName = project.getName(); - bundle = Platform.getBundle(bundleName); - } - } - } else { - // the main isn't visible directly from the workspace, try another - // method - bundle = _executionContext.getMelangeBundle(); - } - - return bundle; - } - - /** - * search the bundle that contains the Main class. The search is done in the workspace scope (ie. if it is defined - * in the current workspace it will find it - * - * @return the name of the bundle containing the Main class or null if not found - */ - private IType getITypeMainByWorkspaceScope(String className) { - SearchPattern pattern = SearchPattern.createPattern(className, IJavaSearchConstants.CLASS, - IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH); - IJavaSearchScope scope = SearchEngine.createWorkspaceScope(); - - final List binaryType = new ArrayList(); - - SearchRequestor requestor = new SearchRequestor() { - @Override - public void acceptSearchMatch(SearchMatch match) throws CoreException { - binaryType.add((IType) match.getElement()); - } - }; - SearchEngine engine = new SearchEngine(); - - try { - engine.search(pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, scope, - requestor, null); - } catch (CoreException e1) { - throw new RuntimeException("Error while searching the bundle: " + e1.getMessage()); - // return new Status(IStatus.ERROR, Activator.PLUGIN_ID, ); - } - - return binaryType.isEmpty() ? null : binaryType.get(0); - } - - private static TransactionalEditingDomain getEditingDomain(EObject o) { - return getEditingDomain(o.eResource().getResourceSet()); - } - - private static InternalTransactionalEditingDomain getEditingDomain(ResourceSet rs) { - TransactionalEditingDomain edomain = org.eclipse.emf.transaction.TransactionalEditingDomain.Factory.INSTANCE - .getEditingDomain(rs); - if (edomain instanceof InternalTransactionalEditingDomain) - return (InternalTransactionalEditingDomain) edomain; - else - return null; - } - - public static Resource loadModel(URI modelURI) { - Resource resource = null; - ResourceSet resourceSet; - resourceSet = new ResourceSetImpl(); - resource = resourceSet.createResource(modelURI); - try { - resource.load(null); - } catch (IOException e) { - // chut - } - return resource; - } - - @Override - public LaunchConfiguration extractLaunchConfiguration() { - final IRunConfiguration configuration = getExecutionContext().getRunConfiguration(); - final LaunchConfiguration launchConfiguration = TraceFactory.eINSTANCE.createLaunchConfiguration(); - launchConfiguration.setType(LAUNCH_CONFIGURATION_TYPE); - if (configuration.getLanguageName() != "") { - final LanguageNameParameter languageNameParam = TraceFactory.eINSTANCE.createLanguageNameParameter(); - languageNameParam.setValue(configuration.getLanguageName()); - launchConfiguration.getParameters().add(languageNameParam); - } - final URI modelURI = configuration.getExecutedModelURI(); - if (modelURI != null) { - final String scheme = modelURI.scheme() + ":/resource"; - final ModelURIParameter modelURIParam = TraceFactory.eINSTANCE.createModelURIParameter(); - modelURIParam.setValue(modelURI.toString().substring(scheme.length())); - launchConfiguration.getParameters().add(modelURIParam); - } - final URI animatorURI = configuration.getAnimatorURI(); - if (configuration.getAnimatorURI() != null) { - final String scheme = animatorURI.scheme() + ":/resource"; - final AnimatorURIParameter animatorURIParam = TraceFactory.eINSTANCE.createAnimatorURIParameter(); - animatorURIParam.setValue(animatorURI.toString().substring(scheme.length())); - launchConfiguration.getParameters().add(animatorURIParam); - } - if (configuration.getExecutionEntryPoint() != null) { - final EntryPointParameter entryPointParam = TraceFactory.eINSTANCE.createEntryPointParameter(); - entryPointParam.setValue(configuration.getExecutionEntryPoint()); - launchConfiguration.getParameters().add(entryPointParam); - } - if (configuration.getModelEntryPoint() != null) { - final ModelRootParameter modelRootParam = TraceFactory.eINSTANCE.createModelRootParameter(); - modelRootParam.setValue(configuration.getModelEntryPoint()); - launchConfiguration.getParameters().add(modelRootParam); - } - if (configuration.getModelInitializationMethod() != null) { - final InitializationMethodParameter initializationMethodParam = TraceFactory.eINSTANCE.createInitializationMethodParameter(); - initializationMethodParam.setValue(configuration.getModelInitializationMethod()); - launchConfiguration.getParameters().add(initializationMethodParam); - } - if (configuration.getModelInitializationArguments() != null) { - final InitializationArgumentsParameter initializationArgumentsParam = TraceFactory.eINSTANCE.createInitializationArgumentsParameter(); - initializationArgumentsParam.setValue(configuration.getModelInitializationArguments()); - launchConfiguration.getParameters().add(initializationArgumentsParam); - } - configuration.getEngineAddonExtensions().forEach(extensionPoint -> { - final AddonExtensionParameter addonExtensionParam = TraceFactory.eINSTANCE.createAddonExtensionParameter(); - addonExtensionParam.setValue(extensionPoint.getName()); - launchConfiguration.getParameters().add(addonExtensionParam); - }); - return launchConfiguration; - } - - - - -} diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/SequentialModelExecutionContext.java b/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/SequentialModelExecutionContext.java deleted file mode 100644 index bb5c61dd9..000000000 --- a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/src/org/gemoc/execution/sequential/javaengine/SequentialModelExecutionContext.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaengine; - -import org.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtension; -import org.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtensionPoint; -import org.gemoc.executionframework.engine.commons.EngineContextException; -import org.gemoc.executionframework.engine.commons.ModelExecutionContext; -import org.gemoc.xdsmlframework.api.core.ExecutionMode; -import org.gemoc.xdsmlframework.api.core.IRunConfiguration; -import org.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; - -import fr.inria.diverse.trace.commons.model.trace.MSEModel; - -public class SequentialModelExecutionContext extends ModelExecutionContext -{ - - - public SequentialModelExecutionContext(IRunConfiguration runConfiguration, ExecutionMode executionMode) - throws EngineContextException - { - super(runConfiguration, executionMode); - - } - - @Override - protected LanguageDefinitionExtension getLanguageDefinition(String languageName) throws EngineContextException - { - SequentialLanguageDefinitionExtension languageDefinition = SequentialLanguageDefinitionExtensionPoint - .findDefinition(_runConfiguration.getLanguageName()); - if (languageDefinition == null) - { - String message = "Cannot find sequential xdsml definition for the language " + _runConfiguration.getLanguageName() - + ", please verify that is is correctly deployed."; - EngineContextException exception = new EngineContextException(message); - throw exception; - } - return languageDefinition; - } - - @Override - public MSEModel getMSEModel() { - // TODO Auto-generated method stub - return null; - } - - -} diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/.classpath b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/.classpath new file mode 100644 index 000000000..428337e56 --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/.project b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/.project new file mode 100644 index 000000000..81af0ddfb --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.execution.sequential.javaengine.tests + + + + + + 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/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.settings/org.eclipse.jdt.core.prefs b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.settings/org.eclipse.jdt.core.prefs rename to java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/.settings/org.eclipse.jdt.core.prefs 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 new file mode 100644 index 000000000..8b2afa0df --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/JavaEngineTests.launch @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/META-INF/MANIFEST.MF b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/META-INF/MANIFEST.MF new file mode 100644 index 000000000..eb18d1ce6 --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Javaengine +Bundle-SymbolicName: org.eclipse.gemoc.execution.sequential.javaengine.tests +Bundle-Version: 1.0.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.gemoc.executionframework.test.lib;bundle-version="1.0.0", + org.eclipse.gemoc.execution.sequential.javaengine;bundle-version="2.3.0", + org.eclipse.emf.common;bundle-version="2.12.0", + org.junit;bundle-version="4.12.0", + org.eclipse.gemoc.executionframework.engine;bundle-version="2.3.0", + org.eclipse.gemoc.xdsmlframework.api;bundle-version="2.3.0", + fr.inria.diverse.k3.al.annotationprocessor.plugin;bundle-version="3.2.1" +Export-Package: org.eclipse.gemoc.execution.sequential.javaengine.tests, + org.eclipse.gemoc.execution.sequential.javaengine.tests.languages, + org.eclipse.gemoc.execution.sequential.javaengine.tests.wrapper + diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/build.properties b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/build.properties new file mode 100644 index 000000000..2bea6db63 --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/JavaEngineTests.xtend b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/JavaEngineTests.xtend new file mode 100644 index 000000000..883b3a99d --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/JavaEngineTests.xtend @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.tests + +import org.eclipse.gemoc.execution.sequential.javaengine.tests.languages.LegacyFSM +import org.eclipse.gemoc.execution.sequential.javaengine.tests.languages.TFSM +import org.eclipse.gemoc.execution.sequential.javaengine.tests.wrapper.JavaEngineWrapper +import org.eclipse.gemoc.executionframework.test.lib.impl.TestHelper +import org.eclipse.gemoc.executionframework.test.lib.impl.TestModel +import org.junit.Test + +class JavaEngineTests { + + public static val tfsmModelsPlugin = "org.gemoc.sample.tfsm.sequential.single_traffic_light_sample" + public static val legacyFsmModelsPlugin = "org.gemoc.sample.legacyfsm.model_examples" + + @Test + def void testTFSM() { + TestHelper::testWithoutExtraAddons(new JavaEngineWrapper(), new TFSM(), + new TestModel(tfsmModelsPlugin, "/", "single_traffic_light.xtfsm", "","")) + } + + @Test + def void testTFSMGenericTrace() { + TestHelper::testWithGenericTrace(new JavaEngineWrapper(), new TFSM(), + new TestModel(tfsmModelsPlugin, "/", "single_traffic_light.xtfsm", "","")) + } + + @Test + def void testLegacyFSM() { + TestHelper::testWithGenericTrace(new JavaEngineWrapper(), new LegacyFSM(), + new TestModel(legacyFsmModelsPlugin, "/", "BitShifting.fsm", "000101010","?lang=org.gemoc.sample.legacyfsm.xsfsm.XSFSM")) + } + + @Test + def void testLegacyFSMGenericTrace() { + TestHelper::testWithoutExtraAddons(new JavaEngineWrapper(), new LegacyFSM(), + new TestModel(legacyFsmModelsPlugin, "/", "BitShifting.fsm", "000101010","?lang=org.gemoc.sample.legacyfsm.xsfsm.XSFSM")) + } + +} diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/languages/LegacyFSM.xtend b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/languages/LegacyFSM.xtend new file mode 100644 index 000000000..0937ce8b2 --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/languages/LegacyFSM.xtend @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.tests.languages + +import org.eclipse.gemoc.executionframework.test.lib.ILanguageWrapper + +class LegacyFSM implements ILanguageWrapper { + + override getEntryPoint() { + "public static void org.gemoc.sample.legacyfsm.xsfsm.xsfsm.aspects.StateMachineAspect.main(org.gemoc.sample.legacyfsm.xsfsm.xsfsm.fsm.StateMachine)" + } + + override getLanguageName() { + "org.gemoc.sample.legacyfsm.xsfsm.XSFSM" + } + + override getInitializationMethod() { + "org.gemoc.sample.legacyfsm.xsfsm.xsfsm.aspects.StateMachineAspect.initializeModel" + } + + + +} diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/languages/TFSM.xtend b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/languages/TFSM.xtend new file mode 100644 index 000000000..88d2113d5 --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/languages/TFSM.xtend @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.tests.languages + +import org.eclipse.gemoc.executionframework.test.lib.ILanguageWrapper + +class TFSM implements ILanguageWrapper { + + override getEntryPoint() { + "public static void org.gemoc.sample.tfsm.sequential.xtfsm.aspects.TimedSystemAspect.main(org.gemoc.sample.tfsm.sequential.xtfsm.tfsm.TimedSystem)" + } + + override getLanguageName() { + "org.gemoc.sample.tfsm.sequential.XTfsm" + } + + override getInitializationMethod() { + "org.gemoc.sample.tfsm.sequential.xtfsm.aspects.TimedSystemAspect.initializeModel" + } + + +} diff --git a/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/wrapper/JavaEngineWrapper.xtend b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/wrapper/JavaEngineWrapper.xtend new file mode 100644 index 000000000..2b50f5392 --- /dev/null +++ b/java_execution/java_engine/tests/org.eclipse.gemoc.execution.sequential.javaengine.tests/src/org/eclipse/gemoc/execution/sequential/javaengine/tests/wrapper/JavaEngineWrapper.xtend @@ -0,0 +1,40 @@ +package org.eclipse.gemoc.execution.sequential.javaengine.tests.wrapper + +import java.util.Set +import org.eclipse.emf.common.util.URI +import org.eclipse.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine +import org.eclipse.gemoc.execution.sequential.javaengine.SequentialModelExecutionContext +import org.eclipse.gemoc.executionframework.test.lib.IEngineWrapper +import org.eclipse.gemoc.executionframework.test.lib.ILanguageWrapper +import org.eclipse.gemoc.executionframework.test.lib.impl.TestRunConfiguration +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration +import org.eclipse.gemoc.executionframework.test.lib.IExecutableModel + +class JavaEngineWrapper implements IEngineWrapper { + + private PlainK3ExecutionEngine engine + + override run() { + engine.start(); + engine.joinThread(); + if (engine.error != null) + throw engine.error + } + + override prepare(ILanguageWrapper wrapper, IExecutableModel model, Set addons, URI uri) { + engine = new PlainK3ExecutionEngine() + val IRunConfiguration runConf = new TestRunConfiguration(model, uri,wrapper,addons) + val IExecutionContext exeContext = new SequentialModelExecutionContext(runConf, ExecutionMode::Run); + exeContext.initializeResourceModel(); + engine.initialize(exeContext) + engine.stopOnAddonError = true; + } + + override getRealEngine() { + return engine + } + + +} diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.checkstyle b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/.classpath b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.classpath similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/.classpath rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.classpath diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/.gitignore b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.gitignore similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/.gitignore rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.gitignore diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.project b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.project new file mode 100644 index 000000000..02e0bde2e --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.execution.sequential.javaxdsml.api + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/META-INF/MANIFEST.MF b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/META-INF/MANIFEST.MF new file mode 100644 index 000000000..d43b5cb6f --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Gemoc Sequential Language Api +Bundle-SymbolicName: org.eclipse.gemoc.execution.sequential.javaxdsml.api;singleton:=true +Bundle-Version: 2.3.0.qualifier +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.executionframework.engine.ui, + org.eclipse.gemoc.executionframework.debugger;bundle-version="2.3.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.gemoc.execution.sequential.javaxdsml.api.extensions.languages + diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/about.html b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/about.html similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/about.html rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/about.html diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/build.properties b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/build.properties new file mode 100644 index 000000000..b7fb2f9fc --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + schema/ diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/plugin.xml b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/plugin.xml new file mode 100644 index 000000000..2d91520a7 --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/plugin.xml @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/pom.xml b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/pom.xml new file mode 100644 index 000000000..ec60ccc2c --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/pom.xml @@ -0,0 +1,25 @@ + + + + + 4.0.0 + + + ../../.. + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.execution.sequential.javaxdsml.api + eclipse-plugin + \ No newline at end of file diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/schema/org.gemoc.gemoc_language_workbench.sequential.xdsml.exsd b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/schema/org.gemoc.gemoc_language_workbench.sequential.xdsml.exsd similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/schema/org.gemoc.gemoc_language_workbench.sequential.xdsml.exsd rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/schema/org.gemoc.gemoc_language_workbench.sequential.xdsml.exsd diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/src/org/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtension.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/src/org/eclipse/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtension.java similarity index 90% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/src/org/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtension.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/src/org/eclipse/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtension.java index 5a1ce12df..3779cc04e 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/src/org/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtension.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/src/org/eclipse/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtension.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.api.extensions.languages; +package org.eclipse.gemoc.execution.sequential.javaxdsml.api.extensions.languages; import org.eclipse.core.runtime.CoreException; -import org.gemoc.executionframework.engine.ui.debug.AbstractGemocDebuggerFactory; -import org.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; +import org.eclipse.gemoc.executionframework.debugger.AbstractGemocDebuggerFactory; +import org.eclipse.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtension; public class SequentialLanguageDefinitionExtension extends LanguageDefinitionExtension { diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/src/org/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtensionPoint.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/src/org/eclipse/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtensionPoint.java similarity index 93% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/src/org/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtensionPoint.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/src/org/eclipse/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtensionPoint.java index bb7074464..fc5617892 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/src/org/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtensionPoint.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api/src/org/eclipse/gemoc/execution/sequential/javaxdsml/api/extensions/languages/SequentialLanguageDefinitionExtensionPoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.api.extensions.languages; +package org.eclipse.gemoc.execution.sequential.javaxdsml.api.extensions.languages; import java.util.Collection; -import org.gemoc.xdsmlframework.api.extensions.ExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.api.extensions.ExtensionPoint; public class SequentialLanguageDefinitionExtensionPoint extends ExtensionPoint { diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.checkstyle b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.classpath b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.classpath new file mode 100644 index 000000000..428337e56 --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/.gitignore b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.gitignore similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/.gitignore rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.gitignore diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.project b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.project new file mode 100644 index 000000000..02b84318e --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/.project @@ -0,0 +1,40 @@ + + + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + net.sf.eclipsecs.core.CheckstyleNature + + 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 new file mode 100644 index 000000000..4b5a4909c --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/META-INF/MANIFEST.MF @@ -0,0 +1,42 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Sequential Java XDSML UI +Bundle-SymbolicName: org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.Activator +Bundle-Vendor: INRIA +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.emf.codegen.ecore.ui;bundle-version="2.8.0", + fr.inria.diverse.k3.ui;bundle-version="1.0.0", + org.eclipse.gemoc.commons.eclipse, + org.eclipse.gemoc.commons.eclipse.jdt, + org.eclipse.gemoc.commons.eclipse.ui, + org.eclipse.gemoc.executionframework.ui, + org.eclipse.gemoc.xdsmlframework.ide.ui, + org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.execution.sequential.javaxdsml.api, + org.eclipse.gemoc.xdsmlframework.extensions.sirius;bundle-version="0.1.0", + org.eclipse.emf.ecore.xmi;bundle-version="2.10.2", + org.eclipse.gemoc.executionframework.extensions.sirius;bundle-version="0.1.0", + fr.inria.diverse.melange.metamodel, + fr.inria.diverse.melange.ui, + fr.inria.diverse.melange.ui.templates, + org.eclipse.core.expressions, + org.eclipse.xtext, + org.eclipse.xtext.ui, + org.eclipse.gemoc.xdsmlframework.ui.utils, + org.eclipse.emf.ecoretools.design.ui, + org.eclipse.gemoc.commons.eclipse.pde +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Export-Package: org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui, + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.builder, + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.commands, + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.dialogs, + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.editor, + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.menu, + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.templates, + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards + diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/about.html b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/about.html similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/about.html rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/about.html diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/build.properties b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/build.properties new file mode 100644 index 000000000..d2baa9b2c --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src,\ + xtend-gen/ +output.. = bin +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/,\ + templates/,\ + about.html +src.includes = about.html diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/IconeGemocLanguage-10.png b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/IconeGemocLanguage-10.png similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/IconeGemocLanguage-10.png rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/IconeGemocLanguage-10.png diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/IconeGemocLanguage-16.png b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/IconeGemocLanguage-16.png similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/IconeGemocLanguage-16.png rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/IconeGemocLanguage-16.png diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-12.png b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-12.png similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-12.png rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-12.png diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-16.png b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-16.png similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-16.png rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-16.png diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-32.png b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-32.png similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-32.png rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/gemoc-logo-32.png diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/plus-16.png b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/plus-16.png similarity index 100% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/icons/plus-16.png rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/icons/plus-16.png diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/plugin.xml b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/plugin.xml new file mode 100644 index 000000000..4f5132180 --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/plugin.xml @@ -0,0 +1,355 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create a new xDSML project to specify an executable language that will run using the GEMOC java sequential engine. + + + + + + + + + + + + + + This template includes the definition of a sequential language. + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/pom.xml b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/pom.xml new file mode 100644 index 000000000..48dbff955 --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/pom.xml @@ -0,0 +1,25 @@ + + + + + 4.0.0 + + + ../../.. + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui + eclipse-plugin + \ No newline at end of file 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/Activator.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/Activator.java new file mode 100644 index 000000000..00b101ba1 --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/Activator.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.javaxdsml.ide.ui; + +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui"; //$NON-NLS-1$ + + // extension point constants + + + public static final String MODEL_LOADER_CLASS_NAMEPART = "ModelLoader"; + public static final String CODEEXECUTOR_CLASS_NAMEPART = "CodeExecutor"; + public static final String SOLVER_CLASS_NAMEPART = "Solver"; + public static final String EXTENSION_GENERATED_CLASS_FOLDER_NAME = "src/main/xdsml-java-gen/"; + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given plug-in + * relative path + * + * @param path + * the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + public static void warn(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); + } + + public static void error(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); + } + +} diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/builder/AddRemoveGemocSequentialLanguageNatureHandler.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/AddRemoveGemocSequentialLanguageNatureHandler.java similarity index 84% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/builder/AddRemoveGemocSequentialLanguageNatureHandler.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/builder/AddRemoveGemocSequentialLanguageNatureHandler.java index 4712fca10..c9c6a5e94 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/builder/AddRemoveGemocSequentialLanguageNatureHandler.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/AddRemoveGemocSequentialLanguageNatureHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.builder; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.builder; import java.io.IOException; import java.io.InputStream; @@ -31,15 +31,15 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.handlers.HandlerUtil; -import org.gemoc.commons.eclipse.core.resources.NatureToggling; -import org.gemoc.commons.eclipse.core.resources.Project; -import org.gemoc.commons.eclipse.pde.JavaProject; -import org.gemoc.commons.eclipse.pde.ui.PluginConverter; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.Activator; -import org.gemoc.xdsmlframework.ide.ui.builder.pde.PluginXMLHelper; +import org.eclipse.gemoc.commons.eclipse.core.resources.NatureToggling; +import org.eclipse.gemoc.commons.eclipse.core.resources.IProjectUtils; +import org.eclipse.gemoc.commons.eclipse.jdt.JavaProject; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.commons.eclipse.pde.ui.PluginConverter; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.Activator; +import org.eclipse.gemoc.xdsmlframework.ide.ui.builder.pde.PluginXMLHelper; import org.osgi.framework.BundleException; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; public class AddRemoveGemocSequentialLanguageNatureHandler extends AbstractHandler { @@ -115,7 +115,7 @@ public void configureNature(IProject project) { try { - NatureToggling result = Project.toggleNature(project, GemocSequentialLanguageNature.NATURE_ID); + NatureToggling result = IProjectUtils.toggleNature(project, GemocSequentialLanguageNature.NATURE_ID); switch (result) { case Added: JavaProject.create(project); @@ -155,11 +155,11 @@ private void updateManifestFile(IProject project){ // complement manifest ManifestChanger changer = new ManifestChanger(project); try { - changer.addPluginDependency(org.gemoc.xdsmlframework.api.Activator.PLUGIN_ID, "0.1.0", true, true); + changer.addPluginDependency(org.eclipse.gemoc.xdsmlframework.api.Activator.PLUGIN_ID, "0.1.0", true, true); changer.addPluginDependency("org.eclipse.emf.ecore.xmi", "2.8.0", true, true); - changer.addPluginDependency("org.gemoc.xdsmlframework.api"); - changer.addPluginDependency("org.gemoc.execution.sequential.javaxdsml.api"); - changer.addPluginDependency("org.gemoc.executionframework.engine"); + changer.addPluginDependency("org.eclipse.gemoc.xdsmlframework.api"); + changer.addPluginDependency("org.eclipse.gemoc.execution.sequential.javaxdsml.api"); + changer.addPluginDependency("org.eclipse.gemoc.executionframework.engine"); // changer.addSingleton(); // changer.addAttributes("Bundle-RequiredExecutionEnvironment","JavaSE-1.7"); changer.commit(); @@ -202,7 +202,7 @@ private void addMissingResourcesToNature(IProject project) { private void addGemocResourcesToBuildProperties(IProject project){ - + PipedInputStream in = null; try { Properties properties = new Properties(); InputStream inputStream = project.getFile("build.properties").getContents(); @@ -214,12 +214,13 @@ private void addGemocResourcesToBuildProperties(IProject project){ // } } //create an empty InputStream - PipedInputStream in = new PipedInputStream(); + in = new PipedInputStream(); //create an OutputStream with the InputStream from above as input PipedOutputStream out = new PipedOutputStream(in); //now work on the OutputStream e.g. properties.store(out, ""); + in.close(); out.close(); //now you have the OutputStream as InputStream @@ -230,8 +231,15 @@ private void addGemocResourcesToBuildProperties(IProject project){ Activator.error(e1.getMessage(), e1); } catch (IOException e) { Activator.error(e.getMessage(), e); + } finally { + if(in != null){ + try { + in.close(); + } catch (IOException e) { + Activator.error(e.getMessage(), e); + } + } } - } } \ No newline at end of file diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/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 similarity index 88% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageBuilder.java rename to 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 08e92de01..d2590ecce 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.builder; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.builder; import java.io.IOException; import java.util.Map; @@ -26,13 +26,13 @@ import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtensionPoint; -import org.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtensionPoint; -import org.gemoc.xdsmlframework.ide.ui.builder.pde.PluginXMLHelper; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.execution.sequential.javaxdsml.api.extensions.languages.SequentialLanguageDefinitionExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.api.extensions.languages.LanguageDefinitionExtensionPoint; +import org.eclipse.gemoc.xdsmlframework.ide.ui.builder.pde.PluginXMLHelper; import org.jdom2.Element; import org.osgi.framework.BundleException; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; import fr.inria.diverse.melange.metamodel.melange.Language; import fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace; @@ -74,7 +74,7 @@ public boolean visit(IResource resource) { } } - public static final String BUILDER_ID = "org.gemoc.execution.sequential.javaxdsml.ide.ui.GemocSequentialLanguageBuilder"; + public static final String BUILDER_ID = "org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.GemocSequentialLanguageBuilder"; /* * (non-Javadoc) @@ -134,7 +134,7 @@ private void updateProjectPluginConfiguration(IResource resource) { updateModelLoaderClass(project, null); ManifestChanger manifestChanger = new ManifestChanger(project); try { - manifestChanger.addPluginDependency(org.gemoc.executionframework.extensions.sirius.Activator.PLUGIN_ID); + manifestChanger.addPluginDependency(org.eclipse.gemoc.executionframework.extensions.sirius.Activator.PLUGIN_ID); manifestChanger.commit(); } catch (BundleException | IOException | CoreException e) { e.printStackTrace(); @@ -160,7 +160,7 @@ protected void updateModelLoaderClass(IProject project, String modelLoaderClass) helper.updateXDSMLDefinitionAttributeInExtensionPoint( gemocExtensionPoint, LanguageDefinitionExtensionPoint.GEMOC_LANGUAGE_EXTENSION_POINT_XDSML_DEF_LOADMODEL_ATT, - modelLoaderClass != null ? modelLoaderClass : "org.gemoc.executionframework.extensions.sirius.modelloader.DefaultModelLoader"); + modelLoaderClass != null ? modelLoaderClass : "org.eclipse.gemoc.executionframework.extensions.sirius.modelloader.DefaultModelLoader"); helper.saveDocument(pluginfile); diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageNature.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/GemocSequentialLanguageNature.java similarity index 91% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageNature.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageNature.java index 916ab362c..959b68433 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/builder/GemocSequentialLanguageNature.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/GemocSequentialLanguageNature.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.builder; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.builder; import org.eclipse.core.resources.ICommand; import org.eclipse.core.resources.IProject; @@ -21,7 +21,7 @@ public class GemocSequentialLanguageNature implements IProjectNature { /** * ID of this project nature */ - public static final String NATURE_ID = "org.gemoc.execution.sequential.javaxdsml.ide.ui.GemocSequentialLanguageNature"; + public static final String NATURE_ID = "org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.GemocSequentialLanguageNature"; private IProject project; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateAnimatorProjectHandler.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateAnimatorProjectHandler.java similarity index 76% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateAnimatorProjectHandler.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateAnimatorProjectHandler.java index 8bc0c01ab..75fe75f22 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateAnimatorProjectHandler.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateAnimatorProjectHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,15 +8,15 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.commands; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.commands; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.commands.IHandler; import org.eclipse.core.resources.IProject; -import org.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateAnimatorProjectWizardContextAction; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateAnimatorProjectWizardContextAction.CreateAnimatorProjectAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateAnimatorProjectWizardContextAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateAnimatorProjectWizardContextAction.CreateAnimatorProjectAction; import fr.inria.diverse.melange.metamodel.melange.Language; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDSAProjectHandler.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDSAProjectHandler.java similarity index 90% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDSAProjectHandler.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDSAProjectHandler.java index 05f28801d..205e804be 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDSAProjectHandler.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDSAProjectHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.commands; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.commands; import java.io.IOException; import java.nio.file.Files; @@ -30,10 +30,10 @@ import org.eclipse.xtext.ui.editor.XtextEditor; import org.eclipse.xtext.ui.editor.model.IXtextDocument; import org.eclipse.xtext.ui.editor.utils.EditorUtils; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.templates.SequentialTemplate; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards.CreateDSAWizardContextActionDSAK3; -import org.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.templates.SequentialTemplate; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards.CreateDSAWizardContextActionDSAK3; +import org.eclipse.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper; import fr.inria.diverse.melange.metamodel.melange.Language; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDomainModelProjectHandler.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDomainModelProjectHandler.java similarity index 93% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDomainModelProjectHandler.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDomainModelProjectHandler.java index 2351bdfe6..2d6e1b460 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDomainModelProjectHandler.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateDomainModelProjectHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.commands; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.commands; import java.io.IOException; import java.nio.file.Files; @@ -30,9 +30,9 @@ import org.eclipse.xtext.ui.editor.XtextEditor; import org.eclipse.xtext.ui.editor.model.IXtextDocument; import org.eclipse.xtext.ui.editor.utils.EditorUtils; -import org.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateDomainModelWizardContextAction; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateDomainModelWizardContextAction.CreateDomainModelAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateDomainModelWizardContextAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateDomainModelWizardContextAction.CreateDomainModelAction; //import org.eclipse.jface.dialogs.MessageDialog; import fr.inria.diverse.melange.metamodel.melange.Language; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateSiriusEditorProjectHandler.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateSiriusEditorProjectHandler.java similarity index 91% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateSiriusEditorProjectHandler.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateSiriusEditorProjectHandler.java index 93eb58433..922d55dd3 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateSiriusEditorProjectHandler.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateSiriusEditorProjectHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.commands; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.commands; import java.io.IOException; import java.nio.file.Files; @@ -30,9 +30,9 @@ import org.eclipse.xtext.ui.editor.XtextEditor; import org.eclipse.xtext.ui.editor.model.IXtextDocument; import org.eclipse.xtext.ui.editor.utils.EditorUtils; -import org.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction.CreateEditorProjectAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction.CreateEditorProjectAction; import fr.inria.diverse.melange.metamodel.melange.Language; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateXtextEditorProjectHandler.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateXtextEditorProjectHandler.java similarity index 91% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateXtextEditorProjectHandler.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateXtextEditorProjectHandler.java index 020cb58f9..fc6c33be9 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateXtextEditorProjectHandler.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/commands/CreateXtextEditorProjectHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.commands; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.commands; import java.io.IOException; import java.nio.file.Files; @@ -30,9 +30,9 @@ import org.eclipse.xtext.ui.editor.XtextEditor; import org.eclipse.xtext.ui.editor.model.IXtextDocument; import org.eclipse.xtext.ui.editor.utils.EditorUtils; -import org.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction.CreateEditorProjectAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.CreateEditorProjectWizardContextAction.CreateEditorProjectAction; import fr.inria.diverse.melange.metamodel.melange.Language; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/dialogs/SelectDSAIProjectDialog.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/dialogs/SelectDSAIProjectDialog.java similarity index 77% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/dialogs/SelectDSAIProjectDialog.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/dialogs/SelectDSAIProjectDialog.java index 5049a8e3c..ae6373e5d 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/dialogs/SelectDSAIProjectDialog.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/dialogs/SelectDSAIProjectDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,12 +8,12 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.dialogs; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.dialogs; import java.util.Arrays; import org.eclipse.swt.widgets.Shell; -import org.gemoc.commons.eclipse.ui.dialogs.SelectPluginIProjectWithFileExtensionDialog; +import org.eclipse.gemoc.commons.eclipse.ui.dialogs.SelectPluginIProjectWithFileExtensionDialog; public class SelectDSAIProjectDialog extends SelectPluginIProjectWithFileExtensionDialog { diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateDSAProposal.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateDSAProposal.java similarity index 90% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateDSAProposal.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateDSAProposal.java index d0f412882..749684534 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateDSAProposal.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateDSAProposal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.editor; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.editor; import java.util.Set; @@ -32,14 +32,14 @@ import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.wizards.IWizardDescriptor; -import org.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; -import org.gemoc.commons.eclipse.ui.WizardFinder; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.Activator; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.templates.SequentialTemplate; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper; +import org.eclipse.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.commons.eclipse.pde.wizards.pages.pde.TemplateListSelectionPage; +import org.eclipse.gemoc.commons.eclipse.ui.WizardFinder; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.Activator; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.templates.SequentialTemplate; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; -import fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.TemplateListSelectionPage; import fr.inria.diverse.k3.ui.wizards.NewK3ProjectWizard; import fr.inria.diverse.k3.ui.wizards.pages.NewK3ProjectWizardFields.KindsOfProject; import fr.inria.diverse.melange.metamodel.melange.Language; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateEcoreProposal.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateEcoreProposal.java similarity index 89% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateEcoreProposal.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateEcoreProposal.java index 495d40149..a562c913c 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateEcoreProposal.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/CreateEcoreProposal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.editor; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.editor; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; @@ -20,12 +20,12 @@ import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.wizards.IWizardDescriptor; -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; -import org.gemoc.commons.eclipse.ui.WizardFinder; -import org.gemoc.xdsmlframework.ide.ui.Activator; +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.commons.eclipse.ui.WizardFinder; +import org.eclipse.gemoc.xdsmlframework.ide.ui.Activator; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; import fr.inria.diverse.melange.metamodel.melange.Language; import fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace; import fr.inria.diverse.melange.ui.contentassist.IProposal; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectDsaProposal.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectDsaProposal.java similarity index 84% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectDsaProposal.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectDsaProposal.java index 278400c34..9bf6a15f6 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectDsaProposal.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectDsaProposal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.editor; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.editor; import java.util.Set; @@ -16,10 +16,10 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.ui.PlatformUI; -import org.gemoc.commons.eclipse.ui.dialogs.SelectAnyIProjectDialog; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.templates.SequentialTemplate; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.commons.eclipse.ui.dialogs.SelectAnyIProjectDialog; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.templates.SequentialTemplate; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; import fr.inria.diverse.melange.ui.contentassist.IProposal; public class SelectDsaProposal implements IProposal{ diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectEcoreProposal.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectEcoreProposal.java similarity index 86% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectEcoreProposal.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectEcoreProposal.java index d63780748..f4fac8d16 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectEcoreProposal.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/editor/SelectEcoreProposal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,17 +8,17 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.editor; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.editor; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.dialogs.Dialog; -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.commons.eclipse.ui.dialogs.SelectSpecificFileDialog; +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.commons.eclipse.ui.dialogs.SelectSpecificFileDialog; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; import fr.inria.diverse.melange.ui.contentassist.IProposal; public class SelectEcoreProposal implements IProposal{ 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/menu/AddDSA.xtend b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/menu/AddDSA.xtend new file mode 100644 index 000000000..9b83ac2b9 --- /dev/null +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/menu/AddDSA.xtend @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.javaxdsml.ide.ui.menu + +import fr.inria.diverse.melange.metamodel.melange.Language +import java.util.List +import java.util.Set +import org.eclipse.core.commands.ExecutionEvent +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.xtext.nodemodel.INode +import org.eclipse.xtext.nodemodel.util.NodeModelUtils +import org.eclipse.xtext.ui.editor.utils.EditorUtils +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.commands.CreateDSAProjectHandler + +class AddDSA extends CreateDSAProjectHandler { + + override protected updateMelange(ExecutionEvent event, Language language, Set aspects) { + val editor = EditorUtils.getActiveXtextEditor(event) + if (editor != null) { + val document = editor.document + document.modify[ + val EStructuralFeature operators = language.eClass().getEStructuralFeature("operators"); + val List nodesOp = NodeModelUtils.findNodesForFeature(language, operators); + var int lastOffset = -1 + for(node : nodesOp){ + if(node.endOffset > lastOffset) lastOffset = node.endOffset + } + if(lastOffset != -1){ + + val StringBuilder insertion = new StringBuilder + aspects.forEach[asp | + insertion.append("\twith "+ asp + "\n") + ] + document.replace(lastOffset,0, "\n\n"+insertion.toString) + return null // no computed value + } + ] + } + } +} \ No newline at end of file diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialNewWizard.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialNewWizard.java similarity index 83% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialNewWizard.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialNewWizard.java index b636ff517..d4168969d 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialNewWizard.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialNewWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,12 +8,12 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.templates; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.templates; +import org.eclipse.gemoc.commons.eclipse.pde.wizards.pages.pde.ui.BaseProjectWizardFields; +import org.eclipse.gemoc.commons.eclipse.pde.wizards.pages.pde.ui.templates.ITemplateSection; import org.eclipse.xtext.util.Strings; -import fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.ui.BaseProjectWizardFields; -import fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.ui.templates.ITemplateSection; import fr.inria.diverse.melange.ui.templates.melange.SimpleMTNewWizard; public class SequentialNewWizard extends SimpleMTNewWizard{ diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialTemplate.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialTemplate.java similarity index 89% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialTemplate.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialTemplate.java index cd6726ef0..3809c589b 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialTemplate.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/templates/SequentialTemplate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.templates; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.templates; import java.io.IOException; import java.net.MalformedURLException; @@ -24,14 +24,14 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.ui.PlatformUI; -import org.gemoc.commons.eclipse.core.resources.FileFinderVisitor; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.Activator; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.dialogs.SelectDSAIProjectDialog; +import org.eclipse.gemoc.commons.eclipse.core.resources.FileFinderVisitor; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.Activator; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.dialogs.SelectDSAIProjectDialog; import org.osgi.framework.BundleException; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; -import fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.ui.templates.AbstractStringWithButtonOption; -import fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.ui.templates.TemplateOption; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; +import org.eclipse.gemoc.commons.eclipse.pde.wizards.pages.pde.ui.templates.AbstractStringWithButtonOption; +import org.eclipse.gemoc.commons.eclipse.pde.wizards.pages.pde.ui.templates.TemplateOption; import fr.inria.diverse.melange.ui.templates.melange.SimpleMTTemplate; public class SequentialTemplate extends SimpleMTTemplate{ @@ -128,10 +128,9 @@ public static Set getAspectClassesList(IProject k3IProject){ } } } catch (IOException e) { - // ... + Activator.error(e.getMessage(), e); } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + Activator.error(e.getMessage(), e); } } } diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizard.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizard.java similarity index 90% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizard.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizard.java index 1e8caa7e3..9c72c684f 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizard.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; import org.eclipse.jface.wizard.Wizard; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextAction.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextAction.java similarity index 92% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextAction.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextAction.java index b8dc219fd..15f307bac 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextAction.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; import org.eclipse.core.resources.IProject; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSA.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSA.java similarity index 85% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSA.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSA.java index 2012049ad..43699a9ff 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSA.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSA.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,13 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.PlatformUI; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.dialogs.SelectDSAIProjectDialog; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.dialogs.SelectDSAIProjectDialog; public class CreateDSAWizardContextActionDSA extends CreateDSAWizardContextBase { diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSAK3.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSAK3.java similarity index 89% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSAK3.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSAK3.java index c6de3f74e..6e44b9d75 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSAK3.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextActionDSAK3.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; @@ -27,14 +27,14 @@ import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.wizards.IWizardDescriptor; -import org.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; -import org.gemoc.commons.eclipse.ui.WizardFinder; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.Activator; -import org.gemoc.executionframework.ui.xdsml.activefile.ActiveFile; -import org.gemoc.executionframework.ui.xdsml.activefile.ActiveFileEcore; -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper; +import org.eclipse.gemoc.commons.eclipse.core.resources.NewProjectWorkspaceListener; +import org.eclipse.gemoc.commons.eclipse.pde.wizards.pages.pde.TemplateListSelectionPage; +import org.eclipse.gemoc.commons.eclipse.ui.WizardFinder; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.Activator; +import org.eclipse.gemoc.executionframework.ui.xdsml.activefile.ActiveFile; +import org.eclipse.gemoc.executionframework.ui.xdsml.activefile.ActiveFileEcore; +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper; -import fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.TemplateListSelectionPage; import fr.inria.diverse.k3.ui.wizards.NewK3ProjectWizard; import fr.inria.diverse.k3.ui.wizards.pages.NewK3ProjectWizardFields.KindsOfProject; diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextBase.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextBase.java similarity index 84% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextBase.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextBase.java index e75d1a00c..862e73c2b 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextBase.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardContextBase.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,11 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; import org.eclipse.core.resources.IProject; +import org.eclipse.gemoc.commons.eclipse.pde.manifest.ManifestChanger; -import fr.inria.diverse.commons.eclipse.pde.manifest.ManifestChanger; public class CreateDSAWizardContextBase { diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardPage.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardPage.java similarity index 93% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardPage.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardPage.java index 49bc61a87..45c1726df 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardPage.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateDSAWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Listener; import org.eclipse.ui.PlatformUI; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards.CreateDSAWizardContextAction.CreateDSAAction; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards.CreateDSAWizardContextAction.CreateDSAAction; public class CreateDSAWizardPage extends WizardPage { diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateNewGemocSequentialLanguageProject.java b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateNewGemocSequentialLanguageProject.java similarity index 86% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateNewGemocSequentialLanguageProject.java rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateNewGemocSequentialLanguageProject.java index 7d7fb4973..41627aed3 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateNewGemocSequentialLanguageProject.java +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/eclipse/gemoc/execution/sequential/javaxdsml/ide/ui/wizards/CreateNewGemocSequentialLanguageProject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,16 +8,16 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; +package org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.wizards; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.pde.internal.ui.elements.ElementList; import org.eclipse.swt.widgets.Composite; -import org.gemoc.execution.sequential.javaxdsml.ide.ui.builder.AddRemoveGemocSequentialLanguageNatureHandler; +import org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui.builder.AddRemoveGemocSequentialLanguageNatureHandler; -import fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.TemplateListSelectionPage; -import fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.WizardElement; +import org.eclipse.gemoc.commons.eclipse.pde.wizards.pages.pde.TemplateListSelectionPage; +import org.eclipse.gemoc.commons.eclipse.pde.wizards.pages.pde.WizardElement; import fr.inria.diverse.melange.ui.wizards.NewMelangeProjectWizard; import fr.inria.diverse.melange.ui.wizards.pages.NewMelangeProjectWizardPage; @@ -36,7 +36,7 @@ public void addPages() { NewMelangeProjectWizardPage firstPage = (NewMelangeProjectWizardPage) getPage("wizardPage"); firstPage.setTitle("Project"); firstPage.setDescription("Create a new Gemoc Sequential Language Project"); - firstPage.updateNameProject("org.company.my_sequential_language.xdsml"); + firstPage.updateNameProject("org.company.my_sequential_language"); } @Override diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/templates/SequentialLanguage/java/$melangeFileName$.melange b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/templates/SequentialLanguage/java/$melangeFileName$.melange similarity index 79% rename from java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/templates/SequentialLanguage/java/$melangeFileName$.melange rename to java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/templates/SequentialLanguage/java/$melangeFileName$.melange index 93cc7ab49..0ddc550da 100644 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/templates/SequentialLanguage/java/$melangeFileName$.melange +++ b/java_execution/java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui/templates/SequentialLanguage/java/$melangeFileName$.melange @@ -4,5 +4,4 @@ language $metamodelName$ { syntax "platform:/resource/$ecoreFilePath$" $listOfAspects$ - exactType $metamodelName$MT } \ No newline at end of file diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/.project b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/.project deleted file mode 100644 index f28f47fa2..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.execution.sequential.javaxdsml.api - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/META-INF/MANIFEST.MF b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/META-INF/MANIFEST.MF deleted file mode 100644 index 6f1dfec43..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/META-INF/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Gemoc Sequential Language Api -Bundle-SymbolicName: org.gemoc.execution.sequential.javaxdsml.api;singleton:=true -Bundle-Version: 0.1.0.qualifier -Require-Bundle: org.eclipse.core.runtime, - org.gemoc.xdsmlframework.api, - org.gemoc.executionframework.engine.ui -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Export-Package: org.gemoc.execution.sequential.javaxdsml.api.extensions.languages - diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/build.properties b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/build.properties deleted file mode 100644 index 3595411e8..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - schema/ diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/plugin.xml b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/plugin.xml deleted file mode 100644 index 5ce2340dc..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/plugin.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/pom.xml b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/pom.xml deleted file mode 100644 index a8e0bf936..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - - ../../.. - org.gemoc.execution.sequential.java - org.gemoc.execution.sequential.java.root - 0.1.0-SNAPSHOT - - - org.gemoc.execution.sequential.javaxdsml.api - eclipse-plugin - \ No newline at end of file diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/.project b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/.project deleted file mode 100644 index 7b5f1ecf4..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.gemoc.execution.sequential.javaxdsml.ide.ui - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/META-INF/MANIFEST.MF b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/META-INF/MANIFEST.MF deleted file mode 100644 index a5da4d03e..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,36 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Sequential Java XDSML UI -Bundle-SymbolicName: org.gemoc.execution.sequential.javaxdsml.ide.ui;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.execution.sequential.javaxdsml.ide.ui.Activator -Bundle-Vendor: INRIA -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.core.resources, - org.eclipse.emf.codegen.ecore.ui;bundle-version="2.8.0", - fr.inria.diverse.k3.ui;bundle-version="1.0.0", - org.gemoc.commons.eclipse, - org.gemoc.commons.eclipse.jdt, - org.gemoc.commons.eclipse.ui, - org.gemoc.executionframework.ui, - org.gemoc.xdsmlframework.ide.ui, - org.gemoc.xdsmlframework.api, - org.gemoc.execution.sequential.javaxdsml.api, - org.gemoc.xdsmlframework.extensions.sirius;bundle-version="0.1.0", - org.eclipse.emf.ecore.xmi;bundle-version="2.10.2", - org.gemoc.executionframework.extensions.sirius;bundle-version="0.1.0", - fr.inria.diverse.melange.metamodel, - fr.inria.diverse.melange.ui, - fr.inria.diverse.melange.ui.templates, - org.eclipse.core.expressions, - org.eclipse.xtext, - org.eclipse.xtext.ui, - org.gemoc.xdsmlframework.ui.utils, - org.eclipse.emf.ecoretools.design.ui -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: . -Export-Package: org.gemoc.execution.sequential.javaxdsml.ide.ui, - org.gemoc.execution.sequential.javaxdsml.ide.ui.dialogs, - org.gemoc.execution.sequential.javaxdsml.ide.ui.wizards - diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/build.properties b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/build.properties deleted file mode 100644 index 4fec88964..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -source.. = src,\ - xtend-gen/ -output.. = bin -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - templates/,\ - about.html -src.includes = about.html diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/plugin.xml b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/plugin.xml deleted file mode 100644 index 86982120c..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/plugin.xml +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This template includes the definition of a sequential language. - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/pom.xml b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/pom.xml deleted file mode 100644 index 3419cb179..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - - ../../.. - org.gemoc.execution.sequential.java - org.gemoc.execution.sequential.java.root - 0.1.0-SNAPSHOT - - - org.gemoc.execution.sequential.javaxdsml.ide.ui - eclipse-plugin - \ No newline at end of file diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/Activator.java b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/Activator.java deleted file mode 100644 index 109b7126a..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/Activator.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * 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.gemoc.execution.sequential.javaxdsml.ide.ui; - -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.execution.sequential.javaxdsml.ide.ui"; //$NON-NLS-1$ - - // extension point constants - - - public static final String MODEL_LOADER_CLASS_NAMEPART = "ModelLoader"; - public static final String CODEEXECUTOR_CLASS_NAMEPART = "CodeExecutor"; - public static final String SOLVER_CLASS_NAMEPART = "Solver"; - public static final String EXTENSION_GENERATED_CLASS_FOLDER_NAME = "src/main/xdsml-java-gen/"; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given plug-in - * relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - public static void warn(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); - } - - public static void error(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); - } - -} diff --git a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/menu/AddDSA.xtend b/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/menu/AddDSA.xtend deleted file mode 100644 index b9e2738ea..000000000 --- a/java_execution/java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui/src/org/gemoc/execution/sequential/javaxdsml/ide/ui/menu/AddDSA.xtend +++ /dev/null @@ -1,38 +0,0 @@ -package org.gemoc.execution.sequential.javaxdsml.ide.ui.menu - -import fr.inria.diverse.melange.metamodel.melange.Language -import java.util.List -import java.util.Set -import org.eclipse.core.commands.ExecutionEvent -import org.eclipse.emf.ecore.EStructuralFeature -import org.eclipse.xtext.nodemodel.INode -import org.eclipse.xtext.nodemodel.util.NodeModelUtils -import org.eclipse.xtext.ui.editor.utils.EditorUtils -import org.gemoc.execution.sequential.javaxdsml.ide.ui.commands.CreateDSAProjectHandler - -class AddDSA extends CreateDSAProjectHandler { - - override protected updateMelange(ExecutionEvent event, Language language, Set aspects) { - val editor = EditorUtils.getActiveXtextEditor(event) - if (editor != null) { - val document = editor.document - document.modify[ - val EStructuralFeature operators = language.eClass().getEStructuralFeature("operators"); - val List nodesOp = NodeModelUtils.findNodesForFeature(language, operators); - var int lastOffset = -1 - for(node : nodesOp){ - if(node.endOffset > lastOffset) lastOffset = node.endOffset - } - if(lastOffset != -1){ - - val StringBuilder insertion = new StringBuilder - aspects.forEach[asp | - insertion.append("\twith "+ asp + "\n") - ] - document.replace(lastOffset,0, "\n\n"+insertion.toString) - return null // no computed value - } - ] - } - } -} \ No newline at end of file diff --git a/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/.classpath b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/.classpath new file mode 100644 index 000000000..428337e56 --- /dev/null +++ b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/.project b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/.project new file mode 100644 index 000000000..09c2b4e45 --- /dev/null +++ b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.execution.sequential.javaxdsml.tests + + + + + + 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/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.settings/org.eclipse.jdt.core.prefs b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.settings/org.eclipse.jdt.core.prefs rename to java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/.settings/org.eclipse.jdt.core.prefs diff --git a/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/META-INF/MANIFEST.MF b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/META-INF/MANIFEST.MF new file mode 100644 index 000000000..f9cb2df3f --- /dev/null +++ b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Sequential Java xdsml Tests +Bundle-SymbolicName: org.eclipse.gemoc.execution.sequential.javaxdsml.tests +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui;bundle-version="2.3.0", + org.junit;bundle-version="4.12.0", + org.eclipse.xtext.junit4;bundle-version="2.10.0", + org.eclipse.xtext.xbase.lib;bundle-version="2.10.0", + fr.inria.diverse.melange.ui;bundle-version="0.2.0", + org.eclipse.debug.ui;bundle-version="3.11.202", + org.eclipse.emf.compare;bundle-version="3.3.1", + org.eclipse.jdt.core;bundle-version="3.12.3", + org.eclipse.ui.ide;bundle-version="3.12.3", + org.eclipse.jdt.launching;bundle-version="3.8.101", + org.eclipse.jdt.ui;bundle-version="3.12.2", + org.eclipse.xtext.ui;bundle-version="2.10.0", + fr.inria.diverse.melange.metamodel;bundle-version="0.2.0", + org.eclipse.core.expressions;bundle-version="3.5.100", + org.eclipse.gemoc.trace.gemoc.generator;bundle-version="2.3.0", + org.eclipse.gemoc.trace.gemoc;bundle-version="2.3.0", + org.eclipse.gemoc.xdsmlframework.test.lib;bundle-version="2.3.0" diff --git a/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/build.properties b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/build.properties new file mode 100644 index 000000000..2bea6db63 --- /dev/null +++ b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/pom.xml b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/pom.xml new file mode 100644 index 000000000..a6be4d869 --- /dev/null +++ b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/pom.xml @@ -0,0 +1,175 @@ + + + + + 4.0.0 + + + ../../.. + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.execution.sequential.javaxdsml.tests + eclipse-test-plugin + + + + + ${basedir}/../../../../../gemoc-studio + + ${basedir}/tests-inputs-gen + ${gemoc-studio.repository}/official_samples/LegacyFSM/language_workbench + ${tests-inputs-gen.path}/SequentialFSM + + + + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho-version} + + -Xmx2048m + true + true + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + initialize + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + + + + + eclipse-feature + org.eclipse.e4.rcp + 1.0.0 + + + eclipse-feature + org.eclipse.sdk + 1.0.0 + + + + eclipse-feature + org.eclipse.gemoc.dsl.debug.feature + 1.0.0 + + + eclipse-feature + org.eclipse.gemoc.execution.sequential.javaengine.ui.feature + 1.0.0 + + + eclipse-feature + org.eclipse.gemoc.xdsmlframework.feature + 1.0.0 + + + eclipse-feature + org.eclipse.gemoc.trace.generator.feature + 1.0.0 + + + eclipse-feature + org.eclipse.gemoc.trace.manager.feature + 1.0.0 + + + eclipse-feature + org.eclipse.gemoc.modeldebugging.framework.commons.feature + 1.0.0 + + + + + + + maven-clean-plugin + + + + ${tests-inputs-gen.path} + + **/.gitignore + **/readme.md + + + + + + + + + + diff --git a/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/src/org/eclipse/gemoc/execution/sequential/javaxdsml/tests/SequentialFsmTest.xtend b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/src/org/eclipse/gemoc/execution/sequential/javaxdsml/tests/SequentialFsmTest.xtend new file mode 100644 index 000000000..3ae0b421e --- /dev/null +++ b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/src/org/eclipse/gemoc/execution/sequential/javaxdsml/tests/SequentialFsmTest.xtend @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.javaxdsml.tests + +import com.google.inject.Inject +import org.eclipse.core.resources.IProject +import org.eclipse.xtext.junit4.AbstractXtextTests +import org.eclipse.xtext.junit4.InjectWith +import org.eclipse.xtext.junit4.XtextRunner +import org.eclipse.xtext.junit4.ui.util.IResourcesSetupUtil +import org.junit.After +import org.junit.Before +import org.junit.FixMethodOrder +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.MethodSorters +import org.eclipse.gemoc.xdsmlframework.test.lib.WorkspaceTestHelper +import org.eclipse.gemoc.xdsmlframework.test.lib.MelangeUiInjectorProvider + +@RunWith(XtextRunner) +@InjectWith(MelangeUiInjectorProvider) +@FixMethodOrder(MethodSorters::NAME_ASCENDING) +public class SequentialFsmTest extends AbstractXtextTests +{ + @Inject WorkspaceTestHelper helper + IProject melangeProject + IProject melangeProject2 + static final String BASE_FOLDER_NAME = "tests-inputs-gen/SequentialFSM" + static final String BASE_PROJECT_NAME = "org.gemoc.sample.legacyfsm" + static final String PROJECT_NAME = BASE_PROJECT_NAME+".fsm" + static final String MELANGE_FILE = PROJECT_NAME+"/src/org/gemoc/sample/legacyfsm/fsm/FSM.melange" + static final String PROJECT_NAME2 = BASE_PROJECT_NAME+".xsfsm" + static final String MELANGE_FILE2 = PROJECT_NAME2+"/src/org/gemoc/sample/legacyfsm/xsfsm/language/XSFSM.melange" + + @Before + override setUp() { + helper.setTargetPlatform + if (!helper.projectExists(PROJECT_NAME)) { + super.setUp + helper.init + IResourcesSetupUtil::cleanWorkspace + + // try to respect build order in order to ease compilation, this will speed up the test + helper.deployProject(PROJECT_NAME+".model",BASE_FOLDER_NAME+"/"+PROJECT_NAME+".model.zip") + helper.deployProject(PROJECT_NAME+".k3dsa",BASE_FOLDER_NAME+"/"+PROJECT_NAME+".k3dsa.zip") + melangeProject = helper.deployProject(PROJECT_NAME,BASE_FOLDER_NAME+"/"+PROJECT_NAME+".zip") + helper.deployProject(PROJECT_NAME+".design",BASE_FOLDER_NAME+"/"+PROJECT_NAME+".design.zip") + helper.deployProject(PROJECT_NAME+".model.edit",BASE_FOLDER_NAME+"/"+PROJECT_NAME+".model.edit.zip") + helper.deployProject(PROJECT_NAME+".model.editor",BASE_FOLDER_NAME+"/"+PROJECT_NAME+".model.editor.zip") + + + melangeProject2 = helper.deployProject(PROJECT_NAME2,BASE_FOLDER_NAME+"/"+PROJECT_NAME2+".zip") + helper.deployProject(PROJECT_NAME2+".design",BASE_FOLDER_NAME+"/"+PROJECT_NAME2+".design.zip") + + IResourcesSetupUtil::reallyWaitForAutoBuild + helper.cleanAll(MELANGE_FILE) + helper.cleanAll(MELANGE_FILE2) + IResourcesSetupUtil::reallyWaitForAutoBuild + helper.openEditor(MELANGE_FILE) + helper.openEditor(MELANGE_FILE2) + } else { + melangeProject = helper.getProject(PROJECT_NAME) + } + } + + @After + override tearDown() { + // Nope + } + + @Test + def void test01GenerateAllMelange_NoErrorsInWorkspace() { + helper.generateAll(MELANGE_FILE) + helper.generateAll(MELANGE_FILE2) + IResourcesSetupUtil::reallyWaitForAutoBuild + helper.assertNoMarkers + + helper.assertProjectExists(PROJECT_NAME) + helper.assertProjectExists(PROJECT_NAME2) + helper.assertProjectExists(PROJECT_NAME2+".xsfsm") + } + + @Test + def void test03GenerateTrace_NoErrorsInWorkspace() { + helper.generateTrace(MELANGE_FILE2, "XSFSM", PROJECT_NAME2+".trace") + IResourcesSetupUtil::reallyWaitForAutoBuild + helper.assertNoMarkers + + helper.assertProjectExists(PROJECT_NAME2+".trace") + } + +} diff --git a/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/tests-inputs-gen/.gitignore b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/tests-inputs-gen/.gitignore new file mode 100644 index 000000000..133694d08 --- /dev/null +++ b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/tests-inputs-gen/.gitignore @@ -0,0 +1,5 @@ +# ignore all +* +# but .gitignore and readme +!.gitignore +!readme.md diff --git a/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/tests-inputs-gen/readme.md b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/tests-inputs-gen/readme.md new file mode 100644 index 000000000..b6190e792 --- /dev/null +++ b/java_execution/java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests/tests-inputs-gen/readme.md @@ -0,0 +1,9 @@ +This folder contains the tests inputs that'll be used be the tests. +It is generated from other locations using a maven script. + +Use the following command to generate it (and synchronize its content with the real sources) +''' +mvn generate-sources +''' + +Please note that the mvn command supposes that some git repositories exists next to the current one. In particular, it expects a repository "gemoc-studio" diff --git a/java_execution/pom.xml b/java_execution/pom.xml index 6863a0472..6f012368e 100644 --- a/java_execution/pom.xml +++ b/java_execution/pom.xml @@ -1,32 +1,32 @@ 4.0.0 - org.gemoc.execution.sequential.java - org.gemoc.execution.sequential.java.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT pom - org.gemoc - org.gemoc.siriusanimation.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.root + 2.3.0-SNAPSHOT .. - java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.api - java_engine/plugins/org.gemoc.execution.sequential.javaengine - java_xdsml/plugins/org.gemoc.execution.sequential.javaxdsml.ide.ui - java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui + java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.api + java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine + java_xdsml/plugins/org.eclipse.gemoc.execution.sequential.javaxdsml.ide.ui + java_engine/plugins/org.eclipse.gemoc.execution.sequential.javaengine.ui - - releng/org.gemoc.execution.sequential.javaxdsml.feature - releng/org.gemoc.execution.sequential.javaengine.feature - releng/org.gemoc.execution.sequential.javaengine.ui.feature - releng/org.gemoc.execution.sequential.java.repository - + + releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature + releng/org.eclipse.gemoc.execution.sequential.javaengine.feature + releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature + + java_xdsml/tests/org.eclipse.gemoc.execution.sequential.javaxdsml.tests @@ -49,39 +49,9 @@ gemoc-studio_commons on CI p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.gemoc.commons.repository/target/repository/ - - - gemoc-studio_gemoc_commons on CI - p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_gemoc_commons/lastSuccessfulBuild/artifact/gemoc_commons/releng/org.gemoc.gemoc_commons.repository/target/repository/ - - - modeldebugging_trace_commons on CI - p2 - https://ci.inria.fr/gemoc/job/framework_and_trace/lastSuccessfulBuild/artifact/trace/commons/releng/fr.inria.diverse.trace.commons.updatesite/target/repository/ + https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.eclipse.gemoc.commons.repository/target/repository/ - modeldebugging_trace_generator on CI - p2 - https://ci.inria.fr/gemoc/job/framework_and_trace/lastSuccessfulBuild/artifact/trace/generator/releng/org.gemoc.modeldebugging.trace.generator.updatesite/target/repository/ - - - modeldebugging_framework_frameworkcommons on CI - p2 - https://ci.inria.fr/gemoc/job/framework_and_trace/lastSuccessfulBuild/artifact/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/target/repository/ - - - modeldebugging_framework_xdsmlframework on CI - p2 - https://ci.inria.fr/gemoc/job/framework_and_trace/lastSuccessfulBuild/artifact/framework/xdsml_framework/releng/org.gemoc.modeldebugging.xdsmlframework.repository/target/repository/ - - - modeldebugging_framework_executionframework on CI - p2 - https://ci.inria.fr/gemoc/job/framework_and_trace/lastSuccessfulBuild/artifact/framework/execution_framework/releng/org.gemoc.modeldebugging.executionframework.repository/target/repository/ - - modelanimation_siriusmodelanimation on CI p2 http://obeo-siriuslab-nightly.s3-website-eu-west-1.amazonaws.com/SiriusAnimator/master/repository/ diff --git a/framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/.gitignore b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.gitignore similarity index 100% rename from framework/framework_commons/releng/org.gemoc.modeldebugging.framework.commons.repository/.gitignore rename to java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.gitignore diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.project b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.project new file mode 100644 index 000000000..b5d67f24f --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.project @@ -0,0 +1,29 @@ + + + org.eclipse.gemoc.execution.sequential.javaengine.feature + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.FeatureNature + + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.settings/org.eclipse.core.resources.prefs b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..1ba0aed79 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF8 diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.settings/org.eclipse.xtend.core.Xtend.prefs b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.settings/org.eclipse.xtend.core.Xtend.prefs new file mode 100644 index 000000000..9682a4c0a --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/.settings/org.eclipse.xtend.core.Xtend.prefs @@ -0,0 +1,7 @@ +//outlet.DEFAULT_OUTPUT.sourceFolder.src/main/java.directory=xtend-gen +//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend +BuilderConfiguration.is_project_specific=true +eclipse.preferences.version=1 +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/build.properties b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/build.properties new file mode 100644 index 000000000..f6d2f3ebf --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/feature.properties b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/feature.xml b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/feature.xml new file mode 100644 index 000000000..7008e161d --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/feature.xml @@ -0,0 +1,50 @@ + + + + + + + List of plugins that are part of the Java Execution Engine (runtime only) + + + + Copyright (c) 2012, 2017 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 + + + + %license + + + + + + + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/gemocstudio32.png b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/gemocstudio32.png differ diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/license.html b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/pom.xml b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/pom.xml new file mode 100644 index 000000000..290b88c49 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.feature/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + ../../pom.xml + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.execution.sequential.javaengine.feature + eclipse-feature + + \ No newline at end of file diff --git a/framework/xdsml_framework/releng/org.gemoc.modeldebugging.xdsmlframework.feature/.gitignore b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.gitignore similarity index 100% rename from framework/xdsml_framework/releng/org.gemoc.modeldebugging.xdsmlframework.feature/.gitignore rename to java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.gitignore diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.project b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.project new file mode 100644 index 000000000..86d63c383 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.project @@ -0,0 +1,29 @@ + + + org.eclipse.gemoc.execution.sequential.javaengine.ui.feature + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.FeatureNature + + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.settings/org.eclipse.core.resources.prefs b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..1ba0aed79 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF8 diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.settings/org.eclipse.xtend.core.Xtend.prefs b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.settings/org.eclipse.xtend.core.Xtend.prefs new file mode 100644 index 000000000..9682a4c0a --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/.settings/org.eclipse.xtend.core.Xtend.prefs @@ -0,0 +1,7 @@ +//outlet.DEFAULT_OUTPUT.sourceFolder.src/main/java.directory=xtend-gen +//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend +BuilderConfiguration.is_project_specific=true +eclipse.preferences.version=1 +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/build.properties b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/build.properties new file mode 100644 index 000000000..f6d2f3ebf --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/feature.properties b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/feature.xml b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/feature.xml new file mode 100644 index 000000000..d30135473 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/feature.xml @@ -0,0 +1,47 @@ + + + + + + + List of plugins that are part of the Java Execution Engine (UI only) + + + + Copyright (c) 2012, 2017 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 + + + + %license + + + + + + + + + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/gemocstudio32.png b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/gemocstudio32.png differ diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/license.html b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/pom.xml b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/pom.xml new file mode 100644 index 000000000..ef4760d93 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaengine.ui.feature/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + ../../pom.xml + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.execution.sequential.javaengine.ui.feature + eclipse-feature + + \ No newline at end of file diff --git a/framework/xdsml_framework/releng/org.gemoc.modeldebugging.xdsmlframework.repository/.gitignore b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.gitignore similarity index 100% rename from framework/xdsml_framework/releng/org.gemoc.modeldebugging.xdsmlframework.repository/.gitignore rename to java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.gitignore diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.project b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.project new file mode 100644 index 000000000..326c71c6a --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.project @@ -0,0 +1,29 @@ + + + org.eclipse.gemoc.execution.sequential.javaxdsml.feature + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.FeatureNature + + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.settings/org.eclipse.core.resources.prefs b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..1ba0aed79 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF8 diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.settings/org.eclipse.xtend.core.Xtend.prefs b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.settings/org.eclipse.xtend.core.Xtend.prefs new file mode 100644 index 000000000..9682a4c0a --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/.settings/org.eclipse.xtend.core.Xtend.prefs @@ -0,0 +1,7 @@ +//outlet.DEFAULT_OUTPUT.sourceFolder.src/main/java.directory=xtend-gen +//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend +BuilderConfiguration.is_project_specific=true +eclipse.preferences.version=1 +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/build.properties b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/build.properties new file mode 100644 index 000000000..f6d2f3ebf --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/feature.properties b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/feature.xml b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/feature.xml new file mode 100644 index 000000000..27019b1f9 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/feature.xml @@ -0,0 +1,64 @@ + + + + + + + List of plugins that are part of the Java Execution Engine + + + + Copyright (c) 2012, 2017 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 + + + + %license + + + + + + + + + + + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/gemocstudio32.png b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/gemocstudio32.png differ diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/license.html b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/pom.xml b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/pom.xml new file mode 100644 index 000000000..d8eac65c2 --- /dev/null +++ b/java_execution/releng/org.eclipse.gemoc.execution.sequential.javaxdsml.feature/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + ../../pom.xml + org.eclipse.gemoc.execution.sequential.java + org.eclipse.gemoc.execution.sequential.java.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.execution.sequential.javaxdsml.feature + eclipse-feature + + \ No newline at end of file diff --git a/java_execution/releng/org.gemoc.execution.sequential.java.repository/.gitignore b/java_execution/releng/org.gemoc.execution.sequential.java.repository/.gitignore deleted file mode 100644 index ea8c4bf7f..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.java.repository/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/java_execution/releng/org.gemoc.execution.sequential.java.repository/category.xml b/java_execution/releng/org.gemoc.execution.sequential.java.repository/category.xml deleted file mode 100644 index aa601bd31..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.java.repository/category.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/java_execution/releng/org.gemoc.execution.sequential.java.repository/pom.xml b/java_execution/releng/org.gemoc.execution.sequential.java.repository/pom.xml deleted file mode 100644 index 55942d31b..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.java.repository/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../../pom.xml - org.gemoc.execution.sequential.java - 0.1.0-SNAPSHOT - org.gemoc.execution.sequential.java.root - - - org.gemoc.execution.sequential.java.repository - eclipse-repository - - \ No newline at end of file diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/.gitignore b/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/.gitignore deleted file mode 100644 index ea8c4bf7f..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/build.properties b/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/build.properties deleted file mode 100644 index 25f8b7f02..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = feature.xml,\ - . diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/feature.xml b/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/feature.xml deleted file mode 100644 index fc778596f..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/feature.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - List of plugins that are part of the Java Execution Engine (runtime only) - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/pom.xml b/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/pom.xml deleted file mode 100644 index 505c7216a..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaengine.feature/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../../pom.xml - org.gemoc.execution.sequential.java - org.gemoc.execution.sequential.java.root - 0.1.0-SNAPSHOT - - - org.gemoc.execution.sequential.javaengine.feature - eclipse-feature - - \ No newline at end of file diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/.gitignore b/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/.gitignore deleted file mode 100644 index ea8c4bf7f..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/build.properties b/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/build.properties deleted file mode 100644 index 25f8b7f02..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = feature.xml,\ - . diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/feature.xml b/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/feature.xml deleted file mode 100644 index 48d9fd8ba..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/feature.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - List of plugins that are part of the Java Execution Engine (UI only) - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/pom.xml b/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/pom.xml deleted file mode 100644 index 91afc58c2..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaengine.ui.feature/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../../pom.xml - org.gemoc.execution.sequential.java - org.gemoc.execution.sequential.java.root - 0.1.0-SNAPSHOT - - - org.gemoc.execution.sequential.javaengine.ui.feature - eclipse-feature - - \ No newline at end of file diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/.gitignore b/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/.gitignore deleted file mode 100644 index ea8c4bf7f..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/build.properties b/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/build.properties deleted file mode 100644 index 25f8b7f02..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = feature.xml,\ - . diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/feature.xml b/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/feature.xml deleted file mode 100644 index e8f05de9a..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/feature.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - List of plugins that are part of the Java Execution Engine - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - - - diff --git a/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/pom.xml b/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/pom.xml deleted file mode 100644 index b3771927a..000000000 --- a/java_execution/releng/org.gemoc.execution.sequential.javaxdsml.feature/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../../pom.xml - org.gemoc.execution.sequential.java - org.gemoc.execution.sequential.java.root - 0.1.0-SNAPSHOT - - - org.gemoc.execution.sequential.javaxdsml.feature - eclipse-feature - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6b05f7271..68df2539b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,32 +1,44 @@ 4.0.0 - org.gemoc - org.gemoc.siriusanimation.root - 0.1.0-SNAPSHOT + + 3.0 + + + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.root + 2.3.0-SNAPSHOT + + + + Eclipse Public License v1.0 + + 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.htm + + + + pom + - 0.25.0 - 2.9.1 + 0.26.0 + 2.10.0 UTF8 - scm:git:https://github.com/gemoc/modelanimation.git + scm:git:https://github.com/SiriusLab/ModelDebugging.git + - - - - - + - Mars release + Neon release p2 - http://download.eclipse.org/releases/mars/201602261000 + http://download.eclipse.org/releases/neon diverse-commons @@ -43,11 +55,16 @@ p2 http://melange-lang.org/updatesite/ - - - - - + + elk + p2 + http://download.eclipse.org/elk/updates/releases/0.1.0/ + + + Sirius + p2 + http://download.eclipse.org/sirius/updates/releases/4.1.2/neon/ + @@ -73,6 +90,11 @@ + + app4mc + p2 + http://download.eclipse.org/app4mc/updatesites/releases/0.8.0/ + @@ -97,14 +119,14 @@ com.oracle javafx - 2.2.0-SNAPSHOT + 2.3.0-SNAPSHOT ${java.home}/lib/jfxrt.jar system com.oracle javafxswt - 2.2.0-SNAPSHOTT + 2.3.0-SNAPSHOT ${java.home}/lib/jfxswt.jar system @@ -234,6 +256,9 @@ compile + xtend-install-debug-info + testCompile + xtend-test-install-debug-info xtend-gen @@ -278,7 +303,21 @@ + + + + maven-clean-plugin + 3.0.0 + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + + @@ -314,6 +353,49 @@ java_execution/pom.xml + + repository + + true + + + releng/org.eclipse.gemoc.modeldebugging.repository/pom.xml + + + + + quality + + false + + + + jacoco + reuseReports + + ./target/jacoco.exec + + + + + org.jacoco + jacoco-maven-plugin + 0.5.6.201201232323 + + + + prepare-agent + + + true + ${sonar.jacoco.reportPath} + + + + + + + @@ -327,7 +409,7 @@ ${xtend.version} - + diff --git a/prepare-deploy-local-dir.sh b/prepare-deploy-local-dir.sh index 0e7870742..7d4fad460 100644 --- a/prepare-deploy-local-dir.sh +++ b/prepare-deploy-local-dir.sh @@ -1,11 +1,9 @@ #! /usr/bin/env sh -UPDATE_SITE_DIR=simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/target/ +UPDATE_SITE_DIR=$TRAVIS_BUILD_DIR/releng/org.eclipse.gemoc.modeldebugging.repository/target DEPLOY_LOCAL_DIR=$1 echo "Prepare deploy local dir = ${DEPLOY_LOCAL_DIR}" # Create nightly folder -mkdir $DEPLOY_LOCAL_DIR -# Rename the zipped update site to nightly -- mv $UPDATE_SITE_DIR/fr.obeo.dsl.debug.repository-*-SNAPSHOT.zip $UPDATE_SITE_DIR/fr.obeo.dsl.debug.repository-nightly.zip +mkdir -p $DEPLOY_LOCAL_DIR # Copy update-site to deploy local dir cp -r $UPDATE_SITE_DIR/repository $DEPLOY_LOCAL_DIR cp -r $UPDATE_SITE_DIR/*.zip $DEPLOY_LOCAL_DIR diff --git a/releng/gemoc.sonar/pom.xml b/releng/gemoc.sonar/pom.xml new file mode 100644 index 000000000..d5018e5d8 --- /dev/null +++ b/releng/gemoc.sonar/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + gemoc + gemoc + pom + + ../../pom.xml + + GEMOC ModelDebugging + 2.3.0-SNAPSHOT + diff --git a/releng/org.eclipse.gemoc.modeldebugging.repository/.project b/releng/org.eclipse.gemoc.modeldebugging.repository/.project new file mode 100644 index 000000000..a30f0c863 --- /dev/null +++ b/releng/org.eclipse.gemoc.modeldebugging.repository/.project @@ -0,0 +1,17 @@ + + + org.eclipse.gemoc.modeldebugging.repository + + + + + + org.eclipse.pde.UpdateSiteBuilder + + + + + + org.eclipse.pde.UpdateSiteNature + + diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/about.html b/releng/org.eclipse.gemoc.modeldebugging.repository/about.html similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/about.html rename to releng/org.eclipse.gemoc.modeldebugging.repository/about.html diff --git a/releng/org.eclipse.gemoc.modeldebugging.repository/category.xml b/releng/org.eclipse.gemoc.modeldebugging.repository/category.xml new file mode 100644 index 000000000..ec37c01ed --- /dev/null +++ b/releng/org.eclipse.gemoc.modeldebugging.repository/category.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Category with all features. + + + + + Category with all sources. + + + + + + diff --git a/releng/org.eclipse.gemoc.modeldebugging.repository/pom.xml b/releng/org.eclipse.gemoc.modeldebugging.repository/pom.xml new file mode 100644 index 000000000..1b95c25ea --- /dev/null +++ b/releng/org.eclipse.gemoc.modeldebugging.repository/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.eclipse.gemoc.modeldebugging.root + org.eclipse.gemoc + 2.3.0-SNAPSHOT + ../../pom.xml + + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.repository + 2.3.0-SNAPSHOT + eclipse-repository + + + + + org.eclipse.tycho + tycho-p2-repository-plugin + ${tycho-version} + + false + true + true + + + + + + diff --git a/simulationmodelanimation/.project b/simulationmodelanimation/.project index 2d54e5b93..483b821f4 100644 --- a/simulationmodelanimation/.project +++ b/simulationmodelanimation/.project @@ -1,6 +1,6 @@ - fr.obeo.dsl.debug.parent + org.eclipse.gemoc.dsl.debug.parent diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.project b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.project deleted file mode 100644 index 680ba8dad..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.obeo.dsl.debug.edit - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - net.sf.eclipsecs.core.CheckstyleBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - net.sf.eclipsecs.core.CheckstyleNature - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/META-INF/MANIFEST.MF deleted file mode 100644 index 30ec5940e..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.obeo.dsl.debug.edit;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Activator: fr.obeo.dsl.debug.provider.DebugEditPlugin$Implementation -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: fr.obeo.dsl.debug.provider -Require-Bundle: org.eclipse.core.runtime, - fr.obeo.dsl.debug;visibility:=reexport, - org.eclipse.emf.edit;visibility:=reexport -Bundle-ActivationPolicy: lazy diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/build.properties b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/build.properties deleted file mode 100644 index 012e63e1a..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/build.properties +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### - -bin.includes = .,\ - icons/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties -jars.compile.order = . -source.. = src-gen/,\ - src/ -output.. = bin/ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/plugin.properties b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/plugin.properties deleted file mode 100644 index e20854cbc..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/plugin.properties +++ /dev/null @@ -1,98 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### - -pluginName = Debug Model Edit Support -providerName = Obeo - -_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_DebugTarget_type = Target -_UI_Thread_type = Thread -_UI_StackFrame_type = Stack Frame -_UI_Variable_type = Variable -_UI_CurrentSession_type = Current Session -_UI_BreakPoint_type = Break Point -_UI_RegisterGroup_type = Register Group -_UI_Register_type = Register -_UI_Unknown_type = Object - -_UI_Unknown_datatype= Value - -_UI_DebugTarget_name_feature = Name -_UI_DebugTarget_state_feature = State -_UI_DebugTarget_threads_feature = Threads -_UI_DebugTarget_context_feature = Context -_UI_Thread_bottomStackFrame_feature = Bottom Stack Frame -_UI_Thread_topStackFrame_feature = Top Stack Frame -_UI_Thread_name_feature = Name -_UI_Thread_parent_feature = Parent -_UI_Thread_breakpoints_feature = Breakpoints -_UI_Thread_context_feature = Context -_UI_StackFrame_variables_feature = Variables -_UI_StackFrame_childFrame_feature = Child Frame -_UI_StackFrame_state_feature = State -_UI_StackFrame_parent_feature = Parent -_UI_StackFrame_name_feature = Name -_UI_StackFrame_currentInstruction_feature = Current Instruction -_UI_StackFrame_parentFrame_feature = Parent Frame -_UI_StackFrame_registerGroups_feature = Register Groups -_UI_Variable_name_feature = Name -_UI_Variable_elements_feature = Elements -_UI_CurrentSession_debugTargets_feature = Debug Targets -_UI_BreakPoint_instruction_feature = Instruction -_UI_RegisterGroup_name_feature = Name -_UI_RegisterGroup_registers_feature = Registers -_UI_Register_registerGroup_feature = Register Group -_UI_Unknown_feature = Unspecified - -_UI_DebugTargetState_NOT_STARTED_literal = NOT_STARTED -_UI_DebugTargetState_RUNNING_literal = RUNNING -_UI_DebugTargetState_SUSPENDED_literal = SUSPENDED -_UI_DebugTargetState_DISCONNECTED_literal = DISCONNECTED -_UI_DebugTargetState_TERMINATED_literal = TERMINATED -_UI_StackFrameState_NOT_STARTED_literal = NOT_STARTED -_UI_StackFrameState_RUNNING_literal = RUNNING -_UI_StackFrameState_STEPPING_literal = STEPPING -_UI_StackFrameState_SUSPENDED_literal = SUSPENDED -_UI_StackFrameState_TERMINATED_literal = TERMINATED -_UI_Thread_debugTarget_feature = Debug Target -_UI_StackFrame_thread_feature = Thread -_UI_Thread_state_feature = State -_UI_State_RUNNING_literal = RUNNING -_UI_State_STEPPING_literal = STEPPING -_UI_State_SUSPENDED_literal = SUSPENDED -_UI_State_TERMINATED_literal = TERMINATED -_UI_DebugTargetState_TERMINATING_literal = TERMINATING -_UI_DebugTargetState_RUN_ON_START_literal = RUN_ON_START -_UI_DebugTargetState_SUSPEND_ON_START_literal = SUSPEND_ON_START -_UI_DebugTargetState_CONNECTED_literal = CONNECTED -_UI_State_TERMINATING_literal = TERMINATING -_UI_State_STEPPING_OVER_literal = STEPPING_OVER -_UI_State_STEPPING_INTO_literal = STEPPING_INTO -_UI_State_STEPPING_RETURN_literal = STEPPING_RETURN -_UI_State_SUSPENDING_literal = SUSPENDING -_UI_StackFrame_canStepIntoCurrentInstruction_feature = Can Step Into Current Instruction -_UI_Variable_valueChanged_feature = Value Changed -_UI_Thread_priority_feature = Priority -_UI_Variable_frame_feature = Frame -_UI_Contextual_type = Contextual -_UI_Contextual_context_feature = Context -_UI_Variable_values_feature = Values -_UI_Variable_declarationType_feature = Declaration Type -_UI_Variable_value_feature = Value -_UI_Variable_supportModifications_feature = Support Modifications diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/plugin.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/plugin.xml deleted file mode 100644 index c7b0c4814..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/plugin.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/pom.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/pom.xml deleted file mode 100644 index b2dfd9c45..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.edit - 1.0.0-SNAPSHOT - eclipse-plugin - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.project b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.project deleted file mode 100644 index b75a4a206..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.obeo.dsl.debug.ide.sirius.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - net.sf.eclipsecs.core.CheckstyleBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - net.sf.eclipsecs.core.CheckstyleNature - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 968c769e2..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,27 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.obeo.dsl.debug.ide.sirius.ui;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Vendor: %providerName -Require-Bundle: org.eclipse.debug.ui;bundle-version="3.7.0", - org.eclipse.ui;bundle-version="3.7.0", - org.eclipse.emf.edit.ui;bundle-version="2.7.0", - fr.obeo.dsl.debug.edit;bundle-version="1.0.0", - fr.obeo.dsl.debug.ide;bundle-version="1.0.0", - org.eclipse.core.runtime;bundle-version="3.7.0", - org.eclipse.ui.ide;bundle-version="3.7.0", - fr.obeo.dsl.debug.ide.ui;bundle-version="1.0.0", - org.eclipse.sirius;bundle-version="2.0.0", - org.eclipse.sirius.ui;bundle-version="2.0.0", - org.eclipse.sirius.diagram;bundle-version="2.0.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0", - org.eclipse.sirius.diagram.ui, - com.google.guava;bundle-version="15.0.0" -Bundle-ActivationPolicy: lazy -Bundle-Activator: fr.obeo.dsl.debug.ide.sirius.ui.DebugSiriusIdeUiPlugin$Implementation -Export-Package: fr.obeo.dsl.debug.ide.sirius.ui, - fr.obeo.dsl.debug.ide.sirius.ui.action, - fr.obeo.dsl.debug.ide.sirius.ui.launch, - fr.obeo.dsl.debug.ide.sirius.ui.services diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/pom.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/pom.xml deleted file mode 100644 index d58894df8..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.ide.sirius.ui - 1.0.0-SNAPSHOT - eclipse-plugin - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DSLDebugModelPresentation.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DSLDebugModelPresentation.java deleted file mode 100644 index 9d0793fed..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DSLDebugModelPresentation.java +++ /dev/null @@ -1,186 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui; - -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter; -import fr.obeo.dsl.debug.ide.adapter.DSLStackFrameAdapter; -import fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; - -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.model.IThread; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.sirius.business.api.session.Session; -import org.eclipse.sirius.business.api.session.SessionManager; -import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; -import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; -import org.eclipse.sirius.viewpoint.DRepresentation; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; - -/** - * The {@link org.eclipse.debug.ui.IDebugModelPresentation IDebugModelPresentation} for the DSL debug model. - * - * @author Yvan Lussaud - */ -public class DSLDebugModelPresentation extends fr.obeo.dsl.debug.ide.ui.DSLDebugModelPresentation { - - // FIXME this code is ugly but should work... the right way to do this is to add - // DialectUIManager.getEditorInput(...) and DialectUIManager.getEditorID(...) - // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=426431 - - /** - * The opened {@link IEditorPart}. - */ - IEditorPart editor; - - @Override - public IEditorInput getEditorInput(Object element) { - final IEditorInput res; - - final URI instructionURI; - if (element instanceof EObject) { - instructionURI = EcoreUtil.getURI((EObject)element); - } else if (element instanceof DSLBreakpoint) { - instructionURI = ((DSLBreakpoint)element).getURI(); - } else { - instructionURI = null; - } - - editor = null; - if (instructionURI != null) { - - final Session session; - final Session inSession; - if (element instanceof EObject) { - inSession = SessionManager.INSTANCE.getSession((EObject)element); - } else { - inSession = null; - } - if (inSession != null) { - session = inSession; - } else { - List sessions = SiriusEditorUtils.getSessions(instructionURI); - if (sessions.size() > 1) { - session = selectSession(sessions); - } else if (sessions.size() == 1) { - session = sessions.get(0); - } else { - session = null; - } - } - - if (session != null) { - List representations = SiriusEditorUtils.getRepresentations(session, - instructionURI); - - final DRepresentation representation; - if (representations.size() > 1) { - representation = selectRepresentation(representations); - } else if (representations.size() == 1) { - representation = representations.get(0); - } else { - representation = null; - } - - if (representation != null) { - editor = DialectUIManager.INSTANCE.openEditor(session, representation, - new NullProgressMonitor()); - res = editor.getEditorInput(); - } else { - res = super.getEditorInput(instructionURI); - } - } else { - res = super.getEditorInput(instructionURI); - } - } else { - return null; - } - - return res; - } - - /** - * Selects a {@link Session} from the given {@link List} of {@link Session}. - * - * @param sessions - * the {@link List} of {@link Session} - * @return a selected {@link Session} from the given {@link List} of {@link Session} - */ - protected Session selectSession(List sessions) { - return sessions.get(0); - } - - /** - * Selects a {@link DRepresentation} from the given {@link List} of {@link DRepresentation}. - * - * @param representations - * the {@link List} of {@link DRepresentation} - * @return a selected {@link DRepresentation} from the given {@link List} of {@link DRepresentation} - */ - protected DRepresentation selectRepresentation(List representations) { - return representations.get(0); - } - - @Override - public String getEditorId(IEditorInput input, Object element) { - final String res; - - if (editor != null) { - res = editor.getEditorSite().getId(); - } else { - res = super.getEditorId(input, element); - } - - return res; - } - - @Override - public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) { - if (frame instanceof DSLStackFrameAdapter) { - changeCurrentStackFrame(frame); - if (editorPart instanceof DialectEditor) { - final EObject instruction = ((DSLStackFrameAdapter)frame).getCurrentInstruction(); - SiriusEditorUtils.showInstruction((DialectEditor)editorPart, instruction); - } else { - super.addAnnotations(editorPart, frame); - } - } - - return true; - } - - /** - * Changes the current {@link IStackFrame}. - * - * @param frame - * the selected {@link IStackFrame} - */ - protected void changeCurrentStackFrame(IStackFrame frame) { - final IDebugTarget debugTarget = frame.getDebugTarget(); - for (IDSLCurrentInstructionListener listener : ((DSLDebugTargetAdapter)debugTarget) - .getCurrentInstructionListeners()) { - listener.setCurrentFrame(frame.getModelIdentifier(), ((DSLStackFrameAdapter)frame).getHost()); - } - } - - @Override - public void removeAnnotations(IEditorPart editorPart, IThread thread) { - // nothing to do here - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DSLToggleBreakpointsUtils.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DSLToggleBreakpointsUtils.java deleted file mode 100644 index d950ba231..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DSLToggleBreakpointsUtils.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui; - -import fr.obeo.dsl.debug.ide.DSLBreakpoint; - -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.sirius.diagram.ui.edit.api.part.IDDiagramEditPart; -import org.eclipse.sirius.diagram.ui.edit.api.part.IDiagramElementEditPart; -import org.eclipse.sirius.ui.business.api.dialect.marker.TraceabilityMarkerNavigationProvider; -import org.eclipse.sirius.viewpoint.DRepresentation; -import org.eclipse.sirius.viewpoint.DSemanticDecorator; - -//import org.eclipse.sirius.diagram.edit.api.part.IDDiagramEditPart; - -/** - * Utility class for breakpoint {@link DSLBreakpoint} toggling. - * - * @author Yvan Lussaud - */ -public class DSLToggleBreakpointsUtils extends fr.obeo.dsl.debug.ide.ui.DSLToggleBreakpointsUtils { - - /** - * The annotation ID for debug {@link DRepresentation}. - */ - public static final String ANNOTATION_ID = "fr.obeo.dsl.debug.ide.sirius.ui.breakpointAnnotation"; - - /** - * Constructor. - * - * @param identifier - * the debug model identifier - */ - public DSLToggleBreakpointsUtils(String identifier) { - super(identifier); - } - - @Override - protected EObject getInstruction(Object selected) { - final EObject res; - - if (selected instanceof DSemanticDecorator) { - res = super.getInstruction(((DSemanticDecorator)selected).getTarget()); - } else if (selected instanceof IDiagramElementEditPart) { - res = super.getInstruction(((IDiagramElementEditPart)selected).resolveTargetSemanticElement()); - } else if (selected instanceof IDDiagramEditPart) { - res = ((DSemanticDecorator)((IDDiagramEditPart)selected).resolveSemanticElement()).getTarget(); - } else { - res = super.getInstruction(selected); - } - - return res; - } - - @Override - protected DSLBreakpoint createBreakpoint(Object selected, EObject instruction) throws CoreException { - final DSLBreakpoint res = super.createBreakpoint(selected, instruction); - - final DSemanticDecorator decorator; - if (selected instanceof DSemanticDecorator) { - decorator = (DSemanticDecorator)selected; - } else if (selected instanceof IDiagramElementEditPart) { - decorator = ((IDiagramElementEditPart)selected).resolveDiagramElement(); - } else if (selected instanceof IDDiagramEditPart) { - decorator = (DSemanticDecorator)((IDDiagramEditPart)selected).resolveSemanticElement(); - } else { - decorator = null; - } - - if (decorator != null) { - final DRepresentation representation = getDRepresentation(decorator); - - if (representation != null) { - final IMarker marker = res.getMarker(); - marker.setAttribute(TraceabilityMarkerNavigationProvider.INTERNAL_REPRESENTATION_URI, - EcoreUtil.getURI(representation).toString()); - marker.setAttribute(TraceabilityMarkerNavigationProvider.REPRESENTATION_ELEMENT_ID, - representation.eResource().getURIFragment(decorator).toString()); - marker.setAttribute(TraceabilityMarkerNavigationProvider.REPRESENTATION_URI, EcoreUtil - .getURI(representation).toString()); - marker.setAttribute("traceab_viewpoint_ghost", "active"); - } - } - - return res; - } - - /** - * Gets the {@link DRepresentation} from the given {@link DSemanticDecorator}. - * - * @param decorator - * the {@link DSemanticDecorator} - * @return the {@link DRepresentation} from the given {@link DSemanticDecorator} - */ - protected DRepresentation getDRepresentation(DSemanticDecorator decorator) { - DRepresentation res = null; - EObject current = decorator; - while (current != null) { - if (current instanceof DRepresentation) { - res = (DRepresentation)current; - break; - } else { - current = current.eContainer(); - } - } - - return res; - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DebugSiriusIdeUiPlugin.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DebugSiriusIdeUiPlugin.java deleted file mode 100644 index 4526c193c..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/DebugSiriusIdeUiPlugin.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui; - -import fr.obeo.dsl.debug.ide.sirius.ui.services.AbstractDSLDebuggerServices; - -import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.util.ResourceLocator; -import org.osgi.framework.BundleContext; - -/** - * This is the central singleton for the Debug IDE UI plug-in. - * - * @author Yvan Lussaud - */ -public final class DebugSiriusIdeUiPlugin extends EMFPlugin { - - /** - * The plug-in identifier. - */ - public static final String ID = "fr.obeo.dsl.debug.ide.sirius.ui"; - - /** - * Keep track of the singleton. - */ - public static final DebugSiriusIdeUiPlugin INSTANCE = new DebugSiriusIdeUiPlugin(); - - /** - * Keep track of the singleton. - */ - private static Implementation plugin; - - /** - * Create the instance. - */ - public DebugSiriusIdeUiPlugin() { - super(new ResourceLocator[] {}); - } - - /** - * Returns the singleton instance of the Eclipse plug-in. - * - * @return the singleton instance. - */ - @Override - public ResourceLocator getPluginResourceLocator() { - return plugin; - } - - /** - * Returns the singleton instance of the Eclipse plug-in. - * - * @return the singleton instance. - */ - public static Implementation getPlugin() { - return plugin; - } - - /** - * The actual implementation of the Eclipse Plug-in. - */ - public static class Implementation extends EclipsePlugin { - /** - * Creates an instance. - */ - public Implementation() { - super(); - - // Remember the static instance. - // - plugin = this; - } - - @Override - public void start(BundleContext context) throws Exception { - AbstractDSLDebuggerServices.LISTENER.install(); - super.start(context); - } - - @Override - public void stop(BundleContext context) throws Exception { - AbstractDSLDebuggerServices.LISTENER.uninstall(); - super.stop(context); - } - - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java deleted file mode 100644 index d42699398..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui.launch; - -import fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; -import fr.obeo.dsl.debug.ide.sirius.ui.services.AbstractDSLDebuggerServices; -import fr.obeo.dsl.debug.ide.ui.launch.DSLLaunchConfigurationTab; - -import java.util.Arrays; -import java.util.List; - -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.sirius.business.api.helper.SiriusUtil; -import org.eclipse.sirius.business.api.session.Session; -import org.eclipse.sirius.business.api.session.SessionManager; -import org.eclipse.ui.PlatformUI; - -/** - * A Sirius implementation of {@link fr.obeo.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate - * AbstractDSLLaunchConfigurationDelegate} with {@link org.eclipse.debug.ui.ILaunchShortcut ILaunchShortcut} - * support. - * - * @author Yvan Lussaud - */ -public abstract class AbstractDSLLaunchConfigurationDelegateUI extends fr.obeo.dsl.debug.ide.ui.launch.AbstractDSLLaunchConfigurationDelegateUI { - - /** - * The Sirius {@link org.eclipse.emf.ecore.resource.Resource Resource} - * {@link org.eclipse.emf.ecore.resource.Resource#getURI() URI}. - */ - public static final String SIRIUS_RESOURCE_URI = SiriusUtil.SESSION_RESOURCE_EXTENSION + RESOURCE_URI; - - @Override - protected ILaunchConfiguration[] createLaunchConfiguration(IResource file, EObject firstInstruction, - String mode) throws CoreException { - final ILaunchConfiguration[] res; - if (SiriusUtil.SESSION_RESOURCE_EXTENSION.equals(file.getFileExtension())) { - final IResource semanticFile; - if (firstInstruction != null) { - semanticFile = getLaunchableResource(new StructuredSelection(firstInstruction)); - res = super.createLaunchConfiguration(semanticFile, firstInstruction, mode); - } else { - final Session session = SessionManager.INSTANCE.getSession(URI.createPlatformResourceURI(file - .getFullPath().toString(), true), new NullProgressMonitor()); - session.getSemanticResources(); - // prompt the selection of an instruction from the Session EResources - EObject selectedInstruction = DSLLaunchConfigurationTab.openFirstInstructionSelection( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), session - .getTransactionalEditingDomain().getResourceSet()); - if (selectedInstruction != null) { - semanticFile = getLaunchableResource(new StructuredSelection(selectedInstruction)); - res = super.createLaunchConfiguration(semanticFile, selectedInstruction, mode); - } else { - // TODO we have to few information to create the launch configuration prompt the user for - // aird + first instruction ? - semanticFile = null; - res = super.createLaunchConfiguration(file, firstInstruction, mode); - } - } - for (ILaunchConfiguration config : res) { - if (config instanceof ILaunchConfigurationWorkingCopy) { - ((ILaunchConfigurationWorkingCopy)config).setAttribute(SIRIUS_RESOURCE_URI, file - .getFullPath().toString()); - if (semanticFile != null) { - IResource[] resources = config.getMappedResources(); - resources = Arrays.copyOf(resources, resources.length + 1); - resources[resources.length - 1] = file; - ((ILaunchConfigurationWorkingCopy)config).setMappedResources(resources); - } - ((ILaunchConfigurationWorkingCopy)config).doSave(); - } - } - } else { - // TODO? assume the file is the first instruction resource - res = super.createLaunchConfiguration(file, firstInstruction, mode); - } - return res; - } - - @Override - protected List getCurrentInstructionListeners() { - final List res = super.getCurrentInstructionListeners(); - res.add(AbstractDSLDebuggerServices.LISTENER); - return res; - } - - // @Override - // protected void launch(EObject firstInstruction, ILaunchConfiguration configuration, String mode, - // ILaunch launch, IProgressMonitor monitor) throws CoreException { - // final URI sessionResourceURI = URI.createPlatformResourceURI(configuration.getAttribute( - // SIRIUS_RESOURCE_URI, ""), true); - // super.launch(firstInstruction, configuration, mode, launch, monitor); - // } -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/launch/DSLLaunchConfigurationTab.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/launch/DSLLaunchConfigurationTab.java deleted file mode 100644 index cbce55ad3..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/launch/DSLLaunchConfigurationTab.java +++ /dev/null @@ -1,196 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui.launch; - -import fr.obeo.dsl.debug.ide.Activator; -import fr.obeo.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; -import fr.obeo.dsl.debug.ide.ui.launch.FilteredFileContentProvider; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Path; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.common.util.WrappedException; -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.jface.window.Window; -import org.eclipse.sirius.business.api.helper.SiriusUtil; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; -import org.eclipse.ui.model.WorkbenchLabelProvider; - -/** - * A Sirius implementation of {@link fr.obeo.dsl.debug.ide.ui.launch.DSLLaunchConfigurationTab - * DSLLaunchConfigurationTab}. - * - * @author Yvan Lussaud - */ -public class DSLLaunchConfigurationTab extends fr.obeo.dsl.debug.ide.ui.launch.DSLLaunchConfigurationTab { - - /** - * The {@link Text} used for the {@link AbstractDSLLaunchConfigurationDelegateUI#SIRIUS_RESOURCE_URI}. - */ - private Text siriusResourceURIText; - - /** - * Constructor. - * - * @param extensions - * supported file extensions - */ - public DSLLaunchConfigurationTab(String[] extensions) { - super(extensions); - } - - @Override - public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { - super.setDefaults(configuration); - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, ""); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) - */ - public void initializeFrom(final ILaunchConfiguration configuration) { - super.initializeFrom(configuration); - disableUpdate = true; - - siriusResourceURIText.setText(""); - - try { - siriusResourceURIText.setText(configuration.getAttribute( - AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, "")); - } catch (CoreException e) { - Activator.getDefault().error(e); - } - - disableUpdate = false; - } - - @Override - public void performApply(ILaunchConfigurationWorkingCopy configuration) { - super.performApply(configuration); - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, - siriusResourceURIText.getText()); - } - - @Override - public boolean isValid(ILaunchConfiguration launchConfig) { - boolean res = super.isValid(launchConfig); - String errorMessage = null; - - try { - if (res) { - String siriusResourceURI = launchConfig.getAttribute( - AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, ""); - IFile resourceFile = ResourcesPlugin.getWorkspace().getRoot().getFile( - new Path(siriusResourceURI)); - Resource resource = null; - if (resourceFile.exists()) { - final ResourceSet rs = new ResourceSetImpl(); - try { - resource = rs.getResource(URI.createPlatformResourceURI(siriusResourceURI, true), - true); - } catch (WrappedException e) { - errorMessage = "Sirius session model can't be loaded: " - + ((WrappedException)e).exception().getLocalizedMessage() + "."; - } - } - res = resource != null; - setErrorMessage(errorMessage); - } - } catch (IllegalArgumentException e) { - setErrorMessage("Invalid model file selected."); - } catch (CoreException e) { - setErrorMessage("Invalid model file selected."); - } - - return res; - } - - @Override - public boolean canSave() { - return super.canSave() && (!siriusResourceURIText.getText().isEmpty()); - } - - @Override - public void createControl(final Composite parent) { - super.createControl(parent); - Composite topControl = new Composite(parent, SWT.NONE); - topControl.setLayout(new GridLayout(1, false)); - - final Group mgroup = new Group(topControl, SWT.NONE); - mgroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); - mgroup.setText("Model"); - mgroup.setLayout(new GridLayout(2, false)); - - siriusResourceURIText = new Text(mgroup, SWT.BORDER); - siriusResourceURIText.addModifyListener(new ModifyListener() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) - */ - public void modifyText(final ModifyEvent e) { - if (!disableUpdate) { - updateLaunchConfigurationDialog(); - } - } - }); - siriusResourceURIText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); - - final Button browseResourceButton = new Button(mgroup, SWT.NONE); - browseResourceButton.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(final SelectionEvent e) { - openSiriusModelSelection(parent); - } - - }); - browseResourceButton.setText("Browse..."); - } - - /** - * Opens the model selection dialog. - * - * @param parent - * the parent {@link Composite} - */ - private void openSiriusModelSelection(final Composite parent) { - ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(parent.getShell(), - new WorkbenchLabelProvider(), new FilteredFileContentProvider( - new String[] {SiriusUtil.SESSION_RESOURCE_EXTENSION })); - dialog.setTitle("Select model file"); - dialog.setMessage("Select the model file to execute:"); - dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); - if (dialog.open() == Window.OK) { - siriusResourceURIText.setText(((IFile)dialog.getFirstResult()).getFullPath().toString()); - } - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/services/AbstractDSLDebuggerServices.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/services/AbstractDSLDebuggerServices.java deleted file mode 100644 index 3d8d08efd..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/services/AbstractDSLDebuggerServices.java +++ /dev/null @@ -1,570 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui.services; - -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointListener; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.sirius.business.api.dialect.DialectManager; -import org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand; -import org.eclipse.sirius.diagram.DDiagram; -import org.eclipse.sirius.diagram.description.Layer; -import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; -import org.eclipse.sirius.ui.business.api.session.IEditingSession; -import org.eclipse.sirius.ui.business.api.session.SessionUIManager; -import org.eclipse.sirius.viewpoint.DRepresentation; -import org.eclipse.sirius.viewpoint.description.RepresentationDescription; - -/** - * DSL debugger services class. - * - * @author Yvan Lussaud - */ -public abstract class AbstractDSLDebuggerServices { - - /** - * A couple of {@link String}. - * - * @author Yvan Lussaud - */ - public static final class StringCouple { - - /** - * The first string of the couple. - */ - private final String first; - - /** - * The second string of the couple. - */ - private final String second; - - /** - * Constructor. - * - * @param first - * the first string of the couple - * @param second - * the second string of the couple - */ - public StringCouple(String first, String second) { - this.first = first; - this.second = second; - } - - /** - * Gets the first string of the couple. - * - * @return the first string of the couple - */ - public String getFirst() { - return first; - } - - /** - * Gets the second string of the couple. - * - * @return the second string of the couple - */ - public String getSecond() { - return second; - } - } - - /** - * An {@link IBreakpointListener} maintaining the breakpoints. - * - * @author Yvan Lussaud - */ - public static final class BreakpointListener implements IBreakpointListener, IDSLCurrentInstructionListener { - - /** - * Any layer {@link Set}, means always refresh the given {@link DRepresentation} no matter what its - * layer are. It should be used for trees and tables since they don't have layers. - */ - private static final Set ANY_LAYER = new HashSet(); - - /** - * Mapping of the {@link RepresentationDescription#getName() representation identifier} to a - * {@link Layer#getName() layer identifier} or {@link BreakpointListener#ANY_LAYER any layer}. - */ - private final Map>> representationToRefresh = new HashMap>>(); - - /** - * The current {@link StackFrame}. - */ - private StackFrame currentFrame; - - /** - * Installs this {@link IBreakpointListener}. - */ - public void install() { - DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this); - for (IBreakpoint breakpoint : DebugPlugin.getDefault().getBreakpointManager().getBreakpoints()) { - if (breakpoint instanceof DSLBreakpoint) { - addBreakpoint((DSLBreakpoint)breakpoint); - } - } - } - - /** - * Uninstalls this {@link IBreakpointListener}. - */ - public void uninstall() { - DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint) - */ - public void breakpointAdded(IBreakpoint breakpoint) { - if (breakpoint instanceof DSLBreakpoint) { - addBreakpoint((DSLBreakpoint)breakpoint); - final DSLBreakpoint dslBreakpoint = (DSLBreakpoint)breakpoint; - notifySirius(dslBreakpoint.getURI(), dslBreakpoint.getModelIdentifier()); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, - * org.eclipse.core.resources.IMarkerDelta) - */ - public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) { - if (breakpoint instanceof DSLBreakpoint) { - removeBreakpoint((DSLBreakpoint)breakpoint); - final DSLBreakpoint dslBreakpoint = (DSLBreakpoint)breakpoint; - notifySirius(dslBreakpoint.getURI(), dslBreakpoint.getModelIdentifier()); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, - * org.eclipse.core.resources.IMarkerDelta) - */ - public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) { - try { - if (breakpoint instanceof DSLBreakpoint - && delta.getAttribute(IBreakpoint.ENABLED) != null - && breakpoint.isEnabled() != ((Boolean)delta.getAttribute(IBreakpoint.ENABLED)) - .booleanValue()) { - final DSLBreakpoint dslBreakpoint = (DSLBreakpoint)breakpoint; - notifySirius(dslBreakpoint.getURI(), dslBreakpoint.getModelIdentifier()); - } - } catch (CoreException e) { - // ignore - } - } - - /** - * Adds the given {@link DSLBreakpoint}. - * - * @param breakpoint - * the {@link DSLBreakpoint} - */ - protected void addBreakpoint(DSLBreakpoint breakpoint) { - Set brkps = BREAKPOINTS.get(breakpoint.getURI()); - if (brkps == null) { - brkps = new HashSet(); - BREAKPOINTS.put(breakpoint.getURI(), brkps); - } - brkps.add(breakpoint); - } - - /** - * Removes the given {@link DSLBreakpoint}. - * - * @param breakpoint - * the {@link DSLBreakpoint} - */ - protected void removeBreakpoint(DSLBreakpoint breakpoint) { - Set brkps = BREAKPOINTS.get(breakpoint.getURI()); - if (brkps != null) { - brkps.remove(breakpoint); - } - } - - /** - * Notifies Sirius about a change in the given {@link DSLBreakpoint}. - * - * @param instructionUri - * the {@link URI} of the instruction to refresh. - * @param debugModelID - * the debug model identifier - */ - public void notifySirius(URI instructionUri, String debugModelID) { - Map> toRefresh = representationToRefresh.get(debugModelID); - if (toRefresh != null) { - for (IEditingSession session : SessionUIManager.INSTANCE.getUISessions()) { - final TransactionalEditingDomain transactionalEditingDomain = session.getSession() - .getTransactionalEditingDomain(); - final ResourceSet resourceSet = transactionalEditingDomain.getResourceSet(); - for (DialectEditor editor : session.getEditors()) { - EObject instruction = resourceSet.getEObject(instructionUri, false); - if (instruction != null) { - final DRepresentation representation = editor.getRepresentation(); - final List representations = new ArrayList(); - final RepresentationDescription description = DialectManager.INSTANCE - .getDescription(representation); - final String representationId = description.getName(); - final Set layerIDs = toRefresh.get(representationId); - if (layerIDs == ANY_LAYER) { - representations.add(representation); - } else if (layerIDs != null && representation instanceof DDiagram - && isActiveLayer((DDiagram)representation, layerIDs)) { - representations.add(representation); - } - // TODO prevent the editors from getting dirty - if (representations.size() != 0) { - final RefreshRepresentationsCommand refresh = new RefreshRepresentationsCommand( - transactionalEditingDomain, new NullProgressMonitor(), - representations); - transactionalEditingDomain.getCommandStack().execute(refresh); - } - } - } - } - } - } - - /** - * Tells if any of the given {@link Layer#getName() layer identifier} is active for the given - * {@link DDiagram}. - * - * @param diagram - * the {@link DDiagram} - * @param layerIDs - * the {@link Set} of {@link Layer#getName() layer identifiers} - * @return true if any of the given {@link Layer#getName() layer identifier} is active - * for the given {@link DDiagram}, false otherwise - */ - private boolean isActiveLayer(DDiagram diagram, Set layerIDs) { - boolean res = false; - - for (Layer layer : diagram.getActivatedLayers()) { - if (layerIDs.contains(layer.getName())) { - res = true; - break; - } - } - - return res; - } - - /** - * Add the given {@link RepresentationDescription#getName() representation identifier} for - * {@link DRepresentation} refresh. - * - * @param debugModelID - * the debug model identifier - * @param representationID - * the {@link RepresentationDescription#getName() representation identifier} - */ - public void addRepresentationToRefresh(String debugModelID, String representationID) { - Map> toRefresh = representationToRefresh.get(debugModelID); - if (toRefresh == null) { - toRefresh = new HashMap>(); - representationToRefresh.put(debugModelID, toRefresh); - } - toRefresh.put(representationID, ANY_LAYER); - } - - /** - * Add the given {@link RepresentationDescription#getName() representation identifier} and - * {@link Layer#getName() layer identifier} for {@link DRepresentation} refresh. - * - * @param debugModelID - * the debug model identifier - * @param representationID - * the {@link RepresentationDescription#getName() representation identifier} - * @param layerID - * the {@link Layer#getName() layer identifier} - */ - public void addRepresentationToRefresh(String debugModelID, String representationID, String layerID) { - Map> toRefresh = representationToRefresh.get(debugModelID); - if (toRefresh == null) { - toRefresh = new HashMap>(); - representationToRefresh.put(debugModelID, toRefresh); - } - Set layerIDs = toRefresh.get(representationID); - if (layerIDs != ANY_LAYER) { - if (layerIDs == null) { - layerIDs = new HashSet(); - toRefresh.put(representationID, layerIDs); - } - layerIDs.add(layerID); - } - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener#currentInstructionChanged(String, - * fr.obeo.dsl.debug.StackFrame)) - */ - public void currentInstructionChanged(String debugModelID, StackFrame frame) { - final URI instructionURI = EcoreUtil.getURI(frame.getCurrentInstruction()); - final URI lastInstruction = CURRENT_INSTRUCTIONS_PER_FRAME.remove(frame); - if (lastInstruction != null) { - notifySirius(lastInstruction, debugModelID); - } - CURRENT_INSTRUCTIONS_PER_FRAME.put(frame, instructionURI); - notifySirius(instructionURI, debugModelID); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener#terminated(java.lang.String, - * fr.obeo.dsl.debug.StackFrame) - */ - public void terminated(String debugModelID, StackFrame frame) { - final URI lastInstruction = CURRENT_INSTRUCTIONS_PER_FRAME.remove(frame); - if (lastInstruction != null) { - notifySirius(lastInstruction, debugModelID); - } - } - - /** - * Gets the current {@link StackFrame}. - * - * @return the current {@link StackFrame} - */ - public StackFrame getCurrentFrame() { - return currentFrame; - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener#setCurrentFrame(java.lang.String, - * fr.obeo.dsl.debug.StackFrame) - */ - public void setCurrentFrame(String debugModelID, StackFrame frame) { - if (currentFrame != frame) { - currentFrame = frame; - final URI instructionUri = CURRENT_INSTRUCTIONS_PER_FRAME.get(getCurrentFrame()); - if (instructionUri != null) { - notifySirius(instructionUri, debugModelID); - } - } - } - - /** - * Tells if the given layer id and representation id should be refreshed while debugging the given - * debug model id. - * - * @param debugModelID - * the debug model id - * @param representationId - * the representation id - * @param layerID - * the layer id, it can be null - * @return true if the given layer id and representation id should be refreshed while - * debugging the given debug model id, false otherwise - */ - public boolean isRepresentationToRefresh(String debugModelID, String representationId, String layerID) { - final boolean res; - - final Map> representations = representationToRefresh.get(debugModelID); - if (representations != null) { - final Set layerIDs = representations.get(representationId); - res = layerIDs == ANY_LAYER || layerIDs.contains(layerID); - } else { - res = false; - } - - return res; - } - - } - - /** - * The {@link IBreakpointListener} maintaining breakpoints. - */ - public static final BreakpointListener LISTENER = new BreakpointListener(); - - /** - * {@link Map} of {@link URI} pointing {@link DSLBreakpoint}. - */ - private static final Map> BREAKPOINTS = new HashMap>(); - - /** - * Current instruction for a given {@link StackFrame}. - */ - private static final Map CURRENT_INSTRUCTIONS_PER_FRAME = new HashMap(); - - /** - * Constructor. - */ - public AbstractDSLDebuggerServices() { - for (StringCouple couple : getRepresentationRefreshList()) { - if (couple.getSecond() != null) { - LISTENER.addRepresentationToRefresh(getModelIdentifier(), couple.getFirst(), couple - .getSecond()); - } else { - LISTENER.addRepresentationToRefresh(getModelIdentifier(), couple.getFirst()); - } - } - } - - /** - * Gets the {@link List} of {@link StringCouple} representing the - * {@link RepresentationDescription#getName() representation identifier} and the {@link Layer#getName() - * layer identifier} or null where services from this class are used. - * - * @return the {@link List} of {@link StringCouple} representing the - * {@link RepresentationDescription#getName() representation identifier} and the - * {@link Layer#getName() layer identifier} or null where services from this class - * are used - */ - protected abstract List getRepresentationRefreshList(); - - /** - * Tells if the given {@link EObject instruction} has a breakpoint. - * - * @param instruction - * the {@link EObject instruction} - * @return true if the given {@link EObject instruction} has a breakpoint, false - * otherwise - */ - public boolean hasBreakpoint(EObject instruction) { - final Set brkps = getBreakpoints(instruction); - return brkps != null && brkps.size() != 0; - } - - /** - * Tells if the given {@link EObject instruction} has an enabled breakpoint. - * - * @param instruction - * the {@link EObject instruction} - * @return true if the given {@link EObject instruction} has an enabled breakpoint, - * false otherwise - */ - public boolean hasEnabledBreakpoint(EObject instruction) { - boolean res = false; - final Set brkps = getBreakpoints(instruction); - - if (brkps != null && brkps.size() != 0) { - for (DSLBreakpoint breakpoint : brkps) { - try { - if (breakpoint.isEnabled()) { - res = true; - break; - } - } catch (CoreException e) { - // ignore - } - } - } - - return res; - } - - /** - * Tells if the given {@link EObject instruction} has an disabled breakpoint. - * - * @param instruction - * the {@link EObject instruction} - * @return true if the given {@link EObject instruction} has an disabled breakpoint, - * false otherwise - */ - public boolean hasDisabledBreakpoint(EObject instruction) { - boolean res = false; - final Set brkps = getBreakpoints(instruction); - - if (brkps != null && brkps.size() != 0) { - res = true; - for (DSLBreakpoint breakpoint : brkps) { - try { - if (breakpoint.isEnabled()) { - res = false; - break; - } - } catch (CoreException e) { - // ignore - } - } - } - - return res; - } - - /** - * Gets the {@link Set} of {@link DSLBreakpoint} for the - * {@link AbstractDSLDebuggerServices#getModelIdentifier() model identifier}. - * - * @param instruction - * the instruction to check - * @return the {@link Set} of {@link DSLBreakpoint} for the - * {@link AbstractDSLDebuggerServices#getModelIdentifier() model identifier} - */ - protected Set getBreakpoints(EObject instruction) { - Set res = new HashSet(); - - Set brkps = BREAKPOINTS.get(EcoreUtil.getURI(instruction)); - if (brkps != null) { - for (DSLBreakpoint breakpoint : brkps) { - if (breakpoint.getModelIdentifier().equals(getModelIdentifier())) { - res.add(breakpoint); - } - } - } - - return res; - } - - /** - * Tells if the given {@link EObject instruction} is a currently debugged instruction. A debugged - * instruction in this context is an instruction a debug target is suspended on. - * - * @param instruction - * the {@link EObject instruction} - * @return true if the given {@link EObject instruction} is a currently debugged instruction, - * false otherwise - */ - public boolean isCurrentInstruction(EObject instruction) { - final URI uri = CURRENT_INSTRUCTIONS_PER_FRAME.get(LISTENER.getCurrentFrame()); - return uri != null && uri.equals(EcoreUtil.getURI(instruction)); - } - - /** - * Gets the debug model identifier. - * - * @return the debug model identifier - */ - public abstract String getModelIdentifier(); - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.project b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.project deleted file mode 100644 index ed9b0b40e..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.obeo.dsl.debug.ide.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - net.sf.eclipsecs.core.CheckstyleBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - net.sf.eclipsecs.core.CheckstyleNature - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 02f088525..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,21 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.obeo.dsl.debug.ide.ui;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Vendor: %providerName -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.debug.ui;bundle-version="3.7.0", - org.eclipse.ui;bundle-version="3.7.0", - org.eclipse.emf.edit.ui;bundle-version="2.7.0", - fr.obeo.dsl.debug.edit;bundle-version="1.0.0", - fr.obeo.dsl.debug.ide;bundle-version="1.0.0", - org.eclipse.core.runtime;bundle-version="3.7.0", - org.eclipse.ui.ide;bundle-version="3.7.0", - org.eclipse.emf.ecore.editor;bundle-version="2.7.0" -Export-Package: fr.obeo.dsl.debug.ide.ui, - fr.obeo.dsl.debug.ide.ui.handler, - fr.obeo.dsl.debug.ide.ui.launch, - fr.obeo.dsl.debug.ide.ui.provider -Bundle-ActivationPolicy: lazy -Bundle-Activator: fr.obeo.dsl.debug.ide.ui.DebugIdeUiPlugin$Implementation diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/build.properties b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/build.properties deleted file mode 100644 index ba5eee893..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/build.properties +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### -source.. = src/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/plugin.properties b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/plugin.properties deleted file mode 100644 index 523178cbd..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### - -pluginName = Debug Model IDE Integration UI -providerName = Obeo diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/plugin.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/plugin.xml deleted file mode 100644 index ec34926b9..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/plugin.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/pom.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/pom.xml deleted file mode 100644 index 064697c54..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.ide.ui - 1.0.0-SNAPSHOT - eclipse-plugin - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DSLDebugModelPresentation.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DSLDebugModelPresentation.java deleted file mode 100644 index 92493d64e..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DSLDebugModelPresentation.java +++ /dev/null @@ -1,258 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui; - -import fr.obeo.dsl.debug.Variable; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.adapter.DSLStackFrameAdapter; -import fr.obeo.dsl.debug.ide.adapter.value.DSLObjectValue; -import fr.obeo.dsl.debug.ide.adapter.variable.DSLObjectVariable; -import fr.obeo.dsl.debug.provider.CustomDebugItemProviderAdapterFactory; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.model.IThread; -import org.eclipse.debug.core.model.IValue; -import org.eclipse.debug.ui.IDebugEditorPresentation; -import org.eclipse.debug.ui.IDebugModelPresentation; -import org.eclipse.debug.ui.IValueDetailListener; -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.provider.ComposedImage; -import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; -import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; -import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.ILabelProviderListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; - -/** - * The {@link IDebugModelPresentation} for the DSL debug model. - * - * @author Yvan Lussaud - */ -public class DSLDebugModelPresentation implements IDebugModelPresentation, IDebugEditorPresentation { - - /** - * The {@link Image} cache. - */ - protected final Map imagesCache = new HashMap(); - - /** - * The EMF {@link ILabelProvider}. - */ - private final ILabelProvider eLabelProvider; - - /** - * Constructor. - */ - public DSLDebugModelPresentation() { - super(); - final ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory( - ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - - adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); - CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory(); - adapterFactory.addAdapterFactory(debugFactory); - adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); - eLabelProvider = new AdapterFactoryLabelProvider(adapterFactory); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener) - */ - public void addListener(ILabelProviderListener listener) { - eLabelProvider.addListener(listener); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() - */ - public void dispose() { - for (Image cachedImage : imagesCache.values()) { - cachedImage.dispose(); - } - eLabelProvider.dispose(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String) - */ - public boolean isLabelProperty(Object element, String property) { - final boolean res; - - final Object unwrapped = unwrapp(element); - if (unwrapped instanceof Variable) { - res = isLabelProperty(((Variable)unwrapped).getValue(), property); - } else { - res = eLabelProvider.isLabelProperty(unwrapp(element), property); - } - - return res; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener) - */ - public void removeListener(ILabelProviderListener listener) { - eLabelProvider.removeListener(listener); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ISourcePresentation#getEditorInput(java.lang.Object) - */ - public IEditorInput getEditorInput(Object element) { - return EMFEditorUtils.getEditorInput(element); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ISourcePresentation#getEditorId(org.eclipse.ui.IEditorInput, - * java.lang.Object) - */ - public String getEditorId(IEditorInput input, Object element) { - final String res; - - res = EMFEditorUtils.getEditorID(input, element); - - return res; - } - - public void setAttribute(String attribute, Object value) { - // TODO Auto-generated method stub - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.IDebugModelPresentation#getImage(java.lang.Object) - */ - public Image getImage(final Object element) { - final Image res; - - final Object unwrapped = unwrapp(element); - if (unwrapped instanceof Variable) { - res = getImage(((Variable)unwrapped).getValue()); - } else if (element instanceof DSLBreakpoint) { - final Object image = ((DSLBreakpoint)element).getImage(); - if (image instanceof ComposedImage) { - ((ComposedImage)image).getImages().add( - DebugIdeUiPlugin.INSTANCE.getImage("full/deco16/breakpoint_enabled")); - } - final ImageDescriptor descriptor = ExtendedImageRegistry.getInstance().getImageDescriptor(image); - Image cachedImage = imagesCache.get(descriptor); - if (cachedImage == null) { - cachedImage = new Image(Display.getDefault(), descriptor.getImageData()); - imagesCache.put(descriptor, cachedImage); - } - res = cachedImage; - } else { - res = eLabelProvider.getImage(unwrapped); - } - - return res; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.IDebugModelPresentation#getText(java.lang.Object) - */ - public String getText(Object element) { - final String res; - - final Object unwrapped = unwrapp(element); - if (unwrapped instanceof Variable) { - res = getText(((Variable)unwrapped).getValue()); - } else if (element instanceof DSLBreakpoint) { - res = ((DSLBreakpoint)element).getText(); - } else { - res = eLabelProvider.getText(unwrapped); - } - - return res; - } - - public void computeDetail(IValue value, IValueDetailListener listener) { - // TODO Auto-generated method stub - } - - /** - * Unwrap the {@link Adapter#getTarget() target} if the given element is an {@link Adapter}. - * - * @param element - * the {@link Object element} - * @return the {@link Adapter#getTarget() target} if the given element is an {@link Adapter}, the given - * element itself otherwise - */ - private Object unwrapp(Object element) { - final Object res; - - if (element instanceof DSLObjectVariable) { - res = ((DSLObjectVariable)element).getObject(); - } else if (element instanceof DSLObjectValue) { - res = ((DSLObjectValue)element).getValue(); - } else if (element instanceof Adapter) { - res = ((Adapter)element).getTarget(); - } else { - res = element; - } - return res; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.IDebugEditorPresentation#addAnnotations(org.eclipse.ui.IEditorPart, - * org.eclipse.debug.core.model.IStackFrame) - */ - public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) { - if (frame instanceof DSLStackFrameAdapter) { - final EObject instruction = ((DSLStackFrameAdapter)frame).getCurrentInstruction(); - final URI instructionUri = EcoreUtil.getURI(instruction); - EMFEditorUtils.selectInstruction(editorPart, instructionUri); - } - return true; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.IDebugEditorPresentation#removeAnnotations(org.eclipse.ui.IEditorPart, - * org.eclipse.debug.core.model.IThread) - */ - public void removeAnnotations(IEditorPart editorPart, IThread thread) { - // nothing to do here - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DSLToggleBreakpointsUtils.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DSLToggleBreakpointsUtils.java deleted file mode 100644 index 8717d30af..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DSLToggleBreakpointsUtils.java +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui; - -import fr.obeo.dsl.debug.ide.DSLBreakpoint; - -import java.util.Iterator; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.Platform; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; - -/** - * Utility class for breakpoint {@link DSLBreakpoint} toggling. - * - * @author Yvan Lussaud - */ -public class DSLToggleBreakpointsUtils { - - /** - * The debug model identifier. - */ - protected final String identifier; - - /** - * Constructor. - * - * @param identifier - * the debug model identifier - */ - public DSLToggleBreakpointsUtils(String identifier) { - this.identifier = identifier; - } - - /** - * Toggles a {@link DSLBreakpoint} for the given selection. - * - * @param selection - * the {@link ISelection} - * @throws CoreException - * if {@link DSLBreakpoint} can't be retrieved or installed - */ - public void toggleBreakpoints(ISelection selection) throws CoreException { - if (selection instanceof IStructuredSelection) { - @SuppressWarnings("unchecked") - final Iterator it = ((IStructuredSelection)selection).iterator(); - while (it.hasNext()) { - final Object selected = it.next(); - EObject instruction = getInstruction(selected); - if (instruction != null) { - toggleBreakpoint(selected, instruction); - } - } - } - } - - /** - * Toggles the {@link DSLBreakpoint} for the given {@link EObject instruction}. - * - * @param selected - * the selected {@link Object} - * @param instruction - * the {@link EObject instruction} - * @throws CoreException - * if {@link DSLBreakpoint} can't be retrieved or installed - */ - protected void toggleBreakpoint(Object selected, EObject instruction) throws CoreException { - DSLBreakpoint breakpoint = getBreakpoint(instruction); - if (breakpoint != null) { - breakpoint.delete(); - } else { - breakpoint = createBreakpoint(selected, instruction); - DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(breakpoint); - } - } - - /** - * Creates a {@link DSLBreakpoint} for the given instruction. - * - * @param selected - * the selected {@link Object} - * @param instruction - * the {@link EObject instruction} - * @return the created {@link DSLBreakpoint} for the given instruction - * @throws CoreException - * if the {@link DSLBreakpoint} instantiation fails - */ - protected DSLBreakpoint createBreakpoint(Object selected, EObject instruction) throws CoreException { - return new DSLBreakpoint(identifier, instruction, true); - } - - /** - * Gets the {@link DSLBreakpoint} for the given {@link EObject instruction}. - * - * @param instruction - * the {@link EObject instruction} - * @return the {@link DSLBreakpoint} for the given {@link EObject instruction} if nay, null - * otherwise - */ - protected DSLBreakpoint getBreakpoint(EObject instruction) { - DSLBreakpoint res = null; - - IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager() - .getBreakpoints(identifier); - final URI instructionURI = EcoreUtil.getURI(instruction); - for (IBreakpoint breakpoint : breakpoints) { - if (breakpoint instanceof DSLBreakpoint && ((DSLBreakpoint)breakpoint).getURI() != null - && ((DSLBreakpoint)breakpoint).getURI().equals(instructionURI)) { - res = (DSLBreakpoint)breakpoint; - break; - } - } - - return res; - } - - /** - * Tells if we can toggle a {@link DSLBreakpoint} for the given {@link ISelection}. - * - * @param selection - * the {@link ISelection} - * @return true if we can toggle a {@link DSLBreakpoint} for the given {@link ISelection}, - * false otherwise - */ - public boolean canToggleBreakpoints(ISelection selection) { - boolean res = false; - - if (selection instanceof IStructuredSelection) { - @SuppressWarnings("unchecked") - final Iterator it = ((IStructuredSelection)selection).iterator(); - while (it.hasNext()) { - final Object selected = it.next(); - if (selected != null) { - res = getInstruction(selected) != null; - break; - } - } - } - - return res; - } - - /** - * Gets an {@link EObject instruction} from the given {@link Object}. - * - * @param selected - * the {@link Object} - * @return the corresponding {@link EObject instruction} or null if no {@link EObject - * instruction} match - */ - protected EObject getInstruction(Object selected) { - final EObject res; - - if (selected instanceof EObject) { - res = (EObject)selected; - } else if (selected instanceof IAdaptable) { - final EObject adapter = (EObject)((IAdaptable)selected).getAdapter(EObject.class); - if (adapter != null) { - res = adapter; - } else { - res = (EObject)Platform.getAdapterManager().getAdapter(selected, EObject.class); - } - } else if (selected != null) { - res = (EObject)Platform.getAdapterManager().getAdapter(selected, EObject.class); - } else { - res = null; - } - - return res; - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java deleted file mode 100644 index 7fffe3e56..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java +++ /dev/null @@ -1,308 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui.launch; - -import fr.obeo.dsl.debug.ide.Activator; -import fr.obeo.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchGroup; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.debug.ui.ILaunchShortcut2; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.ide.ResourceUtil; - -/** - * An UI implementation of {@link AbstractDSLLaunchConfigurationDelegate} with {@link ILaunchShortcut} - * support. - * - * @author Yvan Lussaud - */ -public abstract class AbstractDSLLaunchConfigurationDelegateUI extends AbstractDSLLaunchConfigurationDelegate implements ILaunchShortcut, ILaunchShortcut2 { - - @Override - protected void launch(EObject firstInstruction, ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - Display.getDefault().syncExec(new Runnable() { - public void run() { - ExtendedImageRegistry.getInstance(); // initialize the image registry - } - }); - super.launch(firstInstruction, configuration, mode, launch, monitor); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchConfigurations(org.eclipse.jface.viewers.ISelection) - */ - public ILaunchConfiguration[] getLaunchConfigurations(ISelection selection) { - return getLaunchConfigurations(getLaunchableResource(selection)); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchConfigurations(org.eclipse.ui.IEditorPart) - */ - public ILaunchConfiguration[] getLaunchConfigurations(IEditorPart editorpart) { - return getLaunchConfigurations(getLaunchableResource(editorpart)); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchableResource(org.eclipse.jface.viewers.ISelection) - */ - public IResource getLaunchableResource(ISelection selection) { - IResource res = null; - if (selection instanceof IStructuredSelection) { - for (final Object element : ((IStructuredSelection)selection).toArray()) { - if (element instanceof IFile) { - res = (IResource)element; - break; - } else if (element instanceof EObject) { - final URI resourceURI = ((EObject)element).eResource().getURI(); - if (resourceURI.isPlatformResource()) { - final String pathString = resourceURI.toPlatformString(true); - res = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(pathString)); - break; - } - } - } - } - - return res; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchableResource(org.eclipse.ui.IEditorPart) - */ - public IResource getLaunchableResource(IEditorPart editorpart) { - return ResourceUtil.getFile(editorpart.getEditorInput()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers.ISelection, - * java.lang.String) - */ - public void launch(ISelection selection, String mode) { - launch(getLaunchableResource(selection), getFirstInstruction(selection), mode); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String) - */ - public void launch(IEditorPart editor, String mode) { - launch(getLaunchableResource(editor), getFirstInstruction(editor), mode); - } - - /** - * Get all {@link ILaunchConfiguration} that target the given {@link IResource}. - * - * @param resource - * root file to execute - * @return {@link ILaunchConfiguration}s using resource - */ - protected ILaunchConfiguration[] getLaunchConfigurations(IResource resource) { - final List configurations = new ArrayList(); - - final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); - final ILaunchConfigurationType type = manager - .getLaunchConfigurationType(getLaunchConfigurationTypeID()); - - // try to find existing configurations using the same file - try { - for (ILaunchConfiguration configuration : manager.getLaunchConfigurations(type)) { - if (configuration.hasAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI)) { - final String pathString = configuration.getAttribute( - AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, ""); - try { - IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(pathString)); - if (resource != null && resource.equals(file)) { - configurations.add(configuration); - } - } catch (IllegalArgumentException e) { - Activator.getDefault().error(e); - } - } - } - } catch (CoreException e) { - // could not load configurations, ignore - e.toString(); - } - - return configurations.toArray(new ILaunchConfiguration[configurations.size()]); - } - - /** - * Launch a resource. Try to launch using a launch configuration. Used for contextual launches - * - * @param file - * source file - * @param firstInstruction - * the first {@link EObject instruction} - * @param mode - * launch mode - */ - public void launch(final IResource file, EObject firstInstruction, final String mode) { - - if (file instanceof IFile) { - prepareLaunch(file, firstInstruction, mode); - - try { - ILaunchConfiguration[] configurations = getLaunchConfigurations(file); - if (configurations.length == 0) { - // try to create a launch configuration - configurations = createLaunchConfiguration(file, firstInstruction, mode); - } - - // launch - if (configurations.length == 1) { - configurations[0].launch(mode, new NullProgressMonitor()); - } else { - // more than one configuration applies - // open launch dialog for selection - final ILaunchGroup group = DebugUITools.getLaunchGroup(configurations[0], mode); - DebugUITools.openLaunchConfigurationDialogOnGroup(PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getShell(), - new StructuredSelection(configurations[0]), group.getIdentifier(), null); - } - - } catch (CoreException e) { - // could not create launch configuration, run file directly - // try { - // launch(firstInstruction, null, mode, null, new NullProgressMonitor()); - // } catch (CoreException e1) { - Activator.getDefault().error(e); - // } - } - } - } - - /** - * Prepares the launch of the given {@link IResource}. - * - * @param file - * source file - * @param firstInstruction - * the first {@link EObject instruction} - * @param mode - * launch mode - */ - protected void prepareLaunch(final IResource file, EObject firstInstruction, final String mode) { - // try to save dirty editors - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true); - } - - /** - * Creates a {@link ILaunchConfiguration}. If the firstInstruction is null the - * launch configuration dialog is opened. - * - * @param file - * the selected model {@link IFile} - * @param firstInstruction - * the first {@link EObject instruction} or null for interactive selection - * @param mode - * the {@link ILaunchConfiguration#getModes() mode} - * @return an array of possible {@link ILaunchConfiguration}, can be empty but not null - * @throws CoreException - * if {@link ILaunchConfiguration} initialization fails of models can't be loaded - */ - protected ILaunchConfiguration[] createLaunchConfiguration(final IResource file, - EObject firstInstruction, final String mode) throws CoreException { - final ILaunchConfiguration[] res; - - ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = manager.getLaunchConfigurationType(getLaunchConfigurationTypeID()); - - ILaunchConfigurationWorkingCopy configuration = type.newInstance(null, file.getName()); - configuration.setMappedResources(new IResource[] {file, }); - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, file.getFullPath() - .toString()); - if (firstInstruction == null) { - // open configuration for further editing - final ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, mode); - if (group != null) { - configuration.doSave(); - DebugUITools.openLaunchConfigurationDialog(PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getShell(), configuration, group.getIdentifier(), null); - } - res = new ILaunchConfiguration[] {}; - } else { - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, - EcoreUtil.getURI(firstInstruction).toString()); - // save and return new configuration - configuration.doSave(); - res = new ILaunchConfiguration[] {configuration, }; - } - return res; - } - - /** - * Gets the {@link ILaunchConfiguration} {@link ILaunchConfiguration#getType() type}. - * - * @return the {@link ILaunchConfiguration} {@link ILaunchConfiguration#getType() type} - */ - protected abstract String getLaunchConfigurationTypeID(); - - /** - * Gets the first {@link EObject instruction} from the given {@link ISelection}. - * - * @param selection - * the {@link ISelection} - * @return the first {@link EObject instruction} from the given {@link ISelection} or null - * for interactive selection - */ - protected abstract EObject getFirstInstruction(ISelection selection); - - /** - * Gets the first {@link EObject instruction} from the given {@link IEditorPart}. - * - * @param editor - * the {@link IEditorPart} - * @return the first {@link EObject instruction} from the given {@link IEditorPart} or null - * for interactive selection - */ - protected abstract EObject getFirstInstruction(IEditorPart editor); - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/DSLLaunchConfigurationTab.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/DSLLaunchConfigurationTab.java deleted file mode 100644 index c70cb8ed6..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/DSLLaunchConfigurationTab.java +++ /dev/null @@ -1,331 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui.launch; - -import fr.obeo.dsl.debug.ide.Activator; -import fr.obeo.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Path; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.common.util.WrappedException; -import org.eclipse.emf.ecore.EObject; -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.util.EcoreUtil; -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.provider.AdapterFactoryContentProvider; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; -import org.eclipse.ui.model.WorkbenchLabelProvider; - -/** - * DSL {@link org.eclipse.debug.ui.ILaunchConfigurationTab ILaunchConfigurationTab}. - * - * @author Yvan Lussaud - */ -public class DSLLaunchConfigurationTab extends AbstractLaunchConfigurationTab { - - /** - * Disable the update. - */ - protected boolean disableUpdate; - - /** - * The {@link Text} used for the {@link AbstractDSLLaunchConfigurationDelegate#RESOURCE_URI}. - */ - private Text resourceURIText; - - /** - * The {@link Text} used for the {@link AbstractDSLLaunchConfigurationDelegate#FIRST_INSTRUCTION_URI}. - */ - private Text firstInstructionURIText; - - /** - * Supported {@link org.eclipse.core.resources.IResource IResource} extensions. - */ - private final String[] extensions; - - /** - * Constructor. - * - * @param extensions - * supported file extensions - */ - public DSLLaunchConfigurationTab(final String[] extensions) { - this.extensions = extensions; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) - */ - public void setDefaults(final ILaunchConfigurationWorkingCopy configuration) { - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, ""); - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, ""); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) - */ - public void initializeFrom(final ILaunchConfiguration configuration) { - disableUpdate = true; - - resourceURIText.setText(""); - firstInstructionURIText.setText(""); - - try { - resourceURIText.setText(configuration.getAttribute( - AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, "")); - firstInstructionURIText.setText(configuration.getAttribute( - AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, "")); - } catch (CoreException e) { - Activator.getDefault().error(e); - } - - disableUpdate = false; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) - */ - public void performApply(final ILaunchConfigurationWorkingCopy configuration) { - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, resourceURIText - .getText()); - configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, - firstInstructionURIText.getText()); - } - - @Override - public boolean isValid(final ILaunchConfiguration launchConfig) { - boolean res = false; - String errorMessage = null; - - try { - String resourceURI = launchConfig.getAttribute( - AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, ""); - IFile resourceFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(resourceURI)); - if (resourceFile.exists()) { - final ResourceSet rs = new ResourceSetImpl(); - Resource resource = null; - try { - resource = rs.getResource(URI.createPlatformResourceURI(resourceURI, true), true); - } catch (WrappedException e) { - errorMessage = "Model can't be loaded: " - + ((WrappedException)e).exception().getLocalizedMessage() + "."; - } - EObject firstInstruction = null; - try { - firstInstruction = rs.getEObject(URI.createURI(launchConfig.getAttribute( - AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, ""), true), true); - } catch (WrappedException e) { - errorMessage = "First instruction can't be loaded: " - + ((WrappedException)e).exception().getLocalizedMessage() + "."; - } - if (firstInstruction == null) { - errorMessage = "First instruction not selected."; - } - res = resource != null && firstInstruction != null; - } else { - errorMessage = "Model file does not exist."; - } - setErrorMessage(errorMessage); - } catch (IllegalArgumentException e) { - setErrorMessage("Invalid model file selected."); - } catch (CoreException e) { - setErrorMessage("Invalid model file selected."); - } - - return res; - } - - @Override - public boolean canSave() { - // allow save when a file location is entered - no matter if the file - // exists or not - return (!firstInstructionURIText.getText().isEmpty()) && (!resourceURIText.getText().isEmpty()); - } - - @Override - public String getMessage() { - return "Please select a model file and first instruction."; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() - */ - public String getName() { - return "DSL launch"; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) - * @wbp.parser.entryPoint - */ - public void createControl(final Composite parent) { - Composite topControl = new Composite(parent, SWT.NONE); - topControl.setLayout(new GridLayout(1, false)); - - final Group mgroup = new Group(topControl, SWT.NONE); - mgroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); - mgroup.setText("Model"); - mgroup.setLayout(new GridLayout(2, false)); - - resourceURIText = new Text(mgroup, SWT.BORDER); - resourceURIText.addModifyListener(new ModifyListener() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) - */ - public void modifyText(final ModifyEvent e) { - if (!disableUpdate) { - updateLaunchConfigurationDialog(); - } - } - }); - resourceURIText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); - - final Button browseResourceButton = new Button(mgroup, SWT.NONE); - browseResourceButton.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(final SelectionEvent e) { - openModelSelection(parent); - } - - }); - browseResourceButton.setText("Browse..."); - - Group grpLaunch = new Group(topControl, SWT.NONE); - grpLaunch.setLayout(new GridLayout(2, false)); - grpLaunch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); - grpLaunch.setText("First instruction"); - - firstInstructionURIText = new Text(grpLaunch, SWT.BORDER); - firstInstructionURIText.addModifyListener(new ModifyListener() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) - */ - public void modifyText(final ModifyEvent e) { - if (!disableUpdate) { - updateLaunchConfigurationDialog(); - } - } - }); - firstInstructionURIText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); - - Button browseModelFileButton = new Button(grpLaunch, SWT.NONE); - browseModelFileButton.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(final SelectionEvent e) { - IFile resourceFile = ResourcesPlugin.getWorkspace().getRoot().getFile( - new Path(resourceURIText.getText())); - if (resourceFile.exists()) { - final ResourceSet rs = new ResourceSetImpl(); - rs.getResource(URI.createPlatformResourceURI(resourceURIText.getText(), true), true); - EObject firstInstruction = openFirstInstructionSelection(parent.getShell(), rs); - if (firstInstruction != null) { - firstInstructionURIText.setText(EcoreUtil.getURI(firstInstruction).toString()); - } - } else { - MessageDialog.openInformation(parent.getShell(), "Model not selected", - "You must select a model first."); - } - } - }); - browseModelFileButton.setText("Browse..."); - - setControl(topControl); - } - - /** - * Opens the model selection dialog. - * - * @param parent - * the parent {@link Composite} - */ - private void openModelSelection(final Composite parent) { - ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(parent.getShell(), - new WorkbenchLabelProvider(), new FilteredFileContentProvider(extensions)); - dialog.setTitle("Select model file"); - dialog.setMessage("Select the model file to execute:"); - dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); - if (dialog.open() == Window.OK) { - resourceURIText.setText(((IFile)dialog.getFirstResult()).getFullPath().toString()); - } - } - - /** - * Opens the {@link EObject first instruction} selection dialog. - * - * @param shell - * the {@link Shell} to use for display - * @param resourceSet - * the {@link ResourceSet} to get the first instruction from - * @return the selected first instruction {@link URI} if any selected, null otherwise - */ - public static EObject openFirstInstructionSelection(final Shell shell, ResourceSet resourceSet) { - final EObject res; - final ComposedAdapterFactory fatory = new ComposedAdapterFactory( - ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - fatory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); - fatory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); - - ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell, - new AdapterFactoryLabelProvider(fatory), new AdapterFactoryContentProvider(fatory)); - dialog.setTitle("Select first instruction"); - dialog.setMessage("Select the first instruction:"); - dialog.setInput(resourceSet); - if (dialog.open() == Window.OK) { - res = (EObject)dialog.getFirstResult(); - } else { - res = null; - } - fatory.dispose(); - return res; - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.project b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.project deleted file mode 100644 index 94e4d33d5..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.obeo.dsl.debug.ide - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - net.sf.eclipsecs.core.CheckstyleBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - net.sf.eclipsecs.core.CheckstyleNature - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/META-INF/MANIFEST.MF deleted file mode 100644 index edf20abe5..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.obeo.dsl.debug.ide;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Require-Bundle: org.eclipse.debug.core;bundle-version="3.7.0", - fr.obeo.dsl.debug;bundle-version="1.0.0", - org.eclipse.core.runtime;bundle-version="3.7.0", - org.eclipse.emf.edit;bundle-version="2.7.0", - fr.obeo.dsl.debug.edit;bundle-version="1.0.0", - org.eclipse.emf.transaction;bundle-version="1.4.0" -Export-Package: fr.obeo.dsl.debug.ide, - fr.obeo.dsl.debug.ide.adapter, - fr.obeo.dsl.debug.ide.adapter.value, - fr.obeo.dsl.debug.ide.adapter.variable, - fr.obeo.dsl.debug.ide.event, - fr.obeo.dsl.debug.ide.event.debugger, - fr.obeo.dsl.debug.ide.event.model, - fr.obeo.dsl.debug.ide.launch -Bundle-Activator: fr.obeo.dsl.debug.ide.Activator diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/build.properties b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/build.properties deleted file mode 100644 index c99dd4139..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/build.properties +++ /dev/null @@ -1,14 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### -source.. = src/ -bin.includes = META-INF/,\ - .,\ - plugin.xml diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/plugin.properties b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/plugin.properties deleted file mode 100644 index 54d7fc46c..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### - -pluginName = Debug Model IDE Integration -providerName = Obeo diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/plugin.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/plugin.xml deleted file mode 100644 index be88892e3..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/plugin.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/pom.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/pom.xml deleted file mode 100644 index 108dc1ec6..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.ide - 1.0.0-SNAPSHOT - eclipse-plugin - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/AbstractDSLDebugger.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/AbstractDSLDebugger.java deleted file mode 100644 index 5d182aba2..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/AbstractDSLDebugger.java +++ /dev/null @@ -1,615 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide; - -import fr.obeo.dsl.debug.ide.event.IDSLDebugEvent; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; -import fr.obeo.dsl.debug.ide.event.debugger.BreakpointReply; -import fr.obeo.dsl.debug.ide.event.debugger.DeleteVariableReply; -import fr.obeo.dsl.debug.ide.event.debugger.PopStackFrameReply; -import fr.obeo.dsl.debug.ide.event.debugger.PushStackFrameReply; -import fr.obeo.dsl.debug.ide.event.debugger.ResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.SetCurrentInstructionReply; -import fr.obeo.dsl.debug.ide.event.debugger.SetVariableValueReply; -import fr.obeo.dsl.debug.ide.event.debugger.SpawnRunningThreadReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepIntoResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepOverResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepReturnResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.SteppedReply; -import fr.obeo.dsl.debug.ide.event.debugger.SuspendedReply; -import fr.obeo.dsl.debug.ide.event.debugger.TerminatedReply; -import fr.obeo.dsl.debug.ide.event.debugger.VariableReply; -import fr.obeo.dsl.debug.ide.event.model.AbstractBreakpointRequest; -import fr.obeo.dsl.debug.ide.event.model.AbstractStepRequest; -import fr.obeo.dsl.debug.ide.event.model.AddBreakpointRequest; -import fr.obeo.dsl.debug.ide.event.model.ChangeBreakPointRequest; -import fr.obeo.dsl.debug.ide.event.model.DisconnectRequest; -import fr.obeo.dsl.debug.ide.event.model.RemoveBreakpointRequest; -import fr.obeo.dsl.debug.ide.event.model.ResumeRequest; -import fr.obeo.dsl.debug.ide.event.model.SetVariableValueRequest; -import fr.obeo.dsl.debug.ide.event.model.StartRequest; -import fr.obeo.dsl.debug.ide.event.model.StepIntoRequest; -import fr.obeo.dsl.debug.ide.event.model.StepOverRequest; -import fr.obeo.dsl.debug.ide.event.model.StepReturnRequest; -import fr.obeo.dsl.debug.ide.event.model.SuspendRequest; -import fr.obeo.dsl.debug.ide.event.model.TerminateRequest; -import fr.obeo.dsl.debug.ide.event.model.ValidateVariableValueRequest; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; - -/** - * Base {@link IDSLDebugger debugger} implementation. - * - * @author Yvan Lussaud - */ -public abstract class AbstractDSLDebugger implements IDSLDebugger { - - /** - * The {@link fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous - * communication or the {@link fr.obeo.dsl.debug.ide.DSLDebugTargetAdapter target} for synchronous - * communication. - */ - protected final IDSLDebugEventProcessor target; - - /** - * Thread name to current instruction. For check purpose only. - */ - protected final Map currentInstructions = new HashMap(); - - /** - * Tells if the debugger is terminated. - */ - private boolean terminated; - - /** - * Mapping form thread name to the thread controller. - */ - private final Map controllers = new ConcurrentHashMap(); - - /** - * Instructions marked as breakpoints with their attributes. - */ - private final Map> breakpoints = new HashMap>(); - - /** - * Constructor. - * - * @param target - * the {@link fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous - * communication or the {@link fr.obeo.dsl.debug.ide.DSLDebugTargetAdapter target} for - * synchronous communication - */ - public AbstractDSLDebugger(IDSLDebugEventProcessor target) { - this.target = target; - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent) - */ - public Object handleEvent(IDSLDebugEvent event) { - Object res = null; - - if (event instanceof DisconnectRequest) { - disconnect(); - } else if (event instanceof AbstractStepRequest) { - handleStepRequest((AbstractStepRequest)event); - } else if (event instanceof ResumeRequest) { - handleResumeRequest((ResumeRequest)event); - } else if (event instanceof SuspendRequest) { - handleSuspendRequest((SuspendRequest)event); - } else if (event instanceof TerminateRequest) { - handleTerminateRequest((TerminateRequest)event); - } else if (event instanceof AbstractBreakpointRequest) { - handleBreakpointRequest((AbstractBreakpointRequest)event); - } else if (event instanceof ValidateVariableValueRequest) { - res = handleValidateVariableValueRequest((ValidateVariableValueRequest)event); - } else if (event instanceof SetVariableValueRequest) { - handleSetVariableValueRequest((SetVariableValueRequest)event); - } else if (event instanceof StartRequest) { - start(); - } - - return res; - } - - /** - * Handles {@link SetVariableValueRequest}. - * - * @param event - * the {@link SetVariableValueRequest} - */ - private void handleSetVariableValueRequest(SetVariableValueRequest event) { - final Object value = getVariableValue(event.getThreadName(), event.getStackName(), event - .getVariableName(), event.getValue()); - setVariableValue(event.getThreadName(), event.getStackName(), event.getVariableName(), value); - target.handleEvent(new SetVariableValueReply(event.getThreadName(), event.getStackName(), event - .getVariableName(), value)); - } - - /** - * Handles {@link ValidateVariableValueRequest}. - * - * @param event - * the {@link ValidateVariableValueRequest} - * @return true if the value is valid, false otherwise - */ - private Object handleValidateVariableValueRequest(ValidateVariableValueRequest event) { - return Boolean.valueOf(validateVariableValue(event.getThreadName(), event.getVariableName(), event - .getValue())); - } - - /** - * Handles {@link AbstractBreakpointRequest}. - * - * @param breakpointRequest - * the {@link AbstractBreakpointRequest} - */ - private void handleBreakpointRequest(AbstractBreakpointRequest breakpointRequest) { - if (breakpointRequest instanceof AddBreakpointRequest) { - addBreakPoint(breakpointRequest.getURI()); - } else if (breakpointRequest instanceof RemoveBreakpointRequest) { - removeBreakPoint(breakpointRequest.getURI()); - } else if (breakpointRequest instanceof ChangeBreakPointRequest) { - changeBreakPoint(breakpointRequest.getURI(), ((ChangeBreakPointRequest)breakpointRequest) - .getAttribute(), ((ChangeBreakPointRequest)breakpointRequest).getValue()); - } - } - - /** - * Handles {@link TerminateRequest}. - * - * @param terminateRequest - * the {@link TerminateRequest} - */ - private void handleTerminateRequest(TerminateRequest terminateRequest) { - final String threadName = terminateRequest.getThreadName(); - if (threadName != null) { - terminate(threadName); - // target.handleEvent(new TerminatedReply(threadName)); - } else { - terminate(); - target.handleEvent(new TerminatedReply()); - } - } - - /** - * Handles {@link SuspendRequest}. - * - * @param suspendRequest - * the {@link SuspendRequest} - */ - private void handleSuspendRequest(SuspendRequest suspendRequest) { - final String threadName = suspendRequest.getThreadName(); - if (threadName != null) { - suspend(threadName); - } else { - suspend(); - } - } - - /** - * Handles {@link ResumeRequest}. - * - * @param resumeRequest - * the {@link ResumeRequest} - */ - private void handleResumeRequest(ResumeRequest resumeRequest) { - final String threadName = resumeRequest.getThreadName(); - if (threadName != null) { - resume(threadName); - } else { - resume(); - } - } - - /** - * Handles {@link AbstractStepRequest}. - * - * @param stepRequest - * the {@link AbstractStepRequest} - */ - private void handleStepRequest(AbstractStepRequest stepRequest) { - final String threadName = stepRequest.getThreadName(); - if (stepRequest.getInstrcution() != currentInstructions.get(threadName)) { - throw new IllegalStateException("instruction desynchronization."); - } - if (stepRequest instanceof StepIntoRequest) { - stepInto(threadName); - } else if (stepRequest instanceof StepOverRequest) { - stepOver(threadName); - } else if (stepRequest instanceof StepReturnRequest) { - stepReturn(threadName); - } - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#stepped(java.lang.String) - */ - public void stepped(final String threadName) { - target.handleEvent(new SteppedReply(threadName)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#suspended(java.lang.String) - */ - public void suspended(String threadName) { - target.handleEvent(new SuspendedReply(threadName)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#breaked(java.lang.String) - */ - public void breaked(String threadName) { - target.handleEvent(new BreakpointReply(threadName)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#resuming(java.lang.String) - */ - public void resuming(String threadName) { - target.handleEvent(new ResumingReply(threadName)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#steppingInto(java.lang.String) - */ - public void steppingInto(String threadName) { - target.handleEvent(new StepIntoResumingReply(threadName)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#steppingOver(java.lang.String) - */ - public void steppingOver(String threadName) { - target.handleEvent(new StepOverResumingReply(threadName)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#steppingReturn(java.lang.String) - */ - public void steppingReturn(String threadName) { - target.handleEvent(new StepReturnResumingReply(threadName)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#terminated() - */ - public void terminated() { - target.handleEvent(new TerminatedReply()); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#spawnRunningThread(java.lang.String, - * org.eclipse.emf.ecore.EObject) - */ - public void spawnRunningThread(String threadName, EObject context) { - target.handleEvent(new SpawnRunningThreadReply(threadName, context)); - controllers.put(threadName, createThreadHandler(threadName)); - } - - /** - * Creates a {@link ThreadController} for the given thread. if the thread is a new Java {@link Thread} a - * new instance should be created, if not the {@link ThreadController} for the existing Java - * {@link Thread} should be returned. - * - * @param threadName - * the thread name - * @return if the thread is a new Java {@link Thread} a new instance should be created, if not the - * {@link ThreadController} for the existing Java {@link Thread} should be returned - */ - protected ThreadController createThreadHandler(String threadName) { - return new ThreadController(this, threadName); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#setTerminated(boolean) - */ - public void setTerminated(boolean terminated) { - this.terminated = terminated; - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#isTerminated() - */ - public boolean isTerminated() { - return terminated; - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#getNextInstruction(java.lang.String, - * org.eclipse.emf.ecore.EObject, fr.obeo.dsl.debug.ide.IDSLDebugger.Stepping) - */ - public EObject getNextInstruction(String threadName, EObject currentInstruction, Stepping stepping) { - return null; - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#shouldBreak(org.eclipse.emf.ecore.EObject) - */ - public boolean shouldBreak(EObject instruction) { - final boolean res; - - res = getBreakpointAttributes(instruction, IBreakpoint.ENABLED) == Boolean.TRUE; - - return res; - } - - /** - * Gets the value of the given breakpoint attribute. - * - * @param instruction - * the instruction referenced in the breakpoint - * @param attribute - * the attribute - * @return the value of the given breakpoint attribute if any, null otherwise - */ - protected Serializable getBreakpointAttributes(EObject instruction, String attribute) { - final Serializable res; - - Map attributes = breakpoints.get(EcoreUtil.getURI(instruction)); - if (attributes != null) { - res = attributes.get(attribute); - } else { - res = null; - } - - return res; - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#addBreakPoint(org.eclipse.emf.common.util.URI) - */ - public void addBreakPoint(URI instruction) { - breakpoints.put(instruction, new HashMap()); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#removeBreakPoint(org.eclipse.emf.common.util.URI) - */ - public void removeBreakPoint(URI instruction) { - breakpoints.remove(instruction); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#changeBreakPoint(org.eclipse.emf.common.util.URI, - * java.lang.String, java.io.Serializable) - */ - public void changeBreakPoint(URI instruction, String attribute, Serializable value) { - final Map attributes = breakpoints.get(instruction); - attributes.put(attribute, value); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#control(java.lang.String, org.eclipse.emf.ecore.EObject) - */ - public boolean control(String threadName, EObject instruction) { - final boolean res; - if (!isTerminated()) { - res = controllers.get(threadName).control(instruction); - } else { - res = false; - } - return res; - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#resume(java.lang.String) - */ - public void resume(String threadName) { - controllers.get(threadName).resume(); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#stepInto(java.lang.String) - */ - public void stepInto(String threadName) { - controllers.get(threadName).stepInto(); - }; - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#stepOver(java.lang.String) - */ - public void stepOver(String threadName) { - controllers.get(threadName).stepOver(); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#stepReturn(java.lang.String) - */ - public void stepReturn(String threadName) { - controllers.get(threadName).stepReturn(); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#suspend(java.lang.String) - */ - public void suspend(String threadName) { - controllers.get(threadName).suspend(); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#terminate() - */ - public void terminate() { - setTerminated(true); - for (ThreadController controler : controllers.values()) { - synchronized(controler) { - controler.wakeUp(); - } - } - controllers.clear(); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#terminate(java.lang.String) - */ - public void terminate(String threadName) { - controllers.get(threadName).terminate(); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#suspend() - */ - public void suspend() { - for (ThreadController controler : controllers.values()) { - controler.suspend(); - } - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#resume() - */ - public void resume() { - for (ThreadController controler : controllers.values()) { - controler.resume(); - } - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#variable(java.lang.String, java.lang.String, java.lang.String, - * java.lang.Object, boolean) - */ - public void variable(String threadName, String stackName, String declarationTypeName, - String variableName, Object value, boolean supportModifications) { - target.handleEvent(new VariableReply(threadName, stackName, declarationTypeName, variableName, value, - supportModifications)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#deleteVariable(java.lang.String, java.lang.String) - */ - public void deleteVariable(String threadName, String name) { - target.handleEvent(new DeleteVariableReply(threadName, name)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#pushStackFrame(java.lang.String, java.lang.String, - * org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject) - */ - public void pushStackFrame(String threadName, String frameName, EObject context, EObject instruction) { - currentInstructions.put(threadName, instruction); - target.handleEvent(new PushStackFrameReply(threadName, frameName, context, instruction, canStepInto( - threadName, instruction))); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#popStackFrame(java.lang.String) - */ - public void popStackFrame(String threadName) { - target.handleEvent(new PopStackFrameReply(threadName)); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#setCurrentInstruction(java.lang.String, - * org.eclipse.emf.ecore.EObject) - */ - public void setCurrentInstruction(String threadName, EObject instruction) { - currentInstructions.put(threadName, instruction); - target.handleEvent(new SetCurrentInstructionReply(threadName, instruction, canStepInto(threadName, - instruction))); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#terminated(java.lang.String) - */ - public void terminated(String threadName) { - target.handleEvent(new TerminatedReply(threadName)); - controllers.remove(threadName); - if (controllers.size() == 0) { - setTerminated(true); - terminated(); - } - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IDSLDebugger#isTerminated(java.lang.String) - */ - public boolean isTerminated(String threadName) { - return !controllers.containsKey(threadName); - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/Activator.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/Activator.java deleted file mode 100644 index 9a0915d28..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/Activator.java +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide; - -import java.lang.reflect.InvocationTargetException; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.core.runtime.Status; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle. - * - * @author Yvan Lussaud - */ -public class Activator extends Plugin { - - /** - * The plug-in ID. - */ - public static final String PLUGIN_ID = "fr.obeo.dsl.debug.ide"; //$NON-NLS-1$ - - /** - * The shared instance. - */ - private static Activator plugin; - - /** - * Constructor. - */ - public Activator() { - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance. - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Log an informative message into the Eclipse log file. - * - * @param message - * the message to log - */ - public void info(String message) { - log(message, IStatus.INFO); - } - - /** - * Log a debug message into the Eclipse log file. - * - * @param message - * the message to log - */ - public void debug(String message) { - if (isDebugEnabled()) { - log("[DEBUG] " + message, IStatus.INFO); - } - } - - /** - * Test if the platform is in debug mode. - * - * @return True if the platform is in debug mode. - */ - public boolean isDebugEnabled() { - if (plugin != null) { - return Platform.inDebugMode(); - } - - return false; - } - - /** - * Log a message with given level into the Eclipse log file. - * - * @param message - * the message to log - * @param level - * the message priority - */ - private void log(String message, int level) { - log(new Status(level, PLUGIN_ID, message)); - } - - /** - * Logs the given {@link Status}. - * - * @param status - * the {@link Status} - */ - private void log(IStatus status) { - - if (plugin == null) { - // TODO Do log with java ? - } else { - plugin.getLog().log(status); - } - } - - /** - * Log a warning message. - * - * @param message - * the exception to log - */ - public void warn(String message) { - log(message, IStatus.WARNING); - } - - /** - * Log an exception into the Eclipse log file. - * - * @param e - * the exception to log - */ - public void error(Throwable e) { - error("Unexpected Error", e); - } - - /** - * Log an exception into the Eclipse log file. - * - * @param message - * the message - * @param e - * the exception to log - */ - public void error(String message, Throwable e) { - - Throwable t = e; - if (e instanceof InvocationTargetException) { - t = ((InvocationTargetException)e).getTargetException(); - } - - IStatus status; - if (t instanceof CoreException) { - status = ((CoreException)t).getStatus(); - } else { - status = new Status(IStatus.ERROR, PLUGIN_ID, message, e); - } - - log(status); - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLEclipseDebugIntegration.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLEclipseDebugIntegration.java deleted file mode 100644 index 22e059ccc..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLEclipseDebugIntegration.java +++ /dev/null @@ -1,527 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide; - -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.Thread; -import fr.obeo.dsl.debug.Variable; -import fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter; -import fr.obeo.dsl.debug.ide.adapter.DSLStackFrameAdapter; -import fr.obeo.dsl.debug.ide.adapter.DSLThreadAdapter; -import fr.obeo.dsl.debug.ide.adapter.DSLVariableAdapter; -import fr.obeo.dsl.debug.ide.adapter.value.DSLArrayValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLBooleanArrayValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLByteArrayValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLCharArrayValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLDoubleArrayValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLEObjectValueAdapter; -import fr.obeo.dsl.debug.ide.adapter.value.DSLFloatArrayValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLIntArrayValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLLongArrayValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLNullValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLObjectValue; -import fr.obeo.dsl.debug.ide.adapter.value.DSLShortArrayValue; -import fr.obeo.dsl.debug.ide.adapter.variable.DSLObjectVariable; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; -import fr.obeo.dsl.debug.provider.DebugItemProviderAdapterFactory; -import fr.obeo.dsl.debug.util.DebugAdapterFactory; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.model.IThread; -import org.eclipse.debug.core.model.IValue; -import org.eclipse.debug.core.model.IVariable; -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; -import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; - -/** - * A {@link DebugAdapterFactory} providing {@link org.eclipse.debug.core.model.IDebugElement IDebugElement}. - * - * @author Yvan Lussaud - */ -public class DSLEclipseDebugIntegration extends DebugAdapterFactory { - - /** - * {@link Set} of {@link org.eclipse.emf.common.notify.AdapterFactory#isFactoryForType(Object) supported - * types}. - */ - private static final Set SUPPORTED_TYPES = initSupportedTypes(); - - /** - * The launching debug session. - */ - private final ILaunch launch; - - /** - * A generic {@link org.eclipse.emf.edit.provider.IItemLabelProvider IItemLabelProvider} factory. - */ - private final ComposedAdapterFactory genericLabelFactory; - - /** - * The {@link fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous - * communication or the {@link fr.obeo.dsl.debug.ide.IDSLDebugger debugger} for synchronous communication. - */ - private final IDSLDebugEventProcessor debugger; - - /** - * The {@link DSLDebugTargetAdapter} to work with. - */ - private final DSLDebugTargetAdapter debugTarget; - - /** - * The {@link IModelUpdater} responsible for EMF debug model updates. - */ - private final IModelUpdater modelUpdater; - - /** - * The debug model identifier. - */ - private final String identifier; - - /** - * Constructor. - * - * @param identifier - * the debug model identifier - * @param launch - * the launching debug session - * @param debugTarget - * the {@link DebugTarget} - * @param modelUpdater - * the {@link IModelUpdater} - * @param debugger - * the {@link fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous - * communication or the {@link fr.obeo.dsl.debug.ide.IDSLDebugger debugger} for synchronous - * communication - */ - public DSLEclipseDebugIntegration(String identifier, ILaunch launch, DebugTarget debugTarget, - IModelUpdater modelUpdater, IDSLDebugEventProcessor debugger) { - this.identifier = identifier; - this.launch = launch; - this.debugger = debugger; - - this.debugTarget = getDebugTarget(debugTarget); - this.modelUpdater = modelUpdater; - - genericLabelFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - genericLabelFactory.addAdapterFactory(new DebugItemProviderAdapterFactory()); - genericLabelFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); - genericLabelFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); - } - - /** - * Initializes {@link DSLEclipseDebugIntegration#SUPPORTED_TYPES}. - * - * @return the {@link Set} of - * {@link org.eclipse.emf.common.notify.AdapterFactory#isFactoryForType(Object) supported types}. - */ - private static Set initSupportedTypes() { - final Set res = new HashSet(); - - res.add(IThread.class); - res.add(IDebugTarget.class); - res.add(IStackFrame.class); - res.add(IVariable.class); - res.add(IBreakpoint.class); - - return res; - } - - @Override - public boolean isFactoryForType(Object object) { - return SUPPORTED_TYPES.contains(object) || super.isFactoryForType(object); - } - - @Override - public Adapter createDebugTargetAdapter() { - return new DSLDebugTargetAdapter(this); - } - - @Override - public Adapter createThreadAdapter() { - return new DSLThreadAdapter(this); - } - - @Override - public Adapter createStackFrameAdapter() { - return new DSLStackFrameAdapter(this); - } - - @Override - public Adapter createVariableAdapter() { - return new DSLVariableAdapter(this); - } - - /** - * Gets the launching debug session. - * - * @return the launching debug session - */ - public ILaunch getLaunch() { - return launch; - } - - /** - * Gets the {@link fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous - * communication or the {@link fr.obeo.dsl.debug.ide.IDSLDebugger debugger} for synchronous communication. - * - * @return the {@link fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous - * communication or the {@link fr.obeo.dsl.debug.ide.IDSLDebugger debugger} for synchronous - * communication - */ - public IDSLDebugEventProcessor getDebugger() { - return debugger; - } - - /** - * Gets a generic {@link org.eclipse.emf.edit.provider.IItemLabelProvider IItemLabelProvider} factory. - * - * @return a generic {@link org.eclipse.emf.edit.provider.IItemLabelProvider IItemLabelProvider} factory - */ - public AdapterFactory getLabelFactory() { - return genericLabelFactory; - } - - /** - * Gets the {@link DSLDebugTargetAdapter} to work with. - * - * @return the {@link DSLDebugTargetAdapter} to work with - */ - public DSLDebugTargetAdapter getDebugTarget() { - return debugTarget; - } - - /** - * Gets an {@link IDebugTarget} form a {@link DebugTarget}. - * - * @param target - * the {@link DebugTarget} - * @return the {@link IDebugTarget} - */ - public DSLDebugTargetAdapter getDebugTarget(DebugTarget target) { - final DSLDebugTargetAdapter res = (DSLDebugTargetAdapter)adapt(target, IDebugTarget.class); - if (res == null) { - throw new IllegalStateException("can't addapt DebugTarget to IDebugTarget."); - } - return res; - } - - /** - * Gets an {@link IThread} form a {@link Thread}. - * - * @param thread - * the {@link Thread} - * @return the {@link IThread} - */ - public DSLThreadAdapter getThread(Thread thread) { - final DSLThreadAdapter res = (DSLThreadAdapter)adapt(thread, IThread.class); - if (res == null) { - throw new IllegalStateException("can't addapt Thread to IThread."); - } - return res; - } - - /** - * Gets an {@link IStackFrame} form a {@link StackFrame}. - * - * @param frame - * the {@link StackFrame} - * @return the {@link IStackFrame} - */ - public DSLStackFrameAdapter getStackFrame(StackFrame frame) { - final DSLStackFrameAdapter res = (DSLStackFrameAdapter)adapt(frame, IStackFrame.class); - if (res == null) { - throw new IllegalStateException("can't addapt StackFrame to IStackFrame."); - } - return res; - } - - /** - * Gets an {@link IVariable} form a {@link Variable}. - * - * @param variable - * the {@link Variable} - * @return the {@link IVariable} - */ - public DSLVariableAdapter getVariable(Variable variable) { - final DSLVariableAdapter res = (DSLVariableAdapter)adapt(variable, IVariable.class); - if (res == null) { - throw new IllegalStateException("can't addapt Variable to IVariable."); - } - return res; - } - - /** - * Gets the {@link IValue} for the given {@link Object}. - * - * @param referenceTypeName - * the reference type name - * @param value - * the {@link Object value} - * @return the corresponding {@link IValue} - */ - public IValue getValue(String referenceTypeName, Object value) { - final IValue res; - - if (value instanceof EObject) { - res = createEObjectValue(referenceTypeName, (EObject)value); - } else if (value instanceof Collection) { - res = new DSLArrayValue(this, referenceTypeName, ((Collection)value).toArray()); - } else if (value instanceof Object[]) { - res = new DSLArrayValue(this, referenceTypeName, (Object[])value); - } else if (value instanceof byte[]) { - res = createByteArrayValue(referenceTypeName, (byte[])value); - } else if (value instanceof short[]) { - res = createShortArrayValue(referenceTypeName, (short[])value); - } else if (value instanceof int[]) { - res = createIntegerArrayValue(referenceTypeName, (int[])value); - } else if (value instanceof long[]) { - res = createLongArrayValue(referenceTypeName, (long[])value); - } else if (value instanceof float[]) { - res = createFloatArrayValue(referenceTypeName, (float[])value); - } else if (value instanceof double[]) { - res = createDoubleArrayValue(referenceTypeName, (double[])value); - } else if (value instanceof char[]) { - res = createCharacterArrayValue(referenceTypeName, (char[])value); - } else if (value instanceof boolean[]) { - res = createBooleanArrayValue(referenceTypeName, (boolean[])value); - } else if (value == null) { - res = new DSLNullValue(this, referenceTypeName); - } else { - res = new DSLObjectValue(this, referenceTypeName, value); - } - - return res; - } - - /** - * Creates an {@link IValue} for the given {@link EObject}. - * - * @param referenceTypeName - * the reference type name - * @param value - * the {@link EObject} - * @return the created {@link IValue} - */ - private IValue createEObjectValue(String referenceTypeName, EObject value) { - final IValue res; - DSLEObjectValueAdapter valueAdapter = null; - for (Adapter adapter : value.eAdapters()) { - if (adapter.isAdapterForType(IValue.class)) { - valueAdapter = (DSLEObjectValueAdapter)adapter; - break; - } - } - if (valueAdapter == null) { - valueAdapter = new DSLEObjectValueAdapter(this, referenceTypeName, value); - value.eAdapters().add(valueAdapter); - } - res = valueAdapter; - return res; - } - - /** - * Creates an {@link IValue} for a byte[]. - * - * @param referenceTypeName - * the reference type name - * @param value - * the byte[] - * @return the created {@link IValue} - */ - private IValue createByteArrayValue(String referenceTypeName, byte[] value) { - final IValue res; - Byte[] array = new Byte[value.length]; - for (int i = 0; i < value.length; ++i) { - array[i] = Byte.valueOf(value[i]); - } - res = new DSLByteArrayValue(this, referenceTypeName, array); - return res; - } - - /** - * Creates an {@link IValue} for a short[]. - * - * @param referenceTypeName - * the reference type name - * @param value - * the short[] - * @return the created {@link IValue} - */ - private IValue createShortArrayValue(String referenceTypeName, short[] value) { - final IValue res; - Short[] array = new Short[value.length]; - for (int i = 0; i < value.length; ++i) { - array[i] = Short.valueOf(value[i]); - } - res = new DSLShortArrayValue(this, referenceTypeName, array); - return res; - } - - /** - * Creates an {@link IValue} for a int[]. - * - * @param referenceTypeName - * the reference type name - * @param value - * the int[] - * @return the created {@link IValue} - */ - private IValue createIntegerArrayValue(String referenceTypeName, int[] value) { - final IValue res; - Integer[] array = new Integer[value.length]; - for (int i = 0; i < value.length; ++i) { - array[i] = Integer.valueOf(value[i]); - } - res = new DSLIntArrayValue(this, referenceTypeName, array); - return res; - } - - /** - * Creates an {@link IValue} for a long[]. - * - * @param referenceTypeName - * the reference type name - * @param value - * the long[] - * @return the created {@link IValue} - */ - private IValue createLongArrayValue(String referenceTypeName, long[] value) { - final IValue res; - Long[] array = new Long[value.length]; - for (int i = 0; i < value.length; ++i) { - array[i] = Long.valueOf(value[i]); - } - res = new DSLLongArrayValue(this, referenceTypeName, array); - return res; - } - - /** - * Creates an {@link IValue} for a float[]. - * - * @param referenceTypeName - * the reference type name - * @param value - * the float[] - * @return the created {@link IValue} - */ - private IValue createFloatArrayValue(String referenceTypeName, float[] value) { - final IValue res; - Float[] array = new Float[value.length]; - for (int i = 0; i < value.length; ++i) { - array[i] = Float.valueOf(value[i]); - } - res = new DSLFloatArrayValue(this, referenceTypeName, array); - return res; - } - - /** - * Creates an {@link IValue} for a double[]. - * - * @param referenceTypeName - * the reference type name - * @param value - * the double[] - * @return the created {@link IValue} - */ - private IValue createDoubleArrayValue(String referenceTypeName, double[] value) { - final IValue res; - Double[] array = new Double[value.length]; - for (int i = 0; i < value.length; ++i) { - array[i] = Double.valueOf(value[i]); - } - res = new DSLDoubleArrayValue(this, referenceTypeName, array); - return res; - } - - /** - * Creates an {@link IValue} for a char[]. - * - * @param referenceTypeName - * the reference type name - * @param value - * the char[] - * @return the created {@link IValue} - */ - private IValue createCharacterArrayValue(String referenceTypeName, char[] value) { - final IValue res; - Character[] array = new Character[value.length]; - for (int i = 0; i < value.length; ++i) { - array[i] = Character.valueOf(value[i]); - } - res = new DSLCharArrayValue(this, referenceTypeName, array); - return res; - } - - /** - * Creates an {@link IValue} for a boolean[]. - * - * @param referenceTypeName - * the reference type name - * @param value - * the boolean[] - * @return the created {@link IValue} - */ - private IValue createBooleanArrayValue(String referenceTypeName, boolean[] value) { - final IValue res; - Boolean[] array = new Boolean[value.length]; - for (int i = 0; i < value.length; ++i) { - array[i] = Boolean.valueOf(value[i]); - } - res = new DSLBooleanArrayValue(this, referenceTypeName, array); - return res; - } - - /** - * Gets a {@link IVariable} for the given {@link Object}. - * - * @param referenceTypeName - * the reference type name - * @param variableName - * the variable name - * @param value - * the value - * @return the {@link IVariable} - */ - public IVariable getVariable(String referenceTypeName, String variableName, Object value) { - return new DSLObjectVariable(this, referenceTypeName, variableName, value); - } - - /** - * Gets the {@link IModelUpdater} responsible for EMF debug model updates. - * - * @return the {@link IModelUpdater} responsible for EMF debug model updates - */ - public IModelUpdater getModelUpdater() { - return modelUpdater; - } - - /** - * Gets the debug model identifier. - * - * @return the debug model identifier - */ - public String getModelIdentifier() { - return identifier; - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLSourceLocator.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLSourceLocator.java deleted file mode 100644 index 5b6f39df2..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLSourceLocator.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide; - -import fr.obeo.dsl.debug.ide.adapter.DSLStackFrameAdapter; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.sourcelookup.IPersistableSourceLocator2; -import org.eclipse.emf.ecore.EObject; - -/** - * DSL debugger {@link org.eclipse.debug.core.model.ISourceLocator ISourceLocator}. - * - * @author Yvan Lussaud - */ -public class DSLSourceLocator implements IPersistableSourceLocator2 { - - public String getMemento() throws CoreException { - // TODO Auto-generated method stub - return ""; - } - - public void initializeFromMemento(String memento) throws CoreException { - // TODO Auto-generated method stub - - } - - public void initializeDefaults(ILaunchConfiguration configuration) throws CoreException { - // TODO Auto-generated method stub - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.core.model.ISourceLocator#getSourceElement(org.eclipse.debug.core.model.IStackFrame) - */ - public Object getSourceElement(IStackFrame stackFrame) { - final Object res; - if (stackFrame instanceof DSLStackFrameAdapter) { - final DSLStackFrameAdapter eStackFrame = (DSLStackFrameAdapter)stackFrame; - final EObject instruction = eStackFrame.getCurrentInstruction(); - if (instruction != null) { - res = instruction; - } else { - res = eStackFrame.getContext(); - } - } else { - res = null; - } - return res; - } - - public void initializeFromMemento(String memento, ILaunchConfiguration configuration) - throws CoreException { - // TODO Auto-generated method stub - - } - - public void dispose() { - // TODO Auto-generated method stub - - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/IModelUpdater.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/IModelUpdater.java deleted file mode 100644 index 24fd96a73..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/IModelUpdater.java +++ /dev/null @@ -1,217 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide; - -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.Thread; -import fr.obeo.dsl.debug.Variable; - -import org.eclipse.emf.ecore.EObject; - -/** - * Class responsible for EMF debug model updates. - * - * @author Yvan Lussaud - */ -public interface IModelUpdater { - - /** - * Requests the termination the given {@link DebugTarget}. The {@link DebugTarget} - * {@link DebugTarget#getfr.obeo.dsl.debug.State() fr.obeo.dsl.debug.State} must be - * {@link fr.obeo.dsl.debug.DebugTargetfr.obeo.dsl.debug.State#CONNECTED connected}. - * - * @param target - * the {@link DebugTarget} - */ - void terminateRequest(DebugTarget target); - - /** - * Requests disconnection the given {@link DebugTarget}. - * - * @param target - * the {@link DebugTarget} - */ - void disconnectRequest(DebugTarget target); - - /** - * Spawn a running {@link Thread} in the given {@link DebugTarget}. - * - * @param target - * the {@link DebugTarget} that will contains the spawned {@link Thread} - * @param threadName - * the {@link Thread#getName() thread name} - * @param threadContext - * the {@link Thread#getContext() thread context} - */ - void spawnRunningThreadReply(DebugTarget target, String threadName, EObject threadContext); - - /** - * Notify the {@link fr.obeo.dsl.debug.DebugTargetUtils#terminateRequest(DebugTarget) termination} is done - * for the given {@link DebugTarget}. The {@link DebugTarget} - * {@link DebugTarget#getfr.obeo.dsl.debug.State() fr.obeo.dsl.debug.State} must be - * {@link fr.obeo.dsl.debug.DebugTargetfr.obeo.dsl.debug.State#TERMINATING terminating}. - * - * @param target - * the {@link DebugTarget} - */ - void terminatedReply(DebugTarget target); - - /** - * Notify the deletion of the {@link fr.obeo.dsl.debug.Variable Variable} with the given - * {@link fr.obeo.dsl.debug.Variable#getName() name} in the given {@link Thread}. - * - * @param thread - * the {@link Thread} - * @param name - * the {@link fr.obeo.dsl.debug.Variable#getName() variable name} - */ - void deleteVariableReply(Thread thread, String name); - - /** - * Notify popping the {@link Thread#getTopStackFrame() top stack frame} of the given {@link Thread}. - * - * @param thread - * the {@link Thread} - * @return the popped {@link StackFrame} - */ - StackFrame popStackFrameReply(Thread thread); - - /** - * Notify pushing a new {@link fr.obeo.dsl.debug.StackFrame StackFrame} with the given - * {@link fr.obeo.dsl.debug.StackFrame#getName() name} in the given {@link Thread}. - * - * @param thread - * the {@link Thread} - * @param name - * the {@link fr.obeo.dsl.debug.StackFrame#getName() stack frame name} - * @param context - * the {@link fr.obeo.dsl.debug.StackFrame#getContext() context} - * @param instruction - * the {@link fr.obeo.dsl.debug.StackFrame#getCurrentInstruction() current instruction} - * @param canStepInto - * tells if we can {@link fr.obeo.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction() step - * into} the current instruction - * @return the pushed {@link StackFrame} - */ - StackFrame pushStackFrameReply(Thread thread, String name, EObject context, EObject instruction, - boolean canStepInto); - - /** - * Request to step into the given {@link Thread}. The {@link Thread} - * {@link Thread#getfr.obeo.dsl.debug.State() fr.obeo.dsl.debug.State} must be - * {@link fr.obeo.dsl.debug.State#SUSPENDED suspended}. - * - * @param thread - * the {@link Thread} - */ - void stepIntoReply(Thread thread); - - /** - * Request to step over the given {@link Thread}. The {@link Thread} - * {@link Thread#getfr.obeo.dsl.debug.State() fr.obeo.dsl.debug.State} must be - * {@link fr.obeo.dsl.debug.State#SUSPENDED suspended}. - * - * @param thread - * the {@link Thread} - */ - void stepOverReply(Thread thread); - - /** - * Request to step return the given {@link Thread}. The {@link Thread} - * {@link Thread#getfr.obeo.dsl.debug.State() fr.obeo.dsl.debug.State} must be - * {@link fr.obeo.dsl.debug.State#SUSPENDED suspended} and the {@link Thread#getTopStackFrame() top stack - * frame} must has a {@link fr.obeo.dsl.debug.StackFrame#getParentFrame() parent frame}. - * - * @param thread - * the {@link Thread} - */ - void stepReturnReply(Thread thread); - - /** - * Requests resuming the given {@link Thread}. The {@link Thread} fr.obeo.dsl.debug.State must be - * {@link fr.obeo.dsl.debug.State#SUSPENDED suspended}. - * - * @param thread - * the {@link Thread} - */ - void resumedReply(Thread thread); - - /** - * Sets the {@link fr.obeo.dsl.debug.StackFrame#getCurrentInstruction() current instruction} of the - * {@link Thread#getTopStackFrame() top stack frame} of the given {@link Thread}. - * - * @param thread - * the {@link Thread} - * @param instruction - * the {@link fr.obeo.dsl.debug.StackFrame#getCurrentInstruction() current instruction} - * @param canStepInto - * tells if we can {@link fr.obeo.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction() step - * into the current instruction} - */ - void setCurrentInstructionReply(Thread thread, EObject instruction, boolean canStepInto); - - /** - * Notify the suspension of the given {@link Thread} to the given - * {@link fr.obeo.dsl.debug.StackFrame#getCurrentInstruction() instruction}. - * - * @param thread - * the {@link Thread} - */ - void suspendedReply(Thread thread); - - /** - * Notify the {@link terminateRequest termination} is done for the given {@link Thread} . The - * {@link Thread} {@link Thread#getfr.obeo.dsl.debug.State() fr.obeo.dsl.debug.State} must be - * {@link fr.obeo.dsl.debug.State#TERMINATING terminating}. - * - * @param thread - * the {@link Thread} - */ - void terminatedReply(Thread thread); - - /** - * Notify sets the {@link fr.obeo.dsl.debug.Variable Variable} with the given - * {@link fr.obeo.dsl.debug.Variable#getName() name} from the {@link Thread#getTopStackFrame() top stack - * frame} of the given {@link Thread} to the given {@link EObject value}. - * - * @param stackFrame - * the {@link StackFrame} - * @param declarationTypeName - * the {@link fr.obeo.dsl.debug.Variable#getDeclarationType() declaration type name} - * @param variableName - * the {@link fr.obeo.dsl.debug.Variable#getName() variable name} - * @param value - * the {@link Object value} to set - * @param supportModifications - * tells if the value can be changed - */ - void setVariableReply(StackFrame stackFrame, String declarationTypeName, String variableName, - Object value, boolean supportModifications); - - /** - * Notifies a value change for the given {@link Variable} after a request. - * - * @param variable - * the {@link Variable} - * @param value - * the {@link Object value} to set - */ - void setVariableValueReply(Variable variable, Object value); - - /** - * Requests the termination the given {@link Thread}. - * - * @param thread - * the {@link Thread} - */ - void terminateRequest(Thread thread); -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/ModelUpdater.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/ModelUpdater.java deleted file mode 100644 index 6cf08e3eb..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/ModelUpdater.java +++ /dev/null @@ -1,191 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide; - -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetUtils; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.Thread; -import fr.obeo.dsl.debug.ThreadUtils; -import fr.obeo.dsl.debug.Variable; - -import org.eclipse.emf.ecore.EObject; - -/** - * An EMF {@link IModelUpdater}. - * - * @author Yvan Lussaud - */ -public class ModelUpdater implements IModelUpdater { - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#terminateRequest(fr.obeo.dsl.debug.DebugTarget) - */ - public void terminateRequest(DebugTarget target) { - DebugTargetUtils.terminateRequest(target); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#disconnectRequest(fr.obeo.dsl.debug.DebugTarget) - */ - public void disconnectRequest(DebugTarget target) { - DebugTargetUtils.disconnectRequest(target); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#spawnRunningThreadReply(fr.obeo.dsl.debug.DebugTarget, - * java.lang.String, org.eclipse.emf.ecore.EObject) - */ - public void spawnRunningThreadReply(DebugTarget target, String threadName, EObject threadContext) { - DebugTargetUtils.spawnRunningThreadReply(target, threadName, threadContext); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#terminatedReply(fr.obeo.dsl.debug.DebugTarget) - */ - public void terminatedReply(DebugTarget target) { - DebugTargetUtils.terminatedReply(target); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#deleteVariableReply(fr.obeo.dsl.debug.Thread, - * java.lang.String) - */ - public void deleteVariableReply(Thread thread, String name) { - ThreadUtils.deleteVariableReply(thread, name); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#popStackFrameReply(fr.obeo.dsl.debug.Thread) - */ - public StackFrame popStackFrameReply(Thread thread) { - return ThreadUtils.popStackFrameReply(thread); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#pushStackFrameReply(fr.obeo.dsl.debug.Thread, - * java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, boolean) - */ - public StackFrame pushStackFrameReply(Thread thread, String name, EObject context, EObject instruction, - boolean canStepInto) { - return ThreadUtils.pushStackFrameReply(thread, name, context, instruction, canStepInto); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#stepIntoReply(fr.obeo.dsl.debug.Thread) - */ - public void stepIntoReply(Thread thread) { - ThreadUtils.stepIntoReply(thread); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#stepOverReply(fr.obeo.dsl.debug.Thread) - */ - public void stepOverReply(Thread thread) { - ThreadUtils.stepOverReply(thread); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#stepReturnReply(fr.obeo.dsl.debug.Thread) - */ - public void stepReturnReply(Thread thread) { - ThreadUtils.stepReturnReply(thread); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#resumedReply(fr.obeo.dsl.debug.Thread) - */ - public void resumedReply(Thread thread) { - ThreadUtils.resumedReply(thread); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#setCurrentInstructionReply(fr.obeo.dsl.debug.Thread, - * org.eclipse.emf.ecore.EObject, boolean) - */ - public void setCurrentInstructionReply(Thread thread, EObject instruction, boolean canStepInto) { - ThreadUtils.setCurrentInstructionReply(thread, instruction, canStepInto); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#suspendedReply(fr.obeo.dsl.debug.Thread) - */ - public void suspendedReply(Thread thread) { - ThreadUtils.suspendedReply(thread); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#terminatedReply(fr.obeo.dsl.debug.Thread) - */ - public void terminatedReply(Thread thread) { - ThreadUtils.terminatedReply(thread); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#setVariableReply(fr.obeo.dsl.debug.StackFrame, - * java.lang.String, java.lang.String, java.lang.Object, boolean) - */ - public void setVariableReply(StackFrame stackFrame, String declarationTypeName, String variableName, - Object value, boolean supportModifications) { - ThreadUtils.setVariableReply(stackFrame, declarationTypeName, variableName, value, - supportModifications); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#setVariableValueReply(fr.obeo.dsl.debug.Variable, - * java.lang.Object) - */ - public void setVariableValueReply(Variable variable, Object value) { - ThreadUtils.setVariableValueReply(variable, value); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#terminateRequest(fr.obeo.dsl.debug.Thread) - */ - public void terminateRequest(Thread thread) { - ThreadUtils.terminateRequest(thread); - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/IDSLDebugEvent.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/IDSLDebugEvent.java deleted file mode 100644 index d8aa5c81b..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/IDSLDebugEvent.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event; - -/** - * Communication events between the {@link fr.obeo.dsl.debug.ide.IDSLDebugger debugger} and the - * {@link fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter debug target}. - * - * @author Yvan Lussaud - */ -public interface IDSLDebugEvent { - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/AbstractThreadReply.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/AbstractThreadReply.java deleted file mode 100644 index 6c6b58fd9..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/AbstractThreadReply.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; - -/** - * A {@link fr.obeo.dsl.debug.Thread thread} contextual {@link IDSLDebuggerReply reply}. - * - * @author Yvan Lussaud - */ -public abstract class AbstractThreadReply implements IDSLDebuggerReply { - - /** - * The {@link fr.obeo.dsl.debug.Thread#getName() thread name}. - */ - private final String threadName; - - /** - * Constructor. - * - * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - */ - public AbstractThreadReply(String threadName) { - this.threadName = threadName; - } - - /** - * Gets the {@link fr.obeo.dsl.debug.Thread#getName() thread name}. - * - * @return the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - */ - public String getThreadName() { - return threadName; - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/AbstractVariableReply.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/AbstractVariableReply.java deleted file mode 100644 index 7290a8ad5..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/AbstractVariableReply.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; - -/** - * A {@link fr.obeo.dsl.debug.Varaible variable} contextual {@link IDSLDebuggerReply reply}. - * - * @author Yvan Lussaud - */ -public abstract class AbstractVariableReply extends AbstractThreadReply { - - /** - * The {@link fr.obeo.dsl.debug.StackFrame#getName() stack frame name}. - */ - private final String stackName; - - /** - * The variable name. - */ - private final String variableName; - - /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. - * - * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - * @param stackName - * the {@link fr.obeo.dsl.debug.StackFrame#getName() stack frame name} - * @param variableName - * the {@link fr.obeo.dsl.debug.Variable#getName() variable name} - */ - public AbstractVariableReply(String threadName, String stackName, String variableName) { - super(threadName); - this.stackName = stackName; - this.variableName = variableName; - } - - /** - * Gets the {@link fr.obeo.dsl.debug.StackFrame#getName() stack frame name}. - * - * @return the {@link fr.obeo.dsl.debug.StackFrame#getName() stack frame name} - */ - public String getStackName() { - return stackName; - } - - /** - * Gets the {@link fr.obeo.dsl.debug.Variable#getName() variable name}. - * - * @return the {@link fr.obeo.dsl.debug.Variable#getName() variable name} - */ - public String getVariableName() { - return variableName; - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/IDSLDebuggerReply.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/IDSLDebuggerReply.java deleted file mode 100644 index de4b58017..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/IDSLDebuggerReply.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; - -import fr.obeo.dsl.debug.ide.event.IDSLDebugEvent; - -/** - * An {@link IDSLDebugEvent debugger event} from the {@link fr.obeo.dsl.debug.ide.IDSLDebugger debugger} to - * the {@link fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter debug target}. - * - * @author Yvan Lussaud - */ -public interface IDSLDebuggerReply extends IDSLDebugEvent { - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SetVariableValueReply.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SetVariableValueReply.java deleted file mode 100644 index 75c6b07a8..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SetVariableValueReply.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; - -/** - * Reply sent when the value of a variable has been changed after a request. - * - * @author Yvan Lussaud - */ -public class SetVariableValueReply extends AbstractVariableReply { - - /** - * The value to set. - */ - Object value; - - /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. - * - * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - * @param stackName - * the {@link fr.obeo.dsl.debug.StackFrame#getName() stack frame name} - * @param variableName - * the {@link fr.obeo.dsl.debug.Variable#getName() variable name} - * @param value - * the value to set - */ - public SetVariableValueReply(String threadName, String stackName, String variableName, Object value) { - super(threadName, stackName, variableName); - this.value = value; - } - - /** - * Gets the value to set. - * - * @return the value to set - */ - public Object getValue() { - return value; - } -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/TerminatedReply.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/TerminatedReply.java deleted file mode 100644 index 50e1301a3..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/TerminatedReply.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; - - -/** - * Reply sent when the debugger or a thread is terminated. - * - * @author Yvan Lussaud - */ -public class TerminatedReply extends AbstractThreadReply { - - /** - * Constructor for {@link fr.obeo.dsl.debug.DebugTarget DebugTarget}. - */ - public TerminatedReply() { - this(null); - } - - /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. - * - * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - */ - public TerminatedReply(String threadName) { - super(threadName); - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/ValidateVariableValueReply.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/ValidateVariableValueReply.java deleted file mode 100644 index a82199e24..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/ValidateVariableValueReply.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; - -/** - * Reply sent when the thread has a new variable. - * - * @author Yvan Lussaud - */ -public class ValidateVariableValueReply extends AbstractVariableReply { - - /** - * Tells if the value is valid. - */ - boolean valid; - - /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. - * - * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - * @param stackName - * the {@link fr.obeo.dsl.debug.StackFrame#getName() stack frame name} - * @param variableName - * the {@link fr.obeo.dsl.debug.Variable#getName() variable name} - * @param valid - * tells if the value is valid - */ - public ValidateVariableValueReply(String threadName, String stackName, String variableName, boolean valid) { - super(threadName, stackName, variableName); - this.valid = valid; - } - - /** - * Tells if the value is valid. - * - * @return true if the value is valid, false otherwise - */ - public boolean isValid() { - return valid; - } -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractThreadRequest.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractThreadRequest.java deleted file mode 100644 index 8721d65e5..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractThreadRequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; - -/** - * A {@link fr.obeo.dsl.debug.Thread thread} contextual {@link IDSLModelRequest request}. - * - * @author Yvan Lussaud - */ -public abstract class AbstractThreadRequest implements IDSLModelRequest { - - /** - * The {@link fr.obeo.dsl.debug.Thread#getName() thread name}. - */ - private final String threadName; - - /** - * Constructor. - * - * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - */ - public AbstractThreadRequest(String threadName) { - this.threadName = threadName; - } - - /** - * Gets the {@link fr.obeo.dsl.debug.Thread#getName() thread name}. - * - * @return the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - */ - public String getThreadName() { - return threadName; - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractVariableRequest.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractVariableRequest.java deleted file mode 100644 index 5badafe39..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractVariableRequest.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; - -/** - * A {@link fr.obeo.dsl.debug.Thread thread} contextual {@link IDSLModelRequest request}. - * - * @author Yvan Lussaud - */ -public abstract class AbstractVariableRequest extends AbstractThreadRequest { - - /** - * The {@link fr.obeo.dsl.debug.StackFrame#getName() stack name}. - */ - private final String stackName; - - /** - * The {@link fr.obeo.dsl.debug.Variable#getName() variable name}. - */ - private final String variableName; - - /** - * Constructor. - * - * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} - * @param stackName - * the {@link fr.obeo.dsl.debug.StackFrame#getName() thread name} - * @param variableName - * the {@link fr.obeo.dsl.debug.Variable#getName() variable name} - */ - public AbstractVariableRequest(String threadName, String stackName, String variableName) { - super(threadName); - this.stackName = stackName; - this.variableName = variableName; - } - - /** - * Gets the {@link fr.obeo.dsl.debug.StackFrame#getName() stack name}. - * - * @return the {@link fr.obeo.dsl.debug.StackFrame#getName() stack name} - */ - public String getStackName() { - return stackName; - } - - /** - * Gets the {@link fr.obeo.dsl.debug.Variable#getName() variable name}. - * - * @return the {@link fr.obeo.dsl.debug.Variable#getName() variable name} - */ - public String getVariableName() { - return variableName; - } - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/IDSLModelRequest.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/IDSLModelRequest.java deleted file mode 100644 index 3081f61a0..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/IDSLModelRequest.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; - -import fr.obeo.dsl.debug.ide.event.IDSLDebugEvent; - -/** - * An {@link IDSLDebugEvent debugger event} from the - * {@link fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter debug target} to the - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger debugger}. - * - * @author Yvan Lussaud - */ -public interface IDSLModelRequest extends IDSLDebugEvent { - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/launch/AbstractDSLLaunchConfigurationDelegate.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/launch/AbstractDSLLaunchConfigurationDelegate.java deleted file mode 100644 index fd0243811..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/launch/AbstractDSLLaunchConfigurationDelegate.java +++ /dev/null @@ -1,216 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.launch; - -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetUtils; -import fr.obeo.dsl.debug.ide.Activator; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; -import fr.obeo.dsl.debug.ide.IDSLDebugger; -import fr.obeo.dsl.debug.ide.ModelUpdater; -import fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter; -import fr.obeo.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; -import fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; - -/** - * An abstract implementation of {@link ILaunchConfigurationDelegate} for DSL debugger. - * - * @author Yvan Lussaud - */ -public abstract class AbstractDSLLaunchConfigurationDelegate implements ILaunchConfigurationDelegate { - - /** - * The {@link org.eclipse.emf.ecore.resource.Resource Resource} - * {@link org.eclipse.emf.ecore.resource.Resource#getURI() URI}. - */ - public static final String RESOURCE_URI = "Resource"; - - /** - * The {@link EObject} {@link org.eclipse.emf.ecore.util.EcoreUtil#getURI(EObject) URI}. - */ - public static final String FIRST_INSTRUCTION_URI = "First Instruction"; - - /** - * {@inheritDoc} - * - * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, - * java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor) - */ - public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, - IProgressMonitor monitor) throws CoreException { - launch(getFirstInstruction(configuration), configuration, mode, launch, monitor); - } - - /** - * Launches the execution for the given first {@link EObject instruction}. - * - * @param firstInstruction - * the first {@link EObject instruction} - * @param configuration - * the {@link ILaunchConfiguration} - * @param mode - * the launch mode - * @param launch - * the {@link ILaunchConfiguration} - * @param monitor - * the {@link IProgressMonitor} - * @throws CoreException - * if execution fails - */ - protected void launch(EObject firstInstruction, ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - if (ILaunchManager.DEBUG_MODE.equals(mode)) { - DebugTarget eDebugTarget = DebugTargetUtils.createDebugTarget(getDebugTargetName(configuration, - firstInstruction), firstInstruction); - - DSLDebugEventDispatcher dispatcher = new DSLDebugEventDispatcher(); - // Connect the model to the dispatcher - DSLEclipseDebugIntegration integration = new DSLEclipseDebugIntegration(getModelIdentifier(), - launch, eDebugTarget, new ModelUpdater(), dispatcher); - final DSLDebugTargetAdapter debugTarget = integration.getDebugTarget(eDebugTarget); - dispatcher.setModel(debugTarget); - - // add current instruction listeners - for (IDSLCurrentInstructionListener listener : getCurrentInstructionListeners()) { - debugTarget.addCurrentInstructionListener(listener); - } - - // Connect the debugger to the dispatcher - IDSLDebugger debugger = getDebugger(configuration, dispatcher, firstInstruction, monitor); - dispatcher.setDebugger(debugger); - - launch.addDebugTarget(debugTarget); - - Job job = new Job(getDebugJobName(configuration, firstInstruction)) { - - @Override - protected IStatus run(IProgressMonitor monitor) { - debugTarget.start(); - return new Status(IStatus.OK, getPluginID(), "Execution was successfull"); - } - }; - job.schedule(); - } - } - - /** - * Gets the first {@link EObject instruction}. - * - * @param configuration - * the {@link ILaunchConfiguration} - * @return the first {@link EObject instruction} - */ - protected EObject getFirstInstruction(ILaunchConfiguration configuration) { - EObject res = null; - final ResourceSet rs = getResourceSet(); - - try { - rs.getResource(URI.createPlatformResourceURI(configuration.getAttribute(RESOURCE_URI, ""), true), - true); - res = rs.getEObject(URI.createURI(configuration.getAttribute(FIRST_INSTRUCTION_URI, ""), true), - true); - } catch (CoreException e) { - Activator.getDefault().error(e); - } - - return res; - } - - /** - * Gets the {@link ResourceSet} for {@link org.eclipse.emf.ecore.resource.Resource Resource} loading. - * - * @return the {@link ResourceSet} for {@link org.eclipse.emf.ecore.resource.Resource Resource} loading - */ - protected ResourceSet getResourceSet() { - return new ResourceSetImpl(); - } - - /** - * Gets the {@link List} of {@link IDSLCurrentInstructionListener} to add to the created - * {@link DSLDebugTargetAdapter}. - * - * @return the {@link List} of {@link IDSLCurrentInstructionListener} to add to the created - * {@link DSLDebugTargetAdapter} - */ - protected List getCurrentInstructionListeners() { - return new ArrayList(); - } - - /** - * Gets the {@link IDSLDebugger} to be {@link IDSLDebugger#start() started}. - * - * @param configuration - * the {@link ILaunchConfiguration} - * @param dispatcher - * the {@link DSLDebugEventDispatcher} to communicates with the {@link DebugTarget} - * @param firstInstruction - * the first {@link EObject instruction} - * @param monitor - * hte {@link IProgressMonitor} - * @return the {@link IDSLDebugger} to be {@link IDSLDebugger#start() started} - */ - protected abstract IDSLDebugger getDebugger(ILaunchConfiguration configuration, - DSLDebugEventDispatcher dispatcher, EObject firstInstruction, IProgressMonitor monitor); - - /** - * Gets the {@link DebugTarget}'s {@link DebugTarget#getName() name}. - * - * @param configuration - * the {@link ILaunchConfiguration} - * @param firstInstruction - * the first {@link EObject instruction} - * @return the {@link DebugTarget}'s {@link DebugTarget#getName() name} - */ - protected abstract String getDebugTargetName(ILaunchConfiguration configuration, EObject firstInstruction); - - /** - * Gets the debug {@link Job}'s {@link DebugTarget#getName() name}. - * - * @param configuration - * the {@link ILaunchConfiguration} - * @param firstInstruction - * the first {@link EObject instruction} - * @return the debug {@link Job}'s {@link DebugTarget#getName() name} - */ - protected abstract String getDebugJobName(ILaunchConfiguration configuration, EObject firstInstruction); - - /** - * Gets the current plug-in ID. - * - * @return the current plug-in ID - */ - protected abstract String getPluginID(); - - /** - * Gets the debug model identifier. - * - * @return the debug model identifier - */ - protected abstract String getModelIdentifier(); - -} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/.project b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/.project deleted file mode 100644 index 338b3a245..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/.project +++ /dev/null @@ -1,35 +0,0 @@ - - - fr.obeo.dsl.debug - - - - - - org.eclipse.jdt.core.javabuilder - - - - - net.sf.eclipsecs.core.CheckstyleBuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - fr.obeo.dsl.viewpoint.nature.modelingproject - org.eclipse.jdt.core.javanature - net.sf.eclipsecs.core.CheckstyleNature - org.eclipse.pde.PluginNature - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/META-INF/MANIFEST.MF deleted file mode 100644 index 688775b36..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.obeo.dsl.debug;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: fr.obeo.dsl.debug, - fr.obeo.dsl.debug.impl, - fr.obeo.dsl.debug.util -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport -Bundle-ActivationPolicy: lazy diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/build.properties b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/build.properties deleted file mode 100644 index ba0ae64bc..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/build.properties +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### - -bin.includes = .,\ - model/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties -jars.compile.order = . -source.. = src-gen/,\ - src/ -output.. = bin/ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/plugin.properties b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/plugin.properties deleted file mode 100644 index 614e9c436..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### - -pluginName = Debug Model -providerName = Obeo diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/plugin.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/plugin.xml deleted file mode 100644 index b98c2bca2..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/plugin.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/pom.xml b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/pom.xml deleted file mode 100644 index 4fffa8dbc..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug - 1.0.0-SNAPSHOT - eclipse-plugin - diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugPackage.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugPackage.java deleted file mode 100644 index cd92399d9..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugPackage.java +++ /dev/null @@ -1,1335 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -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 enum,
  • - *
  • and each data type
  • - *
- * - * - * @see fr.obeo.dsl.debug.DebugFactory - * @model kind="package" - * @generated - */ -public interface DebugPackage extends EPackage { - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * The package name. - * - * @generated - */ - String eNAME = "debug"; - - /** - * The package namespace URI. - * - * @generated - */ - String eNS_URI = "http://www.obeo.fr/dsl/debug"; - - /** - * The package namespace name. - * - * @generated - */ - String eNS_PREFIX = "debug"; - - /** - * The singleton instance of the package. - * - * @generated - */ - DebugPackage eINSTANCE = fr.obeo.dsl.debug.impl.DebugPackageImpl.init(); - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.Contextual Contextual}' class. - * - * @see fr.obeo.dsl.debug.Contextual - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getContextual() - * @generated - */ - int CONTEXTUAL = 0; - - /** - * The feature id for the 'Context' reference. - * - * @generated - * @ordered - */ - int CONTEXTUAL__CONTEXT = 0; - - /** - * The number of structural features of the 'Contextual' class. - * - * @generated - * @ordered - */ - int CONTEXTUAL_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.impl.DebugTargetImpl Target}' class. - * - * @see fr.obeo.dsl.debug.impl.DebugTargetImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getDebugTarget() - * @generated - */ - int DEBUG_TARGET = 1; - - /** - * The feature id for the 'Context' reference. - * - * @generated - * @ordered - */ - int DEBUG_TARGET__CONTEXT = CONTEXTUAL__CONTEXT; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int DEBUG_TARGET__NAME = CONTEXTUAL_FEATURE_COUNT + 0; - - /** - * The feature id for the 'State' attribute. - * - * @generated - * @ordered - */ - int DEBUG_TARGET__STATE = CONTEXTUAL_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Threads' containment reference list. - * - * - * @generated - * @ordered - */ - int DEBUG_TARGET__THREADS = CONTEXTUAL_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Target' class. - * - * @generated - * @ordered - */ - int DEBUG_TARGET_FEATURE_COUNT = CONTEXTUAL_FEATURE_COUNT + 3; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.impl.ThreadImpl Thread}' class. - * - * @see fr.obeo.dsl.debug.impl.ThreadImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getThread() - * @generated - */ - int THREAD = 2; - - /** - * The feature id for the 'Context' reference. - * - * @generated - * @ordered - */ - int THREAD__CONTEXT = CONTEXTUAL__CONTEXT; - - /** - * The feature id for the 'Bottom Stack Frame' containment reference. - * - * @generated - * @ordered - */ - int THREAD__BOTTOM_STACK_FRAME = CONTEXTUAL_FEATURE_COUNT + 0; - - /** - * The feature id for the 'State' attribute. - * - * @generated - * @ordered - */ - int THREAD__STATE = CONTEXTUAL_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Top Stack Frame' reference. - * - * @generated - * @ordered - */ - int THREAD__TOP_STACK_FRAME = CONTEXTUAL_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int THREAD__NAME = CONTEXTUAL_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Debug Target' container reference. - * - * @generated - * @ordered - */ - int THREAD__DEBUG_TARGET = CONTEXTUAL_FEATURE_COUNT + 4; - - /** - * The feature id for the 'Priority' attribute. - * - * @generated - * @ordered - */ - int THREAD__PRIORITY = CONTEXTUAL_FEATURE_COUNT + 5; - - /** - * The number of structural features of the 'Thread' class. - * - * @generated - * @ordered - */ - int THREAD_FEATURE_COUNT = CONTEXTUAL_FEATURE_COUNT + 6; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.impl.StackFrameImpl Stack Frame}' class. - * - * - * @see fr.obeo.dsl.debug.impl.StackFrameImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getStackFrame() - * @generated - */ - int STACK_FRAME = 3; - - /** - * The feature id for the 'Context' reference. - * - * @generated - * @ordered - */ - int STACK_FRAME__CONTEXT = CONTEXTUAL__CONTEXT; - - /** - * The feature id for the 'Variables' containment reference list. - * - * - * @generated - * @ordered - */ - int STACK_FRAME__VARIABLES = CONTEXTUAL_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Child Frame' containment reference. - * - * - * @generated - * @ordered - */ - int STACK_FRAME__CHILD_FRAME = CONTEXTUAL_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int STACK_FRAME__NAME = CONTEXTUAL_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Current Instruction' reference. - * - * @generated - * @ordered - */ - int STACK_FRAME__CURRENT_INSTRUCTION = CONTEXTUAL_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Can Step Into Current Instruction' attribute. - * - * @generated - * @ordered - */ - int STACK_FRAME__CAN_STEP_INTO_CURRENT_INSTRUCTION = CONTEXTUAL_FEATURE_COUNT + 4; - - /** - * The feature id for the 'Parent Frame' container reference. - * - * @generated - * @ordered - */ - int STACK_FRAME__PARENT_FRAME = CONTEXTUAL_FEATURE_COUNT + 5; - - /** - * The feature id for the 'Register Groups' containment reference list. - * - * @generated - * @ordered - */ - int STACK_FRAME__REGISTER_GROUPS = CONTEXTUAL_FEATURE_COUNT + 6; - - /** - * The number of structural features of the 'Stack Frame' class. - * - * @generated - * @ordered - */ - int STACK_FRAME_FEATURE_COUNT = CONTEXTUAL_FEATURE_COUNT + 7; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.impl.VariableImpl Variable}' class. - * - * @see fr.obeo.dsl.debug.impl.VariableImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getVariable() - * @generated - */ - int VARIABLE = 4; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int VARIABLE__NAME = 0; - - /** - * The feature id for the 'Value' attribute. - * - * @generated - * @ordered - */ - int VARIABLE__VALUE = 1; - - /** - * The feature id for the 'Value Changed' attribute. - * - * @generated - * @ordered - */ - int VARIABLE__VALUE_CHANGED = 2; - - /** - * The feature id for the 'Frame' container reference. - * - * @generated - * @ordered - */ - int VARIABLE__FRAME = 3; - - /** - * The feature id for the 'Declaration Type' attribute. - * - * @generated - * @ordered - */ - int VARIABLE__DECLARATION_TYPE = 4; - - /** - * The feature id for the 'Support Modifications' attribute. - * - * @generated - * @ordered - */ - int VARIABLE__SUPPORT_MODIFICATIONS = 5; - - /** - * The number of structural features of the 'Variable' class. - * - * @generated - * @ordered - */ - int VARIABLE_FEATURE_COUNT = 6; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.impl.CurrentSessionImpl Current Session}' - * class. - * - * @see fr.obeo.dsl.debug.impl.CurrentSessionImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getCurrentSession() - * @generated - */ - int CURRENT_SESSION = 5; - - /** - * The feature id for the 'Debug Targets' containment reference list. - * - * @generated - * @ordered - */ - int CURRENT_SESSION__DEBUG_TARGETS = 0; - - /** - * The number of structural features of the 'Current Session' class. - * - * @generated - * @ordered - */ - int CURRENT_SESSION_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.impl.RegisterGroupImpl Register Group}' - * class. - * - * @see fr.obeo.dsl.debug.impl.RegisterGroupImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getRegisterGroup() - * @generated - */ - int REGISTER_GROUP = 6; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int REGISTER_GROUP__NAME = 0; - - /** - * The feature id for the 'Registers' containment reference list. - * - * - * @generated - * @ordered - */ - int REGISTER_GROUP__REGISTERS = 1; - - /** - * The number of structural features of the 'Register Group' class. - * - * @generated - * @ordered - */ - int REGISTER_GROUP_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.impl.RegisterImpl Register}' class. - * - * @see fr.obeo.dsl.debug.impl.RegisterImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getRegister() - * @generated - */ - int REGISTER = 7; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int REGISTER__NAME = VARIABLE__NAME; - - /** - * The feature id for the 'Value' attribute. - * - * @generated - * @ordered - */ - int REGISTER__VALUE = VARIABLE__VALUE; - - /** - * The feature id for the 'Value Changed' attribute. - * - * @generated - * @ordered - */ - int REGISTER__VALUE_CHANGED = VARIABLE__VALUE_CHANGED; - - /** - * The feature id for the 'Frame' container reference. - * - * @generated - * @ordered - */ - int REGISTER__FRAME = VARIABLE__FRAME; - - /** - * The feature id for the 'Declaration Type' attribute. - * - * @generated - * @ordered - */ - int REGISTER__DECLARATION_TYPE = VARIABLE__DECLARATION_TYPE; - - /** - * The feature id for the 'Support Modifications' attribute. - * - * @generated - * @ordered - */ - int REGISTER__SUPPORT_MODIFICATIONS = VARIABLE__SUPPORT_MODIFICATIONS; - - /** - * The feature id for the 'Register Group' container reference. - * - * - * @generated - * @ordered - */ - int REGISTER__REGISTER_GROUP = VARIABLE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Register' class. - * - * @generated - * @ordered - */ - int REGISTER_FEATURE_COUNT = VARIABLE_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.DebugTargetState Target State}' enum. - * - * - * @see fr.obeo.dsl.debug.DebugTargetState - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getDebugTargetState() - * @generated - */ - int DEBUG_TARGET_STATE = 8; - - /** - * The meta object id for the '{@link fr.obeo.dsl.debug.State State}' enum. - * - * @see fr.obeo.dsl.debug.State - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getState() - * @generated - */ - int STATE = 9; - - /** - * The meta object id for the 'Object' data type. - * - * @see java.lang.Object - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getObject() - * @generated - */ - int OBJECT = 10; - - /** - * Returns the meta object for class '{@link fr.obeo.dsl.debug.Contextual Contextual}'. - * - * @return the meta object for class 'Contextual'. - * @see fr.obeo.dsl.debug.Contextual - * @generated - */ - EClass getContextual(); - - /** - * Returns the meta object for the reference '{@link fr.obeo.dsl.debug.Contextual#getContext - * Context}'. - * - * @return the meta object for the reference 'Context'. - * @see fr.obeo.dsl.debug.Contextual#getContext() - * @see #getContextual() - * @generated - */ - EReference getContextual_Context(); - - /** - * Returns the meta object for class '{@link fr.obeo.dsl.debug.DebugTarget Target}'. - * - * @return the meta object for class 'Target'. - * @see fr.obeo.dsl.debug.DebugTarget - * @generated - */ - EClass getDebugTarget(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.DebugTarget#getName Name} - * '. - * - * @return the meta object for the attribute 'Name'. - * @see fr.obeo.dsl.debug.DebugTarget#getName() - * @see #getDebugTarget() - * @generated - */ - EAttribute getDebugTarget_Name(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.DebugTarget#getState - * State}'. - * - * @return the meta object for the attribute 'State'. - * @see fr.obeo.dsl.debug.DebugTarget#getState() - * @see #getDebugTarget() - * @generated - */ - EAttribute getDebugTarget_State(); - - /** - * Returns the meta object for the containment reference list ' - * {@link fr.obeo.dsl.debug.DebugTarget#getThreads Threads}'. - * - * @return the meta object for the containment reference list 'Threads'. - * @see fr.obeo.dsl.debug.DebugTarget#getThreads() - * @see #getDebugTarget() - * @generated - */ - EReference getDebugTarget_Threads(); - - /** - * Returns the meta object for class '{@link fr.obeo.dsl.debug.Thread Thread}'. - * - * @return the meta object for class 'Thread'. - * @see fr.obeo.dsl.debug.Thread - * @generated - */ - EClass getThread(); - - /** - * Returns the meta object for the containment reference ' - * {@link fr.obeo.dsl.debug.Thread#getBottomStackFrame Bottom Stack Frame}'. - * - * @return the meta object for the containment reference 'Bottom Stack Frame'. - * @see fr.obeo.dsl.debug.Thread#getBottomStackFrame() - * @see #getThread() - * @generated - */ - EReference getThread_BottomStackFrame(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.Thread#getState State}'. - * - * - * @return the meta object for the attribute 'State'. - * @see fr.obeo.dsl.debug.Thread#getState() - * @see #getThread() - * @generated - */ - EAttribute getThread_State(); - - /** - * Returns the meta object for the reference '{@link fr.obeo.dsl.debug.Thread#getTopStackFrame - * Top Stack Frame}'. - * - * @return the meta object for the reference 'Top Stack Frame'. - * @see fr.obeo.dsl.debug.Thread#getTopStackFrame() - * @see #getThread() - * @generated - */ - EReference getThread_TopStackFrame(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.Thread#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see fr.obeo.dsl.debug.Thread#getName() - * @see #getThread() - * @generated - */ - EAttribute getThread_Name(); - - /** - * Returns the meta object for the container reference '{@link fr.obeo.dsl.debug.Thread#getDebugTarget - * Debug Target}'. - * - * @return the meta object for the container reference 'Debug Target'. - * @see fr.obeo.dsl.debug.Thread#getDebugTarget() - * @see #getThread() - * @generated - */ - EReference getThread_DebugTarget(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.Thread#getPriority - * Priority}'. - * - * @return the meta object for the attribute 'Priority'. - * @see fr.obeo.dsl.debug.Thread#getPriority() - * @see #getThread() - * @generated - */ - EAttribute getThread_Priority(); - - /** - * Returns the meta object for class '{@link fr.obeo.dsl.debug.StackFrame Stack Frame}'. - * - * @return the meta object for class 'Stack Frame'. - * @see fr.obeo.dsl.debug.StackFrame - * @generated - */ - EClass getStackFrame(); - - /** - * Returns the meta object for the containment reference list ' - * {@link fr.obeo.dsl.debug.StackFrame#getVariables Variables}'. - * - * @return the meta object for the containment reference list 'Variables'. - * @see fr.obeo.dsl.debug.StackFrame#getVariables() - * @see #getStackFrame() - * @generated - */ - EReference getStackFrame_Variables(); - - /** - * Returns the meta object for the containment reference ' - * {@link fr.obeo.dsl.debug.StackFrame#getChildFrame Child Frame}'. - * - * @return the meta object for the containment reference 'Child Frame'. - * @see fr.obeo.dsl.debug.StackFrame#getChildFrame() - * @see #getStackFrame() - * @generated - */ - EReference getStackFrame_ChildFrame(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.StackFrame#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see fr.obeo.dsl.debug.StackFrame#getName() - * @see #getStackFrame() - * @generated - */ - EAttribute getStackFrame_Name(); - - /** - * Returns the meta object for the reference '{@link fr.obeo.dsl.debug.StackFrame#getCurrentInstruction - * Current Instruction}'. - * - * @return the meta object for the reference 'Current Instruction'. - * @see fr.obeo.dsl.debug.StackFrame#getCurrentInstruction() - * @see #getStackFrame() - * @generated - */ - EReference getStackFrame_CurrentInstruction(); - - /** - * Returns the meta object for the attribute ' - * {@link fr.obeo.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction - * Can Step Into Current Instruction}'. - * - * @return the meta object for the attribute 'Can Step Into Current Instruction'. - * @see fr.obeo.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction() - * @see #getStackFrame() - * @generated - */ - EAttribute getStackFrame_CanStepIntoCurrentInstruction(); - - /** - * Returns the meta object for the container reference ' - * {@link fr.obeo.dsl.debug.StackFrame#getParentFrame Parent Frame}'. - * - * - * @return the meta object for the container reference 'Parent Frame'. - * @see fr.obeo.dsl.debug.StackFrame#getParentFrame() - * @see #getStackFrame() - * @generated - */ - EReference getStackFrame_ParentFrame(); - - /** - * Returns the meta object for the containment reference list ' - * {@link fr.obeo.dsl.debug.StackFrame#getRegisterGroups Register Groups}'. - * - * @return the meta object for the containment reference list 'Register Groups'. - * @see fr.obeo.dsl.debug.StackFrame#getRegisterGroups() - * @see #getStackFrame() - * @generated - */ - EReference getStackFrame_RegisterGroups(); - - /** - * Returns the meta object for class '{@link fr.obeo.dsl.debug.Variable Variable}'. - * - * @return the meta object for class 'Variable'. - * @see fr.obeo.dsl.debug.Variable - * @generated - */ - EClass getVariable(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.Variable#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see fr.obeo.dsl.debug.Variable#getName() - * @see #getVariable() - * @generated - */ - EAttribute getVariable_Name(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.Variable#getValue Value}'. - * - * - * @return the meta object for the attribute 'Value'. - * @see fr.obeo.dsl.debug.Variable#getValue() - * @see #getVariable() - * @generated - */ - EAttribute getVariable_Value(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.Variable#isValueChanged - * Value Changed}'. - * - * @return the meta object for the attribute 'Value Changed'. - * @see fr.obeo.dsl.debug.Variable#isValueChanged() - * @see #getVariable() - * @generated - */ - EAttribute getVariable_ValueChanged(); - - /** - * Returns the meta object for the container reference '{@link fr.obeo.dsl.debug.Variable#getFrame - * Frame}'. - * - * @return the meta object for the container reference 'Frame'. - * @see fr.obeo.dsl.debug.Variable#getFrame() - * @see #getVariable() - * @generated - */ - EReference getVariable_Frame(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.Variable#getDeclarationType - * Declaration Type}'. - * - * @return the meta object for the attribute 'Declaration Type'. - * @see fr.obeo.dsl.debug.Variable#getDeclarationType() - * @see #getVariable() - * @generated - */ - EAttribute getVariable_DeclarationType(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.Variable#isSupportModifications - * Support Modifications}'. - * - * @return the meta object for the attribute 'Support Modifications'. - * @see fr.obeo.dsl.debug.Variable#isSupportModifications() - * @see #getVariable() - * @generated - */ - EAttribute getVariable_SupportModifications(); - - /** - * Returns the meta object for class '{@link fr.obeo.dsl.debug.CurrentSession Current Session}'. - * - * - * @return the meta object for class 'Current Session'. - * @see fr.obeo.dsl.debug.CurrentSession - * @generated - */ - EClass getCurrentSession(); - - /** - * Returns the meta object for the containment reference list ' - * {@link fr.obeo.dsl.debug.CurrentSession#getDebugTargets Debug Targets}'. - * - * @return the meta object for the containment reference list 'Debug Targets'. - * @see fr.obeo.dsl.debug.CurrentSession#getDebugTargets() - * @see #getCurrentSession() - * @generated - */ - EReference getCurrentSession_DebugTargets(); - - /** - * Returns the meta object for class '{@link fr.obeo.dsl.debug.RegisterGroup Register Group}'. - * - * - * @return the meta object for class 'Register Group'. - * @see fr.obeo.dsl.debug.RegisterGroup - * @generated - */ - EClass getRegisterGroup(); - - /** - * Returns the meta object for the attribute '{@link fr.obeo.dsl.debug.RegisterGroup#getName - * Name}'. - * - * @return the meta object for the attribute 'Name'. - * @see fr.obeo.dsl.debug.RegisterGroup#getName() - * @see #getRegisterGroup() - * @generated - */ - EAttribute getRegisterGroup_Name(); - - /** - * Returns the meta object for the containment reference list ' - * {@link fr.obeo.dsl.debug.RegisterGroup#getRegisters Registers}'. - * - * @return the meta object for the containment reference list 'Registers'. - * @see fr.obeo.dsl.debug.RegisterGroup#getRegisters() - * @see #getRegisterGroup() - * @generated - */ - EReference getRegisterGroup_Registers(); - - /** - * Returns the meta object for class '{@link fr.obeo.dsl.debug.Register Register}'. - * - * @return the meta object for class 'Register'. - * @see fr.obeo.dsl.debug.Register - * @generated - */ - EClass getRegister(); - - /** - * Returns the meta object for the container reference ' - * {@link fr.obeo.dsl.debug.Register#getRegisterGroup Register Group}'. - * - * - * @return the meta object for the container reference 'Register Group'. - * @see fr.obeo.dsl.debug.Register#getRegisterGroup() - * @see #getRegister() - * @generated - */ - EReference getRegister_RegisterGroup(); - - /** - * Returns the meta object for enum '{@link fr.obeo.dsl.debug.DebugTargetState Target State}'. - * - * - * @return the meta object for enum 'Target State'. - * @see fr.obeo.dsl.debug.DebugTargetState - * @generated - */ - EEnum getDebugTargetState(); - - /** - * Returns the meta object for enum '{@link fr.obeo.dsl.debug.State State}'. - * - * @return the meta object for enum 'State'. - * @see fr.obeo.dsl.debug.State - * @generated - */ - EEnum getState(); - - /** - * Returns the meta object for data type '{@link java.lang.Object Object}'. - * - * @return the meta object for data type 'Object'. - * @see java.lang.Object - * @model instanceClass="java.lang.Object" serializeable="false" - * @generated - */ - EDataType getObject(); - - /** - * Returns the factory that creates the instances of the model. - * - * @return the factory that creates the instances of the model. - * @generated - */ - DebugFactory getDebugFactory(); - - /** - * Defines literals for the meta objects that represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.Contextual Contextual}' class. - * - * - * @see fr.obeo.dsl.debug.Contextual - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getContextual() - * @generated - */ - EClass CONTEXTUAL = eINSTANCE.getContextual(); - - /** - * The meta object literal for the 'Context' reference feature. - * - * @generated - */ - EReference CONTEXTUAL__CONTEXT = eINSTANCE.getContextual_Context(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.impl.DebugTargetImpl Target}' - * class. - * - * @see fr.obeo.dsl.debug.impl.DebugTargetImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getDebugTarget() - * @generated - */ - EClass DEBUG_TARGET = eINSTANCE.getDebugTarget(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute DEBUG_TARGET__NAME = eINSTANCE.getDebugTarget_Name(); - - /** - * The meta object literal for the 'State' attribute feature. - * - * - * @generated - */ - EAttribute DEBUG_TARGET__STATE = eINSTANCE.getDebugTarget_State(); - - /** - * The meta object literal for the 'Threads' containment reference list feature. - * - * @generated - */ - EReference DEBUG_TARGET__THREADS = eINSTANCE.getDebugTarget_Threads(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.impl.ThreadImpl Thread}' class. - * - * - * @see fr.obeo.dsl.debug.impl.ThreadImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getThread() - * @generated - */ - EClass THREAD = eINSTANCE.getThread(); - - /** - * The meta object literal for the 'Bottom Stack Frame' reference feature. - * - * @generated - */ - EReference THREAD__BOTTOM_STACK_FRAME = eINSTANCE.getThread_BottomStackFrame(); - - /** - * The meta object literal for the 'State' attribute feature. - * - * - * @generated - */ - EAttribute THREAD__STATE = eINSTANCE.getThread_State(); - - /** - * The meta object literal for the 'Top Stack Frame' reference feature. - * - * @generated - */ - EReference THREAD__TOP_STACK_FRAME = eINSTANCE.getThread_TopStackFrame(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute THREAD__NAME = eINSTANCE.getThread_Name(); - - /** - * The meta object literal for the 'Debug Target' container reference feature. - * - * @generated - */ - EReference THREAD__DEBUG_TARGET = eINSTANCE.getThread_DebugTarget(); - - /** - * The meta object literal for the 'Priority' attribute feature. - * - * @generated - */ - EAttribute THREAD__PRIORITY = eINSTANCE.getThread_Priority(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.impl.StackFrameImpl Stack Frame} - * ' class. - * - * @see fr.obeo.dsl.debug.impl.StackFrameImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getStackFrame() - * @generated - */ - EClass STACK_FRAME = eINSTANCE.getStackFrame(); - - /** - * The meta object literal for the 'Variables' containment reference list feature. - * - * - * @generated - */ - EReference STACK_FRAME__VARIABLES = eINSTANCE.getStackFrame_Variables(); - - /** - * The meta object literal for the 'Child Frame' containment reference feature. - * - * @generated - */ - EReference STACK_FRAME__CHILD_FRAME = eINSTANCE.getStackFrame_ChildFrame(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute STACK_FRAME__NAME = eINSTANCE.getStackFrame_Name(); - - /** - * The meta object literal for the 'Current Instruction' reference feature. - * - * @generated - */ - EReference STACK_FRAME__CURRENT_INSTRUCTION = eINSTANCE.getStackFrame_CurrentInstruction(); - - /** - * The meta object literal for the 'Can Step Into Current Instruction' attribute - * feature. - * - * @generated - */ - EAttribute STACK_FRAME__CAN_STEP_INTO_CURRENT_INSTRUCTION = eINSTANCE - .getStackFrame_CanStepIntoCurrentInstruction(); - - /** - * The meta object literal for the 'Parent Frame' container reference feature. - * - * @generated - */ - EReference STACK_FRAME__PARENT_FRAME = eINSTANCE.getStackFrame_ParentFrame(); - - /** - * The meta object literal for the 'Register Groups' containment reference list - * feature. - * - * @generated - */ - EReference STACK_FRAME__REGISTER_GROUPS = eINSTANCE.getStackFrame_RegisterGroups(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.impl.VariableImpl Variable}' - * class. - * - * @see fr.obeo.dsl.debug.impl.VariableImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getVariable() - * @generated - */ - EClass VARIABLE = eINSTANCE.getVariable(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute VARIABLE__NAME = eINSTANCE.getVariable_Name(); - - /** - * The meta object literal for the 'Value' attribute feature. - * - * - * @generated - */ - EAttribute VARIABLE__VALUE = eINSTANCE.getVariable_Value(); - - /** - * The meta object literal for the 'Value Changed' attribute feature. - * - * @generated - */ - EAttribute VARIABLE__VALUE_CHANGED = eINSTANCE.getVariable_ValueChanged(); - - /** - * The meta object literal for the 'Frame' container reference feature. - * - * @generated - */ - EReference VARIABLE__FRAME = eINSTANCE.getVariable_Frame(); - - /** - * The meta object literal for the 'Declaration Type' attribute feature. - * - * @generated - */ - EAttribute VARIABLE__DECLARATION_TYPE = eINSTANCE.getVariable_DeclarationType(); - - /** - * The meta object literal for the 'Support Modifications' attribute feature. - * - * @generated - */ - EAttribute VARIABLE__SUPPORT_MODIFICATIONS = eINSTANCE.getVariable_SupportModifications(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.impl.CurrentSessionImpl - * Current Session}' class. - * - * @see fr.obeo.dsl.debug.impl.CurrentSessionImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getCurrentSession() - * @generated - */ - EClass CURRENT_SESSION = eINSTANCE.getCurrentSession(); - - /** - * The meta object literal for the 'Debug Targets' containment reference list feature. - * - * - * @generated - */ - EReference CURRENT_SESSION__DEBUG_TARGETS = eINSTANCE.getCurrentSession_DebugTargets(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.impl.RegisterGroupImpl - * Register Group}' class. - * - * @see fr.obeo.dsl.debug.impl.RegisterGroupImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getRegisterGroup() - * @generated - */ - EClass REGISTER_GROUP = eINSTANCE.getRegisterGroup(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute REGISTER_GROUP__NAME = eINSTANCE.getRegisterGroup_Name(); - - /** - * The meta object literal for the 'Registers' containment reference list feature. - * - * - * @generated - */ - EReference REGISTER_GROUP__REGISTERS = eINSTANCE.getRegisterGroup_Registers(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.impl.RegisterImpl Register}' - * class. - * - * @see fr.obeo.dsl.debug.impl.RegisterImpl - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getRegister() - * @generated - */ - EClass REGISTER = eINSTANCE.getRegister(); - - /** - * The meta object literal for the 'Register Group' container reference feature. - * - * @generated - */ - EReference REGISTER__REGISTER_GROUP = eINSTANCE.getRegister_RegisterGroup(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.DebugTargetState Target State}' - * enum. - * - * @see fr.obeo.dsl.debug.DebugTargetState - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getDebugTargetState() - * @generated - */ - EEnum DEBUG_TARGET_STATE = eINSTANCE.getDebugTargetState(); - - /** - * The meta object literal for the '{@link fr.obeo.dsl.debug.State State}' enum. - * - * @see fr.obeo.dsl.debug.State - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getState() - * @generated - */ - EEnum STATE = eINSTANCE.getState(); - - /** - * The meta object literal for the 'Object' data type. - * - * @see java.lang.Object - * @see fr.obeo.dsl.debug.impl.DebugPackageImpl#getObject() - * @generated - */ - EDataType OBJECT = eINSTANCE.getObject(); - - } - -} // DebugPackage diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugTarget.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugTarget.java deleted file mode 100644 index f310ec493..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugTarget.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug; - -import org.eclipse.emf.common.util.EList; - -/** - * A representation of the model object 'Target'. a {@link DebugTarget} is a debuggable execution context, for instance a - * debugggable process of a virtual machine. - *

- * The following features are supported: - *

    - *
  • {@link fr.obeo.dsl.debug.DebugTarget#getName Name}
  • - *
  • {@link fr.obeo.dsl.debug.DebugTarget#getState State}
  • - *
  • {@link fr.obeo.dsl.debug.DebugTarget#getThreads Threads}
  • - *
  • {@link fr.obeo.dsl.debug.DebugTarget#getContext Context}
  • - *
- *

- * - * @see fr.obeo.dsl.debug.DebugPackage#getDebugTarget() - * @model - * @generated - */ -public interface DebugTarget extends Contextual { - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * Returns the value of the 'Name' attribute. A name of this {@link DebugTarget}. - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see fr.obeo.dsl.debug.DebugPackage#getDebugTarget_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.DebugTarget#getName Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'State' attribute. The literals are from the enumeration - * {@link fr.obeo.dsl.debug.DebugTargetState}. The current {@link TargetState} of this {@link DebugerTarget}. - * - * @return the value of the 'State' attribute. - * @see fr.obeo.dsl.debug.DebugTargetState - * @see #setState(DebugTargetState) - * @see fr.obeo.dsl.debug.DebugPackage#getDebugTarget_State() - * @model - * @generated - */ - DebugTargetState getState(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.DebugTarget#getState State}' attribute. - * - * @param value - * the new value of the 'State' attribute. - * @see fr.obeo.dsl.debug.DebugTargetState - * @see #getState() - * @generated - */ - void setState(DebugTargetState value); - - /** - * Returns the value of the 'Threads' containment reference list. The list contents are of - * type {@link fr.obeo.dsl.debug.Thread}. It is bidirectional and its opposite is ' - * {@link fr.obeo.dsl.debug.Thread#getParent Parent}'. Current {@link Thread threads} running in this {@link DebugerTarget}. - * - * @return the value of the 'Threads' containment reference list. - * @see fr.obeo.dsl.debug.DebugPackage#getDebugTarget_Threads() - * @see fr.obeo.dsl.debug.Thread#getParent - * @model opposite="parent" containment="true" - * @generated - */ - EList getThreads(); - -} // DebugTarget diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Register.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Register.java deleted file mode 100644 index b9052965c..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Register.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug; - -/** - * A representation of the model object 'Register'. A {@link Variable} representing a register. - *

- * The following features are supported: - *

    - *
  • {@link fr.obeo.dsl.debug.Register#getRegisterGroup Register Group}
  • - *
- *

- * - * @see fr.obeo.dsl.debug.DebugPackage#getRegister() - * @model - * @generated - */ -public interface Register extends Variable { - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * Returns the value of the 'Register Group' container reference. It is bidirectional and - * its opposite is '{@link fr.obeo.dsl.debug.RegisterGroup#getRegisters Registers}'. - *

- * If the meaning of the 'Register Group' container reference isn't clear, there really should be - * more of a description here... - *

- * - * - * @return the value of the 'Register Group' container reference. - * @see #setRegisterGroup(RegisterGroup) - * @see fr.obeo.dsl.debug.DebugPackage#getRegister_RegisterGroup() - * @see fr.obeo.dsl.debug.RegisterGroup#getRegisters - * @model opposite="registers" transient="false" - * @generated - */ - RegisterGroup getRegisterGroup(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Register#getRegisterGroup Register Group}' - * container reference. - * - * @param value - * the new value of the 'Register Group' container reference. - * @see #getRegisterGroup() - * @generated - */ - void setRegisterGroup(RegisterGroup value); - -} // Register diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/RegisterGroup.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/RegisterGroup.java deleted file mode 100644 index cd3a3a580..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/RegisterGroup.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Register Group'. - *

- * The following features are supported: - *

    - *
  • {@link fr.obeo.dsl.debug.RegisterGroup#getName Name}
  • - *
  • {@link fr.obeo.dsl.debug.RegisterGroup#getRegisters Registers}
  • - *
- *

- * - * @see fr.obeo.dsl.debug.DebugPackage#getRegisterGroup() - * @model - * @generated - */ -public interface RegisterGroup extends EObject { - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * Returns the value of the 'Name' attribute. A name of this {@link RegisterGroup}. - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see fr.obeo.dsl.debug.DebugPackage#getRegisterGroup_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.RegisterGroup#getName Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Registers' containment reference list. The list contents are - * of type {@link fr.obeo.dsl.debug.Register}. It is bidirectional and its opposite is ' - * {@link fr.obeo.dsl.debug.Register#getRegisterGroup Register Group}'. - * {@link Register Registers} grouped in this - * {@link RegisterGroup}. - * - * @return the value of the 'Registers' containment reference list. - * @see fr.obeo.dsl.debug.DebugPackage#getRegisterGroup_Registers() - * @see fr.obeo.dsl.debug.Register#getRegisterGroup - * @model opposite="registerGroup" containment="true" - * @generated - */ - EList getRegisters(); - -} // RegisterGroup diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/StackFrame.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/StackFrame.java deleted file mode 100644 index 51f8c2f05..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/StackFrame.java +++ /dev/null @@ -1,199 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Stack Frame'. A {@link StackFrame} represents an execution context in a - * {@link Thread}. - *

- * The following features are supported: - *

    - *
  • {@link fr.obeo.dsl.debug.StackFrame#getVariables Variables}
  • - *
  • {@link fr.obeo.dsl.debug.StackFrame#getChildFrame Child Frame}
  • - *
  • {@link fr.obeo.dsl.debug.StackFrame#getState State}
  • - *
  • {@link fr.obeo.dsl.debug.StackFrame#getParent Parent}
  • - *
  • {@link fr.obeo.dsl.debug.StackFrame#getName Name}
  • - *
  • {@link fr.obeo.dsl.debug.StackFrame#getCurrentInstruction Current Instruction}
  • - *
  • {@link fr.obeo.dsl.debug.StackFrame#getParentFrame Parent Frame}
  • - *
  • {@link fr.obeo.dsl.debug.StackFrame#getRegisterGroups Register Groups}
  • - *
- *

- * - * @see fr.obeo.dsl.debug.DebugPackage#getStackFrame() - * @model - * @generated - */ -public interface StackFrame extends Contextual { - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * Returns the value of the 'Variables' containment reference list. The list contents are - * of type {@link fr.obeo.dsl.debug.Variable}. {@link Variable Variables} accessible in this {@link StackFrame}. - * - * @return the value of the 'Variables' containment reference list. - * @see fr.obeo.dsl.debug.DebugPackage#getStackFrame_Variables() - * @model containment="true" - * @generated - */ - EList getVariables(); - - /** - * Returns the value of the 'Child Frame' containment reference. It is bidirectional and - * its opposite is '{@link fr.obeo.dsl.debug.StackFrame#getParentFrame Parent Frame}'. The current child {@link StackFrame} - * of this {@link StackFrame}. - * - * @return the value of the 'Child Frame' containment reference. - * @see #setChildFrame(StackFrame) - * @see fr.obeo.dsl.debug.DebugPackage#getStackFrame_ChildFrame() - * @see fr.obeo.dsl.debug.StackFrame#getParentFrame - * @model opposite="parentFrame" containment="true" - * @generated - */ - StackFrame getChildFrame(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.StackFrame#getChildFrame Child Frame}' - * containment reference. - * - * @param value - * the new value of the 'Child Frame' containment reference. - * @see #getChildFrame() - * @generated - */ - void setChildFrame(StackFrame value); - - /** - * Returns the value of the 'Name' attribute. The {@link StackFrame} name. - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see fr.obeo.dsl.debug.DebugPackage#getStackFrame_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.StackFrame#getName Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Current Instruction' reference. The {@link EObject} representing the current instruction in - * this {@link StackFrame}. - * - * @return the value of the 'Current Instruction' reference. - * @see #setCurrentInstruction(EObject) - * @see fr.obeo.dsl.debug.DebugPackage#getStackFrame_CurrentInstruction() - * @model - * @generated - */ - EObject getCurrentInstruction(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.StackFrame#getCurrentInstruction - * Current Instruction}' reference. - * - * @param value - * the new value of the 'Current Instruction' reference. - * @see #getCurrentInstruction() - * @generated - */ - void setCurrentInstruction(EObject value); - - /** - * Returns the value of the 'Can Step Into Current Instruction' attribute. The default - * value is "false". - *

- * If the meaning of the 'Can Step Into Current Instruction' attribute isn't clear, there really - * should be more of a description here... - *

- * - * - * @return the value of the 'Can Step Into Current Instruction' attribute. - * @see #setCanStepIntoCurrentInstruction(boolean) - * @see fr.obeo.dsl.debug.DebugPackage#getStackFrame_CanStepIntoCurrentInstruction() - * @model default="false" required="true" - * @generated - */ - boolean isCanStepIntoCurrentInstruction(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction - * Can Step Into Current Instruction}' attribute. - * - * @param value - * the new value of the 'Can Step Into Current Instruction' attribute. - * @see #isCanStepIntoCurrentInstruction() - * @generated - */ - void setCanStepIntoCurrentInstruction(boolean value); - - /** - * Returns the value of the 'Parent Frame' container reference. It is bidirectional and - * its opposite is '{@link fr.obeo.dsl.debug.StackFrame#getChildFrame Child Frame}'. The current parent {@link StackFrame} - * of this {@link StackFrame}. - * - * @return the value of the 'Parent Frame' container reference. - * @see #setParentFrame(StackFrame) - * @see fr.obeo.dsl.debug.DebugPackage#getStackFrame_ParentFrame() - * @see fr.obeo.dsl.debug.StackFrame#getChildFrame - * @model opposite="childFrame" transient="false" - * @generated - */ - StackFrame getParentFrame(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.StackFrame#getParentFrame Parent Frame}' - * container reference. - * - * @param value - * the new value of the 'Parent Frame' container reference. - * @see #getParentFrame() - * @generated - */ - void setParentFrame(StackFrame value); - - /** - * Returns the value of the 'Register Groups' containment reference list. The list - * contents are of type {@link fr.obeo.dsl.debug.RegisterGroup}. {@link RegisterGroup Register groups} accessible in this - * {@link StackFrame}. - * - * @return the value of the 'Register Groups' containment reference list. - * @see fr.obeo.dsl.debug.DebugPackage#getStackFrame_RegisterGroups() - * @model containment="true" - * @generated - */ - EList getRegisterGroups(); - -} // StackFrame diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/State.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/State.java deleted file mode 100644 index e5445ceac..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/State.java +++ /dev/null @@ -1,337 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug; - -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 'State', and - * utility methods for working with them. Possible States of a - * {@link StackFrame} {@link StackFrame#getState() state}. - * - * @see fr.obeo.dsl.debug.DebugPackage#getState() - * @model - * @generated - */ -public enum State implements Enumerator { - /** - * The 'RUNNING' literal object. - * - * @see #RUNNING_VALUE - * @generated - * @ordered - */ - RUNNING(0, "RUNNING", "RUNNING"), - - /** - * The 'STEPPING INTO' literal object. - * - * @see #STEPPING_INTO_VALUE - * @generated - * @ordered - */ - STEPPING_INTO(1, "STEPPING_INTO", "STEPPING_INTO"), /** - * The 'STEPPING OVER' literal object. - * - * - * @see #STEPPING_OVER_VALUE - * @generated - * @ordered - */ - STEPPING_OVER(2, "STEPPING_OVER", "STEPPING_OVER"), /** - * The 'STEPPING RETURN' literal - * object. - * - * @see #STEPPING_RETURN_VALUE - * @generated - * @ordered - */ - STEPPING_RETURN(3, "STEPPING_RETURN", "STEPPING_RETURN"), /** - * The 'SUSPENDING' literal - * object. - * - * @see #SUSPENDING_VALUE - * @generated - * @ordered - */ - SUSPENDING(4, "SUSPENDING", "SUSPENDING"), /** - * The 'SUSPENDED' literal object. - * - * @see #SUSPENDED_VALUE - * @generated - * @ordered - */ - SUSPENDED(5, "SUSPENDED", "SUSPENDED"), - - /** - * The 'TERMINATING' literal object. - * - * @see #TERMINATING_VALUE - * @generated - * @ordered - */ - TERMINATING(6, "TERMINATING", "TERMINATING"), /** - * The 'TERMINATED' literal object. - * - * @see #TERMINATED_VALUE - * @generated - * @ordered - */ - TERMINATED(7, "TERMINATED", "TERMINATED"); - - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * The 'RUNNING' literal value. The {@link StackFrame} is running. - * - * @see #RUNNING - * @model - * @generated - * @ordered - */ - public static final int RUNNING_VALUE = 0; - - /** - * The 'STEPPING INTO' literal value. The {@link StackFrame} is stepping into. - * - * @see #STEPPING_INTO - * @model - * @generated - * @ordered - */ - public static final int STEPPING_INTO_VALUE = 1; - - /** - * The 'STEPPING OVER' literal value. The {@link StackFrame} is stepping over. - * - * @see #STEPPING_OVER - * @model - * @generated - * @ordered - */ - public static final int STEPPING_OVER_VALUE = 2; - - /** - * The 'STEPPING RETURN' literal value. The {@link StackFrame} is stepping return. - * - * @see #STEPPING_RETURN - * @model - * @generated - * @ordered - */ - public static final int STEPPING_RETURN_VALUE = 3; - - /** - * The 'SUSPENDING' literal value. The {@link StackFrame} is stepping over. - * - * @see #SUSPENDING - * @model - * @generated - * @ordered - */ - public static final int SUSPENDING_VALUE = 4; - - /** - * The 'SUSPENDED' literal value. The {@link StackFrame} is suspended. - * - * @see #SUSPENDED - * @model - * @generated - * @ordered - */ - public static final int SUSPENDED_VALUE = 5; - - /** - * The 'TERMINATING' literal value. The {@link StackFrame} is terminated. - * - * @see #TERMINATING - * @model - * @generated - * @ordered - */ - public static final int TERMINATING_VALUE = 6; - - /** - * The 'TERMINATED' literal value. The {@link DebugTarget} is terminated. - * - * @see #TERMINATED - * @model - * @generated - * @ordered - */ - public static final int TERMINATED_VALUE = 7; - - /** - * An array of all the 'State' enumerators. - * - * @generated - */ - private static final State[] VALUES_ARRAY = new State[] {RUNNING, STEPPING_INTO, STEPPING_OVER, - STEPPING_RETURN, SUSPENDING, SUSPENDED, TERMINATING, TERMINATED, }; - - /** - * A public read-only list of all the 'State' enumerators. - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'State' literal with the specified literal value. - * - * - * @generated - */ - public static State get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - State result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'State' literal with the specified name. - * - * @generated - */ - public static State getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - State result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'State' literal with the specified integer value. - * - * - * @generated - */ - public static State get(int value) { - switch (value) { - case RUNNING_VALUE: - return RUNNING; - case STEPPING_INTO_VALUE: - return STEPPING_INTO; - case STEPPING_OVER_VALUE: - return STEPPING_OVER; - case STEPPING_RETURN_VALUE: - return STEPPING_RETURN; - case SUSPENDING_VALUE: - return SUSPENDING; - case SUSPENDED_VALUE: - return SUSPENDED; - case TERMINATING_VALUE: - return TERMINATING; - case TERMINATED_VALUE: - return TERMINATED; - } - 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 State(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; - } - -} // State diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Thread.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Thread.java deleted file mode 100644 index 6883fb169..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Thread.java +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug; - -/** - * A representation of the model object 'Thread'. Current {@link Thread threads} running in this {@link DebugerTarget}. - *

- * The following features are supported: - *

    - *
  • {@link fr.obeo.dsl.debug.Thread#getBottomStackFrame Bottom Stack Frame}
  • - *
  • {@link fr.obeo.dsl.debug.Thread#getTopStackFrame Top Stack Frame}
  • - *
  • {@link fr.obeo.dsl.debug.Thread#getName Name}
  • - *
  • {@link fr.obeo.dsl.debug.Thread#getParent Parent}
  • - *
  • {@link fr.obeo.dsl.debug.Thread#getBreakpoints Breakpoints}
  • - *
  • {@link fr.obeo.dsl.debug.Thread#getContext Context}
  • - *
- *

- * - * @see fr.obeo.dsl.debug.DebugPackage#getThread() - * @model - * @generated - */ -public interface Thread extends Contextual { - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * Returns the value of the 'Bottom Stack Frame' reference. The current bottom {@link StackFrame}. - * - * @return the value of the 'Bottom Stack Frame' reference. - * @see #setBottomStackFrame(StackFrame) - * @see fr.obeo.dsl.debug.DebugPackage#getThread_BottomStackFrame() - * @model required="true" - * @generated - */ - StackFrame getBottomStackFrame(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Thread#getBottomStackFrame Bottom Stack Frame} - * ' containment reference. - * - * @param value - * the new value of the 'Bottom Stack Frame' containment reference. - * @see #getBottomStackFrame() - * @generated - */ - void setBottomStackFrame(StackFrame value); - - /** - * Returns the value of the 'State' attribute. The literals are from the enumeration - * {@link fr.obeo.dsl.debug.State}. - * The current {@link Thread} of this {@link StackFrame}. - * - * @return the value of the 'State' attribute. - * @see fr.obeo.dsl.debug.State - * @see #setState(State) - * @see fr.obeo.dsl.debug.DebugPackage#getThread_State() - * @model required="true" - * @generated - */ - State getState(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Thread#getState State}' attribute. - * - * @param value - * the new value of the 'State' attribute. - * @see fr.obeo.dsl.debug.State - * @see #getState() - * @generated - */ - void setState(State value); - - /** - * Returns the value of the 'Top Stack Frame' reference. The curren top {@link StackFrame}. - * - * @return the value of the 'Top Stack Frame' reference. - * @see #setTopStackFrame(StackFrame) - * @see fr.obeo.dsl.debug.DebugPackage#getThread_TopStackFrame() - * @model required="true" - * @generated - */ - StackFrame getTopStackFrame(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Thread#getTopStackFrame Top Stack Frame}' - * reference. - * - * @param value - * the new value of the 'Top Stack Frame' reference. - * @see #getTopStackFrame() - * @generated - */ - void setTopStackFrame(StackFrame value); - - /** - * Returns the value of the 'Name' attribute. The {@link Thread} name. It must be unique across a {@link DebugTarget}. - * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see fr.obeo.dsl.debug.DebugPackage#getThread_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Thread#getName Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Debug Target' container reference. It is bidirectional and - * its opposite is '{@link fr.obeo.dsl.debug.DebugTarget#getThreads Threads}'. The {@link DebugTarget} of this - * {@link StackFrame}. - * - * @return the value of the 'Debug Target' container reference. - * @see #setDebugTarget(DebugTarget) - * @see fr.obeo.dsl.debug.DebugPackage#getThread_DebugTarget() - * @see fr.obeo.dsl.debug.DebugTarget#getThreads - * @model opposite="threads" transient="false" - * @generated - */ - DebugTarget getDebugTarget(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Thread#getDebugTarget Debug Target}' container - * reference. - * - * @param value - * the new value of the 'Debug Target' container reference. - * @see #getDebugTarget() - * @generated - */ - void setDebugTarget(DebugTarget value); - - /** - * Returns the value of the 'Priority' attribute. The default value is "0". - * The priority of the given - * thread. The meaning is debugger dependant. - * - * @return the value of the 'Priority' attribute. - * @see #setPriority(int) - * @see fr.obeo.dsl.debug.DebugPackage#getThread_Priority() - * @model default="0" required="true" - * @generated - */ - int getPriority(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Thread#getPriority Priority}' attribute. - * - * @param value - * the new value of the 'Priority' attribute. - * @see #getPriority() - * @generated - */ - void setPriority(int value); - -} // Thread diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Variable.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Variable.java deleted file mode 100644 index 2dff680d3..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Variable.java +++ /dev/null @@ -1,190 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug; - -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Variable'. A {@link Variable} represents a visible data structure in the - * {@link StackFrame}. - *

- * The following features are supported: - *

    - *
  • {@link fr.obeo.dsl.debug.Variable#getName Name}
  • - *
  • {@link fr.obeo.dsl.debug.Variable#getElements Elements}
  • - *
- *

- * - * @see fr.obeo.dsl.debug.DebugPackage#getVariable() - * @model - * @generated - */ -public interface Variable extends EObject { - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * Returns the value of the 'Name' attribute. The {@link Variable} name. - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see fr.obeo.dsl.debug.DebugPackage#getVariable_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Variable#getName Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Value' attribute. The {@link Variable} value. - * - * @return the value of the 'Value' attribute. - * @see #setValue(Object) - * @see fr.obeo.dsl.debug.DebugPackage#getVariable_Value() - * @model dataType="fr.obeo.dsl.debug.Object" transient="true" - * @generated - */ - Object getValue(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Variable#getValue Value}' attribute. - * - * @param value - * the new value of the 'Value' attribute. - * @see #getValue() - * @generated - */ - void setValue(Object value); - - /** - * Returns the value of the 'Value Changed' attribute. The default value is - * "false". - *

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

- * - * - * @return the value of the 'Value Changed' attribute. - * @see #setValueChanged(boolean) - * @see fr.obeo.dsl.debug.DebugPackage#getVariable_ValueChanged() - * @model default="false" required="true" - * @generated - */ - boolean isValueChanged(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Variable#isValueChanged Value Changed}' - * attribute. - * - * @param value - * the new value of the 'Value Changed' attribute. - * @see #isValueChanged() - * @generated - */ - void setValueChanged(boolean value); - - /** - * Returns the value of the 'Frame' container reference. It is bidirectional and its - * opposite is '{@link fr.obeo.dsl.debug.StackFrame#getVariables Variables}'. - *

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

- * - * - * @return the value of the 'Frame' container reference. - * @see #setFrame(StackFrame) - * @see fr.obeo.dsl.debug.DebugPackage#getVariable_Frame() - * @see fr.obeo.dsl.debug.StackFrame#getVariables - * @model opposite="variables" transient="false" - * @generated - */ - StackFrame getFrame(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Variable#getFrame Frame}' container reference. - * - * - * @param value - * the new value of the 'Frame' container reference. - * @see #getFrame() - * @generated - */ - void setFrame(StackFrame value); - - /** - * Returns the value of the 'Declaration Type' attribute. The {@link Variable} declaration type. - * - * @return the value of the 'Declaration Type' attribute. - * @see #setDeclarationType(String) - * @see fr.obeo.dsl.debug.DebugPackage#getVariable_DeclarationType() - * @model required="true" - * @generated - */ - String getDeclarationType(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Variable#getDeclarationType Declaration Type}' - * attribute. - * - * @param value - * the new value of the 'Declaration Type' attribute. - * @see #getDeclarationType() - * @generated - */ - void setDeclarationType(String value); - - /** - * Returns the value of the 'Support Modifications' attribute. - * Tells if the {@link Variable#getValue() value} can be - * changed - * - * @return the value of the 'Support Modifications' attribute. - * @see #setSupportModifications(boolean) - * @see fr.obeo.dsl.debug.DebugPackage#getVariable_SupportModifications() - * @model required="true" - * @generated - */ - boolean isSupportModifications(); - - /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Variable#isSupportModifications - * Support Modifications}' attribute. - * - * @param value - * the new value of the 'Support Modifications' attribute. - * @see #isSupportModifications() - * @generated - */ - void setSupportModifications(boolean value); - -} // Variable diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/util/DebugAdapterFactory.java b/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/util/DebugAdapterFactory.java deleted file mode 100644 index a666d66d0..000000000 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/util/DebugAdapterFactory.java +++ /dev/null @@ -1,262 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.util; - -import fr.obeo.dsl.debug.Contextual; -import fr.obeo.dsl.debug.CurrentSession; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.Register; -import fr.obeo.dsl.debug.RegisterGroup; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.Variable; - -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; - -/** - * The Adapter Factory for the model. It provides an adapter - * createXXX method for each class of the model. - * - * @see fr.obeo.dsl.debug.DebugPackage - * @generated - */ -public class DebugAdapterFactory extends AdapterFactoryImpl { - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; - - /** - * The cached model package. - * - * @generated - */ - protected static DebugPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * @generated - */ - public DebugAdapterFactory() { - if (modelPackage == null) { - modelPackage = DebugPackage.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 DebugSwitch modelSwitch = new DebugSwitch() { - @Override - public Adapter caseContextual(Contextual object) { - return createContextualAdapter(); - } - - @Override - public Adapter caseDebugTarget(DebugTarget object) { - return createDebugTargetAdapter(); - } - - @Override - public Adapter caseThread(fr.obeo.dsl.debug.Thread object) { - return createThreadAdapter(); - } - - @Override - public Adapter caseStackFrame(StackFrame object) { - return createStackFrameAdapter(); - } - - @Override - public Adapter caseVariable(Variable object) { - return createVariableAdapter(); - } - - @Override - public Adapter caseCurrentSession(CurrentSession object) { - return createCurrentSessionAdapter(); - } - - @Override - public Adapter caseRegisterGroup(RegisterGroup object) { - return createRegisterGroupAdapter(); - } - - @Override - public Adapter caseRegister(Register object) { - return createRegisterAdapter(); - } - - @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 fr.obeo.dsl.debug.Contextual Contextual} - * '. 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 fr.obeo.dsl.debug.Contextual - * @generated - */ - public Adapter createContextualAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.obeo.dsl.debug.DebugTarget Target}'. - * 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 fr.obeo.dsl.debug.DebugTarget - * @generated - */ - public Adapter createDebugTargetAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.obeo.dsl.debug.Thread Thread}'. 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 fr.obeo.dsl.debug.Thread - * @generated - */ - public Adapter createThreadAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.obeo.dsl.debug.StackFrame Stack Frame} - * '. 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 fr.obeo.dsl.debug.StackFrame - * @generated - */ - public Adapter createStackFrameAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.obeo.dsl.debug.Variable Variable}'. - * 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 fr.obeo.dsl.debug.Variable - * @generated - */ - public Adapter createVariableAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.obeo.dsl.debug.CurrentSession - * Current Session}'. 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 fr.obeo.dsl.debug.CurrentSession - * @generated - */ - public Adapter createCurrentSessionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.obeo.dsl.debug.RegisterGroup - * Register Group}'. 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 fr.obeo.dsl.debug.RegisterGroup - * @generated - */ - public Adapter createRegisterGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.obeo.dsl.debug.Register Register}'. - * 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 fr.obeo.dsl.debug.Register - * @generated - */ - public Adapter createRegisterAdapter() { - 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; - } - -} // DebugAdapterFactory diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.checkstyle b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.checkstyle similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.checkstyle rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.checkstyle diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.classpath b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.classpath similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.classpath rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.classpath diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.project b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.project new file mode 100644 index 000000000..9fc910745 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.dsl.debug.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.settings/org.eclipse.jdt.core.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.settings/org.eclipse.jdt.core.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.settings/org.eclipse.jdt.core.prefs diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.settings/org.eclipse.jdt.ui.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/.settings/org.eclipse.jdt.ui.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/.settings/org.eclipse.jdt.ui.prefs diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/META-INF/MANIFEST.MF new file mode 100644 index 000000000..dc4589d3e --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.dsl.debug.edit;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.gemoc.dsl.debug.provider.DebugEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.eclipse.gemoc.dsl.debug.provider +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.gemoc.dsl.debug;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/about.html b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/about.html similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/about.html rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/about.html diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/build.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/build.properties new file mode 100644 index 000000000..0550a9a3e --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/,\ + src/ +output.. = bin/ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateCurrentSession_debugTargets_DebugTarget.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateCurrentSession_debugTargets_DebugTarget.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateCurrentSession_debugTargets_DebugTarget.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateCurrentSession_debugTargets_DebugTarget.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateDebugTarget_threads_Thread.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateDebugTarget_threads_Thread.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateDebugTarget_threads_Thread.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateDebugTarget_threads_Thread.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateRegisterGroup_registers_Register.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateRegisterGroup_registers_Register.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateRegisterGroup_registers_Register.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateRegisterGroup_registers_Register.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_childFrame_StackFrame.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_childFrame_StackFrame.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_childFrame_StackFrame.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_childFrame_StackFrame.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_registerGroups_RegisterGroup.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_registerGroups_RegisterGroup.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_registerGroups_RegisterGroup.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_registerGroups_RegisterGroup.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_variables_Register.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_variables_Register.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_variables_Register.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_variables_Register.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_variables_Variable.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_variables_Variable.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_variables_Variable.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateStackFrame_variables_Variable.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateThread_breakpoints_BreakPoint.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateThread_breakpoints_BreakPoint.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/ctool16/CreateThread_breakpoints_BreakPoint.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/ctool16/CreateThread_breakpoints_BreakPoint.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/deco16/RUNNING.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/deco16/RUNNING.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/deco16/RUNNING.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/deco16/RUNNING.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/deco16/SUSPENDED.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/deco16/SUSPENDED.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/deco16/SUSPENDED.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/deco16/SUSPENDED.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/deco16/TERMINATED.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/deco16/TERMINATED.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/deco16/TERMINATED.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/deco16/TERMINATED.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/deco16/breakpoint.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/deco16/breakpoint.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/deco16/breakpoint.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/deco16/breakpoint.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/Breakpoint.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/Breakpoint.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/Breakpoint.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/Breakpoint.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/CurrentSession.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/CurrentSession.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/CurrentSession.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/CurrentSession.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/DebugTarget.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/DebugTarget.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/DebugTarget.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/DebugTarget.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/Register.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/Register.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/Register.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/Register.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/RegisterGroup.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/RegisterGroup.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/RegisterGroup.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/RegisterGroup.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/StackFrame.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/StackFrame.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/StackFrame.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/StackFrame.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/Thread.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/Thread.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/Thread.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/Thread.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/Variable.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/Variable.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/icons/full/obj16/Variable.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/icons/full/obj16/Variable.gif diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/plugin.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/plugin.properties new file mode 100644 index 000000000..5fb3c4346 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/plugin.properties @@ -0,0 +1,98 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### + +pluginName = Debug Model Edit Support +providerName = Obeo + +_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_DebugTarget_type = Target +_UI_Thread_type = Thread +_UI_StackFrame_type = Stack Frame +_UI_Variable_type = Variable +_UI_CurrentSession_type = Current Session +_UI_BreakPoint_type = Break Point +_UI_RegisterGroup_type = Register Group +_UI_Register_type = Register +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_DebugTarget_name_feature = Name +_UI_DebugTarget_state_feature = State +_UI_DebugTarget_threads_feature = Threads +_UI_DebugTarget_context_feature = Context +_UI_Thread_bottomStackFrame_feature = Bottom Stack Frame +_UI_Thread_topStackFrame_feature = Top Stack Frame +_UI_Thread_name_feature = Name +_UI_Thread_parent_feature = Parent +_UI_Thread_breakpoints_feature = Breakpoints +_UI_Thread_context_feature = Context +_UI_StackFrame_variables_feature = Variables +_UI_StackFrame_childFrame_feature = Child Frame +_UI_StackFrame_state_feature = State +_UI_StackFrame_parent_feature = Parent +_UI_StackFrame_name_feature = Name +_UI_StackFrame_currentInstruction_feature = Current Instruction +_UI_StackFrame_parentFrame_feature = Parent Frame +_UI_StackFrame_registerGroups_feature = Register Groups +_UI_Variable_name_feature = Name +_UI_Variable_elements_feature = Elements +_UI_CurrentSession_debugTargets_feature = Debug Targets +_UI_BreakPoint_instruction_feature = Instruction +_UI_RegisterGroup_name_feature = Name +_UI_RegisterGroup_registers_feature = Registers +_UI_Register_registerGroup_feature = Register Group +_UI_Unknown_feature = Unspecified + +_UI_DebugTargetState_NOT_STARTED_literal = NOT_STARTED +_UI_DebugTargetState_RUNNING_literal = RUNNING +_UI_DebugTargetState_SUSPENDED_literal = SUSPENDED +_UI_DebugTargetState_DISCONNECTED_literal = DISCONNECTED +_UI_DebugTargetState_TERMINATED_literal = TERMINATED +_UI_StackFrameState_NOT_STARTED_literal = NOT_STARTED +_UI_StackFrameState_RUNNING_literal = RUNNING +_UI_StackFrameState_STEPPING_literal = STEPPING +_UI_StackFrameState_SUSPENDED_literal = SUSPENDED +_UI_StackFrameState_TERMINATED_literal = TERMINATED +_UI_Thread_debugTarget_feature = Debug Target +_UI_StackFrame_thread_feature = Thread +_UI_Thread_state_feature = State +_UI_State_RUNNING_literal = RUNNING +_UI_State_STEPPING_literal = STEPPING +_UI_State_SUSPENDED_literal = SUSPENDED +_UI_State_TERMINATED_literal = TERMINATED +_UI_DebugTargetState_TERMINATING_literal = TERMINATING +_UI_DebugTargetState_RUN_ON_START_literal = RUN_ON_START +_UI_DebugTargetState_SUSPEND_ON_START_literal = SUSPEND_ON_START +_UI_DebugTargetState_CONNECTED_literal = CONNECTED +_UI_State_TERMINATING_literal = TERMINATING +_UI_State_STEPPING_OVER_literal = STEPPING_OVER +_UI_State_STEPPING_INTO_literal = STEPPING_INTO +_UI_State_STEPPING_RETURN_literal = STEPPING_RETURN +_UI_State_SUSPENDING_literal = SUSPENDING +_UI_StackFrame_canStepIntoCurrentInstruction_feature = Can Step Into Current Instruction +_UI_Variable_valueChanged_feature = Value Changed +_UI_Thread_priority_feature = Priority +_UI_Variable_frame_feature = Frame +_UI_Contextual_type = Contextual +_UI_Contextual_context_feature = Context +_UI_Variable_values_feature = Values +_UI_Variable_declarationType_feature = Declaration Type +_UI_Variable_value_feature = Value +_UI_Variable_supportModifications_feature = Support Modifications diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/plugin.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/plugin.xml new file mode 100644 index 000000000..bb4aa7a59 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/plugin.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/pom.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/pom.xml new file mode 100644 index 000000000..6049d856c --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/pom.xml @@ -0,0 +1,25 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.edit + 2.3.0-SNAPSHOT + eclipse-plugin + diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/CurrentSessionItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/CurrentSessionItemProvider.java similarity index 94% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/CurrentSessionItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/CurrentSessionItemProvider.java index 29d93bf73..70027abf0 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/CurrentSessionItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/CurrentSessionItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,11 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.CurrentSession; -import fr.obeo.dsl.debug.DebugFactory; -import fr.obeo.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.CurrentSession; +import org.eclipse.gemoc.dsl.debug.DebugFactory; +import org.eclipse.gemoc.dsl.debug.DebugPackage; import java.util.Collection; import java.util.List; @@ -31,7 +31,7 @@ import org.eclipse.emf.edit.provider.ViewerNotification; /** - * This is the item provider adapter for a {@link fr.obeo.dsl.debug.CurrentSession} object. * * @generated diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugEditPlugin.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugEditPlugin.java similarity index 97% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugEditPlugin.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugEditPlugin.java index 9d4803b37..f06ed80b5 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugEditPlugin.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugEditPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; import org.eclipse.emf.common.EMFPlugin; import org.eclipse.emf.common.util.ResourceLocator; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugItemProviderAdapterFactory.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugItemProviderAdapterFactory.java similarity index 86% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugItemProviderAdapterFactory.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugItemProviderAdapterFactory.java index 82d2b87cc..55722ecc8 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugItemProviderAdapterFactory.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugItemProviderAdapterFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.util.DebugAdapterFactory; +import org.eclipse.gemoc.dsl.debug.util.DebugAdapterFactory; import java.util.ArrayList; import java.util.Collection; @@ -83,7 +83,7 @@ public DebugItemProviderAdapterFactory() { } /** - * This keeps track of the one adapter used for all {@link fr.obeo.dsl.debug.DebugTarget} instances. * * @generated @@ -91,7 +91,7 @@ public DebugItemProviderAdapterFactory() { protected DebugTargetItemProvider debugTargetItemProvider; /** - * This creates an adapter for a {@link fr.obeo.dsl.debug.DebugTarget}. + * This creates an adapter for a {@link org.eclipse.gemoc.dsl.debug.DebugTarget}. * * @generated @@ -106,7 +106,7 @@ public Adapter createDebugTargetAdapter() { } /** - * This keeps track of the one adapter used for all {@link fr.obeo.dsl.debug.Thread} instances. * * @generated @@ -114,7 +114,7 @@ public Adapter createDebugTargetAdapter() { protected ThreadItemProvider threadItemProvider; /** - * This creates an adapter for a {@link fr.obeo.dsl.debug.Thread}. + * This creates an adapter for a {@link org.eclipse.gemoc.dsl.debug.Thread}. * * @generated @@ -129,7 +129,7 @@ public Adapter createThreadAdapter() { } /** - * This keeps track of the one adapter used for all {@link fr.obeo.dsl.debug.StackFrame} instances. * * @generated @@ -137,7 +137,7 @@ public Adapter createThreadAdapter() { protected StackFrameItemProvider stackFrameItemProvider; /** - * This creates an adapter for a {@link fr.obeo.dsl.debug.StackFrame}. + * This creates an adapter for a {@link org.eclipse.gemoc.dsl.debug.StackFrame}. * * @generated @@ -152,7 +152,7 @@ public Adapter createStackFrameAdapter() { } /** - * This keeps track of the one adapter used for all {@link fr.obeo.dsl.debug.Variable} instances. * * @generated @@ -160,7 +160,7 @@ public Adapter createStackFrameAdapter() { protected VariableItemProvider variableItemProvider; /** - * This creates an adapter for a {@link fr.obeo.dsl.debug.Variable}. + * This creates an adapter for a {@link org.eclipse.gemoc.dsl.debug.Variable}. * * @generated @@ -175,14 +175,14 @@ public Adapter createVariableAdapter() { } /** - * This keeps track of the one adapter used for all {@link fr.obeo.dsl.debug.CurrentSession} instances. + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.dsl.debug.CurrentSession} instances. * * @generated */ protected CurrentSessionItemProvider currentSessionItemProvider; /** - * This creates an adapter for a {@link fr.obeo.dsl.debug.CurrentSession}. + * This creates an adapter for a {@link org.eclipse.gemoc.dsl.debug.CurrentSession}. * * @generated @@ -197,14 +197,14 @@ public Adapter createCurrentSessionAdapter() { } /** - * This keeps track of the one adapter used for all {@link fr.obeo.dsl.debug.RegisterGroup} instances. + * This keeps track of the one adapter used for all {@link org.eclipse.gemoc.dsl.debug.RegisterGroup} instances. * * @generated */ protected RegisterGroupItemProvider registerGroupItemProvider; /** - * This creates an adapter for a {@link fr.obeo.dsl.debug.RegisterGroup}. + * This creates an adapter for a {@link org.eclipse.gemoc.dsl.debug.RegisterGroup}. * * @generated @@ -219,7 +219,7 @@ public Adapter createRegisterGroupAdapter() { } /** - * This keeps track of the one adapter used for all {@link fr.obeo.dsl.debug.Register} instances. * * @generated @@ -227,7 +227,7 @@ public Adapter createRegisterGroupAdapter() { protected RegisterItemProvider registerItemProvider; /** - * This creates an adapter for a {@link fr.obeo.dsl.debug.Register}. + * This creates an adapter for a {@link org.eclipse.gemoc.dsl.debug.Register}. * * @generated diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugTargetItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugTargetItemProvider.java similarity index 96% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugTargetItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugTargetItemProvider.java index 6ea5997b5..cbd59db41 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/DebugTargetItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugTargetItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,11 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.DebugFactory; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugFactory; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; import java.util.Collection; import java.util.List; @@ -33,7 +33,7 @@ import org.eclipse.emf.edit.provider.ViewerNotification; /** - * This is the item provider adapter for a {@link fr.obeo.dsl.debug.DebugTarget} object. + * This is the item provider adapter for a {@link org.eclipse.gemoc.dsl.debug.DebugTarget} object. * * @generated diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/RegisterGroupItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/RegisterGroupItemProvider.java similarity index 95% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/RegisterGroupItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/RegisterGroupItemProvider.java index e6b10d313..c37b649ee 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/RegisterGroupItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/RegisterGroupItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,11 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.DebugFactory; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.RegisterGroup; +import org.eclipse.gemoc.dsl.debug.DebugFactory; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.RegisterGroup; import java.util.Collection; import java.util.List; @@ -33,7 +33,7 @@ import org.eclipse.emf.edit.provider.ViewerNotification; /** - * This is the item provider adapter for a {@link fr.obeo.dsl.debug.RegisterGroup} object. + * This is the item provider adapter for a {@link org.eclipse.gemoc.dsl.debug.RegisterGroup} object. * * @generated diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/RegisterItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/RegisterItemProvider.java similarity index 93% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/RegisterItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/RegisterItemProvider.java index 6b031a415..715179301 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/RegisterItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/RegisterItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.Register; +import org.eclipse.gemoc.dsl.debug.Register; import java.util.Collection; import java.util.List; @@ -20,7 +20,7 @@ import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; /** - * This is the item provider adapter for a {@link fr.obeo.dsl.debug.Register} object. + * This is the item provider adapter for a {@link org.eclipse.gemoc.dsl.debug.Register} object. * * * @generated diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/StackFrameItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/StackFrameItemProvider.java similarity index 96% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/StackFrameItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/StackFrameItemProvider.java index 4124e82db..f3441e691 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/StackFrameItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/StackFrameItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,11 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.DebugFactory; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.DebugFactory; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.StackFrame; import java.util.Collection; import java.util.List; @@ -33,7 +33,7 @@ import org.eclipse.emf.edit.provider.ViewerNotification; /** - * This is the item provider adapter for a {@link fr.obeo.dsl.debug.StackFrame} object. + * This is the item provider adapter for a {@link org.eclipse.gemoc.dsl.debug.StackFrame} object. * * @generated diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/ThreadItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/ThreadItemProvider.java similarity index 95% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/ThreadItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/ThreadItemProvider.java index bac8332fd..483293719 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/ThreadItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/ThreadItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugPackage; import java.util.Collection; import java.util.List; @@ -30,7 +30,7 @@ import org.eclipse.emf.edit.provider.ViewerNotification; /** - * This is the item provider adapter for a {@link fr.obeo.dsl.debug.Thread} object. + * This is the item provider adapter for a {@link org.eclipse.gemoc.dsl.debug.Thread} object. * * * @generated @@ -218,7 +218,7 @@ public Object getImage(Object object) { */ @Override public String getText(Object object) { - String label = ((fr.obeo.dsl.debug.Thread)object).getName(); + String label = ((org.eclipse.gemoc.dsl.debug.Thread)object).getName(); return label == null || label.length() == 0 ? getString("_UI_Thread_type") : getString("_UI_Thread_type") + " " + label; @@ -235,7 +235,7 @@ public String getText(Object object) { public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(fr.obeo.dsl.debug.Thread.class)) { + switch (notification.getFeatureID(org.eclipse.gemoc.dsl.debug.Thread.class)) { case DebugPackage.THREAD__STATE: case DebugPackage.THREAD__NAME: case DebugPackage.THREAD__PRIORITY: diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/VariableItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/VariableItemProvider.java similarity index 96% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/VariableItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/VariableItemProvider.java index 414a5c188..3c726ecf5 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src-gen/fr/obeo/dsl/debug/provider/VariableItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/VariableItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.Variable; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.Variable; import java.util.Collection; import java.util.List; @@ -31,7 +31,7 @@ import org.eclipse.emf.edit.provider.ViewerNotification; /** - * This is the item provider adapter for a {@link fr.obeo.dsl.debug.Variable} object. + * This is the item provider adapter for a {@link org.eclipse.gemoc.dsl.debug.Variable} object. * * * @generated diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomDebugItemProviderAdapterFactory.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomDebugItemProviderAdapterFactory.java similarity index 94% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomDebugItemProviderAdapterFactory.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomDebugItemProviderAdapterFactory.java index 8389d6c89..7d1bf2fcf 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomDebugItemProviderAdapterFactory.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomDebugItemProviderAdapterFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; import org.eclipse.emf.common.notify.Adapter; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomDebugTargetItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomDebugTargetItemProvider.java similarity index 89% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomDebugTargetItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomDebugTargetItemProvider.java index 720521e2c..8feab8401 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomDebugTargetItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomDebugTargetItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,12 +8,12 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.Contextual; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetState; -import fr.obeo.dsl.debug.DebugTargetUtils; +import org.eclipse.gemoc.dsl.debug.Contextual; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetState; +import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; import java.util.ArrayList; import java.util.List; @@ -34,7 +34,7 @@ public class CustomDebugTargetItemProvider extends DebugTargetItemProvider { /** - * {@link ComposedAdapterFactory} to get {@link fr.obeo.dsl.debug.Contextual#getContext() context} image + * {@link ComposedAdapterFactory} to get {@link org.eclipse.gemoc.dsl.debug.Contextual#getContext() context} image * and text. */ private final ComposedAdapterFactory efactory; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomStackFrameItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomStackFrameItemProvider.java similarity index 89% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomStackFrameItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomStackFrameItemProvider.java index b285af689..715babcd2 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomStackFrameItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomStackFrameItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.Contextual; -import fr.obeo.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.Contextual; +import org.eclipse.gemoc.dsl.debug.StackFrame; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.ecore.EObject; @@ -28,7 +28,7 @@ public class CustomStackFrameItemProvider extends StackFrameItemProvider { /** - * {@link ComposedAdapterFactory} to get {@link fr.obeo.dsl.debug.Contextual#getContext() context} image + * {@link ComposedAdapterFactory} to get {@link org.eclipse.gemoc.dsl.debug.Contextual#getContext() context} image * and text. */ private final ComposedAdapterFactory efactory; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomThreadItemProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomThreadItemProvider.java similarity index 90% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomThreadItemProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomThreadItemProvider.java index 1d223dc7e..1ce99bed2 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.edit/src/fr/obeo/dsl/debug/provider/CustomThreadItemProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src/org/eclipse/gemoc/dsl/debug/provider/CustomThreadItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,12 +8,12 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.provider; +package org.eclipse.gemoc.dsl.debug.provider; -import fr.obeo.dsl.debug.Contextual; -import fr.obeo.dsl.debug.State; -import fr.obeo.dsl.debug.Thread; -import fr.obeo.dsl.debug.ThreadUtils; +import org.eclipse.gemoc.dsl.debug.Contextual; +import org.eclipse.gemoc.dsl.debug.State; +import org.eclipse.gemoc.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.ThreadUtils; import java.util.ArrayList; import java.util.List; @@ -34,7 +34,7 @@ public class CustomThreadItemProvider extends ThreadItemProvider { /** - * {@link ComposedAdapterFactory} to get {@link fr.obeo.dsl.debug.Contextual#getContext() context} image + * {@link ComposedAdapterFactory} to get {@link org.eclipse.gemoc.dsl.debug.Contextual#getContext() context} image * and text. */ private final ComposedAdapterFactory efactory; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.checkstyle b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.checkstyle similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.checkstyle rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.checkstyle diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/.classpath b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.classpath similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/.classpath rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.classpath diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.project b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.project new file mode 100644 index 000000000..0ce8a2dfc --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.dsl.debug.ide.sirius.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.core.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..c25b2af9e --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +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.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=110 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=8 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=110 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=false diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.ui.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.ui.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.ui.prefs diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/META-INF/MANIFEST.MF new file mode 100644 index 000000000..18010aac9 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/META-INF/MANIFEST.MF @@ -0,0 +1,29 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.dsl.debug.ide.sirius.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-Vendor: %providerName +Require-Bundle: org.eclipse.debug.ui;bundle-version="3.7.0", + org.eclipse.ui;bundle-version="3.7.0", + org.eclipse.emf.edit.ui;bundle-version="2.7.0", + org.eclipse.gemoc.dsl.debug.edit;bundle-version="1.0.0", + org.eclipse.gemoc.dsl.debug.ide;bundle-version="1.0.0", + org.eclipse.core.runtime;bundle-version="3.7.0", + org.eclipse.ui.ide;bundle-version="3.7.0", + org.eclipse.gemoc.dsl.debug.ide.ui;bundle-version="1.0.0", + org.eclipse.sirius;bundle-version="4.1.1", + org.eclipse.sirius.ui;bundle-version="4.0.0", + org.eclipse.sirius.diagram;bundle-version="4.0.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0", + org.eclipse.sirius.diagram.ui;bundle-version="4.0.0", + com.google.guava;bundle-version="15.0.0", + org.eclipse.equinox.registry, + org.eclipse.gemoc.trace.commons.model +Bundle-ActivationPolicy: lazy +Bundle-Activator: org.eclipse.gemoc.dsl.debug.ide.sirius.ui.DebugSiriusIdeUiPlugin$Implementation +Export-Package: org.eclipse.gemoc.dsl.debug.ide.sirius.ui, + org.eclipse.gemoc.dsl.debug.ide.sirius.ui.action, + org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch, + org.eclipse.gemoc.dsl.debug.ide.sirius.ui.services diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/about.html b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/about.html similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/about.html rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/about.html diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/build.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/build.properties similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/build.properties rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/build.properties diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/plugin.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/plugin.properties similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/plugin.properties rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/plugin.properties diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/pom.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/pom.xml new file mode 100644 index 000000000..71db6f2ad --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/pom.xml @@ -0,0 +1,25 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.ide.sirius.ui + 2.3.0-SNAPSHOT + eclipse-plugin + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DSLDebugModelPresentation.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DSLDebugModelPresentation.java new file mode 100644 index 000000000..6a658e40e --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DSLDebugModelPresentation.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.sirius.ui; + +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLStackFrameAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; + +import java.util.List; + +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.debug.core.model.IDebugTarget; +import org.eclipse.debug.core.model.IStackFrame; +import org.eclipse.debug.core.model.IThread; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.business.api.session.SessionManager; +import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; +import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; +import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; + +/** + * The {@link org.eclipse.debug.ui.IDebugModelPresentation IDebugModelPresentation} for the DSL debug model. + * + * @author Yvan Lussaud + */ +public class DSLDebugModelPresentation extends org.eclipse.gemoc.dsl.debug.ide.ui.DSLDebugModelPresentation { + + // FIXME this code is ugly but should work... the right way to do this is to add + // DialectUIManager.getEditorInput(...) and DialectUIManager.getEditorID(...) + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=426431 + + /** + * The opened {@link IEditorPart}. + */ + IEditorPart editor; + + @Override + public IEditorInput getEditorInput(Object element) { + final IEditorInput res; + + final URI instructionURI; + if (element instanceof EObject) { + instructionURI = EcoreUtil.getURI((EObject)element); + } else if (element instanceof DSLBreakpoint) { + instructionURI = ((DSLBreakpoint)element).getURI(); + } else { + instructionURI = null; + } + + editor = null; + if (instructionURI != null) { + + final Session session; + final Session inSession; + if (element instanceof EObject) { + inSession = SessionManager.INSTANCE.getSession((EObject)element); + } else { + inSession = null; + } + if (inSession != null) { + session = inSession; + } else { + List sessions = SiriusEditorUtils.getSessions(instructionURI); + if (sessions.size() > 1) { + session = selectSession(sessions); + } else if (sessions.size() == 1) { + session = sessions.get(0); + } else { + session = null; + } + } + + if (session != null) { + List representations = SiriusEditorUtils.getRepresentations(session, + instructionURI); + + final DRepresentation representation; + if (representations.size() > 1) { + representation = selectRepresentation(representations); + } else if (representations.size() == 1) { + representation = representations.get(0); + } else { + representation = null; + } + + if (representation != null) { + editor = DialectUIManager.INSTANCE.openEditor(session, representation, + new NullProgressMonitor()); + res = editor.getEditorInput(); + } else { + res = super.getEditorInput(instructionURI); + } + } else { + res = super.getEditorInput(instructionURI); + } + } else { + return null; + } + + return res; + } + + /** + * Selects a {@link Session} from the given {@link List} of {@link Session}. + * + * @param sessions + * the {@link List} of {@link Session} + * @return a selected {@link Session} from the given {@link List} of {@link Session} + */ + protected Session selectSession(List sessions) { + return sessions.get(0); + } + + /** + * Selects a {@link DRepresentation} from the given {@link List} of {@link DRepresentation}. + * + * @param representations + * the {@link List} of {@link DRepresentation} + * @return a selected {@link DRepresentation} from the given {@link List} of {@link DRepresentation} + */ + protected DRepresentation selectRepresentation(List representations) { + return representations.get(0); + } + + @Override + public String getEditorId(IEditorInput input, Object element) { + final String res; + + if (editor != null) { + res = editor.getEditorSite().getId(); + } else { + res = super.getEditorId(input, element); + } + + return res; + } + + @Override + public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) { + if (frame instanceof DSLStackFrameAdapter) { + changeCurrentStackFrame(frame); + if (editorPart instanceof DialectEditor) { + final EObject instruction = ((DSLStackFrameAdapter)frame).getCurrentInstruction(); + SiriusEditorUtils.showInstruction((DialectEditor)editorPart, instruction); + } else { + super.addAnnotations(editorPart, frame); + } + } + + return true; + } + + /** + * Changes the current {@link IStackFrame}. + * + * @param frame + * the selected {@link IStackFrame} + */ + protected void changeCurrentStackFrame(IStackFrame frame) { + final IDebugTarget debugTarget = frame.getDebugTarget(); + for (IDSLCurrentInstructionListener listener : ((DSLDebugTargetAdapter)debugTarget) + .getCurrentInstructionListeners()) { + listener.setCurrentFrame(frame.getModelIdentifier(), ((DSLStackFrameAdapter)frame).getHost()); + } + } + + @Override + public void removeAnnotations(IEditorPart editorPart, IThread thread) { + // nothing to do here + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DSLToggleBreakpointsUtils.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DSLToggleBreakpointsUtils.java new file mode 100644 index 000000000..2a7dcfbcf --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DSLToggleBreakpointsUtils.java @@ -0,0 +1,121 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.sirius.ui; + +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.diagram.ui.edit.api.part.IDDiagramEditPart; +import org.eclipse.sirius.diagram.ui.edit.api.part.IDiagramElementEditPart; +import org.eclipse.sirius.ui.business.api.dialect.marker.TraceabilityMarkerNavigationProvider; +import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.sirius.viewpoint.DSemanticDecorator; + +//import org.eclipse.sirius.diagram.edit.api.part.IDDiagramEditPart; + +/** + * Utility class for breakpoint {@link DSLBreakpoint} toggling. + * + * @author Yvan Lussaud + */ +public class DSLToggleBreakpointsUtils extends org.eclipse.gemoc.dsl.debug.ide.ui.DSLToggleBreakpointsUtils { + + /** + * The annotation ID for debug {@link DRepresentation}. + */ + public static final String ANNOTATION_ID = "org.eclipse.gemoc.dsl.debug.ide.sirius.ui.breakpointAnnotation"; + + /** + * Constructor. + * + * @param identifier + * the debug model identifier + */ + public DSLToggleBreakpointsUtils(String identifier) { + super(identifier); + } + + @Override + protected EObject getInstruction(Object selected) { + final EObject res; + + if (selected instanceof DSemanticDecorator) { + res = super.getInstruction(((DSemanticDecorator)selected).getTarget()); + } else if (selected instanceof IDiagramElementEditPart) { + res = super.getInstruction(((IDiagramElementEditPart)selected).resolveTargetSemanticElement()); + } else if (selected instanceof IDDiagramEditPart) { + res = ((DSemanticDecorator)((IDDiagramEditPart)selected).resolveSemanticElement()).getTarget(); + } else { + res = super.getInstruction(selected); + } + + return res; + } + + @Override + protected DSLBreakpoint createBreakpoint(Object selected, EObject instruction) throws CoreException { + final DSLBreakpoint res = super.createBreakpoint(selected, instruction); + + final DSemanticDecorator decorator; + if (selected instanceof DSemanticDecorator) { + decorator = (DSemanticDecorator)selected; + } else if (selected instanceof IDiagramElementEditPart) { + decorator = ((IDiagramElementEditPart)selected).resolveDiagramElement(); + } else if (selected instanceof IDDiagramEditPart) { + decorator = (DSemanticDecorator)((IDDiagramEditPart)selected).resolveSemanticElement(); + } else { + decorator = null; + } + + if (decorator != null) { + final DRepresentation representation = getDRepresentation(decorator); + + if (representation != null) { + final IMarker marker = res.getMarker(); + marker.setAttribute(TraceabilityMarkerNavigationProvider.INTERNAL_REPRESENTATION_URI, + EcoreUtil.getURI(representation).toString()); + marker.setAttribute(TraceabilityMarkerNavigationProvider.REPRESENTATION_ELEMENT_ID, + representation.eResource().getURIFragment(decorator).toString()); + marker.setAttribute(TraceabilityMarkerNavigationProvider.REPRESENTATION_URI, EcoreUtil + .getURI(representation).toString()); + marker.setAttribute("traceab_viewpoint_ghost", "active"); + } + } + + return res; + } + + /** + * Gets the {@link DRepresentation} from the given {@link DSemanticDecorator}. + * + * @param decorator + * the {@link DSemanticDecorator} + * @return the {@link DRepresentation} from the given {@link DSemanticDecorator} + */ + protected DRepresentation getDRepresentation(DSemanticDecorator decorator) { + DRepresentation res = null; + EObject current = decorator; + while (current != null) { + if (current instanceof DRepresentation) { + res = (DRepresentation)current; + break; + } else { + current = current.eContainer(); + } + } + + return res; + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DebugSiriusIdeUiPlugin.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DebugSiriusIdeUiPlugin.java new file mode 100644 index 000000000..4895ccf64 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/DebugSiriusIdeUiPlugin.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.sirius.ui; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; +import org.osgi.framework.BundleContext; + +/** + * This is the central singleton for the Debug IDE UI plug-in. + * + * @author Yvan Lussaud + */ +public final class DebugSiriusIdeUiPlugin extends EMFPlugin { + + /** + * The plug-in identifier. + */ + public static final String ID = "org.eclipse.gemoc.dsl.debug.ide.sirius.ui"; + + /** + * Keep track of the singleton. + */ + public static final DebugSiriusIdeUiPlugin INSTANCE = new DebugSiriusIdeUiPlugin(); + + /** + * Keep track of the singleton. + */ + private static Implementation plugin; + + /** + * Create the instance. + */ + public DebugSiriusIdeUiPlugin() { + super(new ResourceLocator[] {}); + } + + /** + * Returns the singleton instance of the Eclipse plug-in. + * + * @return the singleton instance. + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plug-in. + * + * @return the singleton instance. + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plug-in. + */ + public static class Implementation extends EclipsePlugin { + + /** + * Creates an instance. + */ + public Implementation() { + super(); + // Remember the static instance. + // + plugin = this; + + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + } + + @Override + public void stop(BundleContext context) throws Exception { + super.stop(context); + } + + } + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/SiriusEditorUtils.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/SiriusEditorUtils.java similarity index 95% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/SiriusEditorUtils.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/SiriusEditorUtils.java index 18cc85b63..dfb43e286 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/SiriusEditorUtils.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/SiriusEditorUtils.java @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui; +package org.eclipse.gemoc.dsl.debug.ide.sirius.ui; import java.util.ArrayList; import java.util.LinkedHashSet; @@ -32,6 +32,7 @@ import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; import org.eclipse.sirius.ui.business.api.dialect.marker.TraceabilityMarkerNavigationProvider; import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.sirius.viewpoint.DRepresentationDescriptor; import org.eclipse.sirius.viewpoint.DRepresentationElement; import org.eclipse.sirius.viewpoint.DView; import org.eclipse.sirius.viewpoint.ViewpointPackage; @@ -86,8 +87,10 @@ public static List getRepresentations(Session session, URI inst final EObject instruction = session.getTransactionalEditingDomain().getResourceSet().getEObject( instructionURI, false); + for (DView view : session.getSelectedViews()) { - for (DRepresentation representation : view.getOwnedRepresentations()) { + for (DRepresentationDescriptor rdescriptor : view.getOwnedRepresentationDescriptors()) { + DRepresentation representation = rdescriptor.getRepresentation(); if (representSemanticElement(representation, instruction)) { res.add(representation); } @@ -137,8 +140,8 @@ public static void showInstruction(DialectEditor editorPart, EObject instruction final URI resourceURI = instruction.eResource().getURI(); if (resourceURI.isPlatformResource()) { final String resourcePath = resourceURI.toPlatformString(true); - final IResource resource = ResourcesPlugin.getWorkspace().getRoot().getFile( - new Path(resourcePath)); + final IResource resource = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path( + resourcePath)); try { final IMarker marker = resource.createMarker(EValidator.MARKER); marker.setAttribute(EValidator.URI_ATTRIBUTE, EcoreUtil.getURI(instruction).toString()); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/action/AbstractDebugAsAction.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/action/AbstractDebugAsAction.java similarity index 94% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/action/AbstractDebugAsAction.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/action/AbstractDebugAsAction.java index 7bd7ca08a..dde5744a3 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/action/AbstractDebugAsAction.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/action/AbstractDebugAsAction.java @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui.action; +package org.eclipse.gemoc.dsl.debug.ide.sirius.ui.action; -import fr.obeo.dsl.debug.ide.sirius.ui.DebugSiriusIdeUiPlugin; -import fr.obeo.dsl.debug.ide.ui.launch.AbstractDSLLaunchConfigurationDelegateUI; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.DebugSiriusIdeUiPlugin; +import org.eclipse.gemoc.dsl.debug.ide.ui.launch.AbstractDSLLaunchConfigurationDelegateUI; import java.util.Collection; import java.util.HashSet; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/action/AbstractToggleBreakpointAction.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/action/AbstractToggleBreakpointAction.java similarity index 93% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/action/AbstractToggleBreakpointAction.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/action/AbstractToggleBreakpointAction.java index 5942eb8ea..c88b11ecc 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/src/fr/obeo/dsl/debug/ide/sirius/ui/action/AbstractToggleBreakpointAction.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/action/AbstractToggleBreakpointAction.java @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.sirius.ui.action; +package org.eclipse.gemoc.dsl.debug.ide.sirius.ui.action; -import fr.obeo.dsl.debug.ide.sirius.ui.DSLToggleBreakpointsUtils; -import fr.obeo.dsl.debug.ide.sirius.ui.DebugSiriusIdeUiPlugin; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.DSLToggleBreakpointsUtils; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.DebugSiriusIdeUiPlugin; import java.util.Collection; import java.util.Map; 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/AbstractDSLLaunchConfigurationDelegateUI.java new file mode 100644 index 000000000..def5c52b7 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +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; + +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.sirius.business.api.helper.SiriusUtil; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.business.api.session.SessionManager; +import org.eclipse.ui.PlatformUI; + +/** + * 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 { + + /** + * The Sirius {@link org.eclipse.emf.ecore.resource.Resource Resource} + * {@link org.eclipse.emf.ecore.resource.Resource#getURI() URI}. + */ + public static final String SIRIUS_RESOURCE_URI = SiriusUtil.SESSION_RESOURCE_EXTENSION + RESOURCE_URI; + + @Override + protected ILaunchConfiguration[] createLaunchConfiguration(IResource file, EObject firstInstruction, + String mode) throws CoreException { + final ILaunchConfiguration[] res; + if (SiriusUtil.SESSION_RESOURCE_EXTENSION.equals(file.getFileExtension())) { + final IResource semanticFile; + if (firstInstruction != null) { + semanticFile = getLaunchableResource(new StructuredSelection(firstInstruction)); + res = super.createLaunchConfiguration(semanticFile, firstInstruction, mode); + } else { + final Session session = SessionManager.INSTANCE.getSession(URI.createPlatformResourceURI(file + .getFullPath().toString(), true), new NullProgressMonitor()); + session.getSemanticResources(); + // prompt the selection of an instruction from the Session EResources + EObject selectedInstruction = DSLLaunchConfigurationTab.openFirstInstructionSelection( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), session + .getTransactionalEditingDomain().getResourceSet()); + if (selectedInstruction != null) { + semanticFile = getLaunchableResource(new StructuredSelection(selectedInstruction)); + res = super.createLaunchConfiguration(semanticFile, selectedInstruction, mode); + } else { + // TODO we have to few information to create the launch configuration prompt the user for + // aird + first instruction ? + semanticFile = null; + res = super.createLaunchConfiguration(file, firstInstruction, mode); + } + } + for (ILaunchConfiguration config : res) { + if (config instanceof ILaunchConfigurationWorkingCopy) { + ((ILaunchConfigurationWorkingCopy)config).setAttribute(SIRIUS_RESOURCE_URI, file + .getFullPath().toString()); + if (semanticFile != null) { + IResource[] resources = config.getMappedResources(); + resources = Arrays.copyOf(resources, resources.length + 1); + resources[resources.length - 1] = file; + ((ILaunchConfigurationWorkingCopy)config).setMappedResources(resources); + } + ((ILaunchConfigurationWorkingCopy)config).doSave(); + } + } + } else { + // TODO? assume the file is the first instruction resource + res = super.createLaunchConfiguration(file, firstInstruction, mode); + } + return res; + } + + @Override + protected List getCurrentInstructionListeners() { + final List res = super.getCurrentInstructionListeners(); + res.add(AbstractDSLDebuggerServices.LISTENER); + return res; + } + + // @Override + // protected void launch(EObject firstInstruction, ILaunchConfiguration configuration, String mode, + // ILaunch launch, IProgressMonitor monitor) throws CoreException { + // final URI sessionResourceURI = URI.createPlatformResourceURI(configuration.getAttribute( + // SIRIUS_RESOURCE_URI, ""), true); + // super.launch(firstInstruction, configuration, mode, launch, monitor); + // } +} 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 new file mode 100644 index 000000000..fcdff2a8b --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/launch/DSLLaunchConfigurationTab.java @@ -0,0 +1,196 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.sirius.ui.launch; + +import org.eclipse.gemoc.dsl.debug.ide.Activator; +import org.eclipse.gemoc.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; +import org.eclipse.gemoc.dsl.debug.ide.ui.launch.FilteredFileContentProvider; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Path; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.common.util.WrappedException; +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.jface.window.Window; +import org.eclipse.sirius.business.api.helper.SiriusUtil; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; +import org.eclipse.ui.model.WorkbenchLabelProvider; + +/** + * A Sirius implementation of {@link org.eclipse.gemoc.dsl.debug.ide.ui.launch.DSLLaunchConfigurationTab + * DSLLaunchConfigurationTab}. + * + * @author Yvan Lussaud + */ +public class DSLLaunchConfigurationTab extends org.eclipse.gemoc.dsl.debug.ide.ui.launch.DSLLaunchConfigurationTab { + + /** + * The {@link Text} used for the {@link AbstractDSLLaunchConfigurationDelegateUI#SIRIUS_RESOURCE_URI}. + */ + private Text siriusResourceURIText; + + /** + * Constructor. + * + * @param extensions + * supported file extensions + */ + public DSLLaunchConfigurationTab(String[] extensions) { + super(extensions); + } + + @Override + public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { + super.setDefaults(configuration); + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, ""); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) + */ + public void initializeFrom(final ILaunchConfiguration configuration) { + super.initializeFrom(configuration); + disableUpdate = true; + + siriusResourceURIText.setText(""); + + try { + siriusResourceURIText.setText(configuration.getAttribute( + AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, "")); + } catch (CoreException e) { + Activator.getDefault().error(e); + } + + disableUpdate = false; + } + + @Override + public void performApply(ILaunchConfigurationWorkingCopy configuration) { + super.performApply(configuration); + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, + siriusResourceURIText.getText()); + } + + @Override + public boolean isValid(ILaunchConfiguration launchConfig) { + boolean res = super.isValid(launchConfig); + String errorMessage = null; + + try { + if (res) { + String siriusResourceURI = launchConfig.getAttribute( + AbstractDSLLaunchConfigurationDelegateUI.SIRIUS_RESOURCE_URI, ""); + IFile resourceFile = ResourcesPlugin.getWorkspace().getRoot().getFile( + new Path(siriusResourceURI)); + Resource resource = null; + if (resourceFile.exists()) { + final ResourceSet rs = new ResourceSetImpl(); + try { + resource = rs.getResource(URI.createPlatformResourceURI(siriusResourceURI, true), + true); + } catch (WrappedException e) { + errorMessage = "Sirius session model can't be loaded: " + + ((WrappedException)e).exception().getLocalizedMessage() + "."; + } + } + res = resource != null; + setErrorMessage(errorMessage); + } + } catch (IllegalArgumentException e) { + setErrorMessage("Invalid model file selected."); + } catch (CoreException e) { + setErrorMessage("Invalid model file selected."); + } + + return res; + } + + @Override + public boolean canSave() { + return super.canSave() && (!siriusResourceURIText.getText().isEmpty()); + } + + @Override + public void createControl(final Composite parent) { + super.createControl(parent); + Composite topControl = new Composite(parent, SWT.NONE); + topControl.setLayout(new GridLayout(1, false)); + + final Group mgroup = new Group(topControl, SWT.NONE); + mgroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + mgroup.setText("Model"); + mgroup.setLayout(new GridLayout(2, false)); + + siriusResourceURIText = new Text(mgroup, SWT.BORDER); + siriusResourceURIText.addModifyListener(new ModifyListener() { + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) + */ + public void modifyText(final ModifyEvent e) { + if (!disableUpdate) { + updateLaunchConfigurationDialog(); + } + } + }); + siriusResourceURIText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + + final Button browseResourceButton = new Button(mgroup, SWT.NONE); + browseResourceButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(final SelectionEvent e) { + openSiriusModelSelection(parent); + } + + }); + browseResourceButton.setText("Browse..."); + } + + /** + * Opens the model selection dialog. + * + * @param parent + * the parent {@link Composite} + */ + private void openSiriusModelSelection(final Composite parent) { + ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(parent.getShell(), + new WorkbenchLabelProvider(), new FilteredFileContentProvider( + new String[] {SiriusUtil.SESSION_RESOURCE_EXTENSION })); + dialog.setTitle("Select model file"); + dialog.setMessage("Select the model file to execute:"); + dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); + if (dialog.open() == Window.OK) { + siriusResourceURIText.setText(((IFile)dialog.getFirstResult()).getFullPath().toString()); + } + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/services/AbstractDSLDebuggerServices.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/services/AbstractDSLDebuggerServices.java new file mode 100644 index 000000000..61a150ad0 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui/src/org/eclipse/gemoc/dsl/debug/ide/sirius/ui/services/AbstractDSLDebuggerServices.java @@ -0,0 +1,715 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.sirius.ui.services; + +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; +import org.eclipse.gemoc.trace.commons.model.trace.ParallelStep; +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; +import org.eclipse.gemoc.dsl.debug.ide.sirius.ui.DebugSiriusIdeUiPlugin; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import org.eclipse.core.resources.IMarkerDelta; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.IBreakpointListener; +import org.eclipse.debug.core.model.IBreakpoint; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.transaction.ExceptionHandler; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack; +import org.eclipse.sirius.business.api.dialect.DialectManager; +import org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.description.Layer; +import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; +import org.eclipse.sirius.ui.business.api.session.IEditingSession; +import org.eclipse.sirius.ui.business.api.session.SessionUIManager; +import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.sirius.viewpoint.description.RepresentationDescription; + +/** + * DSL debugger services class. + * + * @author Yvan Lussaud + */ +public abstract class AbstractDSLDebuggerServices { + + /** + * A couple of {@link String}. + * + * @author Yvan Lussaud + */ + public static final class StringCouple { + + /** + * The first string of the couple. + */ + private final String first; + + /** + * The second string of the couple. + */ + private final String second; + + /** + * Constructor. + * + * @param first + * the first string of the couple + * @param second + * the second string of the couple + */ + public StringCouple(String first, String second) { + this.first = first; + this.second = second; + } + + /** + * Gets the first string of the couple. + * + * @return the first string of the couple + */ + public String getFirst() { + return first; + } + + /** + * Gets the second string of the couple. + * + * @return the second string of the couple + */ + public String getSecond() { + return second; + } + } + + /** + * An {@link IBreakpointListener} maintaining the breakpoints. + * + * @author Yvan Lussaud + */ + public static final class BreakpointListener implements IBreakpointListener, IDSLCurrentInstructionListener { + + /** + * Any layer {@link Set}, means always refresh the given {@link DRepresentation} no matter what its + * layer are. It should be used for trees and tables since they don't have layers. + */ + private static final Set ANY_LAYER = new HashSet(); + + /** + * Mapping of the {@link RepresentationDescription#getName() representation identifier} to a + * {@link Layer#getName() layer identifier} or {@link BreakpointListener#ANY_LAYER any layer}. + */ + private final Map>> representationToRefresh = new HashMap>>(); + + /** + * The current {@link StackFrame}. + */ + private StackFrame currentFrame; + + /** + * Constructs and installs a default BreakpointListener. + */ + public BreakpointListener() { + install(); + } + + /** + * Installs this {@link IBreakpointListener}. + */ + public void install() { + DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this); + for (IBreakpoint breakpoint : DebugPlugin.getDefault().getBreakpointManager().getBreakpoints()) { + if (breakpoint instanceof DSLBreakpoint) { + addBreakpoint((DSLBreakpoint)breakpoint); + } + } + } + + /** + * Uninstalls this {@link IBreakpointListener}. + */ + public void uninstall() { + DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint) + */ + public void breakpointAdded(IBreakpoint breakpoint) { + if (breakpoint instanceof DSLBreakpoint) { + addBreakpoint((DSLBreakpoint)breakpoint); + final DSLBreakpoint dslBreakpoint = (DSLBreakpoint)breakpoint; + final Set instructionURIs = new HashSet(); + instructionURIs.add(dslBreakpoint.getURI()); + notifySirius(instructionURIs, dslBreakpoint.getModelIdentifier()); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, + * org.eclipse.core.resources.IMarkerDelta) + */ + public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) { + if (breakpoint instanceof DSLBreakpoint) { + removeBreakpoint((DSLBreakpoint)breakpoint); + final DSLBreakpoint dslBreakpoint = (DSLBreakpoint)breakpoint; + final Set instructionURIs = new HashSet(); + instructionURIs.add(dslBreakpoint.getURI()); + notifySirius(instructionURIs, dslBreakpoint.getModelIdentifier()); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, + * org.eclipse.core.resources.IMarkerDelta) + */ + public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) { + try { + if (breakpoint instanceof DSLBreakpoint && delta.getAttribute(IBreakpoint.ENABLED) != null + && breakpoint.isEnabled() != ((Boolean)delta.getAttribute(IBreakpoint.ENABLED)) + .booleanValue()) { + final DSLBreakpoint dslBreakpoint = (DSLBreakpoint)breakpoint; + final Set instructionURIs = new HashSet(); + instructionURIs.add(dslBreakpoint.getURI()); + notifySirius(instructionURIs, dslBreakpoint.getModelIdentifier()); + } + } catch (CoreException e) { + // ignore + } + } + + /** + * Adds the given {@link DSLBreakpoint}. + * + * @param breakpoint + * the {@link DSLBreakpoint} + */ + protected void addBreakpoint(DSLBreakpoint breakpoint) { + Set brkps = BREAKPOINTS.get(breakpoint.getURI()); + if (brkps == null) { + brkps = new HashSet(); + BREAKPOINTS.put(breakpoint.getURI(), brkps); + } + brkps.add(breakpoint); + } + + /** + * Removes the given {@link DSLBreakpoint}. + * + * @param breakpoint + * the {@link DSLBreakpoint} + */ + protected void removeBreakpoint(DSLBreakpoint breakpoint) { + Set brkps = BREAKPOINTS.get(breakpoint.getURI()); + if (brkps != null) { + brkps.remove(breakpoint); + } + } + + /** + * Notifies Sirius about a change in the given {@link DSLBreakpoint}. + * + * @param instructionUris + * the {@link URI}s of the instructions to refresh. + * @param debugModelID + * the debug model identifier + */ + public void notifySirius(Set instructionUris, String debugModelID) { + Map> toRefresh = representationToRefresh.get(debugModelID); + if (toRefresh != null) { + for (IEditingSession session : SessionUIManager.INSTANCE.getUISessions()) { + final TransactionalEditingDomain transactionalEditingDomain = session.getSession() + .getTransactionalEditingDomain(); + final boolean instructionPresent = isOneInstructionPresent(instructionUris, + transactionalEditingDomain.getResourceSet()); + if (instructionPresent) { + final List representations = getRepresentationsToRefresh(toRefresh, + session); + refreshRepresentations(transactionalEditingDomain, representations); + } + } + } + } + + /** + * Refreshes given {@link DRepresentation} in the given {@link TransactionalEditingDomain}. + * + * @param transactionalEditingDomain + * the {@link TransactionalEditingDomain} + * @param representations + * the {@link List} of {@link DRepresentation} to refresh + */ + public void refreshRepresentations(final TransactionalEditingDomain transactionalEditingDomain, + final List representations) { + // TODO prevent the editors from getting dirty + if (representations.size() != 0) { + final RefreshRepresentationsCommand refresh = new RefreshRepresentationsCommand( + transactionalEditingDomain, new NullProgressMonitor(), representations); + + CommandStack commandStack = transactionalEditingDomain.getCommandStack(); + + // If the command stack is transactionnal, we add a one-shot exception handler. + if (commandStack instanceof AbstractTransactionalCommandStack) { + AbstractTransactionalCommandStack transactionnalCommandStack = (AbstractTransactionalCommandStack)commandStack; + transactionnalCommandStack.setExceptionHandler(new ExceptionHandler() { + + @Override + public void handleException(Exception e) { + // TODO Auto-generated method stub + + String repString = representations.stream().map(r -> r.getName()).collect( + Collectors.joining(", ")); + DebugSiriusIdeUiPlugin.getPlugin().getLog().log(new Status(IStatus.WARNING, + DebugSiriusIdeUiPlugin.ID, "Failed to refresh Sirius representation(s)[" + + repString + "], we hope to be able to do it later", e)); + + // Self-remove from the command stack. + transactionnalCommandStack.setExceptionHandler(null); + + } + }); + } + + commandStack.execute(refresh); + + } + } + + /** + * Gets the {@link List} of {@link DRepresentation} to refresh in the given {@link IEditingSession}. + * + * @param toRefresh + * the representation names and layers to refresh + * @param session + * the {@link IEditingSession} + * @return the {@link List} of {@link DRepresentation} to refresh in the given {@link IEditingSession} + */ + private List getRepresentationsToRefresh(Map> toRefresh, + IEditingSession session) { + final List representations = new ArrayList(); + for (DialectEditor editor : session.getEditors()) { + final DRepresentation representation = editor.getRepresentation(); + if (representation == null) { + System.out.println("Dammit"); + } else { + final RepresentationDescription description = DialectManager.INSTANCE.getDescription( + representation); + if (description != null) { + final String representationId = description.getName(); + final Set layerIDs = toRefresh.get(representationId); + if (layerIDs == ANY_LAYER) { + representations.add(representation); + } else if (layerIDs != null && representation instanceof DDiagram && isActiveLayer( + (DDiagram)representation, layerIDs)) { + representations.add(representation); + } + } + } + } + return representations; + } + + /** + * Tells if at least one of the given instruction {@link URI} is present in the given + * {@link ResourceSet}. + * + * @param instructionUris + * the {@link Set} of instructions {@link URI} + * @param resourceSet + * the {@link ResourceSet} + * @return true if at least one of the given instruction {@link URI} is present in the + * given {@link ResourceSet}, false otherwise + */ + private static boolean isOneInstructionPresent(Set instructionUris, + final ResourceSet resourceSet) { + boolean instructionPresent = false; + for (URI instructionUri : instructionUris) { + if (resourceSet.getEObject(instructionUri, false) != null) { + instructionPresent = true; + break; + } + } + return instructionPresent; + } + + /** + * Tells if any of the given {@link Layer#getName() layer identifier} is active for the given + * {@link DDiagram}. + * + * @param diagram + * the {@link DDiagram} + * @param layerIDs + * the {@link Set} of {@link Layer#getName() layer identifiers} + * @return true if any of the given {@link Layer#getName() layer identifier} is active + * for the given {@link DDiagram}, false otherwise + */ + private boolean isActiveLayer(DDiagram diagram, Set layerIDs) { + boolean res = false; + + for (Layer layer : diagram.getActivatedLayers()) { + if (layerIDs.contains(layer.getName())) { + res = true; + break; + } + } + + return res; + } + + /** + * Add the given {@link RepresentationDescription#getName() representation identifier} for + * {@link DRepresentation} refresh. + * + * @param debugModelID + * the debug model identifier + * @param representationID + * the {@link RepresentationDescription#getName() representation identifier} + */ + public void addRepresentationToRefresh(String debugModelID, String representationID) { + Map> toRefresh = representationToRefresh.get(debugModelID); + if (toRefresh == null) { + toRefresh = new HashMap>(); + representationToRefresh.put(debugModelID, toRefresh); + } + toRefresh.put(representationID, ANY_LAYER); + } + + /** + * Add the given {@link RepresentationDescription#getName() representation identifier} and + * {@link Layer#getName() layer identifier} for {@link DRepresentation} refresh. + * + * @param debugModelID + * the debug model identifier + * @param representationID + * the {@link RepresentationDescription#getName() representation identifier} + * @param layerID + * the {@link Layer#getName() layer identifier} + */ + public void addRepresentationToRefresh(String debugModelID, String representationID, String layerID) { + Map> toRefresh = representationToRefresh.get(debugModelID); + if (toRefresh == null) { + toRefresh = new HashMap>(); + representationToRefresh.put(debugModelID, toRefresh); + } + Set layerIDs = toRefresh.get(representationID); + if (layerIDs != ANY_LAYER) { + if (layerIDs == null) { + layerIDs = new HashSet(); + toRefresh.put(representationID, layerIDs); + } + layerIDs.add(layerID); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener#currentInstructionChanged(String, + * org.eclipse.gemoc.dsl.debug.StackFrame)) + */ + public void currentInstructionChanged(String debugModelID, StackFrame frame) { + EObject currentInstruction = frame.getCurrentInstruction(); + final Set instructionURIs = new HashSet(); + + if (currentInstruction instanceof ParallelStep) { + addMseOccurenceAndCallerToInstructionsURIs(instructionURIs, + ((ParallelStep)currentInstruction).getMseoccurrence()); + for (Step step : ((ParallelStep)currentInstruction).getSubSteps()) { + addMseOccurenceAndCallerToInstructionsURIs(instructionURIs, step.getMseoccurrence()); + } + } else if (currentInstruction instanceof Step) { + if (!(currentInstruction.eContainer() instanceof ParallelStep)) { + // do not show internal step of parallel step, because they are already shown as a + // parallel + addMseOccurenceAndCallerToInstructionsURIs(instructionURIs, ((Step)currentInstruction) + .getMseoccurrence()); + } + } else { + instructionURIs.add(EcoreUtil.getURI(currentInstruction)); + } + final Set lastInstructions = CURRENT_INSTRUCTIONS_PER_FRAME.remove(frame); + if (lastInstructions != null) { + notifySirius(lastInstructions, debugModelID); + } + CURRENT_INSTRUCTIONS_PER_FRAME.put(frame, instructionURIs); + notifySirius(instructionURIs, debugModelID); + } + + /** + * If possible, adds the MSE of an MSEOccurrence and its caller to instructions URIs. + * + * @param instructionURIs + * The collection of instructions URIS in which to add the MSE and caller. + * @param mseOccurrence + * The MSEOccurrence from which the MSE must be considered. + */ + private void addMseOccurenceAndCallerToInstructionsURIs(Set instructionURIs, + MSEOccurrence mseOccurrence) { + if (mseOccurrence != null) { + instructionURIs.add(EcoreUtil.getURI(mseOccurrence.getMse())); + if (mseOccurrence.getMse().getCaller() != null) { + instructionURIs.add(EcoreUtil.getURI(mseOccurrence.getMse().getCaller())); + } + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener#terminated(java.lang.String, + * org.eclipse.gemoc.dsl.debug.StackFrame) + */ + public void terminated(String debugModelID, StackFrame frame) { + final Set lastInstructions = CURRENT_INSTRUCTIONS_PER_FRAME.remove(frame); + if (lastInstructions != null) { + notifySirius(lastInstructions, debugModelID); + } + } + + /** + * Gets the current {@link StackFrame}. + * + * @return the current {@link StackFrame} + */ + public StackFrame getCurrentFrame() { + return currentFrame; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener#setCurrentFrame(java.lang.String, + * org.eclipse.gemoc.dsl.debug.StackFrame) + */ + public void setCurrentFrame(String debugModelID, StackFrame frame) { + if (currentFrame != frame) { + currentFrame = frame; + Set instructionUris = CURRENT_INSTRUCTIONS_PER_FRAME.get(getCurrentFrame()); + if (instructionUris != null) { + notifySirius(instructionUris, debugModelID); + } + } + } + + /** + * Tells if the given layer id and representation id should be refreshed while debugging the given + * debug model id. + * + * @param debugModelID + * the debug model id + * @param representationId + * the representation id + * @param layerID + * the layer id, it can be null + * @return true if the given layer id and representation id should be refreshed while + * debugging the given debug model id, false otherwise + */ + public boolean isRepresentationToRefresh(String debugModelID, String representationId, + String layerID) { + final boolean res; + + final Map> representations = representationToRefresh.get(debugModelID); + if (representations != null) { + final Set layerIDs = representations.get(representationId); + res = layerIDs == ANY_LAYER || (layerIDs != null && layerIDs.contains(layerID)); + } else { + res = false; + } + + return res; + } + + } + + /** + * The {@link IBreakpointListener} maintaining breakpoints. + */ + public static final BreakpointListener LISTENER = new BreakpointListener(); + + /** + * {@link Map} of {@link URI} pointing {@link DSLBreakpoint}. + */ + private static final Map> BREAKPOINTS = new HashMap>(); + + /** + * Current instruction for a given {@link StackFrame}. Note : in concurrent mode, a ParallelStep may be + * represented by several URI (so we use a set) + */ + private static final Map> CURRENT_INSTRUCTIONS_PER_FRAME = new HashMap>(); + + /** + * Constructor. + */ + public AbstractDSLDebuggerServices() { + for (StringCouple couple : getRepresentationRefreshList()) { + if (couple.getSecond() != null) { + LISTENER.addRepresentationToRefresh(getModelIdentifier(), couple.getFirst(), couple + .getSecond()); + } else { + LISTENER.addRepresentationToRefresh(getModelIdentifier(), couple.getFirst()); + } + } + } + + /** + * Gets the {@link List} of {@link StringCouple} representing the + * {@link RepresentationDescription#getName() representation identifier} and the {@link Layer#getName() + * layer identifier} or null where services from this class are used. + * + * @return the {@link List} of {@link StringCouple} representing the + * {@link RepresentationDescription#getName() representation identifier} and the + * {@link Layer#getName() layer identifier} or null where services from this class + * are used + */ + protected abstract List getRepresentationRefreshList(); + + /** + * Tells if the given {@link EObject instruction} has a breakpoint. + * + * @param instruction + * the {@link EObject instruction} + * @return true if the given {@link EObject instruction} has a breakpoint, false + * otherwise + */ + public boolean hasBreakpoint(EObject instruction) { + final Set brkps = getBreakpoints(instruction); + return brkps != null && brkps.size() != 0; + } + + /** + * Tells if the given {@link EObject instruction} has an enabled breakpoint. + * + * @param instruction + * the {@link EObject instruction} + * @return true if the given {@link EObject instruction} has an enabled breakpoint, + * false otherwise + */ + public boolean hasEnabledBreakpoint(EObject instruction) { + boolean res = false; + final Set brkps = getBreakpoints(instruction); + + if (brkps != null && brkps.size() != 0) { + for (DSLBreakpoint breakpoint : brkps) { + try { + if (breakpoint.isEnabled()) { + res = true; + break; + } + } catch (CoreException e) { + // ignore + } + } + } + + return res; + } + + /** + * Tells if the given {@link EObject instruction} has an disabled breakpoint. + * + * @param instruction + * the {@link EObject instruction} + * @return true if the given {@link EObject instruction} has an disabled breakpoint, + * false otherwise + */ + public boolean hasDisabledBreakpoint(EObject instruction) { + boolean res = false; + final Set brkps = getBreakpoints(instruction); + + if (brkps != null && brkps.size() != 0) { + res = true; + for (DSLBreakpoint breakpoint : brkps) { + try { + if (breakpoint.isEnabled()) { + res = false; + break; + } + } catch (CoreException e) { + // ignore + } + } + } + + return res; + } + + /** + * Gets the {@link Set} of {@link DSLBreakpoint} for the + * {@link AbstractDSLDebuggerServices#getModelIdentifier() model identifier}. + * + * @param instruction + * the instruction to check + * @return the {@link Set} of {@link DSLBreakpoint} for the + * {@link AbstractDSLDebuggerServices#getModelIdentifier() model identifier} + */ + protected Set getBreakpoints(EObject instruction) { + Set res = new HashSet(); + + Set brkps = BREAKPOINTS.get(EcoreUtil.getURI(instruction)); + if (brkps != null) { + for (DSLBreakpoint breakpoint : brkps) { + if (breakpoint.getModelIdentifier().equals(getModelIdentifier())) { + res.add(breakpoint); + } + } + } + + return res; + } + + /** + * Tells if the given {@link EObject instruction} is a currently debugged instruction. A debugged + * instruction in this context is an instruction a debug target is suspended on. This service works in a + * similar way as {@link AbstractGemocAnimatorServices hasBeenActivated} but will be activated only when + * the engine is paused. In addition, its content is related to the selected stack frame. + * + * @param instruction + * the {@link EObject instruction} + * @return true if the given {@link EObject instruction} is a currently debugged instruction, + * false otherwise + */ + public boolean isCurrentInstruction(EObject instruction) { + final Set instructions = CURRENT_INSTRUCTIONS_PER_FRAME.get(LISTENER.getCurrentFrame()); + return instructions != null && instructions.contains(EcoreUtil.getURI(instruction)); + } + + /** + * Gets the debug model identifier. + * + * @return the debug model identifier + */ + public abstract String getModelIdentifier(); + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.checkstyle b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.checkstyle similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.checkstyle rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.checkstyle diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.classpath b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.classpath similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.classpath rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.classpath diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.project b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.project new file mode 100644 index 000000000..10dd90520 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.dsl.debug.ide.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.core.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.sirius.ui/.settings/org.eclipse.jdt.core.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.settings/org.eclipse.jdt.core.prefs diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.settings/org.eclipse.jdt.ui.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.settings/org.eclipse.jdt.ui.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/.settings/org.eclipse.jdt.ui.prefs diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/META-INF/MANIFEST.MF new file mode 100644 index 000000000..3b898d7bf --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.dsl.debug.ide.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Require-Bundle: org.eclipse.debug.ui;bundle-version="3.7.0", + org.eclipse.ui;bundle-version="3.7.0", + org.eclipse.emf.edit.ui;bundle-version="2.7.0", + org.eclipse.gemoc.dsl.debug.edit;bundle-version="1.0.0", + org.eclipse.gemoc.dsl.debug.ide;bundle-version="1.0.0", + org.eclipse.core.runtime;bundle-version="3.7.0", + org.eclipse.ui.ide;bundle-version="3.7.0", + org.eclipse.emf.ecore.editor;bundle-version="2.7.0" +Export-Package: org.eclipse.gemoc.dsl.debug.ide.ui, + org.eclipse.gemoc.dsl.debug.ide.ui.handler, + org.eclipse.gemoc.dsl.debug.ide.ui.launch, + org.eclipse.gemoc.dsl.debug.ide.ui.provider +Bundle-ActivationPolicy: lazy +Bundle-Activator: org.eclipse.gemoc.dsl.debug.ide.ui.DebugIdeUiPlugin$Implementation diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/about.html b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/about.html similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/about.html rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/about.html diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/build.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/build.properties new file mode 100644 index 000000000..79172534b --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### +source.. = src/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/icons/full/deco16/breakpoint_disabled.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/icons/full/deco16/breakpoint_disabled.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/icons/full/deco16/breakpoint_disabled.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/icons/full/deco16/breakpoint_disabled.gif diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/icons/full/deco16/breakpoint_enabled.gif b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/icons/full/deco16/breakpoint_enabled.gif similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/icons/full/deco16/breakpoint_enabled.gif rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/icons/full/deco16/breakpoint_enabled.gif diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/plugin.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/plugin.properties new file mode 100644 index 000000000..ff45195a9 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/plugin.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### + +pluginName = Debug Model IDE Integration UI +providerName = Obeo diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/plugin.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/plugin.xml new file mode 100644 index 000000000..93b6ae7d4 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/plugin.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/pom.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/pom.xml new file mode 100644 index 000000000..12ae4e039 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/pom.xml @@ -0,0 +1,25 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.ide.ui + 2.3.0-SNAPSHOT + eclipse-plugin + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DSLDebugModelPresentation.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DSLDebugModelPresentation.java new file mode 100644 index 000000000..296b85315 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DSLDebugModelPresentation.java @@ -0,0 +1,274 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.ui; + +import org.eclipse.gemoc.dsl.debug.Variable; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLStackFrameAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLObjectValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.variable.DSLObjectVariable; +import org.eclipse.gemoc.dsl.debug.provider.CustomDebugItemProviderAdapterFactory; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.debug.core.model.IStackFrame; +import org.eclipse.debug.core.model.IThread; +import org.eclipse.debug.core.model.IValue; +import org.eclipse.debug.ui.IDebugEditorPresentation; +import org.eclipse.debug.ui.IDebugModelPresentation; +import org.eclipse.debug.ui.IValueDetailListener; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedImage; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ILabelProviderListener; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; + +/** + * The {@link IDebugModelPresentation} for the DSL debug model. + * + * @author Yvan Lussaud + */ +public class DSLDebugModelPresentation implements IDebugModelPresentation, IDebugEditorPresentation { + + /** + * The {@link Image} cache. + */ + protected final Map imagesCache = new HashMap(); + + /** + * The EMF {@link ILabelProvider}. + */ + private final ILabelProvider eLabelProvider; + + /** + * Constructor. + */ + public DSLDebugModelPresentation() { + super(); + final ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory( + ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory(); + adapterFactory.addAdapterFactory(debugFactory); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + eLabelProvider = new AdapterFactoryLabelProvider(adapterFactory); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener) + */ + public void addListener(ILabelProviderListener listener) { + eLabelProvider.addListener(listener); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() + */ + public void dispose() { + for (Image cachedImage : imagesCache.values()) { + cachedImage.dispose(); + } + eLabelProvider.dispose(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String) + */ + public boolean isLabelProperty(Object element, String property) { + final boolean res; + + final Object unwrapped = unwrapp(element); + if (unwrapped instanceof Variable) { + res = isLabelProperty(((Variable)unwrapped).getValue(), property); + } else { + res = eLabelProvider.isLabelProperty(unwrapp(element), property); + } + + return res; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener) + */ + public void removeListener(ILabelProviderListener listener) { + eLabelProvider.removeListener(listener); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ISourcePresentation#getEditorInput(java.lang.Object) + */ + public IEditorInput getEditorInput(Object element) { + return EMFEditorUtils.getEditorInput(element); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ISourcePresentation#getEditorId(org.eclipse.ui.IEditorInput, + * java.lang.Object) + */ + public String getEditorId(IEditorInput input, Object element) { + final String res; + + res = EMFEditorUtils.getEditorID(input, element); + + return res; + } + + /** + * {@inheritDoc} Unused method. + * + * @see org.eclipse.debug.ui.IDebugModelPresentation#setAttribute(java.lang.String, java.lang.Object) + */ + public void setAttribute(String attribute, Object value) { + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.IDebugModelPresentation#getImage(java.lang.Object) + */ + public Image getImage(final Object element) { + final Image res; + + final Object unwrapped = unwrapp(element); + if (unwrapped instanceof Variable) { + res = getImage(((Variable)unwrapped).getValue()); + } else if (element instanceof DSLBreakpoint) { + final Object image = ((DSLBreakpoint)element).getImage(); + if (image instanceof ComposedImage) { + ((ComposedImage)image).getImages().add(DebugIdeUiPlugin.INSTANCE.getImage( + "full/deco16/breakpoint_enabled")); + } + final ImageDescriptor descriptor = ExtendedImageRegistry.getInstance().getImageDescriptor(image); + Image cachedImage = imagesCache.get(descriptor); + if (cachedImage == null) { + cachedImage = new Image(Display.getDefault(), descriptor.getImageData()); + imagesCache.put(descriptor, cachedImage); + } + res = cachedImage; + } else { + if (unwrapped != null) { + synchronized(unwrapped) { + res = eLabelProvider.getImage(unwrapped); + } + } else { + res = null; + } + } + + return res; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.IDebugModelPresentation#getText(java.lang.Object) + */ + public String getText(Object element) { + final String res; + + final Object unwrapped = unwrapp(element); + if (unwrapped instanceof Variable) { + res = getText(((Variable)unwrapped).getValue()); + } else if (element instanceof DSLBreakpoint) { + res = ((DSLBreakpoint)element).getText(); + } else { + synchronized(unwrapped) { + res = eLabelProvider.getText(unwrapped); + } + } + + return res; + } + + /** + * {@inheritDoc} Unused method. + * + * @see org.eclipse.debug.ui.IDebugModelPresentation#computeDetail(org.eclipse.debug.core.model.IValue, + * org.eclipse.debug.ui.IValueDetailListener) + */ + public void computeDetail(IValue value, IValueDetailListener listener) { + } + + /** + * Unwrap the {@link Adapter#getTarget() target} if the given element is an {@link Adapter}. + * + * @param element + * the {@link Object element} + * @return the {@link Adapter#getTarget() target} if the given element is an {@link Adapter}, the given + * element itself otherwise + */ + private Object unwrapp(Object element) { + final Object res; + + if (element instanceof DSLObjectVariable) { + res = ((DSLObjectVariable)element).getObject(); + } else if (element instanceof DSLObjectValue) { + res = ((DSLObjectValue)element).getValue(); + } else if (element instanceof Adapter) { + res = ((Adapter)element).getTarget(); + } else { + res = element; + } + return res; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.IDebugEditorPresentation#addAnnotations(org.eclipse.ui.IEditorPart, + * org.eclipse.debug.core.model.IStackFrame) + */ + public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) { + if (frame instanceof DSLStackFrameAdapter) { + final EObject instruction = ((DSLStackFrameAdapter)frame).getCurrentInstruction(); + final URI instructionUri = EcoreUtil.getURI(instruction); + EMFEditorUtils.selectInstruction(editorPart, instructionUri); + } + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.IDebugEditorPresentation#removeAnnotations(org.eclipse.ui.IEditorPart, + * org.eclipse.debug.core.model.IThread) + */ + public void removeAnnotations(IEditorPart editorPart, IThread thread) { + // nothing to do here + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DSLToggleBreakpointsUtils.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DSLToggleBreakpointsUtils.java new file mode 100644 index 000000000..4a627f620 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DSLToggleBreakpointsUtils.java @@ -0,0 +1,187 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.ui; + +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; + +import java.util.Iterator; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.Platform; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.model.IBreakpoint; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; + +/** + * Utility class for breakpoint {@link DSLBreakpoint} toggling. + * + * @author Yvan Lussaud + */ +public class DSLToggleBreakpointsUtils { + + /** + * The debug model identifier. + */ + protected final String identifier; + + /** + * Constructor. + * + * @param identifier + * the debug model identifier + */ + public DSLToggleBreakpointsUtils(String identifier) { + this.identifier = identifier; + } + + /** + * Toggles a {@link DSLBreakpoint} for the given selection. + * + * @param selection + * the {@link ISelection} + * @throws CoreException + * if {@link DSLBreakpoint} can't be retrieved or installed + */ + public void toggleBreakpoints(ISelection selection) throws CoreException { + if (selection instanceof IStructuredSelection) { + @SuppressWarnings("unchecked") + final Iterator it = ((IStructuredSelection)selection).iterator(); + while (it.hasNext()) { + final Object selected = it.next(); + EObject instruction = getInstruction(selected); + if (instruction != null) { + toggleBreakpoint(selected, instruction); + } + } + } + } + + /** + * Toggles the {@link DSLBreakpoint} for the given {@link EObject instruction}. + * + * @param selected + * the selected {@link Object} + * @param instruction + * the {@link EObject instruction} + * @throws CoreException + * if {@link DSLBreakpoint} can't be retrieved or installed + */ + protected void toggleBreakpoint(Object selected, EObject instruction) throws CoreException { + DSLBreakpoint breakpoint = getBreakpoint(instruction); + if (breakpoint != null) { + breakpoint.delete(); + } else { + breakpoint = createBreakpoint(selected, instruction); + DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(breakpoint); + } + } + + /** + * Creates a {@link DSLBreakpoint} for the given instruction. + * + * @param selected + * the selected {@link Object} + * @param instruction + * the {@link EObject instruction} + * @return the created {@link DSLBreakpoint} for the given instruction + * @throws CoreException + * if the {@link DSLBreakpoint} instantiation fails + */ + protected DSLBreakpoint createBreakpoint(Object selected, EObject instruction) throws CoreException { + return new DSLBreakpoint(identifier, instruction, true); + } + + /** + * Gets the {@link DSLBreakpoint} for the given {@link EObject instruction}. + * + * @param instruction + * the {@link EObject instruction} + * @return the {@link DSLBreakpoint} for the given {@link EObject instruction} if nay, null + * otherwise + */ + protected DSLBreakpoint getBreakpoint(EObject instruction) { + DSLBreakpoint res = null; + + IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager() + .getBreakpoints(identifier); + final URI instructionURI = EcoreUtil.getURI(instruction); + for (IBreakpoint breakpoint : breakpoints) { + if (breakpoint instanceof DSLBreakpoint && ((DSLBreakpoint)breakpoint).getURI() != null + && ((DSLBreakpoint)breakpoint).getURI().equals(instructionURI)) { + res = (DSLBreakpoint)breakpoint; + break; + } + } + + return res; + } + + /** + * Tells if we can toggle a {@link DSLBreakpoint} for the given {@link ISelection}. + * + * @param selection + * the {@link ISelection} + * @return true if we can toggle a {@link DSLBreakpoint} for the given {@link ISelection}, + * false otherwise + */ + public boolean canToggleBreakpoints(ISelection selection) { + boolean res = false; + + if (selection instanceof IStructuredSelection) { + @SuppressWarnings("unchecked") + final Iterator it = ((IStructuredSelection)selection).iterator(); + while (it.hasNext()) { + final Object selected = it.next(); + if (selected != null) { + res = getInstruction(selected) != null; + break; + } + } + } + + return res; + } + + /** + * Gets an {@link EObject instruction} from the given {@link Object}. + * + * @param selected + * the {@link Object} + * @return the corresponding {@link EObject instruction} or null if no {@link EObject + * instruction} match + */ + protected EObject getInstruction(Object selected) { + final EObject res; + + if (selected instanceof EObject) { + res = (EObject)selected; + } else if (selected instanceof IAdaptable) { + final EObject adapter = (EObject)((IAdaptable)selected).getAdapter(EObject.class); + if (adapter != null) { + res = adapter; + } else { + res = (EObject)Platform.getAdapterManager().getAdapter(selected, EObject.class); + } + } else if (selected != null) { + res = (EObject)Platform.getAdapterManager().getAdapter(selected, EObject.class); + } else { + res = null; + } + + return res; + } + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DebugIdeUiPlugin.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DebugIdeUiPlugin.java similarity index 92% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DebugIdeUiPlugin.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DebugIdeUiPlugin.java index 6be28a2ca..481ef89d1 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/DebugIdeUiPlugin.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/DebugIdeUiPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui; +package org.eclipse.gemoc.dsl.debug.ide.ui; import org.eclipse.emf.common.EMFPlugin; import org.eclipse.emf.common.util.ResourceLocator; @@ -23,7 +23,7 @@ public final class DebugIdeUiPlugin extends EMFPlugin { /** * The plug-in identifier. */ - public static final String ID = "fr.obeo.dsl.debug.ide.ui"; + public static final String ID = "org.eclipse.gemoc.dsl.debug.ide.ui"; /** * Keep track of the singleton. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/EMFEditorUtils.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/EMFEditorUtils.java similarity index 97% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/EMFEditorUtils.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/EMFEditorUtils.java index a167407c1..498d51dce 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/EMFEditorUtils.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/EMFEditorUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui; +package org.eclipse.gemoc.dsl.debug.ide.ui; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; import java.util.ArrayList; import java.util.List; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/handler/AbstractToggleBreakpointHandler.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/handler/AbstractToggleBreakpointHandler.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/handler/AbstractToggleBreakpointHandler.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/handler/AbstractToggleBreakpointHandler.java index 55ea7595c..c7f1a482f 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/handler/AbstractToggleBreakpointHandler.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/handler/AbstractToggleBreakpointHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui.handler; +package org.eclipse.gemoc.dsl.debug.ide.ui.handler; -import fr.obeo.dsl.debug.ide.ui.DSLToggleBreakpointsUtils; +import org.eclipse.gemoc.dsl.debug.ide.ui.DSLToggleBreakpointsUtils; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; @@ -20,7 +20,7 @@ import org.eclipse.ui.handlers.HandlerUtil; /** - * Toggles a {@link fr.obeo.dsl.debug.ide.DSLBreakpoint DSLBreakpoint}. + * Toggles a {@link org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint DSLBreakpoint}. * * @author Yvan Lussaud */ diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java new file mode 100644 index 000000000..dd81e62b3 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/AbstractDSLLaunchConfigurationDelegateUI.java @@ -0,0 +1,308 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.ui.launch; + +import org.eclipse.gemoc.dsl.debug.ide.Activator; +import org.eclipse.gemoc.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Path; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.debug.ui.ILaunchGroup; +import org.eclipse.debug.ui.ILaunchShortcut; +import org.eclipse.debug.ui.ILaunchShortcut2; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.ide.ResourceUtil; + +/** + * An UI implementation of {@link AbstractDSLLaunchConfigurationDelegate} with {@link ILaunchShortcut} + * support. + * + * @author Yvan Lussaud + */ +public abstract class AbstractDSLLaunchConfigurationDelegateUI extends AbstractDSLLaunchConfigurationDelegate implements ILaunchShortcut, ILaunchShortcut2 { + + @Override + protected void launch(EObject firstInstruction, ILaunchConfiguration configuration, String mode, + ILaunch launch, IProgressMonitor monitor) throws CoreException { + Display.getDefault().syncExec(new Runnable() { + public void run() { + ExtendedImageRegistry.getInstance(); // initialize the image registry + } + }); + super.launch(firstInstruction, configuration, mode, launch, monitor); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchConfigurations(org.eclipse.jface.viewers.ISelection) + */ + public ILaunchConfiguration[] getLaunchConfigurations(ISelection selection) { + return getLaunchConfigurations(getLaunchableResource(selection)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchConfigurations(org.eclipse.ui.IEditorPart) + */ + public ILaunchConfiguration[] getLaunchConfigurations(IEditorPart editorpart) { + return getLaunchConfigurations(getLaunchableResource(editorpart)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchableResource(org.eclipse.jface.viewers.ISelection) + */ + public IResource getLaunchableResource(ISelection selection) { + IResource res = null; + if (selection instanceof IStructuredSelection) { + for (final Object element : ((IStructuredSelection)selection).toArray()) { + if (element instanceof IFile) { + res = (IResource)element; + break; + } else if (element instanceof EObject) { + final URI resourceURI = ((EObject)element).eResource().getURI(); + if (resourceURI.isPlatformResource()) { + final String pathString = resourceURI.toPlatformString(true); + res = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(pathString)); + break; + } + } + } + } + + return res; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchableResource(org.eclipse.ui.IEditorPart) + */ + public IResource getLaunchableResource(IEditorPart editorpart) { + return ResourceUtil.getFile(editorpart.getEditorInput()); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers.ISelection, + * java.lang.String) + */ + public void launch(ISelection selection, String mode) { + launch(getLaunchableResource(selection), getFirstInstruction(selection), mode); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String) + */ + public void launch(IEditorPart editor, String mode) { + launch(getLaunchableResource(editor), getFirstInstruction(editor), mode); + } + + /** + * Get all {@link ILaunchConfiguration} that target the given {@link IResource}. + * + * @param resource + * root file to execute + * @return {@link ILaunchConfiguration}s using resource + */ + protected ILaunchConfiguration[] getLaunchConfigurations(IResource resource) { + final List configurations = new ArrayList(); + + final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); + final ILaunchConfigurationType type = manager + .getLaunchConfigurationType(getLaunchConfigurationTypeID()); + + // try to find existing configurations using the same file + try { + for (ILaunchConfiguration configuration : manager.getLaunchConfigurations(type)) { + if (configuration.hasAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI)) { + final String pathString = configuration.getAttribute( + AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, ""); + try { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(pathString)); + if (resource != null && resource.equals(file)) { + configurations.add(configuration); + } + } catch (IllegalArgumentException e) { + Activator.getDefault().error(e); + } + } + } + } catch (CoreException e) { + // could not load configurations, ignore + e.toString(); + } + + return configurations.toArray(new ILaunchConfiguration[configurations.size()]); + } + + /** + * Launch a resource. Try to launch using a launch configuration. Used for contextual launches + * + * @param file + * source file + * @param firstInstruction + * the first {@link EObject instruction} + * @param mode + * launch mode + */ + public void launch(final IResource file, EObject firstInstruction, final String mode) { + + if (file instanceof IFile) { + prepareLaunch(file, firstInstruction, mode); + + try { + ILaunchConfiguration[] configurations = getLaunchConfigurations(file); + if (configurations.length == 0) { + // try to create a launch configuration + configurations = createLaunchConfiguration(file, firstInstruction, mode); + } + + // launch + if (configurations.length == 1) { + configurations[0].launch(mode, new NullProgressMonitor()); + } else { + // more than one configuration applies + // open launch dialog for selection + final ILaunchGroup group = DebugUITools.getLaunchGroup(configurations[0], mode); + DebugUITools.openLaunchConfigurationDialogOnGroup(PlatformUI.getWorkbench() + .getActiveWorkbenchWindow().getShell(), + new StructuredSelection(configurations[0]), group.getIdentifier(), null); + } + + } catch (CoreException e) { + // could not create launch configuration, run file directly + // try { + // launch(firstInstruction, null, mode, null, new NullProgressMonitor()); + // } catch (CoreException e1) { + Activator.getDefault().error(e); + // } + } + } + } + + /** + * Prepares the launch of the given {@link IResource}. + * + * @param file + * source file + * @param firstInstruction + * the first {@link EObject instruction} + * @param mode + * launch mode + */ + protected void prepareLaunch(final IResource file, EObject firstInstruction, final String mode) { + // try to save dirty editors + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true); + } + + /** + * Creates a {@link ILaunchConfiguration}. If the firstInstruction is null the + * launch configuration dialog is opened. + * + * @param file + * the selected model {@link IFile} + * @param firstInstruction + * the first {@link EObject instruction} or null for interactive selection + * @param mode + * the {@link ILaunchConfiguration#getModes() mode} + * @return an array of possible {@link ILaunchConfiguration}, can be empty but not null + * @throws CoreException + * if {@link ILaunchConfiguration} initialization fails of models can't be loaded + */ + protected ILaunchConfiguration[] createLaunchConfiguration(final IResource file, + EObject firstInstruction, final String mode) throws CoreException { + final ILaunchConfiguration[] res; + + ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); + ILaunchConfigurationType type = manager.getLaunchConfigurationType(getLaunchConfigurationTypeID()); + + ILaunchConfigurationWorkingCopy configuration = type.newInstance(null, file.getName()); + configuration.setMappedResources(new IResource[] {file, }); + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, file.getFullPath() + .toString()); + if (firstInstruction == null) { + // open configuration for further editing + final ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, mode); + if (group != null) { + configuration.doSave(); + DebugUITools.openLaunchConfigurationDialog(PlatformUI.getWorkbench() + .getActiveWorkbenchWindow().getShell(), configuration, group.getIdentifier(), null); + } + res = new ILaunchConfiguration[] {}; + } else { + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, + EcoreUtil.getURI(firstInstruction).toString()); + // save and return new configuration + configuration.doSave(); + res = new ILaunchConfiguration[] {configuration, }; + } + return res; + } + + /** + * Gets the {@link ILaunchConfiguration} {@link ILaunchConfiguration#getType() type}. + * + * @return the {@link ILaunchConfiguration} {@link ILaunchConfiguration#getType() type} + */ + protected abstract String getLaunchConfigurationTypeID(); + + /** + * Gets the first {@link EObject instruction} from the given {@link ISelection}. + * + * @param selection + * the {@link ISelection} + * @return the first {@link EObject instruction} from the given {@link ISelection} or null + * for interactive selection + */ + protected abstract EObject getFirstInstruction(ISelection selection); + + /** + * Gets the first {@link EObject instruction} from the given {@link IEditorPart}. + * + * @param editor + * the {@link IEditorPart} + * @return the first {@link EObject instruction} from the given {@link IEditorPart} or null + * for interactive selection + */ + protected abstract EObject getFirstInstruction(IEditorPart editor); + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/DSLLaunchConfigurationTab.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/DSLLaunchConfigurationTab.java new file mode 100644 index 000000000..52bb57353 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/DSLLaunchConfigurationTab.java @@ -0,0 +1,331 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.ui.launch; + +import org.eclipse.gemoc.dsl.debug.ide.Activator; +import org.eclipse.gemoc.dsl.debug.ide.launch.AbstractDSLLaunchConfigurationDelegate; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Path; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.common.util.WrappedException; +import org.eclipse.emf.ecore.EObject; +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.util.EcoreUtil; +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.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; +import org.eclipse.ui.model.WorkbenchLabelProvider; + +/** + * DSL {@link org.eclipse.debug.ui.ILaunchConfigurationTab ILaunchConfigurationTab}. + * + * @author Yvan Lussaud + */ +public class DSLLaunchConfigurationTab extends AbstractLaunchConfigurationTab { + + /** + * Disable the update. + */ + protected boolean disableUpdate; + + /** + * The {@link Text} used for the {@link AbstractDSLLaunchConfigurationDelegate#RESOURCE_URI}. + */ + private Text resourceURIText; + + /** + * The {@link Text} used for the {@link AbstractDSLLaunchConfigurationDelegate#FIRST_INSTRUCTION_URI}. + */ + private Text firstInstructionURIText; + + /** + * Supported {@link org.eclipse.core.resources.IResource IResource} extensions. + */ + private final String[] extensions; + + /** + * Constructor. + * + * @param extensions + * supported file extensions + */ + public DSLLaunchConfigurationTab(final String[] extensions) { + this.extensions = extensions; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) + */ + public void setDefaults(final ILaunchConfigurationWorkingCopy configuration) { + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, ""); + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, ""); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) + */ + public void initializeFrom(final ILaunchConfiguration configuration) { + disableUpdate = true; + + resourceURIText.setText(""); + firstInstructionURIText.setText(""); + + try { + resourceURIText.setText(configuration.getAttribute( + AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, "")); + firstInstructionURIText.setText(configuration.getAttribute( + AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, "")); + } catch (CoreException e) { + Activator.getDefault().error(e); + } + + disableUpdate = false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) + */ + public void performApply(final ILaunchConfigurationWorkingCopy configuration) { + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, resourceURIText + .getText()); + configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, + firstInstructionURIText.getText()); + } + + @Override + public boolean isValid(final ILaunchConfiguration launchConfig) { + boolean res = false; + String errorMessage = null; + + try { + String resourceURI = launchConfig.getAttribute( + AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, ""); + IFile resourceFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(resourceURI)); + if (resourceFile.exists()) { + final ResourceSet rs = new ResourceSetImpl(); + Resource resource = null; + try { + resource = rs.getResource(URI.createPlatformResourceURI(resourceURI, true), true); + } catch (WrappedException e) { + errorMessage = "Model can't be loaded: " + + ((WrappedException)e).exception().getLocalizedMessage() + "."; + } + EObject firstInstruction = null; + try { + firstInstruction = rs.getEObject(URI.createURI(launchConfig.getAttribute( + AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI, ""), true), true); + } catch (WrappedException e) { + errorMessage = "First instruction can't be loaded: " + + ((WrappedException)e).exception().getLocalizedMessage() + "."; + } + if (firstInstruction == null) { + errorMessage = "First instruction not selected."; + } + res = resource != null && firstInstruction != null; + } else { + errorMessage = "Model file does not exist."; + } + setErrorMessage(errorMessage); + } catch (IllegalArgumentException e) { + setErrorMessage("Invalid model file selected."); + } catch (CoreException e) { + setErrorMessage("Invalid model file selected."); + } + + return res; + } + + @Override + public boolean canSave() { + // allow save when a file location is entered - no matter if the file + // exists or not + return (!firstInstructionURIText.getText().isEmpty()) && (!resourceURIText.getText().isEmpty()); + } + + @Override + public String getMessage() { + return "Please select a model file and first instruction."; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() + */ + public String getName() { + return "DSL launch"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) + * @wbp.parser.entryPoint + */ + public void createControl(final Composite parent) { + Composite topControl = new Composite(parent, SWT.NONE); + topControl.setLayout(new GridLayout(1, false)); + + final Group mgroup = new Group(topControl, SWT.NONE); + mgroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + mgroup.setText("Model"); + mgroup.setLayout(new GridLayout(2, false)); + + resourceURIText = new Text(mgroup, SWT.BORDER); + resourceURIText.addModifyListener(new ModifyListener() { + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) + */ + public void modifyText(final ModifyEvent e) { + if (!disableUpdate) { + updateLaunchConfigurationDialog(); + } + } + }); + resourceURIText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + + final Button browseResourceButton = new Button(mgroup, SWT.NONE); + browseResourceButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(final SelectionEvent e) { + openModelSelection(parent); + } + + }); + browseResourceButton.setText("Browse..."); + + Group grpLaunch = new Group(topControl, SWT.NONE); + grpLaunch.setLayout(new GridLayout(2, false)); + grpLaunch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + grpLaunch.setText("First instruction"); + + firstInstructionURIText = new Text(grpLaunch, SWT.BORDER); + firstInstructionURIText.addModifyListener(new ModifyListener() { + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) + */ + public void modifyText(final ModifyEvent e) { + if (!disableUpdate) { + updateLaunchConfigurationDialog(); + } + } + }); + firstInstructionURIText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + + Button browseModelFileButton = new Button(grpLaunch, SWT.NONE); + browseModelFileButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(final SelectionEvent e) { + IFile resourceFile = ResourcesPlugin.getWorkspace().getRoot().getFile( + new Path(resourceURIText.getText())); + if (resourceFile.exists()) { + final ResourceSet rs = new ResourceSetImpl(); + rs.getResource(URI.createPlatformResourceURI(resourceURIText.getText(), true), true); + EObject firstInstruction = openFirstInstructionSelection(parent.getShell(), rs); + if (firstInstruction != null) { + firstInstructionURIText.setText(EcoreUtil.getURI(firstInstruction).toString()); + } + } else { + MessageDialog.openInformation(parent.getShell(), "Model not selected", + "You must select a model first."); + } + } + }); + browseModelFileButton.setText("Browse..."); + + setControl(topControl); + } + + /** + * Opens the model selection dialog. + * + * @param parent + * the parent {@link Composite} + */ + private void openModelSelection(final Composite parent) { + ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(parent.getShell(), + new WorkbenchLabelProvider(), new FilteredFileContentProvider(extensions)); + dialog.setTitle("Select model file"); + dialog.setMessage("Select the model file to execute:"); + dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); + if (dialog.open() == Window.OK) { + resourceURIText.setText(((IFile)dialog.getFirstResult()).getFullPath().toString()); + } + } + + /** + * Opens the {@link EObject first instruction} selection dialog. + * + * @param shell + * the {@link Shell} to use for display + * @param resourceSet + * the {@link ResourceSet} to get the first instruction from + * @return the selected first instruction {@link URI} if any selected, null otherwise + */ + public static EObject openFirstInstructionSelection(final Shell shell, ResourceSet resourceSet) { + final EObject res; + final ComposedAdapterFactory fatory = new ComposedAdapterFactory( + ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + fatory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + fatory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell, + new AdapterFactoryLabelProvider(fatory), new AdapterFactoryContentProvider(fatory)); + dialog.setTitle("Select first instruction"); + dialog.setMessage("Select the first instruction:"); + dialog.setInput(resourceSet); + if (dialog.open() == Window.OK) { + res = (EObject)dialog.getFirstResult(); + } else { + res = null; + } + fatory.dispose(); + return res; + } + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/FilteredFileContentProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/FilteredFileContentProvider.java similarity index 96% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/FilteredFileContentProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/FilteredFileContentProvider.java index aa1bd6575..032baae0b 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/launch/FilteredFileContentProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/launch/FilteredFileContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui.launch; +package org.eclipse.gemoc.dsl.debug.ide.ui.launch; import java.util.ArrayList; import java.util.Arrays; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/DSLLabelDecorator.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/DSLLabelDecorator.java similarity index 97% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/DSLLabelDecorator.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/DSLLabelDecorator.java index ea3d3f7cb..5e2858db4 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/DSLLabelDecorator.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/DSLLabelDecorator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui.provider; +package org.eclipse.gemoc.dsl.debug.ide.ui.provider; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.ui.DebugIdeUiPlugin; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.ui.DebugIdeUiPlugin; import java.util.HashMap; import java.util.HashSet; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/DecoratingColumLabelProvider.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/DecoratingColumLabelProvider.java similarity index 98% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/DecoratingColumLabelProvider.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/DecoratingColumLabelProvider.java index 3df6ef864..15377d59e 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/DecoratingColumLabelProvider.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/DecoratingColumLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui.provider; +package org.eclipse.gemoc.dsl.debug.ide.ui.provider; import org.eclipse.jface.viewers.CellLabelProvider; import org.eclipse.jface.viewers.ColumnLabelProvider; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/OverlayImageDescriptor.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/OverlayImageDescriptor.java similarity index 96% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/OverlayImageDescriptor.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/OverlayImageDescriptor.java index 9071d1ffe..b75c51edc 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/src/fr/obeo/dsl/debug/ide/ui/provider/OverlayImageDescriptor.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide.ui/src/org/eclipse/gemoc/dsl/debug/ide/ui/provider/OverlayImageDescriptor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.ui.provider; +package org.eclipse.gemoc.dsl.debug.ide.ui.provider; import org.eclipse.jface.resource.CompositeImageDescriptor; import org.eclipse.swt.graphics.Image; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.checkstyle b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.checkstyle similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.checkstyle rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.checkstyle diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.classpath b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.classpath similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.classpath rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.classpath diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.project b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.project new file mode 100644 index 000000000..c8f90293f --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.dsl.debug.ide + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.settings/org.eclipse.jdt.core.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide.ui/.settings/org.eclipse.jdt.core.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.settings/org.eclipse.jdt.core.prefs diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.settings/org.eclipse.jdt.ui.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.settings/org.eclipse.jdt.ui.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/.settings/org.eclipse.jdt.ui.prefs diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/META-INF/MANIFEST.MF new file mode 100644 index 000000000..0ae3a3f7b --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.dsl.debug.ide;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.debug.core;bundle-version="3.7.0", + org.eclipse.gemoc.dsl.debug;bundle-version="1.0.0", + org.eclipse.core.runtime;bundle-version="3.7.0", + org.eclipse.emf.edit;bundle-version="2.7.0", + org.eclipse.gemoc.dsl.debug.edit;bundle-version="1.0.0", + org.eclipse.emf.transaction;bundle-version="1.4.0" +Export-Package: org.eclipse.gemoc.dsl.debug.ide, + org.eclipse.gemoc.dsl.debug.ide.adapter, + org.eclipse.gemoc.dsl.debug.ide.adapter.value, + org.eclipse.gemoc.dsl.debug.ide.adapter.variable, + org.eclipse.gemoc.dsl.debug.ide.event, + org.eclipse.gemoc.dsl.debug.ide.event.debugger, + org.eclipse.gemoc.dsl.debug.ide.event.model, + org.eclipse.gemoc.dsl.debug.ide.launch +Bundle-Activator: org.eclipse.gemoc.dsl.debug.ide.Activator diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/about.html b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/about.html similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/about.html rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/about.html diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/build.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/build.properties new file mode 100644 index 000000000..3e33e37be --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### +source.. = src/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/plugin.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/plugin.properties new file mode 100644 index 000000000..a5fad4014 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/plugin.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### + +pluginName = Debug Model IDE Integration +providerName = Obeo diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/plugin.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/plugin.xml new file mode 100644 index 000000000..07f5d336c --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/plugin.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/pom.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/pom.xml new file mode 100644 index 000000000..154fd173e --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/pom.xml @@ -0,0 +1,25 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.ide + 2.3.0-SNAPSHOT + eclipse-plugin + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/schema/fr.obeo.dsl.debug.locator.exsd b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/schema/fr.obeo.dsl.debug.locator.exsd new file mode 100644 index 000000000..3bb7e153d --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/schema/fr.obeo.dsl.debug.locator.exsd @@ -0,0 +1,116 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/AbstractDSLDebugger.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/AbstractDSLDebugger.java new file mode 100644 index 000000000..c17bf204f --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/AbstractDSLDebugger.java @@ -0,0 +1,615 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide; + +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.BreakpointReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.DeleteVariableReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.PopStackFrameReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.PushStackFrameReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.ResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SetCurrentInstructionReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SetVariableValueReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SpawnRunningThreadReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepIntoResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepOverResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepReturnResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SteppedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SuspendedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.TerminatedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.VariableReply; +import org.eclipse.gemoc.dsl.debug.ide.event.model.AbstractBreakpointRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.AbstractStepRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.AddBreakpointRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ChangeBreakPointRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.DisconnectRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.RemoveBreakpointRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ResumeRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.SetVariableValueRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StartRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepIntoRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepOverRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepReturnRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.SuspendRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.TerminateRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ValidateVariableValueRequest; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import org.eclipse.debug.core.model.IBreakpoint; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * Base {@link IDSLDebugger debugger} implementation. + * + * @author Yvan Lussaud + */ +public abstract class AbstractDSLDebugger implements IDSLDebugger { + + /** + * The {@link org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous + * communication or the {@link org.eclipse.gemoc.dsl.debug.ide.DSLDebugTargetAdapter target} for synchronous + * communication. + */ + protected final IDSLDebugEventProcessor target; + + /** + * Thread name to current instruction. For check purpose only. + */ + protected final Map currentInstructions = new HashMap(); + + /** + * Tells if the debugger is terminated. + */ + private boolean terminated; + + /** + * Mapping form thread name to the thread controller. + */ + private final Map controllers = new ConcurrentHashMap(); + + /** + * Instructions marked as breakpoints with their attributes. + */ + private final Map> breakpoints = new HashMap>(); + + /** + * Constructor. + * + * @param target + * the {@link org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous + * communication or the {@link org.eclipse.gemoc.dsl.debug.ide.DSLDebugTargetAdapter target} for + * synchronous communication + */ + public AbstractDSLDebugger(IDSLDebugEventProcessor target) { + this.target = target; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent) + */ + public Object handleEvent(IDSLDebugEvent event) { + Object res = null; + + if (event instanceof DisconnectRequest) { + disconnect(); + } else if (event instanceof AbstractStepRequest) { + handleStepRequest((AbstractStepRequest)event); + } else if (event instanceof ResumeRequest) { + handleResumeRequest((ResumeRequest)event); + } else if (event instanceof SuspendRequest) { + handleSuspendRequest((SuspendRequest)event); + } else if (event instanceof TerminateRequest) { + handleTerminateRequest((TerminateRequest)event); + } else if (event instanceof AbstractBreakpointRequest) { + handleBreakpointRequest((AbstractBreakpointRequest)event); + } else if (event instanceof ValidateVariableValueRequest) { + res = handleValidateVariableValueRequest((ValidateVariableValueRequest)event); + } else if (event instanceof SetVariableValueRequest) { + handleSetVariableValueRequest((SetVariableValueRequest)event); + } else if (event instanceof StartRequest) { + start(); + } + + return res; + } + + /** + * Handles {@link SetVariableValueRequest}. + * + * @param event + * the {@link SetVariableValueRequest} + */ + private void handleSetVariableValueRequest(SetVariableValueRequest event) { + final Object value = getVariableValue(event.getThreadName(), event.getStackName(), event + .getVariableName(), event.getValue()); + setVariableValue(event.getThreadName(), event.getStackName(), event.getVariableName(), value); + target.handleEvent(new SetVariableValueReply(event.getThreadName(), event.getStackName(), event + .getVariableName(), value)); + } + + /** + * Handles {@link ValidateVariableValueRequest}. + * + * @param event + * the {@link ValidateVariableValueRequest} + * @return true if the value is valid, false otherwise + */ + private Object handleValidateVariableValueRequest(ValidateVariableValueRequest event) { + return Boolean.valueOf(validateVariableValue(event.getThreadName(), event.getVariableName(), event + .getValue())); + } + + /** + * Handles {@link AbstractBreakpointRequest}. + * + * @param breakpointRequest + * the {@link AbstractBreakpointRequest} + */ + private void handleBreakpointRequest(AbstractBreakpointRequest breakpointRequest) { + if (breakpointRequest instanceof AddBreakpointRequest) { + addBreakPoint(breakpointRequest.getURI()); + } else if (breakpointRequest instanceof RemoveBreakpointRequest) { + removeBreakPoint(breakpointRequest.getURI()); + } else if (breakpointRequest instanceof ChangeBreakPointRequest) { + changeBreakPoint(breakpointRequest.getURI(), ((ChangeBreakPointRequest)breakpointRequest) + .getAttribute(), ((ChangeBreakPointRequest)breakpointRequest).getValue()); + } + } + + /** + * Handles {@link TerminateRequest}. + * + * @param terminateRequest + * the {@link TerminateRequest} + */ + private void handleTerminateRequest(TerminateRequest terminateRequest) { + final String threadName = terminateRequest.getThreadName(); + if (threadName != null) { + terminate(threadName); + // target.handleEvent(new TerminatedReply(threadName)); + } else { + terminate(); + target.handleEvent(new TerminatedReply()); + } + } + + /** + * Handles {@link SuspendRequest}. + * + * @param suspendRequest + * the {@link SuspendRequest} + */ + private void handleSuspendRequest(SuspendRequest suspendRequest) { + final String threadName = suspendRequest.getThreadName(); + if (threadName != null) { + suspend(threadName); + } else { + suspend(); + } + } + + /** + * Handles {@link ResumeRequest}. + * + * @param resumeRequest + * the {@link ResumeRequest} + */ + private void handleResumeRequest(ResumeRequest resumeRequest) { + final String threadName = resumeRequest.getThreadName(); + if (threadName != null) { + resume(threadName); + } else { + resume(); + } + } + + /** + * Handles {@link AbstractStepRequest}. + * + * @param stepRequest + * the {@link AbstractStepRequest} + */ + private void handleStepRequest(AbstractStepRequest stepRequest) { + final String threadName = stepRequest.getThreadName(); + if (stepRequest.getInstrcution() != currentInstructions.get(threadName)) { + throw new IllegalStateException("instruction desynchronization."); + } + if (stepRequest instanceof StepIntoRequest) { + stepInto(threadName); + } else if (stepRequest instanceof StepOverRequest) { + stepOver(threadName); + } else if (stepRequest instanceof StepReturnRequest) { + stepReturn(threadName); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepped(java.lang.String) + */ + public void stepped(final String threadName) { + target.handleEvent(new SteppedReply(threadName)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspended(java.lang.String) + */ + public void suspended(String threadName) { + target.handleEvent(new SuspendedReply(threadName)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#breaked(java.lang.String) + */ + public void breaked(String threadName) { + target.handleEvent(new BreakpointReply(threadName)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resuming(java.lang.String) + */ + public void resuming(String threadName) { + target.handleEvent(new ResumingReply(threadName)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#steppingInto(java.lang.String) + */ + public void steppingInto(String threadName) { + target.handleEvent(new StepIntoResumingReply(threadName)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#steppingOver(java.lang.String) + */ + public void steppingOver(String threadName) { + target.handleEvent(new StepOverResumingReply(threadName)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#steppingReturn(java.lang.String) + */ + public void steppingReturn(String threadName) { + target.handleEvent(new StepReturnResumingReply(threadName)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminated() + */ + public void terminated() { + target.handleEvent(new TerminatedReply()); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#spawnRunningThread(java.lang.String, + * org.eclipse.emf.ecore.EObject) + */ + public void spawnRunningThread(String threadName, EObject context) { + target.handleEvent(new SpawnRunningThreadReply(threadName, context)); + controllers.put(threadName, createThreadHandler(threadName)); + } + + /** + * Creates a {@link ThreadController} for the given thread. if the thread is a new Java {@link Thread} a + * new instance should be created, if not the {@link ThreadController} for the existing Java + * {@link Thread} should be returned. + * + * @param threadName + * the thread name + * @return if the thread is a new Java {@link Thread} a new instance should be created, if not the + * {@link ThreadController} for the existing Java {@link Thread} should be returned + */ + protected ThreadController createThreadHandler(String threadName) { + return new ThreadController(this, threadName); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#setTerminated(boolean) + */ + public void setTerminated(boolean terminated) { + this.terminated = terminated; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#isTerminated() + */ + public boolean isTerminated() { + return terminated; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#getNextInstruction(java.lang.String, + * org.eclipse.emf.ecore.EObject, org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger.Stepping) + */ + public EObject getNextInstruction(String threadName, EObject currentInstruction, Stepping stepping) { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#shouldBreak(org.eclipse.emf.ecore.EObject) + */ + public boolean shouldBreak(EObject instruction) { + final boolean res; + + res = getBreakpointAttributes(instruction, IBreakpoint.ENABLED) == Boolean.TRUE; + + return res; + } + + /** + * Gets the value of the given breakpoint attribute. + * + * @param instruction + * the instruction referenced in the breakpoint + * @param attribute + * the attribute + * @return the value of the given breakpoint attribute if any, null otherwise + */ + protected Serializable getBreakpointAttributes(EObject instruction, String attribute) { + final Serializable res; + + Map attributes = breakpoints.get(EcoreUtil.getURI(instruction)); + if (attributes != null) { + res = attributes.get(attribute); + } else { + res = null; + } + + return res; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#addBreakPoint(org.eclipse.emf.common.util.URI) + */ + public void addBreakPoint(URI instruction) { + breakpoints.put(instruction, new HashMap()); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#removeBreakPoint(org.eclipse.emf.common.util.URI) + */ + public void removeBreakPoint(URI instruction) { + breakpoints.remove(instruction); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#changeBreakPoint(org.eclipse.emf.common.util.URI, + * java.lang.String, java.io.Serializable) + */ + public void changeBreakPoint(URI instruction, String attribute, Serializable value) { + final Map attributes = breakpoints.get(instruction); + attributes.put(attribute, value); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#control(java.lang.String, org.eclipse.emf.ecore.EObject) + */ + public boolean control(String threadName, EObject instruction) { + final boolean res; + if (!isTerminated()) { + res = controllers.get(threadName).control(instruction); + } else { + res = false; + } + return res; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resume(java.lang.String) + */ + public void resume(String threadName) { + controllers.get(threadName).resume(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepInto(java.lang.String) + */ + public void stepInto(String threadName) { + controllers.get(threadName).stepInto(); + }; + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepOver(java.lang.String) + */ + public void stepOver(String threadName) { + controllers.get(threadName).stepOver(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepReturn(java.lang.String) + */ + public void stepReturn(String threadName) { + controllers.get(threadName).stepReturn(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspend(java.lang.String) + */ + public void suspend(String threadName) { + controllers.get(threadName).suspend(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminate() + */ + public void terminate() { + setTerminated(true); + for (ThreadController controler : controllers.values()) { + synchronized(controler) { + controler.wakeUp(); + } + } + controllers.clear(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminate(java.lang.String) + */ + public void terminate(String threadName) { + controllers.get(threadName).terminate(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspend() + */ + public void suspend() { + for (ThreadController controler : controllers.values()) { + controler.suspend(); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resume() + */ + public void resume() { + for (ThreadController controler : controllers.values()) { + controler.resume(); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#variable(java.lang.String, java.lang.String, java.lang.String, + * java.lang.Object, boolean) + */ + public void variable(String threadName, String stackName, String declarationTypeName, + String variableName, Object value, boolean supportModifications) { + target.handleEvent(new VariableReply(threadName, stackName, declarationTypeName, variableName, value, + supportModifications)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#deleteVariable(java.lang.String, java.lang.String) + */ + public void deleteVariable(String threadName, String name) { + target.handleEvent(new DeleteVariableReply(threadName, name)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#pushStackFrame(java.lang.String, java.lang.String, + * org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject) + */ + public void pushStackFrame(String threadName, String frameName, EObject context, EObject instruction) { + currentInstructions.put(threadName, instruction); + target.handleEvent(new PushStackFrameReply(threadName, frameName, context, instruction, canStepInto( + threadName, instruction))); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#popStackFrame(java.lang.String) + */ + public void popStackFrame(String threadName) { + target.handleEvent(new PopStackFrameReply(threadName)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#setCurrentInstruction(java.lang.String, + * org.eclipse.emf.ecore.EObject) + */ + public void setCurrentInstruction(String threadName, EObject instruction) { + currentInstructions.put(threadName, instruction); + target.handleEvent(new SetCurrentInstructionReply(threadName, instruction, canStepInto(threadName, + instruction))); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminated(java.lang.String) + */ + public void terminated(String threadName) { + target.handleEvent(new TerminatedReply(threadName)); + controllers.remove(threadName); + if (controllers.size() == 0) { + setTerminated(true); + terminated(); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#isTerminated(java.lang.String) + */ + public boolean isTerminated(String threadName) { + return !controllers.containsKey(threadName); + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/Activator.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/Activator.java new file mode 100644 index 000000000..f8a75f9d3 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/Activator.java @@ -0,0 +1,223 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide; + +import org.eclipse.gemoc.dsl.debug.ide.adapter.ILocator; + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Plugin; +import org.eclipse.core.runtime.Status; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle. + * + * @author Yvan Lussaud + */ +public class Activator extends Plugin { + + /** + * The plug-in ID. + */ + public static final String PLUGIN_ID = "org.eclipse.gemoc.dsl.debug.ide"; //$NON-NLS-1$ + + /** + * The shared instance. + */ + private static Activator plugin; + + /** + * The locators used to find source files. + */ + private static List locators; + + /** + * Constructor. + */ + public Activator() { + } + + /** + * Retrieve all the locators registered with the extension point, and additionally store them in a cache. + * + * @return All locators registered with the extension point. + */ + public List retrieveLocators() { + if (locators == null) { + IExtensionRegistry reg = Platform.getExtensionRegistry(); + IExtensionPoint ep = reg.getExtensionPoint("org.eclipse.gemoc.dsl.debug.locator"); + IExtension[] extensions = ep.getExtensions(); + ArrayList contributors = new ArrayList(); + for (int i = 0; i < extensions.length; i++) { + IExtension ext = extensions[i]; + IConfigurationElement[] ce = ext.getConfigurationElements(); + for (int j = 0; j < ce.length; j++) { + ILocator locator; + try { + locator = (ILocator)ce[j].createExecutableExtension("class"); + contributors.add(locator); + } catch (CoreException e) { + e.printStackTrace(); + } + } + } + locators = contributors; + } + return locators; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance. + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Log an informative message into the Eclipse log file. + * + * @param message + * the message to log + */ + public void info(String message) { + log(message, IStatus.INFO); + } + + /** + * Log a debug message into the Eclipse log file. + * + * @param message + * the message to log + */ + public void debug(String message) { + if (isDebugEnabled()) { + log("[DEBUG] " + message, IStatus.INFO); + } + } + + /** + * Test if the platform is in debug mode. + * + * @return True if the platform is in debug mode. + */ + public boolean isDebugEnabled() { + if (plugin != null) { + return Platform.inDebugMode(); + } + + return false; + } + + /** + * Log a message with given level into the Eclipse log file. + * + * @param message + * the message to log + * @param level + * the message priority + */ + private void log(String message, int level) { + log(new Status(level, PLUGIN_ID, message)); + } + + /** + * Logs the given {@link Status}. + * + * @param status + * the {@link Status} + */ + private void log(IStatus status) { + + if (plugin == null) { + // TODO Do log with java ? + } else { + plugin.getLog().log(status); + } + } + + /** + * Log a warning message. + * + * @param message + * the exception to log + */ + public void warn(String message) { + log(message, IStatus.WARNING); + } + + /** + * Log an exception into the Eclipse log file. + * + * @param e + * the exception to log + */ + public void error(Throwable e) { + error("Unexpected Error", e); + } + + /** + * Log an exception into the Eclipse log file. + * + * @param message + * the message + * @param e + * the exception to log + */ + public void error(String message, Throwable e) { + + Throwable t = e; + if (e instanceof InvocationTargetException) { + t = ((InvocationTargetException)e).getTargetException(); + } + + IStatus status; + if (t instanceof CoreException) { + status = ((CoreException)t).getStatus(); + } else { + status = new Status(IStatus.ERROR, PLUGIN_ID, message, e); + } + + log(status); + } + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLBreakpoint.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLBreakpoint.java similarity index 97% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLBreakpoint.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLBreakpoint.java index 6bc70741d..1e5bf825f 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/DSLBreakpoint.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLBreakpoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide; +package org.eclipse.gemoc.dsl.debug.ide; -import fr.obeo.dsl.debug.provider.CustomDebugItemProviderAdapterFactory; -import fr.obeo.dsl.debug.provider.DebugEditPlugin; +import org.eclipse.gemoc.dsl.debug.provider.CustomDebugItemProviderAdapterFactory; +import org.eclipse.gemoc.dsl.debug.provider.DebugEditPlugin; import java.io.IOException; import java.net.MalformedURLException; @@ -49,7 +49,7 @@ public class DSLBreakpoint extends Breakpoint { /** * The marker type ID. */ - public static final String MARKER_ID = "fr.obeo.dsl.debug.ide.breakpointMarker"; + public static final String MARKER_ID = "org.eclipse.gemoc.dsl.debug.ide.breakpointMarker"; /** * The image attribute. It's the image {@link Object} from EMF item provider. diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLEclipseDebugIntegration.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLEclipseDebugIntegration.java new file mode 100644 index 000000000..f464c16fe --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLEclipseDebugIntegration.java @@ -0,0 +1,541 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide; + +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.Variable; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLStackFrameAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLThreadAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLVariableAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLBooleanArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLByteArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLCharArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLDoubleArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLEObjectValueAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLFloatArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLIntArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLLongArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLNullValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLObjectValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.value.DSLShortArrayValue; +import org.eclipse.gemoc.dsl.debug.ide.adapter.variable.DSLObjectVariable; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; +import org.eclipse.gemoc.dsl.debug.provider.DebugItemProviderAdapterFactory; +import org.eclipse.gemoc.dsl.debug.util.DebugAdapterFactory; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.model.IBreakpoint; +import org.eclipse.debug.core.model.IDebugTarget; +import org.eclipse.debug.core.model.IStackFrame; +import org.eclipse.debug.core.model.IThread; +import org.eclipse.debug.core.model.IValue; +import org.eclipse.debug.core.model.IVariable; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; + +/** + * A {@link DebugAdapterFactory} providing {@link org.eclipse.debug.core.model.IDebugElement IDebugElement}. + * + * @author Yvan Lussaud + */ +public class DSLEclipseDebugIntegration extends DebugAdapterFactory { + + /** + * {@link Set} of {@link org.eclipse.emf.common.notify.AdapterFactory#isFactoryForType(Object) + * supported types}. + */ + private static final Set SUPPORTED_TYPES = initSupportedTypes(); + + /** + * The launching debug session. + */ + private final ILaunch launch; + + /** + * A generic {@link org.eclipse.emf.edit.provider.IItemLabelProvider IItemLabelProvider} factory. + */ + private final ComposedAdapterFactory genericLabelFactory; + + /** + * The {@link org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous + * communication or the {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger debugger} for synchronous + * communication. + */ + private final IDSLDebugEventProcessor debugger; + + /** + * The {@link DSLDebugTargetAdapter} to work with. + */ + private final DSLDebugTargetAdapter debugTarget; + + /** + * The {@link IModelUpdater} responsible for EMF debug model updates. + */ + private final IModelUpdater modelUpdater; + + /** + * The debug model identifier. + */ + private final String identifier; + + /** + * Constructor. + * + * @param identifier + * the debug model identifier + * @param launch + * the launching debug session + * @param debugTarget + * the {@link DebugTarget} + * @param modelUpdater + * the {@link IModelUpdater} + * @param debugger + * the {@link org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for + * asynchronous communication or the {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger debugger} + * for synchronous communication + */ + public DSLEclipseDebugIntegration(String identifier, ILaunch launch, DebugTarget debugTarget, + IModelUpdater modelUpdater, IDSLDebugEventProcessor debugger) { + this.identifier = identifier; + this.launch = launch; + this.debugger = debugger; + + this.debugTarget = getDebugTarget(debugTarget); + this.modelUpdater = modelUpdater; + + genericLabelFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + genericLabelFactory.addAdapterFactory(new DebugItemProviderAdapterFactory()); + genericLabelFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + genericLabelFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + } + + /** + * Initializes {@link DSLEclipseDebugIntegration#SUPPORTED_TYPES}. + * + * @return the {@link Set} of + * {@link org.eclipse.emf.common.notify.AdapterFactory#isFactoryForType(Object) supported + * types}. + */ + private static Set initSupportedTypes() { + final Set res = new HashSet(); + + res.add(IThread.class); + res.add(IDebugTarget.class); + res.add(IStackFrame.class); + res.add(IVariable.class); + res.add(IBreakpoint.class); + + return res; + } + + @Override + public boolean isFactoryForType(Object object) { + return SUPPORTED_TYPES.contains(object) || super.isFactoryForType(object); + } + + @Override + public Adapter createDebugTargetAdapter() { + return new DSLDebugTargetAdapter(this); + } + + @Override + public Adapter createThreadAdapter() { + return new DSLThreadAdapter(this); + } + + @Override + public Adapter createStackFrameAdapter() { + return new DSLStackFrameAdapter(this); + } + + @Override + public Adapter createVariableAdapter() { + return new DSLVariableAdapter(this); + } + + /** + * Gets the launching debug session. + * + * @return the launching debug session + */ + public ILaunch getLaunch() { + return launch; + } + + /** + * Gets the {@link org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous + * communication or the {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger debugger} for synchronous + * communication. + * + * @return the {@link org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous + * communication or the {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger debugger} for synchronous + * communication + */ + public IDSLDebugEventProcessor getDebugger() { + return debugger; + } + + /** + * Gets a generic {@link org.eclipse.emf.edit.provider.IItemLabelProvider IItemLabelProvider} factory. + * + * @return a generic {@link org.eclipse.emf.edit.provider.IItemLabelProvider IItemLabelProvider} + * factory + */ + public AdapterFactory getLabelFactory() { + return genericLabelFactory; + } + + /** + * Gets the {@link DSLDebugTargetAdapter} to work with. + * + * @return the {@link DSLDebugTargetAdapter} to work with + */ + public DSLDebugTargetAdapter getDebugTarget() { + return debugTarget; + } + + /** + * Gets an {@link IDebugTarget} form a {@link DebugTarget}. + * + * @param target + * the {@link DebugTarget} + * @return the {@link IDebugTarget} + */ + public DSLDebugTargetAdapter getDebugTarget(DebugTarget target) { + synchronized(target) { + final DSLDebugTargetAdapter res = (DSLDebugTargetAdapter)adapt(target, IDebugTarget.class); + if (res == null) { + throw new IllegalStateException("can't addapt DebugTarget to IDebugTarget."); + } + return res; + } + } + + /** + * Gets an {@link IThread} form a {@link Thread}. + * + * @param thread + * the {@link Thread} + * @return the {@link IThread} + */ + public DSLThreadAdapter getThread(Thread thread) { + synchronized(thread) { + final DSLThreadAdapter res = (DSLThreadAdapter)adapt(thread, IThread.class); + if (res == null) { + throw new IllegalStateException("can't addapt Thread to IThread."); + } + return res; + } + } + + /** + * Gets an {@link IStackFrame} form a {@link StackFrame}. + * + * @param frame + * the {@link StackFrame} + * @return the {@link IStackFrame} + */ + public DSLStackFrameAdapter getStackFrame(StackFrame frame) { + synchronized(frame) { + final DSLStackFrameAdapter res = (DSLStackFrameAdapter)adapt(frame, IStackFrame.class); + if (res == null) { + throw new IllegalStateException("can't addapt StackFrame to IStackFrame."); + } + return res; + } + } + + /** + * Gets an {@link IVariable} form a {@link Variable}. + * + * @param variable + * the {@link Variable} + * @return the {@link IVariable} + */ + public DSLVariableAdapter getVariable(Variable variable) { + synchronized(variable) { + final DSLVariableAdapter res = (DSLVariableAdapter)adapt(variable, IVariable.class); + if (res == null) { + throw new IllegalStateException("can't addapt Variable to IVariable."); + } + return res; + } + } + + /** + * Gets the {@link IValue} for the given {@link Object}. + * + * @param referenceTypeName + * the reference type name + * @param value + * the {@link Object value} + * @return the corresponding {@link IValue} + */ + public IValue getValue(String referenceTypeName, Object value) { + final IValue res; + + if (value instanceof EObject) { + res = createEObjectValue(referenceTypeName, (EObject)value); + } else if (value instanceof Collection) { + res = new DSLArrayValue(this, referenceTypeName, ((Collection)value).toArray()); + } else if (value instanceof Object[]) { + res = new DSLArrayValue(this, referenceTypeName, (Object[])value); + } else if (value instanceof byte[]) { + res = createByteArrayValue(referenceTypeName, (byte[])value); + } else if (value instanceof short[]) { + res = createShortArrayValue(referenceTypeName, (short[])value); + } else if (value instanceof int[]) { + res = createIntegerArrayValue(referenceTypeName, (int[])value); + } else if (value instanceof long[]) { + res = createLongArrayValue(referenceTypeName, (long[])value); + } else if (value instanceof float[]) { + res = createFloatArrayValue(referenceTypeName, (float[])value); + } else if (value instanceof double[]) { + res = createDoubleArrayValue(referenceTypeName, (double[])value); + } else if (value instanceof char[]) { + res = createCharacterArrayValue(referenceTypeName, (char[])value); + } else if (value instanceof boolean[]) { + res = createBooleanArrayValue(referenceTypeName, (boolean[])value); + } else if (value == null) { + res = new DSLNullValue(this, referenceTypeName); + } else { + res = new DSLObjectValue(this, referenceTypeName, value); + } + + return res; + } + + /** + * Creates an {@link IValue} for the given {@link EObject}. + * + * @param referenceTypeName + * the reference type name + * @param value + * the {@link EObject} + * @return the created {@link IValue} + */ + private IValue createEObjectValue(String referenceTypeName, EObject value) { + final IValue res; + DSLEObjectValueAdapter valueAdapter = null; + synchronized(value) { + for (Adapter adapter : value.eAdapters()) { + if (adapter.isAdapterForType(IValue.class)) { + valueAdapter = (DSLEObjectValueAdapter)adapter; + break; + } + } + if (valueAdapter == null) { + valueAdapter = new DSLEObjectValueAdapter(this, referenceTypeName, value); + value.eAdapters().add(valueAdapter); + } + } + res = valueAdapter; + return res; + } + + /** + * Creates an {@link IValue} for a byte[]. + * + * @param referenceTypeName + * the reference type name + * @param value + * the byte[] + * @return the created {@link IValue} + */ + private IValue createByteArrayValue(String referenceTypeName, byte[] value) { + final IValue res; + Byte[] array = new Byte[value.length]; + for (int i = 0; i < value.length; ++i) { + array[i] = Byte.valueOf(value[i]); + } + res = new DSLByteArrayValue(this, referenceTypeName, array); + return res; + } + + /** + * Creates an {@link IValue} for a short[]. + * + * @param referenceTypeName + * the reference type name + * @param value + * the short[] + * @return the created {@link IValue} + */ + private IValue createShortArrayValue(String referenceTypeName, short[] value) { + final IValue res; + Short[] array = new Short[value.length]; + for (int i = 0; i < value.length; ++i) { + array[i] = Short.valueOf(value[i]); + } + res = new DSLShortArrayValue(this, referenceTypeName, array); + return res; + } + + /** + * Creates an {@link IValue} for a int[]. + * + * @param referenceTypeName + * the reference type name + * @param value + * the int[] + * @return the created {@link IValue} + */ + private IValue createIntegerArrayValue(String referenceTypeName, int[] value) { + final IValue res; + Integer[] array = new Integer[value.length]; + for (int i = 0; i < value.length; ++i) { + array[i] = Integer.valueOf(value[i]); + } + res = new DSLIntArrayValue(this, referenceTypeName, array); + return res; + } + + /** + * Creates an {@link IValue} for a long[]. + * + * @param referenceTypeName + * the reference type name + * @param value + * the long[] + * @return the created {@link IValue} + */ + private IValue createLongArrayValue(String referenceTypeName, long[] value) { + final IValue res; + Long[] array = new Long[value.length]; + for (int i = 0; i < value.length; ++i) { + array[i] = Long.valueOf(value[i]); + } + res = new DSLLongArrayValue(this, referenceTypeName, array); + return res; + } + + /** + * Creates an {@link IValue} for a float[]. + * + * @param referenceTypeName + * the reference type name + * @param value + * the float[] + * @return the created {@link IValue} + */ + private IValue createFloatArrayValue(String referenceTypeName, float[] value) { + final IValue res; + Float[] array = new Float[value.length]; + for (int i = 0; i < value.length; ++i) { + array[i] = Float.valueOf(value[i]); + } + res = new DSLFloatArrayValue(this, referenceTypeName, array); + return res; + } + + /** + * Creates an {@link IValue} for a double[]. + * + * @param referenceTypeName + * the reference type name + * @param value + * the double[] + * @return the created {@link IValue} + */ + private IValue createDoubleArrayValue(String referenceTypeName, double[] value) { + final IValue res; + Double[] array = new Double[value.length]; + for (int i = 0; i < value.length; ++i) { + array[i] = Double.valueOf(value[i]); + } + res = new DSLDoubleArrayValue(this, referenceTypeName, array); + return res; + } + + /** + * Creates an {@link IValue} for a char[]. + * + * @param referenceTypeName + * the reference type name + * @param value + * the char[] + * @return the created {@link IValue} + */ + private IValue createCharacterArrayValue(String referenceTypeName, char[] value) { + final IValue res; + Character[] array = new Character[value.length]; + for (int i = 0; i < value.length; ++i) { + array[i] = Character.valueOf(value[i]); + } + res = new DSLCharArrayValue(this, referenceTypeName, array); + return res; + } + + /** + * Creates an {@link IValue} for a boolean[]. + * + * @param referenceTypeName + * the reference type name + * @param value + * the boolean[] + * @return the created {@link IValue} + */ + private IValue createBooleanArrayValue(String referenceTypeName, boolean[] value) { + final IValue res; + Boolean[] array = new Boolean[value.length]; + for (int i = 0; i < value.length; ++i) { + array[i] = Boolean.valueOf(value[i]); + } + res = new DSLBooleanArrayValue(this, referenceTypeName, array); + return res; + } + + /** + * Gets a {@link IVariable} for the given {@link Object}. + * + * @param referenceTypeName + * the reference type name + * @param variableName + * the variable name + * @param value + * the value + * @return the {@link IVariable} + */ + public IVariable getVariable(String referenceTypeName, String variableName, Object value) { + return new DSLObjectVariable(this, referenceTypeName, variableName, value); + } + + /** + * Gets the {@link IModelUpdater} responsible for EMF debug model updates. + * + * @return the {@link IModelUpdater} responsible for EMF debug model updates + */ + public IModelUpdater getModelUpdater() { + return modelUpdater; + } + + /** + * Gets the debug model identifier. + * + * @return the debug model identifier + */ + public String getModelIdentifier() { + return identifier; + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLSourceLocator.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLSourceLocator.java new file mode 100644 index 000000000..04b52ced8 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/DSLSourceLocator.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide; + +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLStackFrameAdapter; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.model.IStackFrame; +import org.eclipse.debug.core.sourcelookup.IPersistableSourceLocator2; +import org.eclipse.emf.ecore.EObject; + +/** + * DSL debugger {@link org.eclipse.debug.core.model.ISourceLocator ISourceLocator}. + * + * @author Yvan Lussaud + */ +public class DSLSourceLocator implements IPersistableSourceLocator2 { + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.core.model.ISourceLocator#getSourceElement(org.eclipse.debug.core.model.IStackFrame) + */ + public Object getSourceElement(IStackFrame stackFrame) { + final Object res; + if (stackFrame instanceof DSLStackFrameAdapter) { + final DSLStackFrameAdapter eStackFrame = (DSLStackFrameAdapter)stackFrame; + final EObject instruction = eStackFrame.getCurrentInstruction(); + if (instruction != null) { + res = instruction; + } else { + res = eStackFrame.getContext(); + } + } else { + res = null; + } + return res; + } + + /** + * {@inheritDoc} Unused method of IPersistableSourceLocator2 + * + * @see org.eclipse.debug.core.model.IPersistableSourceLocator#getMemento() + */ + public String getMemento() throws CoreException { + return ""; + } + + /** + * {@inheritDoc} Unused method of IPersistableSourceLocator2 + * + * @see org.eclipse.debug.core.model.IPersistableSourceLocator#initializeFromMemento(java.lang.String) + */ + public void initializeFromMemento(String memento) throws CoreException { + } + + /** + * {@inheritDoc} Unused method of IPersistableSourceLocator2 + * + * @see org.eclipse.debug.core.model.IPersistableSourceLocator#initializeDefaults(org.eclipse.debug.core.ILaunchConfiguration) + */ + public void initializeDefaults(ILaunchConfiguration configuration) throws CoreException { + } + + /** + * {@inheritDoc} Unused method of IPersistableSourceLocator2 + * + * @see org.eclipse.debug.core.sourcelookup.IPersistableSourceLocator2#initializeFromMemento(java.lang.String, + * org.eclipse.debug.core.ILaunchConfiguration) + */ + public void initializeFromMemento(String memento, ILaunchConfiguration configuration) + throws CoreException { + } + + /** + * {@inheritDoc} Unused method of IPersistableSourceLocator2 + * + * @see org.eclipse.debug.core.sourcelookup.IPersistableSourceLocator2#dispose() + */ + public void dispose() { + // TODO Auto-generated method stub + + } + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/IDSLDebugger.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/IDSLDebugger.java similarity index 97% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/IDSLDebugger.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/IDSLDebugger.java index ec82f1368..61f64759e 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/IDSLDebugger.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/IDSLDebugger.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide; +package org.eclipse.gemoc.dsl.debug.ide; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; import java.io.Serializable; @@ -29,17 +29,20 @@ public interface IDSLDebugger extends IDSLDebugEventProcessor { * * @author Yvan Lussaud */ - static enum Stepping { + enum Stepping { /** * Not stepping. */ - NONE, /** + NONE, + /** * Stepping over. */ - STEP_OVER, /** + STEP_OVER, + /** * Stepping into. */ - STEP_INTO, /** + STEP_INTO, + /** * Stepping return. */ STEP_RETURN; @@ -235,7 +238,7 @@ static enum Stepping { * Spawn a running thread in the model. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param context * the {@link EObject} representing the current context of the thread */ diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/IModelUpdater.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/IModelUpdater.java new file mode 100644 index 000000000..f5bf4a8da --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/IModelUpdater.java @@ -0,0 +1,217 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide; + +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.Variable; + +import org.eclipse.emf.ecore.EObject; + +/** + * Class responsible for EMF debug model updates. + * + * @author Yvan Lussaud + */ +public interface IModelUpdater { + + /** + * Requests the termination the given {@link DebugTarget}. The {@link DebugTarget} + * {@link DebugTarget#getorg.eclipse.gemoc.dsl.debug.State() org.eclipse.gemoc.dsl.debug.State} must be + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetorg.eclipse.gemoc.dsl.debug.State#CONNECTED connected}. + * + * @param target + * the {@link DebugTarget} + */ + void terminateRequest(DebugTarget target); + + /** + * Requests disconnection the given {@link DebugTarget}. + * + * @param target + * the {@link DebugTarget} + */ + void disconnectRequest(DebugTarget target); + + /** + * Spawn a running {@link Thread} in the given {@link DebugTarget}. + * + * @param target + * the {@link DebugTarget} that will contains the spawned {@link Thread} + * @param threadName + * the {@link Thread#getName() thread name} + * @param threadContext + * the {@link Thread#getContext() thread context} + */ + void spawnRunningThreadReply(DebugTarget target, String threadName, EObject threadContext); + + /** + * Notify the {@link org.eclipse.gemoc.dsl.debug.DebugTargetUtils#terminateRequest(DebugTarget) termination} is done + * for the given {@link DebugTarget}. The {@link DebugTarget} + * {@link DebugTarget#getorg.eclipse.gemoc.dsl.debug.State() org.eclipse.gemoc.dsl.debug.State} must be + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetorg.eclipse.gemoc.dsl.debug.State#TERMINATING terminating}. + * + * @param target + * the {@link DebugTarget} + */ + void terminatedReply(DebugTarget target); + + /** + * Notify the deletion of the {@link org.eclipse.gemoc.dsl.debug.Variable Variable} with the given + * {@link org.eclipse.gemoc.dsl.debug.Variable#getName() name} in the given {@link Thread}. + * + * @param thread + * the {@link Thread} + * @param name + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} + */ + void deleteVariableReply(Thread thread, String name); + + /** + * Notify popping the {@link Thread#getTopStackFrame() top stack frame} of the given {@link Thread}. + * + * @param thread + * the {@link Thread} + * @return the popped {@link StackFrame} + */ + StackFrame popStackFrameReply(Thread thread); + + /** + * Notify pushing a new {@link org.eclipse.gemoc.dsl.debug.StackFrame StackFrame} with the given + * {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() name} in the given {@link Thread}. + * + * @param thread + * the {@link Thread} + * @param name + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack frame name} + * @param context + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getContext() context} + * @param instruction + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getCurrentInstruction() current instruction} + * @param canStepInto + * tells if we can {@link org.eclipse.gemoc.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction() step + * into} the current instruction + * @return the pushed {@link StackFrame} + */ + StackFrame pushStackFrameReply(Thread thread, String name, EObject context, EObject instruction, + boolean canStepInto); + + /** + * Request to step into the given {@link Thread}. The {@link Thread} + * {@link Thread#getorg.eclipse.gemoc.dsl.debug.State() org.eclipse.gemoc.dsl.debug.State} must be + * {@link org.eclipse.gemoc.dsl.debug.State#SUSPENDED suspended}. + * + * @param thread + * the {@link Thread} + */ + void stepIntoReply(Thread thread); + + /** + * Request to step over the given {@link Thread}. The {@link Thread} + * {@link Thread#getorg.eclipse.gemoc.dsl.debug.State() org.eclipse.gemoc.dsl.debug.State} must be + * {@link org.eclipse.gemoc.dsl.debug.State#SUSPENDED suspended}. + * + * @param thread + * the {@link Thread} + */ + void stepOverReply(Thread thread); + + /** + * Request to step return the given {@link Thread}. The {@link Thread} + * {@link Thread#getorg.eclipse.gemoc.dsl.debug.State() org.eclipse.gemoc.dsl.debug.State} must be + * {@link org.eclipse.gemoc.dsl.debug.State#SUSPENDED suspended} and the {@link Thread#getTopStackFrame() top stack + * frame} must has a {@link org.eclipse.gemoc.dsl.debug.StackFrame#getParentFrame() parent frame}. + * + * @param thread + * the {@link Thread} + */ + void stepReturnReply(Thread thread); + + /** + * Requests resuming the given {@link Thread}. The {@link Thread} org.eclipse.gemoc.dsl.debug.State must be + * {@link org.eclipse.gemoc.dsl.debug.State#SUSPENDED suspended}. + * + * @param thread + * the {@link Thread} + */ + void resumedReply(Thread thread); + + /** + * Sets the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getCurrentInstruction() current instruction} of the + * {@link Thread#getTopStackFrame() top stack frame} of the given {@link Thread}. + * + * @param thread + * the {@link Thread} + * @param instruction + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getCurrentInstruction() current instruction} + * @param canStepInto + * tells if we can {@link org.eclipse.gemoc.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction() step + * into the current instruction} + */ + void setCurrentInstructionReply(Thread thread, EObject instruction, boolean canStepInto); + + /** + * Notify the suspension of the given {@link Thread} to the given + * {@link org.eclipse.gemoc.dsl.debug.StackFrame#getCurrentInstruction() instruction}. + * + * @param thread + * the {@link Thread} + */ + void suspendedReply(Thread thread); + + /** + * Notify the {@link terminateRequest termination} is done for the given {@link Thread} . The + * {@link Thread} {@link Thread#getorg.eclipse.gemoc.dsl.debug.State() org.eclipse.gemoc.dsl.debug.State} must be + * {@link org.eclipse.gemoc.dsl.debug.State#TERMINATING terminating}. + * + * @param thread + * the {@link Thread} + */ + void terminatedReply(Thread thread); + + /** + * Notify sets the {@link org.eclipse.gemoc.dsl.debug.Variable Variable} with the given + * {@link org.eclipse.gemoc.dsl.debug.Variable#getName() name} from the {@link Thread#getTopStackFrame() top stack + * frame} of the given {@link Thread} to the given {@link EObject value}. + * + * @param stackFrame + * the {@link StackFrame} + * @param declarationTypeName + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getDeclarationType() declaration type name} + * @param variableName + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} + * @param value + * the {@link Object value} to set + * @param supportModifications + * tells if the value can be changed + */ + void setVariableReply(StackFrame stackFrame, String declarationTypeName, String variableName, + Object value, boolean supportModifications); + + /** + * Notifies a value change for the given {@link Variable} after a request. + * + * @param variable + * the {@link Variable} + * @param value + * the {@link Object value} to set + */ + void setVariableValueReply(Variable variable, Object value); + + /** + * Requests the termination the given {@link Thread}. + * + * @param thread + * the {@link Thread} + */ + void terminateRequest(Thread thread); +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/ModelUpdater.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/ModelUpdater.java new file mode 100644 index 000000000..830b268f4 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/ModelUpdater.java @@ -0,0 +1,191 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide; + +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.ThreadUtils; +import org.eclipse.gemoc.dsl.debug.Variable; + +import org.eclipse.emf.ecore.EObject; + +/** + * An EMF {@link IModelUpdater}. + * + * @author Yvan Lussaud + */ +public class ModelUpdater implements IModelUpdater { + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#terminateRequest(org.eclipse.gemoc.dsl.debug.DebugTarget) + */ + public void terminateRequest(DebugTarget target) { + DebugTargetUtils.terminateRequest(target); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#disconnectRequest(org.eclipse.gemoc.dsl.debug.DebugTarget) + */ + public void disconnectRequest(DebugTarget target) { + DebugTargetUtils.disconnectRequest(target); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#spawnRunningThreadReply(org.eclipse.gemoc.dsl.debug.DebugTarget, + * java.lang.String, org.eclipse.emf.ecore.EObject) + */ + public void spawnRunningThreadReply(DebugTarget target, String threadName, EObject threadContext) { + DebugTargetUtils.spawnRunningThreadReply(target, threadName, threadContext); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#terminatedReply(org.eclipse.gemoc.dsl.debug.DebugTarget) + */ + public void terminatedReply(DebugTarget target) { + DebugTargetUtils.terminatedReply(target); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#deleteVariableReply(org.eclipse.gemoc.dsl.debug.Thread, + * java.lang.String) + */ + public void deleteVariableReply(Thread thread, String name) { + ThreadUtils.deleteVariableReply(thread, name); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#popStackFrameReply(org.eclipse.gemoc.dsl.debug.Thread) + */ + public StackFrame popStackFrameReply(Thread thread) { + return ThreadUtils.popStackFrameReply(thread); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#pushStackFrameReply(org.eclipse.gemoc.dsl.debug.Thread, + * java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, boolean) + */ + public StackFrame pushStackFrameReply(Thread thread, String name, EObject context, EObject instruction, + boolean canStepInto) { + return ThreadUtils.pushStackFrameReply(thread, name, context, instruction, canStepInto); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#stepIntoReply(org.eclipse.gemoc.dsl.debug.Thread) + */ + public void stepIntoReply(Thread thread) { + ThreadUtils.stepIntoReply(thread); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#stepOverReply(org.eclipse.gemoc.dsl.debug.Thread) + */ + public void stepOverReply(Thread thread) { + ThreadUtils.stepOverReply(thread); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#stepReturnReply(org.eclipse.gemoc.dsl.debug.Thread) + */ + public void stepReturnReply(Thread thread) { + ThreadUtils.stepReturnReply(thread); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#resumedReply(org.eclipse.gemoc.dsl.debug.Thread) + */ + public void resumedReply(Thread thread) { + ThreadUtils.resumedReply(thread); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#setCurrentInstructionReply(org.eclipse.gemoc.dsl.debug.Thread, + * org.eclipse.emf.ecore.EObject, boolean) + */ + public void setCurrentInstructionReply(Thread thread, EObject instruction, boolean canStepInto) { + ThreadUtils.setCurrentInstructionReply(thread, instruction, canStepInto); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#suspendedReply(org.eclipse.gemoc.dsl.debug.Thread) + */ + public void suspendedReply(Thread thread) { + ThreadUtils.suspendedReply(thread); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#terminatedReply(org.eclipse.gemoc.dsl.debug.Thread) + */ + public void terminatedReply(Thread thread) { + ThreadUtils.terminatedReply(thread); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#setVariableReply(org.eclipse.gemoc.dsl.debug.StackFrame, + * java.lang.String, java.lang.String, java.lang.Object, boolean) + */ + public void setVariableReply(StackFrame stackFrame, String declarationTypeName, String variableName, + Object value, boolean supportModifications) { + ThreadUtils.setVariableReply(stackFrame, declarationTypeName, variableName, value, + supportModifications); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#setVariableValueReply(org.eclipse.gemoc.dsl.debug.Variable, + * java.lang.Object) + */ + public void setVariableValueReply(Variable variable, Object value) { + ThreadUtils.setVariableValueReply(variable, value); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#terminateRequest(org.eclipse.gemoc.dsl.debug.Thread) + */ + public void terminateRequest(Thread thread) { + ThreadUtils.terminateRequest(thread); + } + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/ThreadController.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/ThreadController.java similarity index 97% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/ThreadController.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/ThreadController.java index f6d6f987d..fd517f16e 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/ThreadController.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/ThreadController.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide; +package org.eclipse.gemoc.dsl.debug.ide; -import fr.obeo.dsl.debug.ide.IDSLDebugger.Stepping; +import org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger.Stepping; import org.eclipse.emf.ecore.EObject; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/TransactionalModelUpdater.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/TransactionalModelUpdater.java similarity index 78% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/TransactionalModelUpdater.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/TransactionalModelUpdater.java index 3a1e6a19e..9738b852f 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/TransactionalModelUpdater.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/TransactionalModelUpdater.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,14 +8,14 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide; +package org.eclipse.gemoc.dsl.debug.ide; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetUtils; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.Thread; -import fr.obeo.dsl.debug.ThreadUtils; -import fr.obeo.dsl.debug.Variable; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.ThreadUtils; +import org.eclipse.gemoc.dsl.debug.Variable; import java.util.ArrayList; import java.util.Collection; @@ -60,7 +60,7 @@ protected void doExecute(Command command) { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#terminateRequest(fr.obeo.dsl.debug.DebugTarget) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#terminateRequest(org.eclipse.gemoc.dsl.debug.DebugTarget) */ public void terminateRequest(final DebugTarget target) { final Command command = new RecordingCommand(domain, "Terminate Request") { @@ -77,7 +77,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#disconnectRequest(fr.obeo.dsl.debug.DebugTarget) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#disconnectRequest(org.eclipse.gemoc.dsl.debug.DebugTarget) */ public void disconnectRequest(final DebugTarget target) { final Command command = new RecordingCommand(domain, "Disconnect Request") { @@ -94,7 +94,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#spawnRunningThreadReply(fr.obeo.dsl.debug.DebugTarget, + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#spawnRunningThreadReply(org.eclipse.gemoc.dsl.debug.DebugTarget, * java.lang.String, org.eclipse.emf.ecore.EObject) */ public void spawnRunningThreadReply(final DebugTarget target, final String threadName, @@ -113,7 +113,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#terminatedReply(fr.obeo.dsl.debug.DebugTarget) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#terminatedReply(org.eclipse.gemoc.dsl.debug.DebugTarget) */ public void terminatedReply(final DebugTarget target) { final Command command = new RecordingCommand(domain, "Terminated Reply") { @@ -130,7 +130,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#deleteVariableReply(fr.obeo.dsl.debug.Thread, + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#deleteVariableReply(org.eclipse.gemoc.dsl.debug.Thread, * java.lang.String) */ public void deleteVariableReply(final Thread thread, final String name) { @@ -148,7 +148,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#popStackFrameReply(fr.obeo.dsl.debug.Thread) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#popStackFrameReply(org.eclipse.gemoc.dsl.debug.Thread) */ public StackFrame popStackFrameReply(final Thread thread) { final Command command = new RecordingCommand(domain, "Pop Stack Frame Reply") { @@ -174,7 +174,7 @@ public Collection getResult() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#pushStackFrameReply(fr.obeo.dsl.debug.Thread, + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#pushStackFrameReply(org.eclipse.gemoc.dsl.debug.Thread, * java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, boolean) */ public StackFrame pushStackFrameReply(final Thread thread, final String name, final EObject context, @@ -202,7 +202,7 @@ public Collection getResult() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#stepIntoReply(fr.obeo.dsl.debug.Thread) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#stepIntoReply(org.eclipse.gemoc.dsl.debug.Thread) */ public void stepIntoReply(final Thread thread) { final Command command = new RecordingCommand(domain, "Step Into Reply") { @@ -219,7 +219,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#stepOverReply(fr.obeo.dsl.debug.Thread) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#stepOverReply(org.eclipse.gemoc.dsl.debug.Thread) */ public void stepOverReply(final Thread thread) { final Command command = new RecordingCommand(domain, "Step Over Reply") { @@ -236,7 +236,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#stepReturnReply(fr.obeo.dsl.debug.Thread) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#stepReturnReply(org.eclipse.gemoc.dsl.debug.Thread) */ public void stepReturnReply(final Thread thread) { final Command command = new RecordingCommand(domain, "Step Return Reply") { @@ -253,7 +253,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#resumedReply(fr.obeo.dsl.debug.Thread) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#resumedReply(org.eclipse.gemoc.dsl.debug.Thread) */ public void resumedReply(final Thread thread) { final Command command = new RecordingCommand(domain, "Resumed Reply") { @@ -270,7 +270,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#setCurrentInstructionReply(fr.obeo.dsl.debug.Thread, + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#setCurrentInstructionReply(org.eclipse.gemoc.dsl.debug.Thread, * org.eclipse.emf.ecore.EObject, boolean) */ public void setCurrentInstructionReply(final Thread thread, final EObject instruction, @@ -289,7 +289,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#suspendedReply(fr.obeo.dsl.debug.Thread) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#suspendedReply(org.eclipse.gemoc.dsl.debug.Thread) */ public void suspendedReply(final Thread thread) { final Command command = new RecordingCommand(domain, "Suspended Reply") { @@ -306,7 +306,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#terminatedReply(fr.obeo.dsl.debug.Thread) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#terminatedReply(org.eclipse.gemoc.dsl.debug.Thread) */ public void terminatedReply(final Thread thread) { final Command command = new RecordingCommand(domain, "Terminated Reply") { @@ -323,7 +323,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.ModelUpdater#setVariableReply(fr.obeo.dsl.debug.StackFrame, + * @see org.eclipse.gemoc.dsl.debug.ide.ModelUpdater#setVariableReply(org.eclipse.gemoc.dsl.debug.StackFrame, * java.lang.String, java.lang.String, java.lang.Object, boolean) */ public void setVariableReply(final StackFrame stackFrame, final String declarationTypeName, @@ -356,7 +356,7 @@ protected void doExecute() { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.IModelUpdater#terminateRequest(fr.obeo.dsl.debug.Thread) + * @see org.eclipse.gemoc.dsl.debug.ide.IModelUpdater#terminateRequest(org.eclipse.gemoc.dsl.debug.Thread) */ public void terminateRequest(final Thread thread) { final Command command = new RecordingCommand(domain, "Terminate Request") { diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/AbstractDSLDebugElementAdapter.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/AbstractDSLDebugElementAdapter.java similarity index 95% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/AbstractDSLDebugElementAdapter.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/AbstractDSLDebugElementAdapter.java index b16238fa0..2d2bea282 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/AbstractDSLDebugElementAdapter.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/AbstractDSLDebugElementAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter; +package org.eclipse.gemoc.dsl.debug.ide.adapter; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.model.DebugElement; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLDebugTargetAdapter.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLDebugTargetAdapter.java similarity index 81% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLDebugTargetAdapter.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLDebugTargetAdapter.java index 1e163ef48..b4c45c079 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLDebugTargetAdapter.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLDebugTargetAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,42 +8,42 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter; - -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetState; -import fr.obeo.dsl.debug.DebugTargetUtils; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.Thread; -import fr.obeo.dsl.debug.Variable; -import fr.obeo.dsl.debug.ide.Activator; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEvent; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; -import fr.obeo.dsl.debug.ide.event.debugger.BreakpointReply; -import fr.obeo.dsl.debug.ide.event.debugger.DeleteVariableReply; -import fr.obeo.dsl.debug.ide.event.debugger.PopStackFrameReply; -import fr.obeo.dsl.debug.ide.event.debugger.PushStackFrameReply; -import fr.obeo.dsl.debug.ide.event.debugger.ResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.SetCurrentInstructionReply; -import fr.obeo.dsl.debug.ide.event.debugger.SetVariableValueReply; -import fr.obeo.dsl.debug.ide.event.debugger.SpawnRunningThreadReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepIntoResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepOverResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepReturnResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.SteppedReply; -import fr.obeo.dsl.debug.ide.event.debugger.SuspendedReply; -import fr.obeo.dsl.debug.ide.event.debugger.TerminatedReply; -import fr.obeo.dsl.debug.ide.event.debugger.VariableReply; -import fr.obeo.dsl.debug.ide.event.model.AddBreakpointRequest; -import fr.obeo.dsl.debug.ide.event.model.ChangeBreakPointRequest; -import fr.obeo.dsl.debug.ide.event.model.DisconnectRequest; -import fr.obeo.dsl.debug.ide.event.model.RemoveBreakpointRequest; -import fr.obeo.dsl.debug.ide.event.model.ResumeRequest; -import fr.obeo.dsl.debug.ide.event.model.StartRequest; -import fr.obeo.dsl.debug.ide.event.model.SuspendRequest; -import fr.obeo.dsl.debug.ide.event.model.TerminateRequest; +package org.eclipse.gemoc.dsl.debug.ide.adapter; + +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetState; +import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.Variable; +import org.eclipse.gemoc.dsl.debug.ide.Activator; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.BreakpointReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.DeleteVariableReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.PopStackFrameReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.PushStackFrameReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.ResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SetCurrentInstructionReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SetVariableValueReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SpawnRunningThreadReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepIntoResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepOverResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepReturnResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SteppedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SuspendedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.TerminatedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.VariableReply; +import org.eclipse.gemoc.dsl.debug.ide.event.model.AddBreakpointRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ChangeBreakPointRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.DisconnectRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.RemoveBreakpointRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ResumeRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StartRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.SuspendRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.TerminateRequest; import java.io.Serializable; import java.util.ArrayList; @@ -202,10 +202,11 @@ public void breakpointAdded(IBreakpoint breakpoint) { URI uri = ((DSLBreakpoint)breakpoint).getURI(); factory.getDebugger().handleEvent(new AddBreakpointRequest(uri)); try { - for (Entry entry : breakpoint.getMarker().getAttributes().entrySet()) { - factory.getDebugger().handleEvent( - new ChangeBreakPointRequest(((DSLBreakpoint)breakpoint).getURI(), entry - .getKey(), (Serializable)entry.getValue())); + for (Entry entry : breakpoint.getMarker().getAttributes() + .entrySet()) { + factory.getDebugger().handleEvent(new ChangeBreakPointRequest( + ((DSLBreakpoint)breakpoint).getURI(), entry.getKey(), (Serializable)entry + .getValue())); } } catch (CoreException e) { Activator.getDefault().error(e); @@ -251,17 +252,14 @@ public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) { for (Entry entry : delta.getAttributes().entrySet()) { final Object markerValue = marker.getAttribute(entry.getKey()); final Object deltaValue = entry.getValue(); - if ((markerValue != null && !markerValue.equals(deltaValue)) - || (deltaValue != null && !deltaValue.equals(markerValue))) { + if ((markerValue != null && !markerValue.equals(deltaValue)) || (deltaValue != null + && !deltaValue.equals(markerValue))) { if (delta.getKind() == IResourceDelta.ADDED) { - factory.getDebugger() - .handleEvent( - new ChangeBreakPointRequest(uri, entry.getKey(), - (Serializable)deltaValue)); + factory.getDebugger().handleEvent(new ChangeBreakPointRequest(uri, entry.getKey(), + (Serializable)deltaValue)); } else { - factory.getDebugger().handleEvent( - new ChangeBreakPointRequest(uri, entry.getKey(), - (Serializable)markerValue)); + factory.getDebugger().handleEvent(new ChangeBreakPointRequest(uri, entry.getKey(), + (Serializable)markerValue)); } } } @@ -299,18 +297,30 @@ public boolean isDisconnected() { return getHost().getState() == DebugTargetState.DISCONNECTED; } + /** + * {@inheritDoc} Unused method. + * + * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#supportsStorageRetrieval() + */ public boolean supportsStorageRetrieval() { - // TODO Auto-generated method stub return false; } + /** + * {@inheritDoc} Unused method. + * + * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#getMemoryBlock(long, long) + */ public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException { - // TODO Auto-generated method stub return null; } + /** + * {@inheritDoc} Unused method. + * + * @see org.eclipse.debug.core.model.IDebugTarget#getProcess() + */ public IProcess getProcess() { - // TODO Auto-generated method stub return null; } @@ -353,15 +363,14 @@ public String getName() throws DebugException { * @see org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint) */ public boolean supportsBreakpoint(IBreakpoint breakpoint) { - return breakpoint instanceof DSLBreakpoint - && breakpoint.getModelIdentifier().equals(getModelIdentifier()) - && ((DSLBreakpoint)breakpoint).getURI() != null; + return breakpoint instanceof DSLBreakpoint && breakpoint.getModelIdentifier().equals( + getModelIdentifier()) && ((DSLBreakpoint)breakpoint).getURI() != null; } /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent) + * @see org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent) */ public Object handleEvent(IDSLDebugEvent event) { Object res = null; @@ -417,8 +426,8 @@ private void handleSetCurrentInstructionReply(SetCurrentInstructionReply setCurr final Thread eThread = DebugTargetUtils.getThread(getHost(), setCurrentInstructionReply .getThreadName()); // EMF model change - factory.getModelUpdater().setCurrentInstructionReply(eThread, - setCurrentInstructionReply.getInstruction(), setCurrentInstructionReply.isCanStepInto()); + factory.getModelUpdater().setCurrentInstructionReply(eThread, setCurrentInstructionReply + .getInstruction(), setCurrentInstructionReply.isCanStepInto()); // Eclipse change factory.getThread(eThread).fireChangeEvent(DebugEvent.CONTENT); // notify current instruction listeners @@ -450,9 +459,9 @@ private void handlePopStackFrameReply(PopStackFrameReply popStackFrameReply) { private void handlePushStackFrameReply(PushStackFrameReply pushStackFrameReply) { final Thread eThread = DebugTargetUtils.getThread(getHost(), pushStackFrameReply.getThreadName()); // EMF model change - final StackFrame eFrame = factory.getModelUpdater().pushStackFrameReply(eThread, - pushStackFrameReply.getName(), pushStackFrameReply.getContext(), - pushStackFrameReply.getCurrentInstruction(), pushStackFrameReply.isCanStepInto()); + final StackFrame eFrame = factory.getModelUpdater().pushStackFrameReply(eThread, pushStackFrameReply + .getName(), pushStackFrameReply.getContext(), pushStackFrameReply.getCurrentInstruction(), + pushStackFrameReply.isCanStepInto()); // Eclipse change factory.getThread(eThread).fireChangeEvent(DebugEvent.CONTENT); // notify current instruction listeners @@ -484,8 +493,8 @@ private void handleVariableReply(VariableReply variableReply) { final StackFrame eStackFrame = DebugTargetUtils.getStackFrame(eThread, variableReply.getStackName()); // EMF model change factory.getModelUpdater().setVariableReply(eStackFrame, variableReply.getDeclarationTypeName(), - variableReply.getVariableName(), variableReply.getValue(), - variableReply.supportModifications()); + variableReply.getVariableName(), variableReply.getValue(), variableReply + .supportModifications()); // Eclipse change factory.getThread(eThread).fireChangeEvent(DebugEvent.CONTENT); } diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLStackFrameAdapter.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLStackFrameAdapter.java similarity index 81% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLStackFrameAdapter.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLStackFrameAdapter.java index 2482bbefe..465b5176c 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLStackFrameAdapter.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLStackFrameAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,12 +8,13 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter; +package org.eclipse.gemoc.dsl.debug.ide.adapter; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.ThreadUtils; -import fr.obeo.dsl.debug.Variable; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.ThreadUtils; +import org.eclipse.gemoc.dsl.debug.Variable; +import org.eclipse.gemoc.dsl.debug.ide.Activator; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; import java.util.ArrayList; import java.util.List; @@ -189,7 +190,13 @@ public void terminate() throws DebugException { */ public IThread getThread() { if (thread == null) { - thread = (IThread)factory.adapt(ThreadUtils.getThread(getHost()), IThread.class); + org.eclipse.gemoc.dsl.debug.Thread hostThread = ThreadUtils.getThread(getHost()); + if (hostThread == null) { + throw new IllegalStateException("can't addapt Thread to IThread."); + } + synchronized(hostThread) { + thread = (IThread)factory.adapt(hostThread, IThread.class); + } if (thread == null) { throw new IllegalStateException("can't addapt Thread to IThread."); } @@ -206,11 +213,13 @@ public IVariable[] getVariables() throws DebugException { final List res = new ArrayList(); for (Variable variable : getHost().getVariables()) { - final IVariable var = (IVariable)factory.adapt(variable, IVariable.class); - if (var != null) { - res.add(var); - } else { - throw new IllegalStateException("can't addapt Variable to IVariable."); + synchronized(variable) { + final IVariable var = (IVariable)factory.adapt(variable, IVariable.class); + if (var != null) { + res.add(var); + } else { + throw new IllegalStateException("can't addapt Variable to IVariable."); + } } } @@ -232,7 +241,23 @@ public boolean hasVariables() throws DebugException { * @see org.eclipse.debug.core.model.IStackFrame#getLineNumber() */ public int getLineNumber() throws DebugException { - return -1; + final EObject context = getContext(); + int result = -1; + for (ILocator locator : Activator.getDefault().retrieveLocators()) { + final ILocator.Location location = locator.getLocation(context); + switch (location.type) { + case XTEXT_LOCATION: + result = (Integer)location.data; + break; + default: + break; + } + if (result != -1) { + break; + } + } + + return result; } /** @@ -262,8 +287,12 @@ public String getName() throws DebugException { return getHost().getName(); } + /** + * {@inheritDoc} Unused method. + * + * @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups() + */ public IRegisterGroup[] getRegisterGroups() throws DebugException { - // TODO Auto-generated method stub return null; } diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLThreadAdapter.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLThreadAdapter.java similarity index 89% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLThreadAdapter.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLThreadAdapter.java index aeee9790d..0e417a2f2 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLThreadAdapter.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLThreadAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,20 +8,20 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter; - -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.State; -import fr.obeo.dsl.debug.Thread; -import fr.obeo.dsl.debug.ThreadUtils; -import fr.obeo.dsl.debug.ide.DSLBreakpoint; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; -import fr.obeo.dsl.debug.ide.event.model.ResumeRequest; -import fr.obeo.dsl.debug.ide.event.model.StepIntoRequest; -import fr.obeo.dsl.debug.ide.event.model.StepOverRequest; -import fr.obeo.dsl.debug.ide.event.model.StepReturnRequest; -import fr.obeo.dsl.debug.ide.event.model.SuspendRequest; -import fr.obeo.dsl.debug.ide.event.model.TerminateRequest; +package org.eclipse.gemoc.dsl.debug.ide.adapter; + +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.State; +import org.eclipse.gemoc.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.ThreadUtils; +import org.eclipse.gemoc.dsl.debug.ide.DSLBreakpoint; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ResumeRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepIntoRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepOverRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepReturnRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.SuspendRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.TerminateRequest; import java.util.ArrayList; import java.util.List; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLVariableAdapter.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLVariableAdapter.java similarity index 91% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLVariableAdapter.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLVariableAdapter.java index 922858fac..dba7550ab 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/DSLVariableAdapter.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/DSLVariableAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,13 +8,13 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter; +package org.eclipse.gemoc.dsl.debug.ide.adapter; -import fr.obeo.dsl.debug.ThreadUtils; -import fr.obeo.dsl.debug.Variable; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; -import fr.obeo.dsl.debug.ide.event.model.SetVariableValueRequest; -import fr.obeo.dsl.debug.ide.event.model.ValidateVariableValueRequest; +import org.eclipse.gemoc.dsl.debug.ThreadUtils; +import org.eclipse.gemoc.dsl.debug.Variable; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.event.model.SetVariableValueRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ValidateVariableValueRequest; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IValue; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/IDSLCurrentInstructionListener.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/IDSLCurrentInstructionListener.java similarity index 91% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/IDSLCurrentInstructionListener.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/IDSLCurrentInstructionListener.java index 9ceaf06d5..5ace86f67 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/IDSLCurrentInstructionListener.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/IDSLCurrentInstructionListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter; +package org.eclipse.gemoc.dsl.debug.ide.adapter; -import fr.obeo.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.StackFrame; /** * A listener notified when a {@link DSLDebugTargetAdapter} current instructions are changed. diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/ILocator.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/ILocator.java new file mode 100644 index 000000000..75b55cbcf --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/ILocator.java @@ -0,0 +1,96 @@ +package org.eclipse.gemoc.dsl.debug.ide.adapter; + +import org.eclipse.emf.ecore.EObject; + +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. 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: Obeo - initial API and implementation + *******************************************************************************/ + +/** + * a. + * + * @author Yvan Lussaud + */ +public interface ILocator { + + /** + * The type locator (either xtext or sirius). + * + * @author Yvan Lussaud + */ + enum Type { + /** + * Xtext locator type. + */ + XTEXT_LOCATION("Xtext"), + + /** + * Sirius locator type. + */ + SIRIUS_LOCATION("Sirius"); + + /** + * Name of the locator type. + */ + private final String typeName; + + /** + * Constructs a locator type based on a type name. + * + * @param typeName + * The locator type name. + */ + Type(final String typeName) { + this.typeName = typeName; + } + + public String getTypeName() { + return typeName; + } + } + + /** + * Gets the location of a given model element. + * + * @param eObject + * The model element. + * @return The location (eg. the file and line number). + */ + Location getLocation(EObject eObject); + + /** + * The location of a model element (eg. in an xmi or xtext file). + * + * @author Yvan Lussaud + */ + class Location { + + /** + * The location type. + */ + final Type type; + + /** + * The location data (depends on the type). + */ + final Object data; + + /** + * Constructs a location based on type anf location data. + * + * @param type + * The location type. + * @param data + * The location data. + */ + public Location(final Type type, final Object data) { + this.type = type; + this.data = data; + } + } +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/AbstractDSLValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/AbstractDSLValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/AbstractDSLValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/AbstractDSLValue.java index f2d5b3f56..7d8e5bed4 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/AbstractDSLValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/AbstractDSLValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; -import fr.obeo.dsl.debug.ide.adapter.AbstractDSLDebugElementAdapter; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.adapter.AbstractDSLDebugElementAdapter; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IValue; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLArrayValue.java similarity index 95% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLArrayValue.java index 5c468d10a..e51af86fb 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; import java.util.Arrays; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLBooleanArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLBooleanArrayValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLBooleanArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLBooleanArrayValue.java index 199356e3b..2949b6fea 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLBooleanArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLBooleanArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; /** * Array of boolean {@link org.eclipse.debug.core.model.IValue IValue}. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLByteArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLByteArrayValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLByteArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLByteArrayValue.java index 7eac2b9ee..f9d69a51a 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLByteArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLByteArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; /** * Array of byte {@link org.eclipse.debug.core.model.IValue IValue}. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLCharArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLCharArrayValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLCharArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLCharArrayValue.java index ff4ce1ae4..1b095cdb0 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLCharArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLCharArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; /** * Array of char {@link org.eclipse.debug.core.model.IValue IValue}. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLDoubleArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLDoubleArrayValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLDoubleArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLDoubleArrayValue.java index a4a076876..d57e892ac 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLDoubleArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLDoubleArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; /** * Array of double {@link org.eclipse.debug.core.model.IValue IValue}. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLEObjectValueAdapter.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLEObjectValueAdapter.java similarity index 94% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLEObjectValueAdapter.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLEObjectValueAdapter.java index 1694e71c1..fc2d1bbcf 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLEObjectValueAdapter.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLEObjectValueAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IValue; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLFloatArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLFloatArrayValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLFloatArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLFloatArrayValue.java index 30bfe9449..2b324191e 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLFloatArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLFloatArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; /** * Array of float {@link org.eclipse.debug.core.model.IValue IValue}. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLIntArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLIntArrayValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLIntArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLIntArrayValue.java index dc4ba97ac..ba2ad5baa 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLIntArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLIntArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; /** * Array of int {@link org.eclipse.debug.core.model.IValue IValue}. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLLongArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLLongArrayValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLLongArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLLongArrayValue.java index a375fb113..e5c2c73e3 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLLongArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLLongArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; /** * Array of long {@link org.eclipse.debug.core.model.IValue IValue}. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLNullValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLNullValue.java similarity index 91% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLNullValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLNullValue.java index cac4f4c4b..9c3e02b55 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLNullValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLNullValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IVariable; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLObjectValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLObjectValue.java similarity index 92% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLObjectValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLObjectValue.java index 83f230014..bb2edadbf 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLObjectValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLObjectValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IVariable; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLShortArrayValue.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLShortArrayValue.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLShortArrayValue.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLShortArrayValue.java index 7ff298827..065141cb4 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/value/DSLShortArrayValue.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/value/DSLShortArrayValue.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,9 +8,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.value; +package org.eclipse.gemoc.dsl.debug.ide.adapter.value; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; /** * Array of short {@link org.eclipse.debug.core.model.IValue IValue}. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/variable/DSLObjectVariable.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/variable/DSLObjectVariable.java similarity index 93% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/variable/DSLObjectVariable.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/variable/DSLObjectVariable.java index b90d4e14c..30e8c0e93 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/adapter/variable/DSLObjectVariable.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/adapter/variable/DSLObjectVariable.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.adapter.variable; +package org.eclipse.gemoc.dsl.debug.ide.adapter.variable; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; -import fr.obeo.dsl.debug.ide.adapter.AbstractDSLDebugElementAdapter; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.adapter.AbstractDSLDebugElementAdapter; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IValue; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/DSLDebugEventDispatcher.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/DSLDebugEventDispatcher.java similarity index 86% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/DSLDebugEventDispatcher.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/DSLDebugEventDispatcher.java index c4ac55563..8a169556d 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/DSLDebugEventDispatcher.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/DSLDebugEventDispatcher.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,12 +8,12 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event; +package org.eclipse.gemoc.dsl.debug.ide.event; -import fr.obeo.dsl.debug.ide.IDSLDebugger; -import fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter; -import fr.obeo.dsl.debug.ide.event.debugger.IDSLDebuggerReply; -import fr.obeo.dsl.debug.ide.event.model.IDSLModelRequest; +import org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.IDSLDebuggerReply; +import org.eclipse.gemoc.dsl.debug.ide.event.model.IDSLModelRequest; import java.util.ArrayList; import java.util.List; @@ -100,7 +100,7 @@ protected IStatus run(IProgressMonitor monitor) { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent) + * @see org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent) */ public Object handleEvent(final IDSLDebugEvent event) { final Object res; diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/IDSLDebugEvent.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/IDSLDebugEvent.java new file mode 100644 index 000000000..3570b616a --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/IDSLDebugEvent.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event; + +/** + * Communication events between the {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger debugger} and the + * {@link org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter debug target}. + * + * @author Yvan Lussaud + */ +public interface IDSLDebugEvent { + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/IDSLDebugEventProcessor.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/IDSLDebugEventProcessor.java similarity index 91% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/IDSLDebugEventProcessor.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/IDSLDebugEventProcessor.java index 3b30063a9..cb4f4041d 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/IDSLDebugEventProcessor.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/IDSLDebugEventProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event; +package org.eclipse.gemoc.dsl.debug.ide.event; /** diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/AbstractThreadReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/AbstractThreadReply.java new file mode 100644 index 000000000..2abae7c62 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/AbstractThreadReply.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; + +/** + * A {@link org.eclipse.gemoc.dsl.debug.Thread thread} contextual {@link IDSLDebuggerReply reply}. + * + * @author Yvan Lussaud + */ +public abstract class AbstractThreadReply implements IDSLDebuggerReply { + + /** + * The {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name}. + */ + private final String threadName; + + /** + * Constructor. + * + * @param threadName + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + */ + public AbstractThreadReply(String threadName) { + this.threadName = threadName; + } + + /** + * Gets the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name}. + * + * @return the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + */ + public String getThreadName() { + return threadName; + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/AbstractVariableReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/AbstractVariableReply.java new file mode 100644 index 000000000..5fe60bf44 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/AbstractVariableReply.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; + +/** + * A {@link org.eclipse.gemoc.dsl.debug.Varaible variable} contextual {@link IDSLDebuggerReply reply}. + * + * @author Yvan Lussaud + */ +public abstract class AbstractVariableReply extends AbstractThreadReply { + + /** + * The {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack frame name}. + */ + private final String stackName; + + /** + * The variable name. + */ + private final String variableName; + + /** + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. + * + * @param threadName + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + * @param stackName + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack frame name} + * @param variableName + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} + */ + public AbstractVariableReply(String threadName, String stackName, String variableName) { + super(threadName); + this.stackName = stackName; + this.variableName = variableName; + } + + /** + * Gets the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack frame name}. + * + * @return the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack frame name} + */ + public String getStackName() { + return stackName; + } + + /** + * Gets the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name}. + * + * @return the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} + */ + public String getVariableName() { + return variableName; + } + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/BreakpointReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/BreakpointReply.java similarity index 81% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/BreakpointReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/BreakpointReply.java index be17600aa..b90563729 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/BreakpointReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/BreakpointReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** @@ -22,7 +22,7 @@ public class BreakpointReply extends SuspendedReply { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public BreakpointReply(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/DeleteVariableReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/DeleteVariableReply.java similarity index 81% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/DeleteVariableReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/DeleteVariableReply.java index 0573ea9d1..cb0e5db36 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/DeleteVariableReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/DeleteVariableReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** * Reply sent when the thread has to delete a variable. @@ -23,10 +23,10 @@ public class DeleteVariableReply extends AbstractThreadReply { private final String name; /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param name * the variable name */ diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/IDSLDebuggerReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/IDSLDebuggerReply.java new file mode 100644 index 000000000..996a71203 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/IDSLDebuggerReply.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; + +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent; + +/** + * An {@link IDSLDebugEvent debugger event} from the {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger debugger} to + * the {@link org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter debug target}. + * + * @author Yvan Lussaud + */ +public interface IDSLDebuggerReply extends IDSLDebugEvent { + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/PopStackFrameReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/PopStackFrameReply.java similarity index 76% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/PopStackFrameReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/PopStackFrameReply.java index 2e4d690b5..8a2fcfbff 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/PopStackFrameReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/PopStackFrameReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** @@ -19,10 +19,10 @@ public class PopStackFrameReply extends AbstractThreadReply { /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public PopStackFrameReply(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/PushStackFrameReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/PushStackFrameReply.java similarity index 90% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/PushStackFrameReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/PushStackFrameReply.java index 27c70dd22..e4d26efb8 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/PushStackFrameReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/PushStackFrameReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; import org.eclipse.emf.ecore.EObject; @@ -40,10 +40,10 @@ public class PushStackFrameReply extends AbstractThreadReply { private final boolean canStepInto; /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param name * the stack frame name * @param context diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/ResumingReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/ResumingReply.java similarity index 76% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/ResumingReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/ResumingReply.java index d2307c010..811c82900 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/ResumingReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/ResumingReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** * Reply sent when the thread is resumed by a client request. @@ -18,10 +18,10 @@ public class ResumingReply extends AbstractThreadReply { /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public ResumingReply(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SetCurrentInstructionReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SetCurrentInstructionReply.java similarity index 87% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SetCurrentInstructionReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SetCurrentInstructionReply.java index be25731a8..ae0566774 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SetCurrentInstructionReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SetCurrentInstructionReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; import org.eclipse.emf.ecore.EObject; @@ -30,10 +30,10 @@ public class SetCurrentInstructionReply extends AbstractThreadReply { private final boolean canStepInto; /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param instruction * the current instruction * @param canStepInto diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SetVariableValueReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SetVariableValueReply.java new file mode 100644 index 000000000..054deaac7 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SetVariableValueReply.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; + +/** + * Reply sent when the value of a variable has been changed after a request. + * + * @author Yvan Lussaud + */ +public class SetVariableValueReply extends AbstractVariableReply { + + /** + * The value to set. + */ + Object value; + + /** + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. + * + * @param threadName + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + * @param stackName + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack frame name} + * @param variableName + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} + * @param value + * the value to set + */ + public SetVariableValueReply(String threadName, String stackName, String variableName, Object value) { + super(threadName, stackName, variableName); + this.value = value; + } + + /** + * Gets the value to set. + * + * @return the value to set + */ + public Object getValue() { + return value; + } +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SpawnRunningThreadReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SpawnRunningThreadReply.java similarity index 87% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SpawnRunningThreadReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SpawnRunningThreadReply.java index 74f885aa3..f8292993c 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SpawnRunningThreadReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SpawnRunningThreadReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; import org.eclipse.emf.ecore.EObject; @@ -28,7 +28,7 @@ public class SpawnRunningThreadReply extends AbstractThreadReply { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param context * the {@link EObject} representing the current context of the thread */ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepIntoResumingReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepIntoResumingReply.java similarity index 76% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepIntoResumingReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepIntoResumingReply.java index 05c4bde0a..db8a3c55f 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepIntoResumingReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepIntoResumingReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** * Reply sent when the thread is resumed by a step into. @@ -18,10 +18,10 @@ public class StepIntoResumingReply extends ResumingReply { /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public StepIntoResumingReply(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepOverResumingReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepOverResumingReply.java similarity index 76% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepOverResumingReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepOverResumingReply.java index 89fd48f52..16ed67d89 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepOverResumingReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepOverResumingReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** * Reply sent when the thread is resumed by a step over. @@ -18,10 +18,10 @@ public class StepOverResumingReply extends ResumingReply { /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public StepOverResumingReply(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepReturnResumingReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepReturnResumingReply.java similarity index 76% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepReturnResumingReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepReturnResumingReply.java index 64bbd2d35..a84801e6a 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/StepReturnResumingReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/StepReturnResumingReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** * Reply sent when the thread is resumed by a step return. @@ -18,10 +18,10 @@ public class StepReturnResumingReply extends ResumingReply { /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public StepReturnResumingReply(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SteppedReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SteppedReply.java similarity index 81% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SteppedReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SteppedReply.java index 7cf00f475..d5ec268a0 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SteppedReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SteppedReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** @@ -22,7 +22,7 @@ public class SteppedReply extends SuspendedReply { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public SteppedReply(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SuspendedReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SuspendedReply.java similarity index 82% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SuspendedReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SuspendedReply.java index f894f7d0a..26001e608 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/SuspendedReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/SuspendedReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** @@ -22,7 +22,7 @@ public class SuspendedReply extends AbstractThreadReply { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public SuspendedReply(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/TerminatedReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/TerminatedReply.java new file mode 100644 index 000000000..28a159499 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/TerminatedReply.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; + + +/** + * Reply sent when the debugger or a thread is terminated. + * + * @author Yvan Lussaud + */ +public class TerminatedReply extends AbstractThreadReply { + + /** + * Constructor for {@link org.eclipse.gemoc.dsl.debug.DebugTarget DebugTarget}. + */ + public TerminatedReply() { + this(null); + } + + /** + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. + * + * @param threadName + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + */ + public TerminatedReply(String threadName) { + super(threadName); + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/ValidateVariableValueReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/ValidateVariableValueReply.java new file mode 100644 index 000000000..791076c9f --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/ValidateVariableValueReply.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; + +/** + * Reply sent when the thread has a new variable. + * + * @author Yvan Lussaud + */ +public class ValidateVariableValueReply extends AbstractVariableReply { + + /** + * Tells if the value is valid. + */ + boolean valid; + + /** + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. + * + * @param threadName + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + * @param stackName + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack frame name} + * @param variableName + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} + * @param valid + * tells if the value is valid + */ + public ValidateVariableValueReply(String threadName, String stackName, String variableName, boolean valid) { + super(threadName, stackName, variableName); + this.valid = valid; + } + + /** + * Tells if the value is valid. + * + * @return true if the value is valid, false otherwise + */ + public boolean isValid() { + return valid; + } +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/VariableReply.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/VariableReply.java similarity index 85% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/VariableReply.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/VariableReply.java index 7ec3bcc4c..f58139927 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/debugger/VariableReply.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/debugger/VariableReply.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.debugger; +package org.eclipse.gemoc.dsl.debug.ide.event.debugger; /** * Reply sent when the thread has a new variable. @@ -33,12 +33,12 @@ public class VariableReply extends AbstractVariableReply { private final boolean supportModifications; /** - * Constructor for {@link fr.obeo.dsl.debug.Thread Thread}. + * Constructor for {@link org.eclipse.gemoc.dsl.debug.Thread Thread}. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param stackName - * the {@link fr.obeo.dsl.debug.StackFrame#getName() stack frame name} + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack frame name} * @param declarationTypeName * the declaration type name * @param variableName diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractBreakpointRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractBreakpointRequest.java similarity index 92% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractBreakpointRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractBreakpointRequest.java index d46b6629d..0df8101fd 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractBreakpointRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractBreakpointRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; import org.eclipse.emf.common.util.URI; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractStepRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractStepRequest.java similarity index 89% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractStepRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractStepRequest.java index 1cf21564f..2bfa5dee5 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AbstractStepRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractStepRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; import org.eclipse.emf.ecore.EObject; @@ -29,7 +29,7 @@ public abstract class AbstractStepRequest extends AbstractThreadRequest { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param instruction * the {@link EObject} representing the current instruction */ diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractThreadRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractThreadRequest.java new file mode 100644 index 000000000..e8f433478 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractThreadRequest.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.model; + +/** + * A {@link org.eclipse.gemoc.dsl.debug.Thread thread} contextual {@link IDSLModelRequest request}. + * + * @author Yvan Lussaud + */ +public abstract class AbstractThreadRequest implements IDSLModelRequest { + + /** + * The {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name}. + */ + private final String threadName; + + /** + * Constructor. + * + * @param threadName + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + */ + public AbstractThreadRequest(String threadName) { + this.threadName = threadName; + } + + /** + * Gets the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name}. + * + * @return the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + */ + public String getThreadName() { + return threadName; + } + +} diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractVariableRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractVariableRequest.java new file mode 100644 index 000000000..8ef524006 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AbstractVariableRequest.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.model; + +/** + * A {@link org.eclipse.gemoc.dsl.debug.Thread thread} contextual {@link IDSLModelRequest request}. + * + * @author Yvan Lussaud + */ +public abstract class AbstractVariableRequest extends AbstractThreadRequest { + + /** + * The {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack name}. + */ + private final String stackName; + + /** + * The {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name}. + */ + private final String variableName; + + /** + * Constructor. + * + * @param threadName + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} + * @param stackName + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() thread name} + * @param variableName + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} + */ + public AbstractVariableRequest(String threadName, String stackName, String variableName) { + super(threadName); + this.stackName = stackName; + this.variableName = variableName; + } + + /** + * Gets the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack name}. + * + * @return the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() stack name} + */ + public String getStackName() { + return stackName; + } + + /** + * Gets the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name}. + * + * @return the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} + */ + public String getVariableName() { + return variableName; + } + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AddBreakpointRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AddBreakpointRequest.java similarity index 91% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AddBreakpointRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AddBreakpointRequest.java index 91d5fb831..f86271c8f 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/AddBreakpointRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/AddBreakpointRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; import org.eclipse.emf.common.util.URI; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ChangeBreakPointRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ChangeBreakPointRequest.java similarity index 94% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ChangeBreakPointRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ChangeBreakPointRequest.java index dd038c9b6..5417868e4 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ChangeBreakPointRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ChangeBreakPointRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; import java.io.Serializable; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/DisconnectRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/DisconnectRequest.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/DisconnectRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/DisconnectRequest.java index a2ef0b5ff..91048ac19 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/DisconnectRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/DisconnectRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; /** * Request sent to disconnect from the debugger. diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/IDSLModelRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/IDSLModelRequest.java new file mode 100644 index 000000000..973e88be3 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/IDSLModelRequest.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.event.model; + +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent; + +/** + * An {@link IDSLDebugEvent debugger event} from the + * {@link org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter debug target} to the + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger debugger}. + * + * @author Yvan Lussaud + */ +public interface IDSLModelRequest extends IDSLDebugEvent { + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/RemoveBreakpointRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/RemoveBreakpointRequest.java similarity index 91% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/RemoveBreakpointRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/RemoveBreakpointRequest.java index 67945ada2..bbd1ba379 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/RemoveBreakpointRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/RemoveBreakpointRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; import org.eclipse.emf.common.util.URI; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ResumeRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ResumeRequest.java similarity index 84% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ResumeRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ResumeRequest.java index f8e58f90c..50700a381 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ResumeRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ResumeRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; /** * Request sent to resume the execution of a thread or the debugger. @@ -28,7 +28,7 @@ public ResumeRequest() { * Constructor for thread. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public ResumeRequest(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/SetVariableValueRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/SetVariableValueRequest.java similarity index 77% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/SetVariableValueRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/SetVariableValueRequest.java index b64d11827..411e2698a 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/SetVariableValueRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/SetVariableValueRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; /** * Request sent to set a variable value. @@ -26,11 +26,11 @@ public class SetVariableValueRequest extends AbstractVariableRequest { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param stackName - * the {@link fr.obeo.dsl.debug.StackFrame#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() thread name} * @param variableName - * the {@link fr.obeo.dsl.debug.Variable#getName() variable name} + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} * @param value * the value to validate */ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StartRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StartRequest.java similarity index 88% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StartRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StartRequest.java index 6f3b98dc6..402d99178 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StartRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StartRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; /** * Request sent to start the debugger. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepIntoRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepIntoRequest.java similarity index 85% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepIntoRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepIntoRequest.java index 8262165f6..f44f57e67 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepIntoRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepIntoRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; import org.eclipse.emf.ecore.EObject; @@ -23,7 +23,7 @@ public class StepIntoRequest extends AbstractStepRequest { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param instruction * the {@link EObject} representing the current instruction */ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepOverRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepOverRequest.java similarity index 85% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepOverRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepOverRequest.java index 11a7d3ea2..a5b2dc2ec 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepOverRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepOverRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; import org.eclipse.emf.ecore.EObject; @@ -23,7 +23,7 @@ public class StepOverRequest extends AbstractStepRequest { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param instruction * the {@link EObject} representing the current instruction */ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepReturnRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepReturnRequest.java similarity index 85% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepReturnRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepReturnRequest.java index 73439f0f2..d4ea62ca7 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/StepReturnRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/StepReturnRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; import org.eclipse.emf.ecore.EObject; @@ -23,7 +23,7 @@ public class StepReturnRequest extends AbstractStepRequest { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param instruction * the {@link EObject} representing the current instruction */ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/SuspendRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/SuspendRequest.java similarity index 84% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/SuspendRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/SuspendRequest.java index 5da780de7..3c93745dd 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/SuspendRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/SuspendRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; /** * Request sent to suspend the execution of a thread or the debugger. @@ -28,7 +28,7 @@ public SuspendRequest() { * Constructor for thread. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public SuspendRequest(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/TerminateRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/TerminateRequest.java similarity index 84% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/TerminateRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/TerminateRequest.java index d41f85ccb..e48469fa0 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/TerminateRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/TerminateRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; /** * Request sent to terminate the execution of a thread or the debugger. @@ -28,7 +28,7 @@ public TerminateRequest() { * Constructor for thread. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} */ public TerminateRequest(String threadName) { super(threadName); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ValidateVariableValueRequest.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ValidateVariableValueRequest.java similarity index 77% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ValidateVariableValueRequest.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ValidateVariableValueRequest.java index 7615ff58e..6f22a177e 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/src/fr/obeo/dsl/debug/ide/event/model/ValidateVariableValueRequest.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/event/model/ValidateVariableValueRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.event.model; +package org.eclipse.gemoc.dsl.debug.ide.event.model; /** * Request sent to validate a variable value. @@ -26,11 +26,11 @@ public class ValidateVariableValueRequest extends AbstractVariableRequest { * Constructor. * * @param threadName - * the {@link fr.obeo.dsl.debug.Thread#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.Thread#getName() thread name} * @param stackName - * the {@link fr.obeo.dsl.debug.StackFrame#getName() thread name} + * the {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName() thread name} * @param variableName - * the {@link fr.obeo.dsl.debug.Variable#getName() variable name} + * the {@link org.eclipse.gemoc.dsl.debug.Variable#getName() variable name} * @param value * the value to set */ diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/launch/AbstractDSLLaunchConfigurationDelegate.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/launch/AbstractDSLLaunchConfigurationDelegate.java new file mode 100644 index 000000000..120350431 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.ide/src/org/eclipse/gemoc/dsl/debug/ide/launch/AbstractDSLLaunchConfigurationDelegate.java @@ -0,0 +1,219 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.launch; + +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; +import org.eclipse.gemoc.dsl.debug.ide.Activator; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger; +import org.eclipse.gemoc.dsl.debug.ide.ModelUpdater; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter; +import org.eclipse.gemoc.dsl.debug.ide.adapter.IDSLCurrentInstructionListener; +import org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +/** + * An abstract implementation of {@link ILaunchConfigurationDelegate} for DSL debugger. + * + * @author Yvan Lussaud + */ +public abstract class AbstractDSLLaunchConfigurationDelegate implements ILaunchConfigurationDelegate { + + /** + * The {@link org.eclipse.emf.ecore.resource.Resource Resource} + * {@link org.eclipse.emf.ecore.resource.Resource#getURI() URI}. + */ + public static final String RESOURCE_URI = "Resource"; + + /** + * The {@link EObject} {@link org.eclipse.emf.ecore.util.EcoreUtil#getURI(EObject) URI}. + */ + public static final String FIRST_INSTRUCTION_URI = "First Instruction"; + + /** + * {@inheritDoc} + * + * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, + * java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor) + */ + public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, + IProgressMonitor monitor) throws CoreException { + launch(getFirstInstruction(configuration), configuration, mode, launch, monitor); + } + + /** + * Launches the execution for the given first {@link EObject instruction}. + * + * @param firstInstruction + * the first {@link EObject instruction} + * @param configuration + * the {@link ILaunchConfiguration} + * @param mode + * the launch mode + * @param launch + * the {@link ILaunchConfiguration} + * @param monitor + * the {@link IProgressMonitor} + * @throws CoreException + * if execution fails + */ + protected void launch(EObject firstInstruction, ILaunchConfiguration configuration, String mode, + ILaunch launch, IProgressMonitor monitor) throws CoreException { + if (ILaunchManager.DEBUG_MODE.equals(mode)) { + DebugTarget eDebugTarget = DebugTargetUtils.createDebugTarget(getDebugTargetName( + configuration, firstInstruction), firstInstruction); + + DSLDebugEventDispatcher dispatcher = new DSLDebugEventDispatcher(); + // Connect the model to the dispatcher + DSLEclipseDebugIntegration integration = new DSLEclipseDebugIntegration(getModelIdentifier(), + launch, eDebugTarget, new ModelUpdater(), dispatcher); + final DSLDebugTargetAdapter debugTarget = integration.getDebugTarget(eDebugTarget); + dispatcher.setModel(debugTarget); + + // add current instruction listeners + for (IDSLCurrentInstructionListener listener : getCurrentInstructionListeners()) { + debugTarget.addCurrentInstructionListener(listener); + } + + // Connect the debugger to the dispatcher + IDSLDebugger debugger = getDebugger(configuration, dispatcher, firstInstruction, monitor); + dispatcher.setDebugger(debugger); + + launch.addDebugTarget(debugTarget); + + Job job = new Job(getDebugJobName(configuration, firstInstruction)) { + + @Override + protected IStatus run(IProgressMonitor monitor) { + debugTarget.start(); + return new Status(IStatus.OK, getPluginID(), "Execution was successfull"); + } + }; + job.schedule(); + } + } + + /** + * Gets the first {@link EObject instruction}. + * + * @param configuration + * the {@link ILaunchConfiguration} + * @return the first {@link EObject instruction} + */ + protected EObject getFirstInstruction(ILaunchConfiguration configuration) { + EObject res = null; + final ResourceSet rs = getResourceSet(); + + try { + rs.getResource(URI.createPlatformResourceURI(configuration.getAttribute(RESOURCE_URI, ""), + true), true); + res = rs.getEObject(URI.createURI(configuration.getAttribute(FIRST_INSTRUCTION_URI, ""), + true), true); + } catch (CoreException e) { + Activator.getDefault().error(e); + } + + return res; + } + + /** + * Gets the {@link ResourceSet} for {@link org.eclipse.emf.ecore.resource.Resource Resource} loading. + * + * @return the {@link ResourceSet} for {@link org.eclipse.emf.ecore.resource.Resource Resource} + * loading + */ + protected ResourceSet getResourceSet() { + return new ResourceSetImpl(); + } + + /** + * Gets the {@link List} of {@link IDSLCurrentInstructionListener} to add to the created + * {@link DSLDebugTargetAdapter}. + * + * @return the {@link List} of {@link IDSLCurrentInstructionListener} to add to the created + * {@link DSLDebugTargetAdapter} + */ + protected List getCurrentInstructionListeners() { + return new ArrayList(); + } + + /** + * Gets the {@link IDSLDebugger} to be {@link IDSLDebugger#start() started}. + * + * @param configuration + * the {@link ILaunchConfiguration} + * @param dispatcher + * the {@link DSLDebugEventDispatcher} to communicates with the {@link DebugTarget} + * @param firstInstruction + * the first {@link EObject instruction} + * @param monitor + * hte {@link IProgressMonitor} + * @return the {@link IDSLDebugger} to be {@link IDSLDebugger#start() started} + */ + protected abstract IDSLDebugger getDebugger(ILaunchConfiguration configuration, + DSLDebugEventDispatcher dispatcher, EObject firstInstruction, IProgressMonitor monitor); + + /** + * Gets the {@link DebugTarget}'s {@link DebugTarget#getName() name}. + * + * @param configuration + * the {@link ILaunchConfiguration} + * @param firstInstruction + * the first {@link EObject instruction} + * @return the {@link DebugTarget}'s {@link DebugTarget#getName() name} + */ + protected abstract String getDebugTargetName(ILaunchConfiguration configuration, + EObject firstInstruction); + + /** + * Gets the debug {@link Job}'s {@link DebugTarget#getName() name}. + * + * @param configuration + * the {@link ILaunchConfiguration} + * @param firstInstruction + * the first {@link EObject instruction} + * @return the debug {@link Job}'s {@link DebugTarget#getName() name} + */ + protected abstract String getDebugJobName(ILaunchConfiguration configuration, + EObject firstInstruction); + + /** + * Gets the current plug-in ID. + * + * @return the current plug-in ID + */ + protected abstract String getPluginID(); + + /** + * Gets the debug model identifier. + * + * @return the debug model identifier + */ + public abstract String getModelIdentifier(); + +} diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/.checkstyle b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.checkstyle similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/.checkstyle rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.checkstyle diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/.classpath b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.classpath similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/.classpath rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.classpath diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.project b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.project new file mode 100644 index 000000000..68e26ece9 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.project @@ -0,0 +1,35 @@ + + + org.eclipse.gemoc.dsl.debug + + + + + + org.eclipse.jdt.core.javabuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + fr.obeo.dsl.viewpoint.nature.modelingproject + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + org.eclipse.pde.PluginNature + + diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.settings/org.eclipse.jdt.core.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.settings/org.eclipse.jdt.core.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.settings/org.eclipse.jdt.core.prefs diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/.settings/org.eclipse.jdt.ui.prefs b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/.settings/org.eclipse.jdt.ui.prefs rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/.settings/org.eclipse.jdt.ui.prefs diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/META-INF/MANIFEST.MF b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/META-INF/MANIFEST.MF new file mode 100644 index 000000000..66d369c44 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.dsl.debug;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.eclipse.gemoc.dsl.debug, + org.eclipse.gemoc.dsl.debug.impl, + org.eclipse.gemoc.dsl.debug.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/about.html b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/about.html similarity index 100% rename from simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/about.html rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/about.html diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/build.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/build.properties new file mode 100644 index 000000000..9ed9a1ef0 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/,\ + src/ +output.. = bin/ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/model/EMF_debug_model.png b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/model/EMF_debug_model.png similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/model/EMF_debug_model.png rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/model/EMF_debug_model.png diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/model/debug.ecore b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/model/debug.ecore similarity index 99% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/model/debug.ecore rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/model/debug.ecore index a012e10d7..d7b77fd86 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/model/debug.ecore +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/model/debug.ecore @@ -1,6 +1,6 @@ + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="debug" nsURI="http://eclipse.org/gemoc/dsl/debug" nsPrefix="debug">
diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/model/debug.genmodel b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/model/debug.genmodel similarity index 89% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/model/debug.genmodel rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/model/debug.genmodel index b3c4bb3d6..be231f61d 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/model/debug.genmodel +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/model/debug.genmodel @@ -1,12 +1,14 @@ + modelDirectory="/org.eclipse.gemoc.dsl.debug/src-gen" editDirectory="/org.eclipse.gemoc.dsl.debug.edit/src-gen" + editorDirectory="/org.eclipse.gemoc.dsl.debug.editor/src-gen" modelPluginID="org.eclipse.gemoc.dsl.debug" + modelName="Debug" editPluginClass="org.eclipse.gemoc.dsl.debug.provider.DebugEditPlugin" + testsDirectory="/org.eclipse.gemoc.dsl.debug.tests/src-gen" importerID="org.eclipse.emf.importer.ecore" + complianceLevel="5.0" editPluginID="org.eclipse.gemoc.dsl.debug.edit" editorPluginID="org.eclipse.gemoc.dsl.debug.editor" + language=""> debug.ecore - diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/plugin.properties b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/plugin.properties new file mode 100644 index 000000000..00779aff0 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/plugin.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### + +pluginName = Debug Model +providerName = Obeo diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/plugin.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/plugin.xml new file mode 100644 index 000000000..fffd0fe50 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/plugin.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/pom.xml b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/pom.xml new file mode 100644 index 000000000..98e9a1256 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/pom.xml @@ -0,0 +1,25 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug + 2.3.0-SNAPSHOT + eclipse-plugin + diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Contextual.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Contextual.java similarity index 80% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Contextual.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Contextual.java index e3bc609d7..460b9d0cf 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/Contextual.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Contextual.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug; +package org.eclipse.gemoc.dsl.debug; import org.eclipse.emf.ecore.EObject; @@ -18,11 +18,11 @@ *

* The following features are supported: *

    - *
  • {@link fr.obeo.dsl.debug.Contextual#getContext Context}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.Contextual#getContext Context}
  • *
*

* - * @see fr.obeo.dsl.debug.DebugPackage#getContextual() + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getContextual() * @model interface="true" abstract="true" * @generated */ @@ -40,15 +40,15 @@ public interface Contextual extends EObject { * * @return the value of the 'Context' reference. * @see #setContext(EObject) - * @see fr.obeo.dsl.debug.DebugPackage#getContextual_Context() + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getContextual_Context() * @model required="true" * @generated */ EObject getContext(); /** - * Sets the value of the '{@link fr.obeo.dsl.debug.Contextual#getContext Context}' reference. - * + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Contextual#getContext Context}' + * reference. * * @param value * the new value of the 'Context' reference. diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/CurrentSession.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/CurrentSession.java similarity index 76% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/CurrentSession.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/CurrentSession.java index 1b6720c0d..f637f56e2 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/CurrentSession.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/CurrentSession.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug; +package org.eclipse.gemoc.dsl.debug; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; @@ -19,11 +19,11 @@ *

* The following features are supported: *

    - *
  • {@link fr.obeo.dsl.debug.CurrentSession#getDebugTargets Debug Targets}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.CurrentSession#getDebugTargets Debug Targets}
  • *
*

* - * @see fr.obeo.dsl.debug.DebugPackage#getCurrentSession() + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getCurrentSession() * @model * @generated */ @@ -37,11 +37,11 @@ public interface CurrentSession extends EObject { /** * Returns the value of the 'Debug Targets' containment reference list. The list contents - * are of type {@link fr.obeo.dsl.debug.DebugTarget}. {@link DebugTarget Debug targets}. + * are of type {@link org.eclipse.gemoc.dsl.debug.DebugTarget}. {@link DebugTarget Debug targets}. * * @return the value of the 'Debug Targets' containment reference list. - * @see fr.obeo.dsl.debug.DebugPackage#getCurrentSession_DebugTargets() + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getCurrentSession_DebugTargets() * @model containment="true" * @generated */ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugFactory.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugFactory.java similarity index 93% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugFactory.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugFactory.java index d966ab1dc..6af8bc580 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugFactory.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug; +package org.eclipse.gemoc.dsl.debug; import org.eclipse.emf.ecore.EFactory; @@ -16,7 +16,7 @@ * The Factory for the model. It provides a create method for each non-abstract * class of the model. * - * @see fr.obeo.dsl.debug.DebugPackage + * @see org.eclipse.gemoc.dsl.debug.DebugPackage * @generated */ public interface DebugFactory extends EFactory { @@ -32,7 +32,7 @@ public interface DebugFactory extends EFactory { * * @generated */ - DebugFactory eINSTANCE = fr.obeo.dsl.debug.impl.DebugFactoryImpl.init(); + DebugFactory eINSTANCE = org.eclipse.gemoc.dsl.debug.impl.DebugFactoryImpl.init(); /** * Returns a new object of class 'Target'. diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugPackage.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugPackage.java new file mode 100644 index 000000000..4234bf20c --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugPackage.java @@ -0,0 +1,1340 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +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 enum,
  • + *
  • and each data type
  • + *
+ * + * + * @see org.eclipse.gemoc.dsl.debug.DebugFactory + * @model kind="package" + * @generated + */ +public interface DebugPackage extends EPackage { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * The package name. + * + * @generated + */ + String eNAME = "debug"; + + /** + * The package namespace URI. + * + * @generated + */ + String eNS_URI = "http://eclipse.org/gemoc/dsl/debug"; + + /** + * The package namespace name. + * + * @generated + */ + String eNS_PREFIX = "debug"; + + /** + * The singleton instance of the package. + * + * @generated + */ + DebugPackage eINSTANCE = org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.Contextual Contextual}' class. + * + * + * @see org.eclipse.gemoc.dsl.debug.Contextual + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getContextual() + * @generated + */ + int CONTEXTUAL = 0; + + /** + * The feature id for the 'Context' reference. + * + * @generated + * @ordered + */ + int CONTEXTUAL__CONTEXT = 0; + + /** + * The number of structural features of the 'Contextual' class. + * + * @generated + * @ordered + */ + int CONTEXTUAL_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.impl.DebugTargetImpl Target}' + * class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.DebugTargetImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getDebugTarget() + * @generated + */ + int DEBUG_TARGET = 1; + + /** + * The feature id for the 'Context' reference. + * + * @generated + * @ordered + */ + int DEBUG_TARGET__CONTEXT = CONTEXTUAL__CONTEXT; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int DEBUG_TARGET__NAME = CONTEXTUAL_FEATURE_COUNT + 0; + + /** + * The feature id for the 'State' attribute. + * + * @generated + * @ordered + */ + int DEBUG_TARGET__STATE = CONTEXTUAL_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Threads' containment reference list. + * + * + * @generated + * @ordered + */ + int DEBUG_TARGET__THREADS = CONTEXTUAL_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Target' class. + * + * @generated + * @ordered + */ + int DEBUG_TARGET_FEATURE_COUNT = CONTEXTUAL_FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.impl.ThreadImpl Thread}' class. + * + * + * @see org.eclipse.gemoc.dsl.debug.impl.ThreadImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getThread() + * @generated + */ + int THREAD = 2; + + /** + * The feature id for the 'Context' reference. + * + * @generated + * @ordered + */ + int THREAD__CONTEXT = CONTEXTUAL__CONTEXT; + + /** + * The feature id for the 'Bottom Stack Frame' containment reference. + * + * @generated + * @ordered + */ + int THREAD__BOTTOM_STACK_FRAME = CONTEXTUAL_FEATURE_COUNT + 0; + + /** + * The feature id for the 'State' attribute. + * + * @generated + * @ordered + */ + int THREAD__STATE = CONTEXTUAL_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Top Stack Frame' reference. + * + * @generated + * @ordered + */ + int THREAD__TOP_STACK_FRAME = CONTEXTUAL_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int THREAD__NAME = CONTEXTUAL_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Debug Target' container reference. + * + * @generated + * @ordered + */ + int THREAD__DEBUG_TARGET = CONTEXTUAL_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Priority' attribute. + * + * @generated + * @ordered + */ + int THREAD__PRIORITY = CONTEXTUAL_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Thread' class. + * + * @generated + * @ordered + */ + int THREAD_FEATURE_COUNT = CONTEXTUAL_FEATURE_COUNT + 6; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl Stack + * Frame}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getStackFrame() + * @generated + */ + int STACK_FRAME = 3; + + /** + * The feature id for the 'Context' reference. + * + * @generated + * @ordered + */ + int STACK_FRAME__CONTEXT = CONTEXTUAL__CONTEXT; + + /** + * The feature id for the 'Variables' containment reference list. + * + * + * @generated + * @ordered + */ + int STACK_FRAME__VARIABLES = CONTEXTUAL_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Child Frame' containment reference. + * + * + * @generated + * @ordered + */ + int STACK_FRAME__CHILD_FRAME = CONTEXTUAL_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int STACK_FRAME__NAME = CONTEXTUAL_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Current Instruction' reference. + * + * @generated + * @ordered + */ + int STACK_FRAME__CURRENT_INSTRUCTION = CONTEXTUAL_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Can Step Into Current Instruction' attribute. + * + * @generated + * @ordered + */ + int STACK_FRAME__CAN_STEP_INTO_CURRENT_INSTRUCTION = CONTEXTUAL_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Parent Frame' container reference. + * + * @generated + * @ordered + */ + int STACK_FRAME__PARENT_FRAME = CONTEXTUAL_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Register Groups' containment reference list. + * + * @generated + * @ordered + */ + int STACK_FRAME__REGISTER_GROUPS = CONTEXTUAL_FEATURE_COUNT + 6; + + /** + * The number of structural features of the 'Stack Frame' class. + * + * @generated + * @ordered + */ + int STACK_FRAME_FEATURE_COUNT = CONTEXTUAL_FEATURE_COUNT + 7; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.impl.VariableImpl Variable}' + * class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.VariableImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getVariable() + * @generated + */ + int VARIABLE = 4; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int VARIABLE__NAME = 0; + + /** + * The feature id for the 'Value' attribute. + * + * @generated + * @ordered + */ + int VARIABLE__VALUE = 1; + + /** + * The feature id for the 'Value Changed' attribute. + * + * @generated + * @ordered + */ + int VARIABLE__VALUE_CHANGED = 2; + + /** + * The feature id for the 'Frame' container reference. + * + * @generated + * @ordered + */ + int VARIABLE__FRAME = 3; + + /** + * The feature id for the 'Declaration Type' attribute. + * + * @generated + * @ordered + */ + int VARIABLE__DECLARATION_TYPE = 4; + + /** + * The feature id for the 'Support Modifications' attribute. + * + * @generated + * @ordered + */ + int VARIABLE__SUPPORT_MODIFICATIONS = 5; + + /** + * The number of structural features of the 'Variable' class. + * + * @generated + * @ordered + */ + int VARIABLE_FEATURE_COUNT = 6; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.impl.CurrentSessionImpl Current + * Session}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.CurrentSessionImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getCurrentSession() + * @generated + */ + int CURRENT_SESSION = 5; + + /** + * The feature id for the 'Debug Targets' containment reference list. + * + * @generated + * @ordered + */ + int CURRENT_SESSION__DEBUG_TARGETS = 0; + + /** + * The number of structural features of the 'Current Session' class. + * + * @generated + * @ordered + */ + int CURRENT_SESSION_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.impl.RegisterGroupImpl Register + * Group}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.RegisterGroupImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getRegisterGroup() + * @generated + */ + int REGISTER_GROUP = 6; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int REGISTER_GROUP__NAME = 0; + + /** + * The feature id for the 'Registers' containment reference list. + * + * + * @generated + * @ordered + */ + int REGISTER_GROUP__REGISTERS = 1; + + /** + * The number of structural features of the 'Register Group' class. + * + * @generated + * @ordered + */ + int REGISTER_GROUP_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.impl.RegisterImpl Register}' + * class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.RegisterImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getRegister() + * @generated + */ + int REGISTER = 7; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int REGISTER__NAME = VARIABLE__NAME; + + /** + * The feature id for the 'Value' attribute. + * + * @generated + * @ordered + */ + int REGISTER__VALUE = VARIABLE__VALUE; + + /** + * The feature id for the 'Value Changed' attribute. + * + * @generated + * @ordered + */ + int REGISTER__VALUE_CHANGED = VARIABLE__VALUE_CHANGED; + + /** + * The feature id for the 'Frame' container reference. + * + * @generated + * @ordered + */ + int REGISTER__FRAME = VARIABLE__FRAME; + + /** + * The feature id for the 'Declaration Type' attribute. + * + * @generated + * @ordered + */ + int REGISTER__DECLARATION_TYPE = VARIABLE__DECLARATION_TYPE; + + /** + * The feature id for the 'Support Modifications' attribute. + * + * @generated + * @ordered + */ + int REGISTER__SUPPORT_MODIFICATIONS = VARIABLE__SUPPORT_MODIFICATIONS; + + /** + * The feature id for the 'Register Group' container reference. + * + * + * @generated + * @ordered + */ + int REGISTER__REGISTER_GROUP = VARIABLE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Register' class. + * + * @generated + * @ordered + */ + int REGISTER_FEATURE_COUNT = VARIABLE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.DebugTargetState Target State}' + * enum. + * + * @see org.eclipse.gemoc.dsl.debug.DebugTargetState + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getDebugTargetState() + * @generated + */ + int DEBUG_TARGET_STATE = 8; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.dsl.debug.State State}' enum. + * + * @see org.eclipse.gemoc.dsl.debug.State + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getState() + * @generated + */ + int STATE = 9; + + /** + * The meta object id for the 'Object' data type. + * + * @see java.lang.Object + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getObject() + * @generated + */ + int OBJECT = 10; + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.dsl.debug.Contextual Contextual}'. + * + * + * @return the meta object for class 'Contextual'. + * @see org.eclipse.gemoc.dsl.debug.Contextual + * @generated + */ + EClass getContextual(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.dsl.debug.Contextual#getContext + * Context}'. + * + * @return the meta object for the reference 'Context'. + * @see org.eclipse.gemoc.dsl.debug.Contextual#getContext() + * @see #getContextual() + * @generated + */ + EReference getContextual_Context(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.dsl.debug.DebugTarget Target}'. + * + * + * @return the meta object for class 'Target'. + * @see org.eclipse.gemoc.dsl.debug.DebugTarget + * @generated + */ + EClass getDebugTarget(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.DebugTarget#getName + * Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.dsl.debug.DebugTarget#getName() + * @see #getDebugTarget() + * @generated + */ + EAttribute getDebugTarget_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.DebugTarget#getState + * State}'. + * + * @return the meta object for the attribute 'State'. + * @see org.eclipse.gemoc.dsl.debug.DebugTarget#getState() + * @see #getDebugTarget() + * @generated + */ + EAttribute getDebugTarget_State(); + + /** + * Returns the meta object for the containment reference list + * '{@link org.eclipse.gemoc.dsl.debug.DebugTarget#getThreads Threads}'. + * + * + * @return the meta object for the containment reference list 'Threads'. + * @see org.eclipse.gemoc.dsl.debug.DebugTarget#getThreads() + * @see #getDebugTarget() + * @generated + */ + EReference getDebugTarget_Threads(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.dsl.debug.Thread Thread}'. + * + * @return the meta object for class 'Thread'. + * @see org.eclipse.gemoc.dsl.debug.Thread + * @generated + */ + EClass getThread(); + + /** + * Returns the meta object for the containment reference + * '{@link org.eclipse.gemoc.dsl.debug.Thread#getBottomStackFrame Bottom Stack Frame}'. + * + * @return the meta object for the containment reference 'Bottom Stack Frame'. + * @see org.eclipse.gemoc.dsl.debug.Thread#getBottomStackFrame() + * @see #getThread() + * @generated + */ + EReference getThread_BottomStackFrame(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.Thread#getState + * State}'. + * + * @return the meta object for the attribute 'State'. + * @see org.eclipse.gemoc.dsl.debug.Thread#getState() + * @see #getThread() + * @generated + */ + EAttribute getThread_State(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.dsl.debug.Thread#getTopStackFrame + * Top Stack Frame}'. + * + * @return the meta object for the reference 'Top Stack Frame'. + * @see org.eclipse.gemoc.dsl.debug.Thread#getTopStackFrame() + * @see #getThread() + * @generated + */ + EReference getThread_TopStackFrame(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.Thread#getName + * Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.dsl.debug.Thread#getName() + * @see #getThread() + * @generated + */ + EAttribute getThread_Name(); + + /** + * Returns the meta object for the container reference + * '{@link org.eclipse.gemoc.dsl.debug.Thread#getDebugTarget Debug Target}'. + * + * @return the meta object for the container reference 'Debug Target'. + * @see org.eclipse.gemoc.dsl.debug.Thread#getDebugTarget() + * @see #getThread() + * @generated + */ + EReference getThread_DebugTarget(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.Thread#getPriority + * Priority}'. + * + * @return the meta object for the attribute 'Priority'. + * @see org.eclipse.gemoc.dsl.debug.Thread#getPriority() + * @see #getThread() + * @generated + */ + EAttribute getThread_Priority(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.dsl.debug.StackFrame Stack + * Frame}'. + * + * @return the meta object for class 'Stack Frame'. + * @see org.eclipse.gemoc.dsl.debug.StackFrame + * @generated + */ + EClass getStackFrame(); + + /** + * Returns the meta object for the containment reference list + * '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getVariables Variables}'. + * + * @return the meta object for the containment reference list 'Variables'. + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getVariables() + * @see #getStackFrame() + * @generated + */ + EReference getStackFrame_Variables(); + + /** + * Returns the meta object for the containment reference + * '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getChildFrame Child Frame}'. + * + * @return the meta object for the containment reference 'Child Frame'. + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getChildFrame() + * @see #getStackFrame() + * @generated + */ + EReference getStackFrame_ChildFrame(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getName + * Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getName() + * @see #getStackFrame() + * @generated + */ + EAttribute getStackFrame_Name(); + + /** + * Returns the meta object for the reference + * '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getCurrentInstruction Current Instruction}'. + * + * + * @return the meta object for the reference 'Current Instruction'. + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getCurrentInstruction() + * @see #getStackFrame() + * @generated + */ + EReference getStackFrame_CurrentInstruction(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.gemoc.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction Can Step Into + * Current Instruction}'. + * + * @return the meta object for the attribute 'Can Step Into Current Instruction'. + * @see org.eclipse.gemoc.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction() + * @see #getStackFrame() + * @generated + */ + EAttribute getStackFrame_CanStepIntoCurrentInstruction(); + + /** + * Returns the meta object for the container reference + * '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getParentFrame Parent Frame}'. + * + * @return the meta object for the container reference 'Parent Frame'. + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getParentFrame() + * @see #getStackFrame() + * @generated + */ + EReference getStackFrame_ParentFrame(); + + /** + * Returns the meta object for the containment reference list + * '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getRegisterGroups Register Groups}'. + * + * @return the meta object for the containment reference list 'Register Groups'. + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getRegisterGroups() + * @see #getStackFrame() + * @generated + */ + EReference getStackFrame_RegisterGroups(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.dsl.debug.Variable Variable}'. + * + * + * @return the meta object for class 'Variable'. + * @see org.eclipse.gemoc.dsl.debug.Variable + * @generated + */ + EClass getVariable(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.Variable#getName + * Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.dsl.debug.Variable#getName() + * @see #getVariable() + * @generated + */ + EAttribute getVariable_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.Variable#getValue + * Value}'. + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.gemoc.dsl.debug.Variable#getValue() + * @see #getVariable() + * @generated + */ + EAttribute getVariable_Value(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.Variable#isValueChanged + * Value Changed}'. + * + * @return the meta object for the attribute 'Value Changed'. + * @see org.eclipse.gemoc.dsl.debug.Variable#isValueChanged() + * @see #getVariable() + * @generated + */ + EAttribute getVariable_ValueChanged(); + + /** + * Returns the meta object for the container reference + * '{@link org.eclipse.gemoc.dsl.debug.Variable#getFrame Frame}'. + * + * @return the meta object for the container reference 'Frame'. + * @see org.eclipse.gemoc.dsl.debug.Variable#getFrame() + * @see #getVariable() + * @generated + */ + EReference getVariable_Frame(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.gemoc.dsl.debug.Variable#getDeclarationType Declaration Type}'. + * + * @return the meta object for the attribute 'Declaration Type'. + * @see org.eclipse.gemoc.dsl.debug.Variable#getDeclarationType() + * @see #getVariable() + * @generated + */ + EAttribute getVariable_DeclarationType(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.gemoc.dsl.debug.Variable#isSupportModifications Support Modifications}'. + * + * + * @return the meta object for the attribute 'Support Modifications'. + * @see org.eclipse.gemoc.dsl.debug.Variable#isSupportModifications() + * @see #getVariable() + * @generated + */ + EAttribute getVariable_SupportModifications(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.dsl.debug.CurrentSession Current + * Session}'. + * + * @return the meta object for class 'Current Session'. + * @see org.eclipse.gemoc.dsl.debug.CurrentSession + * @generated + */ + EClass getCurrentSession(); + + /** + * Returns the meta object for the containment reference list + * '{@link org.eclipse.gemoc.dsl.debug.CurrentSession#getDebugTargets Debug Targets}'. + * + * @return the meta object for the containment reference list 'Debug Targets'. + * @see org.eclipse.gemoc.dsl.debug.CurrentSession#getDebugTargets() + * @see #getCurrentSession() + * @generated + */ + EReference getCurrentSession_DebugTargets(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.dsl.debug.RegisterGroup Register + * Group}'. + * + * @return the meta object for class 'Register Group'. + * @see org.eclipse.gemoc.dsl.debug.RegisterGroup + * @generated + */ + EClass getRegisterGroup(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.dsl.debug.RegisterGroup#getName + * Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.gemoc.dsl.debug.RegisterGroup#getName() + * @see #getRegisterGroup() + * @generated + */ + EAttribute getRegisterGroup_Name(); + + /** + * Returns the meta object for the containment reference list + * '{@link org.eclipse.gemoc.dsl.debug.RegisterGroup#getRegisters Registers}'. + * + * @return the meta object for the containment reference list 'Registers'. + * @see org.eclipse.gemoc.dsl.debug.RegisterGroup#getRegisters() + * @see #getRegisterGroup() + * @generated + */ + EReference getRegisterGroup_Registers(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.dsl.debug.Register Register}'. + * + * + * @return the meta object for class 'Register'. + * @see org.eclipse.gemoc.dsl.debug.Register + * @generated + */ + EClass getRegister(); + + /** + * Returns the meta object for the container reference + * '{@link org.eclipse.gemoc.dsl.debug.Register#getRegisterGroup Register Group}'. + * + * @return the meta object for the container reference 'Register Group'. + * @see org.eclipse.gemoc.dsl.debug.Register#getRegisterGroup() + * @see #getRegister() + * @generated + */ + EReference getRegister_RegisterGroup(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.dsl.debug.DebugTargetState Target + * State}'. + * + * @return the meta object for enum 'Target State'. + * @see org.eclipse.gemoc.dsl.debug.DebugTargetState + * @generated + */ + EEnum getDebugTargetState(); + + /** + * Returns the meta object for enum '{@link org.eclipse.gemoc.dsl.debug.State State}'. + * + * @return the meta object for enum 'State'. + * @see org.eclipse.gemoc.dsl.debug.State + * @generated + */ + EEnum getState(); + + /** + * Returns the meta object for data type '{@link java.lang.Object Object}'. + * + * @return the meta object for data type 'Object'. + * @see java.lang.Object + * @model instanceClass="java.lang.Object" serializeable="false" + * @generated + */ + EDataType getObject(); + + /** + * Returns the factory that creates the instances of the model. + * + * @return the factory that creates the instances of the model. + * @generated + */ + DebugFactory getDebugFactory(); + + /** + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.Contextual + * Contextual}' class. + * + * @see org.eclipse.gemoc.dsl.debug.Contextual + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getContextual() + * @generated + */ + EClass CONTEXTUAL = eINSTANCE.getContextual(); + + /** + * The meta object literal for the 'Context' reference feature. + * + * @generated + */ + EReference CONTEXTUAL__CONTEXT = eINSTANCE.getContextual_Context(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.impl.DebugTargetImpl + * Target}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.DebugTargetImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getDebugTarget() + * @generated + */ + EClass DEBUG_TARGET = eINSTANCE.getDebugTarget(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute DEBUG_TARGET__NAME = eINSTANCE.getDebugTarget_Name(); + + /** + * The meta object literal for the 'State' attribute feature. + * + * + * @generated + */ + EAttribute DEBUG_TARGET__STATE = eINSTANCE.getDebugTarget_State(); + + /** + * The meta object literal for the 'Threads' containment reference list feature. + * + * @generated + */ + EReference DEBUG_TARGET__THREADS = eINSTANCE.getDebugTarget_Threads(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.impl.ThreadImpl + * Thread}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.ThreadImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getThread() + * @generated + */ + EClass THREAD = eINSTANCE.getThread(); + + /** + * The meta object literal for the 'Bottom Stack Frame' reference feature. + * + * @generated + */ + EReference THREAD__BOTTOM_STACK_FRAME = eINSTANCE.getThread_BottomStackFrame(); + + /** + * The meta object literal for the 'State' attribute feature. + * + * + * @generated + */ + EAttribute THREAD__STATE = eINSTANCE.getThread_State(); + + /** + * The meta object literal for the 'Top Stack Frame' reference feature. + * + * @generated + */ + EReference THREAD__TOP_STACK_FRAME = eINSTANCE.getThread_TopStackFrame(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute THREAD__NAME = eINSTANCE.getThread_Name(); + + /** + * The meta object literal for the 'Debug Target' container reference feature. + * + * @generated + */ + EReference THREAD__DEBUG_TARGET = eINSTANCE.getThread_DebugTarget(); + + /** + * The meta object literal for the 'Priority' attribute feature. + * + * @generated + */ + EAttribute THREAD__PRIORITY = eINSTANCE.getThread_Priority(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl Stack + * Frame}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getStackFrame() + * @generated + */ + EClass STACK_FRAME = eINSTANCE.getStackFrame(); + + /** + * The meta object literal for the 'Variables' containment reference list feature. + * + * + * @generated + */ + EReference STACK_FRAME__VARIABLES = eINSTANCE.getStackFrame_Variables(); + + /** + * The meta object literal for the 'Child Frame' containment reference feature. + * + * @generated + */ + EReference STACK_FRAME__CHILD_FRAME = eINSTANCE.getStackFrame_ChildFrame(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute STACK_FRAME__NAME = eINSTANCE.getStackFrame_Name(); + + /** + * The meta object literal for the 'Current Instruction' reference feature. + * + * @generated + */ + EReference STACK_FRAME__CURRENT_INSTRUCTION = eINSTANCE.getStackFrame_CurrentInstruction(); + + /** + * The meta object literal for the 'Can Step Into Current Instruction' attribute + * feature. + * + * @generated + */ + EAttribute STACK_FRAME__CAN_STEP_INTO_CURRENT_INSTRUCTION = eINSTANCE + .getStackFrame_CanStepIntoCurrentInstruction(); + + /** + * The meta object literal for the 'Parent Frame' container reference feature. + * + * @generated + */ + EReference STACK_FRAME__PARENT_FRAME = eINSTANCE.getStackFrame_ParentFrame(); + + /** + * The meta object literal for the 'Register Groups' containment reference list + * feature. + * + * @generated + */ + EReference STACK_FRAME__REGISTER_GROUPS = eINSTANCE.getStackFrame_RegisterGroups(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.impl.VariableImpl + * Variable}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.VariableImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getVariable() + * @generated + */ + EClass VARIABLE = eINSTANCE.getVariable(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute VARIABLE__NAME = eINSTANCE.getVariable_Name(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute VARIABLE__VALUE = eINSTANCE.getVariable_Value(); + + /** + * The meta object literal for the 'Value Changed' attribute feature. + * + * @generated + */ + EAttribute VARIABLE__VALUE_CHANGED = eINSTANCE.getVariable_ValueChanged(); + + /** + * The meta object literal for the 'Frame' container reference feature. + * + * @generated + */ + EReference VARIABLE__FRAME = eINSTANCE.getVariable_Frame(); + + /** + * The meta object literal for the 'Declaration Type' attribute feature. + * + * @generated + */ + EAttribute VARIABLE__DECLARATION_TYPE = eINSTANCE.getVariable_DeclarationType(); + + /** + * The meta object literal for the 'Support Modifications' attribute feature. + * + * @generated + */ + EAttribute VARIABLE__SUPPORT_MODIFICATIONS = eINSTANCE.getVariable_SupportModifications(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.impl.CurrentSessionImpl + * Current Session}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.CurrentSessionImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getCurrentSession() + * @generated + */ + EClass CURRENT_SESSION = eINSTANCE.getCurrentSession(); + + /** + * The meta object literal for the 'Debug Targets' containment reference list feature. + * + * + * @generated + */ + EReference CURRENT_SESSION__DEBUG_TARGETS = eINSTANCE.getCurrentSession_DebugTargets(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.impl.RegisterGroupImpl + * Register Group}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.RegisterGroupImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getRegisterGroup() + * @generated + */ + EClass REGISTER_GROUP = eINSTANCE.getRegisterGroup(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute REGISTER_GROUP__NAME = eINSTANCE.getRegisterGroup_Name(); + + /** + * The meta object literal for the 'Registers' containment reference list feature. + * + * + * @generated + */ + EReference REGISTER_GROUP__REGISTERS = eINSTANCE.getRegisterGroup_Registers(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.impl.RegisterImpl + * Register}' class. + * + * @see org.eclipse.gemoc.dsl.debug.impl.RegisterImpl + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getRegister() + * @generated + */ + EClass REGISTER = eINSTANCE.getRegister(); + + /** + * The meta object literal for the 'Register Group' container reference feature. + * + * @generated + */ + EReference REGISTER__REGISTER_GROUP = eINSTANCE.getRegister_RegisterGroup(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.DebugTargetState Target + * State}' enum. + * + * @see org.eclipse.gemoc.dsl.debug.DebugTargetState + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getDebugTargetState() + * @generated + */ + EEnum DEBUG_TARGET_STATE = eINSTANCE.getDebugTargetState(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.dsl.debug.State State}' enum. + * + * + * @see org.eclipse.gemoc.dsl.debug.State + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getState() + * @generated + */ + EEnum STATE = eINSTANCE.getState(); + + /** + * The meta object literal for the 'Object' data type. + * + * @see java.lang.Object + * @see org.eclipse.gemoc.dsl.debug.impl.DebugPackageImpl#getObject() + * @generated + */ + EDataType OBJECT = eINSTANCE.getObject(); + + } + +} // DebugPackage diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugTarget.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugTarget.java new file mode 100644 index 000000000..b8399fd07 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugTarget.java @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Target'. a {@link DebugTarget} is a debuggable execution context, for instance a + * debugggable process of a virtual machine. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.gemoc.dsl.debug.DebugTarget#getName Name}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.DebugTarget#getState State}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.DebugTarget#getThreads Threads}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.DebugTarget#getContext Context}
  • + *
+ *

+ * + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getDebugTarget() + * @model + * @generated + */ +public interface DebugTarget extends Contextual { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * Returns the value of the 'Name' attribute. A name of this {@link DebugTarget}. + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getDebugTarget_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.DebugTarget#getName Name}' + * attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'State' attribute. The literals are from the enumeration + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetState}. + * The current {@link TargetState} of this {@link DebugerTarget}. + * + * @return the value of the 'State' attribute. + * @see org.eclipse.gemoc.dsl.debug.DebugTargetState + * @see #setState(DebugTargetState) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getDebugTarget_State() + * @model + * @generated + */ + DebugTargetState getState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.DebugTarget#getState State}' + * attribute. + * + * @param value + * the new value of the 'State' attribute. + * @see org.eclipse.gemoc.dsl.debug.DebugTargetState + * @see #getState() + * @generated + */ + void setState(DebugTargetState value); + + /** + * Returns the value of the 'Threads' containment reference list. The list contents are of + * type {@link org.eclipse.gemoc.dsl.debug.Thread}. It is bidirectional and its opposite is ' + * {@link org.eclipse.gemoc.dsl.debug.Thread#getParent Parent}'. Current {@link Thread threads} running in this + * {@link DebugerTarget}. + * + * @return the value of the 'Threads' containment reference list. + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getDebugTarget_Threads() + * @see org.eclipse.gemoc.dsl.debug.Thread#getParent + * @model opposite="parent" containment="true" + * @generated + */ + EList getThreads(); + +} // DebugTarget diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugTargetState.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugTargetState.java similarity index 91% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugTargetState.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugTargetState.java index 043e0cb69..e28502ff9 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/DebugTargetState.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/DebugTargetState.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug; +package org.eclipse.gemoc.dsl.debug; import java.util.Arrays; import java.util.Collections; @@ -21,7 +21,7 @@ * and utility methods for working with them. Possible States * of a {@link DebugTarget} {@link DebugTarget#getState() state}. * - * @see fr.obeo.dsl.debug.DebugPackage#getDebugTargetState() + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getDebugTargetState() * @model * @generated */ @@ -33,9 +33,9 @@ public enum DebugTargetState implements Enumerator { * @generated * @ordered */ - CONNECTED(0, "CONNECTED", "CONNECTED"), /** - * The 'DISCONNECTED' literal object. + CONNECTED(0, "CONNECTED", "CONNECTED"), + /** + * The 'DISCONNECTED' literal object. * * @see #DISCONNECTED_VALUE * @generated @@ -50,9 +50,9 @@ public enum DebugTargetState implements Enumerator { * @generated * @ordered */ - TERMINATING(2, "TERMINATING", "TERMINATING"), /** - * The 'TERMINATED' literal object. + TERMINATING(2, "TERMINATING", "TERMINATING"), + /** + * The 'TERMINATED' literal object. * * @see #TERMINATED_VALUE * @generated @@ -126,8 +126,8 @@ public enum DebugTargetState implements Enumerator { * * @generated */ - public static final List VALUES = Collections.unmodifiableList(Arrays - .asList(VALUES_ARRAY)); + public static final List VALUES = Collections.unmodifiableList(Arrays.asList( + VALUES_ARRAY)); /** * Returns the 'Target State' literal with the specified literal value. * * + * @param name + * the name. + * @return the matching enumerator or null. * @generated */ public static DebugTargetState getByName(String name) { diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Register.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Register.java new file mode 100644 index 000000000..14aa154c1 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Register.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug; + +/** + * A representation of the model object 'Register'. A {@link Variable} representing a register. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.gemoc.dsl.debug.Register#getRegisterGroup Register Group}
  • + *
+ *

+ * + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getRegister() + * @model + * @generated + */ +public interface Register extends Variable { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * Returns the value of the 'Register Group' container reference. It is bidirectional and + * its opposite is '{@link org.eclipse.gemoc.dsl.debug.RegisterGroup#getRegisters Registers}'. + * + *

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

+ * + * + * @return the value of the 'Register Group' container reference. + * @see #setRegisterGroup(RegisterGroup) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getRegister_RegisterGroup() + * @see org.eclipse.gemoc.dsl.debug.RegisterGroup#getRegisters + * @model opposite="registers" transient="false" + * @generated + */ + RegisterGroup getRegisterGroup(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Register#getRegisterGroup Register + * Group}' container reference. + * + * @param value + * the new value of the 'Register Group' container reference. + * @see #getRegisterGroup() + * @generated + */ + void setRegisterGroup(RegisterGroup value); + +} // Register diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/RegisterGroup.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/RegisterGroup.java new file mode 100644 index 000000000..bf5b290d2 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/RegisterGroup.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Register Group'. + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.dsl.debug.RegisterGroup#getName Name}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.RegisterGroup#getRegisters Registers}
  • + *
+ * + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getRegisterGroup() + * @model + * @generated + */ +public interface RegisterGroup extends EObject { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * Returns the value of the 'Name' attribute. A name of this {@link RegisterGroup}. + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getRegisterGroup_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.RegisterGroup#getName Name}' + * attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Registers' containment reference list. The list contents are + * of type {@link org.eclipse.gemoc.dsl.debug.Register}. It is bidirectional and its opposite is ' + * {@link org.eclipse.gemoc.dsl.debug.Register#getRegisterGroup Register Group}'. {@link Register Registers} grouped in + * this {@link RegisterGroup}. + * + * @return the value of the 'Registers' containment reference list. + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getRegisterGroup_Registers() + * @see org.eclipse.gemoc.dsl.debug.Register#getRegisterGroup + * @model opposite="registerGroup" containment="true" + * @generated + */ + EList getRegisters(); + +} // RegisterGroup diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/StackFrame.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/StackFrame.java new file mode 100644 index 000000000..4a35a8e24 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/StackFrame.java @@ -0,0 +1,199 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Stack Frame'. A {@link StackFrame} represents an execution context in a + * {@link Thread}. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.gemoc.dsl.debug.StackFrame#getVariables Variables}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.StackFrame#getChildFrame Child Frame}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.StackFrame#getState State}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.StackFrame#getParent Parent}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.StackFrame#getName Name}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.StackFrame#getCurrentInstruction Current Instruction}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.StackFrame#getParentFrame Parent Frame}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.StackFrame#getRegisterGroups Register Groups}
  • + *
+ *

+ * + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getStackFrame() + * @model + * @generated + */ +public interface StackFrame extends Contextual { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * Returns the value of the 'Variables' containment reference list. The list contents are + * of type {@link org.eclipse.gemoc.dsl.debug.Variable}. + * {@link Variable Variables} accessible in this {@link StackFrame}. + * + * @return the value of the 'Variables' containment reference list. + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getStackFrame_Variables() + * @model containment="true" + * @generated + */ + EList getVariables(); + + /** + * Returns the value of the 'Child Frame' containment reference. It is bidirectional and + * its opposite is '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getParentFrame Parent Frame}'. + * The current child + * {@link StackFrame} of this {@link StackFrame}. + * + * @return the value of the 'Child Frame' containment reference. + * @see #setChildFrame(StackFrame) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getStackFrame_ChildFrame() + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getParentFrame + * @model opposite="parentFrame" containment="true" + * @generated + */ + StackFrame getChildFrame(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getChildFrame Child + * Frame}' containment reference. + * + * @param value + * the new value of the 'Child Frame' containment reference. + * @see #getChildFrame() + * @generated + */ + void setChildFrame(StackFrame value); + + /** + * Returns the value of the 'Name' attribute. The {@link StackFrame} name. + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getStackFrame_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getName Name}' attribute. + * + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Current Instruction' reference. The {@link EObject} representing the current instruction in + * this {@link StackFrame}. + * + * @return the value of the 'Current Instruction' reference. + * @see #setCurrentInstruction(EObject) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getStackFrame_CurrentInstruction() + * @model + * @generated + */ + EObject getCurrentInstruction(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getCurrentInstruction Current + * Instruction}' reference. + * + * @param value + * the new value of the 'Current Instruction' reference. + * @see #getCurrentInstruction() + * @generated + */ + void setCurrentInstruction(EObject value); + + /** + * Returns the value of the 'Can Step Into Current Instruction' attribute. The default + * value is "false". + *

+ * If the meaning of the 'Can Step Into Current Instruction' attribute isn't clear, there really + * should be more of a description here... + *

+ * + * + * @return the value of the 'Can Step Into Current Instruction' attribute. + * @see #setCanStepIntoCurrentInstruction(boolean) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getStackFrame_CanStepIntoCurrentInstruction() + * @model default="false" required="true" + * @generated + */ + boolean isCanStepIntoCurrentInstruction(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.StackFrame#isCanStepIntoCurrentInstruction + * Can Step Into Current Instruction}' attribute. + * + * @param value + * the new value of the 'Can Step Into Current Instruction' attribute. + * @see #isCanStepIntoCurrentInstruction() + * @generated + */ + void setCanStepIntoCurrentInstruction(boolean value); + + /** + * Returns the value of the 'Parent Frame' container reference. It is bidirectional and + * its opposite is '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getChildFrame Child Frame}'. + * The current parent + * {@link StackFrame} of this {@link StackFrame}. + * + * @return the value of the 'Parent Frame' container reference. + * @see #setParentFrame(StackFrame) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getStackFrame_ParentFrame() + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getChildFrame + * @model opposite="childFrame" transient="false" + * @generated + */ + StackFrame getParentFrame(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getParentFrame Parent + * Frame}' container reference. + * + * @param value + * the new value of the 'Parent Frame' container reference. + * @see #getParentFrame() + * @generated + */ + void setParentFrame(StackFrame value); + + /** + * Returns the value of the 'Register Groups' containment reference list. The list + * contents are of type {@link org.eclipse.gemoc.dsl.debug.RegisterGroup}. {@link RegisterGroup Register groups} accessible in this + * {@link StackFrame}. + * + * @return the value of the 'Register Groups' containment reference list. + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getStackFrame_RegisterGroups() + * @model containment="true" + * @generated + */ + EList getRegisterGroups(); + +} // StackFrame diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/State.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/State.java new file mode 100644 index 000000000..8c91a22bd --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/State.java @@ -0,0 +1,346 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug; + +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 'State', and + * utility methods for working with them. Possible States of a + * {@link StackFrame} {@link StackFrame#getState() state}. + * + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getState() + * @model + * @generated + */ +public enum State implements Enumerator { + /** + * The 'RUNNING' literal object. + * + * @see #RUNNING_VALUE + * @generated + * @ordered + */ + RUNNING(0, "RUNNING", "RUNNING"), + + /** + * The 'STEPPING INTO' literal object. + * + * @see #STEPPING_INTO_VALUE + * @generated + * @ordered + */ + STEPPING_INTO(1, "STEPPING_INTO", "STEPPING_INTO"), + /** + * The 'STEPPING OVER' literal object. + * + * @see #STEPPING_OVER_VALUE + * @generated + * @ordered + */ + STEPPING_OVER(2, "STEPPING_OVER", "STEPPING_OVER"), + /** + * The 'STEPPING RETURN' literal object. + * + * @see #STEPPING_RETURN_VALUE + * @generated + * @ordered + */ + STEPPING_RETURN(3, "STEPPING_RETURN", "STEPPING_RETURN"), + /** + * The 'SUSPENDING' literal object. + * + * @see #SUSPENDING_VALUE + * @generated + * @ordered + */ + SUSPENDING(4, "SUSPENDING", "SUSPENDING"), + /** + * The 'SUSPENDED' literal object. + * + * @see #SUSPENDED_VALUE + * @generated + * @ordered + */ + SUSPENDED(5, "SUSPENDED", "SUSPENDED"), + + /** + * The 'TERMINATING' literal object. + * + * @see #TERMINATING_VALUE + * @generated + * @ordered + */ + TERMINATING(6, "TERMINATING", "TERMINATING"), + /** + * The 'TERMINATED' literal object. + * + * @see #TERMINATED_VALUE + * @generated + * @ordered + */ + TERMINATED(7, "TERMINATED", "TERMINATED"); + + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * The 'RUNNING' literal value. The {@link StackFrame} is running. + * + * @see #RUNNING + * @model + * @generated + * @ordered + */ + public static final int RUNNING_VALUE = 0; + + /** + * The 'STEPPING INTO' literal value. The {@link StackFrame} is stepping into. + * + * @see #STEPPING_INTO + * @model + * @generated + * @ordered + */ + public static final int STEPPING_INTO_VALUE = 1; + + /** + * The 'STEPPING OVER' literal value. The {@link StackFrame} is stepping over. + * + * @see #STEPPING_OVER + * @model + * @generated + * @ordered + */ + public static final int STEPPING_OVER_VALUE = 2; + + /** + * The 'STEPPING RETURN' literal value. The {@link StackFrame} is stepping return. + * + * @see #STEPPING_RETURN + * @model + * @generated + * @ordered + */ + public static final int STEPPING_RETURN_VALUE = 3; + + /** + * The 'SUSPENDING' literal value. The {@link StackFrame} is stepping over. + * + * @see #SUSPENDING + * @model + * @generated + * @ordered + */ + public static final int SUSPENDING_VALUE = 4; + + /** + * The 'SUSPENDED' literal value. The {@link StackFrame} is suspended. + * + * @see #SUSPENDED + * @model + * @generated + * @ordered + */ + public static final int SUSPENDED_VALUE = 5; + + /** + * The 'TERMINATING' literal value. The {@link StackFrame} is terminated. + * + * @see #TERMINATING + * @model + * @generated + * @ordered + */ + public static final int TERMINATING_VALUE = 6; + + /** + * The 'TERMINATED' literal value. The {@link DebugTarget} is terminated. + * + * @see #TERMINATED + * @model + * @generated + * @ordered + */ + public static final int TERMINATED_VALUE = 7; + + /** + * An array of all the 'State' enumerators. + * + * @generated + */ + private static final State[] VALUES_ARRAY = new State[] {RUNNING, STEPPING_INTO, STEPPING_OVER, + STEPPING_RETURN, SUSPENDING, SUSPENDED, TERMINATING, TERMINATED, }; + + /** + * A public read-only list of all the 'State' enumerators. + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'State' literal with the specified literal value. + * + * + * @param literal + * the literal. + * @return the matching enumerator or null. + * @generated + */ + public static State get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + State result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'State' literal with the specified name. + * + * @param name + * the name. + * @return the matching enumerator or null. + * @generated + */ + public static State getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + State result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'State' literal with the specified integer value. + * + * + * @param value + * the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static State get(int value) { + switch (value) { + case RUNNING_VALUE: + return RUNNING; + case STEPPING_INTO_VALUE: + return STEPPING_INTO; + case STEPPING_OVER_VALUE: + return STEPPING_OVER; + case STEPPING_RETURN_VALUE: + return STEPPING_RETURN; + case SUSPENDING_VALUE: + return SUSPENDING; + case SUSPENDED_VALUE: + return SUSPENDED; + case TERMINATING_VALUE: + return TERMINATING; + case TERMINATED_VALUE: + return TERMINATED; + } + 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 State(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; + } + +} // State diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Thread.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Thread.java new file mode 100644 index 000000000..1ff98ea33 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Thread.java @@ -0,0 +1,187 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug; + +/** + * A representation of the model object 'Thread'. Current {@link Thread threads} running in this {@link DebugerTarget}. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.gemoc.dsl.debug.Thread#getBottomStackFrame Bottom Stack Frame}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.Thread#getTopStackFrame Top Stack Frame}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.Thread#getName Name}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.Thread#getParent Parent}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.Thread#getBreakpoints Breakpoints}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.Thread#getContext Context}
  • + *
+ *

+ * + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getThread() + * @model + * @generated + */ +public interface Thread extends Contextual { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * Returns the value of the 'Bottom Stack Frame' reference. The current bottom {@link StackFrame}. + * + * @return the value of the 'Bottom Stack Frame' reference. + * @see #setBottomStackFrame(StackFrame) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getThread_BottomStackFrame() + * @model required="true" + * @generated + */ + StackFrame getBottomStackFrame(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Thread#getBottomStackFrame Bottom Stack + * Frame}' containment reference. + * + * @param value + * the new value of the 'Bottom Stack Frame' containment reference. + * @see #getBottomStackFrame() + * @generated + */ + void setBottomStackFrame(StackFrame value); + + /** + * Returns the value of the 'State' attribute. The literals are from the enumeration + * {@link org.eclipse.gemoc.dsl.debug.State}. The current {@link Thread} of this {@link StackFrame}. + * + * @return the value of the 'State' attribute. + * @see org.eclipse.gemoc.dsl.debug.State + * @see #setState(State) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getThread_State() + * @model required="true" + * @generated + */ + State getState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Thread#getState State}' attribute. + * + * + * @param value + * the new value of the 'State' attribute. + * @see org.eclipse.gemoc.dsl.debug.State + * @see #getState() + * @generated + */ + void setState(State value); + + /** + * Returns the value of the 'Top Stack Frame' reference. The curren top {@link StackFrame}. + * + * @return the value of the 'Top Stack Frame' reference. + * @see #setTopStackFrame(StackFrame) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getThread_TopStackFrame() + * @model required="true" + * @generated + */ + StackFrame getTopStackFrame(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Thread#getTopStackFrame Top Stack + * Frame}' reference. + * + * @param value + * the new value of the 'Top Stack Frame' reference. + * @see #getTopStackFrame() + * @generated + */ + void setTopStackFrame(StackFrame value); + + /** + * Returns the value of the 'Name' attribute. The {@link Thread} name. It must be unique across a {@link DebugTarget}. + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getThread_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Thread#getName Name}' attribute. + * + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Debug Target' container reference. It is bidirectional and + * its opposite is '{@link org.eclipse.gemoc.dsl.debug.DebugTarget#getThreads Threads}'. The {@link DebugTarget} of this + * {@link StackFrame}. + * + * @return the value of the 'Debug Target' container reference. + * @see #setDebugTarget(DebugTarget) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getThread_DebugTarget() + * @see org.eclipse.gemoc.dsl.debug.DebugTarget#getThreads + * @model opposite="threads" transient="false" + * @generated + */ + DebugTarget getDebugTarget(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Thread#getDebugTarget Debug Target}' + * container reference. + * + * @param value + * the new value of the 'Debug Target' container reference. + * @see #getDebugTarget() + * @generated + */ + void setDebugTarget(DebugTarget value); + + /** + * Returns the value of the 'Priority' attribute. The default value is "0". + * The priority of the given + * thread. The meaning is debugger dependant. + * + * @return the value of the 'Priority' attribute. + * @see #setPriority(int) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getThread_Priority() + * @model default="0" required="true" + * @generated + */ + int getPriority(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Thread#getPriority Priority}' + * attribute. + * + * @param value + * the new value of the 'Priority' attribute. + * @see #getPriority() + * @generated + */ + void setPriority(int value); + +} // Thread diff --git a/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Variable.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Variable.java new file mode 100644 index 000000000..b00d22228 --- /dev/null +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/Variable.java @@ -0,0 +1,190 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Variable'. A {@link Variable} represents a visible data structure in the + * {@link StackFrame}. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.gemoc.dsl.debug.Variable#getName Name}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.Variable#getElements Elements}
  • + *
+ *

+ * + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getVariable() + * @model + * @generated + */ +public interface Variable extends EObject { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * Returns the value of the 'Name' attribute. The {@link Variable} name. + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getVariable_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Variable#getName Name}' attribute. + * + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Value' attribute. The {@link Variable} value. + * + * @return the value of the 'Value' attribute. + * @see #setValue(Object) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getVariable_Value() + * @model dataType="org.eclipse.gemoc.dsl.debug.Object" transient="true" + * @generated + */ + Object getValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Variable#getValue Value}' attribute. + * + * + * @param value + * the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(Object value); + + /** + * Returns the value of the 'Value Changed' attribute. The default value is + * "false". + *

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

+ * + * + * @return the value of the 'Value Changed' attribute. + * @see #setValueChanged(boolean) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getVariable_ValueChanged() + * @model default="false" required="true" + * @generated + */ + boolean isValueChanged(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Variable#isValueChanged Value + * Changed}' attribute. + * + * @param value + * the new value of the 'Value Changed' attribute. + * @see #isValueChanged() + * @generated + */ + void setValueChanged(boolean value); + + /** + * Returns the value of the 'Frame' container reference. It is bidirectional and its + * opposite is '{@link org.eclipse.gemoc.dsl.debug.StackFrame#getVariables Variables}'. + *

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

+ * + * + * @return the value of the 'Frame' container reference. + * @see #setFrame(StackFrame) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getVariable_Frame() + * @see org.eclipse.gemoc.dsl.debug.StackFrame#getVariables + * @model opposite="variables" transient="false" + * @generated + */ + StackFrame getFrame(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Variable#getFrame Frame}' container + * reference. + * + * @param value + * the new value of the 'Frame' container reference. + * @see #getFrame() + * @generated + */ + void setFrame(StackFrame value); + + /** + * Returns the value of the 'Declaration Type' attribute. The {@link Variable} declaration type. + * + * @return the value of the 'Declaration Type' attribute. + * @see #setDeclarationType(String) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getVariable_DeclarationType() + * @model required="true" + * @generated + */ + String getDeclarationType(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Variable#getDeclarationType Declaration + * Type}' attribute. + * + * @param value + * the new value of the 'Declaration Type' attribute. + * @see #getDeclarationType() + * @generated + */ + void setDeclarationType(String value); + + /** + * Returns the value of the 'Support Modifications' attribute. + * Tells if the {@link Variable#getValue() value} can be + * changed + * + * @return the value of the 'Support Modifications' attribute. + * @see #setSupportModifications(boolean) + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#getVariable_SupportModifications() + * @model required="true" + * @generated + */ + boolean isSupportModifications(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.dsl.debug.Variable#isSupportModifications Support + * Modifications}' attribute. + * + * @param value + * the new value of the 'Support Modifications' attribute. + * @see #isSupportModifications() + * @generated + */ + void setSupportModifications(boolean value); + +} // Variable diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/CurrentSessionImpl.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/CurrentSessionImpl.java similarity index 92% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/CurrentSessionImpl.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/CurrentSessionImpl.java index 2fc57888c..03c92b82f 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/CurrentSessionImpl.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/CurrentSessionImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.impl; - -import fr.obeo.dsl.debug.CurrentSession; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; +package org.eclipse.gemoc.dsl.debug.impl; import java.util.Collection; @@ -23,16 +19,19 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.gemoc.dsl.debug.CurrentSession; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; /** * An implementation of the model object 'Current Session'. *

* The following features are implemented: + *

*
    - *
  • {@link fr.obeo.dsl.debug.impl.CurrentSessionImpl#getDebugTargets Debug Targets}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.CurrentSessionImpl#getDebugTargets Debug Targets}
  • *
- *

* * @generated */ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugFactoryImpl.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugFactoryImpl.java similarity index 91% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugFactoryImpl.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugFactoryImpl.java index bdcc7571d..1f0e61bfb 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugFactoryImpl.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugFactoryImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,18 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.impl; - -import fr.obeo.dsl.debug.CurrentSession; -import fr.obeo.dsl.debug.DebugFactory; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetState; -import fr.obeo.dsl.debug.Register; -import fr.obeo.dsl.debug.RegisterGroup; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.State; -import fr.obeo.dsl.debug.Variable; +package org.eclipse.gemoc.dsl.debug.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; @@ -27,6 +16,16 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.gemoc.dsl.debug.CurrentSession; +import org.eclipse.gemoc.dsl.debug.DebugFactory; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetState; +import org.eclipse.gemoc.dsl.debug.Register; +import org.eclipse.gemoc.dsl.debug.RegisterGroup; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.State; +import org.eclipse.gemoc.dsl.debug.Variable; /** * An implementation of the model Factory. @@ -48,8 +47,8 @@ public class DebugFactoryImpl extends EFactoryImpl implements DebugFactory { */ public static DebugFactory init() { try { - DebugFactory theDebugFactory = (DebugFactory)EPackage.Registry.INSTANCE - .getEFactory(DebugPackage.eNS_URI); + DebugFactory theDebugFactory = (DebugFactory)EPackage.Registry.INSTANCE.getEFactory( + DebugPackage.eNS_URI); if (theDebugFactory != null) { return theDebugFactory; } @@ -147,7 +146,7 @@ public DebugTarget createDebugTarget() { * * @generated */ - public fr.obeo.dsl.debug.Thread createThread() { + public org.eclipse.gemoc.dsl.debug.Thread createThread() { ThreadImpl thread = new ThreadImpl(); return thread; } diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugPackageImpl.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugPackageImpl.java similarity index 90% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugPackageImpl.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugPackageImpl.java index ed8e4aef2..a3618a5a7 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugPackageImpl.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugPackageImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,19 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.impl; - -import fr.obeo.dsl.debug.Contextual; -import fr.obeo.dsl.debug.CurrentSession; -import fr.obeo.dsl.debug.DebugFactory; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetState; -import fr.obeo.dsl.debug.Register; -import fr.obeo.dsl.debug.RegisterGroup; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.State; -import fr.obeo.dsl.debug.Variable; +package org.eclipse.gemoc.dsl.debug.impl; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; @@ -29,6 +17,17 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.gemoc.dsl.debug.Contextual; +import org.eclipse.gemoc.dsl.debug.CurrentSession; +import org.eclipse.gemoc.dsl.debug.DebugFactory; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetState; +import org.eclipse.gemoc.dsl.debug.Register; +import org.eclipse.gemoc.dsl.debug.RegisterGroup; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.State; +import org.eclipse.gemoc.dsl.debug.Variable; /** * An implementation of the model Package. @@ -129,7 +128,7 @@ public class DebugPackageImpl extends EPackageImpl implements DebugPackage { * exists. * * @see org.eclipse.emf.ecore.EPackage.Registry - * @see fr.obeo.dsl.debug.DebugPackage#eNS_URI + * @see org.eclipse.gemoc.dsl.debug.DebugPackage#eNS_URI * @see #init() * @generated */ @@ -162,9 +161,9 @@ public static DebugPackage init() { return (DebugPackage)EPackage.Registry.INSTANCE.getEPackage(DebugPackage.eNS_URI); // Obtain or create and register package - DebugPackageImpl theDebugPackage = (DebugPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DebugPackageImpl ? EPackage.Registry.INSTANCE - .get(eNS_URI) - : new DebugPackageImpl()); + DebugPackageImpl theDebugPackage = (DebugPackageImpl)(EPackage.Registry.INSTANCE.get( + eNS_URI) instanceof DebugPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) + : new DebugPackageImpl()); isInited = true; @@ -655,27 +654,27 @@ public void initializePackageContents() { null, 0, -1, DebugTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(threadEClass, fr.obeo.dsl.debug.Thread.class, "Thread", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); + initEClass(threadEClass, org.eclipse.gemoc.dsl.debug.Thread.class, "Thread", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getThread_BottomStackFrame(), this.getStackFrame(), null, "bottomStackFrame", null, 1, - 1, fr.obeo.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, - !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + 1, org.eclipse.gemoc.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getThread_State(), this.getState(), "state", null, 1, 1, - fr.obeo.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, - !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + org.eclipse.gemoc.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getThread_TopStackFrame(), this.getStackFrame(), null, "topStackFrame", null, 1, 1, - fr.obeo.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + org.eclipse.gemoc.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getThread_Name(), ecorePackage.getEString(), "name", null, 1, 1, - fr.obeo.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, - !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + org.eclipse.gemoc.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getThread_DebugTarget(), this.getDebugTarget(), this.getDebugTarget_Threads(), - "debugTarget", null, 1, 1, fr.obeo.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, - IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); + "debugTarget", null, 1, 1, org.eclipse.gemoc.dsl.debug.Thread.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); initEAttribute(getThread_Priority(), ecorePackage.getEInt(), "priority", "0", 1, 1, - fr.obeo.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, - !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + org.eclipse.gemoc.dsl.debug.Thread.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(stackFrameEClass, StackFrame.class, "StackFrame", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -693,8 +692,8 @@ public void initializePackageContents() { IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getStackFrame_CanStepIntoCurrentInstruction(), ecorePackage.getEBoolean(), - "canStepIntoCurrentInstruction", "false", 1, 1, StackFrame.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + "canStepIntoCurrentInstruction", "false", 1, 1, StackFrame.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getStackFrame_ParentFrame(), this.getStackFrame(), this.getStackFrame_ChildFrame(), "parentFrame", null, 0, 1, StackFrame.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -711,22 +710,22 @@ public void initializePackageContents() { IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getVariable_ValueChanged(), ecorePackage.getEBoolean(), "valueChanged", "false", 1, 1, - Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); initEReference(getVariable_Frame(), this.getStackFrame(), this.getStackFrame_Variables(), "frame", null, 0, 1, Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getVariable_DeclarationType(), ecorePackage.getEString(), "declarationType", null, 1, 1, Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getVariable_SupportModifications(), ecorePackage.getEBoolean(), - "supportModifications", null, 1, 1, Variable.class, !IS_TRANSIENT, !IS_VOLATILE, - IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVariable_SupportModifications(), ecorePackage.getEBoolean(), "supportModifications", + null, 1, 1, Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(currentSessionEClass, CurrentSession.class, "CurrentSession", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCurrentSession_DebugTargets(), this.getDebugTarget(), null, "debugTargets", null, - 0, -1, CurrentSession.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + initEReference(getCurrentSession_DebugTargets(), this.getDebugTarget(), null, "debugTargets", null, 0, + -1, CurrentSession.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(registerGroupEClass, RegisterGroup.class, "RegisterGroup", !IS_ABSTRACT, !IS_INTERFACE, @@ -763,7 +762,8 @@ public void initializePackageContents() { addEEnumLiteral(stateEEnum, State.TERMINATED); // Initialize data types - initEDataType(objectEDataType, Object.class, "Object", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(objectEDataType, Object.class, "Object", !IS_SERIALIZABLE, + !IS_GENERATED_INSTANCE_CLASS); // Create resource createResource(eNS_URI); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugTargetImpl.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugTargetImpl.java similarity index 90% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugTargetImpl.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugTargetImpl.java index 1963c56a2..db4ccf7a9 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/DebugTargetImpl.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/DebugTargetImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.impl; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetState; +package org.eclipse.gemoc.dsl.debug.impl; import java.util.Collection; @@ -26,6 +22,9 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetState; /** * An implementation of the model object 'Target'. @@ -178,10 +177,10 @@ public void setState(DebugTargetState newState) { * * @generated */ - public EList getThreads() { + public EList getThreads() { if (threads == null) { - threads = new EObjectContainmentWithInverseEList( - fr.obeo.dsl.debug.Thread.class, this, DebugPackage.DEBUG_TARGET__THREADS, + threads = new EObjectContainmentWithInverseEList( + org.eclipse.gemoc.dsl.debug.Thread.class, this, DebugPackage.DEBUG_TARGET__THREADS, DebugPackage.THREAD__DEBUG_TARGET); } return threads; @@ -299,7 +298,7 @@ public void eSet(int featureID, Object newValue) { return; case DebugPackage.DEBUG_TARGET__THREADS: getThreads().clear(); - getThreads().addAll((Collection)newValue); + getThreads().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/RegisterGroupImpl.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/RegisterGroupImpl.java similarity index 93% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/RegisterGroupImpl.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/RegisterGroupImpl.java index 54f4cd3bc..cfb5a4503 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/RegisterGroupImpl.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/RegisterGroupImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.impl; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.Register; -import fr.obeo.dsl.debug.RegisterGroup; +package org.eclipse.gemoc.dsl.debug.impl; import java.util.Collection; @@ -25,17 +21,20 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.Register; +import org.eclipse.gemoc.dsl.debug.RegisterGroup; /** * An implementation of the model object 'Register Group'. *

* The following features are implemented: + *

*
    - *
  • {@link fr.obeo.dsl.debug.impl.RegisterGroupImpl#getName Name}
  • - *
  • {@link fr.obeo.dsl.debug.impl.RegisterGroupImpl#getRegisters Registers}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.RegisterGroupImpl#getName Name}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.RegisterGroupImpl#getRegisters Registers}
  • *
- *

* * @generated */ diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/RegisterImpl.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/RegisterImpl.java similarity index 94% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/RegisterImpl.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/RegisterImpl.java index 50cdc4cca..0967f76b3 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/RegisterImpl.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/RegisterImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.impl; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.Register; -import fr.obeo.dsl.debug.RegisterGroup; +package org.eclipse.gemoc.dsl.debug.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -20,6 +16,9 @@ import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.Register; +import org.eclipse.gemoc.dsl.debug.RegisterGroup; /** * An implementation of the model object 'Register'. An implementation of the model object 'Stack Frame'. *

* The following features are implemented: + *

*
    - *
  • {@link fr.obeo.dsl.debug.impl.StackFrameImpl#getContext Context}
  • - *
  • {@link fr.obeo.dsl.debug.impl.StackFrameImpl#getVariables Variables}
  • - *
  • {@link fr.obeo.dsl.debug.impl.StackFrameImpl#getChildFrame Child Frame}
  • - *
  • {@link fr.obeo.dsl.debug.impl.StackFrameImpl#getName Name}
  • - *
  • {@link fr.obeo.dsl.debug.impl.StackFrameImpl#getCurrentInstruction Current Instruction}
  • - *
  • {@link fr.obeo.dsl.debug.impl.StackFrameImpl#isCanStepIntoCurrentInstruction Can Step Into Current + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl#getContext Context}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl#getVariables Variables}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl#getChildFrame Child Frame}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl#getName Name}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl#getCurrentInstruction Current * Instruction}
  • - *
  • {@link fr.obeo.dsl.debug.impl.StackFrameImpl#getParentFrame Parent Frame}
  • - *
  • {@link fr.obeo.dsl.debug.impl.StackFrameImpl#getRegisterGroups Register Groups}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl#isCanStepIntoCurrentInstruction Can Step + * Into Current Instruction}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl#getParentFrame Parent Frame}
  • + *
  • {@link org.eclipse.gemoc.dsl.debug.impl.StackFrameImpl#getRegisterGroups Register Groups}
  • *
- *

* * @generated */ @@ -119,8 +119,8 @@ public class StackFrameImpl extends EObjectImpl implements StackFrame { protected EObject currentInstruction; /** - * The default value of the '{@link #isCanStepIntoCurrentInstruction() - * Can Step Into Current Instruction}' attribute. + * The default value of the '{@link #isCanStepIntoCurrentInstruction() Can Step Into Current + * Instruction}' attribute. * * @see #isCanStepIntoCurrentInstruction() * @generated @@ -129,8 +129,8 @@ public class StackFrameImpl extends EObjectImpl implements StackFrame { protected static final boolean CAN_STEP_INTO_CURRENT_INSTRUCTION_EDEFAULT = false; /** - * The cached value of the '{@link #isCanStepIntoCurrentInstruction() - * Can Step Into Current Instruction}' attribute. + * The cached value of the '{@link #isCanStepIntoCurrentInstruction() Can Step Into Current + * Instruction}' attribute. * * @see #isCanStepIntoCurrentInstruction() * @generated @@ -330,7 +330,8 @@ public void setCurrentInstruction(EObject newCurrentInstruction) { currentInstruction = newCurrentInstruction; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, - DebugPackage.STACK_FRAME__CURRENT_INSTRUCTION, oldCurrentInstruction, currentInstruction)); + DebugPackage.STACK_FRAME__CURRENT_INSTRUCTION, oldCurrentInstruction, + currentInstruction)); } /** @@ -385,7 +386,8 @@ public NotificationChain basicSetParentFrame(StackFrame newParentFrame, Notifica */ public void setParentFrame(StackFrame newParentFrame) { if (newParentFrame != eInternalContainer() - || (eContainerFeatureID() != DebugPackage.STACK_FRAME__PARENT_FRAME && newParentFrame != null)) { + || (eContainerFeatureID() != DebugPackage.STACK_FRAME__PARENT_FRAME + && newParentFrame != null)) { if (EcoreUtil.isAncestor(this, newParentFrame)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/ThreadImpl.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/ThreadImpl.java similarity index 92% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/ThreadImpl.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/ThreadImpl.java index 1b59bcdc8..9052e6977 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/ThreadImpl.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/ThreadImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,12 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.impl; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.State; +package org.eclipse.gemoc.dsl.debug.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -23,6 +18,10 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.State; /** * An implementation of the model object 'Thread'. * @@ -172,7 +172,8 @@ public StackFrame getBottomStackFrame() { * * @generated */ - public NotificationChain basicSetBottomStackFrame(StackFrame newBottomStackFrame, NotificationChain msgs) { + public NotificationChain basicSetBottomStackFrame(StackFrame newBottomStackFrame, + NotificationChain msgs) { StackFrame oldBottomStackFrame = bottomStackFrame; bottomStackFrame = newBottomStackFrame; if (eNotificationRequired()) { @@ -226,7 +227,8 @@ public void setState(State newState) { State oldState = state; state = newState == null ? STATE_EDEFAULT : newState; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DebugPackage.THREAD__STATE, oldState, state)); + eNotify(new ENotificationImpl(this, Notification.SET, DebugPackage.THREAD__STATE, oldState, + state)); } /** @@ -325,8 +327,8 @@ public void setDebugTarget(DebugTarget newDebugTarget) { if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newDebugTarget != null) - msgs = ((InternalEObject)newDebugTarget).eInverseAdd(this, - DebugPackage.DEBUG_TARGET__THREADS, DebugTarget.class, msgs); + msgs = ((InternalEObject)newDebugTarget).eInverseAdd(this, DebugPackage.DEBUG_TARGET__THREADS, + DebugTarget.class, msgs); msgs = basicSetDebugTarget(newDebugTarget, msgs); if (msgs != null) msgs.dispatch(); diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/VariableImpl.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/VariableImpl.java similarity index 95% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/VariableImpl.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/VariableImpl.java index fe2eac406..5cfdb9843 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/impl/VariableImpl.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/impl/VariableImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,11 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.impl; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.Variable; +package org.eclipse.gemoc.dsl.debug.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -21,6 +17,9 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.Variable; /** * An implementation of the model object 'Variable'. The Adapter Factory for the model. It provides an adapter + * createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.dsl.debug.DebugPackage + * @generated + */ +public class DebugAdapterFactory extends AdapterFactoryImpl { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2015 Obeo.\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n \n Contributors:\n Obeo - initial API and implementation"; + + /** + * The cached model package. + * + * @generated + */ + protected static DebugPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * @generated + */ + public DebugAdapterFactory() { + if (modelPackage == null) { + modelPackage = DebugPackage.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 DebugSwitch modelSwitch = new DebugSwitch() { + @Override + public Adapter caseContextual(Contextual object) { + return createContextualAdapter(); + } + + @Override + public Adapter caseDebugTarget(DebugTarget object) { + return createDebugTargetAdapter(); + } + + @Override + public Adapter caseThread(org.eclipse.gemoc.dsl.debug.Thread object) { + return createThreadAdapter(); + } + + @Override + public Adapter caseStackFrame(StackFrame object) { + return createStackFrameAdapter(); + } + + @Override + public Adapter caseVariable(Variable object) { + return createVariableAdapter(); + } + + @Override + public Adapter caseCurrentSession(CurrentSession object) { + return createCurrentSessionAdapter(); + } + + @Override + public Adapter caseRegisterGroup(RegisterGroup object) { + return createRegisterGroupAdapter(); + } + + @Override + public Adapter caseRegister(Register object) { + return createRegisterAdapter(); + } + + @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.dsl.debug.Contextual + * Contextual}'. 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.dsl.debug.Contextual + * @generated + */ + public Adapter createContextualAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.dsl.debug.DebugTarget + * Target}'. 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.dsl.debug.DebugTarget + * @generated + */ + public Adapter createDebugTargetAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.dsl.debug.Thread + * Thread}'. 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.dsl.debug.Thread + * @generated + */ + public Adapter createThreadAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.dsl.debug.StackFrame Stack + * Frame}'. 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.dsl.debug.StackFrame + * @generated + */ + public Adapter createStackFrameAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.dsl.debug.Variable + * Variable}'. 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.dsl.debug.Variable + * @generated + */ + public Adapter createVariableAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.dsl.debug.CurrentSession + * Current Session}'. 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.dsl.debug.CurrentSession + * @generated + */ + public Adapter createCurrentSessionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.dsl.debug.RegisterGroup + * Register Group}'. 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.dsl.debug.RegisterGroup + * @generated + */ + public Adapter createRegisterGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.dsl.debug.Register + * Register}'. 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.dsl.debug.Register + * @generated + */ + public Adapter createRegisterAdapter() { + 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; + } + +} // DebugAdapterFactory diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/util/DebugSwitch.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/util/DebugSwitch.java similarity index 92% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/util/DebugSwitch.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/util/DebugSwitch.java index 62ea77b0d..25be01f2b 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src-gen/fr/obeo/dsl/debug/util/DebugSwitch.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src-gen/org/eclipse/gemoc/dsl/debug/util/DebugSwitch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,20 +8,19 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.util; - -import fr.obeo.dsl.debug.Contextual; -import fr.obeo.dsl.debug.CurrentSession; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.Register; -import fr.obeo.dsl.debug.RegisterGroup; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.Variable; +package org.eclipse.gemoc.dsl.debug.util; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.gemoc.dsl.debug.Contextual; +import org.eclipse.gemoc.dsl.debug.CurrentSession; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.Register; +import org.eclipse.gemoc.dsl.debug.RegisterGroup; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.Variable; /** * The Switch for the model's inheritance hierarchy. It supports the call @@ -29,7 +28,7 @@ * 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 fr.obeo.dsl.debug.DebugPackage + * @see org.eclipse.gemoc.dsl.debug.DebugPackage * @generated */ public class DebugSwitch extends Switch { @@ -61,7 +60,8 @@ public DebugSwitch() { /** * Checks whether this is a switch for the given package. * - * @parameter ePackage the package in question. + * @param ePackage + * the package in question. * @return whether this is a switch for the given package. * @generated */ @@ -97,7 +97,7 @@ protected T doSwitch(int classifierID, EObject theEObject) { return result; } case DebugPackage.THREAD: { - fr.obeo.dsl.debug.Thread thread = (fr.obeo.dsl.debug.Thread)theEObject; + org.eclipse.gemoc.dsl.debug.Thread thread = (org.eclipse.gemoc.dsl.debug.Thread)theEObject; T result = caseThread(thread); if (result == null) result = caseContextual(thread); @@ -190,7 +190,7 @@ public T caseDebugTarget(DebugTarget object) { * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseThread(fr.obeo.dsl.debug.Thread object) { + public T caseThread(org.eclipse.gemoc.dsl.debug.Thread object) { return null; } diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src/fr/obeo/dsl/debug/DebugTargetUtils.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src/org/eclipse/gemoc/dsl/debug/DebugTargetUtils.java similarity index 99% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src/fr/obeo/dsl/debug/DebugTargetUtils.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src/org/eclipse/gemoc/dsl/debug/DebugTargetUtils.java index 388e1b259..97dbb6c24 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src/fr/obeo/dsl/debug/DebugTargetUtils.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src/org/eclipse/gemoc/dsl/debug/DebugTargetUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug; +package org.eclipse.gemoc.dsl.debug; import org.eclipse.emf.ecore.EObject; diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src/fr/obeo/dsl/debug/ThreadUtils.java b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src/org/eclipse/gemoc/dsl/debug/ThreadUtils.java similarity index 99% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/src/fr/obeo/dsl/debug/ThreadUtils.java rename to simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src/org/eclipse/gemoc/dsl/debug/ThreadUtils.java index 35b20b5c4..99a970fe9 100644 --- a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/src/fr/obeo/dsl/debug/ThreadUtils.java +++ b/simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug/src/org/eclipse/gemoc/dsl/debug/ThreadUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug; +package org.eclipse.gemoc.dsl.debug; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; diff --git a/simulationmodelanimation/pom.xml b/simulationmodelanimation/pom.xml index c2fb8efc8..c94ddbaef 100644 --- a/simulationmodelanimation/pom.xml +++ b/simulationmodelanimation/pom.xml @@ -1,152 +1,216 @@ - + + 4.0.0 -Contributors: - Obeo - initial API and implementation ---> - - 4.0.0 + + 3.0 + - - 3.0 - + DSLDebugger + org.eclipse.gemoc.dsl.debug.parent + 2.3.0-SNAPSHOT + pom - DSLDebugger - fr.obeo.dsl.debug.parent - 1.0.0-SNAPSHOT - pom - - DSL Debugger Parent - - - Eclipse Public License v1.0 - + DSL Debugger Parent + + + Eclipse Public License v1.0 + 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.htm - - + + - - 0.25.0 - + + 0.26.0 + scm:git:https://github.com/SiriusLab/ModelDebugging.git + - - - plugins/fr.obeo.dsl.debug - plugins/fr.obeo.dsl.debug.edit - plugins/fr.obeo.dsl.debug.ide - plugins/fr.obeo.dsl.debug.ide.sirius.ui - plugins/fr.obeo.dsl.debug.ide.ui + + + plugins/org.eclipse.gemoc.dsl.debug + plugins/org.eclipse.gemoc.dsl.debug.edit + plugins/org.eclipse.gemoc.dsl.debug.ide + plugins/org.eclipse.gemoc.dsl.debug.ide.sirius.ui + plugins/org.eclipse.gemoc.dsl.debug.ide.ui - - tests/fr.obeo.dsl.debug.tests - + + tests/org.eclipse.gemoc.dsl.debug.tests + - - releng/fr.obeo.dsl.debug.feature - releng/fr.obeo.dsl.debug.ui.feature - releng/fr.obeo.dsl.debug.sirius.ui.feature - - - releng/fr.obeo.dsl.debug.repository - + + releng/org.eclipse.gemoc.dsl.debug.feature + releng/org.eclipse.gemoc.dsl.debug.ui.feature + releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature + - - - - org.eclipse.tycho - target-platform-configuration - ${tycho-version} - - p2 - - - linux - gtk - x86 - - - win32 - win32 - x86 - - - win32 - win32 - x86_64 - - - linux - gtk - x86_64 - - - macosx - cocoa - x86_64 - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - ../../releng/fr.obeo.dsl.debug.target/dsldebug-luna - - - - - - - - org.eclipse.tycho - tycho-maven-plugin - ${tycho-version} - true - - - + + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + p2 + + + linux + gtk + x86 + + + win32 + win32 + x86 + + + win32 + win32 + x86_64 + + + linux + gtk + x86_64 + + + macosx + cocoa + x86_64 + + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + ../../releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-neon + + + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho-version} + + UTF-8 + 1.8 + 1.8 + + + + + org.eclipse.tycho + tycho-source-plugin + ${tycho-version} + + + plugin-source + + plugin-source + + + + + + + org.eclipse.tycho.extras + tycho-source-feature-plugin + ${tycho-version} + + + source-feature + package + + source-feature + + + + + + org.eclipse.tycho + tycho-p2-plugin + ${tycho-version} + + + attach-p2-metadata + package + + p2-metadata + + + + + + + org.eclipse.tycho + tycho-packaging-plugin + ${tycho-version} + + + org.eclipse.tycho.extras + tycho-sourceref-jgit + ${tycho-version} + + + + + true + + + + + - - - - quality - - false - - - - jacoco - reuseReports - - ../../target/jacoco.exec - - - - - org.jacoco - jacoco-maven-plugin - 0.5.6.201201232323 - - - - prepare-agent - - - true - ${sonar.jacoco.reportPath} - - - - - - - - + + + + quality + + false + + + + jacoco + reuseReports + + ../target/jacoco.exec + + + + + org.jacoco + jacoco-maven-plugin + 0.5.6.201201232323 + + + + prepare-agent + + + true + ${sonar.jacoco.reportPath} + + + + + + + + diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/.project b/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/.project deleted file mode 100644 index 7b5e2333d..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - fr.obeo.dsl.debug.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/build.properties b/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/build.properties deleted file mode 100644 index 06123cb56..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/build.properties +++ /dev/null @@ -1,11 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### -bin.includes = feature.xml diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/feature.xml b/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/feature.xml deleted file mode 100644 index 7a754b1f5..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/feature.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - This feature provides the DSL debugger. - - - - Copyright (c) 2015 Obeo. -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: - Obeo - initial API and implementation - - - - [Enter License Description here.] - - - - - - - - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/pom.xml b/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/pom.xml deleted file mode 100644 index 9eb60ba25..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.feature/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.feature - 1.0.0-SNAPSHOT - eclipse-feature - - DSL Debugger Feature - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/.project b/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/.project deleted file mode 100644 index 9a69f2dc0..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - fr.obeo.dsl.debug.repository - - - - - - org.eclipse.pde.UpdateSiteBuilder - - - - - - org.eclipse.pde.UpdateSiteNature - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/category.xml b/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/category.xml deleted file mode 100644 index 2f11190a6..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/category.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/pom.xml b/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/pom.xml deleted file mode 100644 index 8c3a14254..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../pom.xml - - DSLDebugger - fr.obeo.dsl.debug.repository - 1.0.0-SNAPSHOT - eclipse-repository - - - - - org.eclipse.tycho - tycho-p2-repository-plugin - ${tycho-version} - - false - true - true - - - - - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/.project b/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/.project deleted file mode 100644 index f356efa5b..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - fr.obeo.dsl.debug.sirius.ui.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/build.properties b/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/build.properties deleted file mode 100644 index 06123cb56..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/build.properties +++ /dev/null @@ -1,11 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### -bin.includes = feature.xml diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/feature.xml b/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/feature.xml deleted file mode 100644 index 08270c7c0..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/feature.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - This feature provides action and services to ease the use of the DSL debugger with Sirius. - - - - Copyright (c) 2015 Obeo. -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: - Obeo - initial API and implementation - - - - [Enter License Description here.] - - - - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/pom.xml b/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/pom.xml deleted file mode 100644 index bf2b1677a..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.sirius.ui.feature - 1.0.0-SNAPSHOT - eclipse-feature - - DSL Debugger Sirius UI Feature - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.target/.project b/simulationmodelanimation/releng/fr.obeo.dsl.debug.target/.project deleted file mode 100644 index 1b9b2ab8e..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.target/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - fr.obeo.dsl.debug.target - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/.project b/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/.project deleted file mode 100644 index 3f01338ae..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - fr.obeo.dsl.debug.ui.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/build.properties b/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/build.properties deleted file mode 100644 index 06123cb56..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/build.properties +++ /dev/null @@ -1,11 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### -bin.includes = feature.xml diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/feature.xml b/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/feature.xml deleted file mode 100644 index dda2747ed..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/feature.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - This feature provides classes to ease the use of -the DSL debugger with EMF editors. - - - - Copyright (c) 2015 Obeo. -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: - Obeo - initial API and implementation - - - - [Enter License Description here.] - - - - - diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/pom.xml b/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/pom.xml deleted file mode 100644 index bc574eaae..000000000 --- a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.ui.feature - 1.0.0-SNAPSHOT - eclipse-feature - - DSL Debugger UI Feature - - diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/.project b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/.project new file mode 100644 index 000000000..7eb2ae543 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.gemoc.dsl.debug.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/about.html b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/about.html similarity index 100% rename from simulationmodelanimation/releng/fr.obeo.dsl.debug.repository/about.html rename to simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/about.html diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/build.properties b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/build.properties new file mode 100644 index 000000000..5d2c6b7d2 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/feature.properties b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/feature.xml b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/feature.xml new file mode 100644 index 000000000..bcaf5b7fe --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/feature.xml @@ -0,0 +1,49 @@ + + + + + This feature provides the DSL debugger. + + + + Copyright (c) 2015, 2017 Obeo 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: + Obeo - initial API and implementation + + + + %license + + + + + + + + + diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/gemocstudio32.png b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/gemocstudio32.png differ diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/license.html b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/pom.xml b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/pom.xml new file mode 100644 index 000000000..e0eca1906 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.feature/pom.xml @@ -0,0 +1,28 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.feature + 2.3.0-SNAPSHOT + eclipse-feature + + DSL Debugger Feature + + diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/.project b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/.project new file mode 100644 index 000000000..c11d989d6 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.gemoc.dsl.debug.sirius.ui.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/about.html b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/about.html similarity index 100% rename from simulationmodelanimation/releng/fr.obeo.dsl.debug.sirius.ui.feature/about.html rename to simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/about.html diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/build.properties b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/build.properties new file mode 100644 index 000000000..5d2c6b7d2 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/feature.properties b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/feature.xml b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/feature.xml new file mode 100644 index 000000000..ca8eb5330 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/feature.xml @@ -0,0 +1,35 @@ + + + + + This feature provides action and services to ease the use of the DSL debugger with Sirius. + + + + Copyright (c) 2015, 2017 Obeo 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: + Obeo - initial API and implementation + + + + %license + + + + + diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/gemocstudio32.png b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/gemocstudio32.png differ diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/license.html b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/pom.xml b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/pom.xml new file mode 100644 index 000000000..3a4829cc3 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.sirius.ui.feature/pom.xml @@ -0,0 +1,28 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.sirius.ui.feature + 2.3.0-SNAPSHOT + eclipse-feature + + DSL Debugger Sirius UI Feature + + diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.target/.classpath b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/.classpath similarity index 100% rename from simulationmodelanimation/releng/fr.obeo.dsl.debug.target/.classpath rename to simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/.classpath diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.target/.gitignore b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/.gitignore similarity index 100% rename from simulationmodelanimation/releng/fr.obeo.dsl.debug.target/.gitignore rename to simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/.gitignore diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/.project b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/.project new file mode 100644 index 000000000..45c3782e3 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/.project @@ -0,0 +1,17 @@ + + + org.eclipse.gemoc.dsl.debug.target + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.target/dsldebug-luna.target b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-luna.target similarity index 100% rename from simulationmodelanimation/releng/fr.obeo.dsl.debug.target/dsldebug-luna.target rename to simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-luna.target diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.target/dsldebug-luna.tpd b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-luna.tpd similarity index 100% rename from simulationmodelanimation/releng/fr.obeo.dsl.debug.target/dsldebug-luna.tpd rename to simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-luna.tpd diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-neon.target b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-neon.target new file mode 100644 index 000000000..e71de4762 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-neon.target @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-neon.tpd b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-neon.tpd new file mode 100644 index 000000000..e6d548750 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.target/dsldebug-neon.tpd @@ -0,0 +1,20 @@ +target "dsldebug_luna" with source, requirements + +location Eclipse-Neon "http://download.eclipse.org/releases/neon/201610111000" { + org.eclipse.platform.sdk lazy + org.eclipse.equinox.executable.feature.group lazy + org.eclipse.emf.edit.feature.group lazy + org.eclipse.emf.ecore.editor.feature.group lazy + org.eclipse.emf.transaction.feature.group lazy + org.eclipse.emf.ecore.feature.group lazy + org.eclipse.emf.edit.ui.feature.group lazy + org.eclipse.gmf.runtime.sdk.feature.group lazy + com.google.guava [15.0.0,16.0.0) + org.junit lazy +} + +location Sirius "http://download.eclipse.org/sirius/updates/nightly/4.1.x/neon" { + org.eclipse.sirius.runtime.feature.group lazy + org.eclipse.sirius.runtime.acceleo.feature.group lazy + org.eclipse.sirius.runtime.ide.ui.feature.group lazy +} \ No newline at end of file diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/.project b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/.project new file mode 100644 index 000000000..0800288a6 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.gemoc.dsl.debug.ui.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/about.html b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/about.html similarity index 100% rename from simulationmodelanimation/releng/fr.obeo.dsl.debug.ui.feature/about.html rename to simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/about.html diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/build.properties b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/build.properties new file mode 100644 index 000000000..5d2c6b7d2 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/feature.properties b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/feature.xml b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/feature.xml new file mode 100644 index 000000000..18779957f --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/feature.xml @@ -0,0 +1,36 @@ + + + + + This feature provides classes to ease the use of +the DSL debugger with EMF editors. + + + + Copyright (c) 2015, 2017 Obeo 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: + Obeo - initial API and implementation + + + + %license + + + + + diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/gemocstudio32.png b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/gemocstudio32.png differ diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/license.html b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/pom.xml b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/pom.xml new file mode 100644 index 000000000..92f6432e4 --- /dev/null +++ b/simulationmodelanimation/releng/org.eclipse.gemoc.dsl.debug.ui.feature/pom.xml @@ -0,0 +1,28 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.ui.feature + 2.3.0-SNAPSHOT + eclipse-feature + + DSL Debugger UI Feature + + diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.project b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.project deleted file mode 100644 index 91d3c9f02..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.obeo.dsl.debug.ide.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - net.sf.eclipsecs.core.CheckstyleBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - net.sf.eclipsecs.core.CheckstyleNature - - diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/META-INF/MANIFEST.MF b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 072e002ba..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.obeo.dsl.debug.ide.tests -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Vendor: %providerName -Require-Bundle: fr.obeo.dsl.debug.ide;bundle-version="1.0.0", - fr.obeo.dsl.debug;bundle-version="1.0.0", - org.eclipse.debug.core;bundle-version="3.7.0", - org.eclipse.core.runtime;bundle-version="3.7.0", - fr.obeo.dsl.debug.tests;bundle-version="1.0.0", - org.junit;bundle-version="4.0.0" diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/build.properties b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/build.properties deleted file mode 100644 index 3b9bc8676..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/build.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### -source.. = src/ -bin.includes = META-INF/,\ - . diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/fr.obeo.dsl.debug.ide.tests.launch b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/fr.obeo.dsl.debug.ide.tests.launch deleted file mode 100644 index 678a5a568..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/fr.obeo.dsl.debug.ide.tests.launch +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/plugin.properties b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/plugin.properties deleted file mode 100644 index 1eb8b9174..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### - -pluginName = Debug Model IDE Integration Tests -providerName = Obeo diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/pom.xml b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/pom.xml deleted file mode 100644 index d1a1e0abf..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.ide.tests - 1.0.0-SNAPSHOT - eclipse-test-plugin - - - -ea -Xmx1024m -XX:MaxPermSize=256m - -XstartOnFirstThread - ${ui.test.vmargs.all} - - - - - - org.eclipse.tycho - tycho-surefire-plugin - ${tycho-version} - - true - - **/AllTests.class - - true - false - ${ui.test.vmargs} - - - - - diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/AllTests.java b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/AllTests.java deleted file mode 100644 index 2082315a4..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/AllTests.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.tests; - -import fr.obeo.dsl.debug.ide.tests.adapter.AdapterTests; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -/** - * Aggregates tests for the fr.obeo.dsl.debug.ide plug-in. - * - * @author Yvan Lussaud - */ -@RunWith(Suite.class) -@SuiteClasses(value = {AdapterTests.class, DSLDebuggerTests.class, }) -public class AllTests { - -} diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/DSLDebuggerTests.java b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/DSLDebuggerTests.java deleted file mode 100644 index d5123445b..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/DSLDebuggerTests.java +++ /dev/null @@ -1,251 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.tests; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.Variable; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEvent; -import fr.obeo.dsl.debug.ide.event.debugger.TerminatedReply; -import fr.obeo.dsl.debug.ide.event.model.DisconnectRequest; -import fr.obeo.dsl.debug.ide.event.model.ResumeRequest; -import fr.obeo.dsl.debug.ide.event.model.SetVariableValueRequest; -import fr.obeo.dsl.debug.ide.event.model.StartRequest; -import fr.obeo.dsl.debug.ide.event.model.StepIntoRequest; -import fr.obeo.dsl.debug.ide.event.model.StepOverRequest; -import fr.obeo.dsl.debug.ide.event.model.StepReturnRequest; -import fr.obeo.dsl.debug.ide.event.model.SuspendRequest; -import fr.obeo.dsl.debug.ide.event.model.TerminateRequest; -import fr.obeo.dsl.debug.ide.event.model.ValidateVariableValueRequest; -import fr.obeo.dsl.debug.ide.tests.event.TestEventProcessor; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * Tests {@link fr.obeo.dsl.debug.ide.AbstractDSLDebugger AbstractDSLDebugger} class. - * - * @author Yvan Lussaud - */ -public class DSLDebuggerTests { - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventStartRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - debugger.handleEvent(new StartRequest()); - - assertTrue(debugger.hasStartCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventTerminateRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - debugger.handleEvent(new TerminateRequest()); - - assertTrue(debugger.hasTerminateCall()); - assertTrue(debugger.isTerminated()); - assertEquals(1, target.getEvents().size()); - IDSLDebugEvent event = target.getEvents().get(0); - assertTrue(event instanceof TerminatedReply); - assertEquals(null, ((TerminatedReply)event).getThreadName()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventTerminateThreadRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - debugger.spawnRunningThread("thread", DebugPackage.eINSTANCE.getDebugFactory().createVariable()); - debugger.handleEvent(new TerminateRequest("thread")); - - assertTrue(debugger.hasTerminateThreadCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventSuspendRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - debugger.handleEvent(new SuspendRequest()); - - assertTrue(debugger.hasSuspendCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventSuspendThreadRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - debugger.spawnRunningThread("thread", DebugPackage.eINSTANCE.getDebugFactory().createVariable()); - debugger.handleEvent(new SuspendRequest("thread")); - - assertTrue(debugger.hasSuspendThreadCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventResume() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - debugger.handleEvent(new ResumeRequest()); - - assertTrue(debugger.hasResumeCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventResumeThreadRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - debugger.spawnRunningThread("thread", DebugPackage.eINSTANCE.getDebugFactory().createVariable()); - debugger.handleEvent(new ResumeRequest("thread")); - - assertTrue(debugger.hasResumeThreadCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventStepIntoRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - debugger.spawnRunningThread("thread", instruction); - debugger.pushStackFrame("thread", "frame", instruction, instruction); - debugger.handleEvent(new StepIntoRequest("thread", instruction)); - - assertTrue(debugger.hasStepIntoCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventStepOverRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - debugger.spawnRunningThread("thread", instruction); - debugger.pushStackFrame("thread", "frame", instruction, instruction); - debugger.handleEvent(new StepOverRequest("thread", instruction)); - - assertTrue(debugger.hasStepOverCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventStepReturnRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - debugger.spawnRunningThread("thread", instruction); - debugger.pushStackFrame("thread", "frame", instruction, instruction); - debugger.handleEvent(new StepReturnRequest("thread", instruction)); - - assertTrue(debugger.hasStepReturnCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventDisconnectRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - debugger.spawnRunningThread("thread", instruction); - debugger.pushStackFrame("thread", "frame", instruction, instruction); - debugger.handleEvent(new DisconnectRequest()); - - assertTrue(debugger.hasDisconnectCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventSetVariableValueRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - debugger.spawnRunningThread("thread", instruction); - debugger.pushStackFrame("thread", "frame", instruction, instruction); - debugger.variable("thread", "frame", "int", "variable", "value", false); - debugger.handleEvent(new SetVariableValueRequest("thread", "frame", "variable", "value2")); - - assertTrue(debugger.hasSetVariableValueCall()); - } - - /** - * Tests - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. - */ - @Test - public void handleEventValidateVariableValueRequest() { - final TestEventProcessor target = new TestEventProcessor(); - final TestDSLDebugger debugger = new TestDSLDebugger(target); - - final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - debugger.spawnRunningThread("thread", instruction); - debugger.pushStackFrame("thread", "frame", instruction, instruction); - debugger.variable("thread", "frame", "int", "variable", "value", false); - debugger.handleEvent(new ValidateVariableValueRequest("thread", "frame", "variable", "value2")); - - assertTrue(debugger.hasValidateVariableValueCall()); - } - -} diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/TestDSLDebugger.java b/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/TestDSLDebugger.java deleted file mode 100644 index 8a6755a6e..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/TestDSLDebugger.java +++ /dev/null @@ -1,453 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.ide.tests; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.ide.AbstractDSLDebugger; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; - -import org.eclipse.emf.ecore.EObject; - -/** - * An {@link AbstractDSLDebugger} for test purpose. - * - * @author Yvan Lussaud - */ -public class TestDSLDebugger extends AbstractDSLDebugger { - - /** - * An interpreter. - * - * @author Yvan Lussaud - */ - private class Interpreter implements Runnable { - /** - * {@inheritDoc} - * - * @see java.lang.Runnable#run() - */ - public void run() { - spawnRunningThread(Thread.currentThread().getName(), INSTRUCTION_1); - boolean terminated = false; - while (!terminated) { - for (int i = 0; i < INSTRUCTIONS.length && !terminated; ++i) { - terminated = control(Thread.currentThread().getName(), INSTRUCTIONS[i]); - } - } - if (!isTerminated(Thread.currentThread().getName())) { - terminated(Thread.currentThread().getName()); - } - } - } - - /** - * The thread name. - */ - public static final String THREAD_NAME_1 = "THREAD_1"; - - /** - * The thread name. - */ - public static final String THREAD_NAME_2 = "THREAD_2"; - - /** - * The first {@link EObject instruction}. - */ - public static final EObject INSTRUCTION_1 = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - - /** - * The second {@link EObject instruction}. - */ - public static final EObject INSTRUCTION_2 = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - - /** - * The third {@link EObject instruction}. - */ - public static final EObject INSTRUCTION_3 = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); - - /** - * Instructions of the test interpreter. - */ - public static final EObject[] INSTRUCTIONS = new EObject[] {INSTRUCTION_1, INSTRUCTION_2, INSTRUCTION_3, }; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#disconnect()} call has been made. - */ - private boolean disconnectCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#start()} call has been made. - */ - private boolean startCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepInto(String)} call has been made. - */ - private boolean stepIntoCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepOver(String)} call has been made. - */ - private boolean stepOverCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepReturn(String)} call has been made. - */ - private boolean stepReturnCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#resume()} call has been made. - */ - private boolean resumeCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#resume(String)} call has been made. - */ - private boolean resumeThreadCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#suspend()} call has been made. - */ - private boolean suspendCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#suspend(String)} call has been made. - */ - private boolean suspendThreadCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#terminate()} call has been made. - */ - private boolean terminateCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#terminate(String)} call has been made. - */ - private boolean terminateThreadCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#updateData(String, EObject)} call has been made. - */ - private boolean updateDataCall; - - /** - * A call to - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#getNextInstruction(String, EObject, fr.obeo.dsl.debug.ide.IDSLDebugger.Stepping)} - * call has been made. - */ - private boolean getNextInstructionCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#validateVariableValue(String, String, String)} call - * has been made. - */ - private boolean validateVariableValueCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#getVariableValue(String, String, String, String)} - * call has been made. - */ - private boolean getVariableValueCall; - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#setVariableValue(String, String, String, Object)} - * call has been made. - */ - private boolean setVariableValueCall; - - /** - * Constructor. - * - * @param target - * the {@link fr.obeo.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous - * communication or the {@link fr.obeo.dsl.debug.ide.DSLDebugTargetAdapter target} for - * synchronous communication - */ - public TestDSLDebugger(IDSLDebugEventProcessor target) { - super(target); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.fr.obeo.dsl.debug.ide.IDSLDebugger#start() - */ - public void start() { - startCall = true; - new Thread(new Interpreter(), THREAD_NAME_1).start(); - new Thread(new Interpreter(), THREAD_NAME_2).start(); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.fr.obeo.dsl.debug.ide.IDSLDebugger#disconnect() - */ - public void disconnect() { - disconnectCall = true; - } - - @Override - public void stepInto(String threadName) { - stepIntoCall = true; - super.stepInto(threadName); - } - - @Override - public void stepOver(String threadName) { - stepOverCall = true; - super.stepOver(threadName); - } - - @Override - public void stepReturn(String threadName) { - stepReturnCall = true; - super.stepReturn(threadName); - } - - @Override - public void resume() { - resumeCall = true; - super.resume(); - } - - @Override - public void resume(String threadName) { - resumeThreadCall = true; - super.resume(threadName); - } - - @Override - public void suspend() { - suspendCall = true; - super.suspend(); - } - - @Override - public void suspend(String threadName) { - suspendThreadCall = true; - super.suspend(threadName); - } - - @Override - public void terminate() { - terminateCall = true; - super.terminate(); - } - - @Override - public void terminate(String threadName) { - terminateThreadCall = true; - super.terminate(threadName); - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.fr.obeo.dsl.debug.ide.IDSLDebugger#canStepInto(java.lang.String, - * org.eclipse.emf.ecore.EObject) - */ - public boolean canStepInto(String threadName, EObject instruction) { - return false; - } - - /** - * {@inheritDoc} - * - * @see fr.obeo.dsl.debug.ide.fr.obeo.dsl.debug.ide.IDSLDebugger#updateData(java.lang.String, - * org.eclipse.emf.ecore.EObject) - */ - public void updateData(String threadName, EObject instruction) { - updateDataCall = true; - } - - @Override - public EObject getNextInstruction(String threadName, EObject currentInstruction, Stepping stepping) { - getNextInstructionCall = true; - return super.getNextInstruction(threadName, currentInstruction, stepping); - } - - public boolean validateVariableValue(String threadName, String variableName, String value) { - validateVariableValueCall = true; - return false; - } - - public Object getVariableValue(String threadName, String stackName, String variableName, String value) { - getVariableValueCall = true; - return null; - } - - public void setVariableValue(String threadName, String stackName, String variableName, Object value) { - setVariableValueCall = true; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#disconnect()} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#disconnect()} has been - * made. - */ - public boolean hasDisconnectCall() { - return disconnectCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#start()} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#start()} has been - * made. - */ - public boolean hasStartCall() { - return startCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepInto(String)} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepInto(String)} has - * been made. - */ - public boolean hasStepIntoCall() { - return stepIntoCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepOver(String)} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepOver(String)} has - * been made. - */ - public boolean hasStepOverCall() { - return stepOverCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepReturn(String)} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#stepReturn(String)} - * has been made. - */ - public boolean hasStepReturnCall() { - return stepReturnCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#resume()} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#resume()} has been - * made. - */ - public boolean hasResumeCall() { - return resumeCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#resume(String)} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#resume(String)} has - * been made. - */ - public boolean hasResumeThreadCall() { - return resumeThreadCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#suspend()} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#suspend()} has been - * made. - */ - public boolean hasSuspendCall() { - return suspendCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#suspend(String)} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#suspend(String)} has - * been made. - */ - public boolean hasSuspendThreadCall() { - return suspendThreadCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#terminate()} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#terminate()} has been - * made. - */ - public boolean hasTerminateCall() { - return terminateCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#terminate(String)} call has been made. - * - * @return true if a call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#terminate(String)} has - * been made. - */ - public boolean hasTerminateThreadCall() { - return terminateThreadCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#updateData(String, EObject)} call has been made. - * - * @return true if a call to - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#updateData(String, EObject)} has been made - */ - public boolean hasUpdateDataCall() { - return updateDataCall; - } - - /** - * A call to - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#getNextInstruction(String, EObject, fr.obeo.dsl.debug.ide.IDSLDebugger.Stepping)} - * call has been made. - * - * @return true if a call to - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#getNextInstruction(String, EObject, fr.obeo.dsl.debug.ide.IDSLDebugger.Stepping)} - * has been made - */ - public boolean hasGetNextInstructionCall() { - return getNextInstructionCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#validateVariableValue(String, String, String)} call - * has been made. - * - * @return true if a call to - * {@link fr.obeo.dsl.debug.ide.IDSLDebugger#validateVariableValue(String, String, String)} call - * has been made - */ - public boolean hasValidateVariableValueCall() { - return validateVariableValueCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#getVariableValue(String, String, String, String)} - * call has been made. - */ - public boolean hasGetVariableValueCall() { - return getVariableValueCall; - } - - /** - * A call to {@link fr.obeo.dsl.debug.ide.IDSLDebugger#setVariableValue(String, String, String, Object)} - * call has been made. - */ - public boolean hasSetVariableValueCall() { - return setVariableValueCall; - } - -} diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.classpath b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.classpath deleted file mode 100644 index 64c5e31b7..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.project b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.project deleted file mode 100644 index 4e4c17afc..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.obeo.dsl.debug.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - net.sf.eclipsecs.core.CheckstyleBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - net.sf.eclipsecs.core.CheckstyleNature - - diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.settings/org.eclipse.jdt.core.prefs b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 5fc34d704..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,291 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=1 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=110 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=8 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=110 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=tab -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_on_off_tags=false -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=false diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/META-INF/MANIFEST.MF b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 584d0ac64..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.obeo.dsl.debug.tests;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Require-Bundle: fr.obeo.dsl.debug;bundle-version="1.0.0", - org.junit;bundle-version="4.0.0" -Export-Package: fr.obeo.dsl.debug.tests diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/build.properties b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/build.properties deleted file mode 100644 index 3b9bc8676..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/build.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### -source.. = src/ -bin.includes = META-INF/,\ - . diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/fr.obeo.dsl.debug.tests.launch b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/fr.obeo.dsl.debug.tests.launch deleted file mode 100644 index ec2528186..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/fr.obeo.dsl.debug.tests.launch +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/plugin.properties b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/plugin.properties deleted file mode 100644 index ca8ba4c54..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2015 Obeo. -# 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: -# Obeo - initial API and implementation -############################################################################### - -pluginName = Debug Model Tests -providerName = Obeo diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/pom.xml b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/pom.xml deleted file mode 100644 index 4652fa8b5..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - 4.0.0 - - fr.obeo.dsl.debug.parent - DSLDebugger - 1.0.0-SNAPSHOT - ../../ - - DSLDebugger - fr.obeo.dsl.debug.tests - 1.0.0-SNAPSHOT - eclipse-test-plugin - - - -ea -Xmx1024m -XX:MaxPermSize=256m - -XstartOnFirstThread - ${ui.test.vmargs.all} - - - - - org.eclipse.tycho - tycho-surefire-plugin - ${tycho-version} - - - **/AllTests.class - - false - false - ${ui.test.vmargs} - org.eclipse.ui.ide.workbench - org.eclipse.e4.ide.application.product - - - - - diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/AllTests.java b/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/AllTests.java deleted file mode 100644 index 6f56b6f48..000000000 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/AllTests.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.obeo.dsl.debug.tests; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -/** - * Aggregates tests for the fr.obeo.dsl.debug plug-in. - * - * @author Yvan Lussaud - */ -@RunWith(Suite.class) -@SuiteClasses(value = {DebugTargetUtilsTests.class, ThreadUtilsTests.class }) -public class AllTests { - -} diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.checkstyle b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.checkstyle similarity index 100% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.checkstyle rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.checkstyle diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.classpath b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.classpath similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug.ide/.classpath rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.classpath diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.project b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.project new file mode 100644 index 000000000..a332b6032 --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.dsl.debug.ide.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/simulationmodelanimation/plugins/fr.obeo.dsl.debug/.settings/org.eclipse.jdt.core.prefs b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from simulationmodelanimation/plugins/fr.obeo.dsl.debug/.settings/org.eclipse.jdt.core.prefs rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.settings/org.eclipse.jdt.core.prefs diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.settings/org.eclipse.jdt.ui.prefs b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.settings/org.eclipse.jdt.ui.prefs rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/.settings/org.eclipse.jdt.ui.prefs diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/META-INF/MANIFEST.MF b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/META-INF/MANIFEST.MF new file mode 100644 index 000000000..55cf97412 --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.dsl.debug.ide.tests +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Vendor: %providerName +Require-Bundle: org.eclipse.gemoc.dsl.debug.ide;bundle-version="1.0.0", + org.eclipse.gemoc.dsl.debug;bundle-version="1.0.0", + org.eclipse.debug.core;bundle-version="3.7.0", + org.eclipse.core.runtime;bundle-version="3.7.0", + org.eclipse.gemoc.dsl.debug.tests;bundle-version="1.0.0", + org.junit;bundle-version="4.0.0" diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/about.html b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/about.html similarity index 100% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/about.html rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/about.html diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/build.properties b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/build.properties new file mode 100644 index 000000000..e1c39430c --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/build.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### +source.. = src/ +bin.includes = META-INF/,\ + . diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/org.eclipse.gemoc.dsl.debug.ide.tests.launch b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/org.eclipse.gemoc.dsl.debug.ide.tests.launch new file mode 100644 index 000000000..8c8dfe752 --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/org.eclipse.gemoc.dsl.debug.ide.tests.launch @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/plugin.properties b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/plugin.properties new file mode 100644 index 000000000..f1e1015c2 --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/plugin.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### + +pluginName = Debug Model IDE Integration Tests +providerName = Obeo diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/pom.xml b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/pom.xml new file mode 100644 index 000000000..a734f304a --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/pom.xml @@ -0,0 +1,50 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.ide.tests + 2.3.0-SNAPSHOT + eclipse-test-plugin + + + -ea -Xmx1024m -XX:MaxPermSize=256m + -XstartOnFirstThread + ${ui.test.vmargs.all} + + + + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho-version} + + true + + **/AllTests.class + + true + false + ${ui.test.vmargs} + + + + + diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/AllTests.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/AllTests.java new file mode 100644 index 000000000..82738d7bb --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/AllTests.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.tests; + +import org.eclipse.gemoc.dsl.debug.ide.tests.adapter.AdapterTests; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +/** + * Aggregates tests for the org.eclipse.gemoc.dsl.debug.ide plug-in. + * + * @author Yvan Lussaud + */ +@RunWith(Suite.class) +@SuiteClasses(value = {AdapterTests.class, DSLDebuggerTests.class, }) +public class AllTests { + +} diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/DSLDebuggerTests.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/DSLDebuggerTests.java new file mode 100644 index 000000000..7c21c66a2 --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/DSLDebuggerTests.java @@ -0,0 +1,251 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.tests; + +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.Variable; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.TerminatedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.model.DisconnectRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ResumeRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.SetVariableValueRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StartRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepIntoRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepOverRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StepReturnRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.SuspendRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.TerminateRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ValidateVariableValueRequest; +import org.eclipse.gemoc.dsl.debug.ide.tests.event.TestEventProcessor; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +/** + * Tests {@link org.eclipse.gemoc.dsl.debug.ide.AbstractDSLDebugger AbstractDSLDebugger} class. + * + * @author Yvan Lussaud + */ +public class DSLDebuggerTests { + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventStartRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + debugger.handleEvent(new StartRequest()); + + assertTrue(debugger.hasStartCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventTerminateRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + debugger.handleEvent(new TerminateRequest()); + + assertTrue(debugger.hasTerminateCall()); + assertTrue(debugger.isTerminated()); + assertEquals(1, target.getEvents().size()); + IDSLDebugEvent event = target.getEvents().get(0); + assertTrue(event instanceof TerminatedReply); + assertEquals(null, ((TerminatedReply)event).getThreadName()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventTerminateThreadRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + debugger.spawnRunningThread("thread", DebugPackage.eINSTANCE.getDebugFactory().createVariable()); + debugger.handleEvent(new TerminateRequest("thread")); + + assertTrue(debugger.hasTerminateThreadCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventSuspendRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + debugger.handleEvent(new SuspendRequest()); + + assertTrue(debugger.hasSuspendCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventSuspendThreadRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + debugger.spawnRunningThread("thread", DebugPackage.eINSTANCE.getDebugFactory().createVariable()); + debugger.handleEvent(new SuspendRequest("thread")); + + assertTrue(debugger.hasSuspendThreadCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventResume() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + debugger.handleEvent(new ResumeRequest()); + + assertTrue(debugger.hasResumeCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventResumeThreadRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + debugger.spawnRunningThread("thread", DebugPackage.eINSTANCE.getDebugFactory().createVariable()); + debugger.handleEvent(new ResumeRequest("thread")); + + assertTrue(debugger.hasResumeThreadCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventStepIntoRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + debugger.spawnRunningThread("thread", instruction); + debugger.pushStackFrame("thread", "frame", instruction, instruction); + debugger.handleEvent(new StepIntoRequest("thread", instruction)); + + assertTrue(debugger.hasStepIntoCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventStepOverRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + debugger.spawnRunningThread("thread", instruction); + debugger.pushStackFrame("thread", "frame", instruction, instruction); + debugger.handleEvent(new StepOverRequest("thread", instruction)); + + assertTrue(debugger.hasStepOverCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventStepReturnRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + debugger.spawnRunningThread("thread", instruction); + debugger.pushStackFrame("thread", "frame", instruction, instruction); + debugger.handleEvent(new StepReturnRequest("thread", instruction)); + + assertTrue(debugger.hasStepReturnCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventDisconnectRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + debugger.spawnRunningThread("thread", instruction); + debugger.pushStackFrame("thread", "frame", instruction, instruction); + debugger.handleEvent(new DisconnectRequest()); + + assertTrue(debugger.hasDisconnectCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventSetVariableValueRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + debugger.spawnRunningThread("thread", instruction); + debugger.pushStackFrame("thread", "frame", instruction, instruction); + debugger.variable("thread", "frame", "int", "variable", "value", false); + debugger.handleEvent(new SetVariableValueRequest("thread", "frame", "variable", "value2")); + + assertTrue(debugger.hasSetVariableValueCall()); + } + + /** + * Tests + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. + */ + @Test + public void handleEventValidateVariableValueRequest() { + final TestEventProcessor target = new TestEventProcessor(); + final TestDSLDebugger debugger = new TestDSLDebugger(target); + + final Variable instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + debugger.spawnRunningThread("thread", instruction); + debugger.pushStackFrame("thread", "frame", instruction, instruction); + debugger.variable("thread", "frame", "int", "variable", "value", false); + debugger.handleEvent(new ValidateVariableValueRequest("thread", "frame", "variable", "value2")); + + assertTrue(debugger.hasValidateVariableValueCall()); + } + +} diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/TestDSLDebugger.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/TestDSLDebugger.java new file mode 100644 index 000000000..26d5b6d1a --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/TestDSLDebugger.java @@ -0,0 +1,453 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.ide.tests; + +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.ide.AbstractDSLDebugger; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; + +import org.eclipse.emf.ecore.EObject; + +/** + * An {@link AbstractDSLDebugger} for test purpose. + * + * @author Yvan Lussaud + */ +public class TestDSLDebugger extends AbstractDSLDebugger { + + /** + * An interpreter. + * + * @author Yvan Lussaud + */ + private class Interpreter implements Runnable { + /** + * {@inheritDoc} + * + * @see java.lang.Runnable#run() + */ + public void run() { + spawnRunningThread(Thread.currentThread().getName(), INSTRUCTION_1); + boolean terminated = false; + while (!terminated) { + for (int i = 0; i < INSTRUCTIONS.length && !terminated; ++i) { + terminated = control(Thread.currentThread().getName(), INSTRUCTIONS[i]); + } + } + if (!isTerminated(Thread.currentThread().getName())) { + terminated(Thread.currentThread().getName()); + } + } + } + + /** + * The thread name. + */ + public static final String THREAD_NAME_1 = "THREAD_1"; + + /** + * The thread name. + */ + public static final String THREAD_NAME_2 = "THREAD_2"; + + /** + * The first {@link EObject instruction}. + */ + public static final EObject INSTRUCTION_1 = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + + /** + * The second {@link EObject instruction}. + */ + public static final EObject INSTRUCTION_2 = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + + /** + * The third {@link EObject instruction}. + */ + public static final EObject INSTRUCTION_3 = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); + + /** + * Instructions of the test interpreter. + */ + public static final EObject[] INSTRUCTIONS = new EObject[] {INSTRUCTION_1, INSTRUCTION_2, INSTRUCTION_3, }; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#disconnect()} call has been made. + */ + private boolean disconnectCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#start()} call has been made. + */ + private boolean startCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepInto(String)} call has been made. + */ + private boolean stepIntoCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepOver(String)} call has been made. + */ + private boolean stepOverCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepReturn(String)} call has been made. + */ + private boolean stepReturnCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resume()} call has been made. + */ + private boolean resumeCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resume(String)} call has been made. + */ + private boolean resumeThreadCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspend()} call has been made. + */ + private boolean suspendCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspend(String)} call has been made. + */ + private boolean suspendThreadCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminate()} call has been made. + */ + private boolean terminateCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminate(String)} call has been made. + */ + private boolean terminateThreadCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#updateData(String, EObject)} call has been made. + */ + private boolean updateDataCall; + + /** + * A call to + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#getNextInstruction(String, EObject, org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger.Stepping)} + * call has been made. + */ + private boolean getNextInstructionCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#validateVariableValue(String, String, String)} call + * has been made. + */ + private boolean validateVariableValueCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#getVariableValue(String, String, String, String)} + * call has been made. + */ + private boolean getVariableValueCall; + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#setVariableValue(String, String, String, Object)} + * call has been made. + */ + private boolean setVariableValueCall; + + /** + * Constructor. + * + * @param target + * the {@link org.eclipse.gemoc.dsl.debug.ide.event.DSLDebugEventDispatcher dispatcher} for asynchronous + * communication or the {@link org.eclipse.gemoc.dsl.debug.ide.DSLDebugTargetAdapter target} for + * synchronous communication + */ + public TestDSLDebugger(IDSLDebugEventProcessor target) { + super(target); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#start() + */ + public void start() { + startCall = true; + new Thread(new Interpreter(), THREAD_NAME_1).start(); + new Thread(new Interpreter(), THREAD_NAME_2).start(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#disconnect() + */ + public void disconnect() { + disconnectCall = true; + } + + @Override + public void stepInto(String threadName) { + stepIntoCall = true; + super.stepInto(threadName); + } + + @Override + public void stepOver(String threadName) { + stepOverCall = true; + super.stepOver(threadName); + } + + @Override + public void stepReturn(String threadName) { + stepReturnCall = true; + super.stepReturn(threadName); + } + + @Override + public void resume() { + resumeCall = true; + super.resume(); + } + + @Override + public void resume(String threadName) { + resumeThreadCall = true; + super.resume(threadName); + } + + @Override + public void suspend() { + suspendCall = true; + super.suspend(); + } + + @Override + public void suspend(String threadName) { + suspendThreadCall = true; + super.suspend(threadName); + } + + @Override + public void terminate() { + terminateCall = true; + super.terminate(); + } + + @Override + public void terminate(String threadName) { + terminateThreadCall = true; + super.terminate(threadName); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#canStepInto(java.lang.String, + * org.eclipse.emf.ecore.EObject) + */ + public boolean canStepInto(String threadName, EObject instruction) { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.gemoc.dsl.debug.ide.org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#updateData(java.lang.String, + * org.eclipse.emf.ecore.EObject) + */ + public void updateData(String threadName, EObject instruction) { + updateDataCall = true; + } + + @Override + public EObject getNextInstruction(String threadName, EObject currentInstruction, Stepping stepping) { + getNextInstructionCall = true; + return super.getNextInstruction(threadName, currentInstruction, stepping); + } + + public boolean validateVariableValue(String threadName, String variableName, String value) { + validateVariableValueCall = true; + return false; + } + + public Object getVariableValue(String threadName, String stackName, String variableName, String value) { + getVariableValueCall = true; + return null; + } + + public void setVariableValue(String threadName, String stackName, String variableName, Object value) { + setVariableValueCall = true; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#disconnect()} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#disconnect()} has been + * made. + */ + public boolean hasDisconnectCall() { + return disconnectCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#start()} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#start()} has been + * made. + */ + public boolean hasStartCall() { + return startCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepInto(String)} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepInto(String)} has + * been made. + */ + public boolean hasStepIntoCall() { + return stepIntoCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepOver(String)} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepOver(String)} has + * been made. + */ + public boolean hasStepOverCall() { + return stepOverCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepReturn(String)} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#stepReturn(String)} + * has been made. + */ + public boolean hasStepReturnCall() { + return stepReturnCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resume()} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resume()} has been + * made. + */ + public boolean hasResumeCall() { + return resumeCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resume(String)} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#resume(String)} has + * been made. + */ + public boolean hasResumeThreadCall() { + return resumeThreadCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspend()} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspend()} has been + * made. + */ + public boolean hasSuspendCall() { + return suspendCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspend(String)} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#suspend(String)} has + * been made. + */ + public boolean hasSuspendThreadCall() { + return suspendThreadCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminate()} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminate()} has been + * made. + */ + public boolean hasTerminateCall() { + return terminateCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminate(String)} call has been made. + * + * @return true if a call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#terminate(String)} has + * been made. + */ + public boolean hasTerminateThreadCall() { + return terminateThreadCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#updateData(String, EObject)} call has been made. + * + * @return true if a call to + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#updateData(String, EObject)} has been made + */ + public boolean hasUpdateDataCall() { + return updateDataCall; + } + + /** + * A call to + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#getNextInstruction(String, EObject, org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger.Stepping)} + * call has been made. + * + * @return true if a call to + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#getNextInstruction(String, EObject, org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger.Stepping)} + * has been made + */ + public boolean hasGetNextInstructionCall() { + return getNextInstructionCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#validateVariableValue(String, String, String)} call + * has been made. + * + * @return true if a call to + * {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#validateVariableValue(String, String, String)} call + * has been made + */ + public boolean hasValidateVariableValueCall() { + return validateVariableValueCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#getVariableValue(String, String, String, String)} + * call has been made. + */ + public boolean hasGetVariableValueCall() { + return getVariableValueCall; + } + + /** + * A call to {@link org.eclipse.gemoc.dsl.debug.ide.IDSLDebugger#setVariableValue(String, String, String, Object)} + * call has been made. + */ + public boolean hasSetVariableValueCall() { + return setVariableValueCall; + } + +} diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/AdapterTests.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/AdapterTests.java similarity index 82% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/AdapterTests.java rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/AdapterTests.java index 535b969b9..114fc59f7 100644 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/AdapterTests.java +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/AdapterTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,14 +8,14 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.tests.adapter; +package org.eclipse.gemoc.dsl.debug.ide.tests.adapter; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** - * Aggregates tests fr.obeo.dsl.debug.ide.tests.adapter package. + * Aggregates tests org.eclipse.gemoc.dsl.debug.ide.tests.adapter package. * * @author Yvan Lussaud */ diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/DSLDebugTargetAdapterTests.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/DSLDebugTargetAdapterTests.java similarity index 90% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/DSLDebugTargetAdapterTests.java rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/DSLDebugTargetAdapterTests.java index f197191fa..3c57bbc26 100644 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/DSLDebugTargetAdapterTests.java +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/DSLDebugTargetAdapterTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,36 +8,36 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.tests.adapter; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetState; -import fr.obeo.dsl.debug.ThreadUtils; -import fr.obeo.dsl.debug.ide.DSLEclipseDebugIntegration; -import fr.obeo.dsl.debug.ide.ModelUpdater; -import fr.obeo.dsl.debug.ide.adapter.DSLDebugTargetAdapter; -import fr.obeo.dsl.debug.ide.event.debugger.BreakpointReply; -import fr.obeo.dsl.debug.ide.event.debugger.DeleteVariableReply; -import fr.obeo.dsl.debug.ide.event.debugger.PopStackFrameReply; -import fr.obeo.dsl.debug.ide.event.debugger.PushStackFrameReply; -import fr.obeo.dsl.debug.ide.event.debugger.ResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.SetCurrentInstructionReply; -import fr.obeo.dsl.debug.ide.event.debugger.SetVariableValueReply; -import fr.obeo.dsl.debug.ide.event.debugger.SpawnRunningThreadReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepIntoResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepOverResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.StepReturnResumingReply; -import fr.obeo.dsl.debug.ide.event.debugger.SteppedReply; -import fr.obeo.dsl.debug.ide.event.debugger.SuspendedReply; -import fr.obeo.dsl.debug.ide.event.debugger.TerminatedReply; -import fr.obeo.dsl.debug.ide.event.debugger.VariableReply; -import fr.obeo.dsl.debug.ide.event.model.ResumeRequest; -import fr.obeo.dsl.debug.ide.event.model.StartRequest; -import fr.obeo.dsl.debug.ide.event.model.SuspendRequest; -import fr.obeo.dsl.debug.ide.event.model.TerminateRequest; -import fr.obeo.dsl.debug.ide.tests.event.TestEventProcessor; -import fr.obeo.dsl.debug.tests.AbstractDebugTests; +package org.eclipse.gemoc.dsl.debug.ide.tests.adapter; + +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetState; +import org.eclipse.gemoc.dsl.debug.ThreadUtils; +import org.eclipse.gemoc.dsl.debug.ide.DSLEclipseDebugIntegration; +import org.eclipse.gemoc.dsl.debug.ide.ModelUpdater; +import org.eclipse.gemoc.dsl.debug.ide.adapter.DSLDebugTargetAdapter; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.BreakpointReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.DeleteVariableReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.PopStackFrameReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.PushStackFrameReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.ResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SetCurrentInstructionReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SetVariableValueReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SpawnRunningThreadReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepIntoResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepOverResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.StepReturnResumingReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SteppedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.SuspendedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.TerminatedReply; +import org.eclipse.gemoc.dsl.debug.ide.event.debugger.VariableReply; +import org.eclipse.gemoc.dsl.debug.ide.event.model.ResumeRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.StartRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.SuspendRequest; +import org.eclipse.gemoc.dsl.debug.ide.event.model.TerminateRequest; +import org.eclipse.gemoc.dsl.debug.ide.tests.event.TestEventProcessor; +import org.eclipse.gemoc.dsl.debug.tests.AbstractDebugTests; import org.eclipse.debug.core.DebugEvent; import org.eclipse.debug.core.DebugException; @@ -220,7 +220,7 @@ public void getName() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -265,7 +265,7 @@ public void handleEventSuspendedReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -310,7 +310,7 @@ public void handleEventSteppedReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -355,7 +355,7 @@ public void handleEventBreakpointReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -392,7 +392,7 @@ public void handleEventTerminatedReplyThread() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -427,7 +427,7 @@ public void handleEventTerminatedReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -466,7 +466,7 @@ public void handleEventSpawnRunningThreadReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -511,7 +511,7 @@ public void handleEventResumingReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -560,7 +560,7 @@ public void handleEventStepReturnResumingReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -605,7 +605,7 @@ public void handleEventStepOverResumingReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -652,7 +652,7 @@ public void handleEventStepIntoResumingReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -694,7 +694,7 @@ public void handleEventVariableReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -737,7 +737,7 @@ public void handleEventDeleteVariableReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -780,7 +780,7 @@ public void handleEventPushStackFrameReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -825,7 +825,7 @@ public void handleEventPopStackFrameReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail @@ -867,7 +867,7 @@ public void handleEventSetCurrentInstructionReply() throws DebugException { } /** - * Test {@link DSLDebugTargetAdapter#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent)}. + * Test {@link DSLDebugTargetAdapter#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent)}. * * @throws DebugException * if fail diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/TestDebugEventSetListener.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/TestDebugEventSetListener.java similarity index 95% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/TestDebugEventSetListener.java rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/TestDebugEventSetListener.java index 60f52ba2f..ed886fa26 100644 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/adapter/TestDebugEventSetListener.java +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/adapter/TestDebugEventSetListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.tests.adapter; +package org.eclipse.gemoc.dsl.debug.ide.tests.adapter; import java.util.ArrayList; import java.util.List; diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/event/TestEventProcessor.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/event/TestEventProcessor.java similarity index 76% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/event/TestEventProcessor.java rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/event/TestEventProcessor.java index eee11a9b2..026f8e448 100644 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/src/fr/obeo/dsl/debug/ide/tests/event/TestEventProcessor.java +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.ide.tests/src/org/eclipse/gemoc/dsl/debug/ide/tests/event/TestEventProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,10 +8,10 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.ide.tests.event; +package org.eclipse.gemoc.dsl.debug.ide.tests.event; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEvent; -import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent; +import org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor; import java.util.ArrayList; import java.util.List; @@ -32,7 +32,7 @@ public class TestEventProcessor implements IDSLDebugEventProcessor { /** * {@inheritDoc} * - * @see fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor#handleEvent(fr.obeo.dsl.debug.ide.event.IDSLDebugEvent) + * @see org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEventProcessor#handleEvent(org.eclipse.gemoc.dsl.debug.ide.event.IDSLDebugEvent) */ public Object handleEvent(IDSLDebugEvent event) { events.add(event); diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.checkstyle b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.checkstyle similarity index 100% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.checkstyle rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.checkstyle diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.classpath b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.classpath similarity index 100% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.classpath rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.classpath diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.project b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.project new file mode 100644 index 000000000..e1be638f2 --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.dsl.debug.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.settings/org.eclipse.jdt.core.prefs b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.ide.tests/.settings/org.eclipse.jdt.core.prefs rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.settings/org.eclipse.jdt.core.prefs diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.settings/org.eclipse.jdt.ui.prefs b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/.settings/org.eclipse.jdt.ui.prefs rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/.settings/org.eclipse.jdt.ui.prefs diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/META-INF/MANIFEST.MF b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/META-INF/MANIFEST.MF new file mode 100644 index 000000000..7a963974f --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.dsl.debug.tests;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.gemoc.dsl.debug;bundle-version="1.0.0", + org.junit;bundle-version="4.0.0" +Export-Package: org.eclipse.gemoc.dsl.debug.tests diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/about.html b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/about.html similarity index 100% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/about.html rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/about.html diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/build.properties b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/build.properties new file mode 100644 index 000000000..e1c39430c --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/build.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### +source.. = src/ +bin.includes = META-INF/,\ + . diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/org.eclipse.gemoc.dsl.debug.tests.launch b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/org.eclipse.gemoc.dsl.debug.tests.launch new file mode 100644 index 000000000..b88844c6b --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/org.eclipse.gemoc.dsl.debug.tests.launch @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/plugin.properties b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/plugin.properties new file mode 100644 index 000000000..e5b6bca43 --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/plugin.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2015, 2017 Obeo. +# 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: +# Obeo - initial API and implementation +############################################################################### + +pluginName = Debug Model Tests +providerName = Obeo diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/pom.xml b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/pom.xml new file mode 100644 index 000000000..b5f573554 --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/pom.xml @@ -0,0 +1,50 @@ + + + + 4.0.0 + + org.eclipse.gemoc.dsl.debug.parent + DSLDebugger + 2.3.0-SNAPSHOT + ../../ + + DSLDebugger + org.eclipse.gemoc.dsl.debug.tests + 2.3.0-SNAPSHOT + eclipse-test-plugin + + + -ea -Xmx1024m -XX:MaxPermSize=256m + -XstartOnFirstThread + ${ui.test.vmargs.all} + + + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho-version} + + + **/AllTests.class + + false + false + ${ui.test.vmargs} + org.eclipse.ui.ide.workbench + org.eclipse.e4.ide.application.product + + + + + diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/AbstractDebugTests.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/AbstractDebugTests.java similarity index 89% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/AbstractDebugTests.java rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/AbstractDebugTests.java index 805a2896a..2108e7128 100644 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/AbstractDebugTests.java +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/AbstractDebugTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,13 +8,13 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.tests; +package org.eclipse.gemoc.dsl.debug.tests; -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.State; -import fr.obeo.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.State; +import org.eclipse.gemoc.dsl.debug.Thread; /** * Class containing tests utility methods. @@ -72,7 +72,7 @@ public abstract class AbstractDebugTests { protected final int terminatedThreadIndex = 7; /** - * Creates {@link Thread} in the given {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState}: + * Creates {@link Thread} in the given {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState}: *
    *
  • 0 {@link State#RUNNING}.
  • *
  • 1 {@link State#SUSPENDING}.
  • @@ -85,7 +85,7 @@ public abstract class AbstractDebugTests { *
* * @param target - * the {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState} to populate. + * the {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState} to populate. */ protected void createThreads(DebugTarget target) { createRunningThread(target); @@ -100,7 +100,7 @@ protected void createThreads(DebugTarget target) { /** * Creates a {@link State#TERMINATED} {@link Thread} in the given - * {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState}. + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState}. * * @param target * the {@link DebugTarget} @@ -120,7 +120,7 @@ protected void createTerminatedThread(DebugTarget target) { /** * Creates a {@link State#TERMINATING} {@link Thread} in the given - * {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState}. + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState}. * * @param target * the {@link DebugTarget} @@ -140,7 +140,7 @@ protected void createTerminatingThread(DebugTarget target) { /** * Creates a {@link State#STEPPING_RETURN} {@link Thread} in the given - * {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState}. + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState}. * * @param target * the {@link DebugTarget} @@ -160,7 +160,7 @@ protected void createSteppingReturnThread(DebugTarget target) { /** * Creates a {@link State#STEPPING_OVER} {@link Thread} in the given - * {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState}. + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState}. * * @param target * the {@link DebugTarget} @@ -180,7 +180,7 @@ protected void createSteppingOverThread(DebugTarget target) { /** * Creates a {@link State#STEPPING_INTO} {@link Thread} in the given - * {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState}. + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState}. * * @param target * the {@link DebugTarget} @@ -200,7 +200,7 @@ protected void createSteppingIntoThread(DebugTarget target) { /** * Creates a {@link State#SUSPENDED} {@link Thread} in the given - * {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState}. + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState}. * * @param target * the {@link DebugTarget} @@ -220,7 +220,7 @@ protected void createSuspendedThread(DebugTarget target) { /** * Creates a {@link State#SUSPENDING} {@link Thread} in the given - * {@link fr.obeo.dsl.debug.DebugTargetState DebugTargetState}. + * {@link org.eclipse.gemoc.dsl.debug.DebugTargetState DebugTargetState}. * * @param target * the {@link DebugTarget} @@ -239,7 +239,7 @@ protected void createSuspendingThread(DebugTarget target) { } /** - * Creates a {@link State#RUNNING} {@link Thread} in the given {@link fr.obeo.dsl.debug.DebugTargetState + * Creates a {@link State#RUNNING} {@link Thread} in the given {@link org.eclipse.gemoc.dsl.debug.DebugTargetState * DebugTargetState}. * * @param target diff --git a/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/AllTests.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/AllTests.java new file mode 100644 index 000000000..0767926bc --- /dev/null +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/AllTests.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2015, 2017 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.gemoc.dsl.debug.tests; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +/** + * Aggregates tests for the org.eclipse.gemoc.dsl.debug plug-in. + * + * @author Yvan Lussaud + */ +@RunWith(Suite.class) +@SuiteClasses(value = {DebugTargetUtilsTests.class, ThreadUtilsTests.class }) +public class AllTests { + +} diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/DebugTargetUtilsTests.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/DebugTargetUtilsTests.java similarity index 99% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/DebugTargetUtilsTests.java rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/DebugTargetUtilsTests.java index 6a4e2a22a..bdb56f649 100644 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/DebugTargetUtilsTests.java +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/DebugTargetUtilsTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,14 +8,14 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.tests; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetState; -import fr.obeo.dsl.debug.DebugTargetUtils; -import fr.obeo.dsl.debug.State; -import fr.obeo.dsl.debug.Thread; +package org.eclipse.gemoc.dsl.debug.tests; + +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetState; +import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; +import org.eclipse.gemoc.dsl.debug.State; +import org.eclipse.gemoc.dsl.debug.Thread; import org.eclipse.emf.ecore.EObject; import org.junit.Test; diff --git a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/ThreadUtilsTests.java b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/ThreadUtilsTests.java similarity index 99% rename from simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/ThreadUtilsTests.java rename to simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/ThreadUtilsTests.java index 2702e856e..9d64bf962 100644 --- a/simulationmodelanimation/tests/fr.obeo.dsl.debug.tests/src/fr/obeo/dsl/debug/tests/ThreadUtilsTests.java +++ b/simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/ThreadUtilsTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2017 Obeo. * 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 @@ -8,16 +8,16 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.obeo.dsl.debug.tests; - -import fr.obeo.dsl.debug.DebugPackage; -import fr.obeo.dsl.debug.DebugTarget; -import fr.obeo.dsl.debug.DebugTargetState; -import fr.obeo.dsl.debug.StackFrame; -import fr.obeo.dsl.debug.State; -import fr.obeo.dsl.debug.Thread; -import fr.obeo.dsl.debug.ThreadUtils; -import fr.obeo.dsl.debug.Variable; +package org.eclipse.gemoc.dsl.debug.tests; + +import org.eclipse.gemoc.dsl.debug.DebugPackage; +import org.eclipse.gemoc.dsl.debug.DebugTarget; +import org.eclipse.gemoc.dsl.debug.DebugTargetState; +import org.eclipse.gemoc.dsl.debug.StackFrame; +import org.eclipse.gemoc.dsl.debug.State; +import org.eclipse.gemoc.dsl.debug.Thread; +import org.eclipse.gemoc.dsl.debug.ThreadUtils; +import org.eclipse.gemoc.dsl.debug.Variable; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EcorePackage; diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/.project b/trace/commons/plugins/fr.inria.diverse.trace.api/.project deleted file mode 100644 index f22c10743..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - fr.inria.diverse.trace.api - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/META-INF/MANIFEST.MF b/trace/commons/plugins/fr.inria.diverse.trace.api/META-INF/MANIFEST.MF deleted file mode 100644 index deb423045..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.inria.diverse.trace.api;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Export-Package: fr.inria.diverse.trace.api, - fr.inria.diverse.trace.api.impl -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/build.properties b/trace/commons/plugins/fr.inria.diverse.trace.api/build.properties deleted file mode 100644 index 22d99992f..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/build.properties +++ /dev/null @@ -1,11 +0,0 @@ -# - -bin.includes = .,\ - META-INF/,\ - plugin.xml,\ - plugin.properties,\ - about.html -jars.compile.order = . -source.. = src/ -output.. = bin/ -src.includes = about.html diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/plugin.properties b/trace/commons/plugins/fr.inria.diverse.trace.api/plugin.properties deleted file mode 100644 index eb9c74dc3..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/plugin.properties +++ /dev/null @@ -1,4 +0,0 @@ -# - -pluginName = Traceapi Model -providerName = www.example.org diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/plugin.xml b/trace/commons/plugins/fr.inria.diverse.trace.api/plugin.xml deleted file mode 100644 index 7337c948a..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/plugin.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/pom.xml b/trace/commons/plugins/fr.inria.diverse.trace.api/pom.xml deleted file mode 100644 index 287e90a1c..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/pom.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 4.0.0 - org.gemoc.modeldebugging.trace.commons - fr.inria.diverse.trace.api - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.commons - org.gemoc.modeldebugging.trace.commons.root - 0.1.0-SNAPSHOT - ../.. - - - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/IStep.java b/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/IStep.java deleted file mode 100644 index c4d135f71..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/IStep.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.api; - -import java.util.List; -import java.util.Map; - -public interface IStep { - - Map getParameters(); - - String getContainingClassName(); - - String getOperationName(); - - void addParameter(String name, Object value); - - int getEndingIndex(); - - int getStartingIndex(); - - IStep getParentStep(); - - List getSubSteps(); - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/ITraceManager.java b/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/ITraceManager.java deleted file mode 100644 index 1519c6da7..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/ITraceManager.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.api; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.commons.model.trace.Step; - -public interface ITraceManager { - - void save(); - - void save(URI uri); - - void addState(); - - boolean addStateIfChanged(); - - void addStep(String stepRuleFQN, Map params); - - void endStep(String stepNameFQN, Object returnValue); - - void initTrace(); - - int getTraceSize(); - - void goTo(int index); - - void goTo(EObject stateOrValue); - - EObject getExecutionState(int index); - - String getDescriptionOfExecutionState(int index); - - String currentBigStep(); - - int getNumberOfValueTraces(); - - List getAllValueTraces(); - - String getDescriptionOfValue(EObject value); - - default Object getContainedValue(EObject value) { - // For now we do nothing by default, so that former trace managers can - // keep compiling - throw new IllegalStateException( - "The new getContainedValue method should not be used with old trace managers! Regenerate a trace manager to use it."); - }; - - Set getAllCurrentValues(int stateIndex); - - int getStateOrValueIndex(EObject stateOrValue); - - List getStepsForStates(int startingState, int endingState); - - default boolean isPartialTraceManager() { - return false; - } - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/IValueTrace.java b/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/IValueTrace.java deleted file mode 100644 index 7e8e653d5..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/IValueTrace.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.api; - -import org.eclipse.emf.ecore.EObject; - -public interface IValueTrace { - - /** - * - * @return the number of stored values within the trace - */ - int getSize(); - - /** - * - * @param index the index of the desired value in the value trace - * @return the value in this trace contained at the given index - */ - EObject getValue(int index); - - /** - * - * @param stateIndex the index of the desired state in the global trace - * @return the active value of the given state in this trace - */ - EObject getActiveValue(int stateIndex); - - /** - * - * @param stateIndex the index of the desired state in the global trace - * @return the index of the active value of the given state in this trace - */ - int getActiveValueIndex(int stateIndex); - - /** - * - * @param stateIndex the index of the desired state in the global trace - * @return the index of the first state of the active value of the given state in this trace - */ - int getActiveValueStartingState(int stateIndex); - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/GenericStep.java b/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/GenericStep.java deleted file mode 100644 index 3e57c714a..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/GenericStep.java +++ /dev/null @@ -1,80 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.api.impl; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import fr.inria.diverse.trace.api.IStep; - -public class GenericStep implements IStep { - - private final Map parameters; - private final String operationName; - private final String containingClassName; - private final int endingIndex; - private final int startingIndex; - private final IStep parentStep; - private final List subSteps; - - public GenericStep(String containingClassName, String operationName, int startingIndex, - int endingState, IStep parentStep, List subSteps) { - this.parameters = new HashMap(); - this.operationName = operationName; - this.containingClassName = containingClassName; - this.startingIndex = startingIndex; - this.endingIndex = endingState; - this.parentStep = parentStep; - this.subSteps = subSteps; - } - - @Override - public Map getParameters() { - return parameters; - } - - @Override - public String getOperationName() { - return operationName; - } - - @Override - public String getContainingClassName() { - return containingClassName; - } - - @Override - public void addParameter(String name, Object value) { - parameters.put(name, value); - } - - @Override - public int getEndingIndex() { - return endingIndex; - } - - @Override - public int getStartingIndex() { - return startingIndex; - } - - @Override - public IStep getParentStep() { - return parentStep; - } - - @Override - public List getSubSteps() { - return subSteps; - } - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/GenericValueTrace.java b/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/GenericValueTrace.java deleted file mode 100644 index 405171a3f..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/GenericValueTrace.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.api.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.api.ITraceManager; -import fr.inria.diverse.trace.api.IValueTrace; - -public class GenericValueTrace implements IValueTrace { - - List values; - ITraceManager manager; - - public GenericValueTrace(List values, ITraceManager manager) { - this.values = values; - this.manager = manager; - } - - @Override - public int getSize() { - return values.size(); - } - - @Override - public int getActiveValueIndex(int stateIndex) { - int realStateIndex = stateIndex; - if (stateIndex == -1) { - realStateIndex = manager.getTraceSize() - 1; - } - List currentValues = intersect(manager.getAllCurrentValues(realStateIndex), values); - if (!currentValues.isEmpty()) { - EObject currentValue = currentValues.get(0); - return values.indexOf(currentValue); - } else { - return -1; - } - } - - @Override - public EObject getActiveValue(int stateIndex) { - int realStateIndex = stateIndex; - if (stateIndex == -1) { - realStateIndex = manager.getTraceSize() - 1; - } - List currentValues = intersect(manager.getAllCurrentValues(realStateIndex), values); - if (!currentValues.isEmpty()) { - EObject currentValue = currentValues.get(0); - return currentValue; - } else { - return null; - } - } - - @Override - public int getActiveValueStartingState(int stateIndex) { - int realStateIndex = stateIndex; - if (stateIndex == -1) { - realStateIndex = manager.getTraceSize() - 1; - } - List currentValues = intersect(manager.getAllCurrentValues(realStateIndex), values); - if (!currentValues.isEmpty()) { - EObject currentValue = currentValues.get(0); - return manager.getStateOrValueIndex(currentValue); - } else { - return -1; - } - } - - @Override - public EObject getValue(int index) { - if (index > -1 && index < values.size()) { - return values.get(index); - } - return null; - } - - private static List intersect(Collection s1, Collection s2) { - List copy = new ArrayList(s1); - copy.retainAll(s2); - return copy; - } - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/LazyGenericStep.java b/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/LazyGenericStep.java deleted file mode 100644 index 54c7460dd..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/LazyGenericStep.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.api.impl; - -import java.util.List; -import java.util.Map; -import java.util.function.Supplier; - -import fr.inria.diverse.trace.api.IStep; - -public class LazyGenericStep implements IStep { - - private Map parameters; - private String operationName; - private String containingClassName; - private int endingIndex; - private int startingIndex; - private IStep parentStep; - private List subSteps; - private Supplier supplier; - private boolean resolved = false; - - public LazyGenericStep(Supplier stepSupplier) { - supplier = stepSupplier; - } - - private void resolve() { - IStep internalStep = supplier.get(); - parameters = internalStep.getParameters(); - operationName = internalStep.getOperationName(); - containingClassName = internalStep.getContainingClassName(); - endingIndex = internalStep.getEndingIndex(); - startingIndex = internalStep.getStartingIndex(); - parentStep = internalStep.getParentStep(); - subSteps = internalStep.getSubSteps(); - resolved = true; - supplier = null; - } - - @Override - public Map getParameters() { - if (!resolved) { - resolve(); - } - return parameters; - } - - @Override - public String getOperationName() { - if (!resolved) { - resolve(); - } - return operationName; - } - - @Override - public String getContainingClassName() { - if (!resolved) { - resolve(); - } - return containingClassName; - } - - @Override - public int getEndingIndex() { - if (!resolved) { - resolve(); - } - return endingIndex; - } - - @Override - public int getStartingIndex() { - if (!resolved) { - resolve(); - } - return startingIndex; - } - - @Override - public IStep getParentStep() { - if (!resolved) { - resolve(); - } - return parentStep; - } - - @Override - public List getSubSteps() { - if (!resolved) { - resolve(); - } - return subSteps; - } - - @Override - public void addParameter(String name, Object value) { - if (!resolved) { - resolve(); - } - parameters.put(name, value); - } -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/PartiallyLazyGenericStep.java b/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/PartiallyLazyGenericStep.java deleted file mode 100644 index f861f08ec..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.api/src/fr/inria/diverse/trace/api/impl/PartiallyLazyGenericStep.java +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.api.impl; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -import fr.inria.diverse.trace.api.IStep; - -public class PartiallyLazyGenericStep implements IStep { - - private Map parameters; - private String operationName; - private String containingClassName; - private int endingIndex; - private int startingIndex; - private IStep parentStep; - private List subSteps; - private Function> supplier; - private Predicate predicate; - private boolean resolved = false; - - public PartiallyLazyGenericStep(String containingClassName, String operationName, int startingIndex, - int endingState, IStep parentStep, Function> supplier) { - this.parameters = new HashMap(); - this.operationName = operationName; - this.containingClassName = containingClassName; - this.startingIndex = startingIndex; - this.endingIndex = endingState; - this.parentStep = parentStep; - this.supplier = supplier; - this.predicate = null; - } - - public PartiallyLazyGenericStep(String containingClassName, String operationName, int startingIndex, - int endingState, IStep parentStep, Function> supplier, Predicate predicate) { - this.parameters = new HashMap(); - this.operationName = operationName; - this.containingClassName = containingClassName; - this.startingIndex = startingIndex; - this.endingIndex = endingState; - this.parentStep = parentStep; - this.supplier = supplier; - this.predicate = predicate; - } - - private void resolve() { - if (predicate != null) { - subSteps = supplier.apply(this).stream().filter(predicate).collect(Collectors.toList()); - } else { - subSteps = supplier.apply(this); - } - resolved = true; - supplier = null; - predicate = null; - } - - @Override - public Map getParameters() { - return parameters; - } - - @Override - public String getOperationName() { - return operationName; - } - - @Override - public String getContainingClassName() { - return containingClassName; - } - - @Override - public int getEndingIndex() { - return endingIndex; - } - - @Override - public int getStartingIndex() { - return startingIndex; - } - - @Override - public IStep getParentStep() { - return parentStep; - } - - @Override - public List getSubSteps() { - if (!resolved) { - resolve(); - } - return subSteps; - } - - @Override - public void addParameter(String name, Object value) { - parameters.put(name, value); - } -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/.project b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/.project deleted file mode 100644 index b035adff4..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - fr.inria.diverse.trace.commons.model - - - - - - 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/trace/commons/plugins/fr.inria.diverse.trace.commons.model/META-INF/MANIFEST.MF b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/META-INF/MANIFEST.MF deleted file mode 100644 index e42d5bffd..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.inria.diverse.trace.commons.model;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-ClassPath: . -Bundle-Vendor: INRIA -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: fr.inria.diverse.trace.commons.model.helper, - fr.inria.diverse.trace.commons.model.trace, - fr.inria.diverse.trace.commons.model.trace.impl, - fr.inria.diverse.trace.commons.model.trace.util -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport -Bundle-ActivationPolicy: lazy diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/build.properties b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/build.properties deleted file mode 100644 index 8a899917a..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/build.properties +++ /dev/null @@ -1,12 +0,0 @@ -# - -bin.includes = .,\ - model/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties,\ - about.html -jars.compile.order = . -source.. = src/ -output.. = bin/ -src.includes = about.html diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/model/GenericTrace.ecore b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/model/GenericTrace.ecore deleted file mode 100644 index 077904440..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/model/GenericTrace.ecore +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/model/GenericTrace.genmodel b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/model/GenericTrace.genmodel deleted file mode 100644 index aa2156806..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/model/GenericTrace.genmodel +++ /dev/null @@ -1,63 +0,0 @@ - - - GenericTrace.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/plugin.properties b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/plugin.properties deleted file mode 100644 index 4f5b0ea2d..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/plugin.properties +++ /dev/null @@ -1,4 +0,0 @@ -# - -pluginName = Generic Trace Model -providerName = www.example.org diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/plugin.xml b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/plugin.xml deleted file mode 100644 index a41ef84c2..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/plugin.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/pom.xml b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/pom.xml deleted file mode 100644 index 919bed42a..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - ../.. - org.gemoc.modeldebugging.trace.commons - org.gemoc.modeldebugging.trace.commons.root - 0.1.0-SNAPSHOT - - - fr.inria.diverse.trace.commons.model - eclipse-plugin - 0.1.0-SNAPSHOT - \ No newline at end of file diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/helper/StepHelper.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/helper/StepHelper.java deleted file mode 100644 index e3346dd62..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/helper/StepHelper.java +++ /dev/null @@ -1,55 +0,0 @@ -package fr.inria.diverse.trace.commons.model.helper; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.emf.ecore.util.EcoreUtil; - -import fr.inria.diverse.trace.commons.model.trace.BigStep; -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.SmallStep; -import fr.inria.diverse.trace.commons.model.trace.Step; - - -public class StepHelper { - - public static String getStepName(Step step) { - //returns the emf id or the java id if the emf id is null - return "LogicalStep ["+(EcoreUtil.getID(step) != null ? EcoreUtil.getID(step):System.identityHashCode(step)) +"]"; - } - - public static List getMSEs(Step instruction) { - ArrayList l = new ArrayList(); - for (MSEOccurrence o : collectAllMSEOccurrences(instruction)) - { - l.add(o.getMse()); - } - return l; - } - - - public static List collectAllMSEOccurrences(Step instruction) { - List res = new ArrayList(); - if (instruction instanceof SmallStep){ - res.add(((SmallStep)instruction).getMseoccurrence()); - return res; - } - if (instruction instanceof BigStep){ - for(Object o : ((BigStep)instruction).getSubSteps()){ - Step s = (Step)o; - res.addAll(collectAllMSEOccurrences(s)); - } - return res; - } - return res; - } - - public static List collectAllMSEs(Step instruction) { - List res = new ArrayList(); - for (MSEOccurrence occ : collectAllMSEOccurrences(instruction)){ - res.add(occ.getMse()); - } - return res; - } -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/AddonExtensionParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/AddonExtensionParameter.java deleted file mode 100644 index 560e7e910..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/AddonExtensionParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Addon Extension Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getAddonExtensionParameter() - * @model - * @generated - */ -public interface AddonExtensionParameter extends LaunchConfigurationParameter { -} // AddonExtensionParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/AnimatorURIParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/AnimatorURIParameter.java deleted file mode 100644 index 1a2079167..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/AnimatorURIParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Animator URI Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getAnimatorURIParameter() - * @model - * @generated - */ -public interface AnimatorURIParameter extends LaunchConfigurationParameter { -} // AnimatorURIParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/BigStep.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/BigStep.java deleted file mode 100644 index a107fa20e..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/BigStep.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'Big Step'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.BigStep#getSubSteps Sub Steps}
  • - *
- * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getBigStep() - * @model abstract="true" - * @generated - */ -public interface BigStep extends Step { - /** - * Returns the value of the 'Sub Steps' containment reference list. - * - *

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

- * - * @return the value of the 'Sub Steps' containment reference list. - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getBigStep_SubSteps() - * @model containment="true" - * @generated - */ - EList getSubSteps(); - -} // BigStep diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/EntryPointParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/EntryPointParameter.java deleted file mode 100644 index b8cc38f5e..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/EntryPointParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Entry Point Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getEntryPointParameter() - * @model - * @generated - */ -public interface EntryPointParameter extends LaunchConfigurationParameter { -} // EntryPointParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericMSE.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericMSE.java deleted file mode 100644 index 0cecb477f..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericMSE.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EOperation; - -/** - * - * A representation of the model object 'Generic MSE'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.GenericMSE#getCallerReference Caller Reference}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.GenericMSE#getActionReference Action Reference}
  • - *
- * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getGenericMSE() - * @model - * @generated - */ -public interface GenericMSE extends MSE { - /** - * Returns the value of the 'Caller Reference' reference. - * - *

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

- * - * @return the value of the 'Caller Reference' reference. - * @see #setCallerReference(EObject) - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getGenericMSE_CallerReference() - * @model - * @generated - */ - EObject getCallerReference(); - - /** - * Sets the value of the '{@link fr.inria.diverse.trace.commons.model.trace.GenericMSE#getCallerReference Caller Reference}' reference. - * - * - * @param value the new value of the 'Caller Reference' reference. - * @see #getCallerReference() - * @generated - */ - void setCallerReference(EObject value); - - /** - * Returns the value of the 'Action Reference' reference. - * - *

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

- * - * @return the value of the 'Action Reference' reference. - * @see #setActionReference(EOperation) - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getGenericMSE_ActionReference() - * @model - * @generated - */ - EOperation getActionReference(); - - /** - * Sets the value of the '{@link fr.inria.diverse.trace.commons.model.trace.GenericMSE#getActionReference Action Reference}' reference. - * - * - * @param value the new value of the 'Action Reference' reference. - * @see #getActionReference() - * @generated - */ - void setActionReference(EOperation value); - - /** - * - * - * @model kind="operation" - * @generated - */ - EObject getCaller(); - - /** - * - * - * @model kind="operation" - * @generated - */ - EOperation getAction(); - -} // GenericMSE diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericParallelStep.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericParallelStep.java deleted file mode 100644 index abf74ecc1..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericParallelStep.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Generic Parallel Step'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getGenericParallelStep() - * @model - * @generated - */ -public interface GenericParallelStep extends ParallelStep { -} // GenericParallelStep diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericSequentialStep.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericSequentialStep.java deleted file mode 100644 index bcaa243a9..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericSequentialStep.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Generic Sequential Step'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getGenericSequentialStep() - * @model - * @generated - */ -public interface GenericSequentialStep extends SequentialStep { -} // GenericSequentialStep diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericSmallStep.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericSmallStep.java deleted file mode 100644 index b6ffacb94..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/GenericSmallStep.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Generic Small Step'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getGenericSmallStep() - * @model - * @generated - */ -public interface GenericSmallStep extends SmallStep { -} // GenericSmallStep diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/InitializationArgumentsParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/InitializationArgumentsParameter.java deleted file mode 100644 index ad087250e..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/InitializationArgumentsParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Initialization Arguments Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getInitializationArgumentsParameter() - * @model - * @generated - */ -public interface InitializationArgumentsParameter extends LaunchConfigurationParameter { -} // InitializationArgumentsParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/InitializationMethodParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/InitializationMethodParameter.java deleted file mode 100644 index e6cad0b9e..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/InitializationMethodParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Initialization Method Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getInitializationMethodParameter() - * @model - * @generated - */ -public interface InitializationMethodParameter extends LaunchConfigurationParameter { -} // InitializationMethodParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LanguageNameParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LanguageNameParameter.java deleted file mode 100644 index 34c8086d0..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LanguageNameParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Language Name Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getLanguageNameParameter() - * @model - * @generated - */ -public interface LanguageNameParameter extends LaunchConfigurationParameter { -} // LanguageNameParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LaunchConfiguration.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LaunchConfiguration.java deleted file mode 100644 index fadb3951e..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LaunchConfiguration.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Launch Configuration'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration#getParameters Parameters}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration#getType Type}
  • - *
- * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getLaunchConfiguration() - * @model - * @generated - */ -public interface LaunchConfiguration extends EObject { - /** - * Returns the value of the 'Parameters' containment reference list. - * The list contents are of type {@link fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter}. - * - *

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

- * - * @return the value of the 'Parameters' containment reference list. - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getLaunchConfiguration_Parameters() - * @model containment="true" - * @generated - */ - EList getParameters(); - - /** - * Returns the value of the 'Type' attribute. - * The default value is "". - * - *

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

- * - * @return the value of the 'Type' attribute. - * @see #setType(String) - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getLaunchConfiguration_Type() - * @model default="" required="true" - * @generated - */ - String getType(); - - /** - * Sets the value of the '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration#getType Type}' attribute. - * - * - * @param value the new value of the 'Type' attribute. - * @see #getType() - * @generated - */ - void setType(String value); - -} // LaunchConfiguration diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LaunchConfigurationParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LaunchConfigurationParameter.java deleted file mode 100644 index eade4106d..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/LaunchConfigurationParameter.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Launch Configuration Parameter'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter#getValue Value}
  • - *
- * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getLaunchConfigurationParameter() - * @model abstract="true" - * @generated - */ -public interface LaunchConfigurationParameter extends EObject { - /** - * 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 fr.inria.diverse.trace.commons.model.trace.TracePackage#getLaunchConfigurationParameter_Value() - * @model - * @generated - */ - String getValue(); - - /** - * Sets the value of the '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter#getValue Value}' attribute. - * - * - * @param value the new value of the 'Value' attribute. - * @see #getValue() - * @generated - */ - void setValue(String value); - -} // LaunchConfigurationParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSE.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSE.java deleted file mode 100644 index 3cb6663af..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSE.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EOperation; - -/** - * - * A representation of the model object 'MSE'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getMSE() - * @model abstract="true" - * @generated - */ -public interface MSE extends ENamedElement { - /** - * - * - * @model kind="operation" - * @generated - */ - EObject getCaller(); - - /** - * - * - * @model kind="operation" - * @generated - */ - EOperation getAction(); - -} // MSE diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSEModel.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSEModel.java deleted file mode 100644 index e8dce1532..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSEModel.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'MSE Model'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.MSEModel#getOwnedMSEs Owned MS Es}
  • - *
- * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getMSEModel() - * @model - * @generated - */ -public interface MSEModel extends EObject { - /** - * Returns the value of the 'Owned MS Es' containment reference list. - * The list contents are of type {@link fr.inria.diverse.trace.commons.model.trace.MSE}. - * - *

- * If the meaning of the 'Owned MS Es' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Owned MS Es' containment reference list. - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getMSEModel_OwnedMSEs() - * @model containment="true" - * @generated - */ - EList getOwnedMSEs(); - -} // MSEModel diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSEOccurrence.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSEOccurrence.java deleted file mode 100644 index 4a1773fb2..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/MSEOccurrence.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'MSE Occurrence'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getMse Mse}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getParameters Parameters}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getResult Result}
  • - *
- * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getMSEOccurrence() - * @model - * @generated - */ -public interface MSEOccurrence extends EObject { - /** - * Returns the value of the 'Mse' reference. - * - *

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

- * - * @return the value of the 'Mse' reference. - * @see #setMse(MSE) - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getMSEOccurrence_Mse() - * @model required="true" - * @generated - */ - MSE getMse(); - - /** - * Sets the value of the '{@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getMse Mse}' reference. - * - * - * @param value the new value of the 'Mse' reference. - * @see #getMse() - * @generated - */ - void setMse(MSE value); - - /** - * Returns the value of the 'Parameters' attribute list. - * The list contents are of type {@link java.lang.Object}. - * - *

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

- * - * @return the value of the 'Parameters' attribute list. - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getMSEOccurrence_Parameters() - * @model - * @generated - */ - EList getParameters(); - - /** - * Returns the value of the 'Result' attribute list. - * The list contents are of type {@link java.lang.Object}. - * - *

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

- * - * @return the value of the 'Result' attribute list. - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getMSEOccurrence_Result() - * @model - * @generated - */ - EList getResult(); - -} // MSEOccurrence diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ModelRootParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ModelRootParameter.java deleted file mode 100644 index 10b4d2ae1..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ModelRootParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Model Root Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getModelRootParameter() - * @model - * @generated - */ -public interface ModelRootParameter extends LaunchConfigurationParameter { -} // ModelRootParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ModelURIParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ModelURIParameter.java deleted file mode 100644 index 4e229ac6a..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ModelURIParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Model URI Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getModelURIParameter() - * @model - * @generated - */ -public interface ModelURIParameter extends LaunchConfigurationParameter { -} // ModelURIParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ParallelStep.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ParallelStep.java deleted file mode 100644 index 320ef91da..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/ParallelStep.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Parallel Step'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getParallelStep() - * @model - * @generated - */ -public interface ParallelStep extends BigStep { -} // ParallelStep diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/RepresentationURIParameter.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/RepresentationURIParameter.java deleted file mode 100644 index 9d7e05acb..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/RepresentationURIParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Representation URI Parameter'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getRepresentationURIParameter() - * @model - * @generated - */ -public interface RepresentationURIParameter extends LaunchConfigurationParameter { -} // RepresentationURIParameter diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/SequentialStep.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/SequentialStep.java deleted file mode 100644 index 81c621ead..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/SequentialStep.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Sequential Step'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getSequentialStep() - * @model - * @generated - */ -public interface SequentialStep extends BigStep { -} // SequentialStep diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/SmallStep.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/SmallStep.java deleted file mode 100644 index 01d162326..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/SmallStep.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - - -/** - * - * A representation of the model object 'Small Step'. - * - * - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getSmallStep() - * @model abstract="true" - * @generated - */ -public interface SmallStep extends Step { -} // SmallStep diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/Step.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/Step.java deleted file mode 100644 index 323b786e4..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/Step.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Step'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.Step#getMseoccurrence Mseoccurrence}
  • - *
- * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getStep() - * @model abstract="true" - * @generated - */ -public interface Step extends EObject { - /** - * Returns the value of the 'Mseoccurrence' containment reference. - * - *

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

- * - * @return the value of the 'Mseoccurrence' containment reference. - * @see #setMseoccurrence(MSEOccurrence) - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getStep_Mseoccurrence() - * @model containment="true" - * @generated - */ - MSEOccurrence getMseoccurrence(); - - /** - * Sets the value of the '{@link fr.inria.diverse.trace.commons.model.trace.Step#getMseoccurrence Mseoccurrence}' containment reference. - * - * - * @param value the new value of the 'Mseoccurrence' containment reference. - * @see #getMseoccurrence() - * @generated - */ - void setMseoccurrence(MSEOccurrence value); - -} // Step diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/Trace.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/Trace.java deleted file mode 100644 index f95d7dfa3..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/Trace.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Trace'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.Trace#getRootStep Root Step}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.Trace#getLaunchconfiguration Launchconfiguration}
  • - *
- * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getTrace() - * @model - * @generated - */ -public interface Trace extends EObject { - /** - * Returns the value of the 'Root Step' containment reference. - * - *

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

- * - * @return the value of the 'Root Step' containment reference. - * @see #setRootStep(Object) - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getTrace_RootStep() - * @model kind="reference" containment="true" required="true" - * @generated - */ - StepSubType getRootStep(); - - /** - * Sets the value of the '{@link fr.inria.diverse.trace.commons.model.trace.Trace#getRootStep Root Step}' containment reference. - * - * - * @param value the new value of the 'Root Step' containment reference. - * @see #getRootStep() - * @generated - */ - void setRootStep(StepSubType value); - - /** - * Returns the value of the 'Launchconfiguration' containment reference. - * - *

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

- * - * @return the value of the 'Launchconfiguration' containment reference. - * @see #setLaunchconfiguration(LaunchConfiguration) - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage#getTrace_Launchconfiguration() - * @model containment="true" required="true" - * @generated - */ - LaunchConfiguration getLaunchconfiguration(); - - /** - * Sets the value of the '{@link fr.inria.diverse.trace.commons.model.trace.Trace#getLaunchconfiguration Launchconfiguration}' containment reference. - * - * - * @param value the new value of the 'Launchconfiguration' containment reference. - * @see #getLaunchconfiguration() - * @generated - */ - void setLaunchconfiguration(LaunchConfiguration value); - -} // Trace diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/TraceFactory.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/TraceFactory.java deleted file mode 100644 index fffb8760c..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/TraceFactory.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -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 fr.inria.diverse.trace.commons.model.trace.TracePackage - * @generated - */ -public interface TraceFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - TraceFactory eINSTANCE = fr.inria.diverse.trace.commons.model.trace.impl.TraceFactoryImpl.init(); - - /** - * Returns a new object of class 'MSE Occurrence'. - * - * - * @return a new object of class 'MSE Occurrence'. - * @generated - */ - MSEOccurrence createMSEOccurrence(); - - /** - * Returns a new object of class 'MSE Model'. - * - * - * @return a new object of class 'MSE Model'. - * @generated - */ - MSEModel createMSEModel(); - - /** - * Returns a new object of class 'Generic MSE'. - * - * - * @return a new object of class 'Generic MSE'. - * @generated - */ - GenericMSE createGenericMSE(); - - /** - * Returns a new object of class 'Sequential Step'. - * - * - * @return a new object of class 'Sequential Step'. - * @generated - */ - SequentialStep createSequentialStep(); - - /** - * Returns a new object of class 'Parallel Step'. - * - * - * @return a new object of class 'Parallel Step'. - * @generated - */ - ParallelStep createParallelStep(); - - /** - * Returns a new object of class 'Generic Sequential Step'. - * - * - * @return a new object of class 'Generic Sequential Step'. - * @generated - */ - GenericSequentialStep createGenericSequentialStep(); - - /** - * Returns a new object of class 'Generic Parallel Step'. - * - * - * @return a new object of class 'Generic Parallel Step'. - * @generated - */ - GenericParallelStep createGenericParallelStep(); - - /** - * Returns a new object of class 'Generic Small Step'. - * - * - * @return a new object of class 'Generic Small Step'. - * @generated - */ - GenericSmallStep createGenericSmallStep(); - - /** - * Returns a new object of class 'Trace'. - * - * - * @return a new object of class 'Trace'. - * @generated - */ - Trace createTrace(); - - /** - * Returns a new object of class 'Launch Configuration'. - * - * - * @return a new object of class 'Launch Configuration'. - * @generated - */ - LaunchConfiguration createLaunchConfiguration(); - - /** - * Returns a new object of class 'Language Name Parameter'. - * - * - * @return a new object of class 'Language Name Parameter'. - * @generated - */ - LanguageNameParameter createLanguageNameParameter(); - - /** - * Returns a new object of class 'Model URI Parameter'. - * - * - * @return a new object of class 'Model URI Parameter'. - * @generated - */ - ModelURIParameter createModelURIParameter(); - - /** - * Returns a new object of class 'Animator URI Parameter'. - * - * - * @return a new object of class 'Animator URI Parameter'. - * @generated - */ - AnimatorURIParameter createAnimatorURIParameter(); - - /** - * Returns a new object of class 'Entry Point Parameter'. - * - * - * @return a new object of class 'Entry Point Parameter'. - * @generated - */ - EntryPointParameter createEntryPointParameter(); - - /** - * Returns a new object of class 'Model Root Parameter'. - * - * - * @return a new object of class 'Model Root Parameter'. - * @generated - */ - ModelRootParameter createModelRootParameter(); - - /** - * Returns a new object of class 'Initialization Method Parameter'. - * - * - * @return a new object of class 'Initialization Method Parameter'. - * @generated - */ - InitializationMethodParameter createInitializationMethodParameter(); - - /** - * Returns a new object of class 'Initialization Arguments Parameter'. - * - * - * @return a new object of class 'Initialization Arguments Parameter'. - * @generated - */ - InitializationArgumentsParameter createInitializationArgumentsParameter(); - - /** - * Returns a new object of class 'Addon Extension Parameter'. - * - * - * @return a new object of class 'Addon Extension Parameter'. - * @generated - */ - AddonExtensionParameter createAddonExtensionParameter(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - TracePackage getTracePackage(); - -} //TraceFactory diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/TracePackage.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/TracePackage.java deleted file mode 100644 index a72c5e786..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/TracePackage.java +++ /dev/null @@ -1,1917 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; - -/** - * - * 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 fr.inria.diverse.trace.commons.model.trace.TraceFactory - * @model kind="package" - * @generated - */ -public interface TracePackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "trace"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.gemoc.org/generic_trace"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "trace"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - TracePackage eINSTANCE = fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl.init(); - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.MSEOccurrenceImpl MSE Occurrence}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.MSEOccurrenceImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getMSEOccurrence() - * @generated - */ - int MSE_OCCURRENCE = 0; - - /** - * The feature id for the 'Mse' reference. - * - * - * @generated - * @ordered - */ - int MSE_OCCURRENCE__MSE = 0; - - /** - * The feature id for the 'Parameters' attribute list. - * - * - * @generated - * @ordered - */ - int MSE_OCCURRENCE__PARAMETERS = 1; - - /** - * The feature id for the 'Result' attribute list. - * - * - * @generated - * @ordered - */ - int MSE_OCCURRENCE__RESULT = 2; - - /** - * The number of structural features of the 'MSE Occurrence' class. - * - * - * @generated - * @ordered - */ - int MSE_OCCURRENCE_FEATURE_COUNT = 3; - - /** - * The number of operations of the 'MSE Occurrence' class. - * - * - * @generated - * @ordered - */ - int MSE_OCCURRENCE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.MSEImpl MSE}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.MSEImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getMSE() - * @generated - */ - int MSE = 1; - - /** - * The feature id for the 'EAnnotations' containment reference list. - * - * - * @generated - * @ordered - */ - int MSE__EANNOTATIONS = EcorePackage.ENAMED_ELEMENT__EANNOTATIONS; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int MSE__NAME = EcorePackage.ENAMED_ELEMENT__NAME; - - /** - * The number of structural features of the 'MSE' class. - * - * - * @generated - * @ordered - */ - int MSE_FEATURE_COUNT = EcorePackage.ENAMED_ELEMENT_FEATURE_COUNT + 0; - - /** - * The operation id for the 'Get EAnnotation' operation. - * - * - * @generated - * @ordered - */ - int MSE___GET_EANNOTATION__STRING = EcorePackage.ENAMED_ELEMENT___GET_EANNOTATION__STRING; - - /** - * The operation id for the 'Get Caller' operation. - * - * - * @generated - * @ordered - */ - int MSE___GET_CALLER = EcorePackage.ENAMED_ELEMENT_OPERATION_COUNT + 0; - - /** - * The operation id for the 'Get Action' operation. - * - * - * @generated - * @ordered - */ - int MSE___GET_ACTION = EcorePackage.ENAMED_ELEMENT_OPERATION_COUNT + 1; - - /** - * The number of operations of the 'MSE' class. - * - * - * @generated - * @ordered - */ - int MSE_OPERATION_COUNT = EcorePackage.ENAMED_ELEMENT_OPERATION_COUNT + 2; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.MSEModelImpl MSE Model}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.MSEModelImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getMSEModel() - * @generated - */ - int MSE_MODEL = 2; - - /** - * The feature id for the 'Owned MS Es' containment reference list. - * - * - * @generated - * @ordered - */ - int MSE_MODEL__OWNED_MS_ES = 0; - - /** - * The number of structural features of the 'MSE Model' class. - * - * - * @generated - * @ordered - */ - int MSE_MODEL_FEATURE_COUNT = 1; - - /** - * The number of operations of the 'MSE Model' class. - * - * - * @generated - * @ordered - */ - int MSE_MODEL_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.GenericMSEImpl Generic MSE}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.GenericMSEImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getGenericMSE() - * @generated - */ - int GENERIC_MSE = 3; - - /** - * The feature id for the 'EAnnotations' containment reference list. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE__EANNOTATIONS = MSE__EANNOTATIONS; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE__NAME = MSE__NAME; - - /** - * The feature id for the 'Caller Reference' reference. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE__CALLER_REFERENCE = MSE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Action Reference' reference. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE__ACTION_REFERENCE = MSE_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Generic MSE' class. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE_FEATURE_COUNT = MSE_FEATURE_COUNT + 2; - - /** - * The operation id for the 'Get EAnnotation' operation. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE___GET_EANNOTATION__STRING = MSE___GET_EANNOTATION__STRING; - - /** - * The operation id for the 'Get Caller' operation. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE___GET_CALLER = MSE_OPERATION_COUNT + 0; - - /** - * The operation id for the 'Get Action' operation. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE___GET_ACTION = MSE_OPERATION_COUNT + 1; - - /** - * The number of operations of the 'Generic MSE' class. - * - * - * @generated - * @ordered - */ - int GENERIC_MSE_OPERATION_COUNT = MSE_OPERATION_COUNT + 2; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.StepImpl Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.StepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getStep() - * @generated - */ - int STEP = 4; - - /** - * The feature id for the 'Mseoccurrence' containment reference. - * - * - * @generated - * @ordered - */ - int STEP__MSEOCCURRENCE = 0; - - /** - * The number of structural features of the 'Step' class. - * - * - * @generated - * @ordered - */ - int STEP_FEATURE_COUNT = 1; - - /** - * The number of operations of the 'Step' class. - * - * - * @generated - * @ordered - */ - int STEP_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.BigStepImpl Big Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.BigStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getBigStep() - * @generated - */ - int BIG_STEP = 5; - - /** - * The feature id for the 'Mseoccurrence' containment reference. - * - * - * @generated - * @ordered - */ - int BIG_STEP__MSEOCCURRENCE = STEP__MSEOCCURRENCE; - - /** - * The feature id for the 'Sub Steps' containment reference list. - * - * - * @generated - * @ordered - */ - int BIG_STEP__SUB_STEPS = STEP_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Big Step' class. - * - * - * @generated - * @ordered - */ - int BIG_STEP_FEATURE_COUNT = STEP_FEATURE_COUNT + 1; - - /** - * The number of operations of the 'Big Step' class. - * - * - * @generated - * @ordered - */ - int BIG_STEP_OPERATION_COUNT = STEP_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.SmallStepImpl Small Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.SmallStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getSmallStep() - * @generated - */ - int SMALL_STEP = 6; - - /** - * The feature id for the 'Mseoccurrence' containment reference. - * - * - * @generated - * @ordered - */ - int SMALL_STEP__MSEOCCURRENCE = STEP__MSEOCCURRENCE; - - /** - * The number of structural features of the 'Small Step' class. - * - * - * @generated - * @ordered - */ - int SMALL_STEP_FEATURE_COUNT = STEP_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Small Step' class. - * - * - * @generated - * @ordered - */ - int SMALL_STEP_OPERATION_COUNT = STEP_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.SequentialStepImpl Sequential Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.SequentialStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getSequentialStep() - * @generated - */ - int SEQUENTIAL_STEP = 7; - - /** - * The feature id for the 'Mseoccurrence' containment reference. - * - * - * @generated - * @ordered - */ - int SEQUENTIAL_STEP__MSEOCCURRENCE = BIG_STEP__MSEOCCURRENCE; - - /** - * The feature id for the 'Sub Steps' containment reference list. - * - * - * @generated - * @ordered - */ - int SEQUENTIAL_STEP__SUB_STEPS = BIG_STEP__SUB_STEPS; - - /** - * The number of structural features of the 'Sequential Step' class. - * - * - * @generated - * @ordered - */ - int SEQUENTIAL_STEP_FEATURE_COUNT = BIG_STEP_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Sequential Step' class. - * - * - * @generated - * @ordered - */ - int SEQUENTIAL_STEP_OPERATION_COUNT = BIG_STEP_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.ParallelStepImpl Parallel Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.ParallelStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getParallelStep() - * @generated - */ - int PARALLEL_STEP = 8; - - /** - * The feature id for the 'Mseoccurrence' containment reference. - * - * - * @generated - * @ordered - */ - int PARALLEL_STEP__MSEOCCURRENCE = BIG_STEP__MSEOCCURRENCE; - - /** - * The feature id for the 'Sub Steps' containment reference list. - * - * - * @generated - * @ordered - */ - int PARALLEL_STEP__SUB_STEPS = BIG_STEP__SUB_STEPS; - - /** - * The number of structural features of the 'Parallel Step' class. - * - * - * @generated - * @ordered - */ - int PARALLEL_STEP_FEATURE_COUNT = BIG_STEP_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Parallel Step' class. - * - * - * @generated - * @ordered - */ - int PARALLEL_STEP_OPERATION_COUNT = BIG_STEP_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.GenericSequentialStepImpl Generic Sequential Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.GenericSequentialStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getGenericSequentialStep() - * @generated - */ - int GENERIC_SEQUENTIAL_STEP = 9; - - /** - * The feature id for the 'Mseoccurrence' containment reference. - * - * - * @generated - * @ordered - */ - int GENERIC_SEQUENTIAL_STEP__MSEOCCURRENCE = SEQUENTIAL_STEP__MSEOCCURRENCE; - - /** - * The feature id for the 'Sub Steps' containment reference list. - * - * - * @generated - * @ordered - */ - int GENERIC_SEQUENTIAL_STEP__SUB_STEPS = SEQUENTIAL_STEP__SUB_STEPS; - - /** - * The number of structural features of the 'Generic Sequential Step' class. - * - * - * @generated - * @ordered - */ - int GENERIC_SEQUENTIAL_STEP_FEATURE_COUNT = SEQUENTIAL_STEP_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Generic Sequential Step' class. - * - * - * @generated - * @ordered - */ - int GENERIC_SEQUENTIAL_STEP_OPERATION_COUNT = SEQUENTIAL_STEP_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.GenericParallelStepImpl Generic Parallel Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.GenericParallelStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getGenericParallelStep() - * @generated - */ - int GENERIC_PARALLEL_STEP = 10; - - /** - * The feature id for the 'Mseoccurrence' containment reference. - * - * - * @generated - * @ordered - */ - int GENERIC_PARALLEL_STEP__MSEOCCURRENCE = PARALLEL_STEP__MSEOCCURRENCE; - - /** - * The feature id for the 'Sub Steps' containment reference list. - * - * - * @generated - * @ordered - */ - int GENERIC_PARALLEL_STEP__SUB_STEPS = PARALLEL_STEP__SUB_STEPS; - - /** - * The number of structural features of the 'Generic Parallel Step' class. - * - * - * @generated - * @ordered - */ - int GENERIC_PARALLEL_STEP_FEATURE_COUNT = PARALLEL_STEP_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Generic Parallel Step' class. - * - * - * @generated - * @ordered - */ - int GENERIC_PARALLEL_STEP_OPERATION_COUNT = PARALLEL_STEP_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.GenericSmallStepImpl Generic Small Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.GenericSmallStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getGenericSmallStep() - * @generated - */ - int GENERIC_SMALL_STEP = 11; - - /** - * The feature id for the 'Mseoccurrence' containment reference. - * - * - * @generated - * @ordered - */ - int GENERIC_SMALL_STEP__MSEOCCURRENCE = SMALL_STEP__MSEOCCURRENCE; - - /** - * The number of structural features of the 'Generic Small Step' class. - * - * - * @generated - * @ordered - */ - int GENERIC_SMALL_STEP_FEATURE_COUNT = SMALL_STEP_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Generic Small Step' class. - * - * - * @generated - * @ordered - */ - int GENERIC_SMALL_STEP_OPERATION_COUNT = SMALL_STEP_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.TraceImpl Trace}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.TraceImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getTrace() - * @generated - */ - int TRACE = 12; - - /** - * The feature id for the 'Root Step' containment reference. - * - * - * @generated - * @ordered - */ - int TRACE__ROOT_STEP = 0; - - /** - * The feature id for the 'Launchconfiguration' containment reference. - * - * - * @generated - * @ordered - */ - int TRACE__LAUNCHCONFIGURATION = 1; - - /** - * The number of structural features of the 'Trace' class. - * - * - * @generated - * @ordered - */ - int TRACE_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Trace' class. - * - * - * @generated - * @ordered - */ - int TRACE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationImpl Launch Configuration}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getLaunchConfiguration() - * @generated - */ - int LAUNCH_CONFIGURATION = 13; - - /** - * The feature id for the 'Parameters' containment reference list. - * - * - * @generated - * @ordered - */ - int LAUNCH_CONFIGURATION__PARAMETERS = 0; - - /** - * The feature id for the 'Type' attribute. - * - * - * @generated - * @ordered - */ - int LAUNCH_CONFIGURATION__TYPE = 1; - - /** - * The number of structural features of the 'Launch Configuration' class. - * - * - * @generated - * @ordered - */ - int LAUNCH_CONFIGURATION_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Launch Configuration' class. - * - * - * @generated - * @ordered - */ - int LAUNCH_CONFIGURATION_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationParameterImpl Launch Configuration Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getLaunchConfigurationParameter() - * @generated - */ - int LAUNCH_CONFIGURATION_PARAMETER = 14; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int LAUNCH_CONFIGURATION_PARAMETER__VALUE = 0; - - /** - * The number of structural features of the 'Launch Configuration Parameter' class. - * - * - * @generated - * @ordered - */ - int LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT = 1; - - /** - * The number of operations of the 'Launch Configuration Parameter' class. - * - * - * @generated - * @ordered - */ - int LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.LanguageNameParameterImpl Language Name Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.LanguageNameParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getLanguageNameParameter() - * @generated - */ - int LANGUAGE_NAME_PARAMETER = 15; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int LANGUAGE_NAME_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; - - /** - * The number of structural features of the 'Language Name Parameter' class. - * - * - * @generated - * @ordered - */ - int LANGUAGE_NAME_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Language Name Parameter' class. - * - * - * @generated - * @ordered - */ - int LANGUAGE_NAME_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.ModelURIParameterImpl Model URI Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.ModelURIParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getModelURIParameter() - * @generated - */ - int MODEL_URI_PARAMETER = 16; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int MODEL_URI_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; - - /** - * The number of structural features of the 'Model URI Parameter' class. - * - * - * @generated - * @ordered - */ - int MODEL_URI_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Model URI Parameter' class. - * - * - * @generated - * @ordered - */ - int MODEL_URI_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.AnimatorURIParameterImpl Animator URI Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.AnimatorURIParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getAnimatorURIParameter() - * @generated - */ - int ANIMATOR_URI_PARAMETER = 17; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int ANIMATOR_URI_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; - - /** - * The number of structural features of the 'Animator URI Parameter' class. - * - * - * @generated - * @ordered - */ - int ANIMATOR_URI_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Animator URI Parameter' class. - * - * - * @generated - * @ordered - */ - int ANIMATOR_URI_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.EntryPointParameterImpl Entry Point Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.EntryPointParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getEntryPointParameter() - * @generated - */ - int ENTRY_POINT_PARAMETER = 18; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int ENTRY_POINT_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; - - /** - * The number of structural features of the 'Entry Point Parameter' class. - * - * - * @generated - * @ordered - */ - int ENTRY_POINT_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Entry Point Parameter' class. - * - * - * @generated - * @ordered - */ - int ENTRY_POINT_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.ModelRootParameterImpl Model Root Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.ModelRootParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getModelRootParameter() - * @generated - */ - int MODEL_ROOT_PARAMETER = 19; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int MODEL_ROOT_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; - - /** - * The number of structural features of the 'Model Root Parameter' class. - * - * - * @generated - * @ordered - */ - int MODEL_ROOT_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Model Root Parameter' class. - * - * - * @generated - * @ordered - */ - int MODEL_ROOT_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.InitializationMethodParameterImpl Initialization Method Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.InitializationMethodParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getInitializationMethodParameter() - * @generated - */ - int INITIALIZATION_METHOD_PARAMETER = 20; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int INITIALIZATION_METHOD_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; - - /** - * The number of structural features of the 'Initialization Method Parameter' class. - * - * - * @generated - * @ordered - */ - int INITIALIZATION_METHOD_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Initialization Method Parameter' class. - * - * - * @generated - * @ordered - */ - int INITIALIZATION_METHOD_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.InitializationArgumentsParameterImpl Initialization Arguments Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.InitializationArgumentsParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getInitializationArgumentsParameter() - * @generated - */ - int INITIALIZATION_ARGUMENTS_PARAMETER = 21; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int INITIALIZATION_ARGUMENTS_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; - - /** - * The number of structural features of the 'Initialization Arguments Parameter' class. - * - * - * @generated - * @ordered - */ - int INITIALIZATION_ARGUMENTS_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Initialization Arguments Parameter' class. - * - * - * @generated - * @ordered - */ - int INITIALIZATION_ARGUMENTS_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.AddonExtensionParameterImpl Addon Extension Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.AddonExtensionParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getAddonExtensionParameter() - * @generated - */ - int ADDON_EXTENSION_PARAMETER = 22; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int ADDON_EXTENSION_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; - - /** - * The number of structural features of the 'Addon Extension Parameter' class. - * - * - * @generated - * @ordered - */ - int ADDON_EXTENSION_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Addon Extension Parameter' class. - * - * - * @generated - * @ordered - */ - int ADDON_EXTENSION_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; - - /** - * The meta object id for the 'ISerializable' data type. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getISerializable() - * @generated - */ - int ISERIALIZABLE = 23; - - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence MSE Occurrence}'. - * - * - * @return the meta object for class 'MSE Occurrence'. - * @see fr.inria.diverse.trace.commons.model.trace.MSEOccurrence - * @generated - */ - EClass getMSEOccurrence(); - - /** - * Returns the meta object for the reference '{@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getMse Mse}'. - * - * - * @return the meta object for the reference 'Mse'. - * @see fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getMse() - * @see #getMSEOccurrence() - * @generated - */ - EReference getMSEOccurrence_Mse(); - - /** - * Returns the meta object for the attribute list '{@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getParameters Parameters}'. - * - * - * @return the meta object for the attribute list 'Parameters'. - * @see fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getParameters() - * @see #getMSEOccurrence() - * @generated - */ - EAttribute getMSEOccurrence_Parameters(); - - /** - * Returns the meta object for the attribute list '{@link fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getResult Result}'. - * - * - * @return the meta object for the attribute list 'Result'. - * @see fr.inria.diverse.trace.commons.model.trace.MSEOccurrence#getResult() - * @see #getMSEOccurrence() - * @generated - */ - EAttribute getMSEOccurrence_Result(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.MSE MSE}'. - * - * - * @return the meta object for class 'MSE'. - * @see fr.inria.diverse.trace.commons.model.trace.MSE - * @generated - */ - EClass getMSE(); - - /** - * Returns the meta object for the '{@link fr.inria.diverse.trace.commons.model.trace.MSE#getCaller() Get Caller}' operation. - * - * - * @return the meta object for the 'Get Caller' operation. - * @see fr.inria.diverse.trace.commons.model.trace.MSE#getCaller() - * @generated - */ - EOperation getMSE__GetCaller(); - - /** - * Returns the meta object for the '{@link fr.inria.diverse.trace.commons.model.trace.MSE#getAction() Get Action}' operation. - * - * - * @return the meta object for the 'Get Action' operation. - * @see fr.inria.diverse.trace.commons.model.trace.MSE#getAction() - * @generated - */ - EOperation getMSE__GetAction(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.MSEModel MSE Model}'. - * - * - * @return the meta object for class 'MSE Model'. - * @see fr.inria.diverse.trace.commons.model.trace.MSEModel - * @generated - */ - EClass getMSEModel(); - - /** - * Returns the meta object for the containment reference list '{@link fr.inria.diverse.trace.commons.model.trace.MSEModel#getOwnedMSEs Owned MS Es}'. - * - * - * @return the meta object for the containment reference list 'Owned MS Es'. - * @see fr.inria.diverse.trace.commons.model.trace.MSEModel#getOwnedMSEs() - * @see #getMSEModel() - * @generated - */ - EReference getMSEModel_OwnedMSEs(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.GenericMSE Generic MSE}'. - * - * - * @return the meta object for class 'Generic MSE'. - * @see fr.inria.diverse.trace.commons.model.trace.GenericMSE - * @generated - */ - EClass getGenericMSE(); - - /** - * Returns the meta object for the reference '{@link fr.inria.diverse.trace.commons.model.trace.GenericMSE#getCallerReference Caller Reference}'. - * - * - * @return the meta object for the reference 'Caller Reference'. - * @see fr.inria.diverse.trace.commons.model.trace.GenericMSE#getCallerReference() - * @see #getGenericMSE() - * @generated - */ - EReference getGenericMSE_CallerReference(); - - /** - * Returns the meta object for the reference '{@link fr.inria.diverse.trace.commons.model.trace.GenericMSE#getActionReference Action Reference}'. - * - * - * @return the meta object for the reference 'Action Reference'. - * @see fr.inria.diverse.trace.commons.model.trace.GenericMSE#getActionReference() - * @see #getGenericMSE() - * @generated - */ - EReference getGenericMSE_ActionReference(); - - /** - * Returns the meta object for the '{@link fr.inria.diverse.trace.commons.model.trace.GenericMSE#getCaller() Get Caller}' operation. - * - * - * @return the meta object for the 'Get Caller' operation. - * @see fr.inria.diverse.trace.commons.model.trace.GenericMSE#getCaller() - * @generated - */ - EOperation getGenericMSE__GetCaller(); - - /** - * Returns the meta object for the '{@link fr.inria.diverse.trace.commons.model.trace.GenericMSE#getAction() Get Action}' operation. - * - * - * @return the meta object for the 'Get Action' operation. - * @see fr.inria.diverse.trace.commons.model.trace.GenericMSE#getAction() - * @generated - */ - EOperation getGenericMSE__GetAction(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.Step Step}'. - * - * - * @return the meta object for class 'Step'. - * @see fr.inria.diverse.trace.commons.model.trace.Step - * @generated - */ - EClass getStep(); - - /** - * Returns the meta object for the containment reference '{@link fr.inria.diverse.trace.commons.model.trace.Step#getMseoccurrence Mseoccurrence}'. - * - * - * @return the meta object for the containment reference 'Mseoccurrence'. - * @see fr.inria.diverse.trace.commons.model.trace.Step#getMseoccurrence() - * @see #getStep() - * @generated - */ - EReference getStep_Mseoccurrence(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.BigStep Big Step}'. - * - * - * @return the meta object for class 'Big Step'. - * @see fr.inria.diverse.trace.commons.model.trace.BigStep - * @generated - */ - EClass getBigStep(); - - /** - * Returns the meta object for the containment reference list '{@link fr.inria.diverse.trace.commons.model.trace.BigStep#getSubSteps Sub Steps}'. - * - * - * @return the meta object for the containment reference list 'Sub Steps'. - * @see fr.inria.diverse.trace.commons.model.trace.BigStep#getSubSteps() - * @see #getBigStep() - * @generated - */ - EReference getBigStep_SubSteps(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.SmallStep Small Step}'. - * - * - * @return the meta object for class 'Small Step'. - * @see fr.inria.diverse.trace.commons.model.trace.SmallStep - * @generated - */ - EClass getSmallStep(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.SequentialStep Sequential Step}'. - * - * - * @return the meta object for class 'Sequential Step'. - * @see fr.inria.diverse.trace.commons.model.trace.SequentialStep - * @generated - */ - EClass getSequentialStep(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.ParallelStep Parallel Step}'. - * - * - * @return the meta object for class 'Parallel Step'. - * @see fr.inria.diverse.trace.commons.model.trace.ParallelStep - * @generated - */ - EClass getParallelStep(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.GenericSequentialStep Generic Sequential Step}'. - * - * - * @return the meta object for class 'Generic Sequential Step'. - * @see fr.inria.diverse.trace.commons.model.trace.GenericSequentialStep - * @generated - */ - EClass getGenericSequentialStep(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.GenericParallelStep Generic Parallel Step}'. - * - * - * @return the meta object for class 'Generic Parallel Step'. - * @see fr.inria.diverse.trace.commons.model.trace.GenericParallelStep - * @generated - */ - EClass getGenericParallelStep(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.GenericSmallStep Generic Small Step}'. - * - * - * @return the meta object for class 'Generic Small Step'. - * @see fr.inria.diverse.trace.commons.model.trace.GenericSmallStep - * @generated - */ - EClass getGenericSmallStep(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.Trace Trace}'. - * - * - * @return the meta object for class 'Trace'. - * @see fr.inria.diverse.trace.commons.model.trace.Trace - * @generated - */ - EClass getTrace(); - - /** - * Returns the meta object for the containment reference '{@link fr.inria.diverse.trace.commons.model.trace.Trace#getRootStep Root Step}'. - * - * - * @return the meta object for the containment reference 'Root Step'. - * @see fr.inria.diverse.trace.commons.model.trace.Trace#getRootStep() - * @see #getTrace() - * @generated - */ - EReference getTrace_RootStep(); - - /** - * Returns the meta object for the containment reference '{@link fr.inria.diverse.trace.commons.model.trace.Trace#getLaunchconfiguration Launchconfiguration}'. - * - * - * @return the meta object for the containment reference 'Launchconfiguration'. - * @see fr.inria.diverse.trace.commons.model.trace.Trace#getLaunchconfiguration() - * @see #getTrace() - * @generated - */ - EReference getTrace_Launchconfiguration(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration Launch Configuration}'. - * - * - * @return the meta object for class 'Launch Configuration'. - * @see fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration - * @generated - */ - EClass getLaunchConfiguration(); - - /** - * Returns the meta object for the containment reference list '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration#getParameters Parameters}'. - * - * - * @return the meta object for the containment reference list 'Parameters'. - * @see fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration#getParameters() - * @see #getLaunchConfiguration() - * @generated - */ - EReference getLaunchConfiguration_Parameters(); - - /** - * Returns the meta object for the attribute '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration#getType Type}'. - * - * - * @return the meta object for the attribute 'Type'. - * @see fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration#getType() - * @see #getLaunchConfiguration() - * @generated - */ - EAttribute getLaunchConfiguration_Type(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter Launch Configuration Parameter}'. - * - * - * @return the meta object for class 'Launch Configuration Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter - * @generated - */ - EClass getLaunchConfigurationParameter(); - - /** - * Returns the meta object for the attribute '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter#getValue Value}'. - * - * - * @return the meta object for the attribute 'Value'. - * @see fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter#getValue() - * @see #getLaunchConfigurationParameter() - * @generated - */ - EAttribute getLaunchConfigurationParameter_Value(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.LanguageNameParameter Language Name Parameter}'. - * - * - * @return the meta object for class 'Language Name Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.LanguageNameParameter - * @generated - */ - EClass getLanguageNameParameter(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.ModelURIParameter Model URI Parameter}'. - * - * - * @return the meta object for class 'Model URI Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.ModelURIParameter - * @generated - */ - EClass getModelURIParameter(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.AnimatorURIParameter Animator URI Parameter}'. - * - * - * @return the meta object for class 'Animator URI Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.AnimatorURIParameter - * @generated - */ - EClass getAnimatorURIParameter(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.EntryPointParameter Entry Point Parameter}'. - * - * - * @return the meta object for class 'Entry Point Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.EntryPointParameter - * @generated - */ - EClass getEntryPointParameter(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.ModelRootParameter Model Root Parameter}'. - * - * - * @return the meta object for class 'Model Root Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.ModelRootParameter - * @generated - */ - EClass getModelRootParameter(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.InitializationMethodParameter Initialization Method Parameter}'. - * - * - * @return the meta object for class 'Initialization Method Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.InitializationMethodParameter - * @generated - */ - EClass getInitializationMethodParameter(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.InitializationArgumentsParameter Initialization Arguments Parameter}'. - * - * - * @return the meta object for class 'Initialization Arguments Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.InitializationArgumentsParameter - * @generated - */ - EClass getInitializationArgumentsParameter(); - - /** - * Returns the meta object for class '{@link fr.inria.diverse.trace.commons.model.trace.AddonExtensionParameter Addon Extension Parameter}'. - * - * - * @return the meta object for class 'Addon Extension Parameter'. - * @see fr.inria.diverse.trace.commons.model.trace.AddonExtensionParameter - * @generated - */ - EClass getAddonExtensionParameter(); - - /** - * Returns the meta object for data type 'ISerializable'. - * - * - * @return the meta object for data type 'ISerializable'. - * @model instanceClass="byte[]" - * @generated - */ - EDataType getISerializable(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - TraceFactory getTraceFactory(); - - /** - * - * 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 fr.inria.diverse.trace.commons.model.trace.impl.MSEOccurrenceImpl MSE Occurrence}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.MSEOccurrenceImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getMSEOccurrence() - * @generated - */ - EClass MSE_OCCURRENCE = eINSTANCE.getMSEOccurrence(); - - /** - * The meta object literal for the 'Mse' reference feature. - * - * - * @generated - */ - EReference MSE_OCCURRENCE__MSE = eINSTANCE.getMSEOccurrence_Mse(); - - /** - * The meta object literal for the 'Parameters' attribute list feature. - * - * - * @generated - */ - EAttribute MSE_OCCURRENCE__PARAMETERS = eINSTANCE.getMSEOccurrence_Parameters(); - - /** - * The meta object literal for the 'Result' attribute list feature. - * - * - * @generated - */ - EAttribute MSE_OCCURRENCE__RESULT = eINSTANCE.getMSEOccurrence_Result(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.MSEImpl MSE}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.MSEImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getMSE() - * @generated - */ - EClass MSE = eINSTANCE.getMSE(); - - /** - * The meta object literal for the 'Get Caller' operation. - * - * - * @generated - */ - EOperation MSE___GET_CALLER = eINSTANCE.getMSE__GetCaller(); - - /** - * The meta object literal for the 'Get Action' operation. - * - * - * @generated - */ - EOperation MSE___GET_ACTION = eINSTANCE.getMSE__GetAction(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.MSEModelImpl MSE Model}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.MSEModelImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getMSEModel() - * @generated - */ - EClass MSE_MODEL = eINSTANCE.getMSEModel(); - - /** - * The meta object literal for the 'Owned MS Es' containment reference list feature. - * - * - * @generated - */ - EReference MSE_MODEL__OWNED_MS_ES = eINSTANCE.getMSEModel_OwnedMSEs(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.GenericMSEImpl Generic MSE}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.GenericMSEImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getGenericMSE() - * @generated - */ - EClass GENERIC_MSE = eINSTANCE.getGenericMSE(); - - /** - * The meta object literal for the 'Caller Reference' reference feature. - * - * - * @generated - */ - EReference GENERIC_MSE__CALLER_REFERENCE = eINSTANCE.getGenericMSE_CallerReference(); - - /** - * The meta object literal for the 'Action Reference' reference feature. - * - * - * @generated - */ - EReference GENERIC_MSE__ACTION_REFERENCE = eINSTANCE.getGenericMSE_ActionReference(); - - /** - * The meta object literal for the 'Get Caller' operation. - * - * - * @generated - */ - EOperation GENERIC_MSE___GET_CALLER = eINSTANCE.getGenericMSE__GetCaller(); - - /** - * The meta object literal for the 'Get Action' operation. - * - * - * @generated - */ - EOperation GENERIC_MSE___GET_ACTION = eINSTANCE.getGenericMSE__GetAction(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.StepImpl Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.StepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getStep() - * @generated - */ - EClass STEP = eINSTANCE.getStep(); - - /** - * The meta object literal for the 'Mseoccurrence' containment reference feature. - * - * - * @generated - */ - EReference STEP__MSEOCCURRENCE = eINSTANCE.getStep_Mseoccurrence(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.BigStepImpl Big Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.BigStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getBigStep() - * @generated - */ - EClass BIG_STEP = eINSTANCE.getBigStep(); - - /** - * The meta object literal for the 'Sub Steps' containment reference list feature. - * - * - * @generated - */ - EReference BIG_STEP__SUB_STEPS = eINSTANCE.getBigStep_SubSteps(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.SmallStepImpl Small Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.SmallStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getSmallStep() - * @generated - */ - EClass SMALL_STEP = eINSTANCE.getSmallStep(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.SequentialStepImpl Sequential Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.SequentialStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getSequentialStep() - * @generated - */ - EClass SEQUENTIAL_STEP = eINSTANCE.getSequentialStep(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.ParallelStepImpl Parallel Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.ParallelStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getParallelStep() - * @generated - */ - EClass PARALLEL_STEP = eINSTANCE.getParallelStep(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.GenericSequentialStepImpl Generic Sequential Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.GenericSequentialStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getGenericSequentialStep() - * @generated - */ - EClass GENERIC_SEQUENTIAL_STEP = eINSTANCE.getGenericSequentialStep(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.GenericParallelStepImpl Generic Parallel Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.GenericParallelStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getGenericParallelStep() - * @generated - */ - EClass GENERIC_PARALLEL_STEP = eINSTANCE.getGenericParallelStep(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.GenericSmallStepImpl Generic Small Step}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.GenericSmallStepImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getGenericSmallStep() - * @generated - */ - EClass GENERIC_SMALL_STEP = eINSTANCE.getGenericSmallStep(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.TraceImpl Trace}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.TraceImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getTrace() - * @generated - */ - EClass TRACE = eINSTANCE.getTrace(); - - /** - * The meta object literal for the 'Root Step' containment reference feature. - * - * - * @generated - */ - EReference TRACE__ROOT_STEP = eINSTANCE.getTrace_RootStep(); - - /** - * The meta object literal for the 'Launchconfiguration' containment reference feature. - * - * - * @generated - */ - EReference TRACE__LAUNCHCONFIGURATION = eINSTANCE.getTrace_Launchconfiguration(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationImpl Launch Configuration}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getLaunchConfiguration() - * @generated - */ - EClass LAUNCH_CONFIGURATION = eINSTANCE.getLaunchConfiguration(); - - /** - * The meta object literal for the 'Parameters' containment reference list feature. - * - * - * @generated - */ - EReference LAUNCH_CONFIGURATION__PARAMETERS = eINSTANCE.getLaunchConfiguration_Parameters(); - - /** - * The meta object literal for the 'Type' attribute feature. - * - * - * @generated - */ - EAttribute LAUNCH_CONFIGURATION__TYPE = eINSTANCE.getLaunchConfiguration_Type(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationParameterImpl Launch Configuration Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getLaunchConfigurationParameter() - * @generated - */ - EClass LAUNCH_CONFIGURATION_PARAMETER = eINSTANCE.getLaunchConfigurationParameter(); - - /** - * The meta object literal for the 'Value' attribute feature. - * - * - * @generated - */ - EAttribute LAUNCH_CONFIGURATION_PARAMETER__VALUE = eINSTANCE.getLaunchConfigurationParameter_Value(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.LanguageNameParameterImpl Language Name Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.LanguageNameParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getLanguageNameParameter() - * @generated - */ - EClass LANGUAGE_NAME_PARAMETER = eINSTANCE.getLanguageNameParameter(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.ModelURIParameterImpl Model URI Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.ModelURIParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getModelURIParameter() - * @generated - */ - EClass MODEL_URI_PARAMETER = eINSTANCE.getModelURIParameter(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.AnimatorURIParameterImpl Animator URI Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.AnimatorURIParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getAnimatorURIParameter() - * @generated - */ - EClass ANIMATOR_URI_PARAMETER = eINSTANCE.getAnimatorURIParameter(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.EntryPointParameterImpl Entry Point Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.EntryPointParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getEntryPointParameter() - * @generated - */ - EClass ENTRY_POINT_PARAMETER = eINSTANCE.getEntryPointParameter(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.ModelRootParameterImpl Model Root Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.ModelRootParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getModelRootParameter() - * @generated - */ - EClass MODEL_ROOT_PARAMETER = eINSTANCE.getModelRootParameter(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.InitializationMethodParameterImpl Initialization Method Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.InitializationMethodParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getInitializationMethodParameter() - * @generated - */ - EClass INITIALIZATION_METHOD_PARAMETER = eINSTANCE.getInitializationMethodParameter(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.InitializationArgumentsParameterImpl Initialization Arguments Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.InitializationArgumentsParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getInitializationArgumentsParameter() - * @generated - */ - EClass INITIALIZATION_ARGUMENTS_PARAMETER = eINSTANCE.getInitializationArgumentsParameter(); - - /** - * The meta object literal for the '{@link fr.inria.diverse.trace.commons.model.trace.impl.AddonExtensionParameterImpl Addon Extension Parameter}' class. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.AddonExtensionParameterImpl - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getAddonExtensionParameter() - * @generated - */ - EClass ADDON_EXTENSION_PARAMETER = eINSTANCE.getAddonExtensionParameter(); - - /** - * The meta object literal for the 'ISerializable' data type. - * - * - * @see fr.inria.diverse.trace.commons.model.trace.impl.TracePackageImpl#getISerializable() - * @generated - */ - EDataType ISERIALIZABLE = eINSTANCE.getISerializable(); - - } - -} //TracePackage diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/AddonExtensionParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/AddonExtensionParameterImpl.java deleted file mode 100644 index bc8fefaac..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/AddonExtensionParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.AddonExtensionParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Addon Extension Parameter'. - * - * - * @generated - */ -public class AddonExtensionParameterImpl extends LaunchConfigurationParameterImpl implements AddonExtensionParameter { - /** - * - * - * @generated - */ - protected AddonExtensionParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.ADDON_EXTENSION_PARAMETER; - } - -} //AddonExtensionParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/AnimatorURIParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/AnimatorURIParameterImpl.java deleted file mode 100644 index aafd1ba2b..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/AnimatorURIParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.AnimatorURIParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Animator URI Parameter'. - * - * - * @generated - */ -public class AnimatorURIParameterImpl extends LaunchConfigurationParameterImpl implements AnimatorURIParameter { - /** - * - * - * @generated - */ - protected AnimatorURIParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.ANIMATOR_URI_PARAMETER; - } - -} //AnimatorURIParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/BigStepImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/BigStepImpl.java deleted file mode 100644 index 1884c165d..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/BigStepImpl.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.BigStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -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.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Big Step'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.BigStepImpl#getSubSteps Sub Steps}
  • - *
- * - * @generated - */ -public abstract class BigStepImpl extends StepImpl implements BigStep { - /** - * The cached value of the '{@link #getSubSteps() Sub Steps}' containment reference list. - * - * - * @see #getSubSteps() - * @generated - * @ordered - */ - protected EList subSteps; - - /** - * - * - * @generated - */ - protected BigStepImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.BIG_STEP; - } - - /** - * - * - * @generated - */ - public EList getSubSteps() { - if (subSteps == null) { - subSteps = new EObjectContainmentEList(Step.class, this, TracePackage.BIG_STEP__SUB_STEPS); - } - return subSteps; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case TracePackage.BIG_STEP__SUB_STEPS: - return ((InternalEList)getSubSteps()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TracePackage.BIG_STEP__SUB_STEPS: - return getSubSteps(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TracePackage.BIG_STEP__SUB_STEPS: - getSubSteps().clear(); - getSubSteps().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TracePackage.BIG_STEP__SUB_STEPS: - getSubSteps().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TracePackage.BIG_STEP__SUB_STEPS: - return subSteps != null && !subSteps.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //BigStepImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/EntryPointParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/EntryPointParameterImpl.java deleted file mode 100644 index 190b3af5b..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/EntryPointParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.EntryPointParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Entry Point Parameter'. - * - * - * @generated - */ -public class EntryPointParameterImpl extends LaunchConfigurationParameterImpl implements EntryPointParameter { - /** - * - * - * @generated - */ - protected EntryPointParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.ENTRY_POINT_PARAMETER; - } - -} //EntryPointParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericParallelStepImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericParallelStepImpl.java deleted file mode 100644 index a542606c1..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericParallelStepImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.GenericParallelStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Generic Parallel Step'. - * - * - * @generated - */ -public class GenericParallelStepImpl extends ParallelStepImpl implements GenericParallelStep { - /** - * - * - * @generated - */ - protected GenericParallelStepImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.GENERIC_PARALLEL_STEP; - } - -} //GenericParallelStepImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericSequentialStepImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericSequentialStepImpl.java deleted file mode 100644 index 9e078dcd6..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericSequentialStepImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.GenericSequentialStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Generic Sequential Step'. - * - * - * @generated - */ -public class GenericSequentialStepImpl extends SequentialStepImpl implements GenericSequentialStep { - /** - * - * - * @generated - */ - protected GenericSequentialStepImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.GENERIC_SEQUENTIAL_STEP; - } - -} //GenericSequentialStepImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericSmallStepImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericSmallStepImpl.java deleted file mode 100644 index f7a3208c7..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericSmallStepImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.GenericSmallStep; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Generic Small Step'. - * - * - * @generated - */ -public class GenericSmallStepImpl extends SmallStepImpl implements GenericSmallStep { - /** - * - * - * @generated - */ - protected GenericSmallStepImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.GENERIC_SMALL_STEP; - } - -} //GenericSmallStepImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/InitializationArgumentsParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/InitializationArgumentsParameterImpl.java deleted file mode 100644 index c16cf5f04..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/InitializationArgumentsParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.InitializationArgumentsParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Initialization Arguments Parameter'. - * - * - * @generated - */ -public class InitializationArgumentsParameterImpl extends LaunchConfigurationParameterImpl implements InitializationArgumentsParameter { - /** - * - * - * @generated - */ - protected InitializationArgumentsParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.INITIALIZATION_ARGUMENTS_PARAMETER; - } - -} //InitializationArgumentsParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/InitializationMethodParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/InitializationMethodParameterImpl.java deleted file mode 100644 index 31b9949e0..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/InitializationMethodParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.InitializationMethodParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Initialization Method Parameter'. - * - * - * @generated - */ -public class InitializationMethodParameterImpl extends LaunchConfigurationParameterImpl implements InitializationMethodParameter { - /** - * - * - * @generated - */ - protected InitializationMethodParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.INITIALIZATION_METHOD_PARAMETER; - } - -} //InitializationMethodParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LanguageNameParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LanguageNameParameterImpl.java deleted file mode 100644 index 8edf99348..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LanguageNameParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.LanguageNameParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Language Name Parameter'. - * - * - * @generated - */ -public class LanguageNameParameterImpl extends LaunchConfigurationParameterImpl implements LanguageNameParameter { - /** - * - * - * @generated - */ - protected LanguageNameParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.LANGUAGE_NAME_PARAMETER; - } - -} //LanguageNameParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LaunchConfigurationImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LaunchConfigurationImpl.java deleted file mode 100644 index c3e3afe44..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LaunchConfigurationImpl.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; -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; - -/** - * - * An implementation of the model object 'Launch Configuration'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationImpl#getParameters Parameters}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationImpl#getType Type}
  • - *
- * - * @generated - */ -public class LaunchConfigurationImpl extends MinimalEObjectImpl.Container implements LaunchConfiguration { - /** - * The cached value of the '{@link #getParameters() Parameters}' containment reference list. - * - * - * @see #getParameters() - * @generated - * @ordered - */ - protected EList parameters; - - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = ""; - /** - * The cached value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected String type = TYPE_EDEFAULT; - - /** - * - * - * @generated - */ - protected LaunchConfigurationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.LAUNCH_CONFIGURATION; - } - - /** - * - * - * @generated - */ - public EList getParameters() { - if (parameters == null) { - parameters = new EObjectContainmentEList(LaunchConfigurationParameter.class, this, TracePackage.LAUNCH_CONFIGURATION__PARAMETERS); - } - return parameters; - } - - /** - * - * - * @generated - */ - public String getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(String newType) { - String oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.LAUNCH_CONFIGURATION__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION__PARAMETERS: - return ((InternalEList)getParameters()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION__PARAMETERS: - return getParameters(); - case TracePackage.LAUNCH_CONFIGURATION__TYPE: - return getType(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION__PARAMETERS: - getParameters().clear(); - getParameters().addAll((Collection)newValue); - return; - case TracePackage.LAUNCH_CONFIGURATION__TYPE: - setType((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION__PARAMETERS: - getParameters().clear(); - return; - case TracePackage.LAUNCH_CONFIGURATION__TYPE: - setType(TYPE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION__PARAMETERS: - return parameters != null && !parameters.isEmpty(); - case TracePackage.LAUNCH_CONFIGURATION__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (type: "); - result.append(type); - result.append(')'); - return result.toString(); - } - -} //LaunchConfigurationImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LaunchConfigurationParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LaunchConfigurationParameterImpl.java deleted file mode 100644 index 6e0794083..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/LaunchConfigurationParameterImpl.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -/** - * - * An implementation of the model object 'Launch Configuration Parameter'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.LaunchConfigurationParameterImpl#getValue Value}
  • - *
- * - * @generated - */ -public abstract class LaunchConfigurationParameterImpl extends MinimalEObjectImpl.Container implements LaunchConfigurationParameter { - /** - * 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; - - /** - * - * - * @generated - */ - protected LaunchConfigurationParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.LAUNCH_CONFIGURATION_PARAMETER; - } - - /** - * - * - * @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, TracePackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE: - return getValue(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE: - setValue((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE: - setValue(VALUE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TracePackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - 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(')'); - return result.toString(); - } - -} //LaunchConfigurationParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEImpl.java deleted file mode 100644 index 7be75fa67..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import java.lang.reflect.InvocationTargetException; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EOperation; - -import org.eclipse.emf.ecore.impl.ENamedElementImpl; - -/** - * - * An implementation of the model object 'MSE'. - * - * - * @generated - */ -public abstract class MSEImpl extends ENamedElementImpl implements MSE { - /** - * - * - * @generated - */ - protected MSEImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.MSE; - } - - /** - * - * - * @generated - */ - public EObject getCaller() { - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); - } - - /** - * - * - * @generated - */ - public EOperation getAction() { - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); - } - - /** - * - * - * @generated - */ - @Override - public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { - switch (operationID) { - case TracePackage.MSE___GET_CALLER: - return getCaller(); - case TracePackage.MSE___GET_ACTION: - return getAction(); - } - return super.eInvoke(operationID, arguments); - } - -} //MSEImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ModelRootParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ModelRootParameterImpl.java deleted file mode 100644 index c0a1c7711..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ModelRootParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.ModelRootParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Model Root Parameter'. - * - * - * @generated - */ -public class ModelRootParameterImpl extends LaunchConfigurationParameterImpl implements ModelRootParameter { - /** - * - * - * @generated - */ - protected ModelRootParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.MODEL_ROOT_PARAMETER; - } - -} //ModelRootParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ModelURIParameterImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ModelURIParameterImpl.java deleted file mode 100644 index 7a9f09403..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ModelURIParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.ModelURIParameter; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Model URI Parameter'. - * - * - * @generated - */ -public class ModelURIParameterImpl extends LaunchConfigurationParameterImpl implements ModelURIParameter { - /** - * - * - * @generated - */ - protected ModelURIParameterImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.MODEL_URI_PARAMETER; - } - -} //ModelURIParameterImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ParallelStepImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ParallelStepImpl.java deleted file mode 100644 index 23e3f79e6..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/ParallelStepImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.ParallelStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Parallel Step'. - * - * - * @generated - */ -public class ParallelStepImpl extends BigStepImpl implements ParallelStep { - /** - * - * - * @generated - */ - protected ParallelStepImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.PARALLEL_STEP; - } - -} //ParallelStepImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/SequentialStepImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/SequentialStepImpl.java deleted file mode 100644 index 3f9c786d8..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/SequentialStepImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.SequentialStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Sequential Step'. - * - * - * @generated - */ -public class SequentialStepImpl extends BigStepImpl implements SequentialStep { - /** - * - * - * @generated - */ - protected SequentialStepImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.SEQUENTIAL_STEP; - } - -} //SequentialStepImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/SmallStepImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/SmallStepImpl.java deleted file mode 100644 index 50c9c62f1..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/SmallStepImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.SmallStep; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Small Step'. - * - * - * @generated - */ -public abstract class SmallStepImpl extends StepImpl implements SmallStep { - /** - * - * - * @generated - */ - protected SmallStepImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.SMALL_STEP; - } - -} //SmallStepImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/StepImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/StepImpl.java deleted file mode 100644 index 76f348768..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/StepImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -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; - -/** - * - * An implementation of the model object 'Step'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.StepImpl#getMseoccurrence Mseoccurrence}
  • - *
- * - * @generated - */ -public abstract class StepImpl extends MinimalEObjectImpl.Container implements Step { - /** - * The cached value of the '{@link #getMseoccurrence() Mseoccurrence}' containment reference. - * - * - * @see #getMseoccurrence() - * @generated - * @ordered - */ - protected MSEOccurrence mseoccurrence; - - /** - * - * - * @generated - */ - protected StepImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.STEP; - } - - /** - * - * - * @generated - */ - public MSEOccurrence getMseoccurrence() { - return mseoccurrence; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetMseoccurrence(MSEOccurrence newMseoccurrence, NotificationChain msgs) { - MSEOccurrence oldMseoccurrence = mseoccurrence; - mseoccurrence = newMseoccurrence; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TracePackage.STEP__MSEOCCURRENCE, oldMseoccurrence, newMseoccurrence); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setMseoccurrence(MSEOccurrence newMseoccurrence) { - if (newMseoccurrence != mseoccurrence) { - NotificationChain msgs = null; - if (mseoccurrence != null) - msgs = ((InternalEObject)mseoccurrence).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TracePackage.STEP__MSEOCCURRENCE, null, msgs); - if (newMseoccurrence != null) - msgs = ((InternalEObject)newMseoccurrence).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TracePackage.STEP__MSEOCCURRENCE, null, msgs); - msgs = basicSetMseoccurrence(newMseoccurrence, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.STEP__MSEOCCURRENCE, newMseoccurrence, newMseoccurrence)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case TracePackage.STEP__MSEOCCURRENCE: - return basicSetMseoccurrence(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TracePackage.STEP__MSEOCCURRENCE: - return getMseoccurrence(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TracePackage.STEP__MSEOCCURRENCE: - setMseoccurrence((MSEOccurrence)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TracePackage.STEP__MSEOCCURRENCE: - setMseoccurrence((MSEOccurrence)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TracePackage.STEP__MSEOCCURRENCE: - return mseoccurrence != null; - } - return super.eIsSet(featureID); - } - -} //StepImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TraceFactoryImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TraceFactoryImpl.java deleted file mode 100644 index f9ebeed3b..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TraceFactoryImpl.java +++ /dev/null @@ -1,331 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.*; - -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; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class TraceFactoryImpl extends EFactoryImpl implements TraceFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static TraceFactory init() { - try { - TraceFactory theTraceFactory = (TraceFactory)EPackage.Registry.INSTANCE.getEFactory(TracePackage.eNS_URI); - if (theTraceFactory != null) { - return theTraceFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new TraceFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public TraceFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case TracePackage.MSE_OCCURRENCE: return createMSEOccurrence(); - case TracePackage.MSE_MODEL: return createMSEModel(); - case TracePackage.GENERIC_MSE: return createGenericMSE(); - case TracePackage.SEQUENTIAL_STEP: return createSequentialStep(); - case TracePackage.PARALLEL_STEP: return createParallelStep(); - case TracePackage.GENERIC_SEQUENTIAL_STEP: return createGenericSequentialStep(); - case TracePackage.GENERIC_PARALLEL_STEP: return createGenericParallelStep(); - case TracePackage.GENERIC_SMALL_STEP: return createGenericSmallStep(); - case TracePackage.TRACE: return createTrace(); - case TracePackage.LAUNCH_CONFIGURATION: return createLaunchConfiguration(); - case TracePackage.LANGUAGE_NAME_PARAMETER: return createLanguageNameParameter(); - case TracePackage.MODEL_URI_PARAMETER: return createModelURIParameter(); - case TracePackage.ANIMATOR_URI_PARAMETER: return createAnimatorURIParameter(); - case TracePackage.ENTRY_POINT_PARAMETER: return createEntryPointParameter(); - case TracePackage.MODEL_ROOT_PARAMETER: return createModelRootParameter(); - case TracePackage.INITIALIZATION_METHOD_PARAMETER: return createInitializationMethodParameter(); - case TracePackage.INITIALIZATION_ARGUMENTS_PARAMETER: return createInitializationArgumentsParameter(); - case TracePackage.ADDON_EXTENSION_PARAMETER: return createAddonExtensionParameter(); - 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 TracePackage.ISERIALIZABLE: - return createISerializableFromString(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 TracePackage.ISERIALIZABLE: - return convertISerializableToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public MSEOccurrence createMSEOccurrence() { - MSEOccurrenceImpl mseOccurrence = new MSEOccurrenceImpl(); - return mseOccurrence; - } - - /** - * - * - * @generated - */ - public MSEModel createMSEModel() { - MSEModelImpl mseModel = new MSEModelImpl(); - return mseModel; - } - - /** - * - * - * @generated - */ - public GenericMSE createGenericMSE() { - GenericMSEImpl genericMSE = new GenericMSEImpl(); - return genericMSE; - } - - /** - * - * - * @generated - */ - public SequentialStep createSequentialStep() { - SequentialStepImpl sequentialStep = new SequentialStepImpl(); - return sequentialStep; - } - - /** - * - * - * @generated - */ - public ParallelStep createParallelStep() { - ParallelStepImpl parallelStep = new ParallelStepImpl(); - return parallelStep; - } - - /** - * - * - * @generated - */ - public GenericSequentialStep createGenericSequentialStep() { - GenericSequentialStepImpl genericSequentialStep = new GenericSequentialStepImpl(); - return genericSequentialStep; - } - - /** - * - * - * @generated - */ - public GenericParallelStep createGenericParallelStep() { - GenericParallelStepImpl genericParallelStep = new GenericParallelStepImpl(); - return genericParallelStep; - } - - /** - * - * - * @generated - */ - public GenericSmallStep createGenericSmallStep() { - GenericSmallStepImpl genericSmallStep = new GenericSmallStepImpl(); - return genericSmallStep; - } - - /** - * - * - * @generated - */ - public Trace createTrace() { - TraceImpl trace = new TraceImpl(); - return trace; - } - - /** - * - * - * @generated - */ - public LaunchConfiguration createLaunchConfiguration() { - LaunchConfigurationImpl launchConfiguration = new LaunchConfigurationImpl(); - return launchConfiguration; - } - - /** - * - * - * @generated - */ - public LanguageNameParameter createLanguageNameParameter() { - LanguageNameParameterImpl languageNameParameter = new LanguageNameParameterImpl(); - return languageNameParameter; - } - - /** - * - * - * @generated - */ - public ModelURIParameter createModelURIParameter() { - ModelURIParameterImpl modelURIParameter = new ModelURIParameterImpl(); - return modelURIParameter; - } - - /** - * - * - * @generated - */ - public AnimatorURIParameter createAnimatorURIParameter() { - AnimatorURIParameterImpl animatorURIParameter = new AnimatorURIParameterImpl(); - return animatorURIParameter; - } - - /** - * - * - * @generated - */ - public EntryPointParameter createEntryPointParameter() { - EntryPointParameterImpl entryPointParameter = new EntryPointParameterImpl(); - return entryPointParameter; - } - - /** - * - * - * @generated - */ - public ModelRootParameter createModelRootParameter() { - ModelRootParameterImpl modelRootParameter = new ModelRootParameterImpl(); - return modelRootParameter; - } - - /** - * - * - * @generated - */ - public InitializationMethodParameter createInitializationMethodParameter() { - InitializationMethodParameterImpl initializationMethodParameter = new InitializationMethodParameterImpl(); - return initializationMethodParameter; - } - - /** - * - * - * @generated - */ - public InitializationArgumentsParameter createInitializationArgumentsParameter() { - InitializationArgumentsParameterImpl initializationArgumentsParameter = new InitializationArgumentsParameterImpl(); - return initializationArgumentsParameter; - } - - /** - * - * - * @generated - */ - public AddonExtensionParameter createAddonExtensionParameter() { - AddonExtensionParameterImpl addonExtensionParameter = new AddonExtensionParameterImpl(); - return addonExtensionParameter; - } - - /** - * - * - * @generated - */ - public byte[] createISerializableFromString(EDataType eDataType, String initialValue) { - return (byte[])super.createFromString(initialValue); - } - - /** - * - * - * @generated - */ - public String convertISerializableToString(EDataType eDataType, Object instanceValue) { - return super.convertToString(instanceValue); - } - - /** - * - * - * @generated - */ - public TracePackage getTracePackage() { - return (TracePackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static TracePackage getPackage() { - return TracePackage.eINSTANCE; - } - -} //TraceFactoryImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TraceImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TraceImpl.java deleted file mode 100644 index a2d5669b3..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TraceImpl.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.Trace; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; - -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; - -/** - * - * An implementation of the model object 'Trace'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.TraceImpl#getRootStep Root Step}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.TraceImpl#getLaunchconfiguration Launchconfiguration}
  • - *
- * - * @generated - */ -public class TraceImpl extends MinimalEObjectImpl.Container implements Trace { - /** - * The cached value of the '{@link #getRootStep() Root Step}' containment reference. - * - * - * @see #getRootStep() - * @generated - * @ordered - */ - protected StepSubType rootStep; - - /** - * The cached value of the '{@link #getLaunchconfiguration() Launchconfiguration}' containment reference. - * - * - * @see #getLaunchconfiguration() - * @generated - * @ordered - */ - protected LaunchConfiguration launchconfiguration; - - /** - * - * - * @generated - */ - protected TraceImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TracePackage.Literals.TRACE; - } - - /** - * - * - * @generated - */ - public StepSubType getRootStep() { - return rootStep; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetRootStep(StepSubType newRootStep, NotificationChain msgs) { - StepSubType oldRootStep = rootStep; - rootStep = newRootStep; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TracePackage.TRACE__ROOT_STEP, oldRootStep, newRootStep); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setRootStep(StepSubType newRootStep) { - if (newRootStep != rootStep) { - NotificationChain msgs = null; - if (rootStep != null) - msgs = ((InternalEObject)rootStep).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TracePackage.TRACE__ROOT_STEP, null, msgs); - if (newRootStep != null) - msgs = ((InternalEObject)newRootStep).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TracePackage.TRACE__ROOT_STEP, null, msgs); - msgs = basicSetRootStep(newRootStep, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.TRACE__ROOT_STEP, newRootStep, newRootStep)); - } - - /** - * - * - * @generated - */ - public LaunchConfiguration getLaunchconfiguration() { - return launchconfiguration; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetLaunchconfiguration(LaunchConfiguration newLaunchconfiguration, NotificationChain msgs) { - LaunchConfiguration oldLaunchconfiguration = launchconfiguration; - launchconfiguration = newLaunchconfiguration; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TracePackage.TRACE__LAUNCHCONFIGURATION, oldLaunchconfiguration, newLaunchconfiguration); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setLaunchconfiguration(LaunchConfiguration newLaunchconfiguration) { - if (newLaunchconfiguration != launchconfiguration) { - NotificationChain msgs = null; - if (launchconfiguration != null) - msgs = ((InternalEObject)launchconfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TracePackage.TRACE__LAUNCHCONFIGURATION, null, msgs); - if (newLaunchconfiguration != null) - msgs = ((InternalEObject)newLaunchconfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TracePackage.TRACE__LAUNCHCONFIGURATION, null, msgs); - msgs = basicSetLaunchconfiguration(newLaunchconfiguration, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.TRACE__LAUNCHCONFIGURATION, newLaunchconfiguration, newLaunchconfiguration)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case TracePackage.TRACE__ROOT_STEP: - return basicSetRootStep(null, msgs); - case TracePackage.TRACE__LAUNCHCONFIGURATION: - return basicSetLaunchconfiguration(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TracePackage.TRACE__ROOT_STEP: - return getRootStep(); - case TracePackage.TRACE__LAUNCHCONFIGURATION: - return getLaunchconfiguration(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TracePackage.TRACE__ROOT_STEP: - setRootStep((StepSubType)newValue); - return; - case TracePackage.TRACE__LAUNCHCONFIGURATION: - setLaunchconfiguration((LaunchConfiguration)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TracePackage.TRACE__ROOT_STEP: - setRootStep((StepSubType)null); - return; - case TracePackage.TRACE__LAUNCHCONFIGURATION: - setLaunchconfiguration((LaunchConfiguration)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TracePackage.TRACE__ROOT_STEP: - return rootStep != null; - case TracePackage.TRACE__LAUNCHCONFIGURATION: - return launchconfiguration != null; - } - return super.eIsSet(featureID); - } - -} //TraceImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TracePackageImpl.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TracePackageImpl.java deleted file mode 100644 index 57cc4b52a..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/TracePackageImpl.java +++ /dev/null @@ -1,891 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.impl; - -import fr.inria.diverse.trace.commons.model.trace.AddonExtensionParameter; -import fr.inria.diverse.trace.commons.model.trace.AnimatorURIParameter; -import fr.inria.diverse.trace.commons.model.trace.BigStep; -import fr.inria.diverse.trace.commons.model.trace.EntryPointParameter; -import fr.inria.diverse.trace.commons.model.trace.GenericMSE; -import fr.inria.diverse.trace.commons.model.trace.GenericParallelStep; -import fr.inria.diverse.trace.commons.model.trace.GenericSequentialStep; -import fr.inria.diverse.trace.commons.model.trace.GenericSmallStep; -import fr.inria.diverse.trace.commons.model.trace.InitializationArgumentsParameter; -import fr.inria.diverse.trace.commons.model.trace.InitializationMethodParameter; -import fr.inria.diverse.trace.commons.model.trace.LanguageNameParameter; -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter; -import fr.inria.diverse.trace.commons.model.trace.MSEModel; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.ModelRootParameter; -import fr.inria.diverse.trace.commons.model.trace.ModelURIParameter; -import fr.inria.diverse.trace.commons.model.trace.ParallelStep; -import fr.inria.diverse.trace.commons.model.trace.SequentialStep; -import fr.inria.diverse.trace.commons.model.trace.SmallStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.Trace; -import fr.inria.diverse.trace.commons.model.trace.TraceFactory; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -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; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class TracePackageImpl extends EPackageImpl implements TracePackage { - /** - * - * - * @generated - */ - private EClass mseOccurrenceEClass = null; - - /** - * - * - * @generated - */ - private EClass mseEClass = null; - - /** - * - * - * @generated - */ - private EClass mseModelEClass = null; - - /** - * - * - * @generated - */ - private EClass genericMSEEClass = null; - - /** - * - * - * @generated - */ - private EClass stepEClass = null; - - /** - * - * - * @generated - */ - private EClass bigStepEClass = null; - - /** - * - * - * @generated - */ - private EClass smallStepEClass = null; - - /** - * - * - * @generated - */ - private EClass sequentialStepEClass = null; - - /** - * - * - * @generated - */ - private EClass parallelStepEClass = null; - - /** - * - * - * @generated - */ - private EClass genericSequentialStepEClass = null; - - /** - * - * - * @generated - */ - private EClass genericParallelStepEClass = null; - - /** - * - * - * @generated - */ - private EClass genericSmallStepEClass = null; - - /** - * - * - * @generated - */ - private EClass traceEClass = null; - - /** - * - * - * @generated - */ - private EClass launchConfigurationEClass = null; - - /** - * - * - * @generated - */ - private EClass launchConfigurationParameterEClass = null; - - /** - * - * - * @generated - */ - private EClass languageNameParameterEClass = null; - - /** - * - * - * @generated - */ - private EClass modelURIParameterEClass = null; - - /** - * - * - * @generated - */ - private EClass animatorURIParameterEClass = null; - - /** - * - * - * @generated - */ - private EClass entryPointParameterEClass = null; - - /** - * - * - * @generated - */ - private EClass modelRootParameterEClass = null; - - /** - * - * - * @generated - */ - private EClass initializationMethodParameterEClass = null; - - /** - * - * - * @generated - */ - private EClass initializationArgumentsParameterEClass = null; - - /** - * - * - * @generated - */ - private EClass addonExtensionParameterEClass = null; - - /** - * - * - * @generated - */ - private EDataType iSerializableEDataType = 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 fr.inria.diverse.trace.commons.model.trace.TracePackage#eNS_URI - * @see #init() - * @generated - */ - private TracePackageImpl() { - super(eNS_URI, TraceFactory.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 TracePackage#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 TracePackage init() { - if (isInited) return (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); - - // Obtain or create and register package - TracePackageImpl theTracePackage = (TracePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TracePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TracePackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackage.eINSTANCE.eClass(); - - // Create package meta-data objects - theTracePackage.createPackageContents(); - - // Initialize created meta-data - theTracePackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theTracePackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(TracePackage.eNS_URI, theTracePackage); - return theTracePackage; - } - - /** - * - * - * @generated - */ - public EClass getMSEOccurrence() { - return mseOccurrenceEClass; - } - - /** - * - * - * @generated - */ - public EReference getMSEOccurrence_Mse() { - return (EReference)mseOccurrenceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getMSEOccurrence_Parameters() { - return (EAttribute)mseOccurrenceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getMSEOccurrence_Result() { - return (EAttribute)mseOccurrenceEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getMSE() { - return mseEClass; - } - - /** - * - * - * @generated - */ - public EOperation getMSE__GetCaller() { - return mseEClass.getEOperations().get(0); - } - - /** - * - * - * @generated - */ - public EOperation getMSE__GetAction() { - return mseEClass.getEOperations().get(1); - } - - /** - * - * - * @generated - */ - public EClass getMSEModel() { - return mseModelEClass; - } - - /** - * - * - * @generated - */ - public EReference getMSEModel_OwnedMSEs() { - return (EReference)mseModelEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getGenericMSE() { - return genericMSEEClass; - } - - /** - * - * - * @generated - */ - public EReference getGenericMSE_CallerReference() { - return (EReference)genericMSEEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getGenericMSE_ActionReference() { - return (EReference)genericMSEEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EOperation getGenericMSE__GetCaller() { - return genericMSEEClass.getEOperations().get(0); - } - - /** - * - * - * @generated - */ - public EOperation getGenericMSE__GetAction() { - return genericMSEEClass.getEOperations().get(1); - } - - /** - * - * - * @generated - */ - public EClass getStep() { - return stepEClass; - } - - /** - * - * - * @generated - */ - public EReference getStep_Mseoccurrence() { - return (EReference)stepEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getBigStep() { - return bigStepEClass; - } - - /** - * - * - * @generated - */ - public EReference getBigStep_SubSteps() { - return (EReference)bigStepEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getSmallStep() { - return smallStepEClass; - } - - /** - * - * - * @generated - */ - public EClass getSequentialStep() { - return sequentialStepEClass; - } - - /** - * - * - * @generated - */ - public EClass getParallelStep() { - return parallelStepEClass; - } - - /** - * - * - * @generated - */ - public EClass getGenericSequentialStep() { - return genericSequentialStepEClass; - } - - /** - * - * - * @generated - */ - public EClass getGenericParallelStep() { - return genericParallelStepEClass; - } - - /** - * - * - * @generated - */ - public EClass getGenericSmallStep() { - return genericSmallStepEClass; - } - - /** - * - * - * @generated - */ - public EClass getTrace() { - return traceEClass; - } - - /** - * - * - * @generated - */ - public EReference getTrace_RootStep() { - return (EReference)traceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getTrace_Launchconfiguration() { - return (EReference)traceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getLaunchConfiguration() { - return launchConfigurationEClass; - } - - /** - * - * - * @generated - */ - public EReference getLaunchConfiguration_Parameters() { - return (EReference)launchConfigurationEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getLaunchConfiguration_Type() { - return (EAttribute)launchConfigurationEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getLaunchConfigurationParameter() { - return launchConfigurationParameterEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getLaunchConfigurationParameter_Value() { - return (EAttribute)launchConfigurationParameterEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getLanguageNameParameter() { - return languageNameParameterEClass; - } - - /** - * - * - * @generated - */ - public EClass getModelURIParameter() { - return modelURIParameterEClass; - } - - /** - * - * - * @generated - */ - public EClass getAnimatorURIParameter() { - return animatorURIParameterEClass; - } - - /** - * - * - * @generated - */ - public EClass getEntryPointParameter() { - return entryPointParameterEClass; - } - - /** - * - * - * @generated - */ - public EClass getModelRootParameter() { - return modelRootParameterEClass; - } - - /** - * - * - * @generated - */ - public EClass getInitializationMethodParameter() { - return initializationMethodParameterEClass; - } - - /** - * - * - * @generated - */ - public EClass getInitializationArgumentsParameter() { - return initializationArgumentsParameterEClass; - } - - /** - * - * - * @generated - */ - public EClass getAddonExtensionParameter() { - return addonExtensionParameterEClass; - } - - /** - * - * - * @generated - */ - public EDataType getISerializable() { - return iSerializableEDataType; - } - - /** - * - * - * @generated - */ - public TraceFactory getTraceFactory() { - return (TraceFactory)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 - mseOccurrenceEClass = createEClass(MSE_OCCURRENCE); - createEReference(mseOccurrenceEClass, MSE_OCCURRENCE__MSE); - createEAttribute(mseOccurrenceEClass, MSE_OCCURRENCE__PARAMETERS); - createEAttribute(mseOccurrenceEClass, MSE_OCCURRENCE__RESULT); - - mseEClass = createEClass(MSE); - createEOperation(mseEClass, MSE___GET_CALLER); - createEOperation(mseEClass, MSE___GET_ACTION); - - mseModelEClass = createEClass(MSE_MODEL); - createEReference(mseModelEClass, MSE_MODEL__OWNED_MS_ES); - - genericMSEEClass = createEClass(GENERIC_MSE); - createEReference(genericMSEEClass, GENERIC_MSE__CALLER_REFERENCE); - createEReference(genericMSEEClass, GENERIC_MSE__ACTION_REFERENCE); - createEOperation(genericMSEEClass, GENERIC_MSE___GET_CALLER); - createEOperation(genericMSEEClass, GENERIC_MSE___GET_ACTION); - - stepEClass = createEClass(STEP); - createEReference(stepEClass, STEP__MSEOCCURRENCE); - - bigStepEClass = createEClass(BIG_STEP); - createEReference(bigStepEClass, BIG_STEP__SUB_STEPS); - - smallStepEClass = createEClass(SMALL_STEP); - - sequentialStepEClass = createEClass(SEQUENTIAL_STEP); - - parallelStepEClass = createEClass(PARALLEL_STEP); - - genericSequentialStepEClass = createEClass(GENERIC_SEQUENTIAL_STEP); - - genericParallelStepEClass = createEClass(GENERIC_PARALLEL_STEP); - - genericSmallStepEClass = createEClass(GENERIC_SMALL_STEP); - - traceEClass = createEClass(TRACE); - createEReference(traceEClass, TRACE__ROOT_STEP); - createEReference(traceEClass, TRACE__LAUNCHCONFIGURATION); - - launchConfigurationEClass = createEClass(LAUNCH_CONFIGURATION); - createEReference(launchConfigurationEClass, LAUNCH_CONFIGURATION__PARAMETERS); - createEAttribute(launchConfigurationEClass, LAUNCH_CONFIGURATION__TYPE); - - launchConfigurationParameterEClass = createEClass(LAUNCH_CONFIGURATION_PARAMETER); - createEAttribute(launchConfigurationParameterEClass, LAUNCH_CONFIGURATION_PARAMETER__VALUE); - - languageNameParameterEClass = createEClass(LANGUAGE_NAME_PARAMETER); - - modelURIParameterEClass = createEClass(MODEL_URI_PARAMETER); - - animatorURIParameterEClass = createEClass(ANIMATOR_URI_PARAMETER); - - entryPointParameterEClass = createEClass(ENTRY_POINT_PARAMETER); - - modelRootParameterEClass = createEClass(MODEL_ROOT_PARAMETER); - - initializationMethodParameterEClass = createEClass(INITIALIZATION_METHOD_PARAMETER); - - initializationArgumentsParameterEClass = createEClass(INITIALIZATION_ARGUMENTS_PARAMETER); - - addonExtensionParameterEClass = createEClass(ADDON_EXTENSION_PARAMETER); - - // Create data types - iSerializableEDataType = createEDataType(ISERIALIZABLE); - } - - /** - * - * - * @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 - EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - - // Create type parameters - ETypeParameter bigStepEClass_StepSubtype = addETypeParameter(bigStepEClass, "StepSubtype"); - ETypeParameter sequentialStepEClass_StepSubtype = addETypeParameter(sequentialStepEClass, "StepSubtype"); - ETypeParameter parallelStepEClass_StepSubtype = addETypeParameter(parallelStepEClass, "StepSubtype"); - ETypeParameter traceEClass_StepSubType = addETypeParameter(traceEClass, "StepSubType"); - - // Set bounds for type parameters - EGenericType g1 = createEGenericType(this.getStep()); - bigStepEClass_StepSubtype.getEBounds().add(g1); - g1 = createEGenericType(this.getStep()); - sequentialStepEClass_StepSubtype.getEBounds().add(g1); - g1 = createEGenericType(this.getStep()); - parallelStepEClass_StepSubtype.getEBounds().add(g1); - - // Add supertypes to classes - mseEClass.getESuperTypes().add(theEcorePackage.getENamedElement()); - genericMSEEClass.getESuperTypes().add(this.getMSE()); - bigStepEClass.getESuperTypes().add(this.getStep()); - smallStepEClass.getESuperTypes().add(this.getStep()); - g1 = createEGenericType(this.getBigStep()); - EGenericType g2 = createEGenericType(sequentialStepEClass_StepSubtype); - g1.getETypeArguments().add(g2); - sequentialStepEClass.getEGenericSuperTypes().add(g1); - g1 = createEGenericType(this.getBigStep()); - g2 = createEGenericType(parallelStepEClass_StepSubtype); - g1.getETypeArguments().add(g2); - parallelStepEClass.getEGenericSuperTypes().add(g1); - g1 = createEGenericType(this.getSequentialStep()); - g2 = createEGenericType(this.getStep()); - g1.getETypeArguments().add(g2); - genericSequentialStepEClass.getEGenericSuperTypes().add(g1); - g1 = createEGenericType(this.getParallelStep()); - g2 = createEGenericType(this.getStep()); - g1.getETypeArguments().add(g2); - genericParallelStepEClass.getEGenericSuperTypes().add(g1); - genericSmallStepEClass.getESuperTypes().add(this.getSmallStep()); - languageNameParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); - modelURIParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); - animatorURIParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); - entryPointParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); - modelRootParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); - initializationMethodParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); - initializationArgumentsParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); - addonExtensionParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); - - // Initialize classes, features, and operations; add parameters - initEClass(mseOccurrenceEClass, MSEOccurrence.class, "MSEOccurrence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getMSEOccurrence_Mse(), this.getMSE(), null, "mse", null, 1, 1, MSEOccurrence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getMSEOccurrence_Parameters(), theEcorePackage.getEJavaObject(), "parameters", null, 0, -1, MSEOccurrence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getMSEOccurrence_Result(), ecorePackage.getEJavaObject(), "result", null, 0, -1, MSEOccurrence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(mseEClass, fr.inria.diverse.trace.commons.model.trace.MSE.class, "MSE", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEOperation(getMSE__GetCaller(), theEcorePackage.getEObject(), "getCaller", 0, 1, IS_UNIQUE, IS_ORDERED); - - initEOperation(getMSE__GetAction(), theEcorePackage.getEOperation(), "getAction", 0, 1, IS_UNIQUE, IS_ORDERED); - - initEClass(mseModelEClass, MSEModel.class, "MSEModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getMSEModel_OwnedMSEs(), this.getMSE(), null, "ownedMSEs", null, 0, -1, MSEModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(genericMSEEClass, GenericMSE.class, "GenericMSE", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getGenericMSE_CallerReference(), theEcorePackage.getEObject(), null, "callerReference", null, 0, 1, GenericMSE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGenericMSE_ActionReference(), theEcorePackage.getEOperation(), null, "actionReference", null, 0, 1, GenericMSE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEOperation(getGenericMSE__GetCaller(), theEcorePackage.getEObject(), "getCaller", 0, 1, IS_UNIQUE, IS_ORDERED); - - initEOperation(getGenericMSE__GetAction(), theEcorePackage.getEOperation(), "getAction", 0, 1, IS_UNIQUE, IS_ORDERED); - - initEClass(stepEClass, Step.class, "Step", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getStep_Mseoccurrence(), this.getMSEOccurrence(), null, "mseoccurrence", null, 0, 1, Step.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(bigStepEClass, BigStep.class, "BigStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - g1 = createEGenericType(bigStepEClass_StepSubtype); - initEReference(getBigStep_SubSteps(), g1, null, "subSteps", null, 0, -1, BigStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(smallStepEClass, SmallStep.class, "SmallStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(sequentialStepEClass, SequentialStep.class, "SequentialStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(parallelStepEClass, ParallelStep.class, "ParallelStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(genericSequentialStepEClass, GenericSequentialStep.class, "GenericSequentialStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(genericParallelStepEClass, GenericParallelStep.class, "GenericParallelStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(genericSmallStepEClass, GenericSmallStep.class, "GenericSmallStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(traceEClass, Trace.class, "Trace", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - 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); - initEReference(getTrace_Launchconfiguration(), this.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(launchConfigurationEClass, LaunchConfiguration.class, "LaunchConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getLaunchConfiguration_Parameters(), this.getLaunchConfigurationParameter(), null, "parameters", null, 0, -1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getLaunchConfiguration_Type(), theEcorePackage.getEString(), "type", "", 1, 1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(launchConfigurationParameterEClass, LaunchConfigurationParameter.class, "LaunchConfigurationParameter", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getLaunchConfigurationParameter_Value(), theEcorePackage.getEString(), "value", null, 0, 1, LaunchConfigurationParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(languageNameParameterEClass, LanguageNameParameter.class, "LanguageNameParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(modelURIParameterEClass, ModelURIParameter.class, "ModelURIParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(animatorURIParameterEClass, AnimatorURIParameter.class, "AnimatorURIParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(entryPointParameterEClass, EntryPointParameter.class, "EntryPointParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(modelRootParameterEClass, ModelRootParameter.class, "ModelRootParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(initializationMethodParameterEClass, InitializationMethodParameter.class, "InitializationMethodParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(initializationArgumentsParameterEClass, InitializationArgumentsParameter.class, "InitializationArgumentsParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(addonExtensionParameterEClass, AddonExtensionParameter.class, "AddonExtensionParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - // Initialize data types - initEDataType(iSerializableEDataType, byte[].class, "ISerializable", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - - // Create resource - createResource(eNS_URI); - } - -} //TracePackageImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/util/TraceAdapterFactory.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/util/TraceAdapterFactory.java deleted file mode 100644 index 57f67b3c2..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/util/TraceAdapterFactory.java +++ /dev/null @@ -1,554 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.util; - -import fr.inria.diverse.trace.commons.model.trace.*; - -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.EModelElement; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see fr.inria.diverse.trace.commons.model.trace.TracePackage - * @generated - */ -public class TraceAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static TracePackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public TraceAdapterFactory() { - if (modelPackage == null) { - modelPackage = TracePackage.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 TraceSwitch modelSwitch = - new TraceSwitch() { - @Override - public Adapter caseMSEOccurrence(MSEOccurrence object) { - return createMSEOccurrenceAdapter(); - } - @Override - public Adapter caseMSE(MSE object) { - return createMSEAdapter(); - } - @Override - public Adapter caseMSEModel(MSEModel object) { - return createMSEModelAdapter(); - } - @Override - public Adapter caseGenericMSE(GenericMSE object) { - return createGenericMSEAdapter(); - } - @Override - public Adapter caseStep(Step object) { - return createStepAdapter(); - } - @Override - public Adapter caseBigStep(BigStep object) { - return createBigStepAdapter(); - } - @Override - public Adapter caseSmallStep(SmallStep object) { - return createSmallStepAdapter(); - } - @Override - public Adapter caseSequentialStep(SequentialStep object) { - return createSequentialStepAdapter(); - } - @Override - public Adapter caseParallelStep(ParallelStep object) { - return createParallelStepAdapter(); - } - @Override - public Adapter caseGenericSequentialStep(GenericSequentialStep object) { - return createGenericSequentialStepAdapter(); - } - @Override - public Adapter caseGenericParallelStep(GenericParallelStep object) { - return createGenericParallelStepAdapter(); - } - @Override - public Adapter caseGenericSmallStep(GenericSmallStep object) { - return createGenericSmallStepAdapter(); - } - @Override - public Adapter caseTrace(Trace object) { - return createTraceAdapter(); - } - @Override - public Adapter caseLaunchConfiguration(LaunchConfiguration object) { - return createLaunchConfigurationAdapter(); - } - @Override - public Adapter caseLaunchConfigurationParameter(LaunchConfigurationParameter object) { - return createLaunchConfigurationParameterAdapter(); - } - @Override - public Adapter caseLanguageNameParameter(LanguageNameParameter object) { - return createLanguageNameParameterAdapter(); - } - @Override - public Adapter caseModelURIParameter(ModelURIParameter object) { - return createModelURIParameterAdapter(); - } - @Override - public Adapter caseAnimatorURIParameter(AnimatorURIParameter object) { - return createAnimatorURIParameterAdapter(); - } - @Override - public Adapter caseEntryPointParameter(EntryPointParameter object) { - return createEntryPointParameterAdapter(); - } - @Override - public Adapter caseModelRootParameter(ModelRootParameter object) { - return createModelRootParameterAdapter(); - } - @Override - public Adapter caseInitializationMethodParameter(InitializationMethodParameter object) { - return createInitializationMethodParameterAdapter(); - } - @Override - public Adapter caseInitializationArgumentsParameter(InitializationArgumentsParameter object) { - return createInitializationArgumentsParameterAdapter(); - } - @Override - public Adapter caseAddonExtensionParameter(AddonExtensionParameter object) { - return createAddonExtensionParameterAdapter(); - } - @Override - public Adapter caseEModelElement(EModelElement object) { - return createEModelElementAdapter(); - } - @Override - public Adapter caseENamedElement(ENamedElement object) { - return createENamedElementAdapter(); - } - @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 fr.inria.diverse.trace.commons.model.trace.MSEOccurrence MSE 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 fr.inria.diverse.trace.commons.model.trace.MSEOccurrence - * @generated - */ - public Adapter createMSEOccurrenceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.MSE MSE}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.MSE - * @generated - */ - public Adapter createMSEAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.MSEModel MSE Model}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.MSEModel - * @generated - */ - public Adapter createMSEModelAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.GenericMSE Generic MSE}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.GenericMSE - * @generated - */ - public Adapter createGenericMSEAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.Step Step}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.Step - * @generated - */ - public Adapter createStepAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.BigStep Big Step}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.BigStep - * @generated - */ - public Adapter createBigStepAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.SmallStep Small Step}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.SmallStep - * @generated - */ - public Adapter createSmallStepAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.SequentialStep Sequential Step}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.SequentialStep - * @generated - */ - public Adapter createSequentialStepAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.ParallelStep Parallel Step}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.ParallelStep - * @generated - */ - public Adapter createParallelStepAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.GenericSequentialStep Generic Sequential Step}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.GenericSequentialStep - * @generated - */ - public Adapter createGenericSequentialStepAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.GenericParallelStep Generic Parallel Step}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.GenericParallelStep - * @generated - */ - public Adapter createGenericParallelStepAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.GenericSmallStep Generic Small Step}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.GenericSmallStep - * @generated - */ - public Adapter createGenericSmallStepAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.Trace Trace}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.Trace - * @generated - */ - public Adapter createTraceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration Launch Configuration}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration - * @generated - */ - public Adapter createLaunchConfigurationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter Launch Configuration Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.LaunchConfigurationParameter - * @generated - */ - public Adapter createLaunchConfigurationParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.LanguageNameParameter Language Name Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.LanguageNameParameter - * @generated - */ - public Adapter createLanguageNameParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.ModelURIParameter Model URI Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.ModelURIParameter - * @generated - */ - public Adapter createModelURIParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.AnimatorURIParameter Animator URI Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.AnimatorURIParameter - * @generated - */ - public Adapter createAnimatorURIParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.EntryPointParameter Entry Point Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.EntryPointParameter - * @generated - */ - public Adapter createEntryPointParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.ModelRootParameter Model Root Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.ModelRootParameter - * @generated - */ - public Adapter createModelRootParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.InitializationMethodParameter Initialization Method Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.InitializationMethodParameter - * @generated - */ - public Adapter createInitializationMethodParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.InitializationArgumentsParameter Initialization Arguments Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.InitializationArgumentsParameter - * @generated - */ - public Adapter createInitializationArgumentsParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link fr.inria.diverse.trace.commons.model.trace.AddonExtensionParameter Addon Extension Parameter}'. - * - * 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 fr.inria.diverse.trace.commons.model.trace.AddonExtensionParameter - * @generated - */ - public Adapter createAddonExtensionParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EModelElement EModel 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.emf.ecore.EModelElement - * @generated - */ - public Adapter createEModelElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ENamedElement ENamed 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.emf.ecore.ENamedElement - * @generated - */ - public Adapter createENamedElementAdapter() { - 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; - } - -} //TraceAdapterFactory diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/util/TraceSwitch.java b/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/util/TraceSwitch.java deleted file mode 100644 index 9f44759f2..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/util/TraceSwitch.java +++ /dev/null @@ -1,631 +0,0 @@ -/** - */ -package fr.inria.diverse.trace.commons.model.trace.util; - -import fr.inria.diverse.trace.commons.model.trace.*; - -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.util.Switch; - -/** - * - * 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 fr.inria.diverse.trace.commons.model.trace.TracePackage - * @generated - */ -public class TraceSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static TracePackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public TraceSwitch() { - if (modelPackage == null) { - modelPackage = TracePackage.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 TracePackage.MSE_OCCURRENCE: { - MSEOccurrence mseOccurrence = (MSEOccurrence)theEObject; - T result = caseMSEOccurrence(mseOccurrence); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.MSE: { - MSE mse = (MSE)theEObject; - T result = caseMSE(mse); - if (result == null) result = caseENamedElement(mse); - if (result == null) result = caseEModelElement(mse); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.MSE_MODEL: { - MSEModel mseModel = (MSEModel)theEObject; - T result = caseMSEModel(mseModel); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.GENERIC_MSE: { - GenericMSE genericMSE = (GenericMSE)theEObject; - T result = caseGenericMSE(genericMSE); - if (result == null) result = caseMSE(genericMSE); - if (result == null) result = caseENamedElement(genericMSE); - if (result == null) result = caseEModelElement(genericMSE); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.STEP: { - Step step = (Step)theEObject; - T result = caseStep(step); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.BIG_STEP: { - BigStep bigStep = (BigStep)theEObject; - T result = caseBigStep(bigStep); - if (result == null) result = caseStep(bigStep); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.SMALL_STEP: { - SmallStep smallStep = (SmallStep)theEObject; - T result = caseSmallStep(smallStep); - if (result == null) result = caseStep(smallStep); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.SEQUENTIAL_STEP: { - SequentialStep sequentialStep = (SequentialStep)theEObject; - T result = caseSequentialStep(sequentialStep); - if (result == null) result = caseBigStep(sequentialStep); - if (result == null) result = caseStep(sequentialStep); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.PARALLEL_STEP: { - ParallelStep parallelStep = (ParallelStep)theEObject; - T result = caseParallelStep(parallelStep); - if (result == null) result = caseBigStep(parallelStep); - if (result == null) result = caseStep(parallelStep); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.GENERIC_SEQUENTIAL_STEP: { - GenericSequentialStep genericSequentialStep = (GenericSequentialStep)theEObject; - T result = caseGenericSequentialStep(genericSequentialStep); - if (result == null) result = caseSequentialStep(genericSequentialStep); - if (result == null) result = caseBigStep(genericSequentialStep); - if (result == null) result = caseStep(genericSequentialStep); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.GENERIC_PARALLEL_STEP: { - GenericParallelStep genericParallelStep = (GenericParallelStep)theEObject; - T result = caseGenericParallelStep(genericParallelStep); - if (result == null) result = caseParallelStep(genericParallelStep); - if (result == null) result = caseBigStep(genericParallelStep); - if (result == null) result = caseStep(genericParallelStep); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.GENERIC_SMALL_STEP: { - GenericSmallStep genericSmallStep = (GenericSmallStep)theEObject; - T result = caseGenericSmallStep(genericSmallStep); - if (result == null) result = caseSmallStep(genericSmallStep); - if (result == null) result = caseStep(genericSmallStep); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.TRACE: { - Trace trace = (Trace)theEObject; - T result = caseTrace(trace); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.LAUNCH_CONFIGURATION: { - LaunchConfiguration launchConfiguration = (LaunchConfiguration)theEObject; - T result = caseLaunchConfiguration(launchConfiguration); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.LAUNCH_CONFIGURATION_PARAMETER: { - LaunchConfigurationParameter launchConfigurationParameter = (LaunchConfigurationParameter)theEObject; - T result = caseLaunchConfigurationParameter(launchConfigurationParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.LANGUAGE_NAME_PARAMETER: { - LanguageNameParameter languageNameParameter = (LanguageNameParameter)theEObject; - T result = caseLanguageNameParameter(languageNameParameter); - if (result == null) result = caseLaunchConfigurationParameter(languageNameParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.MODEL_URI_PARAMETER: { - ModelURIParameter modelURIParameter = (ModelURIParameter)theEObject; - T result = caseModelURIParameter(modelURIParameter); - if (result == null) result = caseLaunchConfigurationParameter(modelURIParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.ANIMATOR_URI_PARAMETER: { - AnimatorURIParameter animatorURIParameter = (AnimatorURIParameter)theEObject; - T result = caseAnimatorURIParameter(animatorURIParameter); - if (result == null) result = caseLaunchConfigurationParameter(animatorURIParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.ENTRY_POINT_PARAMETER: { - EntryPointParameter entryPointParameter = (EntryPointParameter)theEObject; - T result = caseEntryPointParameter(entryPointParameter); - if (result == null) result = caseLaunchConfigurationParameter(entryPointParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.MODEL_ROOT_PARAMETER: { - ModelRootParameter modelRootParameter = (ModelRootParameter)theEObject; - T result = caseModelRootParameter(modelRootParameter); - if (result == null) result = caseLaunchConfigurationParameter(modelRootParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.INITIALIZATION_METHOD_PARAMETER: { - InitializationMethodParameter initializationMethodParameter = (InitializationMethodParameter)theEObject; - T result = caseInitializationMethodParameter(initializationMethodParameter); - if (result == null) result = caseLaunchConfigurationParameter(initializationMethodParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.INITIALIZATION_ARGUMENTS_PARAMETER: { - InitializationArgumentsParameter initializationArgumentsParameter = (InitializationArgumentsParameter)theEObject; - T result = caseInitializationArgumentsParameter(initializationArgumentsParameter); - if (result == null) result = caseLaunchConfigurationParameter(initializationArgumentsParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TracePackage.ADDON_EXTENSION_PARAMETER: { - AddonExtensionParameter addonExtensionParameter = (AddonExtensionParameter)theEObject; - T result = caseAddonExtensionParameter(addonExtensionParameter); - if (result == null) result = caseLaunchConfigurationParameter(addonExtensionParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'MSE 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 'MSE Occurrence'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseMSEOccurrence(MSEOccurrence object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'MSE'. - * - * 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 'MSE'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseMSE(MSE object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'MSE Model'. - * - * 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 'MSE Model'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseMSEModel(MSEModel object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Generic MSE'. - * - * 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 'Generic MSE'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGenericMSE(GenericMSE object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Step'. - * - * 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'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseStep(Step object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Big Step'. - * - * 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 'Big Step'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBigStep(BigStep object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Small Step'. - * - * 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 'Small Step'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSmallStep(SmallStep object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Sequential Step'. - * - * 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 'Sequential Step'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSequentialStep(SequentialStep object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Parallel Step'. - * - * 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 'Parallel Step'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseParallelStep(ParallelStep object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Generic Sequential Step'. - * - * 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 'Generic Sequential Step'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGenericSequentialStep(GenericSequentialStep object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Generic Parallel Step'. - * - * 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 'Generic Parallel Step'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGenericParallelStep(GenericParallelStep object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Generic Small Step'. - * - * 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 'Generic Small Step'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGenericSmallStep(GenericSmallStep object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Trace'. - * - * 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 'Trace'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseTrace(Trace object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Launch Configuration'. - * - * 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 'Launch Configuration'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseLaunchConfiguration(LaunchConfiguration object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Launch Configuration Parameter'. - * - * 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 'Launch Configuration Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseLaunchConfigurationParameter(LaunchConfigurationParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Language Name Parameter'. - * - * 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 'Language Name Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseLanguageNameParameter(LanguageNameParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Model URI Parameter'. - * - * 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 'Model URI Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseModelURIParameter(ModelURIParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Animator URI Parameter'. - * - * 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 'Animator URI Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAnimatorURIParameter(AnimatorURIParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Entry Point Parameter'. - * - * 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 'Entry Point Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEntryPointParameter(EntryPointParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Model Root Parameter'. - * - * 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 'Model Root Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseModelRootParameter(ModelRootParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Initialization Method Parameter'. - * - * 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 'Initialization Method Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseInitializationMethodParameter(InitializationMethodParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Initialization Arguments Parameter'. - * - * 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 'Initialization Arguments Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseInitializationArgumentsParameter(InitializationArgumentsParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Addon Extension Parameter'. - * - * 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 'Addon Extension Parameter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAddonExtensionParameter(AddonExtensionParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EModel 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 'EModel Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEModelElement(EModelElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'ENamed 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 'ENamed Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseENamedElement(ENamedElement 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; - } - -} //TraceSwitch diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/.classpath b/trace/commons/plugins/fr.inria.diverse.trace.commons/.classpath deleted file mode 100644 index 2f4248086..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/.project b/trace/commons/plugins/fr.inria.diverse.trace.commons/.project deleted file mode 100644 index 46c666b54..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.commons - - - - - - 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/trace/commons/plugins/fr.inria.diverse.trace.commons/META-INF/MANIFEST.MF b/trace/commons/plugins/fr.inria.diverse.trace.commons/META-INF/MANIFEST.MF deleted file mode 100644 index 6858ea513..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/META-INF/MANIFEST.MF +++ /dev/null @@ -1,28 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Util -Bundle-SymbolicName: fr.inria.diverse.trace.commons -Bundle-Version: 1.0.0.qualifier -Export-Package: fr.inria.diverse.trace.commons, - fr.inria.diverse.trace.commons.tracemetamodel, - org.jdom2, - org.jdom2.filter -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - org.eclipse.emf.ecore;bundle-version="2.10.1", - org.eclipse.emf.compare;bundle-version="3.0.2", - org.junit;bundle-version="4.11.0", - org.eclipse.emf.ecore.xmi, - org.eclipse.core.resources;bundle-version="3.9.1", - org.eclipse.core.runtime;bundle-version="3.10.0", - org.eclipse.xtext.util, - org.eclipse.xtend.ide, - org.eclipse.jdt.core, - org.eclipse.jface.text, - org.eclipse.emf.codegen.ecore;bundle-version="2.10.2" -Bundle-ClassPath: lib/jdom-2.0.5.jar, - . -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/build.properties b/trace/commons/plugins/fr.inria.diverse.trace.commons/build.properties deleted file mode 100644 index c42cdecd5..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - lib/jdom-2.0.5.jar,\ - about.html -jre.compilation.profile = JavaSE-1.8 -src.includes = about.html diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/lib/jdom-2.0.5.jar b/trace/commons/plugins/fr.inria.diverse.trace.commons/lib/jdom-2.0.5.jar deleted file mode 100644 index b6996c725..000000000 Binary files a/trace/commons/plugins/fr.inria.diverse.trace.commons/lib/jdom-2.0.5.jar and /dev/null differ diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/pom.xml b/trace/commons/plugins/fr.inria.diverse.trace.commons/pom.xml deleted file mode 100644 index c3edcc51f..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - 4.0.0 - org.gemoc.modeldebugging.trace.commons - fr.inria.diverse.trace.commons - 1.0.0-SNAPSHOT - eclipse-plugin - - - - - - org.gemoc.modeldebugging.trace.commons - org.gemoc.modeldebugging.trace.commons.root - 0.1.0-SNAPSHOT - ../.. - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EMFCompareUtil.xtend b/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EMFCompareUtil.xtend deleted file mode 100644 index ca15db3b3..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EMFCompareUtil.xtend +++ /dev/null @@ -1,33 +0,0 @@ -package fr.inria.diverse.trace.commons - -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.compare.scope.DefaultComparisonScope -import org.eclipse.emf.compare.scope.IComparisonScope -import org.eclipse.emf.compare.EMFCompare -import org.eclipse.emf.compare.Comparison -import java.util.List -import org.eclipse.emf.compare.Diff -import org.eclipse.emf.compare.DifferenceKind -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); - val IComparisonScope scope = _defaultComparisonScope; - val _builder = EMFCompare.builder(); - val EMFCompare _build = _builder.build(); - val Comparison comparison = _build.compare(scope); - val List differences = comparison.getDifferences(); - 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); - } - - } - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/ExecutionMetamodelTraceability.xtend b/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/ExecutionMetamodelTraceability.xtend deleted file mode 100644 index 3aded7b78..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/ExecutionMetamodelTraceability.xtend +++ /dev/null @@ -1,31 +0,0 @@ -package fr.inria.diverse.trace.commons - -import org.eclipse.emf.ecore.EModelElement -import org.eclipse.emf.ecore.EcoreFactory -import org.eclipse.emf.ecore.EAnnotation - -abstract class ExecutionMetamodelTraceability { - - public static val String TRACEABILITY_ANNOTATION_SOURCE = "http://www.modelexecution.org/trace/XMOF"; - public static val String TRACEABILITY_ANNOTATION_KEY = "executionMetamodelElement"; - - public static def void createTraceabilityAnnotation(EModelElement elementToAnnotate, String traceabilityAnnotationValue) { - val traceabilityAnnotation = EcoreFactory.eINSTANCE.createEAnnotation; - traceabilityAnnotation.source = TRACEABILITY_ANNOTATION_SOURCE; - traceabilityAnnotation.details.put(TRACEABILITY_ANNOTATION_KEY, traceabilityAnnotationValue); - elementToAnnotate.EAnnotations.add(traceabilityAnnotation); - } - - public static def String getTraceabilityAnnotationValue(EModelElement annotatedElement) { - var String traceabilityAnnotationValue = null; - val traceabilityAnnotation = getTraceabilityAnnotation(annotatedElement); - if(traceabilityAnnotation != null) { - traceabilityAnnotationValue = traceabilityAnnotation.details.get(TRACEABILITY_ANNOTATION_KEY); - } - return traceabilityAnnotationValue; - } - - public static def EAnnotation getTraceabilityAnnotation(EModelElement annotatedElement) { - return annotatedElement.getEAnnotation(TRACEABILITY_ANNOTATION_SOURCE); - } -} \ No newline at end of file diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/PluginXMLHelper.java b/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/PluginXMLHelper.java deleted file mode 100644 index 810e52d22..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/PluginXMLHelper.java +++ /dev/null @@ -1,138 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.commons; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.jdom2.Attribute; -import org.jdom2.Document; -import org.jdom2.Element; -import org.jdom2.filter.ElementFilter; -import org.jdom2.input.SAXBuilder; -import org.jdom2.output.Format; -import org.jdom2.output.XMLOutputter; - -public class PluginXMLHelper { - - public static final String PLUGIN_FILENAME = "plugin.xml"; - - public static final String PLUGIN_TEMPLATE = "\n" - + "\n" + "\n" + ""; - - public static void createEmptyTemplateFile(IFile pluginXmlFile, - boolean overrideIfExist) { - if (overrideIfExist && pluginXmlFile.exists()) { - try { - pluginXmlFile.delete(true, null); - } catch (CoreException e) { - //Activator.error(e.getMessage(), e); - } - } - if (!pluginXmlFile.exists()) { - try { - InputStream stream = new ByteArrayInputStream( - PLUGIN_TEMPLATE.getBytes()); - if (pluginXmlFile.exists()) { - pluginXmlFile.setContents(stream, true, true, null); - } else { - pluginXmlFile.create(stream, true, null); - } - stream.close(); - } catch (IOException e) { - //Activator.error(e.getMessage(), e); - } catch (CoreException e) { - //Activator.error(e.getMessage(), e); - } - } - } - - protected Document document; - protected Element root; - - public void loadDocument(IFile pluginXmlFile) { - SAXBuilder sxb = new SAXBuilder(); - try { - document = sxb.build(pluginXmlFile.getContents()); - - root = document.getRootElement(); - } catch (Exception e) { - //Activator.error(e.getMessage(), e); - } - } - - public void saveDocument(IFile pluginXmlFile) { - try { - XMLOutputter sortie = new XMLOutputter(Format.getPrettyFormat()); - - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - - sortie.output(document, stream); - InputStream inputStream = new ByteArrayInputStream( - stream.toByteArray()); - pluginXmlFile.setContents(inputStream, IResource.FORCE, null); - } catch (IOException e) { - //Activator.error(e.getMessage(), e); - } catch (CoreException e) { - //Activator.error(e.getMessage(), e); - } - } - - - public Element getOrCreateExtensionPoint(String extensionPointName){ - Element result; - List elements = root.getContent(new ExtensionFilter(extensionPointName)); - if(elements.size() == 0){ - // create extension point - result = new Element("extension"); - result.setAttribute("point", extensionPointName); - root.addContent(result); - } - else{ - result = elements.get(0); - } - return result; - } - - public class ExtensionFilter extends ElementFilter{ - - /** - * - */ - private static final long serialVersionUID = -1941823619643486082L; - protected String extensionPointName; - - public ExtensionFilter(String extensionPointName){ - super("extension"); - this.extensionPointName = extensionPointName; - } - - @Override - public Element filter(Object content) { - Element result = super.filter(content); - if(result == null) return null; - Attribute att = result.getAttribute("point"); - if(att == null) return null; - if(att.getValue().equals(extensionPointName)) return result; - else return null; - } - - } - - - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/tracemetamodel/StepStrings.xtend b/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/tracemetamodel/StepStrings.xtend deleted file mode 100644 index e013ca1fb..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/tracemetamodel/StepStrings.xtend +++ /dev/null @@ -1,45 +0,0 @@ -package fr.inria.diverse.trace.commons.tracemetamodel - -import org.eclipse.emf.ecore.EClass -import fr.inria.diverse.trace.commons.EcoreCraftingUtil -import org.eclipse.emf.ecore.EOperation - -class StepStrings { - - public static val String implicitStepSuffix = "_ImplicitStep"; - - public static val String abstractSubStepSuffix = "_AbstractSubStep"; - - public static val String globalImplicitStepName = "ImplicitStep"; - - public static val String package_BigSteps = "BigSteps"; - - public static val String ref_BigStepToSub = "subSteps"; - - public static def String implicitStepClassName(EClass macroStepClass) { - return macroStepClass.getName() + implicitStepSuffix; - } - - public static def String stepClassName(EClass containingClass, EOperation rule) { - val String prefix = - if (containingClass != null) { - EcoreCraftingUtil.getFQN(containingClass, "_").toFirstUpper + "_" - } else { - "Root_" - } - return prefix + rule.name.toFirstUpper - } - - public static def String subStepClassName(EClass containingClass, EOperation rule) { - return stepClassName(containingClass,rule) - } - - public static def String abstractSubStepClassName(EClass containingClass, EOperation rule) { - return stepClassName(containingClass, rule) + abstractSubStepSuffix - } - - public static def String implicitStepClassName(EClass containingClass, EOperation rule) { - return stepClassName(containingClass, rule) + implicitStepSuffix - } - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/.project b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/.project deleted file mode 100644 index 3fa612cf5..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - fr.inria.diverse.trace.gemoc.api - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/META-INF/MANIFEST.MF b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/META-INF/MANIFEST.MF deleted file mode 100644 index d24049caa..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/META-INF/MANIFEST.MF +++ /dev/null @@ -1,19 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Api -Bundle-SymbolicName: fr.inria.diverse.trace.gemoc.api -Bundle-Version: 1.0.0.qualifier -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.emf.ecore;bundle-version="2.10.2", - fr.inria.diverse.trace.api;bundle-version="1.0.0", - fr.obeo.timeline;bundle-version="1.0.0", - org.gemoc.xdsmlframework.api;bundle-version="0.1.0", - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: fr.inria.diverse.trace.gemoc.api; - uses:="org.eclipse.emf.ecore, - org.gemoc.executionframework.engine.mse, - fr.inria.diverse.trace.api, - org.gemoc.xdsmlframework.api.engine_addon, - fr.obeo.timeline.view" diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/pom.xml b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/pom.xml deleted file mode 100644 index 7272f4197..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - org.gemoc.modeldebugging.trace.commons - fr.inria.diverse.trace.gemoc.api - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.commons - org.gemoc.modeldebugging.trace.commons.root - 0.1.0-SNAPSHOT - ../.. - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - - diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IGemocTraceManager.java b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IGemocTraceManager.java deleted file mode 100644 index 019dbe812..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IGemocTraceManager.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.gemoc.api; - -import java.util.Set; - -import org.eclipse.emf.ecore.EObject; -import org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange; - -import fr.inria.diverse.trace.api.ITraceManager; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; - -public interface IGemocTraceManager extends ITraceManager { - - boolean addStep(MSEOccurrence mseOccurrence); - - default void addState() { - throw new IllegalStateException( - "The old addState method should not be used with new trace managers! Regenerate a trace manager."); - } - - default boolean addStateIfChanged() { - throw new IllegalStateException( - "The old addState method should not be used with new trace managers! Regenerate a trace manager."); - } - - default void addState(Set modelChanges) { - // For now we do nothing by default, so that former trace managers can keep compiling - throw new IllegalStateException( - "The new addState method should not be used with old trace managers! Regenerate a trace manager."); - } - - public abstract void setTraceRoot(EObject object); -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IMultiDimensionalTraceAddon.java b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IMultiDimensionalTraceAddon.java deleted file mode 100644 index c59b6c20c..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IMultiDimensionalTraceAddon.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.gemoc.api; - -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; - -public interface IMultiDimensionalTraceAddon extends IEngineAddon { - - ITraceExplorer getTraceExplorer(); - - ITraceConstructor getTraceConstructor(); - - ITraceExtractor getTraceExtractor(); - - IStepFactory getFactory(); - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IStepFactory.java b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IStepFactory.java deleted file mode 100644 index ed63768b1..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/IStepFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.gemoc.api; - -import java.util.List; - -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.Step; - -public interface IStepFactory { - - public Step createStep( - MSE mse, List parameters, List result); - -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceExplorer.java b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceExplorer.java deleted file mode 100644 index 8e5c76763..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceExplorer.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.gemoc.api; - -import java.util.List; - -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.commons.model.trace.Step; - -public interface ITraceExplorer extends ITraceNotifier, ITraceListener { - - /** - * @return The current step - */ - Step getCurrentForwardStep(); - - /** - * @return The step (big or small) preceding the current step - */ - Step getCurrentBackwardStep(); - - /** - * @return The big step containing the current step - */ - Step getCurrentBigStep(); - - /** - * @return The index of the current state in the trace - */ - int getCurrentStateIndex(); - - /** - * If o is a state, updates the explorer so that o becomes the current state. - * If o is a value, updates the explorer so that the first state to contain o - * becomes the current state. - * @param o The EObject to jump to : must be either a specific state or a specific value - */ - void jump(EObject o); - - /** - * Updates the explorer so that the state located at the provided index becomes the current state. - * @param i The index of the state - */ - void jump(int i); - - /** - * Updates the explorer so that the last recorded state and step in the trace become the current state and step. - */ - void loadLastState(); - - /** - * If the current step is a big step, updates the state of the explorer so that its current step - * becomes the first step contained by the current step. - * If the current step is a small step, updates the state of the explorer so that its current step - * becomes the step following the current step. - * @return Whether the operation succeeded or not - */ - boolean stepInto(); - - /** - * Updates the state of the explorer so that its current step becomes the step following the current step. - * @return Whether the operation succeeded or not - */ - boolean stepOver(); - - /** - * Updates the state of the explorer so that its current step becomes the step following the big step - * containing the current step. - * @return Whether the operation succeeded or not - */ - boolean stepReturn(); - - /** - * @return Whether the stepBackInto method can be called - */ - boolean canStepBackInto(); - - /** - * @return Whether the stepBackOver method can be called - */ - boolean canStepBackOver(); - - /** - * @return Whether the stepBackOut method can be called - */ - boolean canStepBackOut(); - - /** - * Updates the state of the explorer so that its current step becomes the small step preceding the current step. - * This is the backward equivalent of the step into operation. - * @return Whether the operation succeeded or not - */ - boolean stepBackInto(); - - /** - * Updates the state of the explorer so that its current step becomes the step (big or small) - * preceding the current step. - * This is the backward equivalent of the step over operation. - * @return Whether the operation succeeded or not - */ - boolean stepBackOver(); - - /** - * Updates the state of the explorer so that its current step becomes the big step containing the current step. - * This is the backward equivalent of the step return operation. - * @return Whether the operation succeeded or not - */ - boolean stepBackOut(); - - /** - * Updates the state of the explorer so that its current state is the first one to contain - * the value following the current one in the value trace located at the provided index. - * @param traceIndex - */ - void stepValue(int traceIndex); - - /** - * Updates the state of the explorer so that its current state is the first one to contain - * the value preceding the current one in the value trace located at the provided index. - * @param traceIndex The index of the value trace - */ - void backValue(int traceIndex); - - /** - * Returns whether the value trace located at the provided index has at least one value following the current one. - * @param traceIndex The index of the value trace - * @return Whether the value trace has a value following the current one - */ - boolean canStepValue(int traceIndex); - - /** - * Returns whether the value trace located at the provided index has at least one value preceding the current one. - * @param traceIndex The index of the value trace - * @return Whether the value trace has a value preceding the current one - */ - boolean canBackValue(int traceIndex); - - /** - * @return Whether the explorer is in replay mode or not - */ - boolean isInReplayMode(); - - /** - * Returns the current call stack of the explorer. The current step is at the end of the list. - * @return The current call stack - */ - List getCallStack(); - - /** - * Updates the call stack of the explorer so that the provided step becomes the current step. - * The state of the explorer is then recomputed accordingly. - * @param step The step that will become the current step - */ - void updateCallStack(Step step); -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceExtractor.java b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceExtractor.java deleted file mode 100644 index 5e8c934e8..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceExtractor.java +++ /dev/null @@ -1,213 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.gemoc.api; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.Step; - -public interface ITraceExtractor { - - /** - * Tells the extractor to ignore or not the value trace located at the provided index. - * @param trace The index of the value trace - * @param ignore Wether to ignore or not the value trace - */ - void ignoreValueTrace(int trace, boolean ignore); - - /** - * Returns whether the value trace located at the provided index is ignored or not. - * @param trace The index of the value trace - * @return true if the value trace is ignored, false otherwise - */ - boolean isValueTraceIgnored(int trace); - - /** - * Compares two states and returns true if their values vector are the same, false otherwise. - * @param state1 The first state - * @param state2 The second state - * @param respectIgnored Whether to include ignored values in the comparison or not - * @return true if the values vectors of the states are the same, false otherwise - */ - boolean compareStates(EObject state1, EObject state2, boolean respectIgnored); - - /** - * Computes the lists of states that have the same values vectors, for a given list of states. - * @param states The list of states to process - * @return The lists of states that have the same values vectors - */ - Collection> computeStateEquivalenceClasses(List states); - - /** - * Computes the lists of states that have the same values vectors, for all the states of the trace. - * @return The lists of states that have the same values vectors - */ - Collection> computeStateEquivalenceClasses(); - - /** - * @return the launch configuration that was used to generate the trace - */ - LaunchConfiguration getLaunchConfiguration(); - - /** - * @return The number of value traces in the trace - */ - int getNumberOfTraces(); - - /** - * Returns a description of the state located at the provided index. - * @param stateIndex The index of the state in the trace - * @return A string listing all values of the state - */ - String getStateDescription(int stateIndex); - - /** - * @return The number of states in the trace - */ - int getStatesTraceLength(); - - /** - * Creates and returns a generic wrapper of the specific state located at the provided index. - * @param stateIndex The index of the state in the trace - * @return A generic wrapper of the state - */ - StateWrapper getStateWrapper(int stateIndex); - - /** - * Returns a list of generic wrappers of the specific states located between - * the start and the end index, both included. - * @param start The index of the first desired state - * @param end The index of the last desired state - * @return A list of generic wrapper of the states - */ - List getStateWrappers(int start, int end); - - /** - * Creates and returns a generic wrapper of the provided specific step. - * @param step The step to create a wrapper for - * @return A generic wrapper of the step - */ - StepWrapper getStepWrapper(Step step); - - /** - * Returns a list of generic wrappers of the specific steps located between - * the start and the end index, both included. - * @param start The index of the first state - * @param end The index of the last state - * @return A list of generic wrapper of the steps - */ - List getStepWrappers(int start, int end); - - /** - * Returns a description of the value located on the provided value trace index and at the provided state index. - * @param traceIndex The index of the value trace - * @param stateIndex The index of the state - * @return A string describing the value - */ - String getValueDescription(int traceIndex, int stateIndex); - - /** - * Returns a label for the value trace located at the provided index - * @param traceIndex The index of the value trace - * @return A label for the value trace - */ - String getValueLabel(int traceIndex); - - /** - * @param traceIndex The index of the value trace - * @return The length of the value trace - */ - int getValuesTraceLength(int traceIndex); - - /** - * Creates and returns a generic wrapper of the provided specific value. - * @param traceIndex The index of the value trace - * @param stateIndex The index of the state - * @return A generic wrapper of the value - */ - ValueWrapper getValueWrapper(int traceIndex, int stateIndex); - - /** - * Returns a list of generic wrappers of the specific values of the value trace - * located at the provided index, between the start and the end - * index, both included. - * @param valueTraceIndex The index of the value trace - * @param start The index of the first desired state - * @param end The index of the last desired state - * @return A list of generic wrappers of the values - */ - List getValueWrappers(int valueTraceIndex, int start, int end); - - /** - * Updates the state of the extractor. - * To be called when the trace has changed. - */ - void update(); - - class ValueWrapper { - - public EObject value; - public int firstStateIndex; - public int traceIndex; - public int lastStateIndex; - - public ValueWrapper() { - value = null; - firstStateIndex = -1; - lastStateIndex = -1; - traceIndex = -1; - } - - public ValueWrapper(EObject value, int firstStateIndex, int lastStateIndex, int traceIndex) { - this.value = value; - this.firstStateIndex = firstStateIndex; - this.lastStateIndex = lastStateIndex; - this.traceIndex = traceIndex; - } - } - - class StateWrapper { - public EObject state; - public int stateIndex; - public boolean breakable; - - public StateWrapper() { - state = null; - stateIndex = -1; - breakable = false; - } - - public StateWrapper(EObject value, int stateIndex, boolean breakable) { - this.state = value; - this.stateIndex = stateIndex; - this.breakable = breakable; - } - } - - class StepWrapper { - public Step step = null; - public int startingIndex = -1; - public int endingIndex = -1; - public List subSteps = new ArrayList<>(); - - public StepWrapper(Step value, int startingIndex, int endingIndex, List subSteps) { - this.step = value; - this.startingIndex = startingIndex; - this.endingIndex = endingIndex; - this.subSteps.addAll(subSteps); - } - } -} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceListener.java b/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceListener.java deleted file mode 100644 index b91bd6ef4..000000000 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceListener.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.gemoc.api; - -public interface ITraceListener { - - void update(); - -} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.checkstyle b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/.classpath b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.classpath similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.stategraph/.classpath rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.classpath diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/.gitignore b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.gitignore similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.commons.model/.gitignore rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.gitignore diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.project b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.project new file mode 100644 index 000000000..89df75095 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.commons.model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/.settings/org.eclipse.jdt.core.prefs b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.stategraph/.settings/org.eclipse.jdt.core.prefs rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/.settings/org.eclipse.jdt.core.prefs diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/META-INF/MANIFEST.MF b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/META-INF/MANIFEST.MF new file mode 100644 index 000000000..bb9badf03 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.trace.commons.model;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: INRIA +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.trace.commons.model.helper, + org.eclipse.gemoc.trace.commons.model.trace, + org.eclipse.gemoc.trace.commons.model.trace.impl, + org.eclipse.gemoc.trace.commons.model.trace.util, + org.eclipse.gemoc.trace.commons.model.launchconfiguration, + org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl, + org.eclipse.gemoc.trace.commons.model.launchconfiguration.util, + org.eclipse.gemoc.trace.commons.model.generictrace, + org.eclipse.gemoc.trace.commons.model.generictrace.impl, + org.eclipse.gemoc.trace.commons.model.generictrace.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.gemoc.trace.commons.model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/trace/commons/plugins/fr.inria.diverse.trace.api/about.html b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/about.html similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.api/about.html rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/about.html diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/build.properties b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/build.properties new file mode 100644 index 000000000..fa30c97ad --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/build.properties @@ -0,0 +1,22 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + about.html +jars.compile.order = . +source.. = src/ +output.. = bin/ +src.includes = about.html diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.aird b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.aird new file mode 100644 index 000000000..531feabee --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.aird @@ -0,0 +1,1806 @@ + + + + GenericTrace.ecore + platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore + http://www.eclipse.org/emf/2002/Ecore + LaunchConfiguration.ecore + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + + + + + + + + + + + + + bold + + + + + + + + + + bold + + + + bold + + + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + bold + + + + + + + + + + labelSize + bold + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + bold + + + labelSize + + + + + + + + + routingStyle + + + italic + + + + + + + + + + + + + italic + + + + + + + + + + + + + italic + + + + + + + + + + + + routingStyle + + + italic + + + + + + + + + + + + routingStyle + + + italic + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + + + + + + + + + + + + bold + + + bold + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + italic + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + + 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 new file mode 100644 index 000000000..a2c748cfa --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.ecore @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..c0e605f5b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTrace.genmodel @@ -0,0 +1,125 @@ + + + GenericTrace.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTraceImpl.ecore b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTraceImpl.ecore new file mode 100644 index 000000000..2d194bba3 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTraceImpl.ecore @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..e07d2f170 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/GenericTraceImpl.genmodel @@ -0,0 +1,54 @@ + + + GenericTraceImpl.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.ecore b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.ecore new file mode 100644 index 000000000..909c76c5c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.ecore @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..129920f1e --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.genmodel @@ -0,0 +1,27 @@ + + + LaunchConfiguration.ecore + + + + + + + + + + + + + + + + + + + diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/trace class diagram.png b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/trace class diagram.png new file mode 100644 index 000000000..c6e19f2ec Binary files /dev/null and b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/trace class diagram.png differ diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/trace class diagram.svg b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/trace class diagram.svg new file mode 100644 index 000000000..68e6860bc --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/model/trace class diagram.svg @@ -0,0 +1,2142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ISerializable +byte[] + + + + + + +MSEOccurrence + +parameters : EJavaObject + +result : EJavaObject + + + + + + +MSE + +getCaller() : EObject + +getAction() : EOperation + + eAnnotations : EAnnotation + + + + + + +MSEModel + + + + + + +GenericMSE + +getCaller() : EObject + +getAction() : EOperation + + eAnnotations : EAnnotation + + actionReference : EOperation + + + + + + +Step + + +StateSub +Type + + + + + +BigStep + + +StepSubt +ype + +StateSub +Type + + + + + +SmallStep + + +State +Sub... + + + + + +SequentialStep + + +StepSubt +ype + +StateSub +Type + + + + + +ParallelStep + + +StepSubt +ype + +StateSub +Type + + + + + +GenericSequentialStep + + + + + + +GenericParallelStep + + + + + + +GenericSmallStep + + + + + + +Trace + + +StepSub +Type + +TracedObj +ectSubtype + +StateSub +Type + + + + + +TracedObject + + +Dimensio +nSubType + + + + + +Dimension + + +ValueSub +Type + + + + + +Value + + +StateSub +Type + + + + + +State + + +StepSub +Type + +ValueSu +bType + + + + + +GenericReferenceV +alue + + referenceValue : +EObject + + + + + + +GenericDimension + + + + + + +EStructuralFeature + + + + + + + +GenericTracedObject + + +T + + + + + +GenericTrace + + +StepSub +Type + + + + + +GenericState + +getValues() : GenericValue + +getStartedSteps() : GenericStep + +getEndedSteps() : GenericStep + + + + + + +EObject + +eClass() : EClass + +eIsProxy() : EBoolean + +eResource() : EResource + +eContainer() : EObject + +eContainingFeature() : EStructuralFeature + +eContainmentFeature() : EReference + +eContents() : EEList + +eAllContents() : ETreeIterator + +eCrossReferences() : EEList + +eGet(feature EStructuralFeature) : EJavaObject + +eGet(feature EStructuralFeature, resolve EBoolean) : EJavaObject + +eSet(feature EStructuralFeature, newValue EJavaObject) + +eIsSet(feature EStructuralFeature) : EBoolean + +eUnset(feature EStructuralFeature) + +eInvoke(operation EOperation, arguments EEList) : EJavaObject + + + + + + + +GenericAttributeValue + + + + + + +BooleanAttributeValue + +attributeValue : +EBoolean = false + + + + + + +IntegerAttributevalue + +attributeValue : EInt + + + + + + +StringAttributeValue + +attributeValue : +EString + + + + + + +LaunchConfiguration + +type : EString + + + + + + +LaunchConfigurationParameter + +value : EString + + + + + + +LanguageNamePar +ameter + + + + + + +AddonExtensionPar +ameter + + + + + + +ModelURIParamete +r + + + + + + +AnimatorURIParam +eter + + + + + + +EntryPointParamet +er + + + + + + +InitializationArgum +entsParameter + + + + + + +ModelRootParamet +er + + + + + + +InitializationMetho +dParameter + + + + + + +GenericStep + +getStartingState( +) : GenericState + +getEndingState() +: GenericState + + + + + + +GenericValue + +getStates() : +GenericState + + + + +[1..1] mse + + + + + +[0..*] ownedMSEs + + + + + +[0..1] mseoccurrence + + + + + + + + +[0..*] subSteps + + + + + + + + +[1..1] rootStep + + + + + + + + + + +<<bind StateSubType>> StateSubType + + + + + +<<bind StateSubType>> StateSubType + + + + + +<<bind StepSubtype,StateSubType>> StepSubtype,StateSubType + + + +<<bind StepSubtype,StateSubType>> StepSubtype,StateSubType + + + +<<bind StepSubtype,StateSubType>> GenericStep,GenericState + + + +<<bind StepSubtype,StateSubType>> GenericStep,GenericState + + + +<<bind StateSubType>> GenericState + + + + + + +[0..*] tracedObjects + + + + + + +[0..*] dimensions + + + + + + +[0..*] values + + + + + + + + +[0..*] states + + + + + +<<bind ValueSubType>> GenericValue + + + +[0..1] dynamicProperty + + + +<<bind DimensionSubType>> GenericDimension + + + + + +<<bind StepSubType,TracedObjectSubtype,StateSubType>> StepSubType,GenericTracedObject,GenericState + + + +<<bind StepSubType,ValueSubType>> GenericStep,GenericValue + + + + +[0..1] callerReference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[1..1] launchconfiguration + + + + + +[0..*] parameters + + + + + + + +<<bind StateSubType>> GenericState + + + + + +<<bind StateSubType>> GenericState + + + + +<<bind StepSubtype,StateSubType>> GenericStep,GenericState + + + + + +<<bind StepSubtype,StateSubType>> GenericStep,GenericState + + + + + + + + + + + + + +<<bind StateSubType>> GenericState + + + +[0..*] statesRef +[0..*] valuesRef + + + + + + + +[0..*] /startedSteps + + + + + +[0..*] /endedSteps + + + + + + + +[1..1] /startingState + + + + + + +[0..1] /endingState + + + + + +[0..*] /values + + + + +[1..1] startingStateRef +[0..*] startedStepsRef + + + + + + +[0..1] endingStateRef +[0..*] endedStepsRef + + + + + + + + + +[0..*] /states + + + + + diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/plugin.properties b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/plugin.properties new file mode 100644 index 000000000..99a8f15aa --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/plugin.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +pluginName = Generic Trace Model +providerName = www.example.org diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/plugin.properties~ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/plugin.properties~ similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.commons.model/plugin.properties~ rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/plugin.properties~ diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/plugin.xml b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/plugin.xml new file mode 100644 index 000000000..c8aa8fe2c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/plugin.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/pom.xml b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/pom.xml new file mode 100644 index 000000000..c4bd836ec --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + ../.. + org.eclipse.gemoc.trace.commons + org.eclipse.gemoc.trace.commons.root + 2.3.0-SNAPSHOT + + + org.eclipse.gemoc.trace.commons.model + eclipse-plugin + 2.3.0-SNAPSHOT + \ No newline at end of file diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/BooleanAttributeValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/BooleanAttributeValue.java new file mode 100644 index 000000000..a971fec9d --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/BooleanAttributeValue.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + + +/** + * + * A representation of the model object 'Boolean Attribute Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue#isAttributeValue Attribute Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getBooleanAttributeValue() + * @model + * @generated + */ +public interface BooleanAttributeValue extends GenericAttributeValue { + /** + * Returns the value of the 'Attribute Value' attribute. + * The default value is "false". + * + *

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

+ * + * @return the value of the 'Attribute Value' attribute. + * @see #setAttributeValue(boolean) + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getBooleanAttributeValue_AttributeValue() + * @model default="false" + * @generated + */ + boolean isAttributeValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue#isAttributeValue Attribute Value}' attribute. + * + * + * @param value the new value of the 'Attribute Value' attribute. + * @see #isAttributeValue() + * @generated + */ + void setAttributeValue(boolean value); + +} // BooleanAttributeValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericAttributeValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericAttributeValue.java new file mode 100644 index 000000000..eca5d807c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericAttributeValue.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + + +/** + * + * A representation of the model object 'Generic Attribute Value'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericAttributeValue() + * @model abstract="true" + * @generated + */ +public interface GenericAttributeValue extends GenericValue { +} // GenericAttributeValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericDimension.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericDimension.java new file mode 100644 index 000000000..d05252e5b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericDimension.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; + +import org.eclipse.emf.ecore.EStructuralFeature; + +/** + * + * A representation of the model object 'Generic Dimension'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension#getDynamicProperty Dynamic Property}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericDimension() + * @model + * @generated + */ +public interface GenericDimension extends Dimension { + /** + * Returns the value of the 'Dynamic Property' reference. + * + *

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

+ * + * @return the value of the 'Dynamic Property' reference. + * @see #setDynamicProperty(EStructuralFeature) + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericDimension_DynamicProperty() + * @model + * @generated + */ + EStructuralFeature getDynamicProperty(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension#getDynamicProperty Dynamic Property}' reference. + * + * + * @param value the new value of the 'Dynamic Property' reference. + * @see #getDynamicProperty() + * @generated + */ + void setDynamicProperty(EStructuralFeature value); + +} // GenericDimension diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericParallelStep.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericParallelStep.java new file mode 100644 index 000000000..5e525dd72 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericParallelStep.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.ParallelStep; + + +/** + * + * A representation of the model object 'Generic Parallel Step'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericParallelStep() + * @model + * @generated + */ +public interface GenericParallelStep extends GenericStep, ParallelStep { +} // GenericParallelStep diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericReferenceValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericReferenceValue.java new file mode 100644 index 000000000..eafc5f904 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericReferenceValue.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +/** + * + * A representation of the model object 'Generic Reference Value'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericReferenceValue() + * @model abstract="true" + * @generated + */ +public interface GenericReferenceValue extends GenericValue { + +} // GenericReferenceValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericSequentialStep.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericSequentialStep.java new file mode 100644 index 000000000..c7fe5fdeb --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericSequentialStep.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; + + +/** + * + * A representation of the model object 'Generic Sequential Step'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericSequentialStep() + * @model + * @generated + */ +public interface GenericSequentialStep extends GenericStep, SequentialStep { +} // GenericSequentialStep diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericSmallStep.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericSmallStep.java new file mode 100644 index 000000000..c464a7ff6 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericSmallStep.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.SmallStep; + + +/** + * + * A representation of the model object 'Generic Small Step'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericSmallStep() + * @model + * @generated + */ +public interface GenericSmallStep extends GenericStep, SmallStep { +} // GenericSmallStep diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericState.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericState.java new file mode 100644 index 000000000..2abca18c8 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericState.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.State; + +/** + * + * A representation of the model object 'Generic State'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericState() + * @model + * @generated + */ +public interface GenericState extends State { + +} // GenericState diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericStep.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericStep.java new file mode 100644 index 000000000..357ecb56c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericStep.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +/** + * + * A representation of the model object 'Generic Step'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericStep() + * @model abstract="true" + * @generated + */ +public interface GenericStep extends Step { +} // GenericStep diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericTrace.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericTrace.java new file mode 100644 index 000000000..4fa04517a --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericTrace.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.Trace; + +/** + * + * A representation of the model object 'Generic Trace'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericTrace() + * @model + * @generated + */ +public interface GenericTrace extends Trace { +} // GenericTrace diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericTracedObject.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericTracedObject.java new file mode 100644 index 000000000..d2cd12e3c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericTracedObject.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Generic Traced Object'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getOriginalObject Original Object}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getAllDimensions All Dimensions}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericTracedObject() + * @model + * @generated + */ +public interface GenericTracedObject extends TracedObject { + + /** + * Returns the value of the 'Original Object' reference. + * + *

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

+ * + * @return the value of the 'Original Object' reference. + * @see #setOriginalObject(EObject) + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericTracedObject_OriginalObject() + * @model + * @generated + */ + EObject getOriginalObject(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getOriginalObject Original Object}' reference. + * + * + * @param value the new value of the 'Original Object' reference. + * @see #getOriginalObject() + * @generated + */ + void setOriginalObject(EObject value); + + /** + * Returns the value of the 'All Dimensions' containment reference list. + * The list contents are of type {@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension}. + * + *

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

+ * + * @return the value of the 'All Dimensions' containment reference list. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericTracedObject_AllDimensions() + * @model containment="true" + * @generated + */ + EList getAllDimensions(); + + /** + * + * + * @model kind="operation" + * annotation="http://www.eclipse.org/emf/2002/GenModel body='final EList result = new org.eclipse.emf.ecore.util.BasicInternalEList(Object.class);\nresult.addAll(super.getDimensionsInternal());\nresult.addAll(getAllDimensions());\nreturn result;\n'" + * @generated + */ + EList getDimensionsInternal(); +} // GenericTracedObject diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericValue.java new file mode 100644 index 000000000..e012aa9c3 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenericValue.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +/** + * + * A representation of the model object 'Generic Value'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getGenericValue() + * @model abstract="true" + * @generated + */ +public interface GenericValue extends Value { + +} // GenericValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenerictraceFactory.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenerictraceFactory.java new file mode 100644 index 000000000..2ed6268e0 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenerictraceFactory.java @@ -0,0 +1,187 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +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.trace.commons.model.generictrace.GenerictracePackage + * @generated + */ +public interface GenerictraceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + GenerictraceFactory eINSTANCE = org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictraceFactoryImpl.init(); + + /** + * Returns a new object of class 'Generic Sequential Step'. + * + * + * @return a new object of class 'Generic Sequential Step'. + * @generated + */ + GenericSequentialStep createGenericSequentialStep(); + + /** + * Returns a new object of class 'Generic Parallel Step'. + * + * + * @return a new object of class 'Generic Parallel Step'. + * @generated + */ + GenericParallelStep createGenericParallelStep(); + + /** + * Returns a new object of class 'Generic Small Step'. + * + * + * @return a new object of class 'Generic Small Step'. + * @generated + */ + GenericSmallStep createGenericSmallStep(); + + /** + * Returns a new object of class 'Generic Dimension'. + * + * + * @return a new object of class 'Generic Dimension'. + * @generated + */ + GenericDimension createGenericDimension(); + + /** + * Returns a new object of class 'Generic Traced Object'. + * + * + * @return a new object of class 'Generic Traced Object'. + * @generated + */ + GenericTracedObject createGenericTracedObject(); + + /** + * Returns a new object of class 'Generic State'. + * + * + * @return a new object of class 'Generic State'. + * @generated + */ + GenericState createGenericState(); + + /** + * Returns a new object of class 'Generic Trace'. + * + * + * @return a new object of class 'Generic Trace'. + * @generated + */ + GenericTrace createGenericTrace(); + + /** + * Returns a new object of class 'Boolean Attribute Value'. + * + * + * @return a new object of class 'Boolean Attribute Value'. + * @generated + */ + BooleanAttributeValue createBooleanAttributeValue(); + + /** + * Returns a new object of class 'Integer Attribute Value'. + * + * + * @return a new object of class 'Integer Attribute Value'. + * @generated + */ + IntegerAttributeValue createIntegerAttributeValue(); + + /** + * Returns a new object of class 'String Attribute Value'. + * + * + * @return a new object of class 'String Attribute Value'. + * @generated + */ + StringAttributeValue createStringAttributeValue(); + + /** + * Returns a new object of class 'Many Boolean Attribute Value'. + * + * + * @return a new object of class 'Many Boolean Attribute Value'. + * @generated + */ + ManyBooleanAttributeValue createManyBooleanAttributeValue(); + + /** + * Returns a new object of class 'Many Integer Attribute Value'. + * + * + * @return a new object of class 'Many Integer Attribute Value'. + * @generated + */ + ManyIntegerAttributeValue createManyIntegerAttributeValue(); + + /** + * Returns a new object of class 'Many String Attribute Value'. + * + * + * @return a new object of class 'Many String Attribute Value'. + * @generated + */ + ManyStringAttributeValue createManyStringAttributeValue(); + + /** + * Returns a new object of class 'Single Reference Value'. + * + * + * @return a new object of class 'Single Reference Value'. + * @generated + */ + SingleReferenceValue createSingleReferenceValue(); + + /** + * Returns a new object of class 'Many Reference Value'. + * + * + * @return a new object of class 'Many Reference Value'. + * @generated + */ + ManyReferenceValue createManyReferenceValue(); + + /** + * Returns a new object of class 'Integer Object Attribute Value'. + * + * + * @return a new object of class 'Integer Object Attribute Value'. + * @generated + */ + IntegerObjectAttributeValue createIntegerObjectAttributeValue(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + GenerictracePackage getGenerictracePackage(); + +} //GenerictraceFactory diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenerictracePackage.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenerictracePackage.java new file mode 100644 index 000000000..bad37f560 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/GenerictracePackage.java @@ -0,0 +1,1765 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +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.trace.commons.model.generictrace.GenerictraceFactory + * @model kind="package" + * @generated + */ +public interface GenerictracePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "generictrace"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.gemoc.org/generic_trace_impl"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "generictrace"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + GenerictracePackage eINSTANCE = org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericStepImpl Generic Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericStepImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericStep() + * @generated + */ + int GENERIC_STEP = 15; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int GENERIC_STEP__MSEOCCURRENCE = TracePackage.STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_STEP__STARTING_STATE = TracePackage.STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_STEP__ENDING_STATE = TracePackage.STEP__ENDING_STATE; + + /** + * The number of structural features of the 'Generic Step' class. + * + * + * @generated + * @ordered + */ + int GENERIC_STEP_FEATURE_COUNT = TracePackage.STEP_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Generic Step' class. + * + * + * @generated + * @ordered + */ + int GENERIC_STEP_OPERATION_COUNT = TracePackage.STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericSequentialStepImpl Generic Sequential Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericSequentialStepImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericSequentialStep() + * @generated + */ + int GENERIC_SEQUENTIAL_STEP = 0; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int GENERIC_SEQUENTIAL_STEP__MSEOCCURRENCE = GENERIC_STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_SEQUENTIAL_STEP__STARTING_STATE = GENERIC_STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_SEQUENTIAL_STEP__ENDING_STATE = GENERIC_STEP__ENDING_STATE; + + /** + * The feature id for the 'Sub Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_SEQUENTIAL_STEP__SUB_STEPS = GENERIC_STEP_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Generic Sequential Step' class. + * + * + * @generated + * @ordered + */ + int GENERIC_SEQUENTIAL_STEP_FEATURE_COUNT = GENERIC_STEP_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Generic Sequential Step' class. + * + * + * @generated + * @ordered + */ + int GENERIC_SEQUENTIAL_STEP_OPERATION_COUNT = GENERIC_STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericParallelStepImpl Generic Parallel Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericParallelStepImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericParallelStep() + * @generated + */ + int GENERIC_PARALLEL_STEP = 1; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int GENERIC_PARALLEL_STEP__MSEOCCURRENCE = GENERIC_STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_PARALLEL_STEP__STARTING_STATE = GENERIC_STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_PARALLEL_STEP__ENDING_STATE = GENERIC_STEP__ENDING_STATE; + + /** + * The feature id for the 'Sub Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_PARALLEL_STEP__SUB_STEPS = GENERIC_STEP_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Generic Parallel Step' class. + * + * + * @generated + * @ordered + */ + int GENERIC_PARALLEL_STEP_FEATURE_COUNT = GENERIC_STEP_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Generic Parallel Step' class. + * + * + * @generated + * @ordered + */ + int GENERIC_PARALLEL_STEP_OPERATION_COUNT = GENERIC_STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericSmallStepImpl Generic Small Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericSmallStepImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericSmallStep() + * @generated + */ + int GENERIC_SMALL_STEP = 2; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int GENERIC_SMALL_STEP__MSEOCCURRENCE = GENERIC_STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_SMALL_STEP__STARTING_STATE = GENERIC_STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_SMALL_STEP__ENDING_STATE = GENERIC_STEP__ENDING_STATE; + + /** + * The number of structural features of the 'Generic Small Step' class. + * + * + * @generated + * @ordered + */ + int GENERIC_SMALL_STEP_FEATURE_COUNT = GENERIC_STEP_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Generic Small Step' class. + * + * + * @generated + * @ordered + */ + int GENERIC_SMALL_STEP_OPERATION_COUNT = GENERIC_STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericValueImpl Generic Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericValue() + * @generated + */ + int GENERIC_VALUE = 16; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_VALUE__STATES = TracePackage.VALUE__STATES; + + /** + * The number of structural features of the 'Generic Value' class. + * + * + * @generated + * @ordered + */ + int GENERIC_VALUE_FEATURE_COUNT = TracePackage.VALUE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Generic Value' class. + * + * + * @generated + * @ordered + */ + int GENERIC_VALUE_OPERATION_COUNT = TracePackage.VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericReferenceValueImpl Generic Reference Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericReferenceValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericReferenceValue() + * @generated + */ + int GENERIC_REFERENCE_VALUE = 3; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_REFERENCE_VALUE__STATES = GENERIC_VALUE__STATES; + + /** + * The number of structural features of the 'Generic Reference Value' class. + * + * + * @generated + * @ordered + */ + int GENERIC_REFERENCE_VALUE_FEATURE_COUNT = GENERIC_VALUE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Generic Reference Value' class. + * + * + * @generated + * @ordered + */ + int GENERIC_REFERENCE_VALUE_OPERATION_COUNT = GENERIC_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericDimensionImpl Generic Dimension}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericDimensionImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericDimension() + * @generated + */ + int GENERIC_DIMENSION = 4; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_DIMENSION__VALUES = TracePackage.DIMENSION__VALUES; + + /** + * The feature id for the 'Dynamic Property' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_DIMENSION__DYNAMIC_PROPERTY = TracePackage.DIMENSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Generic Dimension' class. + * + * + * @generated + * @ordered + */ + int GENERIC_DIMENSION_FEATURE_COUNT = TracePackage.DIMENSION_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Generic Dimension' class. + * + * + * @generated + * @ordered + */ + int GENERIC_DIMENSION_OPERATION_COUNT = TracePackage.DIMENSION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTracedObjectImpl Generic Traced Object}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTracedObjectImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericTracedObject() + * @generated + */ + int GENERIC_TRACED_OBJECT = 5; + + /** + * The feature id for the 'Dimensions' reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACED_OBJECT__DIMENSIONS = TracePackage.TRACED_OBJECT__DIMENSIONS; + + /** + * The feature id for the 'Original Object' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT = TracePackage.TRACED_OBJECT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'All Dimensions' containment reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACED_OBJECT__ALL_DIMENSIONS = TracePackage.TRACED_OBJECT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Generic Traced Object' class. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACED_OBJECT_FEATURE_COUNT = TracePackage.TRACED_OBJECT_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Get Dimensions Internal' operation. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACED_OBJECT___GET_DIMENSIONS_INTERNAL = TracePackage.TRACED_OBJECT_OPERATION_COUNT + 0; + + /** + * The number of operations of the 'Generic Traced Object' class. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACED_OBJECT_OPERATION_COUNT = TracePackage.TRACED_OBJECT_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericStateImpl Generic State}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericStateImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericState() + * @generated + */ + int GENERIC_STATE = 6; + + /** + * The feature id for the 'Started Steps' reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_STATE__STARTED_STEPS = TracePackage.STATE__STARTED_STEPS; + + /** + * The feature id for the 'Ended Steps' reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_STATE__ENDED_STEPS = TracePackage.STATE__ENDED_STEPS; + + /** + * The feature id for the 'Values' reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_STATE__VALUES = TracePackage.STATE__VALUES; + + /** + * The number of structural features of the 'Generic State' class. + * + * + * @generated + * @ordered + */ + int GENERIC_STATE_FEATURE_COUNT = TracePackage.STATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Generic State' class. + * + * + * @generated + * @ordered + */ + int GENERIC_STATE_OPERATION_COUNT = TracePackage.STATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTraceImpl Generic Trace}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTraceImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericTrace() + * @generated + */ + int GENERIC_TRACE = 7; + + /** + * The feature id for the 'Root Step' containment reference. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACE__ROOT_STEP = TracePackage.TRACE__ROOT_STEP; + + /** + * The feature id for the 'Traced Objects' containment reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACE__TRACED_OBJECTS = TracePackage.TRACE__TRACED_OBJECTS; + + /** + * The feature id for the 'States' containment reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACE__STATES = TracePackage.TRACE__STATES; + + /** + * The feature id for the 'Launchconfiguration' containment reference. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACE__LAUNCHCONFIGURATION = TracePackage.TRACE__LAUNCHCONFIGURATION; + + /** + * The number of structural features of the 'Generic Trace' class. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACE_FEATURE_COUNT = TracePackage.TRACE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Generic Trace' class. + * + * + * @generated + * @ordered + */ + int GENERIC_TRACE_OPERATION_COUNT = TracePackage.TRACE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericAttributeValueImpl Generic Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericAttributeValue() + * @generated + */ + int GENERIC_ATTRIBUTE_VALUE = 8; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_ATTRIBUTE_VALUE__STATES = GENERIC_VALUE__STATES; + + /** + * The number of structural features of the 'Generic Attribute Value' class. + * + * + * @generated + * @ordered + */ + int GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT = GENERIC_VALUE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Generic Attribute Value' class. + * + * + * @generated + * @ordered + */ + int GENERIC_ATTRIBUTE_VALUE_OPERATION_COUNT = GENERIC_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.BooleanAttributeValueImpl Boolean Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.BooleanAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getBooleanAttributeValue() + * @generated + */ + int BOOLEAN_ATTRIBUTE_VALUE = 9; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_VALUE__STATES = GENERIC_ATTRIBUTE_VALUE__STATES; + + /** + * The feature id for the 'Attribute Value' attribute. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Boolean Attribute Value' class. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_VALUE_FEATURE_COUNT = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Boolean Attribute Value' class. + * + * + * @generated + * @ordered + */ + int BOOLEAN_ATTRIBUTE_VALUE_OPERATION_COUNT = GENERIC_ATTRIBUTE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerAttributeValueImpl Integer Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getIntegerAttributeValue() + * @generated + */ + int INTEGER_ATTRIBUTE_VALUE = 10; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_VALUE__STATES = GENERIC_ATTRIBUTE_VALUE__STATES; + + /** + * The feature id for the 'Attribute Value' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Integer Attribute Value' class. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_VALUE_FEATURE_COUNT = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Integer Attribute Value' class. + * + * + * @generated + * @ordered + */ + int INTEGER_ATTRIBUTE_VALUE_OPERATION_COUNT = GENERIC_ATTRIBUTE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.StringAttributeValueImpl String Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.StringAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getStringAttributeValue() + * @generated + */ + int STRING_ATTRIBUTE_VALUE = 11; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_VALUE__STATES = GENERIC_ATTRIBUTE_VALUE__STATES; + + /** + * The feature id for the 'Attribute Value' attribute. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'String Attribute Value' class. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_VALUE_FEATURE_COUNT = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'String Attribute Value' class. + * + * + * @generated + * @ordered + */ + int STRING_ATTRIBUTE_VALUE_OPERATION_COUNT = GENERIC_ATTRIBUTE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyBooleanAttributeValueImpl Many Boolean Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyBooleanAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getManyBooleanAttributeValue() + * @generated + */ + int MANY_BOOLEAN_ATTRIBUTE_VALUE = 12; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_VALUE__STATES = GENERIC_ATTRIBUTE_VALUE__STATES; + + /** + * The feature id for the 'Attribute Value' attribute list. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Many Boolean Attribute Value' class. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_VALUE_FEATURE_COUNT = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Many Boolean Attribute Value' class. + * + * + * @generated + * @ordered + */ + int MANY_BOOLEAN_ATTRIBUTE_VALUE_OPERATION_COUNT = GENERIC_ATTRIBUTE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyIntegerAttributeValueImpl Many Integer Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyIntegerAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getManyIntegerAttributeValue() + * @generated + */ + int MANY_INTEGER_ATTRIBUTE_VALUE = 13; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_VALUE__STATES = GENERIC_ATTRIBUTE_VALUE__STATES; + + /** + * The feature id for the 'Attribute Value' attribute list. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Many Integer Attribute Value' class. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_VALUE_FEATURE_COUNT = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Many Integer Attribute Value' class. + * + * + * @generated + * @ordered + */ + int MANY_INTEGER_ATTRIBUTE_VALUE_OPERATION_COUNT = GENERIC_ATTRIBUTE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyStringAttributeValueImpl Many String Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyStringAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getManyStringAttributeValue() + * @generated + */ + int MANY_STRING_ATTRIBUTE_VALUE = 14; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_VALUE__STATES = GENERIC_ATTRIBUTE_VALUE__STATES; + + /** + * The feature id for the 'Attribute Value' attribute list. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Many String Attribute Value' class. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_VALUE_FEATURE_COUNT = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Many String Attribute Value' class. + * + * + * @generated + * @ordered + */ + int MANY_STRING_ATTRIBUTE_VALUE_OPERATION_COUNT = GENERIC_ATTRIBUTE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.SingleReferenceValueImpl Single Reference Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.SingleReferenceValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getSingleReferenceValue() + * @generated + */ + int SINGLE_REFERENCE_VALUE = 17; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_VALUE__STATES = GENERIC_REFERENCE_VALUE__STATES; + + /** + * The feature id for the 'Reference Value' reference. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_VALUE__REFERENCE_VALUE = GENERIC_REFERENCE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Single Reference Value' class. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_VALUE_FEATURE_COUNT = GENERIC_REFERENCE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Single Reference Value' class. + * + * + * @generated + * @ordered + */ + int SINGLE_REFERENCE_VALUE_OPERATION_COUNT = GENERIC_REFERENCE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyReferenceValueImpl Many Reference Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyReferenceValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getManyReferenceValue() + * @generated + */ + int MANY_REFERENCE_VALUE = 18; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_VALUE__STATES = GENERIC_REFERENCE_VALUE__STATES; + + /** + * The feature id for the 'Reference Values' reference list. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_VALUE__REFERENCE_VALUES = GENERIC_REFERENCE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Many Reference Value' class. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_VALUE_FEATURE_COUNT = GENERIC_REFERENCE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Many Reference Value' class. + * + * + * @generated + * @ordered + */ + int MANY_REFERENCE_VALUE_OPERATION_COUNT = GENERIC_REFERENCE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerObjectAttributeValueImpl Integer Object Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerObjectAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getIntegerObjectAttributeValue() + * @generated + */ + int INTEGER_OBJECT_ATTRIBUTE_VALUE = 19; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int INTEGER_OBJECT_ATTRIBUTE_VALUE__STATES = GENERIC_ATTRIBUTE_VALUE__STATES; + + /** + * The feature id for the 'Attribute Value' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_OBJECT_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Integer Object Attribute Value' class. + * + * + * @generated + * @ordered + */ + int INTEGER_OBJECT_ATTRIBUTE_VALUE_FEATURE_COUNT = GENERIC_ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Integer Object Attribute Value' class. + * + * + * @generated + * @ordered + */ + int INTEGER_OBJECT_ATTRIBUTE_VALUE_OPERATION_COUNT = GENERIC_ATTRIBUTE_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the 'ISerializable' data type. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getISerializable() + * @generated + */ + int ISERIALIZABLE = 20; + + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericSequentialStep Generic Sequential Step}'. + * + * + * @return the meta object for class 'Generic Sequential Step'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericSequentialStep + * @generated + */ + EClass getGenericSequentialStep(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericParallelStep Generic Parallel Step}'. + * + * + * @return the meta object for class 'Generic Parallel Step'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericParallelStep + * @generated + */ + EClass getGenericParallelStep(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericSmallStep Generic Small Step}'. + * + * + * @return the meta object for class 'Generic Small Step'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericSmallStep + * @generated + */ + EClass getGenericSmallStep(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericReferenceValue Generic Reference Value}'. + * + * + * @return the meta object for class 'Generic Reference Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericReferenceValue + * @generated + */ + EClass getGenericReferenceValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension Generic Dimension}'. + * + * + * @return the meta object for class 'Generic Dimension'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension + * @generated + */ + EClass getGenericDimension(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension#getDynamicProperty Dynamic Property}'. + * + * + * @return the meta object for the reference 'Dynamic Property'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension#getDynamicProperty() + * @see #getGenericDimension() + * @generated + */ + EReference getGenericDimension_DynamicProperty(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject Generic Traced Object}'. + * + * + * @return the meta object for class 'Generic Traced Object'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject + * @generated + */ + EClass getGenericTracedObject(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getOriginalObject Original Object}'. + * + * + * @return the meta object for the reference 'Original Object'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getOriginalObject() + * @see #getGenericTracedObject() + * @generated + */ + EReference getGenericTracedObject_OriginalObject(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getAllDimensions All Dimensions}'. + * + * + * @return the meta object for the containment reference list 'All Dimensions'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getAllDimensions() + * @see #getGenericTracedObject() + * @generated + */ + EReference getGenericTracedObject_AllDimensions(); + + /** + * Returns the meta object for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getDimensionsInternal() Get Dimensions Internal}' operation. + * + * + * @return the meta object for the 'Get Dimensions Internal' operation. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject#getDimensionsInternal() + * @generated + */ + EOperation getGenericTracedObject__GetDimensionsInternal(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericState Generic State}'. + * + * + * @return the meta object for class 'Generic State'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericState + * @generated + */ + EClass getGenericState(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTrace Generic Trace}'. + * + * + * @return the meta object for class 'Generic Trace'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericTrace + * @generated + */ + EClass getGenericTrace(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericAttributeValue Generic Attribute Value}'. + * + * + * @return the meta object for class 'Generic Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericAttributeValue + * @generated + */ + EClass getGenericAttributeValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue Boolean Attribute Value}'. + * + * + * @return the meta object for class 'Boolean Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue + * @generated + */ + EClass getBooleanAttributeValue(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue#isAttributeValue Attribute Value}'. + * + * + * @return the meta object for the attribute 'Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue#isAttributeValue() + * @see #getBooleanAttributeValue() + * @generated + */ + EAttribute getBooleanAttributeValue_AttributeValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue Integer Attribute Value}'. + * + * + * @return the meta object for class 'Integer Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue + * @generated + */ + EClass getIntegerAttributeValue(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue#getAttributeValue Attribute Value}'. + * + * + * @return the meta object for the attribute 'Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue#getAttributeValue() + * @see #getIntegerAttributeValue() + * @generated + */ + EAttribute getIntegerAttributeValue_AttributeValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue String Attribute Value}'. + * + * + * @return the meta object for class 'String Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue + * @generated + */ + EClass getStringAttributeValue(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue#getAttributeValue Attribute Value}'. + * + * + * @return the meta object for the attribute 'Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue#getAttributeValue() + * @see #getStringAttributeValue() + * @generated + */ + EAttribute getStringAttributeValue_AttributeValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyBooleanAttributeValue Many Boolean Attribute Value}'. + * + * + * @return the meta object for class 'Many Boolean Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.ManyBooleanAttributeValue + * @generated + */ + EClass getManyBooleanAttributeValue(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyBooleanAttributeValue#getAttributeValue Attribute Value}'. + * + * + * @return the meta object for the attribute list 'Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.ManyBooleanAttributeValue#getAttributeValue() + * @see #getManyBooleanAttributeValue() + * @generated + */ + EAttribute getManyBooleanAttributeValue_AttributeValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyIntegerAttributeValue Many Integer Attribute Value}'. + * + * + * @return the meta object for class 'Many Integer Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.ManyIntegerAttributeValue + * @generated + */ + EClass getManyIntegerAttributeValue(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyIntegerAttributeValue#getAttributeValue Attribute Value}'. + * + * + * @return the meta object for the attribute list 'Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.ManyIntegerAttributeValue#getAttributeValue() + * @see #getManyIntegerAttributeValue() + * @generated + */ + EAttribute getManyIntegerAttributeValue_AttributeValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyStringAttributeValue Many String Attribute Value}'. + * + * + * @return the meta object for class 'Many String Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.ManyStringAttributeValue + * @generated + */ + EClass getManyStringAttributeValue(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyStringAttributeValue#getAttributeValue Attribute Value}'. + * + * + * @return the meta object for the attribute list 'Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.ManyStringAttributeValue#getAttributeValue() + * @see #getManyStringAttributeValue() + * @generated + */ + EAttribute getManyStringAttributeValue_AttributeValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep Generic Step}'. + * + * + * @return the meta object for class 'Generic Step'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep + * @generated + */ + EClass getGenericStep(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue Generic Value}'. + * + * + * @return the meta object for class 'Generic Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue + * @generated + */ + EClass getGenericValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue Single Reference Value}'. + * + * + * @return the meta object for class 'Single Reference Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue + * @generated + */ + EClass getSingleReferenceValue(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue#getReferenceValue Reference Value}'. + * + * + * @return the meta object for the reference 'Reference Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue#getReferenceValue() + * @see #getSingleReferenceValue() + * @generated + */ + EReference getSingleReferenceValue_ReferenceValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue Many Reference Value}'. + * + * + * @return the meta object for class 'Many Reference Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue + * @generated + */ + EClass getManyReferenceValue(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue#getReferenceValues Reference Values}'. + * + * + * @return the meta object for the reference list 'Reference Values'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue#getReferenceValues() + * @see #getManyReferenceValue() + * @generated + */ + EReference getManyReferenceValue_ReferenceValues(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue Integer Object Attribute Value}'. + * + * + * @return the meta object for class 'Integer Object Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue + * @generated + */ + EClass getIntegerObjectAttributeValue(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue#getAttributeValue Attribute Value}'. + * + * + * @return the meta object for the attribute 'Attribute Value'. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue#getAttributeValue() + * @see #getIntegerObjectAttributeValue() + * @generated + */ + EAttribute getIntegerObjectAttributeValue_AttributeValue(); + + /** + * Returns the meta object for data type 'ISerializable'. + * + * + * @return the meta object for data type 'ISerializable'. + * @model instanceClass="byte[]" + * @generated + */ + EDataType getISerializable(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + GenerictraceFactory getGenerictraceFactory(); + + /** + * + * 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.trace.commons.model.generictrace.impl.GenericSequentialStepImpl Generic Sequential Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericSequentialStepImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericSequentialStep() + * @generated + */ + EClass GENERIC_SEQUENTIAL_STEP = eINSTANCE.getGenericSequentialStep(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericParallelStepImpl Generic Parallel Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericParallelStepImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericParallelStep() + * @generated + */ + EClass GENERIC_PARALLEL_STEP = eINSTANCE.getGenericParallelStep(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericSmallStepImpl Generic Small Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericSmallStepImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericSmallStep() + * @generated + */ + EClass GENERIC_SMALL_STEP = eINSTANCE.getGenericSmallStep(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericReferenceValueImpl Generic Reference Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericReferenceValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericReferenceValue() + * @generated + */ + EClass GENERIC_REFERENCE_VALUE = eINSTANCE.getGenericReferenceValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericDimensionImpl Generic Dimension}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericDimensionImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericDimension() + * @generated + */ + EClass GENERIC_DIMENSION = eINSTANCE.getGenericDimension(); + + /** + * The meta object literal for the 'Dynamic Property' reference feature. + * + * + * @generated + */ + EReference GENERIC_DIMENSION__DYNAMIC_PROPERTY = eINSTANCE.getGenericDimension_DynamicProperty(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTracedObjectImpl Generic Traced Object}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTracedObjectImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericTracedObject() + * @generated + */ + EClass GENERIC_TRACED_OBJECT = eINSTANCE.getGenericTracedObject(); + + /** + * The meta object literal for the 'Original Object' reference feature. + * + * + * @generated + */ + EReference GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT = eINSTANCE.getGenericTracedObject_OriginalObject(); + + /** + * The meta object literal for the 'All Dimensions' containment reference list feature. + * + * + * @generated + */ + EReference GENERIC_TRACED_OBJECT__ALL_DIMENSIONS = eINSTANCE.getGenericTracedObject_AllDimensions(); + + /** + * The meta object literal for the 'Get Dimensions Internal' operation. + * + * + * @generated + */ + EOperation GENERIC_TRACED_OBJECT___GET_DIMENSIONS_INTERNAL = eINSTANCE.getGenericTracedObject__GetDimensionsInternal(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericStateImpl Generic State}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericStateImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericState() + * @generated + */ + EClass GENERIC_STATE = eINSTANCE.getGenericState(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTraceImpl Generic Trace}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTraceImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericTrace() + * @generated + */ + EClass GENERIC_TRACE = eINSTANCE.getGenericTrace(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericAttributeValueImpl Generic Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericAttributeValue() + * @generated + */ + EClass GENERIC_ATTRIBUTE_VALUE = eINSTANCE.getGenericAttributeValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.BooleanAttributeValueImpl Boolean Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.BooleanAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getBooleanAttributeValue() + * @generated + */ + EClass BOOLEAN_ATTRIBUTE_VALUE = eINSTANCE.getBooleanAttributeValue(); + + /** + * The meta object literal for the 'Attribute Value' attribute feature. + * + * + * @generated + */ + EAttribute BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = eINSTANCE.getBooleanAttributeValue_AttributeValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerAttributeValueImpl Integer Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getIntegerAttributeValue() + * @generated + */ + EClass INTEGER_ATTRIBUTE_VALUE = eINSTANCE.getIntegerAttributeValue(); + + /** + * The meta object literal for the 'Attribute Value' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = eINSTANCE.getIntegerAttributeValue_AttributeValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.StringAttributeValueImpl String Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.StringAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getStringAttributeValue() + * @generated + */ + EClass STRING_ATTRIBUTE_VALUE = eINSTANCE.getStringAttributeValue(); + + /** + * The meta object literal for the 'Attribute Value' attribute feature. + * + * + * @generated + */ + EAttribute STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = eINSTANCE.getStringAttributeValue_AttributeValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyBooleanAttributeValueImpl Many Boolean Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyBooleanAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getManyBooleanAttributeValue() + * @generated + */ + EClass MANY_BOOLEAN_ATTRIBUTE_VALUE = eINSTANCE.getManyBooleanAttributeValue(); + + /** + * The meta object literal for the 'Attribute Value' attribute list feature. + * + * + * @generated + */ + EAttribute MANY_BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = eINSTANCE.getManyBooleanAttributeValue_AttributeValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyIntegerAttributeValueImpl Many Integer Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyIntegerAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getManyIntegerAttributeValue() + * @generated + */ + EClass MANY_INTEGER_ATTRIBUTE_VALUE = eINSTANCE.getManyIntegerAttributeValue(); + + /** + * The meta object literal for the 'Attribute Value' attribute list feature. + * + * + * @generated + */ + EAttribute MANY_INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = eINSTANCE.getManyIntegerAttributeValue_AttributeValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyStringAttributeValueImpl Many String Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyStringAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getManyStringAttributeValue() + * @generated + */ + EClass MANY_STRING_ATTRIBUTE_VALUE = eINSTANCE.getManyStringAttributeValue(); + + /** + * The meta object literal for the 'Attribute Value' attribute list feature. + * + * + * @generated + */ + EAttribute MANY_STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = eINSTANCE.getManyStringAttributeValue_AttributeValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericStepImpl Generic Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericStepImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericStep() + * @generated + */ + EClass GENERIC_STEP = eINSTANCE.getGenericStep(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericValueImpl Generic Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getGenericValue() + * @generated + */ + EClass GENERIC_VALUE = eINSTANCE.getGenericValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.SingleReferenceValueImpl Single Reference Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.SingleReferenceValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getSingleReferenceValue() + * @generated + */ + EClass SINGLE_REFERENCE_VALUE = eINSTANCE.getSingleReferenceValue(); + + /** + * The meta object literal for the 'Reference Value' reference feature. + * + * + * @generated + */ + EReference SINGLE_REFERENCE_VALUE__REFERENCE_VALUE = eINSTANCE.getSingleReferenceValue_ReferenceValue(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyReferenceValueImpl Many Reference Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyReferenceValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getManyReferenceValue() + * @generated + */ + EClass MANY_REFERENCE_VALUE = eINSTANCE.getManyReferenceValue(); + + /** + * The meta object literal for the 'Reference Values' reference list feature. + * + * + * @generated + */ + EReference MANY_REFERENCE_VALUE__REFERENCE_VALUES = eINSTANCE.getManyReferenceValue_ReferenceValues(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerObjectAttributeValueImpl Integer Object Attribute Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerObjectAttributeValueImpl + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getIntegerObjectAttributeValue() + * @generated + */ + EClass INTEGER_OBJECT_ATTRIBUTE_VALUE = eINSTANCE.getIntegerObjectAttributeValue(); + + /** + * The meta object literal for the 'Attribute Value' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_OBJECT_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE = eINSTANCE.getIntegerObjectAttributeValue_AttributeValue(); + + /** + * The meta object literal for the 'ISerializable' data type. + * + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenerictracePackageImpl#getISerializable() + * @generated + */ + EDataType ISERIALIZABLE = eINSTANCE.getISerializable(); + + } + +} //GenerictracePackage diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/IntegerAttributeValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/IntegerAttributeValue.java new file mode 100644 index 000000000..8c9ea79c3 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/IntegerAttributeValue.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + + +/** + * + * A representation of the model object 'Integer Attribute Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue#getAttributeValue Attribute Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getIntegerAttributeValue() + * @model + * @generated + */ +public interface IntegerAttributeValue extends GenericAttributeValue { + /** + * Returns the value of the 'Attribute Value' attribute. + * + *

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

+ * + * @return the value of the 'Attribute Value' attribute. + * @see #setAttributeValue(int) + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getIntegerAttributeValue_AttributeValue() + * @model + * @generated + */ + int getAttributeValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue#getAttributeValue Attribute Value}' attribute. + * + * + * @param value the new value of the 'Attribute Value' attribute. + * @see #getAttributeValue() + * @generated + */ + void setAttributeValue(int value); + +} // IntegerAttributeValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/IntegerObjectAttributeValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/IntegerObjectAttributeValue.java new file mode 100644 index 000000000..7ebb7d95b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/IntegerObjectAttributeValue.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + + +/** + * + * A representation of the model object 'Integer Object Attribute Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue#getAttributeValue Attribute Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getIntegerObjectAttributeValue() + * @model + * @generated + */ +public interface IntegerObjectAttributeValue extends GenericAttributeValue { + /** + * Returns the value of the 'Attribute Value' attribute. + * + *

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

+ * + * @return the value of the 'Attribute Value' attribute. + * @see #setAttributeValue(Integer) + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getIntegerObjectAttributeValue_AttributeValue() + * @model + * @generated + */ + Integer getAttributeValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue#getAttributeValue Attribute Value}' attribute. + * + * + * @param value the new value of the 'Attribute Value' attribute. + * @see #getAttributeValue() + * @generated + */ + void setAttributeValue(Integer value); + +} // IntegerObjectAttributeValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyBooleanAttributeValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyBooleanAttributeValue.java new file mode 100644 index 000000000..00bc4b400 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyBooleanAttributeValue.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Many Boolean Attribute Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyBooleanAttributeValue#getAttributeValue Attribute Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getManyBooleanAttributeValue() + * @model + * @generated + */ +public interface ManyBooleanAttributeValue extends GenericAttributeValue { + /** + * Returns the value of the 'Attribute Value' attribute list. + * The list contents are of type {@link java.lang.Boolean}. + * + *

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

+ * + * @return the value of the 'Attribute Value' attribute list. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getManyBooleanAttributeValue_AttributeValue() + * @model default="false" + * @generated + */ + EList getAttributeValue(); + +} // ManyBooleanAttributeValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyIntegerAttributeValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyIntegerAttributeValue.java new file mode 100644 index 000000000..e7cef0a85 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyIntegerAttributeValue.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Many Integer Attribute Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyIntegerAttributeValue#getAttributeValue Attribute Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getManyIntegerAttributeValue() + * @model + * @generated + */ +public interface ManyIntegerAttributeValue extends GenericAttributeValue { + /** + * Returns the value of the 'Attribute Value' attribute list. + * The list contents are of type {@link java.lang.Integer}. + * + *

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

+ * + * @return the value of the 'Attribute Value' attribute list. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getManyIntegerAttributeValue_AttributeValue() + * @model + * @generated + */ + EList getAttributeValue(); + +} // ManyIntegerAttributeValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyReferenceValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyReferenceValue.java new file mode 100644 index 000000000..a3de2432d --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyReferenceValue.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Many Reference Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue#getReferenceValues Reference Values}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getManyReferenceValue() + * @model + * @generated + */ +public interface ManyReferenceValue extends GenericReferenceValue { + /** + * Returns the value of the 'Reference Values' reference list. + * The list contents are of type {@link org.eclipse.emf.ecore.EObject}. + * + *

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

+ * + * @return the value of the 'Reference Values' reference list. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getManyReferenceValue_ReferenceValues() + * @model + * @generated + */ + EList getReferenceValues(); + +} // ManyReferenceValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyStringAttributeValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyStringAttributeValue.java new file mode 100644 index 000000000..34f089e3e --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/ManyStringAttributeValue.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Many String Attribute Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyStringAttributeValue#getAttributeValue Attribute Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getManyStringAttributeValue() + * @model + * @generated + */ +public interface ManyStringAttributeValue extends GenericAttributeValue { + /** + * Returns the value of the 'Attribute Value' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

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

+ * + * @return the value of the 'Attribute Value' attribute list. + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getManyStringAttributeValue_AttributeValue() + * @model + * @generated + */ + EList getAttributeValue(); + +} // ManyStringAttributeValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/SingleReferenceValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/SingleReferenceValue.java new file mode 100644 index 000000000..77fdba943 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/SingleReferenceValue.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Single Reference Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue#getReferenceValue Reference Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getSingleReferenceValue() + * @model + * @generated + */ +public interface SingleReferenceValue extends GenericReferenceValue { + /** + * Returns the value of the 'Reference Value' reference. + * + *

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

+ * + * @return the value of the 'Reference Value' reference. + * @see #setReferenceValue(EObject) + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getSingleReferenceValue_ReferenceValue() + * @model + * @generated + */ + EObject getReferenceValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue#getReferenceValue Reference Value}' reference. + * + * + * @param value the new value of the 'Reference Value' reference. + * @see #getReferenceValue() + * @generated + */ + void setReferenceValue(EObject value); + +} // SingleReferenceValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/StringAttributeValue.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/StringAttributeValue.java new file mode 100644 index 000000000..1c4f5e1c4 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/StringAttributeValue.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace; + + +/** + * + * A representation of the model object 'String Attribute Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue#getAttributeValue Attribute Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getStringAttributeValue() + * @model + * @generated + */ +public interface StringAttributeValue extends GenericAttributeValue { + /** + * Returns the value of the 'Attribute Value' attribute. + * + *

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

+ * + * @return the value of the 'Attribute Value' attribute. + * @see #setAttributeValue(String) + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage#getStringAttributeValue_AttributeValue() + * @model + * @generated + */ + String getAttributeValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue#getAttributeValue Attribute Value}' attribute. + * + * + * @param value the new value of the 'Attribute Value' attribute. + * @see #getAttributeValue() + * @generated + */ + void setAttributeValue(String value); + +} // StringAttributeValue diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/BooleanAttributeValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/BooleanAttributeValueImpl.java new file mode 100644 index 000000000..6b1714892 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/BooleanAttributeValueImpl.java @@ -0,0 +1,172 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Boolean Attribute Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.BooleanAttributeValueImpl#isAttributeValue Attribute Value}
  • + *
+ * + * @generated + */ +public class BooleanAttributeValueImpl extends GenericAttributeValueImpl implements BooleanAttributeValue { + /** + * The default value of the '{@link #isAttributeValue() Attribute Value}' attribute. + * + * + * @see #isAttributeValue() + * @generated + * @ordered + */ + protected static final boolean ATTRIBUTE_VALUE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isAttributeValue() Attribute Value}' attribute. + * + * + * @see #isAttributeValue() + * @generated + * @ordered + */ + protected boolean attributeValue = ATTRIBUTE_VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected BooleanAttributeValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.BOOLEAN_ATTRIBUTE_VALUE; + } + + /** + * + * + * @generated + */ + public boolean isAttributeValue() { + return attributeValue; + } + + /** + * + * + * @generated + */ + public void setAttributeValue(boolean newAttributeValue) { + boolean oldAttributeValue = attributeValue; + attributeValue = newAttributeValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GenerictracePackage.BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE, oldAttributeValue, attributeValue)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return isAttributeValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + setAttributeValue((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + setAttributeValue(ATTRIBUTE_VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return attributeValue != ATTRIBUTE_VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (attributeValue: "); + result.append(attributeValue); + result.append(')'); + return result.toString(); + } + +} //BooleanAttributeValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericAttributeValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericAttributeValueImpl.java new file mode 100644 index 000000000..47b85af20 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericAttributeValueImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Generic Attribute Value'. + * + * + * @generated + */ +public abstract class GenericAttributeValueImpl extends GenericValueImpl implements GenericAttributeValue { + /** + * + * + * @generated + */ + protected GenericAttributeValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_ATTRIBUTE_VALUE; + } + +} //GenericAttributeValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericDimensionImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericDimensionImpl.java new file mode 100644 index 000000000..881c0de29 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericDimensionImpl.java @@ -0,0 +1,187 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.DimensionImpl; + +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.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; + +/** + * + * An implementation of the model object 'Generic Dimension'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericDimensionImpl#getDynamicProperty Dynamic Property}
  • + *
+ * + * @generated + */ +public class GenericDimensionImpl extends DimensionImpl implements GenericDimension { + /** + * The cached value of the '{@link #getDynamicProperty() Dynamic Property}' reference. + * + * + * @see #getDynamicProperty() + * @generated + * @ordered + */ + protected EStructuralFeature dynamicProperty; + + /** + * + * + * @generated + */ + protected GenericDimensionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_DIMENSION; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getValues() { + if (values == null) { + values = new EObjectContainmentEList(GenericValue.class, this, GenerictracePackage.GENERIC_DIMENSION__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + public EStructuralFeature getDynamicProperty() { + if (dynamicProperty != null && dynamicProperty.eIsProxy()) { + InternalEObject oldDynamicProperty = (InternalEObject)dynamicProperty; + dynamicProperty = (EStructuralFeature)eResolveProxy(oldDynamicProperty); + if (dynamicProperty != oldDynamicProperty) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenerictracePackage.GENERIC_DIMENSION__DYNAMIC_PROPERTY, oldDynamicProperty, dynamicProperty)); + } + } + return dynamicProperty; + } + + /** + * + * + * @generated + */ + public EStructuralFeature basicGetDynamicProperty() { + return dynamicProperty; + } + + /** + * + * + * @generated + */ + public void setDynamicProperty(EStructuralFeature newDynamicProperty) { + EStructuralFeature oldDynamicProperty = dynamicProperty; + dynamicProperty = newDynamicProperty; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GenerictracePackage.GENERIC_DIMENSION__DYNAMIC_PROPERTY, oldDynamicProperty, dynamicProperty)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.GENERIC_DIMENSION__DYNAMIC_PROPERTY: + if (resolve) return getDynamicProperty(); + return basicGetDynamicProperty(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.GENERIC_DIMENSION__DYNAMIC_PROPERTY: + setDynamicProperty((EStructuralFeature)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.GENERIC_DIMENSION__DYNAMIC_PROPERTY: + setDynamicProperty((EStructuralFeature)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.GENERIC_DIMENSION__DYNAMIC_PROPERTY: + return dynamicProperty != null; + } + return super.eIsSet(featureID); + } + +} //GenericDimensionImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericParallelStepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericParallelStepImpl.java new file mode 100644 index 000000000..027833abc --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericParallelStepImpl.java @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericParallelStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.ParallelStep; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Generic Parallel Step'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericParallelStepImpl#getSubSteps Sub Steps}
  • + *
+ * + * @generated + */ +public class GenericParallelStepImpl extends GenericStepImpl implements GenericParallelStep { + /** + * The cached value of the '{@link #getSubSteps() Sub Steps}' containment reference list. + * + * + * @see #getSubSteps() + * @generated + * @ordered + */ + protected EList subSteps; + + /** + * + * + * @generated + */ + protected GenericParallelStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_PARALLEL_STEP; + } + + /** + * + * + * @generated + */ + public EList getSubSteps() { + if (subSteps == null) { + subSteps = new EObjectContainmentEList(GenericStep.class, this, GenerictracePackage.GENERIC_PARALLEL_STEP__SUB_STEPS); + } + return subSteps; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case GenerictracePackage.GENERIC_PARALLEL_STEP__SUB_STEPS: + return ((InternalEList)getSubSteps()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.GENERIC_PARALLEL_STEP__SUB_STEPS: + return getSubSteps(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.GENERIC_PARALLEL_STEP__SUB_STEPS: + getSubSteps().clear(); + getSubSteps().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.GENERIC_PARALLEL_STEP__SUB_STEPS: + getSubSteps().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.GENERIC_PARALLEL_STEP__SUB_STEPS: + return subSteps != null && !subSteps.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == BigStep.class) { + switch (derivedFeatureID) { + case GenerictracePackage.GENERIC_PARALLEL_STEP__SUB_STEPS: return TracePackage.BIG_STEP__SUB_STEPS; + default: return -1; + } + } + if (baseClass == ParallelStep.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == BigStep.class) { + switch (baseFeatureID) { + case TracePackage.BIG_STEP__SUB_STEPS: return GenerictracePackage.GENERIC_PARALLEL_STEP__SUB_STEPS; + default: return -1; + } + } + if (baseClass == ParallelStep.class) { + switch (baseFeatureID) { + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //GenericParallelStepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericReferenceValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericReferenceValueImpl.java new file mode 100644 index 000000000..4366dc69b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericReferenceValueImpl.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericReferenceValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Generic Reference Value'. + * + * + * @generated + */ +public abstract class GenericReferenceValueImpl extends GenericValueImpl implements GenericReferenceValue { + /** + * + * + * @generated + */ + protected GenericReferenceValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_REFERENCE_VALUE; + } + +} //GenericReferenceValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericSequentialStepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericSequentialStepImpl.java new file mode 100644 index 000000000..c8358b087 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericSequentialStepImpl.java @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericSequentialStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Generic Sequential Step'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericSequentialStepImpl#getSubSteps Sub Steps}
  • + *
+ * + * @generated + */ +public class GenericSequentialStepImpl extends GenericStepImpl implements GenericSequentialStep { + /** + * The cached value of the '{@link #getSubSteps() Sub Steps}' containment reference list. + * + * + * @see #getSubSteps() + * @generated + * @ordered + */ + protected EList subSteps; + + /** + * + * + * @generated + */ + protected GenericSequentialStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_SEQUENTIAL_STEP; + } + + /** + * + * + * @generated + */ + public EList getSubSteps() { + if (subSteps == null) { + subSteps = new EObjectContainmentEList(GenericStep.class, this, GenerictracePackage.GENERIC_SEQUENTIAL_STEP__SUB_STEPS); + } + return subSteps; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case GenerictracePackage.GENERIC_SEQUENTIAL_STEP__SUB_STEPS: + return ((InternalEList)getSubSteps()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.GENERIC_SEQUENTIAL_STEP__SUB_STEPS: + return getSubSteps(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.GENERIC_SEQUENTIAL_STEP__SUB_STEPS: + getSubSteps().clear(); + getSubSteps().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.GENERIC_SEQUENTIAL_STEP__SUB_STEPS: + getSubSteps().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.GENERIC_SEQUENTIAL_STEP__SUB_STEPS: + return subSteps != null && !subSteps.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == BigStep.class) { + switch (derivedFeatureID) { + case GenerictracePackage.GENERIC_SEQUENTIAL_STEP__SUB_STEPS: return TracePackage.BIG_STEP__SUB_STEPS; + default: return -1; + } + } + if (baseClass == SequentialStep.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == BigStep.class) { + switch (baseFeatureID) { + case TracePackage.BIG_STEP__SUB_STEPS: return GenerictracePackage.GENERIC_SEQUENTIAL_STEP__SUB_STEPS; + default: return -1; + } + } + if (baseClass == SequentialStep.class) { + switch (baseFeatureID) { + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //GenericSequentialStepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericSmallStepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericSmallStepImpl.java new file mode 100644 index 000000000..17d24c067 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericSmallStepImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericSmallStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Generic Small Step'. + * + * + * @generated + */ +public class GenericSmallStepImpl extends GenericStepImpl implements GenericSmallStep { + /** + * + * + * @generated + */ + protected GenericSmallStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_SMALL_STEP; + } + +} //GenericSmallStepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericStateImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericStateImpl.java new file mode 100644 index 000000000..4cc3e99a1 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericStateImpl.java @@ -0,0 +1,99 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericState; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; + +/** + * + * An implementation of the model object 'Generic State'. + * + * + * @generated + */ +public class GenericStateImpl extends StateImpl implements GenericState { + /** + * + * + * @generated + */ + protected GenericStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_STATE; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getStartedSteps() { + if (startedSteps == null) { + startedSteps = new EObjectWithInverseResolvingEList(GenericStep.class, this, GenerictracePackage.GENERIC_STATE__STARTED_STEPS, TracePackage.STEP__STARTING_STATE) { private static final long serialVersionUID = 1L; @Override public Class getInverseFeatureClass() { return Step.class; } }; + } + return startedSteps; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getEndedSteps() { + if (endedSteps == null) { + endedSteps = new EObjectWithInverseResolvingEList(GenericStep.class, this, GenerictracePackage.GENERIC_STATE__ENDED_STEPS, TracePackage.STEP__ENDING_STATE) { private static final long serialVersionUID = 1L; @Override public Class getInverseFeatureClass() { return Step.class; } }; + } + return endedSteps; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getValues() { + if (values == null) { + values = new EObjectWithInverseResolvingEList.ManyInverse(GenericValue.class, this, GenerictracePackage.GENERIC_STATE__VALUES, TracePackage.VALUE__STATES) { private static final long serialVersionUID = 1L; @Override public Class getInverseFeatureClass() { return Value.class; } }; + } + return values; + } + +} //GenericStateImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericStepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericStepImpl.java new file mode 100644 index 000000000..0e4b1f10a --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericStepImpl.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericState; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Generic Step'. + * + * + * @generated + */ +public abstract class GenericStepImpl extends StepImpl implements GenericStep { + /** + * + * + * @generated + */ + protected GenericStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_STEP; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public NotificationChain basicSetStartingState(GenericState newStartingState, NotificationChain msgs) { + return super.basicSetStartingState(newStartingState, msgs); + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public NotificationChain basicSetEndingState(GenericState newEndingState, NotificationChain msgs) { + return super.basicSetEndingState(newEndingState, msgs); + } + +} //GenericStepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericTraceImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericTraceImpl.java new file mode 100644 index 000000000..282c69878 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericTraceImpl.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericState; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTrace; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl; + +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.util.EObjectContainmentEList; + +/** + * + * An implementation of the model object 'Generic Trace'. + * + * + * @generated + */ +public class GenericTraceImpl extends TraceImpl implements GenericTrace { + /** + * + * + * @generated + */ + protected GenericTraceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_TRACE; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public NotificationChain basicSetRootStep(StepSubType newRootStep, NotificationChain msgs) { + return super.basicSetRootStep(newRootStep, msgs); + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getTracedObjects() { + if (tracedObjects == null) { + tracedObjects = new EObjectContainmentEList(GenericTracedObject.class, this, GenerictracePackage.GENERIC_TRACE__TRACED_OBJECTS); + } + return tracedObjects; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getStates() { + if (states == null) { + states = new EObjectContainmentEList(GenericState.class, this, GenerictracePackage.GENERIC_TRACE__STATES); + } + return states; + } + +} //GenericTraceImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericTracedObjectImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericTracedObjectImpl.java new file mode 100644 index 000000000..7ce35b635 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericTracedObjectImpl.java @@ -0,0 +1,266 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.impl.TracedObjectImpl; +import java.lang.reflect.InvocationTargetException; +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.EObject; +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; + +/** + * + * An implementation of the model object 'Generic Traced Object'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTracedObjectImpl#getOriginalObject Original Object}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.GenericTracedObjectImpl#getAllDimensions All Dimensions}
  • + *
+ * + * @generated + */ +public class GenericTracedObjectImpl extends TracedObjectImpl implements GenericTracedObject { + /** + * The cached value of the '{@link #getOriginalObject() Original Object}' reference. + * + * + * @see #getOriginalObject() + * @generated + * @ordered + */ + protected EObject originalObject; + + /** + * The cached value of the '{@link #getAllDimensions() All Dimensions}' containment reference list. + * + * + * @see #getAllDimensions() + * @generated + * @ordered + */ + protected EList allDimensions; + + /** + * + * + * @generated + */ + protected GenericTracedObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_TRACED_OBJECT; + } + + /** + * + * + * @generated + */ + public EObject getOriginalObject() { + if (originalObject != null && originalObject.eIsProxy()) { + InternalEObject oldOriginalObject = (InternalEObject)originalObject; + originalObject = eResolveProxy(oldOriginalObject); + if (originalObject != oldOriginalObject) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenerictracePackage.GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT, oldOriginalObject, originalObject)); + } + } + return originalObject; + } + + /** + * + * + * @generated + */ + public EObject basicGetOriginalObject() { + return originalObject; + } + + /** + * + * + * @generated + */ + public void setOriginalObject(EObject newOriginalObject) { + EObject oldOriginalObject = originalObject; + originalObject = newOriginalObject; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GenerictracePackage.GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT, oldOriginalObject, originalObject)); + } + + /** + * + * + * @generated + */ + public EList getAllDimensions() { + if (allDimensions == null) { + allDimensions = new EObjectContainmentEList(GenericDimension.class, this, GenerictracePackage.GENERIC_TRACED_OBJECT__ALL_DIMENSIONS); + } + return allDimensions; + } + + /** + * + * + * @generated + */ + public EList getDimensionsInternal() { + final EList result = new org.eclipse.emf.ecore.util.BasicInternalEList(Object.class); + result.addAll(super.getDimensionsInternal()); + result.addAll(getAllDimensions()); + return result; + + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case GenerictracePackage.GENERIC_TRACED_OBJECT__ALL_DIMENSIONS: + return ((InternalEList)getAllDimensions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT: + if (resolve) return getOriginalObject(); + return basicGetOriginalObject(); + case GenerictracePackage.GENERIC_TRACED_OBJECT__ALL_DIMENSIONS: + return getAllDimensions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT: + setOriginalObject((EObject)newValue); + return; + case GenerictracePackage.GENERIC_TRACED_OBJECT__ALL_DIMENSIONS: + getAllDimensions().clear(); + getAllDimensions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT: + setOriginalObject((EObject)null); + return; + case GenerictracePackage.GENERIC_TRACED_OBJECT__ALL_DIMENSIONS: + getAllDimensions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT: + return originalObject != null; + case GenerictracePackage.GENERIC_TRACED_OBJECT__ALL_DIMENSIONS: + return allDimensions != null && !allDimensions.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == TracedObject.class) { + switch (baseOperationID) { + case TracePackage.TRACED_OBJECT___GET_DIMENSIONS_INTERNAL: return GenerictracePackage.GENERIC_TRACED_OBJECT___GET_DIMENSIONS_INTERNAL; + default: return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case GenerictracePackage.GENERIC_TRACED_OBJECT___GET_DIMENSIONS_INTERNAL: + return getDimensionsInternal(); + } + return super.eInvoke(operationID, arguments); + } + +} //GenericTracedObjectImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericValueImpl.java new file mode 100644 index 000000000..d80132aa1 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenericValueImpl.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericState; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.ValueImpl; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; + +/** + * + * An implementation of the model object 'Generic Value'. + * + * + * @generated + */ +public abstract class GenericValueImpl extends ValueImpl implements GenericValue { + /** + * + * + * @generated + */ + protected GenericValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.GENERIC_VALUE; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getStates() { + if (states == null) { + states = new EObjectWithInverseResolvingEList.ManyInverse(GenericState.class, this, GenerictracePackage.GENERIC_VALUE__STATES, TracePackage.STATE__VALUES) { private static final long serialVersionUID = 1L; @Override public Class getInverseFeatureClass() { return State.class; } }; + } + return states; + } + +} //GenericValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenerictraceFactoryImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenerictraceFactoryImpl.java new file mode 100644 index 000000000..583cd82af --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenerictraceFactoryImpl.java @@ -0,0 +1,319 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class GenerictraceFactoryImpl extends EFactoryImpl implements GenerictraceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static GenerictraceFactory init() { + try { + GenerictraceFactory theGenerictraceFactory = (GenerictraceFactory)EPackage.Registry.INSTANCE.getEFactory(GenerictracePackage.eNS_URI); + if (theGenerictraceFactory != null) { + return theGenerictraceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new GenerictraceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public GenerictraceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case GenerictracePackage.GENERIC_SEQUENTIAL_STEP: return createGenericSequentialStep(); + case GenerictracePackage.GENERIC_PARALLEL_STEP: return createGenericParallelStep(); + case GenerictracePackage.GENERIC_SMALL_STEP: return createGenericSmallStep(); + case GenerictracePackage.GENERIC_DIMENSION: return createGenericDimension(); + case GenerictracePackage.GENERIC_TRACED_OBJECT: return createGenericTracedObject(); + case GenerictracePackage.GENERIC_STATE: return createGenericState(); + case GenerictracePackage.GENERIC_TRACE: return createGenericTrace(); + case GenerictracePackage.BOOLEAN_ATTRIBUTE_VALUE: return createBooleanAttributeValue(); + case GenerictracePackage.INTEGER_ATTRIBUTE_VALUE: return createIntegerAttributeValue(); + case GenerictracePackage.STRING_ATTRIBUTE_VALUE: return createStringAttributeValue(); + case GenerictracePackage.MANY_BOOLEAN_ATTRIBUTE_VALUE: return createManyBooleanAttributeValue(); + case GenerictracePackage.MANY_INTEGER_ATTRIBUTE_VALUE: return createManyIntegerAttributeValue(); + case GenerictracePackage.MANY_STRING_ATTRIBUTE_VALUE: return createManyStringAttributeValue(); + case GenerictracePackage.SINGLE_REFERENCE_VALUE: return createSingleReferenceValue(); + case GenerictracePackage.MANY_REFERENCE_VALUE: return createManyReferenceValue(); + case GenerictracePackage.INTEGER_OBJECT_ATTRIBUTE_VALUE: return createIntegerObjectAttributeValue(); + 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 GenerictracePackage.ISERIALIZABLE: + return createISerializableFromString(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 GenerictracePackage.ISERIALIZABLE: + return convertISerializableToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public GenericSequentialStep createGenericSequentialStep() { + GenericSequentialStepImpl genericSequentialStep = new GenericSequentialStepImpl(); + return genericSequentialStep; + } + + /** + * + * + * @generated + */ + public GenericParallelStep createGenericParallelStep() { + GenericParallelStepImpl genericParallelStep = new GenericParallelStepImpl(); + return genericParallelStep; + } + + /** + * + * + * @generated + */ + public GenericSmallStep createGenericSmallStep() { + GenericSmallStepImpl genericSmallStep = new GenericSmallStepImpl(); + return genericSmallStep; + } + + /** + * + * + * @generated + */ + public GenericDimension createGenericDimension() { + GenericDimensionImpl genericDimension = new GenericDimensionImpl(); + return genericDimension; + } + + /** + * + * + * @generated + */ + public GenericTracedObject createGenericTracedObject() { + GenericTracedObjectImpl genericTracedObject = new GenericTracedObjectImpl(); + return genericTracedObject; + } + + /** + * + * + * @generated + */ + public GenericState createGenericState() { + GenericStateImpl genericState = new GenericStateImpl(); + return genericState; + } + + /** + * + * + * @generated + */ + public GenericTrace createGenericTrace() { + GenericTraceImpl genericTrace = new GenericTraceImpl(); + return genericTrace; + } + + /** + * + * + * @generated + */ + public BooleanAttributeValue createBooleanAttributeValue() { + BooleanAttributeValueImpl booleanAttributeValue = new BooleanAttributeValueImpl(); + return booleanAttributeValue; + } + + /** + * + * + * @generated + */ + public IntegerAttributeValue createIntegerAttributeValue() { + IntegerAttributeValueImpl integerAttributeValue = new IntegerAttributeValueImpl(); + return integerAttributeValue; + } + + /** + * + * + * @generated + */ + public StringAttributeValue createStringAttributeValue() { + StringAttributeValueImpl stringAttributeValue = new StringAttributeValueImpl(); + return stringAttributeValue; + } + + /** + * + * + * @generated + */ + public ManyBooleanAttributeValue createManyBooleanAttributeValue() { + ManyBooleanAttributeValueImpl manyBooleanAttributeValue = new ManyBooleanAttributeValueImpl(); + return manyBooleanAttributeValue; + } + + /** + * + * + * @generated + */ + public ManyIntegerAttributeValue createManyIntegerAttributeValue() { + ManyIntegerAttributeValueImpl manyIntegerAttributeValue = new ManyIntegerAttributeValueImpl(); + return manyIntegerAttributeValue; + } + + /** + * + * + * @generated + */ + public ManyStringAttributeValue createManyStringAttributeValue() { + ManyStringAttributeValueImpl manyStringAttributeValue = new ManyStringAttributeValueImpl(); + return manyStringAttributeValue; + } + + /** + * + * + * @generated + */ + public SingleReferenceValue createSingleReferenceValue() { + SingleReferenceValueImpl singleReferenceValue = new SingleReferenceValueImpl(); + return singleReferenceValue; + } + + /** + * + * + * @generated + */ + public ManyReferenceValue createManyReferenceValue() { + ManyReferenceValueImpl manyReferenceValue = new ManyReferenceValueImpl(); + return manyReferenceValue; + } + + /** + * + * + * @generated + */ + public IntegerObjectAttributeValue createIntegerObjectAttributeValue() { + IntegerObjectAttributeValueImpl integerObjectAttributeValue = new IntegerObjectAttributeValueImpl(); + return integerObjectAttributeValue; + } + + /** + * + * + * @generated + */ + public byte[] createISerializableFromString(EDataType eDataType, String initialValue) { + return (byte[])super.createFromString(initialValue); + } + + /** + * + * + * @generated + */ + public String convertISerializableToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(instanceValue); + } + + /** + * + * + * @generated + */ + public GenerictracePackage getGenerictracePackage() { + return (GenerictracePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static GenerictracePackage getPackage() { + return GenerictracePackage.eINSTANCE; + } + +} //GenerictraceFactoryImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenerictracePackageImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenerictracePackageImpl.java new file mode 100644 index 000000000..5e42136b1 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/GenerictracePackageImpl.java @@ -0,0 +1,822 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericParallelStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericReferenceValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericSequentialStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericSmallStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericState; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTrace; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictraceFactory; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyBooleanAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyIntegerAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyStringAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +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; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class GenerictracePackageImpl extends EPackageImpl implements GenerictracePackage { + /** + * + * + * @generated + */ + private EClass genericSequentialStepEClass = null; + + /** + * + * + * @generated + */ + private EClass genericParallelStepEClass = null; + + /** + * + * + * @generated + */ + private EClass genericSmallStepEClass = null; + + /** + * + * + * @generated + */ + private EClass genericReferenceValueEClass = null; + + /** + * + * + * @generated + */ + private EClass genericDimensionEClass = null; + + /** + * + * + * @generated + */ + private EClass genericTracedObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass genericStateEClass = null; + + /** + * + * + * @generated + */ + private EClass genericTraceEClass = null; + + /** + * + * + * @generated + */ + private EClass genericAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass booleanAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass integerAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass stringAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass manyBooleanAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass manyIntegerAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass manyStringAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass genericStepEClass = null; + + /** + * + * + * @generated + */ + private EClass genericValueEClass = null; + + /** + * + * + * @generated + */ + private EClass singleReferenceValueEClass = null; + + /** + * + * + * @generated + */ + private EClass manyReferenceValueEClass = null; + + /** + * + * + * @generated + */ + private EClass integerObjectAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EDataType iSerializableEDataType = 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.trace.commons.model.generictrace.GenerictracePackage#eNS_URI + * @see #init() + * @generated + */ + private GenerictracePackageImpl() { + super(eNS_URI, GenerictraceFactory.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 GenerictracePackage#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 GenerictracePackage init() { + if (isInited) return (GenerictracePackage)EPackage.Registry.INSTANCE.getEPackage(GenerictracePackage.eNS_URI); + + // Obtain or create and register package + GenerictracePackageImpl theGenerictracePackage = (GenerictracePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof GenerictracePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new GenerictracePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + TracePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theGenerictracePackage.createPackageContents(); + + // Initialize created meta-data + theGenerictracePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theGenerictracePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(GenerictracePackage.eNS_URI, theGenerictracePackage); + return theGenerictracePackage; + } + + /** + * + * + * @generated + */ + public EClass getGenericSequentialStep() { + return genericSequentialStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getGenericParallelStep() { + return genericParallelStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getGenericSmallStep() { + return genericSmallStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getGenericReferenceValue() { + return genericReferenceValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getGenericDimension() { + return genericDimensionEClass; + } + + /** + * + * + * @generated + */ + public EReference getGenericDimension_DynamicProperty() { + return (EReference)genericDimensionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGenericTracedObject() { + return genericTracedObjectEClass; + } + + /** + * + * + * @generated + */ + public EReference getGenericTracedObject_OriginalObject() { + return (EReference)genericTracedObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getGenericTracedObject_AllDimensions() { + return (EReference)genericTracedObjectEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getGenericTracedObject__GetDimensionsInternal() { + return genericTracedObjectEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGenericState() { + return genericStateEClass; + } + + /** + * + * + * @generated + */ + public EClass getGenericTrace() { + return genericTraceEClass; + } + + /** + * + * + * @generated + */ + public EClass getGenericAttributeValue() { + return genericAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getBooleanAttributeValue() { + return booleanAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getBooleanAttributeValue_AttributeValue() { + return (EAttribute)booleanAttributeValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getIntegerAttributeValue() { + return integerAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getIntegerAttributeValue_AttributeValue() { + return (EAttribute)integerAttributeValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getStringAttributeValue() { + return stringAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getStringAttributeValue_AttributeValue() { + return (EAttribute)stringAttributeValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getManyBooleanAttributeValue() { + return manyBooleanAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getManyBooleanAttributeValue_AttributeValue() { + return (EAttribute)manyBooleanAttributeValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getManyIntegerAttributeValue() { + return manyIntegerAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getManyIntegerAttributeValue_AttributeValue() { + return (EAttribute)manyIntegerAttributeValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getManyStringAttributeValue() { + return manyStringAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getManyStringAttributeValue_AttributeValue() { + return (EAttribute)manyStringAttributeValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGenericStep() { + return genericStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getGenericValue() { + return genericValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getSingleReferenceValue() { + return singleReferenceValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getSingleReferenceValue_ReferenceValue() { + return (EReference)singleReferenceValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getManyReferenceValue() { + return manyReferenceValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getManyReferenceValue_ReferenceValues() { + return (EReference)manyReferenceValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getIntegerObjectAttributeValue() { + return integerObjectAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getIntegerObjectAttributeValue_AttributeValue() { + return (EAttribute)integerObjectAttributeValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EDataType getISerializable() { + return iSerializableEDataType; + } + + /** + * + * + * @generated + */ + public GenerictraceFactory getGenerictraceFactory() { + return (GenerictraceFactory)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 + genericSequentialStepEClass = createEClass(GENERIC_SEQUENTIAL_STEP); + + genericParallelStepEClass = createEClass(GENERIC_PARALLEL_STEP); + + genericSmallStepEClass = createEClass(GENERIC_SMALL_STEP); + + genericReferenceValueEClass = createEClass(GENERIC_REFERENCE_VALUE); + + genericDimensionEClass = createEClass(GENERIC_DIMENSION); + createEReference(genericDimensionEClass, GENERIC_DIMENSION__DYNAMIC_PROPERTY); + + genericTracedObjectEClass = createEClass(GENERIC_TRACED_OBJECT); + createEReference(genericTracedObjectEClass, GENERIC_TRACED_OBJECT__ORIGINAL_OBJECT); + createEReference(genericTracedObjectEClass, GENERIC_TRACED_OBJECT__ALL_DIMENSIONS); + createEOperation(genericTracedObjectEClass, GENERIC_TRACED_OBJECT___GET_DIMENSIONS_INTERNAL); + + genericStateEClass = createEClass(GENERIC_STATE); + + genericTraceEClass = createEClass(GENERIC_TRACE); + + genericAttributeValueEClass = createEClass(GENERIC_ATTRIBUTE_VALUE); + + booleanAttributeValueEClass = createEClass(BOOLEAN_ATTRIBUTE_VALUE); + createEAttribute(booleanAttributeValueEClass, BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + + integerAttributeValueEClass = createEClass(INTEGER_ATTRIBUTE_VALUE); + createEAttribute(integerAttributeValueEClass, INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + + stringAttributeValueEClass = createEClass(STRING_ATTRIBUTE_VALUE); + createEAttribute(stringAttributeValueEClass, STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + + manyBooleanAttributeValueEClass = createEClass(MANY_BOOLEAN_ATTRIBUTE_VALUE); + createEAttribute(manyBooleanAttributeValueEClass, MANY_BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + + manyIntegerAttributeValueEClass = createEClass(MANY_INTEGER_ATTRIBUTE_VALUE); + createEAttribute(manyIntegerAttributeValueEClass, MANY_INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + + manyStringAttributeValueEClass = createEClass(MANY_STRING_ATTRIBUTE_VALUE); + createEAttribute(manyStringAttributeValueEClass, MANY_STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + + genericStepEClass = createEClass(GENERIC_STEP); + + genericValueEClass = createEClass(GENERIC_VALUE); + + singleReferenceValueEClass = createEClass(SINGLE_REFERENCE_VALUE); + createEReference(singleReferenceValueEClass, SINGLE_REFERENCE_VALUE__REFERENCE_VALUE); + + manyReferenceValueEClass = createEClass(MANY_REFERENCE_VALUE); + createEReference(manyReferenceValueEClass, MANY_REFERENCE_VALUE__REFERENCE_VALUES); + + integerObjectAttributeValueEClass = createEClass(INTEGER_OBJECT_ATTRIBUTE_VALUE); + createEAttribute(integerObjectAttributeValueEClass, INTEGER_OBJECT_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + + // Create data types + iSerializableEDataType = createEDataType(ISERIALIZABLE); + } + + /** + * + * + * @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 + TracePackage theTracePackage = (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + ETypeParameter genericTraceEClass_StepSubType = addETypeParameter(genericTraceEClass, "StepSubType"); + + // Set bounds for type parameters + EGenericType g1 = createEGenericType(this.getGenericStep()); + genericTraceEClass_StepSubType.getEBounds().add(g1); + + // Add supertypes to classes + g1 = createEGenericType(this.getGenericStep()); + genericSequentialStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getSequentialStep()); + EGenericType g2 = createEGenericType(this.getGenericStep()); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(this.getGenericState()); + g1.getETypeArguments().add(g2); + genericSequentialStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getGenericStep()); + genericParallelStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getParallelStep()); + g2 = createEGenericType(this.getGenericStep()); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(this.getGenericState()); + g1.getETypeArguments().add(g2); + genericParallelStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getGenericStep()); + genericSmallStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getSmallStep()); + g2 = createEGenericType(this.getGenericState()); + g1.getETypeArguments().add(g2); + genericSmallStepEClass.getEGenericSuperTypes().add(g1); + genericReferenceValueEClass.getESuperTypes().add(this.getGenericValue()); + g1 = createEGenericType(theTracePackage.getDimension()); + g2 = createEGenericType(this.getGenericValue()); + g1.getETypeArguments().add(g2); + genericDimensionEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getTracedObject()); + g2 = createEGenericType(this.getGenericDimension()); + g1.getETypeArguments().add(g2); + genericTracedObjectEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getState()); + g2 = createEGenericType(this.getGenericStep()); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(this.getGenericValue()); + g1.getETypeArguments().add(g2); + genericStateEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getTrace()); + g2 = createEGenericType(genericTraceEClass_StepSubType); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(this.getGenericTracedObject()); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(this.getGenericState()); + g1.getETypeArguments().add(g2); + genericTraceEClass.getEGenericSuperTypes().add(g1); + genericAttributeValueEClass.getESuperTypes().add(this.getGenericValue()); + booleanAttributeValueEClass.getESuperTypes().add(this.getGenericAttributeValue()); + integerAttributeValueEClass.getESuperTypes().add(this.getGenericAttributeValue()); + stringAttributeValueEClass.getESuperTypes().add(this.getGenericAttributeValue()); + manyBooleanAttributeValueEClass.getESuperTypes().add(this.getGenericAttributeValue()); + manyIntegerAttributeValueEClass.getESuperTypes().add(this.getGenericAttributeValue()); + manyStringAttributeValueEClass.getESuperTypes().add(this.getGenericAttributeValue()); + g1 = createEGenericType(theTracePackage.getStep()); + g2 = createEGenericType(this.getGenericState()); + g1.getETypeArguments().add(g2); + genericStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getValue()); + g2 = createEGenericType(this.getGenericState()); + g1.getETypeArguments().add(g2); + genericValueEClass.getEGenericSuperTypes().add(g1); + singleReferenceValueEClass.getESuperTypes().add(this.getGenericReferenceValue()); + manyReferenceValueEClass.getESuperTypes().add(this.getGenericReferenceValue()); + integerObjectAttributeValueEClass.getESuperTypes().add(this.getGenericAttributeValue()); + + // Initialize classes, features, and operations; add parameters + initEClass(genericSequentialStepEClass, GenericSequentialStep.class, "GenericSequentialStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(genericParallelStepEClass, GenericParallelStep.class, "GenericParallelStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(genericSmallStepEClass, GenericSmallStep.class, "GenericSmallStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(genericReferenceValueEClass, GenericReferenceValue.class, "GenericReferenceValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(genericDimensionEClass, GenericDimension.class, "GenericDimension", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGenericDimension_DynamicProperty(), theEcorePackage.getEStructuralFeature(), null, "dynamicProperty", null, 0, 1, GenericDimension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(genericTracedObjectEClass, GenericTracedObject.class, "GenericTracedObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGenericTracedObject_OriginalObject(), theEcorePackage.getEObject(), null, "originalObject", null, 0, 1, GenericTracedObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGenericTracedObject_AllDimensions(), this.getGenericDimension(), null, "allDimensions", null, 0, -1, GenericTracedObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getGenericTracedObject__GetDimensionsInternal(), this.getGenericDimension(), "getDimensionsInternal", 0, -1, IS_UNIQUE, IS_ORDERED); + + initEClass(genericStateEClass, GenericState.class, "GenericState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(genericTraceEClass, GenericTrace.class, "GenericTrace", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(genericAttributeValueEClass, GenericAttributeValue.class, "GenericAttributeValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(booleanAttributeValueEClass, BooleanAttributeValue.class, "BooleanAttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBooleanAttributeValue_AttributeValue(), ecorePackage.getEBoolean(), "attributeValue", "false", 0, 1, BooleanAttributeValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(integerAttributeValueEClass, IntegerAttributeValue.class, "IntegerAttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIntegerAttributeValue_AttributeValue(), ecorePackage.getEInt(), "attributeValue", null, 0, 1, IntegerAttributeValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringAttributeValueEClass, StringAttributeValue.class, "StringAttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStringAttributeValue_AttributeValue(), ecorePackage.getEString(), "attributeValue", null, 0, 1, StringAttributeValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(manyBooleanAttributeValueEClass, ManyBooleanAttributeValue.class, "ManyBooleanAttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getManyBooleanAttributeValue_AttributeValue(), ecorePackage.getEBoolean(), "attributeValue", "false", 0, -1, ManyBooleanAttributeValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(manyIntegerAttributeValueEClass, ManyIntegerAttributeValue.class, "ManyIntegerAttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getManyIntegerAttributeValue_AttributeValue(), ecorePackage.getEInt(), "attributeValue", null, 0, -1, ManyIntegerAttributeValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(manyStringAttributeValueEClass, ManyStringAttributeValue.class, "ManyStringAttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getManyStringAttributeValue_AttributeValue(), ecorePackage.getEString(), "attributeValue", null, 0, -1, ManyStringAttributeValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(genericStepEClass, GenericStep.class, "GenericStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(genericValueEClass, GenericValue.class, "GenericValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(singleReferenceValueEClass, SingleReferenceValue.class, "SingleReferenceValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSingleReferenceValue_ReferenceValue(), ecorePackage.getEObject(), null, "referenceValue", null, 0, 1, SingleReferenceValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(manyReferenceValueEClass, ManyReferenceValue.class, "ManyReferenceValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getManyReferenceValue_ReferenceValues(), ecorePackage.getEObject(), null, "referenceValues", null, 0, -1, ManyReferenceValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(integerObjectAttributeValueEClass, IntegerObjectAttributeValue.class, "IntegerObjectAttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIntegerObjectAttributeValue_AttributeValue(), ecorePackage.getEIntegerObject(), "attributeValue", null, 0, 1, IntegerObjectAttributeValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize data types + initEDataType(iSerializableEDataType, byte[].class, "ISerializable", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //GenerictracePackageImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/IntegerAttributeValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/IntegerAttributeValueImpl.java new file mode 100644 index 000000000..1d5c47885 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/IntegerAttributeValueImpl.java @@ -0,0 +1,172 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Integer Attribute Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerAttributeValueImpl#getAttributeValue Attribute Value}
  • + *
+ * + * @generated + */ +public class IntegerAttributeValueImpl extends GenericAttributeValueImpl implements IntegerAttributeValue { + /** + * The default value of the '{@link #getAttributeValue() Attribute Value}' attribute. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected static final int ATTRIBUTE_VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getAttributeValue() Attribute Value}' attribute. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected int attributeValue = ATTRIBUTE_VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected IntegerAttributeValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.INTEGER_ATTRIBUTE_VALUE; + } + + /** + * + * + * @generated + */ + public int getAttributeValue() { + return attributeValue; + } + + /** + * + * + * @generated + */ + public void setAttributeValue(int newAttributeValue) { + int oldAttributeValue = attributeValue; + attributeValue = newAttributeValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GenerictracePackage.INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE, oldAttributeValue, attributeValue)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return getAttributeValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + setAttributeValue((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + setAttributeValue(ATTRIBUTE_VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return attributeValue != ATTRIBUTE_VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (attributeValue: "); + result.append(attributeValue); + result.append(')'); + return result.toString(); + } + +} //IntegerAttributeValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/IntegerObjectAttributeValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/IntegerObjectAttributeValueImpl.java new file mode 100644 index 000000000..a95d69dbb --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/IntegerObjectAttributeValueImpl.java @@ -0,0 +1,172 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Integer Object Attribute Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.IntegerObjectAttributeValueImpl#getAttributeValue Attribute Value}
  • + *
+ * + * @generated + */ +public class IntegerObjectAttributeValueImpl extends GenericAttributeValueImpl implements IntegerObjectAttributeValue { + /** + * The default value of the '{@link #getAttributeValue() Attribute Value}' attribute. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected static final Integer ATTRIBUTE_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAttributeValue() Attribute Value}' attribute. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected Integer attributeValue = ATTRIBUTE_VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected IntegerObjectAttributeValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.INTEGER_OBJECT_ATTRIBUTE_VALUE; + } + + /** + * + * + * @generated + */ + public Integer getAttributeValue() { + return attributeValue; + } + + /** + * + * + * @generated + */ + public void setAttributeValue(Integer newAttributeValue) { + Integer oldAttributeValue = attributeValue; + attributeValue = newAttributeValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GenerictracePackage.INTEGER_OBJECT_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE, oldAttributeValue, attributeValue)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.INTEGER_OBJECT_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return getAttributeValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.INTEGER_OBJECT_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + setAttributeValue((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.INTEGER_OBJECT_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + setAttributeValue(ATTRIBUTE_VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.INTEGER_OBJECT_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return ATTRIBUTE_VALUE_EDEFAULT == null ? attributeValue != null : !ATTRIBUTE_VALUE_EDEFAULT.equals(attributeValue); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (attributeValue: "); + result.append(attributeValue); + result.append(')'); + return result.toString(); + } + +} //IntegerObjectAttributeValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyBooleanAttributeValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyBooleanAttributeValueImpl.java new file mode 100644 index 000000000..881217c94 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyBooleanAttributeValueImpl.java @@ -0,0 +1,157 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyBooleanAttributeValue; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; + +/** + * + * An implementation of the model object 'Many Boolean Attribute Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyBooleanAttributeValueImpl#getAttributeValue Attribute Value}
  • + *
+ * + * @generated + */ +public class ManyBooleanAttributeValueImpl extends GenericAttributeValueImpl implements ManyBooleanAttributeValue { + /** + * The cached value of the '{@link #getAttributeValue() Attribute Value}' attribute list. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected EList attributeValue; + + /** + * + * + * @generated + */ + protected ManyBooleanAttributeValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.MANY_BOOLEAN_ATTRIBUTE_VALUE; + } + + /** + * + * + * @generated + */ + public EList getAttributeValue() { + if (attributeValue == null) { + attributeValue = new EDataTypeUniqueEList(Boolean.class, this, GenerictracePackage.MANY_BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + } + return attributeValue; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.MANY_BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return getAttributeValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.MANY_BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + getAttributeValue().clear(); + getAttributeValue().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.MANY_BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + getAttributeValue().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.MANY_BOOLEAN_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return attributeValue != null && !attributeValue.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (attributeValue: "); + result.append(attributeValue); + result.append(')'); + return result.toString(); + } + +} //ManyBooleanAttributeValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyIntegerAttributeValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyIntegerAttributeValueImpl.java new file mode 100644 index 000000000..57c7ca64c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyIntegerAttributeValueImpl.java @@ -0,0 +1,157 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyIntegerAttributeValue; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; + +/** + * + * An implementation of the model object 'Many Integer Attribute Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyIntegerAttributeValueImpl#getAttributeValue Attribute Value}
  • + *
+ * + * @generated + */ +public class ManyIntegerAttributeValueImpl extends GenericAttributeValueImpl implements ManyIntegerAttributeValue { + /** + * The cached value of the '{@link #getAttributeValue() Attribute Value}' attribute list. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected EList attributeValue; + + /** + * + * + * @generated + */ + protected ManyIntegerAttributeValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.MANY_INTEGER_ATTRIBUTE_VALUE; + } + + /** + * + * + * @generated + */ + public EList getAttributeValue() { + if (attributeValue == null) { + attributeValue = new EDataTypeUniqueEList(Integer.class, this, GenerictracePackage.MANY_INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + } + return attributeValue; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.MANY_INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return getAttributeValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.MANY_INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + getAttributeValue().clear(); + getAttributeValue().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.MANY_INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + getAttributeValue().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.MANY_INTEGER_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return attributeValue != null && !attributeValue.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (attributeValue: "); + result.append(attributeValue); + result.append(')'); + return result.toString(); + } + +} //ManyIntegerAttributeValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyReferenceValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyReferenceValueImpl.java new file mode 100644 index 000000000..72b64e450 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyReferenceValueImpl.java @@ -0,0 +1,141 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +/** + * + * An implementation of the model object 'Many Reference Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyReferenceValueImpl#getReferenceValues Reference Values}
  • + *
+ * + * @generated + */ +public class ManyReferenceValueImpl extends GenericReferenceValueImpl implements ManyReferenceValue { + /** + * The cached value of the '{@link #getReferenceValues() Reference Values}' reference list. + * + * + * @see #getReferenceValues() + * @generated + * @ordered + */ + protected EList referenceValues; + /** + * + * + * @generated + */ + protected ManyReferenceValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.MANY_REFERENCE_VALUE; + } + + /** + * + * + * @generated + */ + public EList getReferenceValues() { + if (referenceValues == null) { + referenceValues = new EObjectResolvingEList(EObject.class, this, GenerictracePackage.MANY_REFERENCE_VALUE__REFERENCE_VALUES); + } + return referenceValues; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.MANY_REFERENCE_VALUE__REFERENCE_VALUES: + return getReferenceValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.MANY_REFERENCE_VALUE__REFERENCE_VALUES: + getReferenceValues().clear(); + getReferenceValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.MANY_REFERENCE_VALUE__REFERENCE_VALUES: + getReferenceValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.MANY_REFERENCE_VALUE__REFERENCE_VALUES: + return referenceValues != null && !referenceValues.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ManyReferenceValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyStringAttributeValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyStringAttributeValueImpl.java new file mode 100644 index 000000000..745bfd7c2 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/ManyStringAttributeValueImpl.java @@ -0,0 +1,157 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyStringAttributeValue; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; + +/** + * + * An implementation of the model object 'Many String Attribute Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.ManyStringAttributeValueImpl#getAttributeValue Attribute Value}
  • + *
+ * + * @generated + */ +public class ManyStringAttributeValueImpl extends GenericAttributeValueImpl implements ManyStringAttributeValue { + /** + * The cached value of the '{@link #getAttributeValue() Attribute Value}' attribute list. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected EList attributeValue; + + /** + * + * + * @generated + */ + protected ManyStringAttributeValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.MANY_STRING_ATTRIBUTE_VALUE; + } + + /** + * + * + * @generated + */ + public EList getAttributeValue() { + if (attributeValue == null) { + attributeValue = new EDataTypeUniqueEList(String.class, this, GenerictracePackage.MANY_STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE); + } + return attributeValue; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.MANY_STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return getAttributeValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.MANY_STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + getAttributeValue().clear(); + getAttributeValue().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.MANY_STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + getAttributeValue().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.MANY_STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return attributeValue != null && !attributeValue.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (attributeValue: "); + result.append(attributeValue); + result.append(')'); + return result.toString(); + } + +} //ManyStringAttributeValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/SingleReferenceValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/SingleReferenceValueImpl.java new file mode 100644 index 000000000..213aa3489 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/SingleReferenceValueImpl.java @@ -0,0 +1,166 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue; + +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; + +/** + * + * An implementation of the model object 'Single Reference Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.SingleReferenceValueImpl#getReferenceValue Reference Value}
  • + *
+ * + * @generated + */ +public class SingleReferenceValueImpl extends GenericReferenceValueImpl implements SingleReferenceValue { + /** + * The cached value of the '{@link #getReferenceValue() Reference Value}' reference. + * + * + * @see #getReferenceValue() + * @generated + * @ordered + */ + protected EObject referenceValue; + + /** + * + * + * @generated + */ + protected SingleReferenceValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.SINGLE_REFERENCE_VALUE; + } + + /** + * + * + * @generated + */ + public EObject getReferenceValue() { + if (referenceValue != null && referenceValue.eIsProxy()) { + InternalEObject oldReferenceValue = (InternalEObject)referenceValue; + referenceValue = eResolveProxy(oldReferenceValue); + if (referenceValue != oldReferenceValue) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenerictracePackage.SINGLE_REFERENCE_VALUE__REFERENCE_VALUE, oldReferenceValue, referenceValue)); + } + } + return referenceValue; + } + + /** + * + * + * @generated + */ + public EObject basicGetReferenceValue() { + return referenceValue; + } + + /** + * + * + * @generated + */ + public void setReferenceValue(EObject newReferenceValue) { + EObject oldReferenceValue = referenceValue; + referenceValue = newReferenceValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GenerictracePackage.SINGLE_REFERENCE_VALUE__REFERENCE_VALUE, oldReferenceValue, referenceValue)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.SINGLE_REFERENCE_VALUE__REFERENCE_VALUE: + if (resolve) return getReferenceValue(); + return basicGetReferenceValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.SINGLE_REFERENCE_VALUE__REFERENCE_VALUE: + setReferenceValue((EObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.SINGLE_REFERENCE_VALUE__REFERENCE_VALUE: + setReferenceValue((EObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.SINGLE_REFERENCE_VALUE__REFERENCE_VALUE: + return referenceValue != null; + } + return super.eIsSet(featureID); + } + +} //SingleReferenceValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/StringAttributeValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/StringAttributeValueImpl.java new file mode 100644 index 000000000..9f842f1c6 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/impl/StringAttributeValueImpl.java @@ -0,0 +1,172 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.impl; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage; +import org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'String Attribute Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.generictrace.impl.StringAttributeValueImpl#getAttributeValue Attribute Value}
  • + *
+ * + * @generated + */ +public class StringAttributeValueImpl extends GenericAttributeValueImpl implements StringAttributeValue { + /** + * The default value of the '{@link #getAttributeValue() Attribute Value}' attribute. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected static final String ATTRIBUTE_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAttributeValue() Attribute Value}' attribute. + * + * + * @see #getAttributeValue() + * @generated + * @ordered + */ + protected String attributeValue = ATTRIBUTE_VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected StringAttributeValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GenerictracePackage.Literals.STRING_ATTRIBUTE_VALUE; + } + + /** + * + * + * @generated + */ + public String getAttributeValue() { + return attributeValue; + } + + /** + * + * + * @generated + */ + public void setAttributeValue(String newAttributeValue) { + String oldAttributeValue = attributeValue; + attributeValue = newAttributeValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GenerictracePackage.STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE, oldAttributeValue, attributeValue)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GenerictracePackage.STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return getAttributeValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GenerictracePackage.STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + setAttributeValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GenerictracePackage.STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + setAttributeValue(ATTRIBUTE_VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GenerictracePackage.STRING_ATTRIBUTE_VALUE__ATTRIBUTE_VALUE: + return ATTRIBUTE_VALUE_EDEFAULT == null ? attributeValue != null : !ATTRIBUTE_VALUE_EDEFAULT.equals(attributeValue); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (attributeValue: "); + result.append(attributeValue); + result.append(')'); + return result.toString(); + } + +} //StringAttributeValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/util/GenerictraceAdapterFactory.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/util/GenerictraceAdapterFactory.java new file mode 100644 index 000000000..7f5281551 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/util/GenerictraceAdapterFactory.java @@ -0,0 +1,663 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.util; + +import org.eclipse.gemoc.trace.commons.model.generictrace.*; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; +import org.eclipse.gemoc.trace.commons.model.trace.ParallelStep; +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +import org.eclipse.gemoc.trace.commons.model.trace.SmallStep; +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.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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.trace.commons.model.generictrace.GenerictracePackage + * @generated + */ +public class GenerictraceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static GenerictracePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public GenerictraceAdapterFactory() { + if (modelPackage == null) { + modelPackage = GenerictracePackage.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 GenerictraceSwitch modelSwitch = + new GenerictraceSwitch() { + @Override + public Adapter caseGenericSequentialStep(GenericSequentialStep object) { + return createGenericSequentialStepAdapter(); + } + @Override + public Adapter caseGenericParallelStep(GenericParallelStep object) { + return createGenericParallelStepAdapter(); + } + @Override + public Adapter caseGenericSmallStep(GenericSmallStep object) { + return createGenericSmallStepAdapter(); + } + @Override + public Adapter caseGenericReferenceValue(GenericReferenceValue object) { + return createGenericReferenceValueAdapter(); + } + @Override + public Adapter caseGenericDimension(GenericDimension object) { + return createGenericDimensionAdapter(); + } + @Override + public Adapter caseGenericTracedObject(GenericTracedObject object) { + return createGenericTracedObjectAdapter(); + } + @Override + public Adapter caseGenericState(GenericState object) { + return createGenericStateAdapter(); + } + @Override + public Adapter caseGenericTrace(GenericTrace object) { + return createGenericTraceAdapter(); + } + @Override + public Adapter caseGenericAttributeValue(GenericAttributeValue object) { + return createGenericAttributeValueAdapter(); + } + @Override + public Adapter caseBooleanAttributeValue(BooleanAttributeValue object) { + return createBooleanAttributeValueAdapter(); + } + @Override + public Adapter caseIntegerAttributeValue(IntegerAttributeValue object) { + return createIntegerAttributeValueAdapter(); + } + @Override + public Adapter caseStringAttributeValue(StringAttributeValue object) { + return createStringAttributeValueAdapter(); + } + @Override + public Adapter caseManyBooleanAttributeValue(ManyBooleanAttributeValue object) { + return createManyBooleanAttributeValueAdapter(); + } + @Override + public Adapter caseManyIntegerAttributeValue(ManyIntegerAttributeValue object) { + return createManyIntegerAttributeValueAdapter(); + } + @Override + public Adapter caseManyStringAttributeValue(ManyStringAttributeValue object) { + return createManyStringAttributeValueAdapter(); + } + @Override + public Adapter caseGenericStep(GenericStep object) { + return createGenericStepAdapter(); + } + @Override + public Adapter caseGenericValue(GenericValue object) { + return createGenericValueAdapter(); + } + @Override + public Adapter caseSingleReferenceValue(SingleReferenceValue object) { + return createSingleReferenceValueAdapter(); + } + @Override + public Adapter caseManyReferenceValue(ManyReferenceValue object) { + return createManyReferenceValueAdapter(); + } + @Override + public Adapter caseIntegerObjectAttributeValue(IntegerObjectAttributeValue object) { + return createIntegerObjectAttributeValueAdapter(); + } + @Override + public > Adapter caseStep(Step object) { + return createStepAdapter(); + } + @Override + public , StateSubType extends State> Adapter caseBigStep(BigStep object) { + return createBigStepAdapter(); + } + @Override + public , StateSubType extends State> Adapter caseSequentialStep(SequentialStep object) { + return createSequentialStepAdapter(); + } + @Override + public , StateSubType extends State> Adapter caseParallelStep(ParallelStep object) { + return createParallelStepAdapter(); + } + @Override + public > Adapter caseSmallStep(SmallStep object) { + return createSmallStepAdapter(); + } + @Override + public > Adapter caseValue(Value object) { + return createValueAdapter(); + } + @Override + public > Adapter caseDimension(Dimension object) { + return createDimensionAdapter(); + } + @Override + public > Adapter caseTracedObject(TracedObject object) { + return createTracedObjectAdapter(); + } + @Override + public , ValueSubType extends Value> Adapter caseState(State object) { + return createStateAdapter(); + } + @Override + public , TracedObjectSubtype extends TracedObject, StateSubType extends State> Adapter caseTrace(Trace object) { + return createTraceAdapter(); + } + @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.trace.commons.model.generictrace.GenericSequentialStep Generic Sequential Step}'. + * + * 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.trace.commons.model.generictrace.GenericSequentialStep + * @generated + */ + public Adapter createGenericSequentialStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericParallelStep Generic Parallel Step}'. + * + * 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.trace.commons.model.generictrace.GenericParallelStep + * @generated + */ + public Adapter createGenericParallelStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericSmallStep Generic Small Step}'. + * + * 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.trace.commons.model.generictrace.GenericSmallStep + * @generated + */ + public Adapter createGenericSmallStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericReferenceValue Generic Reference Value}'. + * + * 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.trace.commons.model.generictrace.GenericReferenceValue + * @generated + */ + public Adapter createGenericReferenceValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension Generic Dimension}'. + * + * 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.trace.commons.model.generictrace.GenericDimension + * @generated + */ + public Adapter createGenericDimensionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject Generic Traced Object}'. + * + * 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.trace.commons.model.generictrace.GenericTracedObject + * @generated + */ + public Adapter createGenericTracedObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericState Generic 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.trace.commons.model.generictrace.GenericState + * @generated + */ + public Adapter createGenericStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericTrace Generic Trace}'. + * + * 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.trace.commons.model.generictrace.GenericTrace + * @generated + */ + public Adapter createGenericTraceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericAttributeValue Generic Attribute Value}'. + * + * 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.trace.commons.model.generictrace.GenericAttributeValue + * @generated + */ + public Adapter createGenericAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue Boolean Attribute Value}'. + * + * 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.trace.commons.model.generictrace.BooleanAttributeValue + * @generated + */ + public Adapter createBooleanAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue Integer Attribute Value}'. + * + * 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.trace.commons.model.generictrace.IntegerAttributeValue + * @generated + */ + public Adapter createIntegerAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue String Attribute Value}'. + * + * 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.trace.commons.model.generictrace.StringAttributeValue + * @generated + */ + public Adapter createStringAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyBooleanAttributeValue Many Boolean Attribute Value}'. + * + * 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.trace.commons.model.generictrace.ManyBooleanAttributeValue + * @generated + */ + public Adapter createManyBooleanAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyIntegerAttributeValue Many Integer Attribute Value}'. + * + * 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.trace.commons.model.generictrace.ManyIntegerAttributeValue + * @generated + */ + public Adapter createManyIntegerAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyStringAttributeValue Many String Attribute Value}'. + * + * 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.trace.commons.model.generictrace.ManyStringAttributeValue + * @generated + */ + public Adapter createManyStringAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep Generic Step}'. + * + * 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.trace.commons.model.generictrace.GenericStep + * @generated + */ + public Adapter createGenericStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue Generic Value}'. + * + * 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.trace.commons.model.generictrace.GenericValue + * @generated + */ + public Adapter createGenericValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue Single Reference Value}'. + * + * 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.trace.commons.model.generictrace.SingleReferenceValue + * @generated + */ + public Adapter createSingleReferenceValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue Many Reference Value}'. + * + * 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.trace.commons.model.generictrace.ManyReferenceValue + * @generated + */ + public Adapter createManyReferenceValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue Integer Object Attribute Value}'. + * + * 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.trace.commons.model.generictrace.IntegerObjectAttributeValue + * @generated + */ + public Adapter createIntegerObjectAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Step Step}'. + * + * 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.trace.commons.model.trace.Step + * @generated + */ + public Adapter createStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.BigStep Big Step}'. + * + * 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.trace.commons.model.trace.BigStep + * @generated + */ + public Adapter createBigStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.SequentialStep Sequential Step}'. + * + * 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.trace.commons.model.trace.SequentialStep + * @generated + */ + public Adapter createSequentialStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.ParallelStep Parallel Step}'. + * + * 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.trace.commons.model.trace.ParallelStep + * @generated + */ + public Adapter createParallelStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.SmallStep Small Step}'. + * + * 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.trace.commons.model.trace.SmallStep + * @generated + */ + public Adapter createSmallStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Value Value}'. + * + * 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.trace.commons.model.trace.Value + * @generated + */ + public Adapter createValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Dimension Dimension}'. + * + * 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.trace.commons.model.trace.Dimension + * @generated + */ + public Adapter createDimensionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.TracedObject Traced Object}'. + * + * 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.trace.commons.model.trace.TracedObject + * @generated + */ + public Adapter createTracedObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.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.trace.commons.model.trace.State + * @generated + */ + public Adapter createStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace Trace}'. + * + * 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.trace.commons.model.trace.Trace + * @generated + */ + public Adapter createTraceAdapter() { + 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; + } + +} //GenerictraceAdapterFactory diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/util/GenerictraceSwitch.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/util/GenerictraceSwitch.java new file mode 100644 index 000000000..35f30420c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/generictrace/util/GenerictraceSwitch.java @@ -0,0 +1,728 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.generictrace.util; + +import org.eclipse.gemoc.trace.commons.model.generictrace.*; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; +import org.eclipse.gemoc.trace.commons.model.trace.ParallelStep; +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +import org.eclipse.gemoc.trace.commons.model.trace.SmallStep; +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.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * 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.trace.commons.model.generictrace.GenerictracePackage + * @generated + */ +public class GenerictraceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static GenerictracePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public GenerictraceSwitch() { + if (modelPackage == null) { + modelPackage = GenerictracePackage.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 GenerictracePackage.GENERIC_SEQUENTIAL_STEP: { + GenericSequentialStep genericSequentialStep = (GenericSequentialStep)theEObject; + T result = caseGenericSequentialStep(genericSequentialStep); + if (result == null) result = caseGenericStep(genericSequentialStep); + if (result == null) result = caseSequentialStep(genericSequentialStep); + if (result == null) result = caseBigStep(genericSequentialStep); + if (result == null) result = caseStep(genericSequentialStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_PARALLEL_STEP: { + GenericParallelStep genericParallelStep = (GenericParallelStep)theEObject; + T result = caseGenericParallelStep(genericParallelStep); + if (result == null) result = caseGenericStep(genericParallelStep); + if (result == null) result = caseParallelStep(genericParallelStep); + if (result == null) result = caseBigStep(genericParallelStep); + if (result == null) result = caseStep(genericParallelStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_SMALL_STEP: { + GenericSmallStep genericSmallStep = (GenericSmallStep)theEObject; + T result = caseGenericSmallStep(genericSmallStep); + if (result == null) result = caseGenericStep(genericSmallStep); + if (result == null) result = caseSmallStep(genericSmallStep); + if (result == null) result = caseStep(genericSmallStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_REFERENCE_VALUE: { + GenericReferenceValue genericReferenceValue = (GenericReferenceValue)theEObject; + T result = caseGenericReferenceValue(genericReferenceValue); + if (result == null) result = caseGenericValue(genericReferenceValue); + if (result == null) result = caseValue(genericReferenceValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_DIMENSION: { + GenericDimension genericDimension = (GenericDimension)theEObject; + T result = caseGenericDimension(genericDimension); + if (result == null) result = caseDimension(genericDimension); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_TRACED_OBJECT: { + GenericTracedObject genericTracedObject = (GenericTracedObject)theEObject; + T result = caseGenericTracedObject(genericTracedObject); + if (result == null) result = caseTracedObject(genericTracedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_STATE: { + GenericState genericState = (GenericState)theEObject; + T result = caseGenericState(genericState); + if (result == null) result = caseState(genericState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_TRACE: { + GenericTrace genericTrace = (GenericTrace)theEObject; + T result = caseGenericTrace(genericTrace); + if (result == null) result = caseTrace(genericTrace); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_ATTRIBUTE_VALUE: { + GenericAttributeValue genericAttributeValue = (GenericAttributeValue)theEObject; + T result = caseGenericAttributeValue(genericAttributeValue); + if (result == null) result = caseGenericValue(genericAttributeValue); + if (result == null) result = caseValue(genericAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.BOOLEAN_ATTRIBUTE_VALUE: { + BooleanAttributeValue booleanAttributeValue = (BooleanAttributeValue)theEObject; + T result = caseBooleanAttributeValue(booleanAttributeValue); + if (result == null) result = caseGenericAttributeValue(booleanAttributeValue); + if (result == null) result = caseGenericValue(booleanAttributeValue); + if (result == null) result = caseValue(booleanAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.INTEGER_ATTRIBUTE_VALUE: { + IntegerAttributeValue integerAttributeValue = (IntegerAttributeValue)theEObject; + T result = caseIntegerAttributeValue(integerAttributeValue); + if (result == null) result = caseGenericAttributeValue(integerAttributeValue); + if (result == null) result = caseGenericValue(integerAttributeValue); + if (result == null) result = caseValue(integerAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.STRING_ATTRIBUTE_VALUE: { + StringAttributeValue stringAttributeValue = (StringAttributeValue)theEObject; + T result = caseStringAttributeValue(stringAttributeValue); + if (result == null) result = caseGenericAttributeValue(stringAttributeValue); + if (result == null) result = caseGenericValue(stringAttributeValue); + if (result == null) result = caseValue(stringAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.MANY_BOOLEAN_ATTRIBUTE_VALUE: { + ManyBooleanAttributeValue manyBooleanAttributeValue = (ManyBooleanAttributeValue)theEObject; + T result = caseManyBooleanAttributeValue(manyBooleanAttributeValue); + if (result == null) result = caseGenericAttributeValue(manyBooleanAttributeValue); + if (result == null) result = caseGenericValue(manyBooleanAttributeValue); + if (result == null) result = caseValue(manyBooleanAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.MANY_INTEGER_ATTRIBUTE_VALUE: { + ManyIntegerAttributeValue manyIntegerAttributeValue = (ManyIntegerAttributeValue)theEObject; + T result = caseManyIntegerAttributeValue(manyIntegerAttributeValue); + if (result == null) result = caseGenericAttributeValue(manyIntegerAttributeValue); + if (result == null) result = caseGenericValue(manyIntegerAttributeValue); + if (result == null) result = caseValue(manyIntegerAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.MANY_STRING_ATTRIBUTE_VALUE: { + ManyStringAttributeValue manyStringAttributeValue = (ManyStringAttributeValue)theEObject; + T result = caseManyStringAttributeValue(manyStringAttributeValue); + if (result == null) result = caseGenericAttributeValue(manyStringAttributeValue); + if (result == null) result = caseGenericValue(manyStringAttributeValue); + if (result == null) result = caseValue(manyStringAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_STEP: { + GenericStep genericStep = (GenericStep)theEObject; + T result = caseGenericStep(genericStep); + if (result == null) result = caseStep(genericStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.GENERIC_VALUE: { + GenericValue genericValue = (GenericValue)theEObject; + T result = caseGenericValue(genericValue); + if (result == null) result = caseValue(genericValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.SINGLE_REFERENCE_VALUE: { + SingleReferenceValue singleReferenceValue = (SingleReferenceValue)theEObject; + T result = caseSingleReferenceValue(singleReferenceValue); + if (result == null) result = caseGenericReferenceValue(singleReferenceValue); + if (result == null) result = caseGenericValue(singleReferenceValue); + if (result == null) result = caseValue(singleReferenceValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.MANY_REFERENCE_VALUE: { + ManyReferenceValue manyReferenceValue = (ManyReferenceValue)theEObject; + T result = caseManyReferenceValue(manyReferenceValue); + if (result == null) result = caseGenericReferenceValue(manyReferenceValue); + if (result == null) result = caseGenericValue(manyReferenceValue); + if (result == null) result = caseValue(manyReferenceValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GenerictracePackage.INTEGER_OBJECT_ATTRIBUTE_VALUE: { + IntegerObjectAttributeValue integerObjectAttributeValue = (IntegerObjectAttributeValue)theEObject; + T result = caseIntegerObjectAttributeValue(integerObjectAttributeValue); + if (result == null) result = caseGenericAttributeValue(integerObjectAttributeValue); + if (result == null) result = caseGenericValue(integerObjectAttributeValue); + if (result == null) result = caseValue(integerObjectAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Sequential Step'. + * + * 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 'Generic Sequential Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericSequentialStep(GenericSequentialStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Parallel Step'. + * + * 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 'Generic Parallel Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericParallelStep(GenericParallelStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Small Step'. + * + * 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 'Generic Small Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericSmallStep(GenericSmallStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Reference Value'. + * + * 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 'Generic Reference Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericReferenceValue(GenericReferenceValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Dimension'. + * + * 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 'Generic Dimension'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericDimension(GenericDimension object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Traced Object'. + * + * 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 'Generic Traced Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericTracedObject(GenericTracedObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic 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 'Generic State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericState(GenericState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Trace'. + * + * 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 'Generic Trace'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericTrace(GenericTrace object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Attribute Value'. + * + * 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 'Generic Attribute Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericAttributeValue(GenericAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Boolean Attribute Value'. + * + * 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 Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBooleanAttributeValue(BooleanAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Integer Attribute Value'. + * + * 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 Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIntegerAttributeValue(IntegerAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'String Attribute Value'. + * + * 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 Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStringAttributeValue(StringAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Many Boolean Attribute Value'. + * + * 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 Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseManyBooleanAttributeValue(ManyBooleanAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Many Integer Attribute Value'. + * + * 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 Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseManyIntegerAttributeValue(ManyIntegerAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Many String Attribute Value'. + * + * 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 Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseManyStringAttributeValue(ManyStringAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Step'. + * + * 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 'Generic Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericStep(GenericStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic Value'. + * + * 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 'Generic Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericValue(GenericValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Single Reference Value'. + * + * 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 Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSingleReferenceValue(SingleReferenceValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Many Reference Value'. + * + * 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 Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseManyReferenceValue(ManyReferenceValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Integer Object Attribute Value'. + * + * 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 Object Attribute Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIntegerObjectAttributeValue(IntegerObjectAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Step'. + * + * 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'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseStep(Step object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Big Step'. + * + * 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 'Big Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , StateSubType extends State> T caseBigStep(BigStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Sequential Step'. + * + * 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 'Sequential Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , StateSubType extends State> T caseSequentialStep(SequentialStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Parallel Step'. + * + * 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 'Parallel Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , StateSubType extends State> T caseParallelStep(ParallelStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Small Step'. + * + * 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 'Small Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseSmallStep(SmallStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Value'. + * + * 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 'Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseValue(Value object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dimension'. + * + * 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 'Dimension'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseDimension(Dimension object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Traced Object'. + * + * 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 'Traced Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseTracedObject(TracedObject 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 , ValueSubType extends Value> T caseState(State object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Trace'. + * + * 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 'Trace'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , TracedObjectSubtype extends TracedObject, StateSubType extends State> T caseTrace(Trace 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; + } + +} //GenerictraceSwitch diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/helper/StepHelper.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/helper/StepHelper.java new file mode 100644 index 000000000..41f161ff0 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/helper/StepHelper.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.commons.model.helper; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +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.SmallStep; +import org.eclipse.gemoc.trace.commons.model.trace.Step; + + +public class StepHelper { + + public static String getStepName(Step step) { + //returns the emf id or the java id if the emf id is null + return "LogicalStep ["+(EcoreUtil.getID(step) != null ? EcoreUtil.getID(step):System.identityHashCode(step)) +"]"; + } + + public static List getMSEs(Step instruction) { + ArrayList l = new ArrayList(); + for (MSEOccurrence o : collectAllMSEOccurrences(instruction)) + { + l.add(o.getMse()); + } + return l; + } + + + public static List collectAllMSEOccurrences(Step instruction) { + List res = new ArrayList(); + if (instruction instanceof SmallStep){ + res.add(((SmallStep)instruction).getMseoccurrence()); + return res; + } + if (instruction instanceof BigStep){ + for(Object o : ((BigStep)instruction).getSubSteps()){ + Step s = (Step)o; + res.addAll(collectAllMSEOccurrences(s)); + } + return res; + } + return res; + } + + public static List collectAllMSEs(Step instruction) { + List res = new ArrayList(); + for (MSEOccurrence occ : collectAllMSEOccurrences(instruction)){ + res.add(occ.getMse()); + } + return res; + } +} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/AddonExtensionParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/AddonExtensionParameter.java new file mode 100644 index 000000000..bd1abded2 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/AddonExtensionParameter.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + + +/** + * + * A representation of the model object 'Addon Extension Parameter'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getAddonExtensionParameter() + * @model + * @generated + */ +public interface AddonExtensionParameter extends LaunchConfigurationParameter { +} // AddonExtensionParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/AnimatorURIParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/AnimatorURIParameter.java new file mode 100644 index 000000000..4987a7634 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/AnimatorURIParameter.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + + +/** + * + * A representation of the model object 'Animator URI Parameter'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getAnimatorURIParameter() + * @model + * @generated + */ +public interface AnimatorURIParameter extends LaunchConfigurationParameter { +} // AnimatorURIParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/EntryPointParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/EntryPointParameter.java new file mode 100644 index 000000000..c1639f07e --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/EntryPointParameter.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + + +/** + * + * A representation of the model object 'Entry Point Parameter'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getEntryPointParameter() + * @model + * @generated + */ +public interface EntryPointParameter extends LaunchConfigurationParameter { +} // EntryPointParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/InitializationArgumentsParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/InitializationArgumentsParameter.java new file mode 100644 index 000000000..cf4d13672 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/InitializationArgumentsParameter.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + + +/** + * + * A representation of the model object 'Initialization Arguments Parameter'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getInitializationArgumentsParameter() + * @model + * @generated + */ +public interface InitializationArgumentsParameter extends LaunchConfigurationParameter { +} // InitializationArgumentsParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/InitializationMethodParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/InitializationMethodParameter.java new file mode 100644 index 000000000..50e5ee05e --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/InitializationMethodParameter.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + + +/** + * + * A representation of the model object 'Initialization Method Parameter'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getInitializationMethodParameter() + * @model + * @generated + */ +public interface InitializationMethodParameter extends LaunchConfigurationParameter { +} // InitializationMethodParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LanguageNameParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LanguageNameParameter.java new file mode 100644 index 000000000..f62bd3dd9 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LanguageNameParameter.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + + +/** + * + * A representation of the model object 'Language Name Parameter'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getLanguageNameParameter() + * @model + * @generated + */ +public interface LanguageNameParameter extends LaunchConfigurationParameter { +} // LanguageNameParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchConfiguration.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchConfiguration.java new file mode 100644 index 000000000..b29ea9efc --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchConfiguration.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Launch Configuration'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration#getParameters Parameters}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration#getType Type}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getLaunchConfiguration() + * @model + * @generated + */ +public interface LaunchConfiguration extends EObject { + /** + * Returns the value of the 'Parameters' containment reference list. + * The list contents are of type {@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter}. + * + *

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

+ * + * @return the value of the 'Parameters' containment reference list. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getLaunchConfiguration_Parameters() + * @model containment="true" + * @generated + */ + EList getParameters(); + + /** + * Returns the value of the 'Type' attribute. + * + *

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

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getLaunchConfiguration_Type() + * @model required="true" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + +} // LaunchConfiguration diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchConfigurationParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchConfigurationParameter.java new file mode 100644 index 000000000..5457a1d3d --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchConfigurationParameter.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Launch Configuration Parameter'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter#getValue Value}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getLaunchConfigurationParameter() + * @model abstract="true" + * @generated + */ +public interface LaunchConfigurationParameter extends EObject { + /** + * Returns the value of the 'Value' attribute. + * The default value is "". + * + *

+ * 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.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getLaunchConfigurationParameter_Value() + * @model default="" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // LaunchConfigurationParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchconfigurationFactory.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchconfigurationFactory.java new file mode 100644 index 000000000..556cf6beb --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchconfigurationFactory.java @@ -0,0 +1,124 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + +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.trace.commons.model.launchconfiguration.LaunchconfigurationPackage + * @generated + */ +public interface LaunchconfigurationFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + LaunchconfigurationFactory eINSTANCE = org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Launch Configuration'. + * + * + * @return a new object of class 'Launch Configuration'. + * @generated + */ + LaunchConfiguration createLaunchConfiguration(); + + /** + * Returns a new object of class 'Language Name Parameter'. + * + * + * @return a new object of class 'Language Name Parameter'. + * @generated + */ + LanguageNameParameter createLanguageNameParameter(); + + /** + * Returns a new object of class 'Addon Extension Parameter'. + * + * + * @return a new object of class 'Addon Extension Parameter'. + * @generated + */ + AddonExtensionParameter createAddonExtensionParameter(); + + /** + * Returns a new object of class 'Model URI Parameter'. + * + * + * @return a new object of class 'Model URI Parameter'. + * @generated + */ + ModelURIParameter createModelURIParameter(); + + /** + * Returns a new object of class 'Animator URI Parameter'. + * + * + * @return a new object of class 'Animator URI Parameter'. + * @generated + */ + AnimatorURIParameter createAnimatorURIParameter(); + + /** + * Returns a new object of class 'Entry Point Parameter'. + * + * + * @return a new object of class 'Entry Point Parameter'. + * @generated + */ + EntryPointParameter createEntryPointParameter(); + + /** + * Returns a new object of class 'Initialization Arguments Parameter'. + * + * + * @return a new object of class 'Initialization Arguments Parameter'. + * @generated + */ + InitializationArgumentsParameter createInitializationArgumentsParameter(); + + /** + * Returns a new object of class 'Model Root Parameter'. + * + * + * @return a new object of class 'Model Root Parameter'. + * @generated + */ + ModelRootParameter createModelRootParameter(); + + /** + * Returns a new object of class 'Initialization Method Parameter'. + * + * + * @return a new object of class 'Initialization Method Parameter'. + * @generated + */ + InitializationMethodParameter createInitializationMethodParameter(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + LaunchconfigurationPackage getLaunchconfigurationPackage(); + +} //LaunchconfigurationFactory diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchconfigurationPackage.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchconfigurationPackage.java new file mode 100644 index 000000000..82c818ac4 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/LaunchconfigurationPackage.java @@ -0,0 +1,760 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +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.trace.commons.model.launchconfiguration.LaunchconfigurationFactory + * @model kind="package" + * @generated + */ +public interface LaunchconfigurationPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "launchconfiguration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.gemoc.org/launch_configuration"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "launchconfiguration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + LaunchconfigurationPackage eINSTANCE = org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationImpl Launch Configuration}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getLaunchConfiguration() + * @generated + */ + int LAUNCH_CONFIGURATION = 0; + + /** + * The feature id for the 'Parameters' containment reference list. + * + * + * @generated + * @ordered + */ + int LAUNCH_CONFIGURATION__PARAMETERS = 0; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int LAUNCH_CONFIGURATION__TYPE = 1; + + /** + * The number of structural features of the 'Launch Configuration' class. + * + * + * @generated + * @ordered + */ + int LAUNCH_CONFIGURATION_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Launch Configuration' class. + * + * + * @generated + * @ordered + */ + int LAUNCH_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationParameterImpl Launch Configuration Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getLaunchConfigurationParameter() + * @generated + */ + int LAUNCH_CONFIGURATION_PARAMETER = 1; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int LAUNCH_CONFIGURATION_PARAMETER__VALUE = 0; + + /** + * The number of structural features of the 'Launch Configuration Parameter' class. + * + * + * @generated + * @ordered + */ + int LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Launch Configuration Parameter' class. + * + * + * @generated + * @ordered + */ + int LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LanguageNameParameterImpl Language Name Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LanguageNameParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getLanguageNameParameter() + * @generated + */ + int LANGUAGE_NAME_PARAMETER = 2; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int LANGUAGE_NAME_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; + + /** + * The number of structural features of the 'Language Name Parameter' class. + * + * + * @generated + * @ordered + */ + int LANGUAGE_NAME_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Language Name Parameter' class. + * + * + * @generated + * @ordered + */ + int LANGUAGE_NAME_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.AddonExtensionParameterImpl Addon Extension Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.AddonExtensionParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getAddonExtensionParameter() + * @generated + */ + int ADDON_EXTENSION_PARAMETER = 3; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int ADDON_EXTENSION_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; + + /** + * The number of structural features of the 'Addon Extension Parameter' class. + * + * + * @generated + * @ordered + */ + int ADDON_EXTENSION_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Addon Extension Parameter' class. + * + * + * @generated + * @ordered + */ + int ADDON_EXTENSION_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.ModelURIParameterImpl Model URI Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.ModelURIParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getModelURIParameter() + * @generated + */ + int MODEL_URI_PARAMETER = 4; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int MODEL_URI_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; + + /** + * The number of structural features of the 'Model URI Parameter' class. + * + * + * @generated + * @ordered + */ + int MODEL_URI_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Model URI Parameter' class. + * + * + * @generated + * @ordered + */ + int MODEL_URI_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.AnimatorURIParameterImpl Animator URI Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.AnimatorURIParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getAnimatorURIParameter() + * @generated + */ + int ANIMATOR_URI_PARAMETER = 5; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int ANIMATOR_URI_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; + + /** + * The number of structural features of the 'Animator URI Parameter' class. + * + * + * @generated + * @ordered + */ + int ANIMATOR_URI_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Animator URI Parameter' class. + * + * + * @generated + * @ordered + */ + int ANIMATOR_URI_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.EntryPointParameterImpl Entry Point Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.EntryPointParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getEntryPointParameter() + * @generated + */ + int ENTRY_POINT_PARAMETER = 6; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int ENTRY_POINT_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; + + /** + * The number of structural features of the 'Entry Point Parameter' class. + * + * + * @generated + * @ordered + */ + int ENTRY_POINT_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Entry Point Parameter' class. + * + * + * @generated + * @ordered + */ + int ENTRY_POINT_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.InitializationArgumentsParameterImpl Initialization Arguments Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.InitializationArgumentsParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getInitializationArgumentsParameter() + * @generated + */ + int INITIALIZATION_ARGUMENTS_PARAMETER = 7; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int INITIALIZATION_ARGUMENTS_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; + + /** + * The number of structural features of the 'Initialization Arguments Parameter' class. + * + * + * @generated + * @ordered + */ + int INITIALIZATION_ARGUMENTS_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Initialization Arguments Parameter' class. + * + * + * @generated + * @ordered + */ + int INITIALIZATION_ARGUMENTS_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.ModelRootParameterImpl Model Root Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.ModelRootParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getModelRootParameter() + * @generated + */ + int MODEL_ROOT_PARAMETER = 8; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int MODEL_ROOT_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; + + /** + * The number of structural features of the 'Model Root Parameter' class. + * + * + * @generated + * @ordered + */ + int MODEL_ROOT_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Model Root Parameter' class. + * + * + * @generated + * @ordered + */ + int MODEL_ROOT_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.InitializationMethodParameterImpl Initialization Method Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.InitializationMethodParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getInitializationMethodParameter() + * @generated + */ + int INITIALIZATION_METHOD_PARAMETER = 9; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int INITIALIZATION_METHOD_PARAMETER__VALUE = LAUNCH_CONFIGURATION_PARAMETER__VALUE; + + /** + * The number of structural features of the 'Initialization Method Parameter' class. + * + * + * @generated + * @ordered + */ + int INITIALIZATION_METHOD_PARAMETER_FEATURE_COUNT = LAUNCH_CONFIGURATION_PARAMETER_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Initialization Method Parameter' class. + * + * + * @generated + * @ordered + */ + int INITIALIZATION_METHOD_PARAMETER_OPERATION_COUNT = LAUNCH_CONFIGURATION_PARAMETER_OPERATION_COUNT + 0; + + /** + * The meta object id for the 'ISerializable' data type. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getISerializable() + * @generated + */ + int ISERIALIZABLE = 10; + + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration Launch Configuration}'. + * + * + * @return the meta object for class 'Launch Configuration'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration + * @generated + */ + EClass getLaunchConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration#getParameters Parameters}'. + * + * + * @return the meta object for the containment reference list 'Parameters'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration#getParameters() + * @see #getLaunchConfiguration() + * @generated + */ + EReference getLaunchConfiguration_Parameters(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration#getType() + * @see #getLaunchConfiguration() + * @generated + */ + EAttribute getLaunchConfiguration_Type(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter Launch Configuration Parameter}'. + * + * + * @return the meta object for class 'Launch Configuration Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter + * @generated + */ + EClass getLaunchConfigurationParameter(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter#getValue() + * @see #getLaunchConfigurationParameter() + * @generated + */ + EAttribute getLaunchConfigurationParameter_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LanguageNameParameter Language Name Parameter}'. + * + * + * @return the meta object for class 'Language Name Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LanguageNameParameter + * @generated + */ + EClass getLanguageNameParameter(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.AddonExtensionParameter Addon Extension Parameter}'. + * + * + * @return the meta object for class 'Addon Extension Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.AddonExtensionParameter + * @generated + */ + EClass getAddonExtensionParameter(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelURIParameter Model URI Parameter}'. + * + * + * @return the meta object for class 'Model URI Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelURIParameter + * @generated + */ + EClass getModelURIParameter(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.AnimatorURIParameter Animator URI Parameter}'. + * + * + * @return the meta object for class 'Animator URI Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.AnimatorURIParameter + * @generated + */ + EClass getAnimatorURIParameter(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.EntryPointParameter Entry Point Parameter}'. + * + * + * @return the meta object for class 'Entry Point Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.EntryPointParameter + * @generated + */ + EClass getEntryPointParameter(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationArgumentsParameter Initialization Arguments Parameter}'. + * + * + * @return the meta object for class 'Initialization Arguments Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationArgumentsParameter + * @generated + */ + EClass getInitializationArgumentsParameter(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelRootParameter Model Root Parameter}'. + * + * + * @return the meta object for class 'Model Root Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelRootParameter + * @generated + */ + EClass getModelRootParameter(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationMethodParameter Initialization Method Parameter}'. + * + * + * @return the meta object for class 'Initialization Method Parameter'. + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationMethodParameter + * @generated + */ + EClass getInitializationMethodParameter(); + + /** + * Returns the meta object for data type 'ISerializable'. + * + * + * @return the meta object for data type 'ISerializable'. + * @model instanceClass="byte[]" + * @generated + */ + EDataType getISerializable(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + LaunchconfigurationFactory getLaunchconfigurationFactory(); + + /** + * + * 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.trace.commons.model.launchconfiguration.impl.LaunchConfigurationImpl Launch Configuration}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getLaunchConfiguration() + * @generated + */ + EClass LAUNCH_CONFIGURATION = eINSTANCE.getLaunchConfiguration(); + + /** + * The meta object literal for the 'Parameters' containment reference list feature. + * + * + * @generated + */ + EReference LAUNCH_CONFIGURATION__PARAMETERS = eINSTANCE.getLaunchConfiguration_Parameters(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute LAUNCH_CONFIGURATION__TYPE = eINSTANCE.getLaunchConfiguration_Type(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationParameterImpl Launch Configuration Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getLaunchConfigurationParameter() + * @generated + */ + EClass LAUNCH_CONFIGURATION_PARAMETER = eINSTANCE.getLaunchConfigurationParameter(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute LAUNCH_CONFIGURATION_PARAMETER__VALUE = eINSTANCE.getLaunchConfigurationParameter_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LanguageNameParameterImpl Language Name Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LanguageNameParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getLanguageNameParameter() + * @generated + */ + EClass LANGUAGE_NAME_PARAMETER = eINSTANCE.getLanguageNameParameter(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.AddonExtensionParameterImpl Addon Extension Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.AddonExtensionParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getAddonExtensionParameter() + * @generated + */ + EClass ADDON_EXTENSION_PARAMETER = eINSTANCE.getAddonExtensionParameter(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.ModelURIParameterImpl Model URI Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.ModelURIParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getModelURIParameter() + * @generated + */ + EClass MODEL_URI_PARAMETER = eINSTANCE.getModelURIParameter(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.AnimatorURIParameterImpl Animator URI Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.AnimatorURIParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getAnimatorURIParameter() + * @generated + */ + EClass ANIMATOR_URI_PARAMETER = eINSTANCE.getAnimatorURIParameter(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.EntryPointParameterImpl Entry Point Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.EntryPointParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getEntryPointParameter() + * @generated + */ + EClass ENTRY_POINT_PARAMETER = eINSTANCE.getEntryPointParameter(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.InitializationArgumentsParameterImpl Initialization Arguments Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.InitializationArgumentsParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getInitializationArgumentsParameter() + * @generated + */ + EClass INITIALIZATION_ARGUMENTS_PARAMETER = eINSTANCE.getInitializationArgumentsParameter(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.ModelRootParameterImpl Model Root Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.ModelRootParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getModelRootParameter() + * @generated + */ + EClass MODEL_ROOT_PARAMETER = eINSTANCE.getModelRootParameter(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.InitializationMethodParameterImpl Initialization Method Parameter}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.InitializationMethodParameterImpl + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getInitializationMethodParameter() + * @generated + */ + EClass INITIALIZATION_METHOD_PARAMETER = eINSTANCE.getInitializationMethodParameter(); + + /** + * The meta object literal for the 'ISerializable' data type. + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchconfigurationPackageImpl#getISerializable() + * @generated + */ + EDataType ISERIALIZABLE = eINSTANCE.getISerializable(); + + } + +} //LaunchconfigurationPackage diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/ModelRootParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/ModelRootParameter.java new file mode 100644 index 000000000..3dd14354a --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/ModelRootParameter.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + + +/** + * + * A representation of the model object 'Model Root Parameter'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getModelRootParameter() + * @model + * @generated + */ +public interface ModelRootParameter extends LaunchConfigurationParameter { +} // ModelRootParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/ModelURIParameter.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/ModelURIParameter.java new file mode 100644 index 000000000..c3acbe182 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/ModelURIParameter.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration; + + +/** + * + * A representation of the model object 'Model URI Parameter'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#getModelURIParameter() + * @model + * @generated + */ +public interface ModelURIParameter extends LaunchConfigurationParameter { +} // ModelURIParameter diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/AddonExtensionParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/AddonExtensionParameterImpl.java new file mode 100644 index 000000000..9fbe6b3bb --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/AddonExtensionParameterImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.AddonExtensionParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Addon Extension Parameter'. + * + * + * @generated + */ +public class AddonExtensionParameterImpl extends LaunchConfigurationParameterImpl implements AddonExtensionParameter { + /** + * + * + * @generated + */ + protected AddonExtensionParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.ADDON_EXTENSION_PARAMETER; + } + +} //AddonExtensionParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/AnimatorURIParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/AnimatorURIParameterImpl.java new file mode 100644 index 000000000..e4636a70c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/AnimatorURIParameterImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.AnimatorURIParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Animator URI Parameter'. + * + * + * @generated + */ +public class AnimatorURIParameterImpl extends LaunchConfigurationParameterImpl implements AnimatorURIParameter { + /** + * + * + * @generated + */ + protected AnimatorURIParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.ANIMATOR_URI_PARAMETER; + } + +} //AnimatorURIParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/EntryPointParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/EntryPointParameterImpl.java new file mode 100644 index 000000000..60d218c6c --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/EntryPointParameterImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.EntryPointParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Entry Point Parameter'. + * + * + * @generated + */ +public class EntryPointParameterImpl extends LaunchConfigurationParameterImpl implements EntryPointParameter { + /** + * + * + * @generated + */ + protected EntryPointParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.ENTRY_POINT_PARAMETER; + } + +} //EntryPointParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/InitializationArgumentsParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/InitializationArgumentsParameterImpl.java new file mode 100644 index 000000000..0ee043656 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/InitializationArgumentsParameterImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationArgumentsParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Initialization Arguments Parameter'. + * + * + * @generated + */ +public class InitializationArgumentsParameterImpl extends LaunchConfigurationParameterImpl implements InitializationArgumentsParameter { + /** + * + * + * @generated + */ + protected InitializationArgumentsParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.INITIALIZATION_ARGUMENTS_PARAMETER; + } + +} //InitializationArgumentsParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/InitializationMethodParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/InitializationMethodParameterImpl.java new file mode 100644 index 000000000..b3d3b5e56 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/InitializationMethodParameterImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationMethodParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Initialization Method Parameter'. + * + * + * @generated + */ +public class InitializationMethodParameterImpl extends LaunchConfigurationParameterImpl implements InitializationMethodParameter { + /** + * + * + * @generated + */ + protected InitializationMethodParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.INITIALIZATION_METHOD_PARAMETER; + } + +} //InitializationMethodParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LanguageNameParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LanguageNameParameterImpl.java new file mode 100644 index 000000000..e73960e43 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LanguageNameParameterImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LanguageNameParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Language Name Parameter'. + * + * + * @generated + */ +public class LanguageNameParameterImpl extends LaunchConfigurationParameterImpl implements LanguageNameParameter { + /** + * + * + * @generated + */ + protected LanguageNameParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.LANGUAGE_NAME_PARAMETER; + } + +} //LanguageNameParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchConfigurationImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchConfigurationImpl.java new file mode 100644 index 000000000..684fab519 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchConfigurationImpl.java @@ -0,0 +1,232 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +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; + +/** + * + * An implementation of the model object 'Launch Configuration'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationImpl#getParameters Parameters}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationImpl#getType Type}
  • + *
+ * + * @generated + */ +public class LaunchConfigurationImpl extends MinimalEObjectImpl.Container implements LaunchConfiguration { + /** + * The cached value of the '{@link #getParameters() Parameters}' containment reference list. + * + * + * @see #getParameters() + * @generated + * @ordered + */ + protected EList parameters; + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected LaunchConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.LAUNCH_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getParameters() { + if (parameters == null) { + parameters = new EObjectContainmentEList(LaunchConfigurationParameter.class, this, LaunchconfigurationPackage.LAUNCH_CONFIGURATION__PARAMETERS); + } + return parameters; + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LaunchconfigurationPackage.LAUNCH_CONFIGURATION__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__PARAMETERS: + return ((InternalEList)getParameters()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__PARAMETERS: + return getParameters(); + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__PARAMETERS: + getParameters().clear(); + getParameters().addAll((Collection)newValue); + return; + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__TYPE: + setType((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__PARAMETERS: + getParameters().clear(); + return; + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__TYPE: + setType(TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__PARAMETERS: + return parameters != null && !parameters.isEmpty(); + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //LaunchConfigurationImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchConfigurationParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchConfigurationParameterImpl.java new file mode 100644 index 000000000..b0cb09348 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchConfigurationParameterImpl.java @@ -0,0 +1,173 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Launch Configuration Parameter'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.impl.LaunchConfigurationParameterImpl#getValue Value}
  • + *
+ * + * @generated + */ +public abstract class LaunchConfigurationParameterImpl extends MinimalEObjectImpl.Container implements LaunchConfigurationParameter { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected LaunchConfigurationParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.LAUNCH_CONFIGURATION_PARAMETER; + } + + /** + * + * + * @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, LaunchconfigurationPackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION_PARAMETER__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + 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(')'); + return result.toString(); + } + +} //LaunchConfigurationParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchconfigurationFactoryImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchconfigurationFactoryImpl.java new file mode 100644 index 000000000..5bce19ec3 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchconfigurationFactoryImpl.java @@ -0,0 +1,242 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class LaunchconfigurationFactoryImpl extends EFactoryImpl implements LaunchconfigurationFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static LaunchconfigurationFactory init() { + try { + LaunchconfigurationFactory theLaunchconfigurationFactory = (LaunchconfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(LaunchconfigurationPackage.eNS_URI); + if (theLaunchconfigurationFactory != null) { + return theLaunchconfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new LaunchconfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public LaunchconfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION: return createLaunchConfiguration(); + case LaunchconfigurationPackage.LANGUAGE_NAME_PARAMETER: return createLanguageNameParameter(); + case LaunchconfigurationPackage.ADDON_EXTENSION_PARAMETER: return createAddonExtensionParameter(); + case LaunchconfigurationPackage.MODEL_URI_PARAMETER: return createModelURIParameter(); + case LaunchconfigurationPackage.ANIMATOR_URI_PARAMETER: return createAnimatorURIParameter(); + case LaunchconfigurationPackage.ENTRY_POINT_PARAMETER: return createEntryPointParameter(); + case LaunchconfigurationPackage.INITIALIZATION_ARGUMENTS_PARAMETER: return createInitializationArgumentsParameter(); + case LaunchconfigurationPackage.MODEL_ROOT_PARAMETER: return createModelRootParameter(); + case LaunchconfigurationPackage.INITIALIZATION_METHOD_PARAMETER: return createInitializationMethodParameter(); + 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 LaunchconfigurationPackage.ISERIALIZABLE: + return createISerializableFromString(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 LaunchconfigurationPackage.ISERIALIZABLE: + return convertISerializableToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public LaunchConfiguration createLaunchConfiguration() { + LaunchConfigurationImpl launchConfiguration = new LaunchConfigurationImpl(); + return launchConfiguration; + } + + /** + * + * + * @generated + */ + public LanguageNameParameter createLanguageNameParameter() { + LanguageNameParameterImpl languageNameParameter = new LanguageNameParameterImpl(); + return languageNameParameter; + } + + /** + * + * + * @generated + */ + public AddonExtensionParameter createAddonExtensionParameter() { + AddonExtensionParameterImpl addonExtensionParameter = new AddonExtensionParameterImpl(); + return addonExtensionParameter; + } + + /** + * + * + * @generated + */ + public ModelURIParameter createModelURIParameter() { + ModelURIParameterImpl modelURIParameter = new ModelURIParameterImpl(); + return modelURIParameter; + } + + /** + * + * + * @generated + */ + public AnimatorURIParameter createAnimatorURIParameter() { + AnimatorURIParameterImpl animatorURIParameter = new AnimatorURIParameterImpl(); + return animatorURIParameter; + } + + /** + * + * + * @generated + */ + public EntryPointParameter createEntryPointParameter() { + EntryPointParameterImpl entryPointParameter = new EntryPointParameterImpl(); + return entryPointParameter; + } + + /** + * + * + * @generated + */ + public InitializationArgumentsParameter createInitializationArgumentsParameter() { + InitializationArgumentsParameterImpl initializationArgumentsParameter = new InitializationArgumentsParameterImpl(); + return initializationArgumentsParameter; + } + + /** + * + * + * @generated + */ + public ModelRootParameter createModelRootParameter() { + ModelRootParameterImpl modelRootParameter = new ModelRootParameterImpl(); + return modelRootParameter; + } + + /** + * + * + * @generated + */ + public InitializationMethodParameter createInitializationMethodParameter() { + InitializationMethodParameterImpl initializationMethodParameter = new InitializationMethodParameterImpl(); + return initializationMethodParameter; + } + + /** + * + * + * @generated + */ + public byte[] createISerializableFromString(EDataType eDataType, String initialValue) { + return (byte[])super.createFromString(initialValue); + } + + /** + * + * + * @generated + */ + public String convertISerializableToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(instanceValue); + } + + /** + * + * + * @generated + */ + public LaunchconfigurationPackage getLaunchconfigurationPackage() { + return (LaunchconfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static LaunchconfigurationPackage getPackage() { + return LaunchconfigurationPackage.eINSTANCE; + } + +} //LaunchconfigurationFactoryImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchconfigurationPackageImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchconfigurationPackageImpl.java new file mode 100644 index 000000000..65751a4da --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/LaunchconfigurationPackageImpl.java @@ -0,0 +1,430 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.AddonExtensionParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.AnimatorURIParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.EntryPointParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationArgumentsParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationMethodParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LanguageNameParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationFactory; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelRootParameter; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelURIParameter; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class LaunchconfigurationPackageImpl extends EPackageImpl implements LaunchconfigurationPackage { + /** + * + * + * @generated + */ + private EClass launchConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass launchConfigurationParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass languageNameParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass addonExtensionParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass modelURIParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass animatorURIParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass entryPointParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass initializationArgumentsParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass modelRootParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass initializationMethodParameterEClass = null; + + /** + * + * + * @generated + */ + private EDataType iSerializableEDataType = 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.trace.commons.model.launchconfiguration.LaunchconfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private LaunchconfigurationPackageImpl() { + super(eNS_URI, LaunchconfigurationFactory.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 LaunchconfigurationPackage#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 LaunchconfigurationPackage init() { + if (isInited) return (LaunchconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(LaunchconfigurationPackage.eNS_URI); + + // Obtain or create and register package + LaunchconfigurationPackageImpl theLaunchconfigurationPackage = (LaunchconfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof LaunchconfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new LaunchconfigurationPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theLaunchconfigurationPackage.createPackageContents(); + + // Initialize created meta-data + theLaunchconfigurationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theLaunchconfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(LaunchconfigurationPackage.eNS_URI, theLaunchconfigurationPackage); + return theLaunchconfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getLaunchConfiguration() { + return launchConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getLaunchConfiguration_Parameters() { + return (EReference)launchConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLaunchConfiguration_Type() { + return (EAttribute)launchConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getLaunchConfigurationParameter() { + return launchConfigurationParameterEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLaunchConfigurationParameter_Value() { + return (EAttribute)launchConfigurationParameterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLanguageNameParameter() { + return languageNameParameterEClass; + } + + /** + * + * + * @generated + */ + public EClass getAddonExtensionParameter() { + return addonExtensionParameterEClass; + } + + /** + * + * + * @generated + */ + public EClass getModelURIParameter() { + return modelURIParameterEClass; + } + + /** + * + * + * @generated + */ + public EClass getAnimatorURIParameter() { + return animatorURIParameterEClass; + } + + /** + * + * + * @generated + */ + public EClass getEntryPointParameter() { + return entryPointParameterEClass; + } + + /** + * + * + * @generated + */ + public EClass getInitializationArgumentsParameter() { + return initializationArgumentsParameterEClass; + } + + /** + * + * + * @generated + */ + public EClass getModelRootParameter() { + return modelRootParameterEClass; + } + + /** + * + * + * @generated + */ + public EClass getInitializationMethodParameter() { + return initializationMethodParameterEClass; + } + + /** + * + * + * @generated + */ + public EDataType getISerializable() { + return iSerializableEDataType; + } + + /** + * + * + * @generated + */ + public LaunchconfigurationFactory getLaunchconfigurationFactory() { + return (LaunchconfigurationFactory)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 + launchConfigurationEClass = createEClass(LAUNCH_CONFIGURATION); + createEReference(launchConfigurationEClass, LAUNCH_CONFIGURATION__PARAMETERS); + createEAttribute(launchConfigurationEClass, LAUNCH_CONFIGURATION__TYPE); + + launchConfigurationParameterEClass = createEClass(LAUNCH_CONFIGURATION_PARAMETER); + createEAttribute(launchConfigurationParameterEClass, LAUNCH_CONFIGURATION_PARAMETER__VALUE); + + languageNameParameterEClass = createEClass(LANGUAGE_NAME_PARAMETER); + + addonExtensionParameterEClass = createEClass(ADDON_EXTENSION_PARAMETER); + + modelURIParameterEClass = createEClass(MODEL_URI_PARAMETER); + + animatorURIParameterEClass = createEClass(ANIMATOR_URI_PARAMETER); + + entryPointParameterEClass = createEClass(ENTRY_POINT_PARAMETER); + + initializationArgumentsParameterEClass = createEClass(INITIALIZATION_ARGUMENTS_PARAMETER); + + modelRootParameterEClass = createEClass(MODEL_ROOT_PARAMETER); + + initializationMethodParameterEClass = createEClass(INITIALIZATION_METHOD_PARAMETER); + + // Create data types + iSerializableEDataType = createEDataType(ISERIALIZABLE); + } + + /** + * + * + * @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); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + languageNameParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); + addonExtensionParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); + modelURIParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); + animatorURIParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); + entryPointParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); + initializationArgumentsParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); + modelRootParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); + initializationMethodParameterEClass.getESuperTypes().add(this.getLaunchConfigurationParameter()); + + // Initialize classes, features, and operations; add parameters + initEClass(launchConfigurationEClass, LaunchConfiguration.class, "LaunchConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getLaunchConfiguration_Parameters(), this.getLaunchConfigurationParameter(), null, "parameters", null, 0, -1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLaunchConfiguration_Type(), ecorePackage.getEString(), "type", null, 1, 1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(launchConfigurationParameterEClass, LaunchConfigurationParameter.class, "LaunchConfigurationParameter", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLaunchConfigurationParameter_Value(), ecorePackage.getEString(), "value", "", 0, 1, LaunchConfigurationParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(languageNameParameterEClass, LanguageNameParameter.class, "LanguageNameParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(addonExtensionParameterEClass, AddonExtensionParameter.class, "AddonExtensionParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(modelURIParameterEClass, ModelURIParameter.class, "ModelURIParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(animatorURIParameterEClass, AnimatorURIParameter.class, "AnimatorURIParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(entryPointParameterEClass, EntryPointParameter.class, "EntryPointParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(initializationArgumentsParameterEClass, InitializationArgumentsParameter.class, "InitializationArgumentsParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(modelRootParameterEClass, ModelRootParameter.class, "ModelRootParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(initializationMethodParameterEClass, InitializationMethodParameter.class, "InitializationMethodParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Initialize data types + initEDataType(iSerializableEDataType, byte[].class, "ISerializable", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //LaunchconfigurationPackageImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/ModelRootParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/ModelRootParameterImpl.java new file mode 100644 index 000000000..39e722f4a --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/ModelRootParameterImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelRootParameter; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Model Root Parameter'. + * + * + * @generated + */ +public class ModelRootParameterImpl extends LaunchConfigurationParameterImpl implements ModelRootParameter { + /** + * + * + * @generated + */ + protected ModelRootParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.MODEL_ROOT_PARAMETER; + } + +} //ModelRootParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/ModelURIParameterImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/ModelURIParameterImpl.java new file mode 100644 index 000000000..83415df64 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/impl/ModelURIParameterImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelURIParameter; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Model URI Parameter'. + * + * + * @generated + */ +public class ModelURIParameterImpl extends LaunchConfigurationParameterImpl implements ModelURIParameter { + /** + * + * + * @generated + */ + protected ModelURIParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LaunchconfigurationPackage.Literals.MODEL_URI_PARAMETER; + } + +} //ModelURIParameterImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/util/LaunchconfigurationAdapterFactory.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/util/LaunchconfigurationAdapterFactory.java new file mode 100644 index 000000000..a48f40e8e --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/util/LaunchconfigurationAdapterFactory.java @@ -0,0 +1,292 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.util; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.*; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage + * @generated + */ +public class LaunchconfigurationAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static LaunchconfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public LaunchconfigurationAdapterFactory() { + if (modelPackage == null) { + modelPackage = LaunchconfigurationPackage.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 LaunchconfigurationSwitch modelSwitch = + new LaunchconfigurationSwitch() { + @Override + public Adapter caseLaunchConfiguration(LaunchConfiguration object) { + return createLaunchConfigurationAdapter(); + } + @Override + public Adapter caseLaunchConfigurationParameter(LaunchConfigurationParameter object) { + return createLaunchConfigurationParameterAdapter(); + } + @Override + public Adapter caseLanguageNameParameter(LanguageNameParameter object) { + return createLanguageNameParameterAdapter(); + } + @Override + public Adapter caseAddonExtensionParameter(AddonExtensionParameter object) { + return createAddonExtensionParameterAdapter(); + } + @Override + public Adapter caseModelURIParameter(ModelURIParameter object) { + return createModelURIParameterAdapter(); + } + @Override + public Adapter caseAnimatorURIParameter(AnimatorURIParameter object) { + return createAnimatorURIParameterAdapter(); + } + @Override + public Adapter caseEntryPointParameter(EntryPointParameter object) { + return createEntryPointParameterAdapter(); + } + @Override + public Adapter caseInitializationArgumentsParameter(InitializationArgumentsParameter object) { + return createInitializationArgumentsParameterAdapter(); + } + @Override + public Adapter caseModelRootParameter(ModelRootParameter object) { + return createModelRootParameterAdapter(); + } + @Override + public Adapter caseInitializationMethodParameter(InitializationMethodParameter object) { + return createInitializationMethodParameterAdapter(); + } + @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.trace.commons.model.launchconfiguration.LaunchConfiguration Launch Configuration}'. + * + * 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.trace.commons.model.launchconfiguration.LaunchConfiguration + * @generated + */ + public Adapter createLaunchConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfigurationParameter Launch Configuration Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.LaunchConfigurationParameter + * @generated + */ + public Adapter createLaunchConfigurationParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.LanguageNameParameter Language Name Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.LanguageNameParameter + * @generated + */ + public Adapter createLanguageNameParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.AddonExtensionParameter Addon Extension Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.AddonExtensionParameter + * @generated + */ + public Adapter createAddonExtensionParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelURIParameter Model URI Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.ModelURIParameter + * @generated + */ + public Adapter createModelURIParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.AnimatorURIParameter Animator URI Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.AnimatorURIParameter + * @generated + */ + public Adapter createAnimatorURIParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.EntryPointParameter Entry Point Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.EntryPointParameter + * @generated + */ + public Adapter createEntryPointParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationArgumentsParameter Initialization Arguments Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.InitializationArgumentsParameter + * @generated + */ + public Adapter createInitializationArgumentsParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.ModelRootParameter Model Root Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.ModelRootParameter + * @generated + */ + public Adapter createModelRootParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.launchconfiguration.InitializationMethodParameter Initialization Method Parameter}'. + * + * 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.trace.commons.model.launchconfiguration.InitializationMethodParameter + * @generated + */ + public Adapter createInitializationMethodParameterAdapter() { + 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; + } + +} //LaunchconfigurationAdapterFactory diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/util/LaunchconfigurationSwitch.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/util/LaunchconfigurationSwitch.java new file mode 100644 index 000000000..1d3c437d0 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/launchconfiguration/util/LaunchconfigurationSwitch.java @@ -0,0 +1,317 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.launchconfiguration.util; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * 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.trace.commons.model.launchconfiguration.LaunchconfigurationPackage + * @generated + */ +public class LaunchconfigurationSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static LaunchconfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public LaunchconfigurationSwitch() { + if (modelPackage == null) { + modelPackage = LaunchconfigurationPackage.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 LaunchconfigurationPackage.LAUNCH_CONFIGURATION: { + LaunchConfiguration launchConfiguration = (LaunchConfiguration)theEObject; + T result = caseLaunchConfiguration(launchConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.LAUNCH_CONFIGURATION_PARAMETER: { + LaunchConfigurationParameter launchConfigurationParameter = (LaunchConfigurationParameter)theEObject; + T result = caseLaunchConfigurationParameter(launchConfigurationParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.LANGUAGE_NAME_PARAMETER: { + LanguageNameParameter languageNameParameter = (LanguageNameParameter)theEObject; + T result = caseLanguageNameParameter(languageNameParameter); + if (result == null) result = caseLaunchConfigurationParameter(languageNameParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.ADDON_EXTENSION_PARAMETER: { + AddonExtensionParameter addonExtensionParameter = (AddonExtensionParameter)theEObject; + T result = caseAddonExtensionParameter(addonExtensionParameter); + if (result == null) result = caseLaunchConfigurationParameter(addonExtensionParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.MODEL_URI_PARAMETER: { + ModelURIParameter modelURIParameter = (ModelURIParameter)theEObject; + T result = caseModelURIParameter(modelURIParameter); + if (result == null) result = caseLaunchConfigurationParameter(modelURIParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.ANIMATOR_URI_PARAMETER: { + AnimatorURIParameter animatorURIParameter = (AnimatorURIParameter)theEObject; + T result = caseAnimatorURIParameter(animatorURIParameter); + if (result == null) result = caseLaunchConfigurationParameter(animatorURIParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.ENTRY_POINT_PARAMETER: { + EntryPointParameter entryPointParameter = (EntryPointParameter)theEObject; + T result = caseEntryPointParameter(entryPointParameter); + if (result == null) result = caseLaunchConfigurationParameter(entryPointParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.INITIALIZATION_ARGUMENTS_PARAMETER: { + InitializationArgumentsParameter initializationArgumentsParameter = (InitializationArgumentsParameter)theEObject; + T result = caseInitializationArgumentsParameter(initializationArgumentsParameter); + if (result == null) result = caseLaunchConfigurationParameter(initializationArgumentsParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.MODEL_ROOT_PARAMETER: { + ModelRootParameter modelRootParameter = (ModelRootParameter)theEObject; + T result = caseModelRootParameter(modelRootParameter); + if (result == null) result = caseLaunchConfigurationParameter(modelRootParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LaunchconfigurationPackage.INITIALIZATION_METHOD_PARAMETER: { + InitializationMethodParameter initializationMethodParameter = (InitializationMethodParameter)theEObject; + T result = caseInitializationMethodParameter(initializationMethodParameter); + if (result == null) result = caseLaunchConfigurationParameter(initializationMethodParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Launch Configuration'. + * + * 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 'Launch Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLaunchConfiguration(LaunchConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Launch Configuration Parameter'. + * + * 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 'Launch Configuration Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLaunchConfigurationParameter(LaunchConfigurationParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Language Name Parameter'. + * + * 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 'Language Name Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLanguageNameParameter(LanguageNameParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Addon Extension Parameter'. + * + * 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 'Addon Extension Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAddonExtensionParameter(AddonExtensionParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Model URI Parameter'. + * + * 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 'Model URI Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModelURIParameter(ModelURIParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Animator URI Parameter'. + * + * 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 'Animator URI Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAnimatorURIParameter(AnimatorURIParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Entry Point Parameter'. + * + * 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 'Entry Point Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEntryPointParameter(EntryPointParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Initialization Arguments Parameter'. + * + * 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 'Initialization Arguments Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInitializationArgumentsParameter(InitializationArgumentsParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Model Root Parameter'. + * + * 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 'Model Root Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModelRootParameter(ModelRootParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Initialization Method Parameter'. + * + * 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 'Initialization Method Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInitializationMethodParameter(InitializationMethodParameter 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; + } + +} //LaunchconfigurationSwitch diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/BigStep.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/BigStep.java new file mode 100644 index 000000000..3fe06672b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/BigStep.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Big Step'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.BigStep#getSubSteps Sub Steps}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getBigStep() + * @model abstract="true" + * @generated + */ +public interface BigStep, StateSubType extends State> extends Step { + /** + * Returns the value of the 'Sub Steps' containment reference list. + * + *

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

+ * + * @return the value of the 'Sub Steps' containment reference list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getBigStep_SubSteps() + * @model containment="true" + * @generated + */ + EList getSubSteps(); + +} // BigStep diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Dimension.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Dimension.java new file mode 100644 index 000000000..b86668cba --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Dimension.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Dimension'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Dimension#getValues Values}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getDimension() + * @model abstract="true" + * @generated + */ +public interface Dimension> extends EObject { + /** + * Returns the value of the 'Values' containment reference list. + * + *

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

+ * + * @return the value of the 'Values' containment reference list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getDimension_Values() + * @model containment="true" + * @generated + */ + EList getValues(); + +} // Dimension diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/GenericMSE.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/GenericMSE.java new file mode 100644 index 000000000..23b31c7ec --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/GenericMSE.java @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; + +/** + * + * A representation of the model object 'Generic MSE'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getCallerReference Caller Reference}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getActionReference Action Reference}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getGenericMSE() + * @model + * @generated + */ +public interface GenericMSE extends MSE { + /** + * Returns the value of the 'Caller Reference' reference. + * + *

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

+ * + * @return the value of the 'Caller Reference' reference. + * @see #setCallerReference(EObject) + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getGenericMSE_CallerReference() + * @model + * @generated + */ + EObject getCallerReference(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getCallerReference Caller Reference}' reference. + * + * + * @param value the new value of the 'Caller Reference' reference. + * @see #getCallerReference() + * @generated + */ + void setCallerReference(EObject value); + + /** + * Returns the value of the 'Action Reference' reference. + * + *

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

+ * + * @return the value of the 'Action Reference' reference. + * @see #setActionReference(EOperation) + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getGenericMSE_ActionReference() + * @model + * @generated + */ + EOperation getActionReference(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getActionReference Action Reference}' reference. + * + * + * @param value the new value of the 'Action Reference' reference. + * @see #getActionReference() + * @generated + */ + void setActionReference(EOperation value); + + /** + * + * + * @model kind="operation" + * annotation="http://www.eclipse.org/emf/2002/GenModel body='return callerReference;'" + * @generated + */ + EObject getCaller(); + + /** + * + * + * @model kind="operation" + * annotation="http://www.eclipse.org/emf/2002/GenModel body='return actionReference;'" + * @generated + */ + EOperation getAction(); + +} // GenericMSE diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSE.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSE.java new file mode 100644 index 000000000..f4a48908e --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSE.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; + +/** + * + * A representation of the model object 'MSE'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getMSE() + * @model abstract="true" + * @generated + */ +public interface MSE extends ENamedElement { + /** + * + * + * @model kind="operation" + * @generated + */ + EObject getCaller(); + + /** + * + * + * @model kind="operation" + * @generated + */ + EOperation getAction(); + +} // MSE diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSEModel.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSEModel.java new file mode 100644 index 000000000..dacfe62c2 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSEModel.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'MSE Model'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.MSEModel#getOwnedMSEs Owned MS Es}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getMSEModel() + * @model + * @generated + */ +public interface MSEModel extends EObject { + /** + * Returns the value of the 'Owned MS Es' containment reference list. + * The list contents are of type {@link org.eclipse.gemoc.trace.commons.model.trace.MSE}. + * + *

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

+ * + * @return the value of the 'Owned MS Es' containment reference list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getMSEModel_OwnedMSEs() + * @model containment="true" + * @generated + */ + EList getOwnedMSEs(); + +} // MSEModel diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSEOccurrence.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSEOccurrence.java new file mode 100644 index 000000000..bf8213b94 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/MSEOccurrence.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'MSE Occurrence'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getMse Mse}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getParameters Parameters}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getResult Result}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getMSEOccurrence() + * @model + * @generated + */ +public interface MSEOccurrence extends EObject { + /** + * Returns the value of the 'Mse' reference. + * + *

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

+ * + * @return the value of the 'Mse' reference. + * @see #setMse(MSE) + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getMSEOccurrence_Mse() + * @model required="true" + * @generated + */ + MSE getMse(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getMse Mse}' reference. + * + * + * @param value the new value of the 'Mse' reference. + * @see #getMse() + * @generated + */ + void setMse(MSE value); + + /** + * Returns the value of the 'Parameters' attribute list. + * The list contents are of type {@link java.lang.Object}. + * + *

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

+ * + * @return the value of the 'Parameters' attribute list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getMSEOccurrence_Parameters() + * @model + * @generated + */ + EList getParameters(); + + /** + * Returns the value of the 'Result' attribute list. + * The list contents are of type {@link java.lang.Object}. + * + *

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

+ * + * @return the value of the 'Result' attribute list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getMSEOccurrence_Result() + * @model + * @generated + */ + EList getResult(); + +} // MSEOccurrence diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/ParallelStep.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/ParallelStep.java new file mode 100644 index 000000000..228e4147a --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/ParallelStep.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + + +/** + * + * A representation of the model object 'Parallel Step'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getParallelStep() + * @model abstract="true" + * @generated + */ +public interface ParallelStep, StateSubType extends State> extends BigStep { +} // ParallelStep diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/SequentialStep.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/SequentialStep.java new file mode 100644 index 000000000..91cb1825a --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/SequentialStep.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + + +/** + * + * A representation of the model object 'Sequential Step'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getSequentialStep() + * @model abstract="true" + * @generated + */ +public interface SequentialStep, StateSubType extends State> extends BigStep { +} // SequentialStep diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/SmallStep.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/SmallStep.java new file mode 100644 index 000000000..292e477e5 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/SmallStep.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + + +/** + * + * A representation of the model object 'Small Step'. + * + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getSmallStep() + * @model abstract="true" + * @generated + */ +public interface SmallStep> extends Step { +} // SmallStep 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 new file mode 100644 index 000000000..9e2d5222f --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/State.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'State'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.State#getStartedSteps Started Steps}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.State#getEndedSteps Ended Steps}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.State#getValues Values}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getState() + * @model abstract="true" + * @generated + */ +public interface State, ValueSubType extends Value> extends EObject { + /** + * Returns the value of the 'Started Steps' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.trace.commons.model.trace.Step#getStartingState Starting State}'. + * + *

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

+ * + * @return the value of the 'Started Steps' reference list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getState_StartedSteps() + * @see org.eclipse.gemoc.trace.commons.model.trace.Step#getStartingState + * @model opposite="startingState" + * @generated + */ + EList getStartedSteps(); + + /** + * Returns the value of the 'Ended Steps' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.trace.commons.model.trace.Step#getEndingState Ending State}'. + * + *

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

+ * + * @return the value of the 'Ended Steps' reference list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getState_EndedSteps() + * @see org.eclipse.gemoc.trace.commons.model.trace.Step#getEndingState + * @model opposite="endingState" + * @generated + */ + EList getEndedSteps(); + + /** + * Returns the value of the 'Values' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.trace.commons.model.trace.Value#getStates States}'. + * + *

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

+ * + * @return the value of the 'Values' 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" + * @generated + */ + EList getValues(); + +} // State diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Step.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Step.java new file mode 100644 index 000000000..77ef443e1 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Step.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Step'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Step#getMseoccurrence Mseoccurrence}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Step#getStartingState Starting State}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Step#getEndingState Ending State}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getStep() + * @model abstract="true" + * @generated + */ +public interface Step> extends EObject { + /** + * Returns the value of the 'Mseoccurrence' containment reference. + * + *

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

+ * + * @return the value of the 'Mseoccurrence' containment reference. + * @see #setMseoccurrence(MSEOccurrence) + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getStep_Mseoccurrence() + * @model containment="true" + * @generated + */ + MSEOccurrence getMseoccurrence(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.trace.Step#getMseoccurrence Mseoccurrence}' containment reference. + * + * + * @param value the new value of the 'Mseoccurrence' containment reference. + * @see #getMseoccurrence() + * @generated + */ + void setMseoccurrence(MSEOccurrence value); + + /** + * Returns the value of the 'Starting State' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.trace.commons.model.trace.State#getStartedSteps Started Steps}'. + * + *

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

+ * + * @return the value of the 'Starting State' reference. + * @see #setStartingState(State) + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getStep_StartingState() + * @see org.eclipse.gemoc.trace.commons.model.trace.State#getStartedSteps + * @model opposite="startedSteps" required="true" + * @generated + */ + StateSubType getStartingState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.trace.Step#getStartingState Starting State}' reference. + * + * + * @param value the new value of the 'Starting State' reference. + * @see #getStartingState() + * @generated + */ + void setStartingState(StateSubType value); + + /** + * Returns the value of the 'Ending State' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.trace.commons.model.trace.State#getEndedSteps Ended Steps}'. + * + *

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

+ * + * @return the value of the 'Ending State' reference. + * @see #setEndingState(State) + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getStep_EndingState() + * @see org.eclipse.gemoc.trace.commons.model.trace.State#getEndedSteps + * @model opposite="endedSteps" + * @generated + */ + StateSubType getEndingState(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.trace.Step#getEndingState Ending State}' reference. + * + * + * @param value the new value of the 'Ending State' reference. + * @see #getEndingState() + * @generated + */ + void setEndingState(StateSubType value); + +} // Step 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 new file mode 100644 index 000000000..f4fda9321 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Trace.java @@ -0,0 +1,123 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Trace'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getRootStep Root Step}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getTracedObjects Traced Objects}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getStates States}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getLaunchconfiguration Launchconfiguration}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getTrace() + * @model abstract="true" + * @generated + */ +public interface Trace, TracedObjectSubtype extends TracedObject, StateSubType extends State> extends EObject { + /** + * Returns the value of the 'Root Step' containment reference. + * + *

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

+ * + * @return the value of the 'Root Step' containment reference. + * @see #setRootStep(Step) + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getTrace_RootStep() + * @model containment="true" required="true" + * @generated + */ + StepSubType getRootStep(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getRootStep Root Step}' containment reference. + * + * + * @param value the new value of the 'Root Step' containment reference. + * @see #getRootStep() + * @generated + */ + void setRootStep(StepSubType value); + + /** + * Returns the value of the 'Traced Objects' containment reference list. + * + *

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

+ * + * @return the value of the 'Traced Objects' containment reference list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getTrace_TracedObjects() + * @model containment="true" + * @generated + */ + EList getTracedObjects(); + + /** + * 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.trace.commons.model.trace.TracePackage#getTrace_States() + * @model containment="true" + * @generated + */ + EList getStates(); + + /** + * Returns the value of the 'Launchconfiguration' containment reference. + * + *

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

+ * + * @return the value of the 'Launchconfiguration' containment reference. + * @see #setLaunchconfiguration(LaunchConfiguration) + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getTrace_Launchconfiguration() + * @model containment="true" required="true" + * @generated + */ + LaunchConfiguration getLaunchconfiguration(); + + /** + * Sets the value of the '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getLaunchconfiguration Launchconfiguration}' containment reference. + * + * + * @param value the new value of the 'Launchconfiguration' containment reference. + * @see #getLaunchconfiguration() + * @generated + */ + void setLaunchconfiguration(LaunchConfiguration value); + +} // Trace diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TraceFactory.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TraceFactory.java new file mode 100644 index 000000000..ec82b81ab --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TraceFactory.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +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.trace.commons.model.trace.TracePackage + * @generated + */ +public interface TraceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + TraceFactory eINSTANCE = org.eclipse.gemoc.trace.commons.model.trace.impl.TraceFactoryImpl.init(); + + /** + * Returns a new object of class 'MSE Occurrence'. + * + * + * @return a new object of class 'MSE Occurrence'. + * @generated + */ + MSEOccurrence createMSEOccurrence(); + + /** + * Returns a new object of class 'MSE Model'. + * + * + * @return a new object of class 'MSE Model'. + * @generated + */ + MSEModel createMSEModel(); + + /** + * Returns a new object of class 'Generic MSE'. + * + * + * @return a new object of class 'Generic MSE'. + * @generated + */ + GenericMSE createGenericMSE(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + TracePackage getTracePackage(); + +} //TraceFactory diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TracePackage.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TracePackage.java new file mode 100644 index 000000000..aba21ddf1 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TracePackage.java @@ -0,0 +1,1673 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +/** + * + * 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.trace.commons.model.trace.TraceFactory + * @model kind="package" + * @generated + */ +public interface TracePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "trace"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.gemoc.org/generic_trace"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "trace"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + TracePackage eINSTANCE = org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEOccurrenceImpl MSE Occurrence}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.MSEOccurrenceImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getMSEOccurrence() + * @generated + */ + int MSE_OCCURRENCE = 0; + + /** + * The feature id for the 'Mse' reference. + * + * + * @generated + * @ordered + */ + int MSE_OCCURRENCE__MSE = 0; + + /** + * The feature id for the 'Parameters' attribute list. + * + * + * @generated + * @ordered + */ + int MSE_OCCURRENCE__PARAMETERS = 1; + + /** + * The feature id for the 'Result' attribute list. + * + * + * @generated + * @ordered + */ + int MSE_OCCURRENCE__RESULT = 2; + + /** + * The number of structural features of the 'MSE Occurrence' class. + * + * + * @generated + * @ordered + */ + int MSE_OCCURRENCE_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'MSE Occurrence' class. + * + * + * @generated + * @ordered + */ + int MSE_OCCURRENCE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEImpl MSE}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.MSEImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getMSE() + * @generated + */ + int MSE = 1; + + /** + * The feature id for the 'EAnnotations' containment reference list. + * + * + * @generated + * @ordered + */ + int MSE__EANNOTATIONS = EcorePackage.ENAMED_ELEMENT__EANNOTATIONS; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MSE__NAME = EcorePackage.ENAMED_ELEMENT__NAME; + + /** + * The number of structural features of the 'MSE' class. + * + * + * @generated + * @ordered + */ + int MSE_FEATURE_COUNT = EcorePackage.ENAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Get EAnnotation' operation. + * + * + * @generated + * @ordered + */ + int MSE___GET_EANNOTATION__STRING = EcorePackage.ENAMED_ELEMENT___GET_EANNOTATION__STRING; + + /** + * The operation id for the 'Get Caller' operation. + * + * + * @generated + * @ordered + */ + int MSE___GET_CALLER = EcorePackage.ENAMED_ELEMENT_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Get Action' operation. + * + * + * @generated + * @ordered + */ + int MSE___GET_ACTION = EcorePackage.ENAMED_ELEMENT_OPERATION_COUNT + 1; + + /** + * The number of operations of the 'MSE' class. + * + * + * @generated + * @ordered + */ + int MSE_OPERATION_COUNT = EcorePackage.ENAMED_ELEMENT_OPERATION_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEModelImpl MSE Model}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.MSEModelImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getMSEModel() + * @generated + */ + int MSE_MODEL = 2; + + /** + * The feature id for the 'Owned MS Es' containment reference list. + * + * + * @generated + * @ordered + */ + int MSE_MODEL__OWNED_MS_ES = 0; + + /** + * The number of structural features of the 'MSE Model' class. + * + * + * @generated + * @ordered + */ + int MSE_MODEL_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'MSE Model' class. + * + * + * @generated + * @ordered + */ + int MSE_MODEL_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.GenericMSEImpl Generic MSE}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.GenericMSEImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getGenericMSE() + * @generated + */ + int GENERIC_MSE = 3; + + /** + * The feature id for the 'EAnnotations' containment reference list. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE__EANNOTATIONS = MSE__EANNOTATIONS; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE__NAME = MSE__NAME; + + /** + * The feature id for the 'Caller Reference' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE__CALLER_REFERENCE = MSE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Action Reference' reference. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE__ACTION_REFERENCE = MSE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Generic MSE' class. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE_FEATURE_COUNT = MSE_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Get EAnnotation' operation. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE___GET_EANNOTATION__STRING = MSE___GET_EANNOTATION__STRING; + + /** + * The operation id for the 'Get Caller' operation. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE___GET_CALLER = MSE_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Get Action' operation. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE___GET_ACTION = MSE_OPERATION_COUNT + 1; + + /** + * The number of operations of the 'Generic MSE' class. + * + * + * @generated + * @ordered + */ + int GENERIC_MSE_OPERATION_COUNT = MSE_OPERATION_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getStep() + * @generated + */ + int STEP = 4; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int STEP__MSEOCCURRENCE = 0; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int STEP__STARTING_STATE = 1; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int STEP__ENDING_STATE = 2; + + /** + * The number of structural features of the 'Step' class. + * + * + * @generated + * @ordered + */ + int STEP_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Step' class. + * + * + * @generated + * @ordered + */ + int STEP_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.BigStepImpl Big Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.BigStepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getBigStep() + * @generated + */ + int BIG_STEP = 5; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int BIG_STEP__MSEOCCURRENCE = STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int BIG_STEP__STARTING_STATE = STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int BIG_STEP__ENDING_STATE = STEP__ENDING_STATE; + + /** + * The feature id for the 'Sub Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int BIG_STEP__SUB_STEPS = STEP_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Big Step' class. + * + * + * @generated + * @ordered + */ + int BIG_STEP_FEATURE_COUNT = STEP_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Big Step' class. + * + * + * @generated + * @ordered + */ + int BIG_STEP_OPERATION_COUNT = STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.SmallStepImpl Small Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.SmallStepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getSmallStep() + * @generated + */ + int SMALL_STEP = 6; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int SMALL_STEP__MSEOCCURRENCE = STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int SMALL_STEP__STARTING_STATE = STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int SMALL_STEP__ENDING_STATE = STEP__ENDING_STATE; + + /** + * The number of structural features of the 'Small Step' class. + * + * + * @generated + * @ordered + */ + int SMALL_STEP_FEATURE_COUNT = STEP_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Small Step' class. + * + * + * @generated + * @ordered + */ + int SMALL_STEP_OPERATION_COUNT = STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.SequentialStepImpl Sequential Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.SequentialStepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getSequentialStep() + * @generated + */ + int SEQUENTIAL_STEP = 7; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int SEQUENTIAL_STEP__MSEOCCURRENCE = BIG_STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int SEQUENTIAL_STEP__STARTING_STATE = BIG_STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int SEQUENTIAL_STEP__ENDING_STATE = BIG_STEP__ENDING_STATE; + + /** + * The feature id for the 'Sub Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int SEQUENTIAL_STEP__SUB_STEPS = BIG_STEP__SUB_STEPS; + + /** + * The number of structural features of the 'Sequential Step' class. + * + * + * @generated + * @ordered + */ + int SEQUENTIAL_STEP_FEATURE_COUNT = BIG_STEP_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Sequential Step' class. + * + * + * @generated + * @ordered + */ + int SEQUENTIAL_STEP_OPERATION_COUNT = BIG_STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.ParallelStepImpl Parallel Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.ParallelStepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getParallelStep() + * @generated + */ + int PARALLEL_STEP = 8; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int PARALLEL_STEP__MSEOCCURRENCE = BIG_STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int PARALLEL_STEP__STARTING_STATE = BIG_STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int PARALLEL_STEP__ENDING_STATE = BIG_STEP__ENDING_STATE; + + /** + * The feature id for the 'Sub Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int PARALLEL_STEP__SUB_STEPS = BIG_STEP__SUB_STEPS; + + /** + * The number of structural features of the 'Parallel Step' class. + * + * + * @generated + * @ordered + */ + int PARALLEL_STEP_FEATURE_COUNT = BIG_STEP_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Parallel Step' class. + * + * + * @generated + * @ordered + */ + int PARALLEL_STEP_OPERATION_COUNT = BIG_STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl Trace}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getTrace() + * @generated + */ + int TRACE = 9; + + /** + * The feature id for the 'Root Step' containment reference. + * + * + * @generated + * @ordered + */ + int TRACE__ROOT_STEP = 0; + + /** + * The feature id for the 'Traced Objects' containment reference list. + * + * + * @generated + * @ordered + */ + int TRACE__TRACED_OBJECTS = 1; + + /** + * The feature id for the 'States' containment reference list. + * + * + * @generated + * @ordered + */ + int TRACE__STATES = 2; + + /** + * The feature id for the 'Launchconfiguration' containment reference. + * + * + * @generated + * @ordered + */ + int TRACE__LAUNCHCONFIGURATION = 3; + + /** + * The number of structural features of the 'Trace' class. + * + * + * @generated + * @ordered + */ + int TRACE_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Trace' class. + * + * + * @generated + * @ordered + */ + int TRACE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.TracedObjectImpl Traced Object}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracedObjectImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getTracedObject() + * @generated + */ + int TRACED_OBJECT = 10; + + /** + * The feature id for the 'Dimensions' reference list. + * + * + * @generated + * @ordered + */ + int TRACED_OBJECT__DIMENSIONS = 0; + + /** + * The number of structural features of the 'Traced Object' class. + * + * + * @generated + * @ordered + */ + int TRACED_OBJECT_FEATURE_COUNT = 1; + + /** + * The operation id for the 'Get Dimensions Internal' operation. + * + * + * @generated + * @ordered + */ + int TRACED_OBJECT___GET_DIMENSIONS_INTERNAL = 0; + + /** + * The number of operations of the 'Traced Object' class. + * + * + * @generated + * @ordered + */ + int TRACED_OBJECT_OPERATION_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.DimensionImpl Dimension}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.DimensionImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getDimension() + * @generated + */ + int DIMENSION = 11; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int DIMENSION__VALUES = 0; + + /** + * The number of structural features of the 'Dimension' class. + * + * + * @generated + * @ordered + */ + int DIMENSION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Dimension' class. + * + * + * @generated + * @ordered + */ + int DIMENSION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.ValueImpl Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.ValueImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getValue() + * @generated + */ + int VALUE = 12; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int VALUE__STATES = 0; + + /** + * The number of structural features of the 'Value' class. + * + * + * @generated + * @ordered + */ + int VALUE_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Value' class. + * + * + * @generated + * @ordered + */ + int VALUE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl State}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getState() + * @generated + */ + int STATE = 13; + + /** + * The feature id for the 'Started Steps' reference list. + * + * + * @generated + * @ordered + */ + int STATE__STARTED_STEPS = 0; + + /** + * The feature id for the 'Ended Steps' reference list. + * + * + * @generated + * @ordered + */ + int STATE__ENDED_STEPS = 1; + + /** + * The feature id for the 'Values' reference list. + * + * + * @generated + * @ordered + */ + int STATE__VALUES = 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 'ISerializable' data type. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getISerializable() + * @generated + */ + int ISERIALIZABLE = 14; + + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence MSE Occurrence}'. + * + * + * @return the meta object for class 'MSE Occurrence'. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence + * @generated + */ + EClass getMSEOccurrence(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getMse Mse}'. + * + * + * @return the meta object for the reference 'Mse'. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getMse() + * @see #getMSEOccurrence() + * @generated + */ + EReference getMSEOccurrence_Mse(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getParameters Parameters}'. + * + * + * @return the meta object for the attribute list 'Parameters'. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getParameters() + * @see #getMSEOccurrence() + * @generated + */ + EAttribute getMSEOccurrence_Parameters(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getResult Result}'. + * + * + * @return the meta object for the attribute list 'Result'. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence#getResult() + * @see #getMSEOccurrence() + * @generated + */ + EAttribute getMSEOccurrence_Result(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.MSE MSE}'. + * + * + * @return the meta object for class 'MSE'. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSE + * @generated + */ + EClass getMSE(); + + /** + * Returns the meta object for the '{@link org.eclipse.gemoc.trace.commons.model.trace.MSE#getCaller() Get Caller}' operation. + * + * + * @return the meta object for the 'Get Caller' operation. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSE#getCaller() + * @generated + */ + EOperation getMSE__GetCaller(); + + /** + * Returns the meta object for the '{@link org.eclipse.gemoc.trace.commons.model.trace.MSE#getAction() Get Action}' operation. + * + * + * @return the meta object for the 'Get Action' operation. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSE#getAction() + * @generated + */ + EOperation getMSE__GetAction(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.MSEModel MSE Model}'. + * + * + * @return the meta object for class 'MSE Model'. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSEModel + * @generated + */ + EClass getMSEModel(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.MSEModel#getOwnedMSEs Owned MS Es}'. + * + * + * @return the meta object for the containment reference list 'Owned MS Es'. + * @see org.eclipse.gemoc.trace.commons.model.trace.MSEModel#getOwnedMSEs() + * @see #getMSEModel() + * @generated + */ + EReference getMSEModel_OwnedMSEs(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE Generic MSE}'. + * + * + * @return the meta object for class 'Generic MSE'. + * @see org.eclipse.gemoc.trace.commons.model.trace.GenericMSE + * @generated + */ + EClass getGenericMSE(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getCallerReference Caller Reference}'. + * + * + * @return the meta object for the reference 'Caller Reference'. + * @see org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getCallerReference() + * @see #getGenericMSE() + * @generated + */ + EReference getGenericMSE_CallerReference(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getActionReference Action Reference}'. + * + * + * @return the meta object for the reference 'Action Reference'. + * @see org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getActionReference() + * @see #getGenericMSE() + * @generated + */ + EReference getGenericMSE_ActionReference(); + + /** + * Returns the meta object for the '{@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getCaller() Get Caller}' operation. + * + * + * @return the meta object for the 'Get Caller' operation. + * @see org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getCaller() + * @generated + */ + EOperation getGenericMSE__GetCaller(); + + /** + * Returns the meta object for the '{@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getAction() Get Action}' operation. + * + * + * @return the meta object for the 'Get Action' operation. + * @see org.eclipse.gemoc.trace.commons.model.trace.GenericMSE#getAction() + * @generated + */ + EOperation getGenericMSE__GetAction(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.Step Step}'. + * + * + * @return the meta object for class 'Step'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Step + * @generated + */ + EClass getStep(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.trace.commons.model.trace.Step#getMseoccurrence Mseoccurrence}'. + * + * + * @return the meta object for the containment reference 'Mseoccurrence'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Step#getMseoccurrence() + * @see #getStep() + * @generated + */ + EReference getStep_Mseoccurrence(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.trace.commons.model.trace.Step#getStartingState Starting State}'. + * + * + * @return the meta object for the reference 'Starting State'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Step#getStartingState() + * @see #getStep() + * @generated + */ + EReference getStep_StartingState(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gemoc.trace.commons.model.trace.Step#getEndingState Ending State}'. + * + * + * @return the meta object for the reference 'Ending State'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Step#getEndingState() + * @see #getStep() + * @generated + */ + EReference getStep_EndingState(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.BigStep Big Step}'. + * + * + * @return the meta object for class 'Big Step'. + * @see org.eclipse.gemoc.trace.commons.model.trace.BigStep + * @generated + */ + EClass getBigStep(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.BigStep#getSubSteps Sub Steps}'. + * + * + * @return the meta object for the containment reference list 'Sub Steps'. + * @see org.eclipse.gemoc.trace.commons.model.trace.BigStep#getSubSteps() + * @see #getBigStep() + * @generated + */ + EReference getBigStep_SubSteps(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.SmallStep Small Step}'. + * + * + * @return the meta object for class 'Small Step'. + * @see org.eclipse.gemoc.trace.commons.model.trace.SmallStep + * @generated + */ + EClass getSmallStep(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.SequentialStep Sequential Step}'. + * + * + * @return the meta object for class 'Sequential Step'. + * @see org.eclipse.gemoc.trace.commons.model.trace.SequentialStep + * @generated + */ + EClass getSequentialStep(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.ParallelStep Parallel Step}'. + * + * + * @return the meta object for class 'Parallel Step'. + * @see org.eclipse.gemoc.trace.commons.model.trace.ParallelStep + * @generated + */ + EClass getParallelStep(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace Trace}'. + * + * + * @return the meta object for class 'Trace'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Trace + * @generated + */ + EClass getTrace(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getRootStep Root Step}'. + * + * + * @return the meta object for the containment reference 'Root Step'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Trace#getRootStep() + * @see #getTrace() + * @generated + */ + EReference getTrace_RootStep(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getTracedObjects Traced Objects}'. + * + * + * @return the meta object for the containment reference list 'Traced Objects'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Trace#getTracedObjects() + * @see #getTrace() + * @generated + */ + EReference getTrace_TracedObjects(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getStates States}'. + * + * + * @return the meta object for the containment reference list 'States'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Trace#getStates() + * @see #getTrace() + * @generated + */ + EReference getTrace_States(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace#getLaunchconfiguration Launchconfiguration}'. + * + * + * @return the meta object for the containment reference 'Launchconfiguration'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Trace#getLaunchconfiguration() + * @see #getTrace() + * @generated + */ + EReference getTrace_Launchconfiguration(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.TracedObject Traced Object}'. + * + * + * @return the meta object for class 'Traced Object'. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracedObject + * @generated + */ + EClass getTracedObject(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.TracedObject#getDimensions Dimensions}'. + * + * + * @return the meta object for the reference list 'Dimensions'. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracedObject#getDimensions() + * @see #getTracedObject() + * @generated + */ + EReference getTracedObject_Dimensions(); + + /** + * Returns the meta object for the '{@link org.eclipse.gemoc.trace.commons.model.trace.TracedObject#getDimensionsInternal() Get Dimensions Internal}' operation. + * + * + * @return the meta object for the 'Get Dimensions Internal' operation. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracedObject#getDimensionsInternal() + * @generated + */ + EOperation getTracedObject__GetDimensionsInternal(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.Dimension Dimension}'. + * + * + * @return the meta object for class 'Dimension'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Dimension + * @generated + */ + EClass getDimension(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.Dimension#getValues Values}'. + * + * + * @return the meta object for the containment reference list 'Values'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Dimension#getValues() + * @see #getDimension() + * @generated + */ + EReference getDimension_Values(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.Value Value}'. + * + * + * @return the meta object for class 'Value'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Value + * @generated + */ + EClass getValue(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.Value#getStates States}'. + * + * + * @return the meta object for the reference list 'States'. + * @see org.eclipse.gemoc.trace.commons.model.trace.Value#getStates() + * @see #getValue() + * @generated + */ + EReference getValue_States(); + + /** + * Returns the meta object for class '{@link org.eclipse.gemoc.trace.commons.model.trace.State State}'. + * + * + * @return the meta object for class 'State'. + * @see org.eclipse.gemoc.trace.commons.model.trace.State + * @generated + */ + EClass getState(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.State#getStartedSteps Started Steps}'. + * + * + * @return the meta object for the reference list 'Started Steps'. + * @see org.eclipse.gemoc.trace.commons.model.trace.State#getStartedSteps() + * @see #getState() + * @generated + */ + EReference getState_StartedSteps(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.State#getEndedSteps Ended Steps}'. + * + * + * @return the meta object for the reference list 'Ended Steps'. + * @see org.eclipse.gemoc.trace.commons.model.trace.State#getEndedSteps() + * @see #getState() + * @generated + */ + EReference getState_EndedSteps(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.gemoc.trace.commons.model.trace.State#getValues Values}'. + * + * + * @return the meta object for the reference list 'Values'. + * @see org.eclipse.gemoc.trace.commons.model.trace.State#getValues() + * @see #getState() + * @generated + */ + EReference getState_Values(); + + /** + * Returns the meta object for data type 'ISerializable'. + * + * + * @return the meta object for data type 'ISerializable'. + * @model instanceClass="byte[]" + * @generated + */ + EDataType getISerializable(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + TraceFactory getTraceFactory(); + + /** + * + * 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.trace.commons.model.trace.impl.MSEOccurrenceImpl MSE Occurrence}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.MSEOccurrenceImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getMSEOccurrence() + * @generated + */ + EClass MSE_OCCURRENCE = eINSTANCE.getMSEOccurrence(); + + /** + * The meta object literal for the 'Mse' reference feature. + * + * + * @generated + */ + EReference MSE_OCCURRENCE__MSE = eINSTANCE.getMSEOccurrence_Mse(); + + /** + * The meta object literal for the 'Parameters' attribute list feature. + * + * + * @generated + */ + EAttribute MSE_OCCURRENCE__PARAMETERS = eINSTANCE.getMSEOccurrence_Parameters(); + + /** + * The meta object literal for the 'Result' attribute list feature. + * + * + * @generated + */ + EAttribute MSE_OCCURRENCE__RESULT = eINSTANCE.getMSEOccurrence_Result(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEImpl MSE}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.MSEImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getMSE() + * @generated + */ + EClass MSE = eINSTANCE.getMSE(); + + /** + * The meta object literal for the 'Get Caller' operation. + * + * + * @generated + */ + EOperation MSE___GET_CALLER = eINSTANCE.getMSE__GetCaller(); + + /** + * The meta object literal for the 'Get Action' operation. + * + * + * @generated + */ + EOperation MSE___GET_ACTION = eINSTANCE.getMSE__GetAction(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEModelImpl MSE Model}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.MSEModelImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getMSEModel() + * @generated + */ + EClass MSE_MODEL = eINSTANCE.getMSEModel(); + + /** + * The meta object literal for the 'Owned MS Es' containment reference list feature. + * + * + * @generated + */ + EReference MSE_MODEL__OWNED_MS_ES = eINSTANCE.getMSEModel_OwnedMSEs(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.GenericMSEImpl Generic MSE}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.GenericMSEImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getGenericMSE() + * @generated + */ + EClass GENERIC_MSE = eINSTANCE.getGenericMSE(); + + /** + * The meta object literal for the 'Caller Reference' reference feature. + * + * + * @generated + */ + EReference GENERIC_MSE__CALLER_REFERENCE = eINSTANCE.getGenericMSE_CallerReference(); + + /** + * The meta object literal for the 'Action Reference' reference feature. + * + * + * @generated + */ + EReference GENERIC_MSE__ACTION_REFERENCE = eINSTANCE.getGenericMSE_ActionReference(); + + /** + * The meta object literal for the 'Get Caller' operation. + * + * + * @generated + */ + EOperation GENERIC_MSE___GET_CALLER = eINSTANCE.getGenericMSE__GetCaller(); + + /** + * The meta object literal for the 'Get Action' operation. + * + * + * @generated + */ + EOperation GENERIC_MSE___GET_ACTION = eINSTANCE.getGenericMSE__GetAction(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getStep() + * @generated + */ + EClass STEP = eINSTANCE.getStep(); + + /** + * The meta object literal for the 'Mseoccurrence' containment reference feature. + * + * + * @generated + */ + EReference STEP__MSEOCCURRENCE = eINSTANCE.getStep_Mseoccurrence(); + + /** + * The meta object literal for the 'Starting State' reference feature. + * + * + * @generated + */ + EReference STEP__STARTING_STATE = eINSTANCE.getStep_StartingState(); + + /** + * The meta object literal for the 'Ending State' reference feature. + * + * + * @generated + */ + EReference STEP__ENDING_STATE = eINSTANCE.getStep_EndingState(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.BigStepImpl Big Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.BigStepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getBigStep() + * @generated + */ + EClass BIG_STEP = eINSTANCE.getBigStep(); + + /** + * The meta object literal for the 'Sub Steps' containment reference list feature. + * + * + * @generated + */ + EReference BIG_STEP__SUB_STEPS = eINSTANCE.getBigStep_SubSteps(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.SmallStepImpl Small Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.SmallStepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getSmallStep() + * @generated + */ + EClass SMALL_STEP = eINSTANCE.getSmallStep(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.SequentialStepImpl Sequential Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.SequentialStepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getSequentialStep() + * @generated + */ + EClass SEQUENTIAL_STEP = eINSTANCE.getSequentialStep(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.ParallelStepImpl Parallel Step}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.ParallelStepImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getParallelStep() + * @generated + */ + EClass PARALLEL_STEP = eINSTANCE.getParallelStep(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl Trace}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getTrace() + * @generated + */ + EClass TRACE = eINSTANCE.getTrace(); + + /** + * The meta object literal for the 'Root Step' containment reference feature. + * + * + * @generated + */ + EReference TRACE__ROOT_STEP = eINSTANCE.getTrace_RootStep(); + + /** + * The meta object literal for the 'Traced Objects' containment reference list feature. + * + * + * @generated + */ + EReference TRACE__TRACED_OBJECTS = eINSTANCE.getTrace_TracedObjects(); + + /** + * The meta object literal for the 'States' containment reference list feature. + * + * + * @generated + */ + EReference TRACE__STATES = eINSTANCE.getTrace_States(); + + /** + * The meta object literal for the 'Launchconfiguration' containment reference feature. + * + * + * @generated + */ + EReference TRACE__LAUNCHCONFIGURATION = eINSTANCE.getTrace_Launchconfiguration(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.TracedObjectImpl Traced Object}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracedObjectImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getTracedObject() + * @generated + */ + EClass TRACED_OBJECT = eINSTANCE.getTracedObject(); + + /** + * The meta object literal for the 'Dimensions' reference list feature. + * + * + * @generated + */ + EReference TRACED_OBJECT__DIMENSIONS = eINSTANCE.getTracedObject_Dimensions(); + + /** + * The meta object literal for the 'Get Dimensions Internal' operation. + * + * + * @generated + */ + EOperation TRACED_OBJECT___GET_DIMENSIONS_INTERNAL = eINSTANCE.getTracedObject__GetDimensionsInternal(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.DimensionImpl Dimension}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.DimensionImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getDimension() + * @generated + */ + EClass DIMENSION = eINSTANCE.getDimension(); + + /** + * The meta object literal for the 'Values' containment reference list feature. + * + * + * @generated + */ + EReference DIMENSION__VALUES = eINSTANCE.getDimension_Values(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.ValueImpl Value}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.ValueImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getValue() + * @generated + */ + EClass VALUE = eINSTANCE.getValue(); + + /** + * The meta object literal for the 'States' reference list feature. + * + * + * @generated + */ + EReference VALUE__STATES = eINSTANCE.getValue_States(); + + /** + * The meta object literal for the '{@link org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl State}' class. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getState() + * @generated + */ + EClass STATE = eINSTANCE.getState(); + + /** + * The meta object literal for the 'Started Steps' reference list feature. + * + * + * @generated + */ + EReference STATE__STARTED_STEPS = eINSTANCE.getState_StartedSteps(); + + /** + * The meta object literal for the 'Ended Steps' reference list feature. + * + * + * @generated + */ + EReference STATE__ENDED_STEPS = eINSTANCE.getState_EndedSteps(); + + /** + * The meta object literal for the 'Values' reference list feature. + * + * + * @generated + */ + EReference STATE__VALUES = eINSTANCE.getState_Values(); + + /** + * The meta object literal for the 'ISerializable' data type. + * + * + * @see org.eclipse.gemoc.trace.commons.model.trace.impl.TracePackageImpl#getISerializable() + * @generated + */ + EDataType ISERIALIZABLE = eINSTANCE.getISerializable(); + + } + +} //TracePackage 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 new file mode 100644 index 000000000..a7ec07181 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/TracedObject.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Traced Object'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.TracedObject#getDimensions Dimensions}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getTracedObject() + * @model abstract="true" + * @generated + */ +public interface TracedObject> extends EObject { + /** + * Returns the value of the 'Dimensions' reference list. + * + *

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

+ * + * @return the value of the 'Dimensions' reference list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getTracedObject_Dimensions() + * @model transient="true" volatile="true" + * annotation="http://www.eclipse.org/emf/2002/GenModel get='return getDimensionsInternal();'" + * @generated + */ + EList getDimensions(); + + /** + * + * + * @model kind="operation" + * annotation="http://www.eclipse.org/emf/2002/GenModel body='// Default implementation, returning empty list.\nfinal EList result = new org.eclipse.emf.ecore.util.BasicInternalEList(Object.class);\nreturn result;'" + * @generated + */ + EList getDimensionsInternal(); + +} // TracedObject diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Value.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Value.java new file mode 100644 index 000000000..91f7b1064 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/Value.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Value'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.Value#getStates States}
  • + *
+ * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getValue() + * @model abstract="true" + * @generated + */ +public interface Value> extends EObject { + /** + * Returns the value of the 'States' reference list. + * It is bidirectional and its opposite is '{@link org.eclipse.gemoc.trace.commons.model.trace.State#getValues Values}'. + * + *

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

+ * + * @return the value of the 'States' reference list. + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage#getValue_States() + * @see org.eclipse.gemoc.trace.commons.model.trace.State#getValues + * @model opposite="values" + * @generated + */ + EList getStates(); + +} // Value diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/BigStepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/BigStepImpl.java new file mode 100644 index 000000000..cfe2fdfe6 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/BigStepImpl.java @@ -0,0 +1,161 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +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.TracePackage; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Big Step'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.BigStepImpl#getSubSteps Sub Steps}
  • + *
+ * + * @generated + */ +public abstract class BigStepImpl, StateSubType extends State> extends StepImpl implements BigStep { + /** + * The cached value of the '{@link #getSubSteps() Sub Steps}' containment reference list. + * + * + * @see #getSubSteps() + * @generated + * @ordered + */ + protected EList subSteps; + + /** + * + * + * @generated + */ + protected BigStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.BIG_STEP; + } + + /** + * + * + * @generated + */ + public EList getSubSteps() { + if (subSteps == null) { + subSteps = new EObjectContainmentEList(Step.class, this, TracePackage.BIG_STEP__SUB_STEPS); + } + return subSteps; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.BIG_STEP__SUB_STEPS: + return ((InternalEList)getSubSteps()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TracePackage.BIG_STEP__SUB_STEPS: + return getSubSteps(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TracePackage.BIG_STEP__SUB_STEPS: + getSubSteps().clear(); + getSubSteps().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TracePackage.BIG_STEP__SUB_STEPS: + getSubSteps().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TracePackage.BIG_STEP__SUB_STEPS: + return subSteps != null && !subSteps.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //BigStepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/DimensionImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/DimensionImpl.java new file mode 100644 index 000000000..b9f6a4c50 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/DimensionImpl.java @@ -0,0 +1,162 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +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; + +/** + * + * An implementation of the model object 'Dimension'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.DimensionImpl#getValues Values}
  • + *
+ * + * @generated + */ +public abstract class DimensionImpl> extends MinimalEObjectImpl.Container implements Dimension { + /** + * The cached value of the '{@link #getValues() Values}' containment reference list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected DimensionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.DIMENSION; + } + + /** + * + * + * @generated + */ + public EList getValues() { + if (values == null) { + values = new EObjectContainmentEList(Value.class, this, TracePackage.DIMENSION__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.DIMENSION__VALUES: + return ((InternalEList)getValues()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TracePackage.DIMENSION__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TracePackage.DIMENSION__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TracePackage.DIMENSION__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TracePackage.DIMENSION__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DimensionImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericMSEImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/GenericMSEImpl.java similarity index 77% rename from trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericMSEImpl.java rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/GenericMSEImpl.java index 85e737e50..b101fb748 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/GenericMSEImpl.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/GenericMSEImpl.java @@ -1,15 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2017 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 fr.inria.diverse.trace.commons.model.trace.impl; +package org.eclipse.gemoc.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.GenericMSE; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; -import fr.inria.diverse.trace.commons.model.trace.GenericMSE; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; +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.EOperation; import org.eclipse.emf.ecore.InternalEObject; + import org.eclipse.emf.ecore.impl.ENotificationImpl; /** @@ -20,8 +36,8 @@ * The following features are implemented: *

*
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.GenericMSEImpl#getCallerReference Caller Reference}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.GenericMSEImpl#getActionReference Action Reference}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.GenericMSEImpl#getCallerReference Caller Reference}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.GenericMSEImpl#getActionReference Action Reference}
  • *
* * @generated @@ -142,6 +158,24 @@ public void setActionReference(EOperation newActionReference) { eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.GENERIC_MSE__ACTION_REFERENCE, oldActionReference, actionReference)); } + /** + * + * + * @generated + */ + public EObject getCaller() { + return callerReference; + } + + /** + * + * + * @generated + */ + public EOperation getAction() { + return actionReference; + } + /** * * @@ -213,19 +247,19 @@ public boolean eIsSet(int featureID) { } /** - * @generated not - */ - @Override - public EOperation getAction() { - return actionReference; - } - - /** - * @generated not + * + * + * @generated */ @Override - public EObject getCaller() { - return callerReference; + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case TracePackage.GENERIC_MSE___GET_CALLER: + return getCaller(); + case TracePackage.GENERIC_MSE___GET_ACTION: + return getAction(); + } + return super.eInvoke(operationID, arguments); } } //GenericMSEImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEImpl.java new file mode 100644 index 000000000..f0dc1f2b4 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEImpl.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.MSE; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; + +import org.eclipse.emf.ecore.impl.ENamedElementImpl; + +/** + * + * An implementation of the model object 'MSE'. + * + * + * @generated + */ +public abstract class MSEImpl extends ENamedElementImpl implements MSE { + /** + * + * + * @generated + */ + protected MSEImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.MSE; + } + + /** + * + * + * @generated + */ + public EObject getCaller() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EOperation getAction() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case TracePackage.MSE___GET_CALLER: + return getCaller(); + case TracePackage.MSE___GET_ACTION: + return getAction(); + } + return super.eInvoke(operationID, arguments); + } + +} //MSEImpl diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEModelImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEModelImpl.java similarity index 78% rename from trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEModelImpl.java rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEModelImpl.java index 4b5ca8752..c7652f0a4 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEModelImpl.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEModelImpl.java @@ -1,10 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2017 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 fr.inria.diverse.trace.commons.model.trace.impl; +package org.eclipse.gemoc.trace.commons.model.trace.impl; -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.MSEModel; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; +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.TracePackage; import java.util.Collection; @@ -28,7 +38,7 @@ * The following features are implemented: *

*
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.MSEModelImpl#getOwnedMSEs Owned MS Es}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEModelImpl#getOwnedMSEs Owned MS Es}
  • *
* * @generated diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEOccurrenceImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEOccurrenceImpl.java similarity index 83% rename from trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEOccurrenceImpl.java rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEOccurrenceImpl.java index 11e20adba..5fb3c175d 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/src/fr/inria/diverse/trace/commons/model/trace/impl/MSEOccurrenceImpl.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/MSEOccurrenceImpl.java @@ -1,10 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2017 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 fr.inria.diverse.trace.commons.model.trace.impl; +package org.eclipse.gemoc.trace.commons.model.trace.impl; -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.commons.model.trace.TracePackage; +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.TracePackage; import java.util.Collection; @@ -28,9 +38,9 @@ * The following features are implemented: *

*
    - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.MSEOccurrenceImpl#getMse Mse}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.MSEOccurrenceImpl#getParameters Parameters}
  • - *
  • {@link fr.inria.diverse.trace.commons.model.trace.impl.MSEOccurrenceImpl#getResult Result}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEOccurrenceImpl#getMse Mse}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEOccurrenceImpl#getParameters Parameters}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.MSEOccurrenceImpl#getResult Result}
  • *
* * @generated diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/ParallelStepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/ParallelStepImpl.java new file mode 100644 index 000000000..0507d58b9 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/ParallelStepImpl.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.ParallelStep; +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.TracePackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Parallel Step'. + * + * + * @generated + */ +public abstract class ParallelStepImpl, StateSubType extends State> extends BigStepImpl implements ParallelStep { + /** + * + * + * @generated + */ + protected ParallelStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.PARALLEL_STEP; + } + +} //ParallelStepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/SequentialStepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/SequentialStepImpl.java new file mode 100644 index 000000000..b478926cb --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/SequentialStepImpl.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +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.TracePackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Sequential Step'. + * + * + * @generated + */ +public abstract class SequentialStepImpl, StateSubType extends State> extends BigStepImpl implements SequentialStep { + /** + * + * + * @generated + */ + protected SequentialStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.SEQUENTIAL_STEP; + } + +} //SequentialStepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/SmallStepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/SmallStepImpl.java new file mode 100644 index 000000000..8343d3d88 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/SmallStepImpl.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.SmallStep; +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Small Step'. + * + * + * @generated + */ +public abstract class SmallStepImpl> extends StepImpl implements SmallStep { + /** + * + * + * @generated + */ + protected SmallStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.SMALL_STEP; + } + +} //SmallStepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/StateImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/StateImpl.java new file mode 100644 index 000000000..702d633f7 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/StateImpl.java @@ -0,0 +1,254 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +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.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +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.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl#getStartedSteps Started Steps}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl#getEndedSteps Ended Steps}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl#getValues Values}
  • + *
+ * + * @generated + */ +public abstract class StateImpl, ValueSubType extends Value> extends MinimalEObjectImpl.Container implements State { + /** + * The cached value of the '{@link #getStartedSteps() Started Steps}' reference list. + * + * + * @see #getStartedSteps() + * @generated + * @ordered + */ + protected EList startedSteps; + + /** + * The cached value of the '{@link #getEndedSteps() Ended Steps}' reference list. + * + * + * @see #getEndedSteps() + * @generated + * @ordered + */ + protected EList endedSteps; + + /** + * The cached value of the '{@link #getValues() Values}' reference list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected StateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.STATE; + } + + /** + * + * + * @generated + */ + public EList getStartedSteps() { + if (startedSteps == null) { + startedSteps = new EObjectWithInverseResolvingEList(Step.class, this, TracePackage.STATE__STARTED_STEPS, TracePackage.STEP__STARTING_STATE); + } + return startedSteps; + } + + /** + * + * + * @generated + */ + public EList getEndedSteps() { + if (endedSteps == null) { + endedSteps = new EObjectWithInverseResolvingEList(Step.class, this, TracePackage.STATE__ENDED_STEPS, TracePackage.STEP__ENDING_STATE); + } + return endedSteps; + } + + /** + * + * + * @generated + */ + public EList getValues() { + if (values == null) { + values = new EObjectWithInverseResolvingEList.ManyInverse(Value.class, this, TracePackage.STATE__VALUES, TracePackage.VALUE__STATES); + } + return values; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.STATE__STARTED_STEPS: + return ((InternalEList)(InternalEList)getStartedSteps()).basicAdd(otherEnd, msgs); + case TracePackage.STATE__ENDED_STEPS: + return ((InternalEList)(InternalEList)getEndedSteps()).basicAdd(otherEnd, msgs); + case TracePackage.STATE__VALUES: + return ((InternalEList)(InternalEList)getValues()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.STATE__STARTED_STEPS: + return ((InternalEList)getStartedSteps()).basicRemove(otherEnd, msgs); + case TracePackage.STATE__ENDED_STEPS: + return ((InternalEList)getEndedSteps()).basicRemove(otherEnd, msgs); + case TracePackage.STATE__VALUES: + return ((InternalEList)getValues()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TracePackage.STATE__STARTED_STEPS: + return getStartedSteps(); + case TracePackage.STATE__ENDED_STEPS: + return getEndedSteps(); + case TracePackage.STATE__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TracePackage.STATE__STARTED_STEPS: + getStartedSteps().clear(); + getStartedSteps().addAll((Collection)newValue); + return; + case TracePackage.STATE__ENDED_STEPS: + getEndedSteps().clear(); + getEndedSteps().addAll((Collection)newValue); + return; + case TracePackage.STATE__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TracePackage.STATE__STARTED_STEPS: + getStartedSteps().clear(); + return; + case TracePackage.STATE__ENDED_STEPS: + getEndedSteps().clear(); + return; + case TracePackage.STATE__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TracePackage.STATE__STARTED_STEPS: + return startedSteps != null && !startedSteps.isEmpty(); + case TracePackage.STATE__ENDED_STEPS: + return endedSteps != null && !endedSteps.isEmpty(); + case TracePackage.STATE__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //StateImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/StepImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/StepImpl.java new file mode 100644 index 000000000..55fb1d7af --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/StepImpl.java @@ -0,0 +1,379 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; +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.TracePackage; + +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; + +/** + * + * An implementation of the model object 'Step'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl#getMseoccurrence Mseoccurrence}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl#getStartingState Starting State}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl#getEndingState Ending State}
  • + *
+ * + * @generated + */ +public abstract class StepImpl> extends MinimalEObjectImpl.Container implements Step { + /** + * The cached value of the '{@link #getMseoccurrence() Mseoccurrence}' containment reference. + * + * + * @see #getMseoccurrence() + * @generated + * @ordered + */ + protected MSEOccurrence mseoccurrence; + + /** + * The cached value of the '{@link #getStartingState() Starting State}' reference. + * + * + * @see #getStartingState() + * @generated + * @ordered + */ + protected StateSubType startingState; + + /** + * The cached value of the '{@link #getEndingState() Ending State}' reference. + * + * + * @see #getEndingState() + * @generated + * @ordered + */ + protected StateSubType endingState; + + /** + * + * + * @generated + */ + protected StepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.STEP; + } + + /** + * + * + * @generated + */ + public MSEOccurrence getMseoccurrence() { + return mseoccurrence; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMseoccurrence(MSEOccurrence newMseoccurrence, NotificationChain msgs) { + MSEOccurrence oldMseoccurrence = mseoccurrence; + mseoccurrence = newMseoccurrence; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TracePackage.STEP__MSEOCCURRENCE, oldMseoccurrence, newMseoccurrence); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setMseoccurrence(MSEOccurrence newMseoccurrence) { + if (newMseoccurrence != mseoccurrence) { + NotificationChain msgs = null; + if (mseoccurrence != null) + msgs = ((InternalEObject)mseoccurrence).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TracePackage.STEP__MSEOCCURRENCE, null, msgs); + if (newMseoccurrence != null) + msgs = ((InternalEObject)newMseoccurrence).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TracePackage.STEP__MSEOCCURRENCE, null, msgs); + msgs = basicSetMseoccurrence(newMseoccurrence, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.STEP__MSEOCCURRENCE, newMseoccurrence, newMseoccurrence)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public StateSubType getStartingState() { + if (startingState != null && startingState.eIsProxy()) { + InternalEObject oldStartingState = (InternalEObject)startingState; + startingState = (StateSubType)eResolveProxy(oldStartingState); + if (startingState != oldStartingState) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TracePackage.STEP__STARTING_STATE, oldStartingState, startingState)); + } + } + return startingState; + } + + /** + * + * + * @generated + */ + public StateSubType basicGetStartingState() { + return startingState; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetStartingState(StateSubType newStartingState, NotificationChain msgs) { + StateSubType oldStartingState = startingState; + startingState = newStartingState; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TracePackage.STEP__STARTING_STATE, oldStartingState, newStartingState); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setStartingState(StateSubType newStartingState) { + if (newStartingState != startingState) { + NotificationChain msgs = null; + if (startingState != null) + msgs = ((InternalEObject)startingState).eInverseRemove(this, TracePackage.STATE__STARTED_STEPS, State.class, msgs); + if (newStartingState != null) + msgs = ((InternalEObject)newStartingState).eInverseAdd(this, TracePackage.STATE__STARTED_STEPS, State.class, msgs); + msgs = basicSetStartingState(newStartingState, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.STEP__STARTING_STATE, newStartingState, newStartingState)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public StateSubType getEndingState() { + if (endingState != null && endingState.eIsProxy()) { + InternalEObject oldEndingState = (InternalEObject)endingState; + endingState = (StateSubType)eResolveProxy(oldEndingState); + if (endingState != oldEndingState) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TracePackage.STEP__ENDING_STATE, oldEndingState, endingState)); + } + } + return endingState; + } + + /** + * + * + * @generated + */ + public StateSubType basicGetEndingState() { + return endingState; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetEndingState(StateSubType newEndingState, NotificationChain msgs) { + StateSubType oldEndingState = endingState; + endingState = newEndingState; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TracePackage.STEP__ENDING_STATE, oldEndingState, newEndingState); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setEndingState(StateSubType newEndingState) { + if (newEndingState != endingState) { + NotificationChain msgs = null; + if (endingState != null) + msgs = ((InternalEObject)endingState).eInverseRemove(this, TracePackage.STATE__ENDED_STEPS, State.class, msgs); + if (newEndingState != null) + msgs = ((InternalEObject)newEndingState).eInverseAdd(this, TracePackage.STATE__ENDED_STEPS, State.class, msgs); + msgs = basicSetEndingState(newEndingState, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.STEP__ENDING_STATE, newEndingState, newEndingState)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.STEP__STARTING_STATE: + if (startingState != null) + msgs = ((InternalEObject)startingState).eInverseRemove(this, TracePackage.STATE__STARTED_STEPS, State.class, msgs); + return basicSetStartingState((StateSubType)otherEnd, msgs); + case TracePackage.STEP__ENDING_STATE: + if (endingState != null) + msgs = ((InternalEObject)endingState).eInverseRemove(this, TracePackage.STATE__ENDED_STEPS, State.class, msgs); + return basicSetEndingState((StateSubType)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.STEP__MSEOCCURRENCE: + return basicSetMseoccurrence(null, msgs); + case TracePackage.STEP__STARTING_STATE: + return basicSetStartingState(null, msgs); + case TracePackage.STEP__ENDING_STATE: + return basicSetEndingState(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TracePackage.STEP__MSEOCCURRENCE: + return getMseoccurrence(); + case TracePackage.STEP__STARTING_STATE: + if (resolve) return getStartingState(); + return basicGetStartingState(); + case TracePackage.STEP__ENDING_STATE: + if (resolve) return getEndingState(); + return basicGetEndingState(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TracePackage.STEP__MSEOCCURRENCE: + setMseoccurrence((MSEOccurrence)newValue); + return; + case TracePackage.STEP__STARTING_STATE: + setStartingState((StateSubType)newValue); + return; + case TracePackage.STEP__ENDING_STATE: + setEndingState((StateSubType)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TracePackage.STEP__MSEOCCURRENCE: + setMseoccurrence((MSEOccurrence)null); + return; + case TracePackage.STEP__STARTING_STATE: + setStartingState((StateSubType)null); + return; + case TracePackage.STEP__ENDING_STATE: + setEndingState((StateSubType)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TracePackage.STEP__MSEOCCURRENCE: + return mseoccurrence != null; + case TracePackage.STEP__STARTING_STATE: + return startingState != null; + case TracePackage.STEP__ENDING_STATE: + return endingState != null; + } + return super.eIsSet(featureID); + } + +} //StepImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TraceFactoryImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TraceFactoryImpl.java new file mode 100644 index 000000000..4e3528789 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TraceFactoryImpl.java @@ -0,0 +1,176 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class TraceFactoryImpl extends EFactoryImpl implements TraceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static TraceFactory init() { + try { + TraceFactory theTraceFactory = (TraceFactory)EPackage.Registry.INSTANCE.getEFactory(TracePackage.eNS_URI); + if (theTraceFactory != null) { + return theTraceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new TraceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public TraceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case TracePackage.MSE_OCCURRENCE: return createMSEOccurrence(); + case TracePackage.MSE_MODEL: return createMSEModel(); + case TracePackage.GENERIC_MSE: return createGenericMSE(); + 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 TracePackage.ISERIALIZABLE: + return createISerializableFromString(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 TracePackage.ISERIALIZABLE: + return convertISerializableToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public MSEOccurrence createMSEOccurrence() { + MSEOccurrenceImpl mseOccurrence = new MSEOccurrenceImpl(); + return mseOccurrence; + } + + /** + * + * + * @generated + */ + public MSEModel createMSEModel() { + MSEModelImpl mseModel = new MSEModelImpl(); + return mseModel; + } + + /** + * + * + * @generated + */ + public GenericMSE createGenericMSE() { + GenericMSEImpl genericMSE = new GenericMSEImpl(); + return genericMSE; + } + + /** + * + * + * @generated + */ + public byte[] createISerializableFromString(EDataType eDataType, String initialValue) { + return (byte[])super.createFromString(initialValue); + } + + /** + * + * + * @generated + */ + public String convertISerializableToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(instanceValue); + } + + /** + * + * + * @generated + */ + public TracePackage getTracePackage() { + return (TracePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static TracePackage getPackage() { + return TracePackage.eINSTANCE; + } + +} //TraceFactoryImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TraceImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TraceImpl.java new file mode 100644 index 000000000..1a33f0ec6 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TraceImpl.java @@ -0,0 +1,336 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; + +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.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; + +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; + +/** + * + * An implementation of the model object 'Trace'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl#getRootStep Root Step}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl#getTracedObjects Traced Objects}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl#getStates States}
  • + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl#getLaunchconfiguration Launchconfiguration}
  • + *
+ * + * @generated + */ +public abstract class TraceImpl, TracedObjectSubtype extends TracedObject, StateSubType extends State> extends MinimalEObjectImpl.Container implements Trace { + /** + * The cached value of the '{@link #getRootStep() Root Step}' containment reference. + * + * + * @see #getRootStep() + * @generated + * @ordered + */ + protected StepSubType rootStep; + + /** + * The cached value of the '{@link #getTracedObjects() Traced Objects}' containment reference list. + * + * + * @see #getTracedObjects() + * @generated + * @ordered + */ + protected EList tracedObjects; + + /** + * The cached value of the '{@link #getStates() States}' containment reference list. + * + * + * @see #getStates() + * @generated + * @ordered + */ + protected EList states; + + /** + * The cached value of the '{@link #getLaunchconfiguration() Launchconfiguration}' containment reference. + * + * + * @see #getLaunchconfiguration() + * @generated + * @ordered + */ + protected LaunchConfiguration launchconfiguration; + + /** + * + * + * @generated + */ + protected TraceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.TRACE; + } + + /** + * + * + * @generated + */ + public StepSubType getRootStep() { + return rootStep; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRootStep(StepSubType newRootStep, NotificationChain msgs) { + StepSubType oldRootStep = rootStep; + rootStep = newRootStep; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TracePackage.TRACE__ROOT_STEP, oldRootStep, newRootStep); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setRootStep(StepSubType newRootStep) { + if (newRootStep != rootStep) { + NotificationChain msgs = null; + if (rootStep != null) + msgs = ((InternalEObject)rootStep).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TracePackage.TRACE__ROOT_STEP, null, msgs); + if (newRootStep != null) + msgs = ((InternalEObject)newRootStep).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TracePackage.TRACE__ROOT_STEP, null, msgs); + msgs = basicSetRootStep(newRootStep, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.TRACE__ROOT_STEP, newRootStep, newRootStep)); + } + + /** + * + * + * @generated + */ + public EList getTracedObjects() { + if (tracedObjects == null) { + tracedObjects = new EObjectContainmentEList(TracedObject.class, this, TracePackage.TRACE__TRACED_OBJECTS); + } + return tracedObjects; + } + + /** + * + * + * @generated + */ + public EList getStates() { + if (states == null) { + states = new EObjectContainmentEList(State.class, this, TracePackage.TRACE__STATES); + } + return states; + } + + /** + * + * + * @generated + */ + public LaunchConfiguration getLaunchconfiguration() { + return launchconfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLaunchconfiguration(LaunchConfiguration newLaunchconfiguration, NotificationChain msgs) { + LaunchConfiguration oldLaunchconfiguration = launchconfiguration; + launchconfiguration = newLaunchconfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TracePackage.TRACE__LAUNCHCONFIGURATION, oldLaunchconfiguration, newLaunchconfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLaunchconfiguration(LaunchConfiguration newLaunchconfiguration) { + if (newLaunchconfiguration != launchconfiguration) { + NotificationChain msgs = null; + if (launchconfiguration != null) + msgs = ((InternalEObject)launchconfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TracePackage.TRACE__LAUNCHCONFIGURATION, null, msgs); + if (newLaunchconfiguration != null) + msgs = ((InternalEObject)newLaunchconfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TracePackage.TRACE__LAUNCHCONFIGURATION, null, msgs); + msgs = basicSetLaunchconfiguration(newLaunchconfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TracePackage.TRACE__LAUNCHCONFIGURATION, newLaunchconfiguration, newLaunchconfiguration)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.TRACE__ROOT_STEP: + return basicSetRootStep(null, msgs); + case TracePackage.TRACE__TRACED_OBJECTS: + return ((InternalEList)getTracedObjects()).basicRemove(otherEnd, msgs); + case TracePackage.TRACE__STATES: + return ((InternalEList)getStates()).basicRemove(otherEnd, msgs); + case TracePackage.TRACE__LAUNCHCONFIGURATION: + return basicSetLaunchconfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TracePackage.TRACE__ROOT_STEP: + return getRootStep(); + case TracePackage.TRACE__TRACED_OBJECTS: + return getTracedObjects(); + case TracePackage.TRACE__STATES: + return getStates(); + case TracePackage.TRACE__LAUNCHCONFIGURATION: + return getLaunchconfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TracePackage.TRACE__ROOT_STEP: + setRootStep((StepSubType)newValue); + return; + case TracePackage.TRACE__TRACED_OBJECTS: + getTracedObjects().clear(); + getTracedObjects().addAll((Collection)newValue); + return; + case TracePackage.TRACE__STATES: + getStates().clear(); + getStates().addAll((Collection)newValue); + return; + case TracePackage.TRACE__LAUNCHCONFIGURATION: + setLaunchconfiguration((LaunchConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TracePackage.TRACE__ROOT_STEP: + setRootStep((StepSubType)null); + return; + case TracePackage.TRACE__TRACED_OBJECTS: + getTracedObjects().clear(); + return; + case TracePackage.TRACE__STATES: + getStates().clear(); + return; + case TracePackage.TRACE__LAUNCHCONFIGURATION: + setLaunchconfiguration((LaunchConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TracePackage.TRACE__ROOT_STEP: + return rootStep != null; + case TracePackage.TRACE__TRACED_OBJECTS: + return tracedObjects != null && !tracedObjects.isEmpty(); + case TracePackage.TRACE__STATES: + return states != null && !states.isEmpty(); + case TracePackage.TRACE__LAUNCHCONFIGURATION: + return launchconfiguration != null; + } + return super.eIsSet(featureID); + } + +} //TraceImpl 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 new file mode 100644 index 000000000..0a430861b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TracePackageImpl.java @@ -0,0 +1,896 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchconfigurationPackage; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; +import org.eclipse.gemoc.trace.commons.model.trace.GenericMSE; +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.ParallelStep; +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +import org.eclipse.gemoc.trace.commons.model.trace.SmallStep; +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.TraceFactory; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +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; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class TracePackageImpl extends EPackageImpl implements TracePackage { + /** + * + * + * @generated + */ + private EClass mseOccurrenceEClass = null; + + /** + * + * + * @generated + */ + private EClass mseEClass = null; + + /** + * + * + * @generated + */ + private EClass mseModelEClass = null; + + /** + * + * + * @generated + */ + private EClass genericMSEEClass = null; + + /** + * + * + * @generated + */ + private EClass stepEClass = null; + + /** + * + * + * @generated + */ + private EClass bigStepEClass = null; + + /** + * + * + * @generated + */ + private EClass smallStepEClass = null; + + /** + * + * + * @generated + */ + private EClass sequentialStepEClass = null; + + /** + * + * + * @generated + */ + private EClass parallelStepEClass = null; + + /** + * + * + * @generated + */ + private EClass traceEClass = null; + + /** + * + * + * @generated + */ + private EClass tracedObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass dimensionEClass = null; + + /** + * + * + * @generated + */ + private EClass valueEClass = null; + + /** + * + * + * @generated + */ + private EClass stateEClass = null; + + /** + * + * + * @generated + */ + private EDataType iSerializableEDataType = 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.trace.commons.model.trace.TracePackage#eNS_URI + * @see #init() + * @generated + */ + private TracePackageImpl() { + super(eNS_URI, TraceFactory.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 TracePackage#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 TracePackage init() { + if (isInited) return (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); + + // Obtain or create and register package + TracePackageImpl theTracePackage = (TracePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TracePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TracePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + LaunchconfigurationPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theTracePackage.createPackageContents(); + + // Initialize created meta-data + theTracePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theTracePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(TracePackage.eNS_URI, theTracePackage); + return theTracePackage; + } + + /** + * + * + * @generated + */ + public EClass getMSEOccurrence() { + return mseOccurrenceEClass; + } + + /** + * + * + * @generated + */ + public EReference getMSEOccurrence_Mse() { + return (EReference)mseOccurrenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getMSEOccurrence_Parameters() { + return (EAttribute)mseOccurrenceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getMSEOccurrence_Result() { + return (EAttribute)mseOccurrenceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getMSE() { + return mseEClass; + } + + /** + * + * + * @generated + */ + public EOperation getMSE__GetCaller() { + return mseEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getMSE__GetAction() { + return mseEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EClass getMSEModel() { + return mseModelEClass; + } + + /** + * + * + * @generated + */ + public EReference getMSEModel_OwnedMSEs() { + return (EReference)mseModelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGenericMSE() { + return genericMSEEClass; + } + + /** + * + * + * @generated + */ + public EReference getGenericMSE_CallerReference() { + return (EReference)genericMSEEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getGenericMSE_ActionReference() { + return (EReference)genericMSEEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getGenericMSE__GetCaller() { + return genericMSEEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getGenericMSE__GetAction() { + return genericMSEEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EClass getStep() { + return stepEClass; + } + + /** + * + * + * @generated + */ + public EReference getStep_Mseoccurrence() { + return (EReference)stepEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getStep_StartingState() { + return (EReference)stepEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getStep_EndingState() { + return (EReference)stepEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getBigStep() { + return bigStepEClass; + } + + /** + * + * + * @generated + */ + public EReference getBigStep_SubSteps() { + return (EReference)bigStepEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSmallStep() { + return smallStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getSequentialStep() { + return sequentialStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getParallelStep() { + return parallelStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getTrace() { + return traceEClass; + } + + /** + * + * + * @generated + */ + public EReference getTrace_RootStep() { + return (EReference)traceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getTrace_TracedObjects() { + return (EReference)traceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getTrace_States() { + return (EReference)traceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getTrace_Launchconfiguration() { + return (EReference)traceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getTracedObject() { + return tracedObjectEClass; + } + + /** + * + * + * @generated + */ + public EReference getTracedObject_Dimensions() { + return (EReference)tracedObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getTracedObject__GetDimensionsInternal() { + return tracedObjectEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDimension() { + return dimensionEClass; + } + + /** + * + * + * @generated + */ + public EReference getDimension_Values() { + return (EReference)dimensionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getValue() { + return valueEClass; + } + + /** + * + * + * @generated + */ + public EReference getValue_States() { + return (EReference)valueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getState() { + return stateEClass; + } + + /** + * + * + * @generated + */ + public EReference getState_StartedSteps() { + return (EReference)stateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getState_EndedSteps() { + return (EReference)stateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getState_Values() { + return (EReference)stateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EDataType getISerializable() { + return iSerializableEDataType; + } + + /** + * + * + * @generated + */ + public TraceFactory getTraceFactory() { + return (TraceFactory)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 + mseOccurrenceEClass = createEClass(MSE_OCCURRENCE); + createEReference(mseOccurrenceEClass, MSE_OCCURRENCE__MSE); + createEAttribute(mseOccurrenceEClass, MSE_OCCURRENCE__PARAMETERS); + createEAttribute(mseOccurrenceEClass, MSE_OCCURRENCE__RESULT); + + mseEClass = createEClass(MSE); + createEOperation(mseEClass, MSE___GET_CALLER); + createEOperation(mseEClass, MSE___GET_ACTION); + + mseModelEClass = createEClass(MSE_MODEL); + createEReference(mseModelEClass, MSE_MODEL__OWNED_MS_ES); + + genericMSEEClass = createEClass(GENERIC_MSE); + createEReference(genericMSEEClass, GENERIC_MSE__CALLER_REFERENCE); + createEReference(genericMSEEClass, GENERIC_MSE__ACTION_REFERENCE); + createEOperation(genericMSEEClass, GENERIC_MSE___GET_CALLER); + createEOperation(genericMSEEClass, GENERIC_MSE___GET_ACTION); + + stepEClass = createEClass(STEP); + createEReference(stepEClass, STEP__MSEOCCURRENCE); + createEReference(stepEClass, STEP__STARTING_STATE); + createEReference(stepEClass, STEP__ENDING_STATE); + + bigStepEClass = createEClass(BIG_STEP); + createEReference(bigStepEClass, BIG_STEP__SUB_STEPS); + + smallStepEClass = createEClass(SMALL_STEP); + + sequentialStepEClass = createEClass(SEQUENTIAL_STEP); + + parallelStepEClass = createEClass(PARALLEL_STEP); + + traceEClass = createEClass(TRACE); + createEReference(traceEClass, TRACE__ROOT_STEP); + createEReference(traceEClass, TRACE__TRACED_OBJECTS); + createEReference(traceEClass, TRACE__STATES); + createEReference(traceEClass, TRACE__LAUNCHCONFIGURATION); + + tracedObjectEClass = createEClass(TRACED_OBJECT); + createEReference(tracedObjectEClass, TRACED_OBJECT__DIMENSIONS); + createEOperation(tracedObjectEClass, TRACED_OBJECT___GET_DIMENSIONS_INTERNAL); + + dimensionEClass = createEClass(DIMENSION); + createEReference(dimensionEClass, DIMENSION__VALUES); + + valueEClass = createEClass(VALUE); + createEReference(valueEClass, VALUE__STATES); + + stateEClass = createEClass(STATE); + createEReference(stateEClass, STATE__STARTED_STEPS); + createEReference(stateEClass, STATE__ENDED_STEPS); + createEReference(stateEClass, STATE__VALUES); + + // Create data types + iSerializableEDataType = createEDataType(ISERIALIZABLE); + } + + /** + * + * + * @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 + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + LaunchconfigurationPackage theLaunchconfigurationPackage = (LaunchconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(LaunchconfigurationPackage.eNS_URI); + + // Create type parameters + ETypeParameter stepEClass_StateSubType = addETypeParameter(stepEClass, "StateSubType"); + ETypeParameter bigStepEClass_StepSubtype = addETypeParameter(bigStepEClass, "StepSubtype"); + ETypeParameter bigStepEClass_StateSubType = addETypeParameter(bigStepEClass, "StateSubType"); + ETypeParameter smallStepEClass_StateSubType = addETypeParameter(smallStepEClass, "StateSubType"); + ETypeParameter sequentialStepEClass_StepSubtype = addETypeParameter(sequentialStepEClass, "StepSubtype"); + ETypeParameter sequentialStepEClass_StateSubType = addETypeParameter(sequentialStepEClass, "StateSubType"); + ETypeParameter parallelStepEClass_StepSubtype = addETypeParameter(parallelStepEClass, "StepSubtype"); + ETypeParameter parallelStepEClass_StateSubType = addETypeParameter(parallelStepEClass, "StateSubType"); + ETypeParameter traceEClass_StepSubType = addETypeParameter(traceEClass, "StepSubType"); + ETypeParameter traceEClass_TracedObjectSubtype = addETypeParameter(traceEClass, "TracedObjectSubtype"); + ETypeParameter traceEClass_StateSubType = addETypeParameter(traceEClass, "StateSubType"); + ETypeParameter tracedObjectEClass_DimensionSubType = addETypeParameter(tracedObjectEClass, "DimensionSubType"); + ETypeParameter dimensionEClass_ValueSubType = addETypeParameter(dimensionEClass, "ValueSubType"); + ETypeParameter valueEClass_StateSubType = addETypeParameter(valueEClass, "StateSubType"); + ETypeParameter stateEClass_StepSubType = addETypeParameter(stateEClass, "StepSubType"); + ETypeParameter stateEClass_ValueSubType = addETypeParameter(stateEClass, "ValueSubType"); + + // Set bounds for type parameters + EGenericType g1 = createEGenericType(this.getState()); + EGenericType g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + stepEClass_StateSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getStep()); + g2 = createEGenericType(bigStepEClass_StateSubType); + g1.getETypeArguments().add(g2); + bigStepEClass_StepSubtype.getEBounds().add(g1); + g1 = createEGenericType(this.getState()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + bigStepEClass_StateSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getState()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + smallStepEClass_StateSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getStep()); + g2 = createEGenericType(sequentialStepEClass_StateSubType); + g1.getETypeArguments().add(g2); + sequentialStepEClass_StepSubtype.getEBounds().add(g1); + g1 = createEGenericType(this.getState()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + sequentialStepEClass_StateSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getStep()); + g2 = createEGenericType(parallelStepEClass_StateSubType); + g1.getETypeArguments().add(g2); + parallelStepEClass_StepSubtype.getEBounds().add(g1); + g1 = createEGenericType(this.getState()); + g2 = createEGenericType(parallelStepEClass_StepSubtype); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + parallelStepEClass_StateSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getStep()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + traceEClass_StepSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getTracedObject()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + traceEClass_TracedObjectSubtype.getEBounds().add(g1); + g1 = createEGenericType(this.getState()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + traceEClass_StateSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getDimension()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + tracedObjectEClass_DimensionSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getValue()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + dimensionEClass_ValueSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getState()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + valueEClass_StateSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getStep()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + stateEClass_StepSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getValue()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + stateEClass_ValueSubType.getEBounds().add(g1); + + // Add supertypes to classes + mseEClass.getESuperTypes().add(theEcorePackage.getENamedElement()); + genericMSEEClass.getESuperTypes().add(this.getMSE()); + g1 = createEGenericType(this.getStep()); + g2 = createEGenericType(bigStepEClass_StateSubType); + g1.getETypeArguments().add(g2); + bigStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getStep()); + g2 = createEGenericType(smallStepEClass_StateSubType); + g1.getETypeArguments().add(g2); + smallStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getBigStep()); + g2 = createEGenericType(sequentialStepEClass_StepSubtype); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(sequentialStepEClass_StateSubType); + g1.getETypeArguments().add(g2); + sequentialStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getBigStep()); + g2 = createEGenericType(parallelStepEClass_StepSubtype); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(parallelStepEClass_StateSubType); + g1.getETypeArguments().add(g2); + parallelStepEClass.getEGenericSuperTypes().add(g1); + + // Initialize classes, features, and operations; add parameters + initEClass(mseOccurrenceEClass, MSEOccurrence.class, "MSEOccurrence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getMSEOccurrence_Mse(), this.getMSE(), null, "mse", null, 1, 1, MSEOccurrence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMSEOccurrence_Parameters(), ecorePackage.getEJavaObject(), "parameters", null, 0, -1, MSEOccurrence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMSEOccurrence_Result(), ecorePackage.getEJavaObject(), "result", null, 0, -1, MSEOccurrence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(mseEClass, org.eclipse.gemoc.trace.commons.model.trace.MSE.class, "MSE", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getMSE__GetCaller(), theEcorePackage.getEObject(), "getCaller", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getMSE__GetAction(), theEcorePackage.getEOperation(), "getAction", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(mseModelEClass, MSEModel.class, "MSEModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getMSEModel_OwnedMSEs(), this.getMSE(), null, "ownedMSEs", null, 0, -1, MSEModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(genericMSEEClass, GenericMSE.class, "GenericMSE", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGenericMSE_CallerReference(), theEcorePackage.getEObject(), null, "callerReference", null, 0, 1, GenericMSE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGenericMSE_ActionReference(), theEcorePackage.getEOperation(), null, "actionReference", null, 0, 1, GenericMSE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getGenericMSE__GetCaller(), theEcorePackage.getEObject(), "getCaller", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getGenericMSE__GetAction(), theEcorePackage.getEOperation(), "getAction", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(stepEClass, Step.class, "Step", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getStep_Mseoccurrence(), this.getMSEOccurrence(), null, "mseoccurrence", null, 0, 1, Step.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(stepEClass_StateSubType); + initEReference(getStep_StartingState(), g1, this.getState_StartedSteps(), "startingState", null, 1, 1, Step.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(stepEClass_StateSubType); + initEReference(getStep_EndingState(), g1, this.getState_EndedSteps(), "endingState", null, 0, 1, Step.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(bigStepEClass, BigStep.class, "BigStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(bigStepEClass_StepSubtype); + initEReference(getBigStep_SubSteps(), g1, null, "subSteps", null, 0, -1, BigStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(smallStepEClass, SmallStep.class, "SmallStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(sequentialStepEClass, SequentialStep.class, "SequentialStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(parallelStepEClass, ParallelStep.class, "ParallelStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(traceEClass, Trace.class, "Trace", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + 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); + 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); + + EOperation op = initEOperation(getTracedObject__GetDimensionsInternal(), null, "getDimensionsInternal", 0, -1, IS_UNIQUE, IS_ORDERED); + g1 = createEGenericType(tracedObjectEClass_DimensionSubType); + initEOperation(op, g1); + + initEClass(dimensionEClass, Dimension.class, "Dimension", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(dimensionEClass_ValueSubType); + initEReference(getDimension_Values(), g1, null, "values", null, 0, -1, Dimension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(valueEClass, Value.class, "Value", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + g1 = createEGenericType(valueEClass_StateSubType); + initEReference(getValue_States(), g1, this.getState_Values(), "states", null, 0, -1, Value.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); + g1 = createEGenericType(stateEClass_StepSubType); + initEReference(getState_StartedSteps(), g1, this.getStep_StartingState(), "startedSteps", 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_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); + + // Initialize data types + initEDataType(iSerializableEDataType, byte[].class, "ISerializable", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //TracePackageImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TracedObjectImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TracedObjectImpl.java new file mode 100644 index 000000000..4b7f29a3b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/TracedObjectImpl.java @@ -0,0 +1,153 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; + +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Traced Object'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.TracedObjectImpl#getDimensions Dimensions}
  • + *
+ * + * @generated + */ +public abstract class TracedObjectImpl> extends MinimalEObjectImpl.Container implements TracedObject { + /** + * + * + * @generated + */ + protected TracedObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.TRACED_OBJECT; + } + + /** + * + * + * @generated + */ + public EList getDimensions() { + return getDimensionsInternal(); + } + + /** + * + * + * @generated + */ + public EList getDimensionsInternal() { + // Default implementation, returning empty list. + final EList result = new org.eclipse.emf.ecore.util.BasicInternalEList(Object.class); + return result; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TracePackage.TRACED_OBJECT__DIMENSIONS: + return getDimensions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TracePackage.TRACED_OBJECT__DIMENSIONS: + getDimensions().clear(); + getDimensions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TracePackage.TRACED_OBJECT__DIMENSIONS: + getDimensions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TracePackage.TRACED_OBJECT__DIMENSIONS: + return !getDimensions().isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case TracePackage.TRACED_OBJECT___GET_DIMENSIONS_INTERNAL: + return getDimensionsInternal(); + } + return super.eInvoke(operationID, arguments); + } + +} //TracedObjectImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/ValueImpl.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/ValueImpl.java new file mode 100644 index 000000000..2f6fcf3a2 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/impl/ValueImpl.java @@ -0,0 +1,177 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.impl; + +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +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.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Value'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.gemoc.trace.commons.model.trace.impl.ValueImpl#getStates States}
  • + *
+ * + * @generated + */ +public abstract class ValueImpl> extends MinimalEObjectImpl.Container implements Value { + /** + * The cached value of the '{@link #getStates() States}' reference list. + * + * + * @see #getStates() + * @generated + * @ordered + */ + protected EList states; + + /** + * + * + * @generated + */ + protected ValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TracePackage.Literals.VALUE; + } + + /** + * + * + * @generated + */ + public EList getStates() { + if (states == null) { + states = new EObjectWithInverseResolvingEList.ManyInverse(State.class, this, TracePackage.VALUE__STATES, TracePackage.STATE__VALUES); + } + return states; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.VALUE__STATES: + return ((InternalEList)(InternalEList)getStates()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TracePackage.VALUE__STATES: + return ((InternalEList)getStates()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TracePackage.VALUE__STATES: + return getStates(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TracePackage.VALUE__STATES: + getStates().clear(); + getStates().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TracePackage.VALUE__STATES: + getStates().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TracePackage.VALUE__STATES: + return states != null && !states.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ValueImpl diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/util/TraceAdapterFactory.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/util/TraceAdapterFactory.java new file mode 100644 index 000000000..799065126 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/util/TraceAdapterFactory.java @@ -0,0 +1,402 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.util; + +import org.eclipse.gemoc.trace.commons.model.trace.*; + +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.EModelElement; +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.gemoc.trace.commons.model.trace.TracePackage + * @generated + */ +public class TraceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static TracePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public TraceAdapterFactory() { + if (modelPackage == null) { + modelPackage = TracePackage.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 TraceSwitch modelSwitch = + new TraceSwitch() { + @Override + public Adapter caseMSEOccurrence(MSEOccurrence object) { + return createMSEOccurrenceAdapter(); + } + @Override + public Adapter caseMSE(MSE object) { + return createMSEAdapter(); + } + @Override + public Adapter caseMSEModel(MSEModel object) { + return createMSEModelAdapter(); + } + @Override + public Adapter caseGenericMSE(GenericMSE object) { + return createGenericMSEAdapter(); + } + @Override + public > Adapter caseStep(Step object) { + return createStepAdapter(); + } + @Override + public , StateSubType extends State> Adapter caseBigStep(BigStep object) { + return createBigStepAdapter(); + } + @Override + public > Adapter caseSmallStep(SmallStep object) { + return createSmallStepAdapter(); + } + @Override + public , StateSubType extends State> Adapter caseSequentialStep(SequentialStep object) { + return createSequentialStepAdapter(); + } + @Override + public , StateSubType extends State> Adapter caseParallelStep(ParallelStep object) { + return createParallelStepAdapter(); + } + @Override + public , TracedObjectSubtype extends TracedObject, StateSubType extends State> Adapter caseTrace(Trace object) { + return createTraceAdapter(); + } + @Override + public > Adapter caseTracedObject(TracedObject object) { + return createTracedObjectAdapter(); + } + @Override + public > Adapter caseDimension(Dimension object) { + return createDimensionAdapter(); + } + @Override + public > Adapter caseValue(Value object) { + return createValueAdapter(); + } + @Override + public , ValueSubType extends Value> Adapter caseState(State object) { + return createStateAdapter(); + } + @Override + public Adapter caseEModelElement(EModelElement object) { + return createEModelElementAdapter(); + } + @Override + public Adapter caseENamedElement(ENamedElement object) { + return createENamedElementAdapter(); + } + @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.trace.commons.model.trace.MSEOccurrence MSE 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.trace.commons.model.trace.MSEOccurrence + * @generated + */ + public Adapter createMSEOccurrenceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.MSE MSE}'. + * + * 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.trace.commons.model.trace.MSE + * @generated + */ + public Adapter createMSEAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.MSEModel MSE Model}'. + * + * 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.trace.commons.model.trace.MSEModel + * @generated + */ + public Adapter createMSEModelAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.GenericMSE Generic MSE}'. + * + * 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.trace.commons.model.trace.GenericMSE + * @generated + */ + public Adapter createGenericMSEAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Step Step}'. + * + * 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.trace.commons.model.trace.Step + * @generated + */ + public Adapter createStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.BigStep Big Step}'. + * + * 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.trace.commons.model.trace.BigStep + * @generated + */ + public Adapter createBigStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.SmallStep Small Step}'. + * + * 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.trace.commons.model.trace.SmallStep + * @generated + */ + public Adapter createSmallStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.SequentialStep Sequential Step}'. + * + * 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.trace.commons.model.trace.SequentialStep + * @generated + */ + public Adapter createSequentialStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.ParallelStep Parallel Step}'. + * + * 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.trace.commons.model.trace.ParallelStep + * @generated + */ + public Adapter createParallelStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace Trace}'. + * + * 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.trace.commons.model.trace.Trace + * @generated + */ + public Adapter createTraceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.TracedObject Traced Object}'. + * + * 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.trace.commons.model.trace.TracedObject + * @generated + */ + public Adapter createTracedObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Dimension Dimension}'. + * + * 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.trace.commons.model.trace.Dimension + * @generated + */ + public Adapter createDimensionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Value Value}'. + * + * 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.trace.commons.model.trace.Value + * @generated + */ + public Adapter createValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.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.trace.commons.model.trace.State + * @generated + */ + public Adapter createStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EModelElement EModel 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.emf.ecore.EModelElement + * @generated + */ + public Adapter createEModelElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ENamedElement ENamed 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.emf.ecore.ENamedElement + * @generated + */ + public Adapter createENamedElementAdapter() { + 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; + } + +} //TraceAdapterFactory diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/util/TraceSwitch.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/util/TraceSwitch.java new file mode 100644 index 000000000..b4ab90544 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons.model/src/org/eclipse/gemoc/trace/commons/model/trace/util/TraceSwitch.java @@ -0,0 +1,436 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.commons.model.trace.util; + +import org.eclipse.gemoc.trace.commons.model.trace.*; + +import org.eclipse.emf.ecore.EModelElement; +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * 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.trace.commons.model.trace.TracePackage + * @generated + */ +public class TraceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static TracePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public TraceSwitch() { + if (modelPackage == null) { + modelPackage = TracePackage.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 TracePackage.MSE_OCCURRENCE: { + MSEOccurrence mseOccurrence = (MSEOccurrence)theEObject; + T result = caseMSEOccurrence(mseOccurrence); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.MSE: { + MSE mse = (MSE)theEObject; + T result = caseMSE(mse); + if (result == null) result = caseENamedElement(mse); + if (result == null) result = caseEModelElement(mse); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.MSE_MODEL: { + MSEModel mseModel = (MSEModel)theEObject; + T result = caseMSEModel(mseModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.GENERIC_MSE: { + GenericMSE genericMSE = (GenericMSE)theEObject; + T result = caseGenericMSE(genericMSE); + if (result == null) result = caseMSE(genericMSE); + if (result == null) result = caseENamedElement(genericMSE); + if (result == null) result = caseEModelElement(genericMSE); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.STEP: { + Step step = (Step)theEObject; + T result = caseStep(step); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.BIG_STEP: { + BigStep bigStep = (BigStep)theEObject; + T result = caseBigStep(bigStep); + if (result == null) result = caseStep(bigStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.SMALL_STEP: { + SmallStep smallStep = (SmallStep)theEObject; + T result = caseSmallStep(smallStep); + if (result == null) result = caseStep(smallStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.SEQUENTIAL_STEP: { + SequentialStep sequentialStep = (SequentialStep)theEObject; + T result = caseSequentialStep(sequentialStep); + if (result == null) result = caseBigStep(sequentialStep); + if (result == null) result = caseStep(sequentialStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.PARALLEL_STEP: { + ParallelStep parallelStep = (ParallelStep)theEObject; + T result = caseParallelStep(parallelStep); + if (result == null) result = caseBigStep(parallelStep); + if (result == null) result = caseStep(parallelStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.TRACE: { + Trace trace = (Trace)theEObject; + T result = caseTrace(trace); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.TRACED_OBJECT: { + TracedObject tracedObject = (TracedObject)theEObject; + T result = caseTracedObject(tracedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.DIMENSION: { + Dimension dimension = (Dimension)theEObject; + T result = caseDimension(dimension); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.VALUE: { + Value value = (Value)theEObject; + T result = caseValue(value); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TracePackage.STATE: { + State state = (State)theEObject; + T result = caseState(state); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'MSE 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 'MSE Occurrence'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMSEOccurrence(MSEOccurrence object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'MSE'. + * + * 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 'MSE'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMSE(MSE object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'MSE Model'. + * + * 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 'MSE Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMSEModel(MSEModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generic MSE'. + * + * 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 'Generic MSE'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenericMSE(GenericMSE object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Step'. + * + * 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'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseStep(Step object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Big Step'. + * + * 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 'Big Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , StateSubType extends State> T caseBigStep(BigStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Small Step'. + * + * 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 'Small Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseSmallStep(SmallStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Sequential Step'. + * + * 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 'Sequential Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , StateSubType extends State> T caseSequentialStep(SequentialStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Parallel Step'. + * + * 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 'Parallel Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , StateSubType extends State> T caseParallelStep(ParallelStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Trace'. + * + * 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 'Trace'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , TracedObjectSubtype extends TracedObject, StateSubType extends State> T caseTrace(Trace object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Traced Object'. + * + * 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 'Traced Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseTracedObject(TracedObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dimension'. + * + * 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 'Dimension'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseDimension(Dimension object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Value'. + * + * 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 'Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseValue(Value 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 , ValueSubType extends Value> T caseState(State object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EModel 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 'EModel Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEModelElement(EModelElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'ENamed 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 'ENamed Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseENamedElement(ENamedElement 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; + } + +} //TraceSwitch diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.checkstyle b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.classpath b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.classpath new file mode 100644 index 000000000..99e12c4ee --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/.gitignore b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.gitignore similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.commons/.gitignore rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons/.gitignore diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.project b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.project new file mode 100644 index 000000000..70474dc62 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/.project @@ -0,0 +1,40 @@ + + + org.eclipse.gemoc.trace.commons + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + net.sf.eclipsecs.core.CheckstyleNature + + 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 new file mode 100644 index 000000000..bbc2baa06 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/META-INF/MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +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 +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.emf.ecore;bundle-version="2.10.1", + org.eclipse.emf.compare;bundle-version="3.0.2", + org.junit;bundle-version="4.11.0", + org.eclipse.emf.ecore.xmi, + org.eclipse.core.resources;bundle-version="3.9.1", + org.eclipse.core.runtime;bundle-version="3.10.0", + org.eclipse.xtext.util, + org.eclipse.xtend.ide, + org.eclipse.jdt.core, + org.eclipse.jface.text, + org.eclipse.emf.codegen.ecore;bundle-version="2.10.2", + org.jdom2;bundle-version="2.0.6" +Bundle-ClassPath: . +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 + diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons.model/about.html b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/about.html similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.commons.model/about.html rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons/about.html diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/build.properties b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/build.properties new file mode 100644 index 000000000..cf0e0c219 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html +jre.compilation.profile = JavaSE-1.8 +src.includes = about.html diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/pom.xml b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/pom.xml new file mode 100644 index 000000000..eeafbab6f --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/pom.xml @@ -0,0 +1,68 @@ + + + + + 4.0.0 + org.eclipse.gemoc.trace.commons + org.eclipse.gemoc.trace.commons + 2.3.0-SNAPSHOT + eclipse-plugin + + + + + + org.eclipse.gemoc.trace.commons + org.eclipse.gemoc.trace.commons.root + 2.3.0-SNAPSHOT + ../.. + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + + + diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/CodeGenUtil.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/CodeGenUtil.java similarity index 96% rename from trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/CodeGenUtil.java rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/CodeGenUtil.java index 494481f34..6950898c5 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/CodeGenUtil.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/CodeGenUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.trace.commons; +package org.eclipse.gemoc.trace.commons; import java.util.Map; 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 new file mode 100644 index 000000000..9ddb86b00 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EMFCompareUtil.xtend @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.commons + +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.compare.scope.DefaultComparisonScope +import org.eclipse.emf.compare.scope.IComparisonScope +import org.eclipse.emf.compare.EMFCompare +import org.eclipse.emf.compare.Comparison +import java.util.List +import org.eclipse.emf.compare.Diff +import org.eclipse.emf.compare.DifferenceKind +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); + val IComparisonScope scope = _defaultComparisonScope; + val _builder = EMFCompare.builder(); + val EMFCompare _build = _builder.build(); + val Comparison comparison = _build.compare(scope); + val List differences = comparison.getDifferences(); + 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); + } + + } + +} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EMFUtil.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EMFUtil.java similarity index 95% rename from trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EMFUtil.java rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EMFUtil.java index 72742dd8a..0829970e9 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EMFUtil.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EMFUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.trace.commons; +package org.eclipse.gemoc.trace.commons; import java.io.File; import java.io.IOException; diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EclipseUtil.xtend b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EclipseUtil.xtend similarity index 88% rename from trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EclipseUtil.xtend rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EclipseUtil.xtend index 27714b233..8903dc858 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EclipseUtil.xtend +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EclipseUtil.xtend @@ -1,4 +1,14 @@ -package fr.inria.diverse.trace.commons +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.commons import java.io.File import java.io.FileInputStream diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EcoreCraftingUtil.xtend b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EcoreCraftingUtil.xtend similarity index 92% rename from trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EcoreCraftingUtil.xtend rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EcoreCraftingUtil.xtend index 85b43f738..bc6204441 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/EcoreCraftingUtil.xtend +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/EcoreCraftingUtil.xtend @@ -1,4 +1,14 @@ -package fr.inria.diverse.trace.commons +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.commons import org.eclipse.emf.ecore.EReference import org.eclipse.emf.ecore.EcoreFactory diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/ExecutionMetamodelTraceability.xtend b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/ExecutionMetamodelTraceability.xtend new file mode 100644 index 000000000..ff14511c4 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/ExecutionMetamodelTraceability.xtend @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.commons + +import org.eclipse.emf.ecore.EModelElement +import org.eclipse.emf.ecore.EcoreFactory +import org.eclipse.emf.ecore.EAnnotation + +abstract class ExecutionMetamodelTraceability { + + public static val String TRACEABILITY_ANNOTATION_SOURCE = "http://www.modelexecution.org/trace/XMOF"; + public static val String TRACEABILITY_ANNOTATION_KEY = "executionMetamodelElement"; + + public static def void createTraceabilityAnnotation(EModelElement elementToAnnotate, String traceabilityAnnotationValue) { + val traceabilityAnnotation = EcoreFactory.eINSTANCE.createEAnnotation; + traceabilityAnnotation.source = TRACEABILITY_ANNOTATION_SOURCE; + traceabilityAnnotation.details.put(TRACEABILITY_ANNOTATION_KEY, traceabilityAnnotationValue); + elementToAnnotate.EAnnotations.add(traceabilityAnnotation); + } + + public static def String getTraceabilityAnnotationValue(EModelElement annotatedElement) { + var String traceabilityAnnotationValue = null; + val traceabilityAnnotation = getTraceabilityAnnotation(annotatedElement); + if(traceabilityAnnotation != null) { + traceabilityAnnotationValue = traceabilityAnnotation.details.get(TRACEABILITY_ANNOTATION_KEY); + } + return traceabilityAnnotationValue; + } + + public static def EAnnotation getTraceabilityAnnotation(EModelElement annotatedElement) { + return annotatedElement.getEAnnotation(TRACEABILITY_ANNOTATION_SOURCE); + } +} \ No newline at end of file diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/ManifestUtil.java b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/ManifestUtil.java similarity index 97% rename from trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/ManifestUtil.java rename to trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/ManifestUtil.java index d2becd2e6..ac5a418e5 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.commons/src/fr/inria/diverse/trace/commons/ManifestUtil.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/ManifestUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.trace.commons; +package org.eclipse.gemoc.trace.commons; import static com.google.common.collect.Sets.newHashSet; 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 new file mode 100644 index 000000000..c00f997eb --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/PluginXMLHelper.java @@ -0,0 +1,138 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.commons; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.jdom2.Attribute; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.filter.ElementFilter; +import org.jdom2.input.SAXBuilder; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; + +public class PluginXMLHelper { + + public static final String PLUGIN_FILENAME = "plugin.xml"; + + public static final String PLUGIN_TEMPLATE = "\n" + + "\n" + "\n" + ""; + + public static void createEmptyTemplateFile(IFile pluginXmlFile, + boolean overrideIfExist) { + if (overrideIfExist && pluginXmlFile.exists()) { + try { + pluginXmlFile.delete(true, null); + } catch (CoreException e) { + //Activator.error(e.getMessage(), e); + } + } + if (!pluginXmlFile.exists()) { + try { + InputStream stream = new ByteArrayInputStream( + PLUGIN_TEMPLATE.getBytes()); + if (pluginXmlFile.exists()) { + pluginXmlFile.setContents(stream, true, true, null); + } else { + pluginXmlFile.create(stream, true, null); + } + stream.close(); + } catch (IOException e) { + //Activator.error(e.getMessage(), e); + } catch (CoreException e) { + //Activator.error(e.getMessage(), e); + } + } + } + + protected Document document; + protected Element root; + + public void loadDocument(IFile pluginXmlFile) { + SAXBuilder sxb = new SAXBuilder(); + try { + document = sxb.build(pluginXmlFile.getContents()); + + root = document.getRootElement(); + } catch (Exception e) { + //Activator.error(e.getMessage(), e); + } + } + + public void saveDocument(IFile pluginXmlFile) { + try { + XMLOutputter sortie = new XMLOutputter(Format.getPrettyFormat()); + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + + sortie.output(document, stream); + InputStream inputStream = new ByteArrayInputStream( + stream.toByteArray()); + pluginXmlFile.setContents(inputStream, IResource.FORCE, null); + } catch (IOException e) { + //Activator.error(e.getMessage(), e); + } catch (CoreException e) { + //Activator.error(e.getMessage(), e); + } + } + + + public Element getOrCreateExtensionPoint(String extensionPointName){ + Element result; + List elements = root.getContent(new ExtensionFilter(extensionPointName)); + if(elements.size() == 0){ + // create extension point + result = new Element("extension"); + result.setAttribute("point", extensionPointName); + root.addContent(result); + } + else{ + result = elements.get(0); + } + return result; + } + + public class ExtensionFilter extends ElementFilter{ + + /** + * + */ + private static final long serialVersionUID = -1941823619643486082L; + protected String extensionPointName; + + public ExtensionFilter(String extensionPointName){ + super("extension"); + this.extensionPointName = extensionPointName; + } + + @Override + public Element filter(Object content) { + Element result = super.filter(content); + if(result == null) return null; + Attribute att = result.getAttribute("point"); + if(att == null) return null; + if(att.getValue().equals(extensionPointName)) return result; + else return null; + } + + } + + + +} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/tracemetamodel/StepStrings.xtend b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/tracemetamodel/StepStrings.xtend new file mode 100644 index 000000000..c588cc2d2 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/tracemetamodel/StepStrings.xtend @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.commons.tracemetamodel + +import org.eclipse.emf.ecore.EClass +import org.eclipse.gemoc.trace.commons.EcoreCraftingUtil +import org.eclipse.emf.ecore.EOperation + +class StepStrings { + + public static val String implicitStepSuffix = "_ImplicitStep"; + + public static val String abstractSubStepSuffix = "_AbstractSubStep"; + + public static val String globalImplicitStepName = "ImplicitStep"; + + public static val String package_BigSteps = "BigSteps"; + + public static val String ref_BigStepToSub = "subSteps"; + + public static def String implicitStepClassName(EClass macroStepClass) { + return macroStepClass.getName() + implicitStepSuffix; + } + + public static def String stepClassName(EClass containingClass, EOperation rule) { + val String prefix = + if (containingClass != null) { + EcoreCraftingUtil.getFQN(containingClass, "_").toFirstUpper + "_" + } else { + "Root_" + } + return prefix + rule.name.toFirstUpper + } + + public static def String subStepClassName(EClass containingClass, EOperation rule) { + return stepClassName(containingClass,rule) + } + + public static def String abstractSubStepClassName(EClass containingClass, EOperation rule) { + return stepClassName(containingClass, rule) + abstractSubStepSuffix + } + + public static def String implicitStepClassName(EClass containingClass, EOperation rule) { + return stepClassName(containingClass, rule) + implicitStepSuffix + } + +} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.checkstyle b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.checkstyle new file mode 100644 index 000000000..2d51ed574 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/.classpath b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.classpath similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/.classpath rename to trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.classpath diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.project b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.project new file mode 100644 index 000000000..8fa9f0731 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.gemoc.api + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.settings/org.eclipse.jdt.core.prefs b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..0c68a61dc --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/.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/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/META-INF/MANIFEST.MF b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/META-INF/MANIFEST.MF new file mode 100644 index 000000000..f1c653b5b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Api +Bundle-SymbolicName: org.eclipse.gemoc.trace.gemoc.api +Bundle-Version: 2.3.0.qualifier +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.emf.ecore;bundle-version="2.10.2", + org.eclipse.gemoc.timeline;bundle-version="1.0.0", + org.eclipse.gemoc.xdsmlframework.api;bundle-version="0.1.0", + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0", + com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.trace.gemoc.api; uses:="org.eclipse.emf.ecore, org.eclipse.gemoc.executionframework.engine.mse, org.eclipse.gemoc.xdsmlframework.api.engine_addon, org.eclipse.gemoc.timeline.view" + diff --git a/trace/commons/plugins/fr.inria.diverse.trace.commons/about.html b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/about.html similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.commons/about.html rename to trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/about.html diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/build.properties b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/build.properties new file mode 100644 index 000000000..6594e752a --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html +src.includes = about.html diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/pom.xml b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/pom.xml new file mode 100644 index 000000000..9f9e85b7d --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/pom.xml @@ -0,0 +1,63 @@ + + + + + 4.0.0 + org.eclipse.gemoc.trace.commons + org.eclipse.gemoc.trace.gemoc.api + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.eclipse.gemoc.trace.commons + org.eclipse.gemoc.trace.commons.root + 2.3.0-SNAPSHOT + ../.. + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + + 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 new file mode 100644 index 000000000..f57c905a1 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IMultiDimensionalTraceAddon.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.api; + +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.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +public interface IMultiDimensionalTraceAddon, StateSubType extends State, TracedObjectSubType extends TracedObject, DimensionSubType extends Dimension, ValueSubType extends Value> extends IEngineAddon { + + ITraceExplorer getTraceExplorer(); + + ITraceConstructor getTraceConstructor(); + + ITraceExtractor getTraceExtractor(); + + ITraceNotifier getTraceNotifier(); + + IStepFactory getFactory(); + + void load(Resource traceResource); + + boolean isAddonForTrace(EObject traceRoot); +} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IStateManager.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IStateManager.java new file mode 100644 index 000000000..9fa4f1fe3 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IStateManager.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.api; + +import org.eclipse.gemoc.trace.commons.model.trace.State; + +/** + * Classes implementing this interface are responsible for the restoration of the model in any state. + * + * @author dorian + * + * @param + */ +public interface IStateManager> { + + /** + * Restores the model in the provided state + * @param state The state to restore the model to + */ + void restoreState(StateSubType state); + +} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IStepFactory.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IStepFactory.java new file mode 100644 index 000000000..07ae911b1 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/IStepFactory.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.api; + +import java.util.List; + +import org.eclipse.gemoc.trace.commons.model.trace.MSE; +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +public interface IStepFactory { + + public Step createStep( + MSE mse, List parameters, List result); + +} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceConstructor.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceConstructor.java similarity index 81% rename from trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceConstructor.java rename to trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceConstructor.java index 069a8af11..90a92d732 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceConstructor.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceConstructor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,15 +8,16 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.trace.gemoc.api; +package org.eclipse.gemoc.trace.gemoc.api; import java.util.List; + import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; -import org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange; -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.Step; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.trace.Step; public interface ITraceConstructor { @@ -30,13 +31,13 @@ public interface ITraceConstructor { * Records the start of a new step. * @param step The step that has been started */ - void addStep(Step step); + void addStep(Step step); /** * Records the end of the top step in the call stack. * @param step The step that is supposed to end */ - void endStep(Step step); + void endStep(Step step); /** * Creates and returns a new trace with the given launch configuration. diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceExplorer.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceExplorer.java new file mode 100644 index 000000000..7e98debea --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceExplorer.java @@ -0,0 +1,179 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.api; + +import java.util.List; + +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; + +public interface ITraceExplorer, StateSubType extends State, TracedObjectSubType extends TracedObject, DimensionSubType extends Dimension, ValueSubType extends Value> extends ITraceViewNotifier, ITraceListener { + + /** + * Loads the trace into the trace explorer + * @param trace + */ + void loadTrace(Trace trace); + + /** + * Loads the trace into the trace explorer + * @param trace + * @param stateManager + */ + void loadTrace(Trace trace, IStateManager stateManager); + + /** + * @return The current step + */ + StepSubType getCurrentForwardStep(); + + /** + * @return The step (big or small) preceding the current step + */ + StepSubType getCurrentBackwardStep(); + + /** + * @return The big step containing the current step + */ + StepSubType getCurrentBigStep(); + + /** + * @return The current state + */ + StateSubType getCurrentState(); + + /** + * Updates the explorer so that state becomes the current state. + * @param state The State to jump to + */ + void jump(StateSubType state); + + /** + * Updates the explorer so that the first state to contain value + * becomes the current state. + * @param value The Value to jump to + */ + void jump(ValueSubType value); + + /** + * Updates the explorer so that the last recorded state and step in the trace become the current state and step. + */ + void loadLastState(); + + /** + * If the current step is a big step, updates the state of the explorer so that its current step + * becomes the first step contained by the current step. + * If the current step is a small step, updates the state of the explorer so that its current step + * becomes the step following the current step. + * @return Whether the operation succeeded or not + */ + boolean stepInto(); + + /** + * Updates the state of the explorer so that its current step becomes the step following the current step. + * @return Whether the operation succeeded or not + */ + boolean stepOver(); + + /** + * Updates the state of the explorer so that its current step becomes the step following the big step + * containing the current step. + * @return Whether the operation succeeded or not + */ + boolean stepReturn(); + + /** + * @return Whether the stepBackInto method can be called + */ + boolean canStepBackInto(); + + /** + * @return Whether the stepBackOver method can be called + */ + boolean canStepBackOver(); + + /** + * @return Whether the stepBackOut method can be called + */ + boolean canStepBackOut(); + + /** + * Updates the state of the explorer so that its current step becomes the small step preceding the current step. + * This is the backward equivalent of the step into operation. + * @return Whether the operation succeeded or not + */ + boolean stepBackInto(); + + /** + * Updates the state of the explorer so that its current step becomes the step (big or small) + * preceding the current step. + * This is the backward equivalent of the step over operation. + * @return Whether the operation succeeded or not + */ + boolean stepBackOver(); + + /** + * Updates the state of the explorer so that its current step becomes the big step containing the current step. + * This is the backward equivalent of the step return operation. + * @return Whether the operation succeeded or not + */ + boolean stepBackOut(); + + /** + * Updates the state of the explorer so that its current state is the first one to contain + * the value following the current one in the provided dimension. + * @param dimension + */ + void stepValue(DimensionSubType dimension); + + /** + * Updates the state of the explorer so that its current state is the first one to contain + * the value preceding the current one in the provided dimension. + * @param dimension + */ + void backValue(DimensionSubType dimension); + + /** + * Returns whether the provided dimension has at least one value following the current one. + * @param dimension + * @return Whether the dimension has a value following the current one + */ + boolean canStepValue(DimensionSubType dimension); + + /** + * Returns whether the provided dimension has at least one value preceding the current one. + * @param dimension + * @return Whether the dimension has a value preceding the current one + */ + boolean canBackValue(DimensionSubType dimension); + + /** + * @return Whether the explorer is in replay mode or not + */ + boolean isInReplayMode(); + + /** + * Returns the current call stack of the explorer. The current step is at the end of the list. + * @return The current call stack + */ + List getCallStack(); + + /** + * Updates the call stack of the explorer so that the provided step becomes the current step. + * The state of the explorer is then recomputed accordingly. + * @param step The step that will become the current step + */ + void updateCallStack(StepSubType step); +} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceExtractor.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceExtractor.java new file mode 100644 index 000000000..6c1a79dd5 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceExtractor.java @@ -0,0 +1,156 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.api; + +import java.util.List; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +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; + +public interface ITraceExtractor, StateSubType extends State, TracedObjectSubType extends TracedObject, DimensionSubType extends Dimension, ValueSubType extends Value> extends ITraceViewNotifier, ITraceListener { + + void loadTrace(Trace trace); + + /** + * Tells the extractor to ignore or not the value trace located at the provided index. + * @param trace The index of the value trace + * @param ignore Wether to ignore or not the value trace + */ + void ignoreDimension(DimensionSubType dimension, boolean ignore); + + /** + * Returns whether the value trace located at the provided index is ignored or not. + * @param trace The index of the value trace + * @return true if the value trace is ignored, false otherwise + */ + boolean isDimensionIgnored(DimensionSubType dimension); + + boolean isStateBreakable(StateSubType state); + + /** + * Compares two states and returns true if their values vector are the same, false otherwise. + * @param state1 The first state + * @param state2 The second state + * @param respectIgnored Whether to include ignored values in the comparison or not + * @return true if the values vectors of the states are the same, false otherwise + */ + boolean compareStates(StateSubType state1, StateSubType state2, boolean respectIgnored); + + /** + * Computes the lists of states that have the same values vectors, for a given list of states. + * @param states The list of states to process + * @return The lists of states that have the same values vectors + */ + List> computeStateEquivalenceClasses(List states); + + /** + * Computes the lists of states that have the same values vectors, for all the states of the trace. + * @return The lists of states that have the same values vectors + */ + List> computeStateEquivalenceClasses(); + + /** + * @return the launch configuration that was used to generate the trace + */ + LaunchConfiguration getLaunchConfiguration(); + + /** + * @return The number of value traces in the trace + */ + int getNumberOfDimensions(); + + List getSubSteps(Step step); + + List getSteps(int firstStateIndex, int lastStateIndex); + + /** + * Returns a description of the state. + * @param state The state + * @return A string listing all values of the state + */ + String getStateDescription(StateSubType state); + + /** + * @return The number of states in the trace + */ + int getStatesTraceLength(); + + /** + * @param stateIndex The index of the state in the trace + * @return The state + */ + StateSubType getState(int stateIndex); + + /** + * @param firstStateIndex The index of the first state + * @param lastStateIndex The index of the last state + * @return The states between the specified indexes + */ + List getStates(int firstStateIndex, int lastStateIndex); + + /** + * @param state The state + * @return The index of the state in the trace + */ + int getStateIndex(StateSubType state); + + /** + * @return The list of dimensions + */ + List getDimensions(); + + /** + * @param value the value + * @return The index of the first state in which the value is present + */ + int getValueFirstStateIndex(ValueSubType value); + + /** + * @param value the value + * @return The index of the last state in which the value is present + */ + int getValueLastStateIndex(ValueSubType value); + + /** + * + * @param dimension + * @param idxFrom + * @param idxTo + * @return The list of values + */ + List getValuesForStates(DimensionSubType dimension, int idxFrom, int idxTo); + + /** + * Returns a description of the value. + * @param value The value + * @return A string describing the value + */ + String getValueDescription(ValueSubType value); + + /** + * Returns a label for the dimension located at the provided index + * @param dimension The dimension + * @return A label for the dimension + */ + String getDimensionLabel(DimensionSubType dimension); + + /** + * Returns the length of the value trace contained by the provided dimension. + * @param dimension The dimension + * @return The length of the value trace contained by the dimension + */ + int getDimensionLength(DimensionSubType dimension); +} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceListener.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceListener.java new file mode 100644 index 000000000..49d6db532 --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceListener.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.api; + +import java.util.List; + +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.Value; + +public interface ITraceListener { + + void statesAdded(List> states); + + void stepsStarted(List> steps); + + void stepsEnded(List> steps); + + void valuesAdded(List> values); + + void dimensionsAdded(List> dimensions); +} diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceNotifier.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceNotifier.java similarity index 82% rename from trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceNotifier.java rename to trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceNotifier.java index f9dbd4499..1b55404b3 100644 --- a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/src/fr/inria/diverse/trace/gemoc/api/ITraceNotifier.java +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceNotifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Inria and others. + * Copyright (c) 2016, 2017 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 @@ -8,11 +8,13 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.trace.gemoc.api; +package org.eclipse.gemoc.trace.gemoc.api; public interface ITraceNotifier { void notifyListeners(); + + void notifyListener(ITraceListener listener); void addListener(ITraceListener listener); diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceViewListener.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceViewListener.java new file mode 100644 index 000000000..6bbc7845a --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceViewListener.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.api; + +public interface ITraceViewListener { + + void update(); + +} diff --git a/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceViewNotifier.java b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceViewNotifier.java new file mode 100644 index 000000000..a5a7ce61b --- /dev/null +++ b/trace/commons/plugins/org.eclipse.gemoc.trace.gemoc.api/src/org/eclipse/gemoc/trace/gemoc/api/ITraceViewNotifier.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.api; + +public interface ITraceViewNotifier { + + void notifyListeners(); + + void registerCommand(ITraceViewListener listener, TraceViewCommand command); + + void removeListener(ITraceViewListener listener); + + interface TraceViewCommand { + + void execute(); + + } +} diff --git a/trace/commons/pom.xml b/trace/commons/pom.xml index 1a7161cf9..1b983c9e3 100644 --- a/trace/commons/pom.xml +++ b/trace/commons/pom.xml @@ -2,27 +2,24 @@ 4.0.0 - org.gemoc.modeldebugging.trace.commons - org.gemoc.modeldebugging.trace.commons.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc.trace.commons + org.eclipse.gemoc.trace.commons.root + 2.3.0-SNAPSHOT pom - org.gemoc - org.gemoc.siriusanimation.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.root + 2.3.0-SNAPSHOT ../.. - plugins/fr.inria.diverse.trace.api - plugins/fr.inria.diverse.trace.commons - plugins/fr.inria.diverse.trace.gemoc.api - plugins/fr.inria.diverse.trace.commons.model - - releng/fr.inria.diverse.trace.commons.feature - releng/fr.inria.diverse.trace.commons.updatesite + plugins/org.eclipse.gemoc.trace.commons + plugins/org.eclipse.gemoc.trace.gemoc.api + plugins/org.eclipse.gemoc.trace.commons.model + releng/org.eclipse.gemoc.trace.commons.feature @@ -48,12 +45,7 @@ - - - gemoc-studio_gemoc_commons on CI - p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_gemoc_commons/lastSuccessfulBuild/artifact/gemoc_commons/releng/org.gemoc.gemoc_commons.repository/target/repository/ - + - - - diff --git a/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/.project b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/.project new file mode 100644 index 000000000..6efe1f5f3 --- /dev/null +++ b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.gemoc.trace.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/build.properties b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/build.properties new file mode 100644 index 000000000..f6d2f3ebf --- /dev/null +++ b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +bin.includes = feature.xml,\ + feature.properties,\ + license.html,\ + gemocstudio32.png diff --git a/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/feature.properties b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/feature.properties new file mode 100644 index 000000000..5f0414f11 --- /dev/null +++ b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/feature.properties @@ -0,0 +1,151 @@ +############################################################################### +# Copyright (c) 2012, 2017 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 +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. +# NLS_MESSAGEFORMAT_VAR + + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/feature.xml b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/feature.xml new file mode 100644 index 000000000..9d1264330 --- /dev/null +++ b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/feature.xml @@ -0,0 +1,55 @@ + + + + + + [Enter Feature Description here.] + + + + Copyright (c) 2012, 2017 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 + + + + %license + + + + + + + + + diff --git a/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/gemocstudio32.png b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/gemocstudio32.png new file mode 100644 index 000000000..fb1e5b3c7 Binary files /dev/null and b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/gemocstudio32.png differ diff --git a/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/license.html b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/license.html new file mode 100644 index 000000000..c3d34c3c2 --- /dev/null +++ b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

April 9, 2014

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ + +

Use of Provisioning Technology

+ +

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

+ +

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

+ + diff --git a/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/pom.xml b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/pom.xml new file mode 100644 index 000000000..d720990e1 --- /dev/null +++ b/trace/commons/releng/org.eclipse.gemoc.trace.commons.feature/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + org.eclipse.gemoc.trace.commons + org.eclipse.gemoc.trace.commons.feature + 2.3.0-SNAPSHOT + eclipse-feature + + + org.eclipse.gemoc.trace.commons + org.eclipse.gemoc.trace.commons.root + 2.3.0-SNAPSHOT + ../.. + + + diff --git a/trace/generator/README.md b/trace/generator/README.md index 0341be4ce..75316baeb 100644 --- a/trace/generator/README.md +++ b/trace/generator/README.md @@ -12,16 +12,14 @@ Among others, we consider an xDSML to be composed of: 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.ecorext`. 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: +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 plugin 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 *trace manager* provides services to construct a trace, and to restore the executed model into a former state. The plugin generator can be found in `fr.inria.diverse.trace.plugin.generator`. - -4. A GEMOC engine addon generator is called, 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 addon 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 @@ -29,6 +27,6 @@ This part of the GEMOC Studio is based on the paper "A Generative Approach to De **Abstract:** -> Executable Domain-Specific Modeling Languages (xDSMLs) open many possibilities for performing early verification and validation (V&V) of systems. Dynamic V&V approaches rely on execution traces, which represent the evolution of models during their execution. In order to construct traces, generic trace metamodels can be used. Yet, regarding trace manipulations, they lack both efficiency because of their sequential structure, and usability because of their gap to the xDSML. Our contribution is a generative approach that defines a rich and domain-specific trace metamodel enabling the construction of execution traces for models conforming to a given xDSML. Efficiency is increased by providing a variety of navigation paths within traces, while usability is improved by narrowing the concepts of the trace metamodel to fit the considered xDSML. We evaluated our approach by generating a trace metamodel for fUML and using it for semantic differencing, which is an important V&V activity in the realm of model evolution. Results show a significant performance improvement and simplification of the semantic differencing rules as compared to the usage of a generic trace metamodel. +> Executable Domain-Specific Modeling Languages (xDSMLs) open many possibilities for performing early verification and validation (V&V) of systems. Dynamic V&V approaches rely on execution traces, which represent the evolution of models during their execution. In order to construct traces, generic trace metamodels can be used. Yet, regarding trace manipulations, they lack both efficiency because of their sequential structure, and usability because of their gap to the xDSML. Our contribution is a generative approach that defines a rich and domain-specific trace metamodel enabling the construction of execution traces for models conforming to a given xDSML. Efficiency is increased by providing a variety of navigation paths within traces, while usability is improved by narrowing the concepts of the trace metamodel to fit the considered xDSML. We evaluated our approach by generating a trace metamodel for fUML and using it for semantic differencing, which is an important V&V activity in the realm of model evolution. Results show a significant performance improvement and simplification of the semantic differencing rules as compared to the usage of a generic trace metamodel. -The paper can be downloaded here https://hal.inria.fr/hal-01154225 \ No newline at end of file +The paper can be downloaded here https://hal.inria.fr/hal-01154225 diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/.classpath b/trace/generator/plugins/fr.inria.diverse.ecorext/.classpath deleted file mode 100644 index 1fa3e6803..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/.project b/trace/generator/plugins/fr.inria.diverse.ecorext/.project deleted file mode 100644 index d8be99cc7..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - fr.inria.diverse.ecorext - - - - - - 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/trace/generator/plugins/fr.inria.diverse.ecorext/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.ecorext/META-INF/MANIFEST.MF deleted file mode 100644 index acaaa00f9..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.inria.diverse.ecorext;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: ecorext, - ecorext.impl, - ecorext.util, - ecorext, - ecorext.impl, - ecorext.util -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.ecore.xmi;bundle-version="2.9.1" -Bundle-ActivationPolicy: lazy - diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/build.properties b/trace/generator/plugins/fr.inria.diverse.ecorext/build.properties deleted file mode 100644 index 8a899917a..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/build.properties +++ /dev/null @@ -1,12 +0,0 @@ -# - -bin.includes = .,\ - model/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties,\ - about.html -jars.compile.order = . -source.. = src/ -output.. = bin/ -src.includes = about.html diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.aird b/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.aird deleted file mode 100644 index 827448fc9..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.aird +++ /dev/null @@ -1,1381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - - - - - - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - labelSize - - - - labelSize - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.ecore b/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.ecore deleted file mode 100644 index 4826fcdb4..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.ecore +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.genmodel b/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.genmodel deleted file mode 100644 index 52bbee0a5..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/model/ecorext.genmodel +++ /dev/null @@ -1,29 +0,0 @@ - - - ecorext.ecore - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/plugin.properties b/trace/generator/plugins/fr.inria.diverse.ecorext/plugin.properties deleted file mode 100644 index 36b122076..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/plugin.properties +++ /dev/null @@ -1,4 +0,0 @@ -# - -pluginName = All Model -providerName = www.example.org diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/plugin.xml b/trace/generator/plugins/fr.inria.diverse.ecorext/plugin.xml deleted file mode 100644 index da54d05f8..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/plugin.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/pom.xml b/trace/generator/plugins/fr.inria.diverse.ecorext/pom.xml deleted file mode 100644 index eb0dbd2c9..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/pom.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 4.0.0 - fr.inria.diverse.ecorext - fr.inria.diverse.ecorext - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/ClassExtension.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/ClassExtension.java deleted file mode 100644 index 6aedb272c..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/ClassExtension.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * 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 ecorext; - -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; - -/** - * - * A representation of the model object 'Class Extension'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link ecorext.ClassExtension#getExtendedExistingClass Extended Existing Class}
  • - *
  • {@link ecorext.ClassExtension#getNewProperties New Properties}
  • - *
- * - * @see ecorext.EcorextPackage#getClassExtension() - * @model - * @generated - */ -public interface ClassExtension extends EObject { - /** - * Returns the value of the 'Extended Existing Class' reference. - * - *

- * If the meaning of the 'Extended Existing Class' reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Extended Existing Class' reference. - * @see #setExtendedExistingClass(EClass) - * @see ecorext.EcorextPackage#getClassExtension_ExtendedExistingClass() - * @model - * @generated - */ - EClass getExtendedExistingClass(); - - /** - * Sets the value of the '{@link ecorext.ClassExtension#getExtendedExistingClass Extended Existing Class}' reference. - * - * - * @param value the new value of the 'Extended Existing Class' reference. - * @see #getExtendedExistingClass() - * @generated - */ - void setExtendedExistingClass(EClass value); - - /** - * Returns the value of the 'New Properties' containment reference list. - * The list contents are of type {@link org.eclipse.emf.ecore.EStructuralFeature}. - * - *

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

- * - * @return the value of the 'New Properties' containment reference list. - * @see ecorext.EcorextPackage#getClassExtension_NewProperties() - * @model containment="true" ordered="false" - * @generated - */ - EList getNewProperties(); - -} // ClassExtension diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/Ecorext.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/Ecorext.java deleted file mode 100644 index 404fed238..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/Ecorext.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * 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 ecorext; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -/** - * - * A representation of the model object 'Ecorext'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link ecorext.Ecorext#getNewPackages New Packages}
  • - *
  • {@link ecorext.Ecorext#getClassesExtensions Classes Extensions}
  • - *
  • {@link ecorext.Ecorext#getRules Rules}
  • - *
- * - * @see ecorext.EcorextPackage#getEcorext() - * @model - * @generated - */ -public interface Ecorext extends EObject { - /** - * Returns the value of the 'New Packages' containment reference list. - * The list contents are of type {@link org.eclipse.emf.ecore.EPackage}. - * - *

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

- * - * @return the value of the 'New Packages' containment reference list. - * @see ecorext.EcorextPackage#getEcorext_NewPackages() - * @model containment="true" ordered="false" - * @generated - */ - EList getNewPackages(); - - /** - * Returns the value of the 'Classes Extensions' containment reference list. - * The list contents are of type {@link ecorext.ClassExtension}. - * - *

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

- * - * @return the value of the 'Classes Extensions' containment reference list. - * @see ecorext.EcorextPackage#getEcorext_ClassesExtensions() - * @model containment="true" ordered="false" - * @generated - */ - EList getClassesExtensions(); - - /** - * Returns the value of the 'Rules' containment reference list. - * The list contents are of type {@link ecorext.Rule}. - * - *

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

- * - * @return the value of the 'Rules' containment reference list. - * @see ecorext.EcorextPackage#getEcorext_Rules() - * @model containment="true" ordered="false" - * @generated - */ - EList getRules(); - -} // Ecorext diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/EcorextFactory.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/EcorextFactory.java deleted file mode 100644 index 9b3ebdc5e..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/EcorextFactory.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * 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 ecorext; - -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 ecorext.EcorextPackage - * @generated - */ -public interface EcorextFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - EcorextFactory eINSTANCE = ecorext.impl.EcorextFactoryImpl.init(); - - /** - * Returns a new object of class 'Ecorext'. - * - * - * @return a new object of class 'Ecorext'. - * @generated - */ - Ecorext createEcorext(); - - /** - * Returns a new object of class 'Class Extension'. - * - * - * @return a new object of class 'Class Extension'. - * @generated - */ - ClassExtension createClassExtension(); - - /** - * Returns a new object of class 'Rule'. - * - * - * @return a new object of class 'Rule'. - * @generated - */ - Rule createRule(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - EcorextPackage getEcorextPackage(); - -} //EcorextFactory diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/EcorextPackage.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/EcorextPackage.java deleted file mode 100644 index bda7bf7ee..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/EcorextPackage.java +++ /dev/null @@ -1,601 +0,0 @@ -/******************************************************************************* - * 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 ecorext; - -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 ecorext.EcorextFactory - * @model kind="package" - * @generated - */ -public interface EcorextPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "ecorext"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://ecorext/1.0"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "ecorext"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - EcorextPackage eINSTANCE = ecorext.impl.EcorextPackageImpl.init(); - - /** - * The meta object id for the '{@link ecorext.impl.EcorextImpl Ecorext}' class. - * - * - * @see ecorext.impl.EcorextImpl - * @see ecorext.impl.EcorextPackageImpl#getEcorext() - * @generated - */ - int ECOREXT = 0; - - /** - * The feature id for the 'New Packages' containment reference list. - * - * - * @generated - * @ordered - */ - int ECOREXT__NEW_PACKAGES = 0; - - /** - * The feature id for the 'Classes Extensions' containment reference list. - * - * - * @generated - * @ordered - */ - int ECOREXT__CLASSES_EXTENSIONS = 1; - - /** - * The feature id for the 'Rules' containment reference list. - * - * - * @generated - * @ordered - */ - int ECOREXT__RULES = 2; - - /** - * The number of structural features of the 'Ecorext' class. - * - * - * @generated - * @ordered - */ - int ECOREXT_FEATURE_COUNT = 3; - - /** - * The number of operations of the 'Ecorext' class. - * - * - * @generated - * @ordered - */ - int ECOREXT_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link ecorext.impl.ClassExtensionImpl Class Extension}' class. - * - * - * @see ecorext.impl.ClassExtensionImpl - * @see ecorext.impl.EcorextPackageImpl#getClassExtension() - * @generated - */ - int CLASS_EXTENSION = 1; - - /** - * The feature id for the 'Extended Existing Class' reference. - * - * - * @generated - * @ordered - */ - int CLASS_EXTENSION__EXTENDED_EXISTING_CLASS = 0; - - /** - * The feature id for the 'New Properties' containment reference list. - * - * - * @generated - * @ordered - */ - int CLASS_EXTENSION__NEW_PROPERTIES = 1; - - /** - * The number of structural features of the 'Class Extension' class. - * - * - * @generated - * @ordered - */ - int CLASS_EXTENSION_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Class Extension' class. - * - * - * @generated - * @ordered - */ - int CLASS_EXTENSION_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link ecorext.impl.RuleImpl Rule}' class. - * - * - * @see ecorext.impl.RuleImpl - * @see ecorext.impl.EcorextPackageImpl#getRule() - * @generated - */ - int RULE = 2; - - /** - * The feature id for the 'Called Rules' reference list. - * - * - * @generated - * @ordered - */ - int RULE__CALLED_RULES = 0; - - /** - * The feature id for the 'Operation' containment reference. - * - * - * @generated - * @ordered - */ - int RULE__OPERATION = 1; - - /** - * The feature id for the 'Step Rule' attribute. - * - * - * @generated - * @ordered - */ - int RULE__STEP_RULE = 2; - - /** - * The feature id for the 'Overriden By' reference list. - * - * - * @generated - * @ordered - */ - int RULE__OVERRIDEN_BY = 3; - - /** - * The feature id for the 'Overrides' reference. - * - * - * @generated - * @ordered - */ - int RULE__OVERRIDES = 4; - - /** - * The feature id for the 'Containing Class' reference. - * - * - * @generated - * @ordered - */ - int RULE__CONTAINING_CLASS = 5; - - /** - * The feature id for the 'Abstract' attribute. - * - * - * @generated - * @ordered - */ - int RULE__ABSTRACT = 6; - - /** - * The feature id for the 'Main' attribute. - * - * - * @generated - * @ordered - */ - int RULE__MAIN = 7; - - /** - * The number of structural features of the 'Rule' class. - * - * - * @generated - * @ordered - */ - int RULE_FEATURE_COUNT = 8; - - /** - * The number of operations of the 'Rule' class. - * - * - * @generated - * @ordered - */ - int RULE_OPERATION_COUNT = 0; - - - /** - * Returns the meta object for class '{@link ecorext.Ecorext Ecorext}'. - * - * - * @return the meta object for class 'Ecorext'. - * @see ecorext.Ecorext - * @generated - */ - EClass getEcorext(); - - /** - * Returns the meta object for the containment reference list '{@link ecorext.Ecorext#getNewPackages New Packages}'. - * - * - * @return the meta object for the containment reference list 'New Packages'. - * @see ecorext.Ecorext#getNewPackages() - * @see #getEcorext() - * @generated - */ - EReference getEcorext_NewPackages(); - - /** - * Returns the meta object for the containment reference list '{@link ecorext.Ecorext#getClassesExtensions Classes Extensions}'. - * - * - * @return the meta object for the containment reference list 'Classes Extensions'. - * @see ecorext.Ecorext#getClassesExtensions() - * @see #getEcorext() - * @generated - */ - EReference getEcorext_ClassesExtensions(); - - /** - * Returns the meta object for the containment reference list '{@link ecorext.Ecorext#getRules Rules}'. - * - * - * @return the meta object for the containment reference list 'Rules'. - * @see ecorext.Ecorext#getRules() - * @see #getEcorext() - * @generated - */ - EReference getEcorext_Rules(); - - /** - * Returns the meta object for class '{@link ecorext.ClassExtension Class Extension}'. - * - * - * @return the meta object for class 'Class Extension'. - * @see ecorext.ClassExtension - * @generated - */ - EClass getClassExtension(); - - /** - * Returns the meta object for the reference '{@link ecorext.ClassExtension#getExtendedExistingClass Extended Existing Class}'. - * - * - * @return the meta object for the reference 'Extended Existing Class'. - * @see ecorext.ClassExtension#getExtendedExistingClass() - * @see #getClassExtension() - * @generated - */ - EReference getClassExtension_ExtendedExistingClass(); - - /** - * Returns the meta object for the containment reference list '{@link ecorext.ClassExtension#getNewProperties New Properties}'. - * - * - * @return the meta object for the containment reference list 'New Properties'. - * @see ecorext.ClassExtension#getNewProperties() - * @see #getClassExtension() - * @generated - */ - EReference getClassExtension_NewProperties(); - - /** - * Returns the meta object for class '{@link ecorext.Rule Rule}'. - * - * - * @return the meta object for class 'Rule'. - * @see ecorext.Rule - * @generated - */ - EClass getRule(); - - /** - * Returns the meta object for the reference list '{@link ecorext.Rule#getCalledRules Called Rules}'. - * - * - * @return the meta object for the reference list 'Called Rules'. - * @see ecorext.Rule#getCalledRules() - * @see #getRule() - * @generated - */ - EReference getRule_CalledRules(); - - /** - * Returns the meta object for the containment reference '{@link ecorext.Rule#getOperation Operation}'. - * - * - * @return the meta object for the containment reference 'Operation'. - * @see ecorext.Rule#getOperation() - * @see #getRule() - * @generated - */ - EReference getRule_Operation(); - - /** - * Returns the meta object for the attribute '{@link ecorext.Rule#isStepRule Step Rule}'. - * - * - * @return the meta object for the attribute 'Step Rule'. - * @see ecorext.Rule#isStepRule() - * @see #getRule() - * @generated - */ - EAttribute getRule_StepRule(); - - /** - * Returns the meta object for the reference list '{@link ecorext.Rule#getOverridenBy Overriden By}'. - * - * - * @return the meta object for the reference list 'Overriden By'. - * @see ecorext.Rule#getOverridenBy() - * @see #getRule() - * @generated - */ - EReference getRule_OverridenBy(); - - /** - * Returns the meta object for the reference '{@link ecorext.Rule#getOverrides Overrides}'. - * - * - * @return the meta object for the reference 'Overrides'. - * @see ecorext.Rule#getOverrides() - * @see #getRule() - * @generated - */ - EReference getRule_Overrides(); - - /** - * Returns the meta object for the reference '{@link ecorext.Rule#getContainingClass Containing Class}'. - * - * - * @return the meta object for the reference 'Containing Class'. - * @see ecorext.Rule#getContainingClass() - * @see #getRule() - * @generated - */ - EReference getRule_ContainingClass(); - - /** - * Returns the meta object for the attribute '{@link ecorext.Rule#isAbstract Abstract}'. - * - * - * @return the meta object for the attribute 'Abstract'. - * @see ecorext.Rule#isAbstract() - * @see #getRule() - * @generated - */ - EAttribute getRule_Abstract(); - - /** - * Returns the meta object for the attribute '{@link ecorext.Rule#isMain Main}'. - * - * - * @return the meta object for the attribute 'Main'. - * @see ecorext.Rule#isMain() - * @see #getRule() - * @generated - */ - EAttribute getRule_Main(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - EcorextFactory getEcorextFactory(); - - /** - * - * 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 ecorext.impl.EcorextImpl Ecorext}' class. - * - * - * @see ecorext.impl.EcorextImpl - * @see ecorext.impl.EcorextPackageImpl#getEcorext() - * @generated - */ - EClass ECOREXT = eINSTANCE.getEcorext(); - - /** - * The meta object literal for the 'New Packages' containment reference list feature. - * - * - * @generated - */ - EReference ECOREXT__NEW_PACKAGES = eINSTANCE.getEcorext_NewPackages(); - - /** - * The meta object literal for the 'Classes Extensions' containment reference list feature. - * - * - * @generated - */ - EReference ECOREXT__CLASSES_EXTENSIONS = eINSTANCE.getEcorext_ClassesExtensions(); - - /** - * The meta object literal for the 'Rules' containment reference list feature. - * - * - * @generated - */ - EReference ECOREXT__RULES = eINSTANCE.getEcorext_Rules(); - - /** - * The meta object literal for the '{@link ecorext.impl.ClassExtensionImpl Class Extension}' class. - * - * - * @see ecorext.impl.ClassExtensionImpl - * @see ecorext.impl.EcorextPackageImpl#getClassExtension() - * @generated - */ - EClass CLASS_EXTENSION = eINSTANCE.getClassExtension(); - - /** - * The meta object literal for the 'Extended Existing Class' reference feature. - * - * - * @generated - */ - EReference CLASS_EXTENSION__EXTENDED_EXISTING_CLASS = eINSTANCE.getClassExtension_ExtendedExistingClass(); - - /** - * The meta object literal for the 'New Properties' containment reference list feature. - * - * - * @generated - */ - EReference CLASS_EXTENSION__NEW_PROPERTIES = eINSTANCE.getClassExtension_NewProperties(); - - /** - * The meta object literal for the '{@link ecorext.impl.RuleImpl Rule}' class. - * - * - * @see ecorext.impl.RuleImpl - * @see ecorext.impl.EcorextPackageImpl#getRule() - * @generated - */ - EClass RULE = eINSTANCE.getRule(); - - /** - * The meta object literal for the 'Called Rules' reference list feature. - * - * - * @generated - */ - EReference RULE__CALLED_RULES = eINSTANCE.getRule_CalledRules(); - - /** - * The meta object literal for the 'Operation' containment reference feature. - * - * - * @generated - */ - EReference RULE__OPERATION = eINSTANCE.getRule_Operation(); - - /** - * The meta object literal for the 'Step Rule' attribute feature. - * - * - * @generated - */ - EAttribute RULE__STEP_RULE = eINSTANCE.getRule_StepRule(); - - /** - * The meta object literal for the 'Overriden By' reference list feature. - * - * - * @generated - */ - EReference RULE__OVERRIDEN_BY = eINSTANCE.getRule_OverridenBy(); - - /** - * The meta object literal for the 'Overrides' reference feature. - * - * - * @generated - */ - EReference RULE__OVERRIDES = eINSTANCE.getRule_Overrides(); - - /** - * The meta object literal for the 'Containing Class' reference feature. - * - * - * @generated - */ - EReference RULE__CONTAINING_CLASS = eINSTANCE.getRule_ContainingClass(); - - /** - * The meta object literal for the 'Abstract' attribute feature. - * - * - * @generated - */ - EAttribute RULE__ABSTRACT = eINSTANCE.getRule_Abstract(); - - /** - * The meta object literal for the 'Main' attribute feature. - * - * - * @generated - */ - EAttribute RULE__MAIN = eINSTANCE.getRule_Main(); - - } - -} //EcorextPackage diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/Rule.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/Rule.java deleted file mode 100644 index 458dd0842..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/Rule.java +++ /dev/null @@ -1,235 +0,0 @@ -/******************************************************************************* - * 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 ecorext; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EOperation; - -/** - * - * A representation of the model object 'Rule'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link ecorext.Rule#getCalledRules Called Rules}
  • - *
  • {@link ecorext.Rule#getOperation Operation}
  • - *
  • {@link ecorext.Rule#isStepRule Step Rule}
  • - *
  • {@link ecorext.Rule#getOverridenBy Overriden By}
  • - *
  • {@link ecorext.Rule#getOverrides Overrides}
  • - *
  • {@link ecorext.Rule#getContainingClass Containing Class}
  • - *
  • {@link ecorext.Rule#isAbstract Abstract}
  • - *
  • {@link ecorext.Rule#isMain Main}
  • - *
- * - * @see ecorext.EcorextPackage#getRule() - * @model - * @generated - */ -public interface Rule extends EObject { - /** - * Returns the value of the 'Called Rules' reference list. - * The list contents are of type {@link ecorext.Rule}. - * - *

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

- * - * @return the value of the 'Called Rules' reference list. - * @see ecorext.EcorextPackage#getRule_CalledRules() - * @model ordered="false" - * @generated - */ - EList getCalledRules(); - - /** - * Returns the value of the 'Operation' containment reference. - * - *

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

- * - * @return the value of the 'Operation' containment reference. - * @see #setOperation(EOperation) - * @see ecorext.EcorextPackage#getRule_Operation() - * @model containment="true" required="true" - * @generated - */ - EOperation getOperation(); - - /** - * Sets the value of the '{@link ecorext.Rule#getOperation Operation}' containment reference. - * - * - * @param value the new value of the 'Operation' containment reference. - * @see #getOperation() - * @generated - */ - void setOperation(EOperation value); - - /** - * Returns the value of the 'Step Rule' attribute. - * - *

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

- * - * @return the value of the 'Step Rule' attribute. - * @see #setStepRule(boolean) - * @see ecorext.EcorextPackage#getRule_StepRule() - * @model required="true" - * @generated - */ - boolean isStepRule(); - - /** - * Sets the value of the '{@link ecorext.Rule#isStepRule Step Rule}' attribute. - * - * - * @param value the new value of the 'Step Rule' attribute. - * @see #isStepRule() - * @generated - */ - void setStepRule(boolean value); - - /** - * Returns the value of the 'Overriden By' reference list. - * The list contents are of type {@link ecorext.Rule}. - * It is bidirectional and its opposite is '{@link ecorext.Rule#getOverrides Overrides}'. - * - *

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

- * - * @return the value of the 'Overriden By' reference list. - * @see ecorext.EcorextPackage#getRule_OverridenBy() - * @see ecorext.Rule#getOverrides - * @model opposite="overrides" ordered="false" - * @generated - */ - EList getOverridenBy(); - - /** - * Returns the value of the 'Overrides' reference. - * It is bidirectional and its opposite is '{@link ecorext.Rule#getOverridenBy Overriden By}'. - * - *

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

- * - * @return the value of the 'Overrides' reference. - * @see #setOverrides(Rule) - * @see ecorext.EcorextPackage#getRule_Overrides() - * @see ecorext.Rule#getOverridenBy - * @model opposite="overridenBy" - * @generated - */ - Rule getOverrides(); - - /** - * Sets the value of the '{@link ecorext.Rule#getOverrides Overrides}' reference. - * - * - * @param value the new value of the 'Overrides' reference. - * @see #getOverrides() - * @generated - */ - void setOverrides(Rule value); - - /** - * Returns the value of the 'Containing Class' reference. - * - *

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

- * - * @return the value of the 'Containing Class' reference. - * @see #setContainingClass(EClass) - * @see ecorext.EcorextPackage#getRule_ContainingClass() - * @model - * @generated - */ - EClass getContainingClass(); - - /** - * Sets the value of the '{@link ecorext.Rule#getContainingClass Containing Class}' reference. - * - * - * @param value the new value of the 'Containing Class' reference. - * @see #getContainingClass() - * @generated - */ - void setContainingClass(EClass value); - - /** - * Returns the value of the 'Abstract' attribute. - * - *

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

- * - * @return the value of the 'Abstract' attribute. - * @see #setAbstract(boolean) - * @see ecorext.EcorextPackage#getRule_Abstract() - * @model required="true" - * @generated - */ - boolean isAbstract(); - - /** - * Sets the value of the '{@link ecorext.Rule#isAbstract Abstract}' attribute. - * - * - * @param value the new value of the 'Abstract' attribute. - * @see #isAbstract() - * @generated - */ - void setAbstract(boolean value); - - /** - * Returns the value of the 'Main' attribute. - * - *

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

- * - * @return the value of the 'Main' attribute. - * @see #setMain(boolean) - * @see ecorext.EcorextPackage#getRule_Main() - * @model - * @generated - */ - boolean isMain(); - - /** - * Sets the value of the '{@link ecorext.Rule#isMain Main}' attribute. - * - * - * @param value the new value of the 'Main' attribute. - * @see #isMain() - * @generated - */ - void setMain(boolean value); - -} // Rule diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/ClassExtensionImpl.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/ClassExtensionImpl.java deleted file mode 100644 index b6a22cefa..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/ClassExtensionImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -/******************************************************************************* - * 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 ecorext.impl; - -import ecorext.ClassExtension; -import ecorext.EcorextPackage; - -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.EStructuralFeature; -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; - -/** - * - * An implementation of the model object 'Class Extension'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link ecorext.impl.ClassExtensionImpl#getExtendedExistingClass Extended Existing Class}
  • - *
  • {@link ecorext.impl.ClassExtensionImpl#getNewProperties New Properties}
  • - *
- * - * @generated - */ -public class ClassExtensionImpl extends MinimalEObjectImpl.Container implements ClassExtension { - /** - * The cached value of the '{@link #getExtendedExistingClass() Extended Existing Class}' reference. - * - * - * @see #getExtendedExistingClass() - * @generated - * @ordered - */ - protected EClass extendedExistingClass; - - /** - * The cached value of the '{@link #getNewProperties() New Properties}' containment reference list. - * - * - * @see #getNewProperties() - * @generated - * @ordered - */ - protected EList newProperties; - - /** - * - * - * @generated - */ - protected ClassExtensionImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return EcorextPackage.Literals.CLASS_EXTENSION; - } - - /** - * - * - * @generated - */ - public EClass getExtendedExistingClass() { - if (extendedExistingClass != null && extendedExistingClass.eIsProxy()) { - InternalEObject oldExtendedExistingClass = (InternalEObject)extendedExistingClass; - extendedExistingClass = (EClass)eResolveProxy(oldExtendedExistingClass); - if (extendedExistingClass != oldExtendedExistingClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorextPackage.CLASS_EXTENSION__EXTENDED_EXISTING_CLASS, oldExtendedExistingClass, extendedExistingClass)); - } - } - return extendedExistingClass; - } - - /** - * - * - * @generated - */ - public EClass basicGetExtendedExistingClass() { - return extendedExistingClass; - } - - /** - * - * - * @generated - */ - public void setExtendedExistingClass(EClass newExtendedExistingClass) { - EClass oldExtendedExistingClass = extendedExistingClass; - extendedExistingClass = newExtendedExistingClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EcorextPackage.CLASS_EXTENSION__EXTENDED_EXISTING_CLASS, oldExtendedExistingClass, extendedExistingClass)); - } - - /** - * - * - * @generated - */ - public EList getNewProperties() { - if (newProperties == null) { - newProperties = new EObjectContainmentEList(EStructuralFeature.class, this, EcorextPackage.CLASS_EXTENSION__NEW_PROPERTIES); - } - return newProperties; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case EcorextPackage.CLASS_EXTENSION__NEW_PROPERTIES: - return ((InternalEList)getNewProperties()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case EcorextPackage.CLASS_EXTENSION__EXTENDED_EXISTING_CLASS: - if (resolve) return getExtendedExistingClass(); - return basicGetExtendedExistingClass(); - case EcorextPackage.CLASS_EXTENSION__NEW_PROPERTIES: - return getNewProperties(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case EcorextPackage.CLASS_EXTENSION__EXTENDED_EXISTING_CLASS: - setExtendedExistingClass((EClass)newValue); - return; - case EcorextPackage.CLASS_EXTENSION__NEW_PROPERTIES: - getNewProperties().clear(); - getNewProperties().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case EcorextPackage.CLASS_EXTENSION__EXTENDED_EXISTING_CLASS: - setExtendedExistingClass((EClass)null); - return; - case EcorextPackage.CLASS_EXTENSION__NEW_PROPERTIES: - getNewProperties().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case EcorextPackage.CLASS_EXTENSION__EXTENDED_EXISTING_CLASS: - return extendedExistingClass != null; - case EcorextPackage.CLASS_EXTENSION__NEW_PROPERTIES: - return newProperties != null && !newProperties.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ClassExtensionImpl diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextFactoryImpl.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextFactoryImpl.java deleted file mode 100644 index 01e49e90b..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextFactoryImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -/******************************************************************************* - * 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 ecorext.impl; - -import ecorext.*; - -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; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class EcorextFactoryImpl extends EFactoryImpl implements EcorextFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static EcorextFactory init() { - try { - EcorextFactory theEcorextFactory = (EcorextFactory)EPackage.Registry.INSTANCE.getEFactory(EcorextPackage.eNS_URI); - if (theEcorextFactory != null) { - return theEcorextFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new EcorextFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public EcorextFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case EcorextPackage.ECOREXT: return createEcorext(); - case EcorextPackage.CLASS_EXTENSION: return createClassExtension(); - case EcorextPackage.RULE: return createRule(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Ecorext createEcorext() { - EcorextImpl ecorext = new EcorextImpl(); - return ecorext; - } - - /** - * - * - * @generated - */ - public ClassExtension createClassExtension() { - ClassExtensionImpl classExtension = new ClassExtensionImpl(); - return classExtension; - } - - /** - * - * - * @generated - */ - public Rule createRule() { - RuleImpl rule = new RuleImpl(); - return rule; - } - - /** - * - * - * @generated - */ - public EcorextPackage getEcorextPackage() { - return (EcorextPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static EcorextPackage getPackage() { - return EcorextPackage.eINSTANCE; - } - -} //EcorextFactoryImpl diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextImpl.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextImpl.java deleted file mode 100644 index 012298d33..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextImpl.java +++ /dev/null @@ -1,234 +0,0 @@ -/******************************************************************************* - * 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 ecorext.impl; - -import ecorext.ClassExtension; -import ecorext.Ecorext; -import ecorext.EcorextPackage; -import ecorext.Rule; - -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.EPackage; -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; - -/** - * - * An implementation of the model object 'Ecorext'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link ecorext.impl.EcorextImpl#getNewPackages New Packages}
  • - *
  • {@link ecorext.impl.EcorextImpl#getClassesExtensions Classes Extensions}
  • - *
  • {@link ecorext.impl.EcorextImpl#getRules Rules}
  • - *
- * - * @generated - */ -public class EcorextImpl extends MinimalEObjectImpl.Container implements Ecorext { - /** - * The cached value of the '{@link #getNewPackages() New Packages}' containment reference list. - * - * - * @see #getNewPackages() - * @generated - * @ordered - */ - protected EList newPackages; - - /** - * The cached value of the '{@link #getClassesExtensions() Classes Extensions}' containment reference list. - * - * - * @see #getClassesExtensions() - * @generated - * @ordered - */ - protected EList classesExtensions; - - /** - * The cached value of the '{@link #getRules() Rules}' containment reference list. - * - * - * @see #getRules() - * @generated - * @ordered - */ - protected EList rules; - - /** - * - * - * @generated - */ - protected EcorextImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return EcorextPackage.Literals.ECOREXT; - } - - /** - * - * - * @generated - */ - public EList getNewPackages() { - if (newPackages == null) { - newPackages = new EObjectContainmentEList(EPackage.class, this, EcorextPackage.ECOREXT__NEW_PACKAGES); - } - return newPackages; - } - - /** - * - * - * @generated - */ - public EList getClassesExtensions() { - if (classesExtensions == null) { - classesExtensions = new EObjectContainmentEList(ClassExtension.class, this, EcorextPackage.ECOREXT__CLASSES_EXTENSIONS); - } - return classesExtensions; - } - - /** - * - * - * @generated - */ - public EList getRules() { - if (rules == null) { - rules = new EObjectContainmentEList(Rule.class, this, EcorextPackage.ECOREXT__RULES); - } - return rules; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case EcorextPackage.ECOREXT__NEW_PACKAGES: - return ((InternalEList)getNewPackages()).basicRemove(otherEnd, msgs); - case EcorextPackage.ECOREXT__CLASSES_EXTENSIONS: - return ((InternalEList)getClassesExtensions()).basicRemove(otherEnd, msgs); - case EcorextPackage.ECOREXT__RULES: - return ((InternalEList)getRules()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case EcorextPackage.ECOREXT__NEW_PACKAGES: - return getNewPackages(); - case EcorextPackage.ECOREXT__CLASSES_EXTENSIONS: - return getClassesExtensions(); - case EcorextPackage.ECOREXT__RULES: - return getRules(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case EcorextPackage.ECOREXT__NEW_PACKAGES: - getNewPackages().clear(); - getNewPackages().addAll((Collection)newValue); - return; - case EcorextPackage.ECOREXT__CLASSES_EXTENSIONS: - getClassesExtensions().clear(); - getClassesExtensions().addAll((Collection)newValue); - return; - case EcorextPackage.ECOREXT__RULES: - getRules().clear(); - getRules().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case EcorextPackage.ECOREXT__NEW_PACKAGES: - getNewPackages().clear(); - return; - case EcorextPackage.ECOREXT__CLASSES_EXTENSIONS: - getClassesExtensions().clear(); - return; - case EcorextPackage.ECOREXT__RULES: - getRules().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case EcorextPackage.ECOREXT__NEW_PACKAGES: - return newPackages != null && !newPackages.isEmpty(); - case EcorextPackage.ECOREXT__CLASSES_EXTENSIONS: - return classesExtensions != null && !classesExtensions.isEmpty(); - case EcorextPackage.ECOREXT__RULES: - return rules != null && !rules.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //EcorextImpl diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextPackageImpl.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextPackageImpl.java deleted file mode 100644 index 8b406fac8..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/EcorextPackageImpl.java +++ /dev/null @@ -1,360 +0,0 @@ -/******************************************************************************* - * 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 ecorext.impl; - -import ecorext.ClassExtension; -import ecorext.Ecorext; -import ecorext.EcorextFactory; -import ecorext.EcorextPackage; -import ecorext.Rule; - -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; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class EcorextPackageImpl extends EPackageImpl implements EcorextPackage { - /** - * - * - * @generated - */ - private EClass ecorextEClass = null; - - /** - * - * - * @generated - */ - private EClass classExtensionEClass = null; - - /** - * - * - * @generated - */ - private EClass ruleEClass = 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 ecorext.EcorextPackage#eNS_URI - * @see #init() - * @generated - */ - private EcorextPackageImpl() { - super(eNS_URI, EcorextFactory.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 EcorextPackage#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 EcorextPackage init() { - if (isInited) return (EcorextPackage)EPackage.Registry.INSTANCE.getEPackage(EcorextPackage.eNS_URI); - - // Obtain or create and register package - EcorextPackageImpl theEcorextPackage = (EcorextPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EcorextPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new EcorextPackageImpl()); - - isInited = true; - - // Create package meta-data objects - theEcorextPackage.createPackageContents(); - - // Initialize created meta-data - theEcorextPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theEcorextPackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(EcorextPackage.eNS_URI, theEcorextPackage); - return theEcorextPackage; - } - - /** - * - * - * @generated - */ - public EClass getEcorext() { - return ecorextEClass; - } - - /** - * - * - * @generated - */ - public EReference getEcorext_NewPackages() { - return (EReference)ecorextEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getEcorext_ClassesExtensions() { - return (EReference)ecorextEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getEcorext_Rules() { - return (EReference)ecorextEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getClassExtension() { - return classExtensionEClass; - } - - /** - * - * - * @generated - */ - public EReference getClassExtension_ExtendedExistingClass() { - return (EReference)classExtensionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getClassExtension_NewProperties() { - return (EReference)classExtensionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getRule() { - return ruleEClass; - } - - /** - * - * - * @generated - */ - public EReference getRule_CalledRules() { - return (EReference)ruleEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getRule_Operation() { - return (EReference)ruleEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getRule_StepRule() { - return (EAttribute)ruleEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getRule_OverridenBy() { - return (EReference)ruleEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getRule_Overrides() { - return (EReference)ruleEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getRule_ContainingClass() { - return (EReference)ruleEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EAttribute getRule_Abstract() { - return (EAttribute)ruleEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EAttribute getRule_Main() { - return (EAttribute)ruleEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EcorextFactory getEcorextFactory() { - return (EcorextFactory)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 - ecorextEClass = createEClass(ECOREXT); - createEReference(ecorextEClass, ECOREXT__NEW_PACKAGES); - createEReference(ecorextEClass, ECOREXT__CLASSES_EXTENSIONS); - createEReference(ecorextEClass, ECOREXT__RULES); - - classExtensionEClass = createEClass(CLASS_EXTENSION); - createEReference(classExtensionEClass, CLASS_EXTENSION__EXTENDED_EXISTING_CLASS); - createEReference(classExtensionEClass, CLASS_EXTENSION__NEW_PROPERTIES); - - ruleEClass = createEClass(RULE); - createEReference(ruleEClass, RULE__CALLED_RULES); - createEReference(ruleEClass, RULE__OPERATION); - createEAttribute(ruleEClass, RULE__STEP_RULE); - createEReference(ruleEClass, RULE__OVERRIDEN_BY); - createEReference(ruleEClass, RULE__OVERRIDES); - createEReference(ruleEClass, RULE__CONTAINING_CLASS); - createEAttribute(ruleEClass, RULE__ABSTRACT); - createEAttribute(ruleEClass, RULE__MAIN); - } - - /** - * - * - * @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); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - - // Initialize classes, features, and operations; add parameters - initEClass(ecorextEClass, Ecorext.class, "Ecorext", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getEcorext_NewPackages(), ecorePackage.getEPackage(), null, "newPackages", null, 0, -1, Ecorext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getEcorext_ClassesExtensions(), this.getClassExtension(), null, "classesExtensions", null, 0, -1, Ecorext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getEcorext_Rules(), this.getRule(), null, "rules", null, 0, -1, Ecorext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - - initEClass(classExtensionEClass, ClassExtension.class, "ClassExtension", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getClassExtension_ExtendedExistingClass(), ecorePackage.getEClass(), null, "extendedExistingClass", null, 0, 1, ClassExtension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getClassExtension_NewProperties(), ecorePackage.getEStructuralFeature(), null, "newProperties", null, 0, -1, ClassExtension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - - initEClass(ruleEClass, Rule.class, "Rule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getRule_CalledRules(), this.getRule(), null, "calledRules", null, 0, -1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getRule_Operation(), ecorePackage.getEOperation(), null, "operation", null, 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getRule_StepRule(), ecorePackage.getEBoolean(), "stepRule", null, 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getRule_OverridenBy(), this.getRule(), this.getRule_Overrides(), "overridenBy", null, 0, -1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getRule_Overrides(), this.getRule(), this.getRule_OverridenBy(), "overrides", null, 0, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getRule_ContainingClass(), ecorePackage.getEClass(), null, "containingClass", null, 0, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getRule_Abstract(), ecorePackage.getEBoolean(), "abstract", null, 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getRule_Main(), ecorePackage.getEBoolean(), "main", null, 0, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Create resource - createResource(eNS_URI); - } - -} //EcorextPackageImpl diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/RuleImpl.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/RuleImpl.java deleted file mode 100644 index 08a786144..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/impl/RuleImpl.java +++ /dev/null @@ -1,602 +0,0 @@ -/******************************************************************************* - * 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 ecorext.impl; - -import ecorext.EcorextPackage; -import ecorext.Rule; - -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.EOperation; -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.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Rule'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link ecorext.impl.RuleImpl#getCalledRules Called Rules}
  • - *
  • {@link ecorext.impl.RuleImpl#getOperation Operation}
  • - *
  • {@link ecorext.impl.RuleImpl#isStepRule Step Rule}
  • - *
  • {@link ecorext.impl.RuleImpl#getOverridenBy Overriden By}
  • - *
  • {@link ecorext.impl.RuleImpl#getOverrides Overrides}
  • - *
  • {@link ecorext.impl.RuleImpl#getContainingClass Containing Class}
  • - *
  • {@link ecorext.impl.RuleImpl#isAbstract Abstract}
  • - *
  • {@link ecorext.impl.RuleImpl#isMain Main}
  • - *
- * - * @generated - */ -public class RuleImpl extends MinimalEObjectImpl.Container implements Rule { - /** - * The cached value of the '{@link #getCalledRules() Called Rules}' reference list. - * - * - * @see #getCalledRules() - * @generated - * @ordered - */ - protected EList calledRules; - - /** - * The cached value of the '{@link #getOperation() Operation}' containment reference. - * - * - * @see #getOperation() - * @generated - * @ordered - */ - protected EOperation operation; - - /** - * The default value of the '{@link #isStepRule() Step Rule}' attribute. - * - * - * @see #isStepRule() - * @generated - * @ordered - */ - protected static final boolean STEP_RULE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isStepRule() Step Rule}' attribute. - * - * - * @see #isStepRule() - * @generated - * @ordered - */ - protected boolean stepRule = STEP_RULE_EDEFAULT; - - /** - * The cached value of the '{@link #getOverridenBy() Overriden By}' reference list. - * - * - * @see #getOverridenBy() - * @generated - * @ordered - */ - protected EList overridenBy; - - /** - * The cached value of the '{@link #getOverrides() Overrides}' reference. - * - * - * @see #getOverrides() - * @generated - * @ordered - */ - protected Rule overrides; - - /** - * The cached value of the '{@link #getContainingClass() Containing Class}' reference. - * - * - * @see #getContainingClass() - * @generated - * @ordered - */ - protected EClass containingClass; - - /** - * The default value of the '{@link #isAbstract() Abstract}' attribute. - * - * - * @see #isAbstract() - * @generated - * @ordered - */ - protected static final boolean ABSTRACT_EDEFAULT = false; - - /** - * The cached value of the '{@link #isAbstract() Abstract}' attribute. - * - * - * @see #isAbstract() - * @generated - * @ordered - */ - protected boolean abstract_ = ABSTRACT_EDEFAULT; - - /** - * The default value of the '{@link #isMain() Main}' attribute. - * - * - * @see #isMain() - * @generated - * @ordered - */ - protected static final boolean MAIN_EDEFAULT = false; - - /** - * The cached value of the '{@link #isMain() Main}' attribute. - * - * - * @see #isMain() - * @generated - * @ordered - */ - protected boolean main = MAIN_EDEFAULT; - - /** - * - * - * @generated - */ - protected RuleImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return EcorextPackage.Literals.RULE; - } - - /** - * - * - * @generated - */ - public EList getCalledRules() { - if (calledRules == null) { - calledRules = new EObjectResolvingEList(Rule.class, this, EcorextPackage.RULE__CALLED_RULES); - } - return calledRules; - } - - /** - * - * - * @generated - */ - public EOperation getOperation() { - return operation; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetOperation(EOperation newOperation, NotificationChain msgs) { - EOperation oldOperation = operation; - operation = newOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorextPackage.RULE__OPERATION, oldOperation, newOperation); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setOperation(EOperation newOperation) { - if (newOperation != operation) { - NotificationChain msgs = null; - if (operation != null) - msgs = ((InternalEObject)operation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorextPackage.RULE__OPERATION, null, msgs); - if (newOperation != null) - msgs = ((InternalEObject)newOperation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorextPackage.RULE__OPERATION, null, msgs); - msgs = basicSetOperation(newOperation, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EcorextPackage.RULE__OPERATION, newOperation, newOperation)); - } - - /** - * - * - * @generated - */ - public boolean isStepRule() { - return stepRule; - } - - /** - * - * - * @generated - */ - public void setStepRule(boolean newStepRule) { - boolean oldStepRule = stepRule; - stepRule = newStepRule; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EcorextPackage.RULE__STEP_RULE, oldStepRule, stepRule)); - } - - /** - * - * - * @generated - */ - public EList getOverridenBy() { - if (overridenBy == null) { - overridenBy = new EObjectWithInverseResolvingEList(Rule.class, this, EcorextPackage.RULE__OVERRIDEN_BY, EcorextPackage.RULE__OVERRIDES); - } - return overridenBy; - } - - /** - * - * - * @generated - */ - public Rule getOverrides() { - if (overrides != null && overrides.eIsProxy()) { - InternalEObject oldOverrides = (InternalEObject)overrides; - overrides = (Rule)eResolveProxy(oldOverrides); - if (overrides != oldOverrides) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorextPackage.RULE__OVERRIDES, oldOverrides, overrides)); - } - } - return overrides; - } - - /** - * - * - * @generated - */ - public Rule basicGetOverrides() { - return overrides; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetOverrides(Rule newOverrides, NotificationChain msgs) { - Rule oldOverrides = overrides; - overrides = newOverrides; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorextPackage.RULE__OVERRIDES, oldOverrides, newOverrides); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setOverrides(Rule newOverrides) { - if (newOverrides != overrides) { - NotificationChain msgs = null; - if (overrides != null) - msgs = ((InternalEObject)overrides).eInverseRemove(this, EcorextPackage.RULE__OVERRIDEN_BY, Rule.class, msgs); - if (newOverrides != null) - msgs = ((InternalEObject)newOverrides).eInverseAdd(this, EcorextPackage.RULE__OVERRIDEN_BY, Rule.class, msgs); - msgs = basicSetOverrides(newOverrides, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EcorextPackage.RULE__OVERRIDES, newOverrides, newOverrides)); - } - - /** - * - * - * @generated - */ - public EClass getContainingClass() { - if (containingClass != null && containingClass.eIsProxy()) { - InternalEObject oldContainingClass = (InternalEObject)containingClass; - containingClass = (EClass)eResolveProxy(oldContainingClass); - if (containingClass != oldContainingClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorextPackage.RULE__CONTAINING_CLASS, oldContainingClass, containingClass)); - } - } - return containingClass; - } - - /** - * - * - * @generated - */ - public EClass basicGetContainingClass() { - return containingClass; - } - - /** - * - * - * @generated - */ - public void setContainingClass(EClass newContainingClass) { - EClass oldContainingClass = containingClass; - containingClass = newContainingClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EcorextPackage.RULE__CONTAINING_CLASS, oldContainingClass, containingClass)); - } - - /** - * - * - * @generated - */ - public boolean isAbstract() { - return abstract_; - } - - /** - * - * - * @generated - */ - public void setAbstract(boolean newAbstract) { - boolean oldAbstract = abstract_; - abstract_ = newAbstract; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EcorextPackage.RULE__ABSTRACT, oldAbstract, abstract_)); - } - - /** - * - * - * @generated - */ - public boolean isMain() { - return main; - } - - /** - * - * - * @generated - */ - public void setMain(boolean newMain) { - boolean oldMain = main; - main = newMain; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EcorextPackage.RULE__MAIN, oldMain, main)); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case EcorextPackage.RULE__OVERRIDEN_BY: - return ((InternalEList)(InternalEList)getOverridenBy()).basicAdd(otherEnd, msgs); - case EcorextPackage.RULE__OVERRIDES: - if (overrides != null) - msgs = ((InternalEObject)overrides).eInverseRemove(this, EcorextPackage.RULE__OVERRIDEN_BY, Rule.class, msgs); - return basicSetOverrides((Rule)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case EcorextPackage.RULE__OPERATION: - return basicSetOperation(null, msgs); - case EcorextPackage.RULE__OVERRIDEN_BY: - return ((InternalEList)getOverridenBy()).basicRemove(otherEnd, msgs); - case EcorextPackage.RULE__OVERRIDES: - return basicSetOverrides(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case EcorextPackage.RULE__CALLED_RULES: - return getCalledRules(); - case EcorextPackage.RULE__OPERATION: - return getOperation(); - case EcorextPackage.RULE__STEP_RULE: - return isStepRule(); - case EcorextPackage.RULE__OVERRIDEN_BY: - return getOverridenBy(); - case EcorextPackage.RULE__OVERRIDES: - if (resolve) return getOverrides(); - return basicGetOverrides(); - case EcorextPackage.RULE__CONTAINING_CLASS: - if (resolve) return getContainingClass(); - return basicGetContainingClass(); - case EcorextPackage.RULE__ABSTRACT: - return isAbstract(); - case EcorextPackage.RULE__MAIN: - return isMain(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case EcorextPackage.RULE__CALLED_RULES: - getCalledRules().clear(); - getCalledRules().addAll((Collection)newValue); - return; - case EcorextPackage.RULE__OPERATION: - setOperation((EOperation)newValue); - return; - case EcorextPackage.RULE__STEP_RULE: - setStepRule((Boolean)newValue); - return; - case EcorextPackage.RULE__OVERRIDEN_BY: - getOverridenBy().clear(); - getOverridenBy().addAll((Collection)newValue); - return; - case EcorextPackage.RULE__OVERRIDES: - setOverrides((Rule)newValue); - return; - case EcorextPackage.RULE__CONTAINING_CLASS: - setContainingClass((EClass)newValue); - return; - case EcorextPackage.RULE__ABSTRACT: - setAbstract((Boolean)newValue); - return; - case EcorextPackage.RULE__MAIN: - setMain((Boolean)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case EcorextPackage.RULE__CALLED_RULES: - getCalledRules().clear(); - return; - case EcorextPackage.RULE__OPERATION: - setOperation((EOperation)null); - return; - case EcorextPackage.RULE__STEP_RULE: - setStepRule(STEP_RULE_EDEFAULT); - return; - case EcorextPackage.RULE__OVERRIDEN_BY: - getOverridenBy().clear(); - return; - case EcorextPackage.RULE__OVERRIDES: - setOverrides((Rule)null); - return; - case EcorextPackage.RULE__CONTAINING_CLASS: - setContainingClass((EClass)null); - return; - case EcorextPackage.RULE__ABSTRACT: - setAbstract(ABSTRACT_EDEFAULT); - return; - case EcorextPackage.RULE__MAIN: - setMain(MAIN_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case EcorextPackage.RULE__CALLED_RULES: - return calledRules != null && !calledRules.isEmpty(); - case EcorextPackage.RULE__OPERATION: - return operation != null; - case EcorextPackage.RULE__STEP_RULE: - return stepRule != STEP_RULE_EDEFAULT; - case EcorextPackage.RULE__OVERRIDEN_BY: - return overridenBy != null && !overridenBy.isEmpty(); - case EcorextPackage.RULE__OVERRIDES: - return overrides != null; - case EcorextPackage.RULE__CONTAINING_CLASS: - return containingClass != null; - case EcorextPackage.RULE__ABSTRACT: - return abstract_ != ABSTRACT_EDEFAULT; - case EcorextPackage.RULE__MAIN: - return main != MAIN_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (stepRule: "); - result.append(stepRule); - result.append(", abstract: "); - result.append(abstract_); - result.append(", main: "); - result.append(main); - result.append(')'); - return result.toString(); - } - -} //RuleImpl diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/util/EcorextAdapterFactory.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/util/EcorextAdapterFactory.java deleted file mode 100644 index ba8e122fb..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/util/EcorextAdapterFactory.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * 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 ecorext.util; - -import ecorext.*; - -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; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see ecorext.EcorextPackage - * @generated - */ -public class EcorextAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static EcorextPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public EcorextAdapterFactory() { - if (modelPackage == null) { - modelPackage = EcorextPackage.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 EcorextSwitch modelSwitch = - new EcorextSwitch() { - @Override - public Adapter caseEcorext(Ecorext object) { - return createEcorextAdapter(); - } - @Override - public Adapter caseClassExtension(ClassExtension object) { - return createClassExtensionAdapter(); - } - @Override - public Adapter caseRule(Rule object) { - return createRuleAdapter(); - } - @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 ecorext.Ecorext Ecorext}'. - * - * 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 ecorext.Ecorext - * @generated - */ - public Adapter createEcorextAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link ecorext.ClassExtension Class Extension}'. - * - * 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 ecorext.ClassExtension - * @generated - */ - public Adapter createClassExtensionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link ecorext.Rule Rule}'. - * - * 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 ecorext.Rule - * @generated - */ - public Adapter createRuleAdapter() { - 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; - } - -} //EcorextAdapterFactory diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/util/EcorextSwitch.java b/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/util/EcorextSwitch.java deleted file mode 100644 index 579ca278d..000000000 --- a/trace/generator/plugins/fr.inria.diverse.ecorext/src/ecorext/util/EcorextSwitch.java +++ /dev/null @@ -1,160 +0,0 @@ -/******************************************************************************* - * 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 ecorext.util; - -import ecorext.*; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.util.Switch; - -/** - * - * 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 ecorext.EcorextPackage - * @generated - */ -public class EcorextSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static EcorextPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public EcorextSwitch() { - if (modelPackage == null) { - modelPackage = EcorextPackage.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 EcorextPackage.ECOREXT: { - Ecorext ecorext = (Ecorext)theEObject; - T result = caseEcorext(ecorext); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EcorextPackage.CLASS_EXTENSION: { - ClassExtension classExtension = (ClassExtension)theEObject; - T result = caseClassExtension(classExtension); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EcorextPackage.RULE: { - Rule rule = (Rule)theEObject; - T result = caseRule(rule); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Ecorext'. - * - * 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 'Ecorext'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEcorext(Ecorext object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Class Extension'. - * - * 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 'Class Extension'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseClassExtension(ClassExtension object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Rule'. - * - * 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 'Rule'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseRule(Rule 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; - } - -} //EcorextSwitch diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/.project b/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/.project deleted file mode 100644 index 1a77bdba1..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - fr.inria.diverse.trace.annotations.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/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/META-INF/MANIFEST.MF deleted file mode 100644 index 4d47918e8..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.inria.diverse.trace.annotations.edit;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Activator: tracingannotations.provider.TracingannotationsEditPlugin$Implementation -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: tracingannotations.provider -Require-Bundle: org.eclipse.core.runtime, - fr.inria.diverse.trace.annotations;visibility:=reexport, - org.eclipse.emf.edit;visibility:=reexport, - org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.ecore.edit;visibility:=reexport -Bundle-ActivationPolicy: lazy diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/build.properties b/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/build.properties deleted file mode 100644 index 6e3e902e8..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -# - -bin.includes = .,\ - icons/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties -jars.compile.order = . -source.. = src/ -output.. = bin/ diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/plugin.properties b/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/plugin.properties deleted file mode 100644 index c85ba44e0..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/plugin.properties +++ /dev/null @@ -1,23 +0,0 @@ -# - -pluginName = Tracingannotations 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_TracingAnnotations_type = Tracing Annotations -_UI_Unknown_type = Object - -_UI_Unknown_datatype= Value - -_UI_TracingAnnotations_propertiesToTrace_feature = Properties To Trace -_UI_TracingAnnotations_classestoTrace_feature = Classesto Trace -_UI_Unknown_feature = Unspecified - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/plugin.xml b/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/plugin.xml deleted file mode 100644 index 196df6d0a..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/plugin.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/pom.xml deleted file mode 100644 index c4b676007..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.annotations.edit - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/.project b/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/.project deleted file mode 100644 index 302fe0ceb..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - fr.inria.diverse.trace.annotations.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/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/META-INF/MANIFEST.MF deleted file mode 100644 index f7bd071dc..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/META-INF/MANIFEST.MF +++ /dev/null @@ -1,19 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.inria.diverse.trace.annotations.editor;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Activator: tracingannotations.presentation.TracingannotationsEditorPlugin$Implementation -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: tracingannotations.presentation -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.core.resources;visibility:=reexport, - fr.inria.diverse.trace.annotations.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/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/build.properties b/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/build.properties deleted file mode 100644 index 5fb07711c..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -# - -bin.includes = .,\ - icons/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties -jars.compile.order = . -source.. = src/ -output.. = bin diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/plugin.properties b/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/plugin.properties deleted file mode 100644 index 9d153fa82..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/plugin.properties +++ /dev/null @@ -1,53 +0,0 @@ -# - -pluginName = Tracingannotations Editor -providerName = www.example.org - -_UI_TracingannotationsEditor_menu = &Tracingannotations 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_TracingannotationsModelWizard_label = Tracingannotations Model -_UI_TracingannotationsModelWizard_description = Create a new Tracingannotations model - -_UI_TracingannotationsEditor_label = Tracingannotations Model Editor - -_UI_TracingannotationsEditorFilenameDefaultBase = My -_UI_TracingannotationsEditorFilenameExtensions = tracingannotations - -_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? - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/plugin.xml b/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/plugin.xml deleted file mode 100644 index a9a62013d..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/plugin.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - %_UI_TracingannotationsModelWizard_description - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/pom.xml deleted file mode 100644 index 5933a2e6e..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.annotations.editor - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/.project b/trace/generator/plugins/fr.inria.diverse.trace.annotations/.project deleted file mode 100644 index ccece5e69..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - fr.inria.diverse.trace.annotations - - - - - - 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/trace/generator/plugins/fr.inria.diverse.trace.annotations/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.annotations/META-INF/MANIFEST.MF deleted file mode 100644 index 2f7a5cc1c..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.inria.diverse.trace.annotations;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: tracingannotations, - tracingannotations.impl, - tracingannotations.util -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport -Bundle-ActivationPolicy: lazy diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/build.properties b/trace/generator/plugins/fr.inria.diverse.trace.annotations/build.properties deleted file mode 100644 index 4465407fc..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -# - -bin.includes = .,\ - model/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties -jars.compile.order = . -source.. = src/ -output.. = bin/ diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/model/tracingannotations.genmodel b/trace/generator/plugins/fr.inria.diverse.trace.annotations/model/tracingannotations.genmodel deleted file mode 100644 index 9382fda8a..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/model/tracingannotations.genmodel +++ /dev/null @@ -1,17 +0,0 @@ - - - tracingannotations.ecore - - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/plugin.properties b/trace/generator/plugins/fr.inria.diverse.trace.annotations/plugin.properties deleted file mode 100644 index 37a4ed5a0..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/plugin.properties +++ /dev/null @@ -1,4 +0,0 @@ -# - -pluginName = Tracingannotations Model -providerName = www.example.org diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/plugin.xml b/trace/generator/plugins/fr.inria.diverse.trace.annotations/plugin.xml deleted file mode 100644 index 077b3f760..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/plugin.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.annotations/pom.xml deleted file mode 100644 index 304c72425..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.annotations - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingannotationsFactory.java b/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingannotationsFactory.java deleted file mode 100644 index ea7a4c2d5..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingannotationsFactory.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - */ -package tracingannotations; - -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 tracingannotations.TracingannotationsPackage - * @generated - */ -public interface TracingannotationsFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - TracingannotationsFactory eINSTANCE = tracingannotations.impl.TracingannotationsFactoryImpl.init(); - - /** - * Returns a new object of class 'Tracing Annotations'. - * - * - * @return a new object of class 'Tracing Annotations'. - * @generated - */ - TracingAnnotations createTracingAnnotations(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - TracingannotationsPackage getTracingannotationsPackage(); - -} //TracingannotationsFactory diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/.project b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/.project deleted file mode 100644 index 14e147876..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.gemoc.generator.k3 - - - - - - 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/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/META-INF/MANIFEST.MF deleted file mode 100644 index 9358ea09e..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/META-INF/MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: K3 -Bundle-SymbolicName: fr.inria.diverse.trace.gemoc.generator.k3;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.eclipse.xtend.lib, - fr.inria.diverse.trace.gemoc.generator, - fr.inria.diverse.melange.metamodel, - fr.inria.diverse.trace.plaink3.tracematerialextractor, - org.eclipse.core.resources, - org.eclipse.jdt.core, - fr.inria.diverse.ecorext, - org.eclipse.core.runtime diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/build.properties b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/build.properties deleted file mode 100644 index 600d1b446..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/plugin.xml b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/plugin.xml deleted file mode 100644 index af7e15618..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/plugin.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/pom.xml deleted file mode 100644 index a6bcf510d..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.gemoc.generator.k3 - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/src/fr/inria/diverse/trace/gemoc/generator/k3/K3TraceAddonGeneratorIntegrationConfiguration.xtend b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/src/fr/inria/diverse/trace/gemoc/generator/k3/K3TraceAddonGeneratorIntegrationConfiguration.xtend deleted file mode 100644 index 73632144f..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator.k3/src/fr/inria/diverse/trace/gemoc/generator/k3/K3TraceAddonGeneratorIntegrationConfiguration.xtend +++ /dev/null @@ -1,65 +0,0 @@ -package fr.inria.diverse.trace.gemoc.generator.k3 - -import fr.inria.diverse.melange.metamodel.melange.Language -import fr.inria.diverse.trace.plaink3.tracematerialextractor.K3ExecutionExtensionGenerator -import fr.inria.diverse.trace.plaink3.tracematerialextractor.K3StepExtractor -import java.util.Set -import org.eclipse.core.resources.IProject -import org.eclipse.emf.ecore.EPackage -import org.eclipse.jdt.core.IJavaProject -import org.eclipse.jdt.core.JavaCore -import org.eclipse.emf.ecore.resource.ResourceSet -import org.eclipse.jdt.core.IType -import fr.inria.diverse.trace.gemoc.generator.TraceAddonGeneratorIntegrationConfiguration -import ecorext.Ecorext - -/** - * Plenty of ways to call the generator in an eclipse context - */ -class K3TraceAddonGeneratorIntegrationConfiguration implements TraceAddonGeneratorIntegrationConfiguration { - - private var Ecorext mmextension - private var Set executionMetamodel - - private static def Set findAspects(Language language, IProject melangeProject) { - val aspectNames = language.semantics.map[aspectTypeRef.type.qualifiedName].toList - val IJavaProject javaProject = JavaCore.create(melangeProject); - val aspectClasses = aspectNames.map[it|javaProject.findType(it)].toSet - return aspectClasses - - } - - override compute(Language language, String selectedLanguage, IProject melangeProject, Set abstractSyntax, - ResourceSet rs) { - - this.executionMetamodel = abstractSyntax - - val aspectClasses = findAspects(language, melangeProject) - - val K3ExecutionExtensionGenerator extgen = new K3ExecutionExtensionGenerator(abstractSyntax.head); - extgen.generate(); - - val mmextension = extgen.mmextensionResult - - val K3StepExtractor eventsgen = new K3StepExtractor(aspectClasses, selectedLanguage, abstractSyntax.head, - mmextension); - eventsgen.generate(); - - this.mmextension = mmextension - - } - - override canWorkWith(Language language, IProject melangeProject) { - val aspectClasses = findAspects(language, melangeProject) - return !aspectClasses.empty - } - - override getExecutionExtension() { - return mmextension - } - - override getExecutionMetamodel() { - return executionMetamodel - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.project b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.project deleted file mode 100644 index 5e3fb6521..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.gemoc.generator - - - - - - 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/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/META-INF/MANIFEST.MF deleted file mode 100644 index bffb976b5..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/META-INF/MANIFEST.MF +++ /dev/null @@ -1,28 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.tracemm.k3al.generator -Bundle-SymbolicName: fr.inria.diverse.trace.gemoc.generator;singleton:=true -Bundle-Version: 1.0.0.qualifier -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - org.eclipse.emf.ecore, - fr.inria.diverse.trace.plugin.generator;bundle-version="1.0.0", - fr.inria.diverse.trace.commons;bundle-version="1.0.0", - org.eclipse.jdt.core;bundle-version="3.10.0", - org.eclipse.ui, - org.eclipse.core.runtime;bundle-version="3.10.0", - org.eclipse.core.resources;bundle-version="3.9.1", - fr.inria.diverse.ecorext;bundle-version="0.1.0", - org.gemoc.executionframework.ui;bundle-version="0.1.0", - org.gemoc.xdsmlframework.ide.ui;bundle-version="0.1.0", - fr.inria.diverse.trace.metamodel.generator;bundle-version="1.0.0", - fr.inria.diverse.melange.ui, - fr.inria.diverse.melange.metamodel, - org.eclipse.xtext.ui, - org.eclipse.jdt.ui, - org.gemoc.xdsmlframework.api -Export-Package: fr.inria.diverse.trace.gemoc.generator -Bundle-ClassPath: . -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/build.properties b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/build.properties deleted file mode 100644 index 555b9ec3b..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html,\ - plugin.xml -src.includes = about.html diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/plugin.xml b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/plugin.xml deleted file mode 100644 index 22bb577aa..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/plugin.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/pom.xml deleted file mode 100644 index dc0b24070..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.gemoc.generator - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/schema/fr.inria.diverse.trace.gemoc.generator.integration.exsd b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/schema/fr.inria.diverse.trace.gemoc.generator.integration.exsd deleted file mode 100644 index 2ff34d275..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/schema/fr.inria.diverse.trace.gemoc.generator.integration.exsd +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - [Enter description of this extension point.] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Allows meta languages to provide integration with the trace addon generation through an extraction of an execution extension. - - - - - - - - - - - - - - - - - - - - - - [Enter the first release in which this extension point appears.] - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - [Enter API information here.] - - - - - - - - - [Enter information about supplied implementation of this extension point.] - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/GenericEngineTraceAddonGenerator.xtend b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/GenericEngineTraceAddonGenerator.xtend deleted file mode 100644 index dbca50932..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/GenericEngineTraceAddonGenerator.xtend +++ /dev/null @@ -1,309 +0,0 @@ -package fr.inria.diverse.trace.gemoc.generator - -import ecorext.Ecorext -import ecorext.Rule -import fr.inria.diverse.trace.commons.CodeGenUtil -import fr.inria.diverse.trace.commons.EcoreCraftingUtil -import fr.inria.diverse.trace.commons.ManifestUtil -import fr.inria.diverse.trace.commons.PluginXMLHelper -import fr.inria.diverse.trace.metamodel.generator.TraceMMGenerationTraceability -import fr.inria.diverse.trace.plugin.generator.GenericTracePluginGenerator -import java.util.List -import java.util.Set -import org.eclipse.core.resources.IFile -import org.eclipse.core.resources.IProject -import org.eclipse.core.runtime.IProgressMonitor -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EClassifier -import org.eclipse.emf.ecore.EOperation -import org.eclipse.emf.ecore.EPackage -import org.eclipse.jdt.core.IPackageFragment -import org.eclipse.ui.PlatformUI -import org.eclipse.xtend.lib.annotations.Accessors -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint -import org.jdom2.Element -import org.jdom2.filter.ElementFilter -import java.util.HashSet - -class GenericEngineTraceAddonGenerator { - - // Inputs - private val EPackage abstractSyntax // URI - private val Ecorext executionEcorExt // URI - private val String pluginName - - // Transient - private var String packageQN - private var String className - private var String traceManagerClassName - private var String traceConstructorClassName - private var String traceExplorerClassName - private var String traceExtractorClassName - private var String stepFactoryClassName - private var TraceMMGenerationTraceability traceability - private var Set genPackages - - // Output - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - IProject project - - new(EPackage abstractSyntax, Ecorext executionEcorExt, String pluginName) { - this.abstractSyntax = abstractSyntax - this.executionEcorExt = executionEcorExt - this.pluginName = pluginName - } - - public def void generateCompleteAddon() { - PlatformUI.workbench.activeWorkbenchWindow.run(false, true, [ m | - generateCompleteAddon(m) - ]) - } - - public static def String getBaseFQN(Rule r) { - val EOperation o = r.operation - val EClass c = r.containingClass - return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name - } - - private def String getJavaFQN(EClassifier c) { - return getJavaFQN(c,false) - } - - private def String getJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { - return EcoreCraftingUtil.getJavaFQN(c,genPackages,enforcePrimitiveJavaClass) - } - - public def void generateCompleteAddon(IProgressMonitor m) { - - // Generate trace plugin - val GenericTracePluginGenerator GenericTracePluginGenerator = new GenericTracePluginGenerator(abstractSyntax, executionEcorExt, - pluginName, true) - GenericTracePluginGenerator.generate(m) - - // Retrieving some info from the plugin generation - packageQN = GenericTracePluginGenerator.packageQN - className = GenericTracePluginGenerator.languageName.replaceAll(" ", "").toFirstUpper + "EngineAddon" - traceManagerClassName = GenericTracePluginGenerator.traceManagerClassName - traceConstructorClassName = GenericTracePluginGenerator.traceConstructorClassName - traceExplorerClassName = GenericTracePluginGenerator.traceExplorerClassName - traceExtractorClassName = GenericTracePluginGenerator.traceExtractorClassName - stepFactoryClassName = GenericTracePluginGenerator.languageName.replaceAll(" ", "").toFirstUpper + "StepFactory" - traceability = GenericTracePluginGenerator.traceability - genPackages = GenericTracePluginGenerator.referencedGenPackages - - // Add dependency to plugin containing AbstractTraceAddon - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "fr.inria.diverse.trace.gemoc") - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "fr.inria.diverse.trace.gemoc.api") - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "org.gemoc.xdsmlframework.api") - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "fr.inria.diverse.trace.commons.model") - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "org.gemoc.sequential_addons.multidimensional.timeline") - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "fr.obeo.timeline") - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "fr.inria.diverse.trace.commons") - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "org.gemoc.xdsmlframework.api") - ManifestUtil.addToPluginManifest(GenericTracePluginGenerator.project, m, "fr.inria.diverse.trace.commons.model") - - ManifestUtil.setRequiredExecutionEnvironmentToPluginManifest(GenericTracePluginGenerator.project, m, "JavaSE-1.8") - // Getting java fragment to create classes - val IPackageFragment fragment = GenericTracePluginGenerator.packageFragment - - // Generate trace engine addon class (same package as the trace manager) - val String prettyCode = CodeGenUtil.formatJavaCode(generateAddonClassCode()) - fragment.createCompilationUnit(className + ".java", prettyCode, true, m) - - // Generate step factory class (same package as the trace manager) - val String uglyFactoryCode = generateStepFactory - val String prettyCodeStepFactory = CodeGenUtil.formatJavaCode(uglyFactoryCode) - fragment.createCompilationUnit(stepFactoryClassName + ".java", prettyCodeStepFactory, true, m) - - - - // Add extension point (taken from GemocLanguageDesignerBuilder) - this.project = GenericTracePluginGenerator.project - val IFile pluginfile = project.getFile(PluginXMLHelper.PLUGIN_FILENAME); - PluginXMLHelper.createEmptyTemplateFile(pluginfile, false); - val PluginXMLHelper helper = new PluginXMLHelper(); - helper.loadDocument(pluginfile); - val Element extensionPoint = helper.getOrCreateExtensionPoint( - EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT); - updateDefinitionAttributeInExtensionPoint(extensionPoint, - EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_CLASS, packageQN + "." + className - ); - updateDefinitionAttributeInExtensionPoint(extensionPoint, - EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_DEFAULT, "false" - ); - updateDefinitionAttributeInExtensionPoint(extensionPoint, - EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_ID, pluginName - ); - updateDefinitionAttributeInExtensionPoint(extensionPoint, - EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_NAME, - GenericTracePluginGenerator.tracedLanguageName + " MultiDimensional Trace" - ); - updateDefinitionAttributeInExtensionPoint(extensionPoint, - EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_SHORTDESCRIPTION, - "MultiDimensional Trace support dedicated to "+GenericTracePluginGenerator.tracedLanguageName+" language" - ); - updateDefinitionAttributeInExtensionPoint(extensionPoint, - EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_OPENVIEWIDS, "org.gemoc.sequential_addons.multidimensional.timeline.views.timeline.MultidimensionalTimeLineView" - ); - helper.saveDocument(pluginfile); - } - - private def static Element updateDefinitionAttributeInExtensionPoint(Element extensionPoint, String atributeName, - String value) { - var Element result; - val String defName = "Addon" - val List elements = extensionPoint.getContent(new ElementFilter(defName)); - if (elements.size() == 0) { - - // create extension point - result = new Element(defName); - extensionPoint.addContent(result); - } else { - result = elements.get(0); - } - result.setAttribute(atributeName, value); - return result; - } - - private def String generateAddonClassCode() { - return '''package «packageQN»; - -import java.util.Map; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; - -import fr.inria.diverse.trace.gemoc.api.IStepFactory; -import fr.inria.diverse.trace.gemoc.api.ITraceConstructor; -import fr.inria.diverse.trace.gemoc.api.ITraceExplorer; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor; -import fr.inria.diverse.trace.gemoc.traceaddon.AbstractTraceAddon; - -public class «className» extends AbstractTraceAddon { - - private «stepFactoryClassName» factory = null; - - @Override - public ITraceConstructor constructTraceConstructor(Resource modelResource, Resource traceResource, Map exeToTraced) { - return new «traceConstructorClassName»(modelResource, traceResource, exeToTraced); - } - - @Override - public ITraceExplorer constructTraceExplorer(Resource traceResource) { - «traceExplorerClassName» explorer = new «traceExplorerClassName»(); - EObject root = traceResource.getContents().get(0); - if (root instanceof «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)») { - explorer.loadTrace((«getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)») root); - return explorer; - } - return null; - } - - @Override - public ITraceExplorer constructTraceExplorer(Resource modelResource, Resource traceResource, Map tracedToExe) { - «traceExplorerClassName» explorer = new «traceExplorerClassName»(tracedToExe); - EObject root = traceResource.getContents().get(0); - if (root instanceof «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)») { - explorer.loadTrace(modelResource, («getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)») root); - return explorer; - } - return null; - } - - @Override - public ITraceExtractor constructTraceExtractor(Resource traceResource) { - «traceExtractorClassName» extractor = new «traceExtractorClassName»(); - EObject root = traceResource.getContents().get(0); - if (root instanceof «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)») { - extractor.loadTrace((«getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)») root); - return extractor; - } - return null; - } - - @Override - public IStepFactory getFactory() { - if (factory == null) - factory = new «stepFactoryClassName»(); - return factory; - } - - @Override - public boolean isAddonForTrace(EObject root) { - return root instanceof «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)»; - } - -}''' - } - - private def Set potentialCallerClasses(EClass stepCallerClass) { - val possibleCallerClasses = new HashSet - possibleCallerClasses.addAll(abstractSyntax.EClassifiers.filter(EClass)) - possibleCallerClasses.addAll(traceability.allMutableClasses) - val filtered = possibleCallerClasses.filter(EClass) - .filter[c|c.equals(stepCallerClass)||c.EAllSuperTypes.contains(stepCallerClass)] - .sortBy[name].toSet - return filtered - } - - private def String generateStepFactory() { - return ''' - - package «packageQN»; - - import java.util.List; - import fr.inria.diverse.trace.gemoc.api.IStepFactory; - - public class «stepFactoryClassName» implements IStepFactory { - - @Override - public fr.inria.diverse.trace.commons.model.trace.Step createStep(fr.inria.diverse.trace.commons.model.trace.MSE mse, List parameters, List result) { - - fr.inria.diverse.trace.commons.model.trace.Step step = null; -org.eclipse.emf.ecore.EClass ec = mse.getCaller().eClass(); -String stepRule = fr.inria.diverse.trace.commons.EcoreCraftingUtil.getFQN(ec, ".") + "." - + mse.getAction().getName(); - - «FOR Rule rule : executionEcorExt.rules.sortBy[baseFQN] SEPARATOR "else" AFTER "else"» - - «val stepCallerClass = rule.containingClass» - «val filtered = potentialCallerClasses(stepCallerClass)» - - «IF filtered.empty» - - if (stepRule.equalsIgnoreCase("«getBaseFQN(rule)»")) { - «ELSE» - if ( - mse.getAction().getName().equalsIgnoreCase("«rule.operation.name»") - && ( - «FOR possibleCallerClass: filtered SEPARATOR " || "» - ec.getClassifierID()== «EcoreCraftingUtil.stringClassifierID(possibleCallerClass, genPackages)» - «ENDFOR» - ) - ) - - { - «ENDIF» - step = «EcoreCraftingUtil.stringCreate(traceability.getStepClassFromStepRule(rule))»; - } - - «ENDFOR» - { - step = fr.inria.diverse.trace.commons.model.trace.TraceFactory.eINSTANCE.createGenericSequentialStep(); - } - - fr.inria.diverse.trace.commons.model.trace.MSEOccurrence mseocc = fr.inria.diverse.trace.commons.model.trace.TraceFactory.eINSTANCE.createMSEOccurrence(); - mseocc.setMse(mse); - mseocc.getParameters().addAll(parameters); - mseocc.getResult().addAll(result); - step.setMseoccurrence(mseocc); - - return step; - } - } - ''' - } - - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/TraceAddonGeneratorIntegration.xtend b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/TraceAddonGeneratorIntegration.xtend deleted file mode 100644 index 7d70600a2..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/TraceAddonGeneratorIntegration.xtend +++ /dev/null @@ -1,147 +0,0 @@ -package fr.inria.diverse.trace.gemoc.generator - -import ecorext.Ecorext -import fr.inria.diverse.melange.metamodel.melange.Language -import fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace -import fr.inria.diverse.melange.ui.internal.MelangeActivator -import fr.inria.diverse.trace.commons.EMFUtil -import java.util.Set -import org.eclipse.core.resources.IFile -import org.eclipse.core.runtime.IProgressMonitor -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.EPackage -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.xtext.ui.resource.IResourceSetProvider -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper -import org.eclipse.core.runtime.Platform -import org.eclipse.core.resources.IProject -import org.eclipse.core.resources.ResourcesPlugin -import org.eclipse.core.resources.WorkspaceJob -import org.eclipse.core.runtime.IStatus -import org.eclipse.core.resources.IResource -import org.eclipse.core.runtime.Status -import org.eclipse.core.runtime.CoreException -import java.io.IOException - -/** - * Plenty of ways to call the generator in an eclipse context. - * Must be provided a TraceAddonGeneratorIntegrationConfiguration, specific to the type of xdsml (K3, XMOF, etc) - */ -class TraceAddonGeneratorIntegration { - - static def void generateAddon(IFile melangeFile, String selectedLanguage, boolean replace, - IProgressMonitor monitor) { - // Computing output plugin name - val pluginName = MelangeXDSMLProjectHelper.baseProjectName(melangeFile.project) + "." + - selectedLanguage.toLowerCase + ".trace" - generateAddon(melangeFile, selectedLanguage, pluginName, replace, monitor) - } - - static def void generateAddon(IFile melangeFile, String selectedLanguage, String pluginName, boolean replace, - IProgressMonitor monitor) { - - // Loading Melange model - val URI uri = URI.createPlatformResourceURI(melangeFile.getFullPath().toString(), true); - val injector = MelangeActivator.getInstance().getInjector(MelangeActivator.FR_INRIA_DIVERSE_MELANGE_MELANGE) - val IResourceSetProvider provider = injector.getInstance(typeof(IResourceSetProvider)) - val ResourceSet resSet = provider.get(melangeFile.getProject()) - val Resource resource = resSet.getResource(uri, true) - val ModelTypingSpace root = resource.getContents().get(0) as ModelTypingSpace - val Language selection = root.elements.filter(Language).findFirst[name == selectedLanguage] - - // Get syntax - val ResourceSet rs = new ResourceSetImpl -// val URI mmUri = URI.createURI(selection.syntax.ecoreUri) - val URI mmUri = URI.createURI("platform:/resource/"+ root.name + "." + selection.name.toLowerCase + "/model/" + selection.name + ".ecore") - val Resource syntaxResource = EMFUtil.loadModelURI(mmUri, rs); - val Set syntax = syntaxResource.getContents().filter(EPackage).toSet - - // Register all packages in registry - // TODO remove them afterwards? - for (EPackage p : syntaxResource.allContents.filter(EPackage).toSet) - EPackage.Registry.INSTANCE.put(p.getNsURI(), p); - - // We find all extension points providing fr.inria.diverse.trace.gemoc.generator.integration - val config = Platform.getExtensionRegistry().getConfigurationElementsFor( - "fr.inria.diverse.trace.gemoc.generator.integration"); - - // Using them, we instantiate TraceAddonGeneratorIntegrationConfiguration objects and look for one that can work with the current selected language - val TraceAddonGeneratorIntegrationConfiguration validIntegration = config.map [ e | - e.createExecutableExtension("class") - ].filter(TraceAddonGeneratorIntegrationConfiguration).findFirst [ conf | - conf.canWorkWith(selection, melangeFile.project) - ] - - // If we find one, we generate - if (validIntegration != null) { - validIntegration.compute(selection, selectedLanguage, melangeFile.project, syntax, rs); - val Set executionMetamodel = validIntegration.executionMetamodel - val Ecorext mmextension = validIntegration.getExecutionExtension(); - generateAddon(selectedLanguage, pluginName, executionMetamodel, replace, monitor, mmextension) - - } // Otherwise, we error - else { - throw new CoreException( - new Status( - Status. - ERROR, - "fr.inria.diverse.trace.gemoc.generator", - "Impossible to create a trace addon: couldn't find a trace addon integration extension that can manage the chosen melange language." - )); - } - - } - - /** - * Central operation of the class, that calls business operations - */ - public static def void generateAddon(String mmName, String pluginName, Set inputMetamodel, - boolean replace, IProgressMonitor monitor, Ecorext executionExtension) throws CoreException { - - // We look for an existing project with this name - val IProject existingProject = ResourcesPlugin.getWorkspace().getRoot().getProject(pluginName); - if (existingProject.exists()) { - - // If we replace, we delete most of its content - // (we keep the original project in order to be able to replace the project even if it was imported in the workspace) - if (replace) { - // existingProject.delete(true, monitor); - val WorkspaceJob job = new WorkspaceJob("deleting project " + existingProject.name + " content") { - override public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException { - for (IResource iRes : existingProject.members) { - if (!(iRes.name.equals(".project") || iRes.name.equals(".classpath"))) { - iRes.delete(true, monitor); - } - } - return Status.OK_STATUS; - } - }; - job.setRule(existingProject); - job.schedule(); - } // Else, error - else { - throw new CoreException( - new Status(Status.ERROR, "fr.inria.diverse.trace.gemoc.generator", - "Impossible to create a trace addon: a project already exists with this name.")); - } - } - - try { - - // Then we call all our business operations - // TODO handle languages defined with multiple ecores - val EPackage extendedMetamodel = inputMetamodel.iterator().next(); - - val GenericEngineTraceAddonGenerator traceaddgen = new GenericEngineTraceAddonGenerator(extendedMetamodel, - executionExtension, pluginName); - traceaddgen.generateCompleteAddon(monitor); - } catch (IOException e) { - - // TODO Do real error handling - e.printStackTrace(); - } - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/TraceAddonGeneratorIntegrationConfiguration.xtend b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/TraceAddonGeneratorIntegrationConfiguration.xtend deleted file mode 100644 index cb332b23e..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/src/fr/inria/diverse/trace/gemoc/generator/TraceAddonGeneratorIntegrationConfiguration.xtend +++ /dev/null @@ -1,21 +0,0 @@ -package fr.inria.diverse.trace.gemoc.generator - -import ecorext.Ecorext -import org.eclipse.core.resources.IProject -import java.util.Set -import org.eclipse.emf.ecore.EPackage -import fr.inria.diverse.melange.metamodel.melange.Language -import org.eclipse.emf.ecore.resource.ResourceSet - -interface TraceAddonGeneratorIntegrationConfiguration { - - def void compute(Language melangeLanguage, String languageName, IProject melangeProject, - Set abstractSyntax, ResourceSet rs) - - def Ecorext getExecutionExtension(); - - def boolean canWorkWith(Language melangeLanguage, IProject melangeProject) - - def Set getExecutionMetamodel() - -} \ No newline at end of file diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.project b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.project deleted file mode 100644 index 3b6a23cce..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.gemoc.ui - - - - - - 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/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 6478094dd..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,25 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.trace.gemoc.wizards -Bundle-SymbolicName: fr.inria.diverse.trace.gemoc.ui;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.eclipse.core.runtime;bundle-version="3.10.0", - org.eclipse.ui, - org.eclipse.ui.ide, - org.eclipse.jdt.debug.ui;bundle-version="3.6.300", - org.eclipse.debug.ui, - org.eclipse.jdt.core, - org.eclipse.core.variables;bundle-version="3.2.800", - org.eclipse.jdt.launching, - fr.inria.diverse.trace.gemoc.generator;bundle-version="1.0.0", - org.eclipse.xtend.lib, - org.eclipse.emf.ecore.xmi;bundle-version="2.10.2", - fr.inria.diverse.trace.gemoc.generator, - org.eclipse.ui.navigator, - fr.inria.diverse.melange.metamodel, - org.eclipse.core.expressions, - org.gemoc.xdsmlframework.ide.ui;bundle-version="0.1.0", - org.gemoc.xdsmlframework.ui.utils;bundle-version="0.1.0", - org.gemoc.commons.eclipse;bundle-version="0.1.0" -Bundle-ActivationPolicy: lazy diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/build.properties b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/build.properties deleted file mode 100644 index c79b8809b..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - about.html -jre.compilation.profile = JavaSE-1.8 -src.includes = about.html diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/plugin.xml b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/plugin.xml deleted file mode 100644 index dd21c9a64..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/plugin.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/pom.xml deleted file mode 100644 index 8ae9fe747..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.gemoc.ui - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/Activator.java b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/Activator.java deleted file mode 100644 index 62520d76f..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/Activator.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.gemoc.ui; - -import org.eclipse.core.runtime.Status; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.xdsmlframework.ide.ui"; //$NON-NLS-1$ - - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - public static void warn(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); - } - - public static void error(String msg, Throwable e) { - Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/commands/XDSMLProject2TraceAddonHandler.xtend b/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/commands/XDSMLProject2TraceAddonHandler.xtend deleted file mode 100644 index bb0065cb2..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/commands/XDSMLProject2TraceAddonHandler.xtend +++ /dev/null @@ -1,86 +0,0 @@ -package fr.inria.diverse.trace.gemoc.ui.commands - -import fr.inria.diverse.melange.metamodel.melange.Language -import fr.inria.diverse.trace.gemoc.generator.TraceAddonGeneratorIntegration -import java.io.PrintWriter -import java.io.StringWriter -import org.eclipse.core.commands.ExecutionEvent -import org.eclipse.core.commands.ExecutionException -import org.eclipse.core.commands.IHandler -import org.eclipse.core.resources.IFile -import org.eclipse.core.resources.IProject -import org.eclipse.core.runtime.IProgressMonitor -import org.eclipse.core.runtime.Status -import org.eclipse.core.runtime.jobs.Job -import org.eclipse.jface.dialogs.InputDialog -import org.eclipse.jface.window.Window -import org.eclipse.swt.widgets.Shell -import org.gemoc.commons.eclipse.emf.EMFResource -import org.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler -import org.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper - -/** - * Handler that allows to get an XDSML project (containing a melange file) - * and will ask for selection of the language (if necessary) and launch the generation - */ -class XDSMLProject2TraceAddonHandler extends AbstractMelangeSelectHandler implements IHandler { - val static String pluginId = "fr.inria.diverse.trace.gemoc.ui" - - override Object executeForSelectedLanguage(ExecutionEvent event, IProject updatedGemocLanguageProject, - Language language) throws ExecutionException { - - val IFile melangeFile = getMelangeIFile(event, language) - val baseProjectName = MelangeXDSMLProjectHelper.baseProjectName(melangeFile.project) - - // If the base project name doesn't end with the language name, we suggest it - val suggestedBasePluginName = if (baseProjectName.endsWith(language.name.toLowerCase)) - baseProjectName - else - baseProjectName + "." + language.name.toLowerCase - val suggestedPluginName = suggestedBasePluginName + ".trace" - - val InputDialog inputDialog = new InputDialog(null, - "Create MultiDimensional Trace addon for language " + language.getName(), "Enter project name ", - suggestedPluginName, null) - inputDialog.open(); - if (inputDialog.getReturnCode() == Window.OK) { - val String projectName = inputDialog.getValue(); - val Job j = new Job("Generating trace addon plugin for " + melangeFile.toString) { - override protected run(IProgressMonitor monitor) { - try { - - TraceAddonGeneratorIntegration.generateAddon(melangeFile, language.name, projectName, true, - monitor) - - } catch (Exception e) { - val StringWriter sw = new StringWriter(); - e.printStackTrace(new PrintWriter(sw)); - val String exceptionAsString = sw.toString(); - return new Status(Status.ERROR, pluginId, exceptionAsString) - } - return new Status(Status.OK, pluginId, "Multidimensional Trace addon plugin generated.") - } - } - // And we start the job - j.schedule - } - - return null; - } - - /** Search for the IFile of the melange language either via the event or directly from the eResource */ - protected def IFile getMelangeIFile(ExecutionEvent event, Language language) { - var IFile melangeFile = getMelangeFileFromSelection(event) - if (melangeFile == null) { - // this means that we have to retrieve the IFile from the language instance (either because - // it comes from an editor of because we have selected one language among other in the project) - melangeFile = EMFResource.getIFile(language) - } - return melangeFile - } - - override String getSelectionMessage() { - return "Select Language that is used to initialize the Multidimensional Trace addon creation wizard"; - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/.project b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/.project deleted file mode 100644 index 57803987f..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.gemoc - - - - - - 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/trace/generator/plugins/fr.inria.diverse.trace.gemoc/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/META-INF/MANIFEST.MF deleted file mode 100644 index 1010acc30..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.tracemm.gemoctrace -Bundle-SymbolicName: fr.inria.diverse.trace.gemoc -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: fr.obeo.timeline;bundle-version="1.0.0", - org.gemoc.xdsmlframework.api;bundle-version="0.1.0", - org.eclipse.xtend.lib, - fr.inria.diverse.trace.api, - org.gemoc.executionframework.engine;bundle-version="0.1.0", - org.eclipse.emf.transaction;bundle-version="1.8.0", - fr.inria.diverse.trace.gemoc.api;bundle-version="1.0.0", - org.eclipse.xtext, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0" -Export-Package: fr.inria.diverse.trace.gemoc.traceaddon - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/pom.xml deleted file mode 100644 index c04aacb46..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.gemoc - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/AbstractTraceAddon.xtend b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/AbstractTraceAddon.xtend deleted file mode 100644 index a4cf0be3b..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/AbstractTraceAddon.xtend +++ /dev/null @@ -1,216 +0,0 @@ -package fr.inria.diverse.trace.gemoc.traceaddon - -import com.google.common.collect.BiMap -import com.google.common.collect.HashBiMap -import fr.inria.diverse.trace.commons.model.trace.Step -import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon -import fr.inria.diverse.trace.gemoc.api.ITraceConstructor -import fr.inria.diverse.trace.gemoc.api.ITraceExplorer -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor -import fr.inria.diverse.trace.gemoc.api.ITraceListener -import fr.inria.diverse.trace.gemoc.api.ITraceNotifier -import java.util.ArrayList -import java.util.HashSet -import java.util.List -import java.util.Map -import java.util.Set -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.emf.ecore.resource.ResourceSet -import org.eclipse.emf.transaction.RecordingCommand -import org.eclipse.emf.transaction.util.TransactionUtil -import org.gemoc.executionframework.engine.core.CommandExecution -import org.gemoc.xdsmlframework.api.core.IExecutionContext -import org.gemoc.xdsmlframework.api.engine_addon.DefaultEngineAddon -import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon -import org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.BatchModelChangeListenerAddon -import org.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl -import org.gemoc.xdsmlframework.api.core.IExecutionEngine - -abstract class AbstractTraceAddon extends DefaultEngineAddon implements IMultiDimensionalTraceAddon, ITraceNotifier { - - private IExecutionContext _executionContext - private ITraceExplorer traceExplorer - private ITraceExtractor traceExtractor - private ITraceConstructor traceConstructor - private boolean shouldSave = true - private var boolean needTransaction = true - - private BatchModelChangeListenerAddon listenerAddon - - abstract def ITraceConstructor constructTraceConstructor(Resource modelResource, Resource traceResource, - Map exeToTraced) - - abstract def boolean isAddonForTrace(EObject traceRoot) - - abstract def ITraceExtractor constructTraceExtractor(Resource traceResource) - - abstract def ITraceExplorer constructTraceExplorer(Resource traceResource) - - abstract def ITraceExplorer constructTraceExplorer(Resource modelResource, Resource traceResource, Map tracedToExe) - - override getTraceExplorer() { - return traceExplorer - } - - override getTraceConstructor() { - return traceConstructor - } - - override getTraceExtractor() { - return traceExtractor - } - - private val List listeners = new ArrayList - - override void notifyListeners() { listeners.forEach[l|l.update] } - - override void addListener(ITraceListener listener) { listeners.add(listener) } - - override void removeListener(ITraceListener listener) { listeners.remove(listener) } - - public def void disableTraceSaving() { - shouldSave = false - } - - public def void load(Resource traceModel) { - traceExplorer = constructTraceExplorer(traceModel) - traceExtractor = constructTraceExtractor(traceModel) - } - - private static def String getEPackageFQN(EPackage p, String separator) { - val EPackage superP = p.getESuperPackage - if (superP != null) { - return getEPackageFQN(superP, separator) + separator + p.name - } else { - return p.name.toFirstUpper - } - } - - override aboutToExecuteStep(IExecutionEngine executionEngine, Step step) { - manageStep(step, true) - } - - override stepExecuted(IExecutionEngine engine, Step step) { - manageStep(step, false) - } - - protected def manageStep(Step step, boolean add) { - if (step != null) { - modifyTrace([ - traceConstructor.addState(listenerAddon.getChanges(this)) - if (add) - traceConstructor.addStep(step) - else - traceConstructor.endStep(step) - traceExplorer.updateCallStack(step) - traceExtractor.update() - ]) - - if (shouldSave) { -// traceConstructor.save() - } - } - } - - /** - * To construct the trace manager - */ - override engineAboutToStart(IExecutionEngine engine) { - if (_executionContext == null) { - _executionContext = engine.executionContext - - val modelResource = _executionContext.resourceModel - - // Creating the resource of the trace - // val ResourceSet rs = modelResource.getResourceSet() - val ResourceSet rs = new ResourceSetImpl - - // We check whether or not we need transactions - val ed = TransactionUtil.getEditingDomain(rs) - needTransaction = ed != null - - val URI traceModelURI = URI.createPlatformResourceURI( - _executionContext.getWorkspace().getExecutionPath().toString() + "/execution.trace", false) - val Resource traceResource = rs.createResource(traceModelURI) - - // We construct a new listener addon if required - this.listenerAddon = if (engine.hasAddon(BatchModelChangeListenerAddon)) { - engine.getAddon(BatchModelChangeListenerAddon) - } else { - new BatchModelChangeListenerAddon(engine) - } - listenerAddon.registerObserver(this) - - val launchConfiguration = engine.extractLaunchConfiguration - - val BiMap exeToTraced = HashBiMap.create - - // We construct the trace constructor, using the concrete generated method - traceConstructor = constructTraceConstructor(modelResource, traceResource, exeToTraced) - - // We initialize the trace - modifyTrace([traceConstructor.initTrace(launchConfiguration)]) - - // And we enable trace exploration by loading it in a new trace explorer - traceExplorer = constructTraceExplorer(modelResource, traceResource, exeToTraced.inverse) - traceExtractor = constructTraceExtractor(traceResource) - } - } - - /** - * Wrapper using lambda to always use a RecordingCommand when modifying the trace - */ - private def void modifyTrace(Runnable r, String message) { - if (needTransaction) { - val ed = TransactionUtil.getEditingDomain(_executionContext.resourceModel) - val Set catchedException = new HashSet - var RecordingCommand command = new RecordingCommand(ed, message) { - protected override void doExecute() { - try { - r.run - } catch (Throwable t) { - catchedException.add(t) - } - } - } - CommandExecution.execute(ed, command) - if (!catchedException.empty) - throw catchedException.head - } else { - r.run - } - } - - /** - * Same as above, but without message. - */ - private def void modifyTrace(Runnable r) { - modifyTrace(r, "") - } - - public override List validate(List otherAddons) { - - val ArrayList errors = new ArrayList() - - var boolean found = false - var addonName = "" - for (IEngineAddon iEngineAddon : otherAddons) { - if (iEngineAddon instanceof AbstractTraceAddon && iEngineAddon !== this) { - found = true - addonName = EngineAddonSpecificationExtensionPoint.getName(iEngineAddon) - } - } - - if (found) { - val thisName = EngineAddonSpecificationExtensionPoint.getName(this) - errors.add(thisName + " can't run with " + addonName) - } - - return errors - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceConstructor.java b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceConstructor.java deleted file mode 100644 index c05c5ace9..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceConstructor.java +++ /dev/null @@ -1,94 +0,0 @@ -package fr.inria.diverse.trace.gemoc.traceaddon; - -import java.util.Deque; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.SequentialStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.Trace; -import fr.inria.diverse.trace.commons.model.trace.TraceFactory; -import fr.inria.diverse.trace.gemoc.api.ITraceConstructor; - -public class GenericTraceConstructor implements ITraceConstructor { - - private Trace> traceRoot; - private Resource traceResource; - private final Deque context = new LinkedList(); - - public GenericTraceConstructor(Resource traceResource) { - this.traceResource = traceResource; - } - - @Override - public void addState(List modelChanges) { - // Empty implementation, states are not yet supported in the generic trace. - } - - @SuppressWarnings("unchecked") - @Override - public void addStep(Step step) { - if (context.isEmpty()) { - traceRoot.getRootStep().getSubSteps().add(step); - context.push(step); - } else { - final Step topStep = context.getFirst(); - if (topStep != null && topStep instanceof SequentialStep) { - ((SequentialStep) topStep).getSubSteps().add(step); - } - } - } - - @Override - public void endStep(Step step) { - context.pop(); - } - - @Override - public EObject initTrace(LaunchConfiguration launchConfiguration) { - - // Create root - traceRoot = TraceFactory.eINSTANCE.createTrace(); - traceRoot.setLaunchconfiguration(launchConfiguration); - - // Create root sequential step - SequentialStep rootStep = TraceFactory.eINSTANCE.createSequentialStep(); - traceRoot.setRootStep(rootStep); - - // Put in the resource - traceResource.getContents().add(traceRoot); - - return traceRoot; - } - - @Override - public void save() { - try { - traceResource.save(null); - } catch (java.io.IOException e) { - e.printStackTrace(); - } - } - - @Override - public void save(URI uri) { - try { - traceResource.setURI(uri); - traceResource.save(null); - } catch (java.io.IOException e) { - e.printStackTrace(); - } - } - - @Override - public boolean isPartialTraceConstructor() { - return false; - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceEngineAddon.java b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceEngineAddon.java deleted file mode 100644 index a5ee81391..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceEngineAddon.java +++ /dev/null @@ -1,69 +0,0 @@ -package fr.inria.diverse.trace.gemoc.traceaddon; - -import java.util.Map; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; - -import fr.inria.diverse.trace.commons.model.trace.SequentialStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.Trace; -import fr.inria.diverse.trace.gemoc.api.IStepFactory; -import fr.inria.diverse.trace.gemoc.api.ITraceConstructor; -import fr.inria.diverse.trace.gemoc.api.ITraceExplorer; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor; - -public class GenericTraceEngineAddon extends AbstractTraceAddon { - - private GenericTraceStepFactory factory = null; - - @Override - public IStepFactory getFactory() { - if (factory == null) { - factory = new GenericTraceStepFactory(); - } - return factory; - } - - @Override - public ITraceConstructor constructTraceConstructor(Resource exeModel, - Resource traceResource, Map exeToTraced) { - return new GenericTraceConstructor(traceResource); - } - - @Override - public boolean isAddonForTrace(EObject traceRoot) { - return true; - } - - @SuppressWarnings("unchecked") - @Override - public ITraceExplorer constructTraceExplorer(Resource traceResource) { - GenericTraceExplorer explorer = new GenericTraceExplorer(); - EObject root = traceResource.getContents().get(0); - if (root instanceof Trace) { - explorer.loadTrace((Trace>)root); - return explorer; - } - return null; - } - - @Override - public ITraceExplorer constructTraceExplorer(Resource modelResource, - Resource traceResource, Map tracedToExe) { - return constructTraceExplorer(traceResource); - } - - @SuppressWarnings("unchecked") - @Override - public ITraceExtractor constructTraceExtractor(Resource traceResource) { - GenericTraceExtractor extractor = new GenericTraceExtractor(); - EObject root = traceResource.getContents().get(0); - if (root instanceof Trace) { - extractor.loadTrace((Trace>)root); - return extractor; - } - return null; - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceExplorer.java b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceExplorer.java deleted file mode 100644 index 9e7c0d91c..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceExplorer.java +++ /dev/null @@ -1,397 +0,0 @@ -package fr.inria.diverse.trace.gemoc.traceaddon; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.commons.model.trace.SequentialStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.Trace; -import fr.inria.diverse.trace.gemoc.api.ITraceExplorer; -import fr.inria.diverse.trace.gemoc.api.ITraceListener; - -public class GenericTraceExplorer implements ITraceExplorer { - - private Trace> traceRoot; - - final private List callStack = new ArrayList<>(); - - private Step stepIntoResult; - private Step stepOverResult; - private Step stepReturnResult; - - private Step stepBackIntoResult; - private Step stepBackOverResult; - private Step stepBackOutResult; - - final private List listeners = new ArrayList<>(); - - @SuppressWarnings("unchecked") - private Step computeBackInto(List stepPath) { - final List rootSteps = traceRoot.getRootStep().getSubSteps(); - final int depth = stepPath.size(); - Step result = null; - if (depth > 1) { - final Step currentStep = stepPath.get(depth - 1); - final Step parentStep = stepPath.get(depth - 2); - final SequentialStep parentStep_cast = (SequentialStep) parentStep; - final List parentSubSteps = parentStep_cast.getSubSteps(); - final int idx = parentSubSteps.indexOf(currentStep); - if (idx == 0) { - // If the current step is the first in its parents substeps, - // return parent step - result = parentStep; - } else if (idx > 0) { - // Otherwise, return the deepest substep in the previous sibling - // step - final Step previousSiblingStep = parentSubSteps.get(idx - 1); - Step tmpStep = previousSiblingStep; - final List tmpSubSteps = new ArrayList<>(); - tmpSubSteps.clear(); - if (tmpStep instanceof SequentialStep) { - SequentialStep tmpStep_cast = (SequentialStep) tmpStep; - tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); - } - while (!tmpSubSteps.isEmpty()) { - tmpStep = tmpSubSteps.get(tmpSubSteps.size() - 1); - tmpSubSteps.clear(); - if (tmpStep instanceof SequentialStep) { - SequentialStep tmpStep_cast = (SequentialStep) tmpStep; - tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); - } - } - result = tmpStep; - } - } else if (depth == 1) { - final Step currentStep = stepPath.get(0); - final int idx = rootSteps.indexOf(currentStep); - if (idx > 0) { - Step tmpStep = rootSteps.get(idx - 1); - final List tmpSubSteps = new ArrayList<>(); - tmpSubSteps.clear(); - if (tmpStep instanceof SequentialStep) { - SequentialStep tmpStep_cast = (SequentialStep) tmpStep; - tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); - } - while (!tmpSubSteps.isEmpty()) { - tmpStep = tmpSubSteps.get(tmpSubSteps.size() - 1); - tmpSubSteps.clear(); - if (tmpStep instanceof SequentialStep) { - SequentialStep tmpStep_cast = (SequentialStep) tmpStep; - tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); - } - } - result = tmpStep; - } - } - return result; - } - - @SuppressWarnings("unchecked") - private Step computeBackOver(List stepPath) { - final List rootSteps = traceRoot.getRootStep().getSubSteps(); - final int depth = stepPath.size(); - Step result = null; - if (depth > 1) { - final Step currentStep = stepPath.get(depth - 1); - final Step parentStep = stepPath.get(depth - 2); - final SequentialStep parentStep_cast = (SequentialStep) parentStep; - final List parentSubSteps = parentStep_cast.getSubSteps(); - final int idx = parentSubSteps.indexOf(currentStep); - if (idx == 0) { - // If the current step is the first in its parents substeps, - // return parent step - result = parentStep; - } else { - // Otherwise, return the previous sibling step - result = parentSubSteps.get(idx - 1); - } - } else if (depth == 1) { - final Step currentStep = stepPath.get(0); - final int idx = rootSteps.indexOf(currentStep); - if (idx > 0) { - result = rootSteps.get(idx - 1); - } - } - return result; - } - - private Step computeBackOut(List stepPath) { - if (stepPath.size() > 1) { - return stepPath.get(stepPath.size() - 2); - } - return null; - } - - private Step computeStepInto(List stepPath, List rootSteps) { - return findNextStep(stepPath, null, 0); - } - - private Step computeStepOver(List stepPath, List rootSteps) { - if (!stepPath.isEmpty()) { - return findNextStep(stepPath, stepPath.get(stepPath.size() - 1), 1); - } - return null; - } - - private Step computeStepReturn(List stepPath, List rootSteps) { - if (stepPath.size() > 1) { - return findNextStep(stepPath, stepPath.get(stepPath.size() - 2), 2); - } - return null; - } - - @SuppressWarnings("unchecked") - private Step findNextStep(final List stepPath, final Step previousStep, final int start) { - final List rootSteps = traceRoot.getRootStep().getSubSteps(); - Step result = null; - int i = start; - int depth = stepPath.size(); - Step previous = previousStep; - while (result == null && i < depth) { - final Step currentStep = stepPath.get(depth - i - 1); - final List currentSubSteps = new ArrayList<>(); - if (currentStep instanceof SequentialStep) { - currentSubSteps.addAll(((SequentialStep) currentStep).getSubSteps()); - } - if (currentSubSteps.isEmpty()) { - // No substep to step into, we thus have to explore the substeps - // of the parent step - previous = currentStep; - } else { - if (previous == null) { - // First time we step into - result = currentSubSteps.get(0); - } else { - final int idx = currentSubSteps.indexOf(previous) + 1; - if (idx < currentSubSteps.size()) { - // We step into the next step - result = currentSubSteps.get(idx); - } else { - previous = currentStep; - } - } - } - i++; - } - if (result == null) { - final int idx = rootSteps.indexOf(previous) + 1; - if (idx < rootSteps.size()) { - result = rootSteps.get(idx); - } - } - return result; - } - - private void computeExplorerState(List stepPath) { - final List rootSteps = traceRoot.getRootStep().getSubSteps(); - - final List stepPathUnmodifiable = Collections.unmodifiableList(stepPath); - - stepIntoResult = computeStepInto(stepPathUnmodifiable, rootSteps); - stepOverResult = computeStepOver(stepPathUnmodifiable, rootSteps); - stepReturnResult = computeStepReturn(stepPathUnmodifiable, rootSteps); - - stepBackIntoResult = computeBackInto(stepPathUnmodifiable); - stepBackOverResult = computeBackOver(stepPathUnmodifiable); - stepBackOutResult = computeBackOut(stepPathUnmodifiable); - - callStack.clear(); - callStack.addAll(stepPathUnmodifiable.stream().map(s -> (Step) s).collect(Collectors.toList())); - } - - private void jumpBeforeStep(Step step) { - updateCallStack(step); - } - - public void loadTrace(Trace> root) { - traceRoot = root; - } - - @Override - public void notifyListeners() { - for (ITraceListener listener : listeners) { - listener.update(); - } - } - - @Override - public void addListener(ITraceListener listener) { - if (listener != null) { - listeners.add(listener); - } - } - - @Override - public void removeListener(ITraceListener listener) { - if (listener != null) { - listeners.remove(listener); - } - } - - @Override - public void update() { - notifyListeners(); - } - - @Override - public Step getCurrentForwardStep() { - if (!callStack.isEmpty()) { - return callStack.get(callStack.size() - 1); - } - return null; - } - - @Override - public Step getCurrentBackwardStep() { - return stepBackOverResult; - } - - @Override - public Step getCurrentBigStep() { - return stepBackOutResult; - } - - @Override - public int getCurrentStateIndex() { - return -1; - } - - @Override - public void jump(EObject o) { - } - - @Override - public void jump(int i) { - } - - @SuppressWarnings("unchecked") - @Override - public void loadLastState() { - final List steps = traceRoot.getRootStep().getSubSteps(); - Step lastStep = null; - while (!steps.isEmpty()) { - lastStep = steps.get(steps.size() - 1); - steps.clear(); - if (lastStep instanceof SequentialStep) { - steps.addAll(((SequentialStep) lastStep).getSubSteps()); - } - } - jumpBeforeStep(lastStep); - } - - @Override - public boolean stepInto() { - if (stepIntoResult != null) { - jumpBeforeStep(stepIntoResult); - return true; - } - return false; - } - - @Override - public boolean stepOver() { - if (stepOverResult != null) { - jumpBeforeStep(stepOverResult); - return true; - } - return false; - } - - @Override - public boolean stepReturn() { - if (stepReturnResult != null) { - jumpBeforeStep(stepReturnResult); - return true; - } - return false; - } - - @Override - public boolean canStepBackInto() { - return stepBackIntoResult != null; - } - - @Override - public boolean canStepBackOver() { - return stepBackOverResult != null; - } - - @Override - public boolean canStepBackOut() { - return stepBackOutResult != null; - } - - @Override - public boolean stepBackInto() { - if (stepBackIntoResult != null) { - jumpBeforeStep(stepBackIntoResult); - return true; - } - return false; - } - - @Override - public boolean stepBackOver() { - if (stepBackOverResult != null) { - jumpBeforeStep(stepBackOverResult); - return true; - } - return false; - } - - @Override - public boolean stepBackOut() { - if (stepBackOutResult != null) { - jumpBeforeStep(stepBackOutResult); - return true; - } - return false; - } - - @Override - public void stepValue(int traceIndex) { - } - - @Override - public void backValue(int traceIndex) { - } - - @Override - public boolean canStepValue(int traceIndex) { - return false; - } - - @Override - public boolean canBackValue(int traceIndex) { - return false; - } - - @Override - public boolean isInReplayMode() { - return stepIntoResult != null; - } - - @Override - public List getCallStack() { - return callStack; - } - - @Override - public void updateCallStack(Step step) { - Step step_cast = (Step) step; - final List newPath = new ArrayList<>(); - newPath.add(step_cast); - EObject container = step.eContainer(); - while (container != null && container instanceof Step) { - newPath.add(0, (Step) container); - container = container.eContainer(); - } - computeExplorerState(newPath); - update(); - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceExtractor.java b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceExtractor.java deleted file mode 100644 index 2eceaa727..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceExtractor.java +++ /dev/null @@ -1,123 +0,0 @@ -package fr.inria.diverse.trace.gemoc.traceaddon; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.SequentialStep; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.Trace; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor; - -public class GenericTraceExtractor implements ITraceExtractor { - - private Trace> traceRoot; - - @Override - public void update() { - } - - @Override - public boolean compareStates(EObject e1, EObject e2, boolean respectIgnored) { - return false; - } - - @Override - public ValueWrapper getValueWrapper(int traceIndex, int stateIndex) { - return null; - } - - @Override - public StateWrapper getStateWrapper(int stateIndex) { - return null; - } - - @Override - public List getStateWrappers(int startStateIndex, int endStateIndex) { - return Collections.emptyList(); - } - - @Override - public List getValueWrappers(int valueTraceIndex, int startStateIndex, int endStateIndex) { - return Collections.emptyList(); - } - - @SuppressWarnings("unchecked") - @Override - public StepWrapper getStepWrapper(Step step) { - final List subSteps = new ArrayList<>(); - if (step instanceof SequentialStep) { - subSteps.addAll(((SequentialStep) step).getSubSteps()); - } - return new StepWrapper(step, -1, -1, subSteps); - } - - @Override - public List getStepWrappers(int start, int end) { - return traceRoot.getRootStep().getSubSteps().stream().map(s -> getStepWrapper(s)).collect(Collectors.toList()); - } - - @Override - public int getNumberOfTraces() { - return 0; - } - - @Override - public int getStatesTraceLength() { - return 0; - } - - @Override - public int getValuesTraceLength(int traceIndex) { - return 0; - } - - @Override - public String getValueLabel(int traceIndex) { - return null; - } - - @Override - public String getStateDescription(int stateIndex) { - return null; - } - - @Override - public String getValueDescription(int traceIndex, int stateIndex) { - return null; - } - - @Override - public LaunchConfiguration getLaunchConfiguration() { - return traceRoot.getLaunchconfiguration(); - } - - public void loadTrace(Trace> root) { - traceRoot = root; - } - - @Override - public void ignoreValueTrace(int trace, boolean ignore) { - } - - @Override - public boolean isValueTraceIgnored(int trace) { - return false; - } - - @Override - public Collection> computeStateEquivalenceClasses(List states) { - return null; - } - - @Override - public Collection> computeStateEquivalenceClasses() { - return null; - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceStepFactory.java b/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceStepFactory.java deleted file mode 100644 index 0dd0b03cc..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/src/fr/inria/diverse/trace/gemoc/traceaddon/GenericTraceStepFactory.java +++ /dev/null @@ -1,17 +0,0 @@ -package fr.inria.diverse.trace.gemoc.traceaddon; - -import java.util.List; - -import fr.inria.diverse.trace.commons.model.trace.MSE; -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.commons.model.trace.TraceFactory; -import fr.inria.diverse.trace.gemoc.api.IStepFactory; - -public class GenericTraceStepFactory implements IStepFactory { - - @Override - public Step createStep(MSE mse, List parameters, List result) { - return TraceFactory.eINSTANCE.createSequentialStep(); - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.project b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.project deleted file mode 100644 index 698f50837..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.metamodel.generator - - - - - - 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/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/META-INF/MANIFEST.MF deleted file mode 100644 index cc4fbc604..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: fr.inria.diverse.trace.metamodel.generator;singleton:=true -Bundle-Version: 1.0.0.qualifier -Require-Bundle: org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - com.google.guava, - org.eclipse.xtext.xbase.lib, - fr.inria.diverse.ecorext;bundle-version="0.1.0", - org.eclipse.emf.ecore.xmi;bundle-version="2.10.1", - fr.inria.diverse.trace.commons;bundle-version="1.0.0", - org.eclipse.emf.codegen.ecore;bundle-version="2.10.2", - org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0";visibility:=reexport -Bundle-ActivationPolicy: lazy -Export-Package: fr.inria.diverse.trace.metamodel.generator -Bundle-ClassPath: . -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/build.properties b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/build.properties deleted file mode 100644 index 761d5f715..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -# - -bin.includes = .,\ - model/,\ - META-INF/ -jars.compile.order = . -source.. = src/,\ - xtend-gen/ -output.. = bin/ diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/model/base.ecore b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/model/base.ecore deleted file mode 100644 index c6eb013c7..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/model/base.ecore +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/pom.xml deleted file mode 100644 index f376a77e1..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.metamodel.generator - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMExplorer.xtend b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMExplorer.xtend deleted file mode 100644 index e987a1347..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMExplorer.xtend +++ /dev/null @@ -1,144 +0,0 @@ -package fr.inria.diverse.trace.metamodel.generator - -import java.util.HashMap -import java.util.HashSet -import java.util.Map -import java.util.Set -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EFactory -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EReference -import org.eclipse.xtend.lib.annotations.Accessors - -class TraceMMExplorer { - - private val EPackage tracemm - - // Base classes - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass stateClass - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificTraceClass - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificStepClass - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass valueClass - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EPackage stepsPackage - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EPackage statesPackage - - protected val EFactory rootFactory; - protected val EFactory stepFactory; - - // protected EFactory tracedFactory; - protected val EFactory stateFactory - - /** - * Here we focus on the part of the base trace mm, because TraceMMExplorer is - * used in the TraceMMGenerator as well. - */ - new(EPackage traceMetamodel) { - this.tracemm = traceMetamodel - - // Find the Trace class - specificTraceClass = tracemm.eAllContents.filter(EClass).findFirst [ c | - c.name.equals(TraceMMStrings.class_Trace) - ] as EClass - - // Find the State class - stateClass = tracemm.eAllContents.filter(EClass).findFirst [ c | - c.name.equals(TraceMMStrings.class_State) - ] as EClass - - // Find the Value class - valueClass = tracemm.eAllContents.filter(EClass).findFirst [ c | - c.name.equals(TraceMMStrings.class_Value) - ] as EClass - - // Find the Step class - specificStepClass = tracemm.eAllContents.filter(EClass).findFirst [ c | - c.name.equals(TraceMMStrings.class_Step) - ] as EClass - stepsPackage = specificStepClass.EPackage - - // Find the States package - statesPackage = tracemm.eAllContents.filter(EPackage).findFirst [ p | - p.name.equals(TraceMMStrings.package_States) - ] as EPackage - - rootFactory = tracemm.EFactoryInstance - stepFactory = stepsPackage.EFactoryInstance - stateFactory = statesPackage.EFactoryInstance - } - - private var initDone = false - - def void init() { - if (!initDone) { - - stepClassesCache = new HashSet - stepClassesCache.addAll(stepsPackage.eAllContents.filter(EClass).filter [ c | - c != specificStepClass - ].toSet) - - refs_valueRefsFromStateClassCache = stateClass.getEAllReferences.filter [ r | - !r.name.equals(TraceMMStrings.ref_ValueToStates) - ].toSet - - initDone = true - } - - } - - private Set stepClassesCache = null - - public def Set stepClasses() { - init() - return stepClassesCache - } - - private val Map stepSequenceRefOfCache = new HashMap - - public def EReference stepSequenceRefOf(EClass stepClass) { - - if (!stepSequenceRefOfCache.containsKey(stepClass)) { - stepSequenceRefOfCache.put(stepClass, specificTraceClass.EReferences.findFirst [ r | - r.name.equals(TraceMMStrings.ref_createTraceClassToStepClass(stepClass)) - ]) - } - - return stepSequenceRefOfCache.get(stepClass) - } - - def EObject createEventOccurrence(EClass stepClass) { - return stepFactory.create(stepClass) - } - - def EObject createTracedObject(EClass tracedClass) { - - // TODO provide somewhere a generic create method? not related to trace mm explorer - return tracedClass.EPackage.EFactoryInstance.create(tracedClass) - } - - def EObject createState(EClass stateClass) { - return stateFactory.create(stateClass) - } - - // References to state classes from the global state class - private var Set refs_valueRefsFromStateClassCache - - def Set refs_valueRefsFromStateClass() { - init() - return refs_valueRefsFromStateClassCache - } - - private val Map> refs_originalObjectCache = new HashMap - - def Set refs_originalObject(EClass traceClass) { - - if (!refs_originalObjectCache.containsKey(traceClass)) { - refs_originalObjectCache.put(traceClass, traceClass.EAllReferences.filter [ r | - r.name.startsWith(TraceMMStrings.ref_OriginalObject) - ].toSet) - } - - return refs_originalObjectCache.get(traceClass) - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGenerationTraceability.xtend b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGenerationTraceability.xtend deleted file mode 100644 index b2295ff0b..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGenerationTraceability.xtend +++ /dev/null @@ -1,232 +0,0 @@ -package fr.inria.diverse.trace.metamodel.generator - -import org.eclipse.emf.ecore.EClass -import java.util.Set -import org.eclipse.emf.ecore.EReference -import org.eclipse.xtend.lib.annotations.Accessors -import java.util.HashSet -import java.util.Map -import java.util.HashMap -import org.eclipse.emf.ecore.EStructuralFeature -import ecorext.Ecorext -import ecorext.Rule -import org.eclipse.emf.ecore.EClassifier - -/** - * Second output of the transformation: a class both to access to parts - * of the trace metamodel, and with links between the original metamodels - * and the trace metamodel. - */ -class TraceMMGenerationTraceability { - - new(TraceMMExplorer traceMMExplorer, Ecorext mmext) { - this.traceMMExplorer = traceMMExplorer - this.mmext = mmext - } - - @Accessors(PUBLIC_GETTER, PACKAGE_SETTER) - private val TraceMMExplorer traceMMExplorer - @Accessors(PUBLIC_GETTER, PACKAGE_SETTER) - private val Ecorext mmext - - private Set runtimeClasses = new HashSet - - package def void addRuntimeClass(EClass c) { - runtimeClasses.add(c) - } - - public def Set getRuntimeClasses() { - return runtimeClasses.immutableCopy - } - - private Map> mutableProperties = new HashMap> - - package def void addMutableProperty(EClass c, EStructuralFeature r) { - if (!mutableProperties.containsKey(c)) - mutableProperties.put(c, new HashSet) - mutableProperties.get(c).add(r) - } - - public def Set getMutablePropertiesOf(EClass c) { - if (mutableProperties.containsKey(c)) { - return mutableProperties.get(c).immutableCopy - } else { - return #{} - } - } - - public def Set getAllMutableProperties() { - return mutableProperties.values.flatten.toSet - } - - val tracedClasses = new HashMap - - package def void putTracedClasses(EClass runtimeClass, EClass tracedClass) { - tracedClasses.put(runtimeClass, tracedClass) - } - - public def EClass getTracedClass(org.eclipse.emf.ecore.EClass mutableClass) { - return tracedClasses.get(mutableClass) - } - - public def Set getTracedClassSet() { - val result = new HashSet - result.addAll(tracedClasses.keySet) - return result - } - - public def Set getNewClasses() { - val Set newClasses = new HashSet - for (p : mmext.newPackages) { - newClasses.addAll(p.eAllContents.filter(EClass).toSet) - } - return newClasses - } - - public def boolean hasTracedClass(EClass mutableClass) { - return tracedClasses.containsKey(mutableClass) - } - - public def Set getAllMutableClasses() { - return tracedClasses.keySet; - } - - - - public def EClass getRealMutableClass(org.eclipse.emf.ecore.EClass tracedClass) { - val mutClass = tracedClasses.entrySet.findFirst[p|p.value == tracedClass] - if (mutClass != null) - return mutClass.key - else - return null - } - - private Map> refs_originalObject = new HashMap> - - package def void addRefs_originalObject(EClass c1, EReference r) { - if (!refs_originalObject.containsKey(c1)) - refs_originalObject.put(c1, new HashSet) - refs_originalObject.get(c1).add(r) - } - - public def Set getRefs_originalObject(org.eclipse.emf.ecore.EClass class1) { - val Set res = new HashSet - val existingRefs = class1.EAllSuperTypes.map[c|getRefs_originalObject(c)].flatten.toSet - res.addAll(existingRefs) - val refsForThisClass = refs_originalObject.get(class1) - if (refsForThisClass != null && !refsForThisClass.isEmpty) - res.addAll(refsForThisClass) - return res - } - - private Map traceOf = new HashMap - - package def void putTraceOf(EStructuralFeature r1, EReference r2) { - traceOf.put(r1, r2) - } - - public def EReference getTraceOf(EStructuralFeature s) { - return traceOf.get(s) - } - - private Map stateClassToValueClass = new HashMap - - package def void putStateClassToValueClass(EStructuralFeature r1, EReference r2) { - stateClassToValueClass.put(r1, r2) - } - - public def EReference getStateClassToValueClass(EStructuralFeature s) { - if (mutablePropertyToValueProperty.containsValue(s)) { - val key = mutablePropertyToValueProperty.entrySet.findFirst[entry|entry.value == s].key - return stateClassToValueClass.get(key) - } else { - return stateClassToValueClass.get(s) - } - - } - - private Set stepClasses = new HashSet - - package def void addStepClass(EClass c) { - stepClasses.add(c) - } - - public def Set getStepClasses() { - return stepClasses.immutableCopy - } - - private val Map stepRuleToStepClass = new HashMap - - package def void addStepRuleToStepClass(Rule stepRule, EClass stepClass) { - stepRuleToStepClass.put(stepRule, stepClass) - } - - public def EClass getStepClassFromStepRule(Rule stepRule) { - return stepRuleToStepClass.get(stepRule) - } - - private Set bigStepClasses = new HashSet - - package def void addBigStepClass(EClass c) { - bigStepClasses.add(c) - } - - public def Set getBigStepClasses() { - return bigStepClasses.immutableCopy - } - - private Map implicitStepClasses = new HashMap - - package def void putImplicitStepClass(EClass step, EClass containgClass) { - implicitStepClasses.put(step,containgClass) - } - - public def Set getImplicitStepClasses() { - return implicitStepClasses.keySet.immutableCopy - } - - public def EClass getImplicitStepContainingClass(EClass implicitStepClass) { - return implicitStepClasses.get(implicitStepClass) - } - - private val Map stepSequences = new HashMap - - package def void addStepSequence(EClass stepClass, EReference trace) { - stepSequences.put(stepClass, trace) - } - - public def EReference getStepSequence(EClass stepClass) { - return stepSequences.get(stepClass) - } - - def boolean hasExeClass(EClass tracedClass) { - return tracedClasses.keySet.exists[k|tracedClasses.get(k) == tracedClass]; - } - - def EClass getExeClass(EClass tracedClass) { - return tracedClasses.keySet.findFirst[k|tracedClasses.get(k) == tracedClass]; - } - - private val Map mutablePropertyToValueProperty = new HashMap - - def void putMutablePropertyToValueProperty(org.eclipse.emf.ecore.EStructuralFeature mutableProperty, org.eclipse.emf.ecore.EStructuralFeature valueProperty) { - mutablePropertyToValueProperty.put(mutableProperty,valueProperty) - } - - def EStructuralFeature getValuePropertyOfMutableProperty(EStructuralFeature mutableProperty) { - return mutablePropertyToValueProperty.get(mutableProperty) - } - - def EClassifier getRealMutableClass(EClassifier c) { - if (xmofExeToConf.containsKey(c)) xmofExeToConf.get(c) else c - } - - public val Map xmofExeToConf = new HashMap - - def void addXmofExeToConf(EClass exe, EClass conf) { - xmofExeToConf.put(exe,conf) - } - - - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGeneratorStates.xtend b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGeneratorStates.xtend deleted file mode 100644 index e72687d5f..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGeneratorStates.xtend +++ /dev/null @@ -1,365 +0,0 @@ -package fr.inria.diverse.trace.metamodel.generator - -import ecorext.ClassExtension -import ecorext.Ecorext -import fr.inria.diverse.trace.commons.ExecutionMetamodelTraceability -import java.util.HashMap -import java.util.HashSet -import java.util.Map -import java.util.Set -import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EOperation -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EReference -import org.eclipse.emf.ecore.EStructuralFeature -import org.eclipse.emf.ecore.EcoreFactory -import org.eclipse.emf.ecore.util.EcoreUtil - -import static fr.inria.diverse.trace.commons.EcoreCraftingUtil.* - -class TraceMMGeneratorStates { - - // Inputs - private val Ecorext mmext - private val EPackage mm - private val TraceMMExplorer traceMMExplorer - private val String languageName - private val boolean gemoc - - // Input/Output (already accessible because created before) - private val EPackage tracemmresult - private val TraceMMGenerationTraceability traceability - - // Transient stuff - private val Map runtimeToTraced = new HashMap - private val Set allRuntimeClasses = new HashSet - private val Set allStaticClasses = new HashSet - private val Set allNewEClasses - private val Map runtimeClass2ClassExtension = new HashMap - private val Set multipleOrig = new HashSet - - new(Ecorext mmext, EPackage mm, TraceMMGenerationTraceability traceability, TraceMMExplorer traceMMExplorer, - String languageName, EPackage tracemmresult, boolean gemoc) { - this.mm = mm - this.mmext = mmext - this.allNewEClasses = mmext.eAllContents.toSet.filter(EClass).toSet - this.traceability = traceability - this.traceMMExplorer = traceMMExplorer - this.languageName = languageName - this.tracemmresult = tracemmresult - this.gemoc = gemoc - } - - private def void cleanup() { - val allCreatedEClasses = this.tracemmresult.eAllContents.filter(EClass).toSet - - for (c : allCreatedEClasses) { - cleanupAnnotations(c); - } - - // TODO is this this necessary? - for (r : runtimeToTraced.values.filter(EReference)) { - r.EOpposite = null - } - } - - public def void process() { - handleTraceClasses() - cleanup() - } - - private def void cleanupAnnotations(EClass eClass) { - val traceabilityAnnotation = ExecutionMetamodelTraceability.getTraceabilityAnnotation(eClass); - eClass.EAnnotations.clear - if (traceabilityAnnotation != null) { - eClass.EAnnotations.add(traceabilityAnnotation); - } - } - - private def EPackage obtainTracedPackage(EPackage runtimePackage) { - var EPackage result = traceMMExplorer.statesPackage - - if (runtimePackage != null) { - val tracedSuperPackage = obtainTracedPackage(runtimePackage.ESuperPackage) - val String tracedPackageName = TraceMMStrings.package_createTracedPackage(runtimePackage) - result = tracedSuperPackage.ESubpackages.findFirst[p|p.name.equals(tracedPackageName)] - if (result == null) { - result = EcoreFactory.eINSTANCE.createEPackage - result.name = tracedPackageName - result.nsURI = languageName + "_" + result.name // TODO - result.nsPrefix = "" // TODO - tracedSuperPackage.ESubpackages.add(result) - } - } - return result - } - - private def String computeTraceabilityAnnotationValue(ClassExtension classExtension) { - var String traceabilityAnnotationValue = null; - if (!classExtension.newProperties.empty) { - val mutableProperty = classExtension.newProperties.get(0); - val String mutablePropertyTraceabilityValue = ExecutionMetamodelTraceability. - getTraceabilityAnnotationValue(mutableProperty) - if (mutablePropertyTraceabilityValue != null) { - val classSubstringStartIndex = mutablePropertyTraceabilityValue.lastIndexOf("/"); - traceabilityAnnotationValue = mutablePropertyTraceabilityValue.substring(0, classSubstringStartIndex); - } - } - return traceabilityAnnotationValue; - } - - private def boolean isInPackage(EPackage c, EPackage p) { - if (c != null && p != null && c == p) { - return true - } else if (c.ESuperPackage != null) { - return isInPackage(c.ESuperPackage, p) - } else { - return false - } - } - - private def Set getSubTypesOf(EClass c) { - val result = new HashSet - for (someEClass : mm.eAllContents.toSet.filter(EClass)) { - if (someEClass.ESuperTypes.contains(c)) { - result.add(someEClass) - } - } - return result - } - - - private def boolean isXmofConfClassOf(EClass c, EClass s) { - if (c.name.endsWith("Configuration") && c.name.startsWith(s.name)) { - traceability.addXmofExeToConf(s,c) - return true - } - return false - } - - private def void getAllInheritance(Set result, EClass c) { - if (!result.contains(c)) { - result.add(c) - for (sup : c.ESuperTypes // TODO ugly fix to not include AS classes in the XMOF case, to remove at some point - .filter[s|! isXmofConfClassOf(c,s)]) { - getAllInheritance(result, sup) - } - for (sub : getSubTypesOf(c)) { - getAllInheritance(result, sub) - } - } - } - - private def Set getAllInheritance(EClass c) { - val result = new HashSet() - getAllInheritance(result, c) - return result - } - - private def void handleTraceClasses() { - - // First we find ALL classes linked to runtime properties - for (c : mmext.classesExtensions) { - val extendedExistingClass = c.extendedExistingClass - allRuntimeClasses.add(extendedExistingClass) - runtimeClass2ClassExtension.put(extendedExistingClass, c) - allRuntimeClasses.addAll(getAllInheritance(extendedExistingClass)) - } - - for (c : allNewEClasses) { - allRuntimeClasses.addAll(getAllInheritance(c)) - } - - // We also store the dual set of classes not linked to anything dynamic - allStaticClasses.addAll(mm.eAllContents.toSet.filter(EClass).filter[c|!allRuntimeClasses.contains(c)]) - - // Here we find classes that inherit from multiple concrete classes - // This allows later to handle multiple non-conflicting "originalObject" references in such cases - for (rc : allRuntimeClasses) { - val concreteSuperTypes = rc.EAllSuperTypes.filter[c|!c.abstract && allRuntimeClasses.contains(c)].toSet - multipleOrig.addAll(concreteSuperTypes) - } - - // We go through all dynamic classes and we create traced versions of them - // we sort them by name to ensure reproducibility of the generated ecore file - for (runtimeClass : allRuntimeClasses.sortBy[name]) { - handleTraceClass(runtimeClass) - } - - } - - private def EClass handleTraceClass(EClass runtimeClass) { - - // If the xmof conf metamodel still has references to the AS, we replace by refs to the conf metamodel - if (traceability.xmofExeToConf.containsKey(runtimeClass)) - return handleTraceClass(traceability.xmofExeToConf.get(runtimeClass)) - - if (!allRuntimeClasses.contains(runtimeClass)) - return runtimeClass - - if (! runtimeToTraced.containsKey(runtimeClass)) { - - // Creating the traced version of the class - val tracedClass = EcoreFactory.eINSTANCE.createEClass - tracedClass.name = TraceMMStrings.class_createTraceClassName(runtimeClass) - tracedClass.abstract = runtimeClass.abstract || runtimeClass.interface - runtimeToTraced.put(runtimeClass, tracedClass) - - // Storing traceability stuff - traceability.putTracedClasses(runtimeClass, tracedClass) - - // "Copying" super types - for (superType : runtimeClass.ESuperTypes.filter[t|allRuntimeClasses.contains(t)]) { - val tracedSuperType = handleTraceClass(superType) - tracedClass.ESuperTypes.add(tracedSuperType) - } - - // We recreate the same package organization - val tracedPackage = obtainTracedPackage(runtimeClass.EPackage) - tracedPackage.EClassifiers.add(tracedClass) - - // If this is a class extension, then we add a reference, to be able to refer to the element of the original model (if originally static element of the model) - val boolean notNewClass = !allNewEClasses.contains(runtimeClass) - val boolean notAbstract = !tracedClass.abstract - - if (notNewClass && runtimeClass2ClassExtension.containsKey(runtimeClass)) { - val traceabilityAnnotationValue = computeTraceabilityAnnotationValue( - runtimeClass2ClassExtension.get(runtimeClass)); - if (traceabilityAnnotationValue != null) - ExecutionMetamodelTraceability.createTraceabilityAnnotation(tracedClass, - traceabilityAnnotationValue); - } - - // Also we must check that there isn't already a concrete class in the super classes, which would have its own origObj ref - val boolean onlyAbstractSuperTypes = runtimeClass.EAllSuperTypes.forall [ c | - !allRuntimeClasses.contains(c) || c.abstract - ] - if (notNewClass && notAbstract && onlyAbstractSuperTypes) { - val refName = if (multipleOrig.contains(runtimeClass)) { - TraceMMStrings.ref_OriginalObject_MultipleInheritance(runtimeClass) - } else { - TraceMMStrings.ref_OriginalObject - } - val EReference ref = addReferenceToClass(tracedClass, refName, runtimeClass) - traceability.addRefs_originalObject(tracedClass, ref) - } - - // Link Trace class -> Traced class - if (!tracedClass.abstract) { - val refTraceClassToTracedClass = addReferenceToClass(traceMMExplorer.specificTraceClass, - TraceMMStrings.ref_createTraceClassToTracedClass(tracedClass), tracedClass) - refTraceClassToTracedClass.containment = true - refTraceClassToTracedClass.ordered = false - refTraceClassToTracedClass.unique = true - refTraceClassToTracedClass.upperBound = -1 - refTraceClassToTracedClass.lowerBound = 0 - } - - // Then going through all properties for the remaining generation - var Set runtimeProperties = new HashSet - if (allNewEClasses.contains(runtimeClass)) - runtimeProperties.addAll(runtimeClass.EStructuralFeatures) - else { - val classExtension = runtimeClass2ClassExtension.get(runtimeClass) - if (classExtension != null) { - runtimeProperties.addAll(classExtension.newProperties); - } -// for (c2 : mmext.classesExtensions) { -// if(c2.extendedExistingClass == runtimeClass) { -// runtimeProperties.addAll(c2.newProperties) -// } -// } - } - - // Storing traceability stuff - if (!runtimeProperties.isEmpty) - traceability.addRuntimeClass(runtimeClass) - - // We go through the runtime properties of this class - for (runtimeProperty : runtimeProperties) { - - // Storing traceability stuff - traceability.addMutableProperty(runtimeClass, runtimeProperty) - - // Value class - val valueClass = EcoreFactory.eINSTANCE.createEClass - valueClass.name = TraceMMStrings.class_createStateClassName(runtimeClass, runtimeProperty) - - // We copy the property inside the value class - val copiedProperty = EcoreUtil.copy(runtimeProperty) as EStructuralFeature - if (copiedProperty instanceof EReference) { - copiedProperty.containment = false - copiedProperty.EOpposite = null - copiedProperty.EType = handleTraceClass(runtimeProperty.EType as EClass) - copiedProperty.derived = false - copiedProperty.changeable = true - copiedProperty.volatile = false - } - valueClass.EStructuralFeatures.add(copiedProperty) - traceMMExplorer.statesPackage.EClassifiers.add(valueClass) - - traceability.putMutablePropertyToValueProperty(runtimeProperty,copiedProperty) - - ExecutionMetamodelTraceability.createTraceabilityAnnotation(valueClass, - ExecutionMetamodelTraceability.getTraceabilityAnnotationValue(runtimeProperty)); - - // The value class inherits the Value abstract class - valueClass.ESuperTypes.add(traceMMExplorer.valueClass) - - // And must hence implement the derived getStepsNoOpposite - val EOperation getStatesNoOppositeEOperation = EcoreFactory.eINSTANCE.createEOperation - getStatesNoOppositeEOperation.EType = traceMMExplorer.stateClass - getStatesNoOppositeEOperation.lowerBound = 1 - getStatesNoOppositeEOperation.upperBound = -1 - getStatesNoOppositeEOperation.name = "getStatesNoOpposite" - val bodyAnnotation = EcoreFactory.eINSTANCE.createEAnnotation - getStatesNoOppositeEOperation.EAnnotations.add(bodyAnnotation) - bodyAnnotation.source = GenModelPackage.eNS_URI - bodyAnnotation.details.put("body", "return this.getStates();") - valueClass.EOperations.add(getStatesNoOppositeEOperation) - - // Link Traced class -> Value class - val refTrace2State = addReferenceToClass(tracedClass, - TraceMMStrings.ref_createTraceClassToValueClass(runtimeProperty), valueClass); - refTrace2State.containment = true - refTrace2State.ordered = true - refTrace2State.unique = true - refTrace2State.lowerBound = 0 - refTrace2State.upperBound = -1 - - traceability.putTraceOf(runtimeProperty, refTrace2State) - - // Link Value class -> Traced class (bidirectional) - val refValue2Traced = addReferenceToClass(valueClass, TraceMMStrings.ref_ValueToTrace, tracedClass); - refValue2Traced.upperBound = 1 - refValue2Traced.lowerBound = 1 - refValue2Traced.EOpposite = refTrace2State - refTrace2State.EOpposite = refValue2Traced - - // Link State -> Value class - val refState2Value = addReferenceToClass(traceMMExplorer.stateClass, - TraceMMStrings.ref_createGlobalToState(valueClass), valueClass); - refState2Value.ordered = false - refState2Value.unique = true - refState2Value.upperBound = -1 - refState2Value.lowerBound = 0 - - traceability.putStateClassToValueClass(runtimeProperty, refState2Value) - - // Link State class -> GlobalState (bidirectional) - val refState2Global = addReferenceToClass(valueClass, TraceMMStrings.ref_ValueToStates, - traceMMExplorer.stateClass); - refState2Global.upperBound = -1 - refState2Global.lowerBound = 1 - refState2Global.EOpposite = refState2Value - refState2Value.EOpposite = refState2Global - } - - return tracedClass - } else { - return runtimeToTraced.get(runtimeClass) - } - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMStrings.xtend b/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMStrings.xtend deleted file mode 100644 index dbbe22dcd..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMStrings.xtend +++ /dev/null @@ -1,63 +0,0 @@ -package fr.inria.diverse.trace.metamodel.generator - -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EStructuralFeature -import org.eclipse.emf.ecore.EPackage - -class TraceMMStrings { - - public static val String class_Trace = "SpecificTrace" - - public static val String class_State = "State" - - public static val String class_Value = "Value" - - public static val String class_Step = "SpecificStep" - - public static val String package_States = "States" - - public static val String package_Steps = "Steps" - - public static val String ref_OriginalObject = "originalObject" - - public static val String ref_ValueToTrace = "parent" - - public static val String ref_ValueToStates = "states" - - public static val String ref_TraceToStates = "statesTrace" - - public static val String ref_StateToStep_started = "startedSteps" - - public static val String ref_StateToStep_ended = "endedSteps" - - public static val String ref_StepToState_starting = "startingState" - - public static val String ref_StepToState_ending = "endingState" - - static def String class_createTraceClassName(EClass runtimeClass) { return "Traced" + runtimeClass.name } - - static def String ref_createTraceClassToTracedClass(EClass tracedClass) { - return tracedClass.EPackage.name.toFirstLower + "_" + tracedClass.name.toFirstLower + "s" - } - - static def String class_createStateClassName(EClass runtimeClass, EStructuralFeature runtimeProperty) { - return runtimeClass.name + "_" + runtimeProperty.name + "_Value" - } - - static def String ref_createTraceClassToValueClass(EStructuralFeature runtimeProperty) { - return runtimeProperty.name + "Sequence" - } - - static def String ref_createGlobalToState(EClass stateClass) { return stateClass.name.toFirstLower + "s" } - - static def String ref_createTraceClassToStepClass(EClass stepClass) { return stepClass.name + "_Sequence" } - - static def String package_createTracedPackage(EPackage runtimePackage) { - return runtimePackage.name - } - - static def String ref_OriginalObject_MultipleInheritance(EClass originalClass) { - return ref_OriginalObject + "_" + originalClass.name - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.gitignore b/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.gitignore deleted file mode 100644 index ed683fd9e..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/bin/ -/xtend-gen/* -/xtend-gen/ diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.project b/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.project deleted file mode 100644 index 1bb109f57..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.plaink3.tracematerialextractor - - - - - - 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/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/META-INF/MANIFEST.MF deleted file mode 100644 index fa5195266..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.trace.metamodel.generator.k3al -Bundle-SymbolicName: fr.inria.diverse.trace.plaink3.tracematerialextractor -Bundle-Version: 1.0.0.qualifier -Require-Bundle: org.eclipse.emf.ecore, - org.eclipse.xtend.core, - org.eclipse.xtext, - org.eclipse.jdt.core, - fr.inria.diverse.trace.commons, - org.eclipse.core.resources, - org.eclipse.core.runtime, - fr.inria.diverse.ecorext, - org.apache.log4j, - org.eclipse.xtend.ide, - org.gemoc.xdsmlframework.commons, - org.eclipse.jdt.ui, - fr.inria.diverse.commons.eclipse.pde -Export-Package: fr.inria.diverse.trace.plaink3.tracematerialextractor -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/pom.xml deleted file mode 100644 index 37d25f86d..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.plaink3.tracematerialextractor - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/K3ExecutionExtensionGenerator.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/K3ExecutionExtensionGenerator.xtend deleted file mode 100644 index c05532e76..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/K3ExecutionExtensionGenerator.xtend +++ /dev/null @@ -1,89 +0,0 @@ -package fr.inria.diverse.trace.plaink3.tracematerialextractor - -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EStructuralFeature -import ecorext.Ecorext -import ecorext.EcorextFactory -import org.eclipse.emf.ecore.util.EcoreUtil.Copier -import org.eclipse.xtend.lib.annotations.Accessors -import org.eclipse.emf.ecore.EcoreFactory -import org.gemoc.xdsmlframework.commons.DynamicAnnotationHelper - -class K3ExecutionExtensionGenerator { - - // Input - private val EPackage extendedMetamodel - - // Output - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - private var Ecorext mmextensionResult - - new(EPackage extendedMetamodel) { - this.extendedMetamodel = extendedMetamodel - this.mmextensionResult = EcorextFactory.eINSTANCE.createEcorext - } - - protected def EPackage obtainExtensionPackage(EPackage runtimePackage) { - - // Null means that the root is the Ecorext object - var EPackage result = null - - if (runtimePackage != null) { - - val tracedSuperPackage = obtainExtensionPackage(runtimePackage.ESuperPackage) - - if (tracedSuperPackage == null) - result = mmextensionResult.newPackages.findFirst[p|p.name.equals(runtimePackage.name)] - else - result = tracedSuperPackage.ESubpackages.findFirst[p|p.name.equals(runtimePackage.name)] - - if (result == null) { - result = EcoreFactory.eINSTANCE.createEPackage - result.name = runtimePackage.name - result.nsURI = result.name // TODO - result.nsPrefix = "" // TODO - if (tracedSuperPackage == null) { - mmextensionResult.newPackages.add(result) - } else - tracedSuperPackage.ESubpackages.add(result) - } - - } - return result - } - - def void generate() { - - val Copier copier = new Copier() - - for (c : extendedMetamodel.eAllContents.filter(EClass).toSet) { - - // Either partially mutable or not mutable at all - if (!DynamicAnnotationHelper.isDynamic(c)) { - - val mutableProperties = c.EStructuralFeatures.filter[p|DynamicAnnotationHelper.isDynamic(p)] - if (mutableProperties != null && !mutableProperties.empty) { - val classExt = EcorextFactory.eINSTANCE.createClassExtension - - // TODO for now we refer to the extended metamodel, not the original one! - classExt.extendedExistingClass = c - mmextensionResult.classesExtensions.add(classExt) - for (p : mutableProperties) { - val copiedProp = copier.copy(p) as EStructuralFeature - classExt.newProperties.add(copiedProp) - } - } - } // Or completely mutable - else { - - val EClass copiedClass = copier.copy(c) as EClass - val EPackage containingPackage = obtainExtensionPackage(c.EPackage) - containingPackage.EClassifiers.add(copiedClass) - - } - } - copier.copyReferences - - } -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/K3StepExtractor.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/K3StepExtractor.xtend deleted file mode 100644 index 9aa7af799..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/K3StepExtractor.xtend +++ /dev/null @@ -1,454 +0,0 @@ -package fr.inria.diverse.trace.plaink3.tracematerialextractor - -import ecorext.Ecorext -import ecorext.EcorextFactory -import ecorext.Rule -import fr.inria.diverse.commons.eclipse.callgraph.CallHierarchyHelper -import java.util.ArrayList -import java.util.HashMap -import java.util.HashSet -import java.util.List -import java.util.Map -import java.util.Set -import org.eclipse.core.runtime.NullProgressMonitor -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EOperation -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EcoreFactory -import org.eclipse.jdt.core.IAnnotation -import org.eclipse.jdt.core.IMethod -import org.eclipse.jdt.core.IType -class K3StepExtractor { - - // Input - private val Set allClasses - private val EPackage extendedMetamodel - - // Input / Output - private val Ecorext ecoreExtension - - // Transient - private val Map stepAspectsClassToAspectedClasses = new HashMap - private val Set allMethods = new HashSet - private val Set allk3Methods = new HashSet - private val Set allSuperMethods = new HashSet - private val Set stepFunctions = new HashSet - private val Map functionToRule = new HashMap - private val Set inspectedClasses = new HashSet - - private val Map methodToK3Method = new HashMap - private val Map k3MethodToMethod = new HashMap - private val Map superMethodTok3Method = new HashMap - private val Map> k3MethodToCalledMethods = new HashMap - private val Map> methodToOverridingMethods = new HashMap - private val Map> callGraph = new HashMap - private val Map> classToSubClasses = new HashMap - private val Map> classToSuperClasses = new HashMap - - new(Set aspects, String languageName, EPackage extendedMetamodel, Ecorext inConstructionEcorext) { - this.allClasses = aspects - this.extendedMetamodel = extendedMetamodel - this.ecoreExtension = inConstructionEcorext - } - - public def void generate() { - generateStepFromXtend(allClasses) - } - - private def Rule getRuleOfFunction(IMethod function) { - if (functionToRule.containsKey(function)) - return functionToRule.get(function) - else { - val Rule rule = EcorextFactory.eINSTANCE.createRule; - this.ecoreExtension.rules.add(rule) - - // We find the ecore class matching the aspected java class - val containingClass = function.declaringType - rule.containingClass = stepAspectsClassToAspectedClasses.get(containingClass) - - var EOperation candidate = null - if (rule.containingClass != null) { - candidate = rule.containingClass.EAllOperations.findFirst [ o | - o.name.equals(function.elementName) - ] - - } - if (candidate != null) { - rule.operation = candidate - } else { - rule.operation = xtendFunctionToEOperation(function) - } - - rule.stepRule = stepFunctions.contains(function) - rule.main = isMain(function) - functionToRule.put(function, rule) - return rule - } - } - - private def void inspectForBigStep(IMethod function) { - - // We consider that each Kermeta function is a transformation rule (even through we cannot know if it modifies anything) - val Rule rule = getRuleOfFunction(function) - - // We retrieve which functions are called by the function - val calledFunctions = callGraph.get(function) - if (calledFunctions != null) { - for (calledFunction : calledFunctions) { - if (calledFunction !== null) { - val Rule calledRule = getRuleOfFunction(calledFunction) - rule.calledRules.add(calledRule) - } - } - } - - // Finally we look if this function was overriden/implemented by subtypes - // TODO use annotation? - val subtypes = classToSubClasses.get(function.declaringType) - if (subtypes != null) { - for (t : subtypes) { - for (f : t.methods) { - if (f.elementName.equals(function.elementName)) { - val Rule overridingRule = getRuleOfFunction(f) - rule.overridenBy.add(overridingRule) - } - } - } - } - } - - private def EOperation xtendFunctionToEOperation(IMethod function) { - val result = EcoreFactory.eINSTANCE.createEOperation - result.name = function.elementName - // TODO finish the translation and/or ask Thomas - // TODO or consider it is already in the ecore? - return result - } - - private def void inspectClass(IType type) { - if (!inspectedClasses.contains(type)) { - // Gather all the actual bodies of the methods (_privk3_ methods) - val typeK3Methods = type.methods.filter[elementName.startsWith("_privk3_")] - allk3Methods.addAll(typeK3Methods) - - // Gather the methods calling those k3 methods - val typeMethods = type.methods.filter[m|typeK3Methods.exists[c| - c.elementName.substring(8).equals(m.elementName) - ]] - allMethods.addAll(typeMethods) - - typeMethods.forEach[m| - val k3m = typeK3Methods.findFirst[c|c.elementName.substring(8).equals(m.elementName)] - k3MethodToMethod.put(k3m,m) - methodToK3Method.put(m,k3m) - ] - - val Set candidateSupers = new HashSet - candidateSupers.addAll(type.methods.filter[elementName.startsWith("super_")]) - - // Gather all k3 generated super methods - allSuperMethods.addAll(candidateSupers.filter[c|type.methods.exists[m| - c.elementName.substring(6).equals(m.elementName) - ]]) - - // For each aspect annotation of the class - for (a : getAspectAnnotations(type)) { - - // We find the JVM aspected class - val aspectedEClass = getAspectized(a) - - // We store the aspect class and the aspected class - stepAspectsClassToAspectedClasses.put(type, aspectedEClass) - - // And we store all the functions with @Step - stepFunctions.addAll(type.methods.filter[isStep]) - } - inspectedClasses.add(type) - } - } - - private def void gatherCallsFromK3(IMethod function) { - val callingSites = CallHierarchyHelper.getCallLocationsOf(function) - callingSites.forEach[cl| - val f = function - val member = cl.member - val method = getContainingAspectMethod(member as IMethod) - allk3Methods - // Filter out non-k3 methods - .filter[m|m == method] - // And add 'function' to the called methods of each calling k3 method - .forEach[m| - var calledMethods = k3MethodToCalledMethods.get(m) - if (calledMethods == null) { - calledMethods = new HashSet - k3MethodToCalledMethods.put(m,calledMethods) - } - calledMethods.add(f) - ] - ] - } - - private def void gatherCallsFromSuper(IMethod function) { - val callingSites = CallHierarchyHelper.getCallLocationsOf(function) - callingSites.forEach[cl| - allSuperMethods - // TODO unfold lambdas - - // Filter out non-super methods - .filter[m|m == cl.member] - // And set 'function' to be the called method of each calling super method - .forEach[m|superMethodTok3Method.put(m,function)] - ] - } - - private def void gatherOverridenMethods(IMethod method) { - if (method.override) { - val methodName = method.elementName - val declaringType = method.declaringType - val superClasses = classToSuperClasses.get(declaringType) - if (superClasses != null) { - superClasses.forEach[c| - val overridenMethod = c.methods.findFirst[m|m.elementName.equals(methodName)] - if (overridenMethod != null) { - var overridingMethods = methodToOverridingMethods.get(overridenMethod) - if (overridingMethods == null) { - overridingMethods = new HashSet - methodToOverridingMethods.put(overridenMethod,overridingMethods) - } - overridingMethods.add(method) - } - ] - } - } - } - - private def generateStepFromXtend(Set files) { - // First we store the class hierarchy of each class. - allClasses.forEach[c| - val allSuperClasses = c.allSuperClasses.filter[t|allClasses.contains(t)].toSet - classToSuperClasses.put(c,allSuperClasses) - val allSubClasses = c.allSubClasses.filter[t|allClasses.contains(t)].toSet - classToSubClasses.put(c,allSubClasses) - ] - - // Then we look for functions, step aspects and step functions - for (c : allClasses) { - inspectClass(c) - } - - allk3Methods.forEach[gatherCallsFromSuper] - allMethods.forEach[gatherOverridenMethods] - allMethods.forEach[gatherCallsFromK3] - allSuperMethods.forEach[gatherCallsFromK3] - - // We establish the base callgraph. - allMethods.forEach[m| - val k3m = methodToK3Method.get(m) - if (k3m != null) { - val calledMethods = k3MethodToCalledMethods.get(k3m) - if (calledMethods != null) { - calledMethods.forEach[c| - if (allMethods.contains(c)) { - var tmp = callGraph.get(m) - if (tmp == null) { - tmp = new HashSet - callGraph.put(m,tmp) - } - tmp.add(c) - } - ] - } - } - ] - - val callGraphTotalLengthComputer = [|callGraph.values.map[s|s.size].reduce[i1, i2|i1 + i2]] - - // For each method, we add to its called methods the methods that can be called - // from each of its overriding methods. - var totalLength = callGraphTotalLengthComputer.apply() - var previousTotalLength = -1 - while(totalLength > previousTotalLength) { - allMethods.forEach[m| - val calledMethods = - if (callGraph.get(m) == null) { - val tmp = new HashSet - callGraph.put(m,tmp) - tmp - } else { - callGraph.get(m) - } - val overridingMethods = methodToOverridingMethods.get(m) - if (overridingMethods != null) { - overridingMethods.forEach[n| - val calledByOverride = callGraph.get(n) - if (calledByOverride != null) { - calledMethods.addAll(calledByOverride) - } - ] - } - ] - previousTotalLength = totalLength - totalLength = callGraphTotalLengthComputer.apply() - } - - // For each method, we add to their called methods the methods overriding - // those called methods. - totalLength = callGraphTotalLengthComputer.apply() - previousTotalLength = -1 - while(totalLength > previousTotalLength) { - allMethods.forEach[m| - val calledMethods = callGraph.get(m) - if (calledMethods != null) { - val tmp = new HashSet - calledMethods.forEach[n| - val overridingMethods = methodToOverridingMethods.get(n) - if (overridingMethods != null) { - tmp.addAll(overridingMethods) - } - ] - calledMethods.addAll(tmp) - } - ] - previousTotalLength = totalLength - totalLength = callGraphTotalLengthComputer.apply() - } - - // We then add in the support for calls to super methods. - allMethods.forEach[m| - val k3m = methodToK3Method.get(m) - if (k3m != null) { - val calledMethods = k3MethodToCalledMethods.get(k3m) - if (calledMethods != null) { - calledMethods.forEach[c| - if (allSuperMethods.contains(c)) { - val actualk3Method = superMethodTok3Method.get(c) - if (actualk3Method != null) { - val actualMethod = k3MethodToMethod.get(actualk3Method) - if (actualMethod != null && allMethods.contains(actualMethod)) { - var tmp = callGraph.get(m) - if (tmp == null) { - tmp = new HashSet - callGraph.put(m,tmp) - } - tmp.add(actualMethod) - } - } - } - ] - } - } - ] - - println("Callgraph : \n\n") - callGraph.forEach[m,s| - println(m.declaringType.elementName + "." + m.elementName + " : \n" + s.map[n| - n.declaringType.elementName + "." + n.elementName - ].reduce[s1, s2|s1 + ", " + s2] + "\n") - ] - - // Next we create the Rule objects with all that - for (function : allMethods) { - inspectForBigStep(function) - } - } - - /** - * Find annotations "@Aspect" - */ - private def List getAspectAnnotations(IType type) { - // TODO compare with: fr.inria.diverse.k3.al.annotationprocessor.Aspect - if (type.isClass) { - return type.annotations.filter [ annot | - val name = annot.elementName // may be qualified - val lastDotIndex = name.lastIndexOf('.') - var simpleName = name - if (lastDotIndex !== -1) { - simpleName = name.substring(lastDotIndex + 1) - } - simpleName.equals("Aspect") - ].toList - } - return new ArrayList() - } - - private def boolean testAnnotation(IMethod method, String annotationSimpleName) { - // TODO compare with: fr.inria.diverse.k3.al.annotationprocessor.XXX - return method.annotations.exists [ annot | - val name = annot.elementName // may be qualified - val lastDotIndex = name.lastIndexOf('.') - var simpleName = name - if (lastDotIndex !== -1) { - simpleName = name.substring(lastDotIndex + 1) - } - return simpleName.equals(annotationSimpleName) - ] - } - - /** - * Return true if 'method' is tagged with "@Step" - */ - private def boolean isStep(IMethod method) { - testAnnotation(method, "Step") - } - - /** - * Return true if 'method' is tagged with "@OverrideAspectMethod" - */ - private def boolean isOverride(IMethod method) { - testAnnotation(method, "OverrideAspectMethod") - } - - /** - * Return true if 'method' is tagged with "@Main" - */ - private def boolean isMain(IMethod method) { - testAnnotation(method, "Main") - } - - /** - * Return all sub types - */ - private def Set getAllSubClasses(IType type) { - val hierarchy = type.newTypeHierarchy(new NullProgressMonitor) - return hierarchy.getAllSubtypes(type).toSet - } - - /** - * Return all super types - */ - private def Set getAllSuperClasses(IType type) { - val hierarchy = type.newTypeHierarchy(new NullProgressMonitor) - return hierarchy.getAllSuperclasses(type).toSet - } - - private def EClass getAspectized(IAnnotation annot) { - val aspectedClassName = annot.memberValuePairs.findFirst[p|p.memberName == "className"].value as String - return extendedMetamodel.eAllContents.filter(EClass).findFirst[c1|aspectedClassName.equals(c1.name)] - } - - /** - * Return the top level method in a type tagged @aspect - * that contains 'function'
- *
- * Return 'function' if it is already a top level method.
- *
- * Return null if not inside a type with @aspect - */ - private def IMethod getContainingAspectMethod(IMethod function) { - val container = function.declaringType - if (allClasses.contains(container)) { - return function - } - - // function can be in annonymous/inner classes (e.g in lamba) - var parent = function.parent - while (parent !== null) { - if (parent instanceof IMethod) { - return getContainingAspectMethod(parent) - } - parent = parent.parent - } - - return null - } -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.gitignore b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.gitignore deleted file mode 100644 index ed683fd9e..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/bin/ -/xtend-gen/* -/xtend-gen/ diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.project b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.project deleted file mode 100644 index 7dfa1d1ea..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.plugin.generator - - - - - - 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/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/META-INF/MANIFEST.MF b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/META-INF/MANIFEST.MF deleted file mode 100644 index 2654f614a..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/META-INF/MANIFEST.MF +++ /dev/null @@ -1,29 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Generator -Bundle-SymbolicName: fr.inria.diverse.trace.plugin.generator -Bundle-Version: 1.0.0.qualifier -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - fr.inria.diverse.trace.metamodel.generator;bundle-version="1.0.0", - org.eclipse.emf.ecore, - org.eclipse.emf.ecore.xmi, - org.eclipse.pde.ui;bundle-version="3.8.101", - org.eclipse.core.resources;bundle-version="3.9.1", - org.eclipse.core.runtime;bundle-version="3.10.0", - org.eclipse.ui, - org.eclipse.ui.ide, - org.eclipse.emf.importer.ecore;bundle-version="2.8.0", - org.eclipse.emf.converter;bundle-version="2.7.0", - org.eclipse.emf.importer, - fr.inria.diverse.trace.commons;bundle-version="1.0.0", - fr.inria.diverse.ecorext;bundle-version="0.1.0", - org.eclipse.jdt.core;bundle-version="3.10.0", - fr.inria.diverse.trace.annotations;bundle-version="0.1.0", - org.eclipse.emf.codegen.ecore.ui, - org.eclipse.core.expressions;bundle-version="3.4.600" -Export-Package: fr.inria.diverse.trace.plugin.generator -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/pom.xml b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/pom.xml deleted file mode 100644 index 7f1b02715..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - 4.0.0 - org.gemoc.multidimensional_trace_management - fr.inria.diverse.trace.plugin.generator - 1.0.0-SNAPSHOT - eclipse-plugin - - - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT - ../.. - - - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtend.version} - - - - compile - - - xtend-gen - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - - xtend-gen - - - - - - - - - - diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/EMFProjectGenerator.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/EMFProjectGenerator.xtend deleted file mode 100644 index c39b421d8..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/EMFProjectGenerator.xtend +++ /dev/null @@ -1,154 +0,0 @@ -package fr.inria.diverse.trace.plugin.generator - -import java.util.HashSet -import java.util.List -import java.util.Set -import org.eclipse.core.resources.IProject -import org.eclipse.core.resources.ResourcesPlugin -import org.eclipse.core.runtime.IProgressMonitor -import org.eclipse.emf.codegen.ecore.genmodel.GenModel -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage -import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter -import org.eclipse.emf.codegen.ecore.genmodel.presentation.GeneratorUIUtil.GeneratorOperation -import org.eclipse.emf.codegen.ecore.genmodel.util.GenModelUtil -import org.eclipse.emf.common.command.BasicCommandStack -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.plugin.EcorePlugin -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain -import org.eclipse.emf.edit.provider.ComposedAdapterFactory -import org.eclipse.swt.widgets.Composite -import org.eclipse.swt.widgets.Display -import org.eclipse.swt.widgets.Shell -import org.eclipse.ui.PlatformUI -import org.eclipse.xtend.lib.annotations.Accessors - -class EMFProjectGenerator { - - // Inputs - private val URI ecoreURI - private val String projectName - - // Outputs - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var IProject project - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var List referencedGenPackages - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - val Set rootPackages = new HashSet - - // Transient - private var GenModel genModel - - new(String projectName, URI ecoreURI) { - this.projectName = projectName - this.ecoreURI = ecoreURI - } - - private var Composite rootParent - private var FakeEcoreImporterWizard f - - def void generateBaseEMFProject() { - - // Creating the project and retrieving its path - project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName) - val projectPath = project.getFullPath(); - - // TODO This is horrible: the display is locked during the fake UI handling :D - Display.getDefault().syncExec( - [ - // We skip the previous wizard (emf project) and we directly configure the ecore import wizard appropriately - rootParent = new Shell - f = new FakeEcoreImporterWizard(rootParent) - f.genModelProjectPath = projectPath - // Setting up ecore URI and loading it - f.fakeDetailPage.fakeSetURI(ecoreURI.toString) - f.fakeDetailPage.fakeLoad - // We choose to use all referenced gen models and ann (remaining) epackages - f.fakePackagePage.checkAll(ecoreURI) - // Here we do the actual projet generation - f.performFinish - // Storing the genmodel - genModel = f.modelImporter.genModel - referencedGenPackages = f.fakePackagePage.referencedGenPackages.immutableCopy - rootPackages.addAll(f.fakePackagePage.checkedEPackages) - // Finally we disband our fakes wizard and root - f.dispose - rootParent.dispose - ]) - - } - - def void generateModelCode() { - PlatformUI.workbench.activeWorkbenchWindow.run(false, true, [ m | - generateModelCode(m) - ]) - } - - /** - * Performs the code generation from the genmodel. - * - * We try to precisely follow the actions made by the GenModelEditor when loading the model, - * since otherwise for some mysterious reason the generated code has errors regarding generic - * type parameters. - * - * Note that this code can certainly by simplified, if time is taken to find useless lines. - */ - def void generateModelCode(IProgressMonitor m) { - - // --------- Start code from org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initializeEditingDomain() - // - // Create an adapter factory that yields item providers. - val adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - - // Create the command stack that will notify this editor as commands are executed. - val BasicCommandStack commandStack = new BasicCommandStack(); - - // Create the editing domain with a special command stack. - val editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack) { - override isReadOnly(Resource resource) { - return super.isReadOnly(resource) || getResourceSet().getResources().indexOf(resource) != 0; - } - }; - - editingDomain.getResourceSet().getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(true)); - // - // --------- End code from org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initializeEditingDomain() - // - // - // --------- Start code from org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.createModel() - // - val URI resourceURI = genModel.eResource.URI - var Exception exception = null; - var 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); - } - // --------- End code from org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.createModel() - // - // - // --------- Start code from org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initialize(GenModel) - val GenModel genModel = resource.getContents().get(0) as GenModel; - - genModel.reconcile(); - genModel.setCanGenerate(true); - val generator = GenModelUtil.createGenerator(genModel); - - // --------- End code org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initialize(GenModel) - // - // - genModel.setValidateModel(true); - val operation = new GeneratorOperation(null); - operation.addGeneratorAndArguments(generator, genModel, GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE, - "model project"); - operation.run(m) - - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/ExtensionFilter.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/ExtensionFilter.xtend deleted file mode 100644 index dae929717..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/ExtensionFilter.xtend +++ /dev/null @@ -1,272 +0,0 @@ -package fr.inria.diverse.trace.plugin.generator - -import ecorext.ClassExtension -import ecorext.Ecorext -import ecorext.Rule -import fr.inria.diverse.trace.commons.EcoreCraftingUtil -import java.util.HashSet -import java.util.Set -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EReference -import org.eclipse.emf.ecore.EStructuralFeature -import org.eclipse.xtend.lib.annotations.Accessors - -/** - * Given a set of references to classes and properties from the execution metamodel, - * will filter out all other elements from the execution extension transient model. - * - * For now it is implemented through fully qualified name comparisons. - */ -class ExtensionFilter { - - // Input - val Set chosenClasses - val Set chosenProperties - - // Input / Output - val Ecorext executionExtension - - // Output - @Accessors(PUBLIC_GETTER,PRIVATE_SETTER) - var boolean didFilterSomething = false - - // Transient - val Set retainedClasses = new HashSet - val Set retainedProperties = new HashSet - val Set retainedRules = new HashSet - - new(Ecorext executionExtension, Set chosenClasses, Set chosenProperties) { - if (chosenClasses != null) - this.chosenClasses = chosenClasses - else - this.chosenClasses = #{} - if (chosenProperties != null) - this.chosenProperties = chosenProperties - else - this.chosenProperties = #{} - this.executionExtension = executionExtension - } - - public def void execute() { - - if (!chosenClasses.empty || !chosenProperties.empty) { - - val Set chosenClassesFQNs = chosenClasses.map[c|EcoreCraftingUtil.getFQN(c, ".")].toSet - val Set chosenPropertiesFQNs = chosenProperties.map [ p | - EcoreCraftingUtil.getFQN(p.EContainingClass, ".") + "." + p.name - ].toSet - - // First pass, we find everything to retain - for (element : executionExtension.eAllContents.toSet) { - if (element instanceof EClass) { - val fqn = EcoreCraftingUtil.getFQN(element, ".") - if (chosenClassesFQNs.contains(fqn)) { - retainedClasses.add(element) - retainedClasses.addAll((element)) - retainedProperties.addAll(element.EStructuralFeatures) - } - - } else if (element instanceof EStructuralFeature) { - val container = element.eContainer - val EClass class = if (container instanceof ClassExtension) { - container.extendedExistingClass - } else if (container instanceof EClass) { - container - } - val fqn = EcoreCraftingUtil.getFQN(class, ".") + "." + element.name - if (chosenPropertiesFQNs.contains(fqn)) { - retainedProperties.add(element) - retainedClasses.add(class) - retainedClasses.addAll((class)) - if (element instanceof EReference) { - retainedClasses.add(element.EReferenceType) - retainedClasses.addAll((element.EReferenceType)) - } - } - } else if (element instanceof Rule) { - if (element.stepRule) { - retainedRules.add(element) - for (paramClass : element.operation.EParameters.map[p|p.EType].filter(EClass)) { - retainedClasses.add(paramClass) - } - if (element.operation.EType instanceof EClass) { - retainedClasses.add(element.operation.EType as EClass) - } - retainedClasses.add(element.containingClass) - } - - } - } - - // Hack: we replace indirect supertype relationships by direct ones - for (c1 : retainedClasses) { - for (c2 : retainedClasses.filter[c|c != c1]) { - if (c1.EAllSuperTypes.contains(c2)) { - if (!hasSuperTypePathContainedIn(c1, c2, retainedClasses)) { - c1.ESuperTypes.add(c2) - } - } - } - } - - // Hack: likewise, we replace indirect rule calls by direct ones - for (r1 : retainedRules) { - for (r2 : retainedRules.filter[r|r != r1]) { - if (callsIndirectly(r1, r2, new HashSet)) { - r1.calledRules.add(r2) - } - } - } - - // Second hack: if some leaf class is abstract, we make it concrete - for (c : retainedClasses.filter[abstract]) { - val subClasses = retainedClasses.filter[c2|c2.ESuperTypes.contains(c)] - if (subClasses.empty) - c.abstract = false - } - - // Remove super types that are not retained - for (c : retainedClasses) { - c.ESuperTypes.removeIf([c2|!retainedClasses.contains(c2)]) - } - - // Remove refs to other rules that are not retained - for (r : retainedRules) { - r.calledRules.removeIf([r2|!retainedRules.contains(r)]) - r.overridenBy.removeIf([r2|!retainedRules.contains(r)]) - if (!retainedRules.contains(r.overrides)) - r.overrides = null - } - - for (element : executionExtension.eAllContents.toSet) { - tryRemove(element) - } - - } - } - - def boolean callsIndirectly(Rule origin, Rule destination, Set visited) { - if (!visited.contains(origin)) { - if (origin == destination) { - return true - } - - for (r : origin.calledRules) { - val boolean result = callsIndirectly(r, destination, visited) - if (result) - return true - } - - } - return false - } - - static class CallPath { - public boolean isContainedInSet = false - } - - def static Set findCallPaths(Rule origin, Rule destination, Set mustBeContainedIn, - Set visited, boolean containedSoFar) { - val result = new HashSet - if (!visited.contains(origin)) { - visited.add(origin) - - if (origin == destination) { - val path = new CallPath - path.isContainedInSet = containedSoFar - result.add(path) - } - - for (s : origin.calledRules) { - val containedSoFarNext = containedSoFar && mustBeContainedIn.contains(s) - val interResult = fr.inria.diverse.trace.plugin.generator.ExtensionFilter.findCallPaths(s, destination, - mustBeContainedIn, visited, containedSoFarNext) - result.addAll(interResult) - } - } - return result - } - - private static def boolean hasSuperTypePathContainedIn(EClass origin, EClass destination, Set containedIn) { - - if (origin == destination) - return true - - for (s : origin.ESuperTypes.filter[s|containedIn.contains(s)]) { - val result = hasSuperTypePathContainedIn(s, destination, containedIn) - if (result) - return true - } - - return false - } - - private def Set tryRemove(EObject element) { - val removedElements = new HashSet - if (element instanceof EClass) { - if (!retainedClasses.contains(element)) { - didFilterSomething = true - val package = element.EPackage - package.EClassifiers.remove(element) - removedElements.add(element) - val removedAgain = cleanEPackage(package) - removedElements.addAll(removedAgain) - } - } else if (element instanceof EStructuralFeature) { - if (!retainedProperties.contains(element)) { - didFilterSomething = true - val container = element.eContainer - if (container instanceof ClassExtension) { - container.newProperties.remove(element) - removedElements.add(element) - if (container.newProperties.empty) { - executionExtension.classesExtensions.remove(container) - removedElements.add(container) - } - } else if (container instanceof EClass) { - container.EStructuralFeatures.remove(element) - removedElements.add(element) - } - } - } else if (element instanceof Rule) { - if (!retainedRules.contains(element)) { - executionExtension.rules.remove(element) - removedElements.add(element) - for (r : executionExtension.rules) { - r.calledRules.remove(element) - if (r.overrides == element) - r.overrides = null - r.overridenBy.remove(element) - } - } - } - return removedElements - } - - private def Set cleanEPackage(EPackage p) { - val removedElements = new HashSet - if (p != null) { - if (p.EClassifiers.empty && p.ESubpackages.empty) { - val container = p.eContainer - if (container != null) { - if (container instanceof EPackage) { - container.ESubpackages.remove(p) - removedElements.add(p) - val removedAgain = cleanEPackage(container) - removedElements.addAll(removedAgain) - } else if (container instanceof Ecorext) { - container.newPackages.remove(p) - removedElements.add(p) - } - } - } - } - return removedElements - } - -// private def Set getAllSubtypesOf(EClass cl) { -// return executionExtension.eAllContents.toSet.filter(EClass).filter[c|c.EAllSuperTypes.contains(cl)].toSet -// } -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeEcoreImporterWizard.java b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeEcoreImporterWizard.java deleted file mode 100644 index 0043a6112..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeEcoreImporterWizard.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.plugin.generator; - -import java.lang.reflect.InvocationTargetException; - -import org.eclipse.core.resources.IFile; -import org.eclipse.emf.importer.ecore.EcoreImporterPlugin; -import org.eclipse.emf.importer.ecore.ui.EcoreImporterWizard; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.jface.wizard.IWizardContainer; -import org.eclipse.jface.wizard.IWizardPage; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.eclipse.swt.widgets.Composite; - -public class FakeEcoreImporterWizard extends EcoreImporterWizard { - - FakeEcoreImporterWizard(Composite rootParent) { - detailPage = new FakeModelImporterDetailPage(getModelImporter(), - "EcoreModel"); - detailPage.setTitle(EcoreImporterPlugin.INSTANCE - .getString("_UI_EcoreImport_title")); - detailPage - .setDescription(EcoreImporterPlugin.INSTANCE.getString(detailPage - .showGenModel() ? "_UI_EcoreImportNewProject_description" - : "_UI_EcoreImportFile_description")); - addPage(detailPage); - detailPage.fakeSetParent(rootParent); - - packagePage = new FakeModelImporterPackagePage(getModelImporter(), - "EcorePackages"); - packagePage.setShowReferencedGenModels(true); - addPage(packagePage); - packagePage.createControl(rootParent); - } - - private FakeModelImporterDetailPage detailPage; - - private FakeModelImporterPackagePage packagePage; - - public FakeModelImporterDetailPage getFakeDetailPage() { - return detailPage; - } - - public FakeModelImporterPackagePage getFakePackagePage() { - return packagePage; - } - - @Override - protected void selectFile(IFile file) { - } - - @Override - protected void openEditor(IFile file) throws PartInitException { - } - - @Override - public IWizardContainer getContainer() { - // TODO Auto-generated method stub - return new IWizardContainer() { - - @Override - public void run(boolean fork, boolean cancelable, - IRunnableWithProgress runnable) - throws InvocationTargetException, InterruptedException { - IWorkbench wb = PlatformUI.getWorkbench(); - IWorkbenchWindow win = wb.getActiveWorkbenchWindow(); - win.run(false, true, runnable); - - } - - @Override - public void updateWindowTitle() { - // TODO Auto-generated method stub - - } - - @Override - public void updateTitleBar() { - // TODO Auto-generated method stub - - } - - @Override - public void updateMessage() { - // TODO Auto-generated method stub - - } - - @Override - public void updateButtons() { - // TODO Auto-generated method stub - - } - - @Override - public void showPage(IWizardPage page) { - // TODO Auto-generated method stub - - } - - @Override - public Shell getShell() { - // TODO Auto-generated method stub - return null; - } - - @Override - public IWizardPage getCurrentPage() { - // TODO Auto-generated method stub - return null; - } - }; - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeModelImporterDetailPage.java b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeModelImporterDetailPage.java deleted file mode 100644 index fbd76617d..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeModelImporterDetailPage.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.plugin.generator; - -import org.eclipse.emf.importer.ModelImporter; -import org.eclipse.emf.importer.ui.contribution.base.ModelImporterDetailPage; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Text; - -public class FakeModelImporterDetailPage extends ModelImporterDetailPage { - - private Composite fakeParent; - - public FakeModelImporterDetailPage(ModelImporter modelImporter, - String pageName) { - super(modelImporter, pageName); - } - - public void fakeSetParent(Composite c) { - this.fakeParent = c; - } - - public void fakeSetURI(String uri) { - this.uriText = new Text(fakeParent, 0); - uriText.setText(uri); - uriTextModified(""); - } - - public void fakeLoad() { - refreshModel(); - } - - @Override - protected void internalSetGenModelFileName(String name) { - if (usingInternalSetName && showGenModel() && name != null) { - getModelImporter().setGenModelFileName(name); - } - } -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeModelImporterPackagePage.java b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeModelImporterPackagePage.java deleted file mode 100644 index a302bb95c..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/FakeModelImporterPackagePage.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.plugin.generator; - -import java.io.IOException; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.eclipse.emf.codegen.ecore.genmodel.GenModel; -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -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.importer.ModelImporter; -import org.eclipse.emf.importer.ui.contribution.base.ModelImporterPackagePage; - -import fr.inria.diverse.trace.commons.EMFUtil; - -public class FakeModelImporterPackagePage extends ModelImporterPackagePage { - - public FakeModelImporterPackagePage(ModelImporter modelImporter, - String pageName) { - super(modelImporter, pageName); - } - - public void checkAll(URI except) { - // This is done at the creation of the page, theoretically - filterEPackagesTable(true); - validate(); - - - // We have to load the epackages in except (!= epackages referenced by except), to find the corresponding nsURIs - // The goal is not to check theses epackages as referenced! - // Because they might already have genmodels, which are hence referenceable - ResourceSet tmp = new ResourceSetImpl(); - Set nsURIsExcept = new HashSet(); - try { - Resource r = EMFUtil.loadModelURI(except, tmp); - for (EObject o : r.getContents()) { - if (o instanceof EPackage) { - nsURIsExcept.add(((EPackage) o).getNsURI()); - } - } - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - - // We check all the referenced stuff, except the existing genmodels for the epackage we are interested in - for (org.eclipse.jface.viewers.TreePath tp : referencedGenModelsCheckboxTreeViewer.getExpandedTreePaths()) { - Object fSegment = tp.getFirstSegment(); - boolean ok = true; - if (fSegment instanceof GenModel) { - GenModel fSegment_cast = (GenModel)fSegment; - for (GenPackage genp : fSegment_cast.getGenPackages()) { - String nsURI = genp.getEcorePackage().getNsURI(); - if (nsURIsExcept.contains(nsURI)) { - ok = false; - break; - } - } - - } - if (ok) - referencedGenModelsCheckboxTreeViewer.setSubtreeChecked(tp, true); - } - - - // We notify - referencedGenModelsCheckboxTreeViewerCheckStateChanged(null); - - // We check all the remaining epackages - ePackagesCheckboxTableViewer.setAllChecked(true); - - // We notify - ePackageCheckStateChanged(); - - } - - public List getReferencedGenPackages() { - return this.getModelConverter().getReferencedGenPackages(); - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/GenericTracePluginGenerator.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/GenericTracePluginGenerator.xtend deleted file mode 100644 index 8366f983c..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/GenericTracePluginGenerator.xtend +++ /dev/null @@ -1,198 +0,0 @@ -package fr.inria.diverse.trace.plugin.generator - -import ecorext.Ecorext -import fr.inria.diverse.trace.commons.EclipseUtil -import fr.inria.diverse.trace.commons.ManifestUtil -import fr.inria.diverse.trace.metamodel.generator.TraceMMGenerationTraceability -import fr.inria.diverse.trace.metamodel.generator.TraceMMGenerator -import java.io.File -import java.util.HashSet -import java.util.Set -import org.eclipse.core.resources.IProject -import org.eclipse.core.runtime.IProgressMonitor -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EPackage -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.ResourceSetImpl -import org.eclipse.jdt.core.IJavaProject -import org.eclipse.jdt.core.IPackageFragment -import org.eclipse.jdt.core.IPackageFragmentRoot -import org.eclipse.jdt.core.JavaCore -import org.eclipse.ui.PlatformUI -import org.eclipse.xtend.lib.annotations.Accessors -import tracingannotations.TracingAnnotations - -/** - * Glues the generators : trace metamodel, emf project and trace manager - */ -class GenericTracePluginGenerator { - - // Inputs - private val EPackage abstractSyntax // EcoreURI - private val Ecorext executionEcorExt // URI - private val String pluginName - private val boolean gemoc - - // Transient - private var TracingAnnotations tracingAnnotations - - // Outputs - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var String languageName - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var String tracedLanguageName - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - val String packageQN - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var String traceManagerClassName - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var String traceConstructorClassName - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var String traceExplorerClassName - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var String traceExtractorClassName - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var IPackageFragment packageFragment - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var IProject project - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var TraceMMGenerationTraceability traceability - @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) - var Set referencedGenPackages - - new(EPackage abstractSyntax, Ecorext executionEcorExt, String pluginName, boolean gemoc) { - - this.abstractSyntax = abstractSyntax - this.executionEcorExt = executionEcorExt - this.pluginName = pluginName - this.packageQN = pluginName + ".tracemanager" - this.gemoc = gemoc - - // Given a file XXX.ecore, we try to find a model containing tracing annotations in XXX.tracingannotations - try { - val rs = new ResourceSetImpl - val uri = abstractSyntax.eResource.URI.trimFileExtension.appendFileExtension("tracingannotations") - val resource = rs.createResource(uri) - resource.load(null) - this.tracingAnnotations = resource.contents.head as TracingAnnotations - } catch (Throwable e) { - } - } - - def void generate() { - PlatformUI.workbench.activeWorkbenchWindow.run(false, true, [ m | - generate(m) - ]) - } - - private static def Set findNestedGenpackages(GenPackage p) { - val result = p.nestedGenPackages.toSet - result.add(p) - for (n : p.nestedGenPackages) { - result.addAll(findNestedGenpackages(n)) - } - return result - } - - def void generate(IProgressMonitor m) { - - tracedLanguageName = abstractSyntax.name - languageName = abstractSyntax.name.replaceAll(" ", "") + "Trace" - - var partialTraceManagement = false - - if (tracingAnnotations != null) { - var Set classesToTrace = new HashSet - var Set propertiesToTrace = new HashSet - classesToTrace.addAll(tracingAnnotations.classestoTrace) - propertiesToTrace.addAll(tracingAnnotations.propertiesToTrace) - val filter = new ExtensionFilter(executionEcorExt, classesToTrace, propertiesToTrace) - filter.execute() - partialTraceManagement = filter.didFilterSomething - } - - // Generate trace metamodel - val TraceMMGenerator tmmgenerator = new TraceMMGenerator(executionEcorExt, abstractSyntax, gemoc) - tmmgenerator.computeAllMaterial - tmmgenerator.sortResult - val EPackage tracemm = tmmgenerator.tracemmresult - - // Serializing the tracemm temporarily - val ResourceSet rs = new ResourceSetImpl() - val File tmpFolder = File.createTempFile("diverse", "tracemmgeneration") - tmpFolder.delete - tmpFolder.mkdir - tmpFolder.deleteOnExit - val String ecoreFileName = languageName + ".ecore" - val File tmmFile = new File(tmpFolder, ecoreFileName) - val Resource tmmResource = rs.createResource(URI.createFileURI(tmmFile.absolutePath)) - tmmResource.contents.add(tracemm) - tmmResource.save(null) - - // Generate EMF project - val EMFProjectGenerator emfGen = new EMFProjectGenerator(pluginName, tmmResource.URI) - emfGen.generateBaseEMFProject - referencedGenPackages = emfGen.referencedGenPackages.map[findNestedGenpackages].flatten.toSet - - // At this point the wizard has created and reloaded a new resource with the trace metamodel - // We access this new metamodel/resource thanks to emfGen.rootPackages - // And we add add the missing gemoc getCaller implementations to the trace metamodel - if (gemoc) { - tmmgenerator.addGetCallerEOperations(emfGen.rootPackages, referencedGenPackages) - emfGen.rootPackages.head.eResource.save(null) - } - - // Generate code - emfGen.generateModelCode(m) - this.project = emfGen.project - - // Finding the "src folder" in which to generate code - val IJavaProject javaProject = JavaCore.create(project) - val sourceFolders = EclipseUtil.findSrcFoldersOf(javaProject) - - // Now we need lots of things that require a monitor, so we do that in a dedicated action - // We use JDT to create the package folders from a string "xxx.yyy.zzz" - val IPackageFragmentRoot srcFolderFragment = javaProject.getPackageFragmentRoot(sourceFolders.get(0)); - packageFragment = srcFolderFragment.createPackageFragment(packageQN, true, m) - - // Adding plugin dependency to our trace api - ManifestUtil.addToPluginManifest(project, m, "fr.inria.diverse.trace.api") - ManifestUtil.addToPluginManifest(project, m, "org.eclipse.emf.transaction") - ManifestUtil.addToPluginManifest(project, m, "org.eclipse.emf.compare") - ManifestUtil.addToPluginManifest(project, m, "org.gemoc.executionframework.engine") - ManifestUtil.addToPluginManifest(project, m, "org.eclipse.xtext") - - if (gemoc) { - ManifestUtil.addToPluginManifest(project, m, "org.gemoc.commons.eclipse") - } - - this.traceability = tmmgenerator.traceability - - // Generate trace constructor - val TraceConstructorGeneratorJava tconstructorgen = new TraceConstructorGeneratorJava(languageName, - pluginName + ".tracemanager", tracemm, tmmgenerator.traceability, referencedGenPackages, gemoc, - abstractSyntax, partialTraceManagement) - traceConstructorClassName = tconstructorgen.className - packageFragment.createCompilationUnit(traceConstructorClassName + ".java", tconstructorgen.generateCode, true, m) - - // Generate trace explorer - val TraceExplorerGeneratorJava texplorergen = new TraceExplorerGeneratorJava(languageName, - pluginName + ".tracemanager", tracemm, tmmgenerator.traceability, referencedGenPackages, gemoc, - abstractSyntax, partialTraceManagement) - traceExplorerClassName = texplorergen.className - packageFragment.createCompilationUnit(traceExplorerClassName + ".java", texplorergen.generateCode, true, m) - - // Generate trace extractor - val TraceExtractorGeneratorJava textractorgen = new TraceExtractorGeneratorJava(languageName, - pluginName + ".tracemanager", tracemm, tmmgenerator.traceability, referencedGenPackages, gemoc, - abstractSyntax, partialTraceManagement) - traceExtractorClassName = textractorgen.className - packageFragment.createCompilationUnit(traceExtractorClassName + ".java", textractorgen.generateCode, true, m) - - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceConstructorGeneratorJava.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceConstructorGeneratorJava.xtend deleted file mode 100644 index 0abb2e2d7..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceConstructorGeneratorJava.xtend +++ /dev/null @@ -1,1197 +0,0 @@ -package fr.inria.diverse.trace.plugin.generator - -import ecorext.ClassExtension -import ecorext.Rule -import fr.inria.diverse.trace.commons.CodeGenUtil -import fr.inria.diverse.trace.commons.EcoreCraftingUtil -import fr.inria.diverse.trace.commons.tracemetamodel.StepStrings -import fr.inria.diverse.trace.metamodel.generator.TraceMMGenerationTraceability -import fr.inria.diverse.trace.metamodel.generator.TraceMMStrings -import java.util.ArrayList -import java.util.Collection -import java.util.HashMap -import java.util.HashSet -import java.util.List -import java.util.Map -import java.util.Set -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage -import org.eclipse.emf.ecore.EAttribute -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EClassifier -import org.eclipse.emf.ecore.EOperation -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EReference -import org.eclipse.emf.ecore.EStructuralFeature -import fr.inria.diverse.trace.commons.model.trace.TracePackage - -class TraceConstructorGeneratorJava { - - // Inputs - private val String className - private val String packageQN - private val EPackage traceMM - private val EPackage abstractSyntax - private val TraceMMGenerationTraceability traceability - private val Set refGenPackages - private val boolean gemoc - private val boolean partialTraceManagement - - // Transient - private boolean getExeToTracedUsed = false - - - // Shortcuts - private val EClass stateClass - private val EClass specificStepClass - - private val String stateFQN - private val String specificStepFQN - - public def String getClassName() { - return className - } - - new(String languageName, String packageQN, EPackage traceMM, TraceMMGenerationTraceability traceability, - Set refGenPackages, boolean gemoc, EPackage abstractSyntax, boolean partialTraceManagement) { - this.traceMM = traceMM - this.className = languageName.replaceAll(" ", "").toFirstUpper + "Constructor" - this.packageQN = packageQN - this.traceability = traceability - this.refGenPackages = refGenPackages - this.gemoc = gemoc - this.abstractSyntax = abstractSyntax - this.stateClass = traceability.traceMMExplorer.stateClass - this.specificStepClass = traceability.traceMMExplorer.getSpecificStepClass - this.partialTraceManagement=partialTraceManagement - this.stateFQN = getJavaFQN(stateClass) - this.specificStepFQN = getJavaFQN(specificStepClass) - } - - private def String getActualFQN(EClass c, Rule r) { - val EOperation o = r.operation - return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name - } - - def Set findAllConcreteSubTypes(EClass clazz) { - traceability.allMutableClasses.filter[c|!c.isAbstract && c.EAllSuperTypes.contains(clazz)].toSet - } - - def Set findAllDirectConcreteSubTypes(EClass clazz) { - traceability.allMutableClasses.filter[c|!c.isAbstract && c.ESuperTypes.contains(clazz)].toSet - } - - def Set findAllDirectSubTypes(EClass clazz) { - traceability.allMutableClasses.filter[c|c.ESuperTypes.contains(clazz)].toSet - } - - private def String getFQN(EStructuralFeature eFeature) { - return EcoreCraftingUtil.getBaseFQN(eFeature.EContainingClass) + "." + eFeature.name - } - - private static def boolean isNotSuperTypeOf(EClass c, Collection eclasses) { - for (eclass : eclasses) { - if (eclass.EAllSuperTypes.contains(c)) - return false - } - return true - } - - private static def boolean hasSuperTypeIn(EClass c, Collection eclasses) { - for (eclass : eclasses) { - if (c.EAllSuperTypes.contains(eclass)) - return true - } - return false - } - - private def String getTracedJavaFQN(EClassifier c) { - return getTracedJavaFQN(c,false) - } - - private def String getTracedJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { - if (c instanceof EClass) { - val tracedClass = traceability.getTracedClass(c) - if (tracedClass != null) - return getJavaFQN(traceability.getTracedClass(c),enforcePrimitiveJavaClass) - else - return getJavaFQN(c,enforcePrimitiveJavaClass) - } else { - return getJavaFQN(c,enforcePrimitiveJavaClass) - } - } - - private def String getJavaFQN(EClassifier c) { - return getJavaFQN(c,false) - } - - private def String getJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { - return EcoreCraftingUtil.getJavaFQN(c,refGenPackages,enforcePrimitiveJavaClass) - } - - - private def String stringSetter(EStructuralFeature f, String value) { - EcoreCraftingUtil.stringSetter(f,value,refGenPackages) - } - - private def String stringSetter(String f, String value) { - EcoreCraftingUtil.stringSetter(f,value) - } - - - private static def Set findTopSuperClasses(Iterable eclasses) { - val res = new HashSet - for (c : eclasses) { - if (c.ESuperTypes.empty) { - res.add(c) - } else { - // TODO ugly fix to not include AS classes in the XMOF case, to remove at some point - val filtered = c.ESuperTypes.filter[s|! ( c.name.endsWith("Configuration") && c.name.startsWith(s.name))] - val candidates = findTopSuperClasses(filtered) - res.addAll(candidates) - } - } - return res - } - - private static def List partialOrderSort (Iterable eclasses) { - val List result = new ArrayList - for (ci : eclasses) { - if (result.isEmpty) - result.add(ci) - else { - var boolean found = false - for (var int i = 0; i < result.size && !found; i++) { - val Set followings = result.subList(i, result.size).toSet - if (ci.isNotSuperTypeOf(followings)) { - result.add(i, ci) - found = true - } - } - - if (!found) - result.add(ci) - } - } - return result - - } - - public def String generateCode() { - val String code = generateTraceManagerClass() - try { - return CodeGenUtil.formatJavaCode(code) - } catch (Throwable t) { - return code - } - } - - private Map counters = new HashMap - - private def String uniqueVar(String s) { - if (!counters.containsKey(s)) { - counters.put(s, 0) - } - return s + counters.get(s) - } - - private def void incVar(String s) { - if (!counters.containsKey(s)) { - counters.put(s, 0) - } - counters.put(s, counters.get(s) + 1) - } - - public static def String getBaseFQN(Rule r) { - val EOperation o = r.operation - val EClass c = r.containingClass - return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name - } - - private def EClassifier getEventParamRuntimeType(EStructuralFeature f) { - var EClass res = null - if (f instanceof EAttribute) { - // TODO - } else if (f instanceof EReference) { - val potentialRealRuntimeClass = traceability.getRealMutableClass(f.EReferenceType) - if (potentialRealRuntimeClass != null) { - // TODO here in the general case we need to find the exe class - res = potentialRealRuntimeClass - } else { - // TODO same here - res = f.EReferenceType - } - } - return res - } - - private def String stringGetterTracedValue(String javaVarName, EStructuralFeature p) { - val pRealType = traceability.getRealMutableClass(p.EType) - if (p instanceof EReference && traceability.hasTracedClass(pRealType as EClass)) { - return ''' - ((«getJavaFQN(traceability.getTracedClass(pRealType as EClass))»)exeToTraced.get(«javaVarName».«EcoreCraftingUtil.stringGetter(p)»)) - ''' - } else { - return javaVarName + "." + EcoreCraftingUtil.stringGetter(p) - } - } - - private def Set getAllMutablePropertiesOf(EClass exeClass) { - val Set res = new HashSet - res.addAll(traceability.getMutablePropertiesOf(exeClass)) - res.addAll(exeClass.EAllSuperTypes.map[s|traceability.getMutablePropertiesOf(s)].flatten.toSet); - return res - } - - private def Set getAllNonEmptyMutableClasses() { - return traceability.allMutableClasses.filter[c|!c.allMutablePropertiesOf.empty].toSet - } - - - private def String generateImports() { - return - ''' - «IF getExeToTracedUsed» - import java.util.ArrayList; - «ENDIF» - import java.util.Collection; - import java.util.Deque; - import java.util.HashSet; - import java.util.LinkedList; - import java.util.List; - import java.util.Map; - import java.util.Set; - - import org.eclipse.emf.common.util.TreeIterator; - import org.eclipse.emf.common.util.URI; - import org.eclipse.emf.ecore.EObject; - import org.eclipse.emf.ecore.resource.Resource; - - import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; - import fr.inria.diverse.trace.commons.model.trace.MSEModel; - import fr.inria.diverse.trace.commons.model.trace.SequentialStep; - import fr.inria.diverse.trace.gemoc.api.ITraceConstructor; - ''' - } - - private def String generateFields() { - return - ''' - private «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)» traceRoot; - private MSEModel mseModel; - private Resource executedModel; - private final Map exeToTraced; - - private «stateFQN» lastState; - - private Resource traceResource; - private final Deque<«specificStepFQN»> context = new LinkedList<«specificStepFQN»>(); - ''' - } - - private def String generateConstructor() { - return - ''' - public «className» (Resource exeModel, Resource traceResource, Map exeToTraced) { - this.traceResource = traceResource; - this.executedModel = exeModel; - this.exeToTraced = exeToTraced; - } - ''' - } - - - private def String getExeToTracedMethodName() { - getExeToTracedUsed = true - return "getExeToTraced" - } - - private def String generateStoreAsTracedMethods() { - return - ''' - - «FOR mutClass : traceability.allMutableClasses.filter[c|!c.isAbstract].sortBy[name]» - private void storeAsTracedObject(«getJavaFQN(mutClass)» o) { - - «FOR subType : partialOrderSort(findAllConcreteSubTypes(mutClass)) » - if (o instanceof «getJavaFQN(subType)») { - storeAsTracedObject((«getJavaFQN(subType)»)o); - } else - «ENDFOR» - - «val traced = traceability.getTracedClass(mutClass)» - - if (!exeToTraced.containsKey(o)) { - «getJavaFQN(traced)» tracedObject; - tracedObject = «EcoreCraftingUtil.stringCreate(traced)»; - «val Set origRefs1 = traceability.getRefs_originalObject(traced)» - «FOR EReference origRef : origRefs1.sortBy[name]» - tracedObject.«stringSetter(origRef, "o")»; - «ENDFOR» - exeToTraced.put(o, tracedObject); - traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_createTraceClassToTracedClass(traced))».add(tracedObject); - } - } - «ENDFOR» - «IF getExeToTracedUsed» - private void storeAsTracedObject(EObject o) { - «FOR mutClass : partialOrderSort(traceability.allMutableClasses.filter[c|!c.isAbstract].toList.sortBy[name]) SEPARATOR "\n else "» - if (o instanceof «getJavaFQN(mutClass)») { - storeAsTracedObject((«getJavaFQN(mutClass)»)o); - } - «ENDFOR» - } - «ENDIF» - ''' - } - - - - private def String stringFeatureID(EStructuralFeature p) { - val containingClass = if (p.eContainer instanceof EClass) p.eContainer as EClassifier else (p.eContainer as ClassExtension).extendedExistingClass - return EcoreCraftingUtil.stringFeatureID(p,containingClass,refGenPackages) - } - - private def String generateGetAllResourcesMethod() { - return - ''' - private Set getAllExecutedModelResources() { - Set allResources = new HashSet<>(); - allResources.add(executedModel); - «IF gemoc» - allResources.addAll(org.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(executedModel)); - «ENDIF» - return allResources; - } - ''' - } - - private def String generateAddInitialStateMethod() { - return ''' - - private void addInitialState() { - if (lastState == null) { - // Creation of the initial state - Set allResources = getAllExecutedModelResources(); - lastState = «EcoreCraftingUtil.stringCreate(stateClass)»; - for (Resource r : allResources) { - for (TreeIterator i = r.getAllContents(); i.hasNext();) { - EObject o = i.next(); - «FOR c : partialOrderSort(findTopSuperClasses(traceability.allMutableClasses.filter[c|!c.isAbstract].sortBy[name].toSet)) SEPARATOR "else"» - - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - addNewObjectToState(o_cast, lastState); - } - «ENDFOR» - } - } - this.traceRoot.getStatesTrace().add(lastState); - }} - ''' - } - - private def boolean shouldHaveAddNewObjectToStateMethod(EClass c){ - val subTypes = findAllDirectSubTypes(c) - - if (!c.abstract) - return true - if (subTypes.empty && c.abstract) - return false - else if (!subTypes.empty && c.abstract) { - val validSubTypes = subTypes.filter[s|shouldHaveAddNewObjectToStateMethod(s)] - if (!validSubTypes.empty) - return true - } - - return true - } - - private def String generateAddNewObjectToStateMethods() { - return - ''' - «FOR c : traceability.allMutableClasses.sortBy[name]» - «««»«FOR c : partialOrderSort(getAllNonEmptyMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList)» - «val traced = traceability.getTracedClass(c)» - «val subTypes = partialOrderSort(findAllDirectSubTypes(c))» - «IF shouldHaveAddNewObjectToStateMethod(c)» - «IF getAllMutablePropertiesOf(c).exists[p|p instanceof EReference && p.many]» - @SuppressWarnings("unchecked") - «ENDIF» - private boolean addNewObjectToState(«getJavaFQN(c)» o_cast, «stateFQN» newState) { - boolean added = false; - «val subTypesWithMethods = subTypes.filter[sub|shouldHaveAddNewObjectToStateMethod(sub)]» - «FOR subType : subTypesWithMethods SEPARATOR " else " » - if (o_cast instanceof «getJavaFQN(subType)») { - added = addNewObjectToState((«getJavaFQN(subType)»)o_cast, newState); - } - «ENDFOR» - - «IF ! c.abstract» - - if (!added && !exeToTraced.containsKey(o_cast)) { - «getJavaFQN(traced)» tracedObject = «EcoreCraftingUtil.stringCreate(traced)»; - «val Set origRefs1 = traceability.getRefs_originalObject(traced)» - «FOR EReference origRef : origRefs1.sortBy[name]» - tracedObject.«stringSetter(origRef, "o_cast")»; - «ENDFOR» - exeToTraced.put(o_cast, tracedObject); - traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_createTraceClassToTracedClass(traced))».add(tracedObject); - - - «FOR p : getAllMutablePropertiesOf(c).sortBy[FQN]» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass valueClass = ptrace.getEType as EClass» - «val EReference pvalues = traceability.getStateClassToValueClass(p)» - «val valueProperty = traceability.getValuePropertyOfMutableProperty(p)» - - // Creation of the first value of the field «p.name» - «getJavaFQN(valueClass)» firstValue_«p.name» = «EcoreCraftingUtil.stringCreate(valueClass)»; - - «IF p.many» - - «IF p instanceof EReference» - - - «IF traceability.allMutableClasses.contains(traceability.getRealMutableClass(p.EType))» - for(«getJavaFQN(p.EType)» aValue : o_cast.«EcoreCraftingUtil.stringGetter(p)») { - addNewObjectToState((«getJavaFQN(traceability.getRealMutableClass(p.EType))»)aValue, newState); - } - «ENDIF» - - firstValue_«p.name».«EcoreCraftingUtil.stringGetter(p)».addAll - ( - (Collection) - «IF traceability.allMutableClasses.contains(traceability.getRealMutableClass(p.EType))» - «getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)», newState) - «ELSE» - o_cast.«EcoreCraftingUtil.stringGetter(p)» - «ENDIF» - ); - «ELSE» ««« If attribute - firstValue_«p.name».«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» ««« End IF EReference - - - «ELSE» ««« If !many - - «IF p instanceof EReference» - «val realMutableType = traceability.getRealMutableClass(p.EType)» - if (o_cast.«EcoreCraftingUtil.stringGetter(p)» != null) { - «IF traceability.allMutableClasses.contains(realMutableType)» - addNewObjectToState((«getJavaFQN(realMutableType)»)o_cast.«EcoreCraftingUtil.stringGetter(p)», newState); - firstValue_«p.name».«stringSetter(valueProperty,stringGetterTracedValue("o_cast", p))»; - «ELSE» - firstValue_«p.name».«stringSetter(valueProperty,"o_cast."+EcoreCraftingUtil.stringGetter(p))»; - «ENDIF» ««« End IF traceability.isSomehowMutable(p.EType) - } else { - firstValue_«p.name».«stringSetter(valueProperty,"null")»; - } - - «ELSE» ««« If attribute - firstValue_«p.name».«stringSetter(valueProperty,"o_cast."+EcoreCraftingUtil.stringGetter(p))»; - «ENDIF» ««« End IF EReference - «ENDIF» ««« End IF p.many - - tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».add(firstValue_«p.name»); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».add(firstValue_«p.name»); - - «ENDFOR» ««« End FOR p : getAllMutableProperties - } // end if (!exeToTraced.containsKey - «ENDIF» ««« End IF ! c.abstract» - return added; - }// end addNewObjectToState - «ENDIF» - «ENDFOR» ««« end FOR c : traceability.allMutableClasses.sortBy[name] - ''' - } - -private def String generateAddStateUsingListenerMethods() { - val newClassesNotEmpty = traceability.getNewClasses.filter[c|!c.EStructuralFeatures.empty].toSet - val newAbstractClassesNotEmpty = partialOrderSort(newClassesNotEmpty.filter[c|!c.isAbstract].toSet) - val newConcreteClassesNotEmpty = traceability.getNewClasses.filter[c| - val superTypes = new ArrayList(c.EAllSuperTypes) - superTypes.retainAll(newAbstractClassesNotEmpty) - return !c.isAbstract && (!c.EStructuralFeatures.empty || !superTypes.empty) - ].toList - //val newClassesNotEmptyWithMutableProperties = newClassesNotEmpty.filter[c|!traceability.getMutablePropertiesOf(c).empty] -// val newClassesNotEmptyClosure = partialOrderSort(newClassesNotEmpty.filter[c| -// val superTypes = new ArrayList(c.EAllSuperTypes) -// superTypes.retainAll(newClassesNotEmpty) -// !(c.EStructuralFeatures.empty && !superTypes.empty) -// ].toList) - val allConcreteMutableClasses = partialOrderSort(getAllNonEmptyMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList) - //val mutableClassesWithNonCollectionMutableFields = allConcreteMutableClasses.filter[c|getAllMutablePropertiesOf(c).exists[p|!p.many]] - //val mutableClassesWithCollectionMutableFields = allConcreteMutableClasses.filter[c|getAllMutablePropertiesOf(c).exists[p| p.many]] - val mutableClassesWithNonCollectionMutableFields = traceability.allMutableClasses.filter[c|!traceability.getMutablePropertiesOf(c).empty && traceability.getMutablePropertiesOf(c).exists[p|!p.many]] - val mutableClassesWithCollectionMutableFields = traceability.allMutableClasses.filter[c|!traceability.getMutablePropertiesOf(c).empty && traceability.getMutablePropertiesOf(c).exists[p|p.many]] - return - ''' - private boolean copiedState = false; - - private «stateFQN» copyState(«stateFQN» oldState) { - «stateFQN» newState = «EcoreCraftingUtil.stringCreate(stateClass)»; - «FOR p : traceability.allMutableProperties.sortBy[FQN]» - newState.«EcoreCraftingUtil.stringGetter(traceability.getStateClassToValueClass(p))».addAll(oldState.«EcoreCraftingUtil.stringGetter(traceability.getStateClassToValueClass(p))»); - «ENDFOR» - copiedState = true; - return newState; - } - - @SuppressWarnings("unchecked") - @Override - public void addState(List changes) { - if (lastState == null) { - addInitialState(); - }««« end if laststate null - if (!changes.isEmpty()) { - boolean stateChanged = false; - // We start by a (shallow) copy of the last state - // But we will have to rollback a little by replacing values that changed - «stateFQN» newState = copyState(lastState); - for (org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange modelChange : changes) { - EObject o = modelChange.getChangedObject(); - «IF !newConcreteClassesNotEmpty.empty» - // We only look at constructable objects that have mutable fields - // Here we have nothing to rollback, just a new object to add - if (modelChange instanceof org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NewObjectModelChange) { - stateChanged = true; - ««« Loop over all classes that may be constructed and that have mutable fields - «FOR c : partialOrderSort(findTopSuperClasses(newConcreteClassesNotEmpty))» - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - addNewObjectToState(o_cast, newState); - } ««« end if instanceof - «ENDFOR» - }««« end if NewObjectModelChange - - // We only look at constructable objects that have mutable fields - // Here we must rollback to remove the values of the removed object from the copied state - else if (modelChange instanceof org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.RemovedObjectModelChange) { - stateChanged = true; - ««« Loop over all classes that may type something constructed and that have mutable fields - «FOR c : partialOrderSort(newClassesNotEmpty)» - «val traced = traceability.getTracedClass(c)» - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - «getJavaFQN(traced)» traced = («getJavaFQN(traced)») exeToTraced.get(o_cast); - ««« Loop over the fields of this class, which are all mutable - «FOR p : c.EStructuralFeatures» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EReference pvalues = traceability.getStateClassToValueClass(p)» - newState.«EcoreCraftingUtil.stringGetter(pvalues)».remove(traced.«EcoreCraftingUtil.stringGetter(ptrace)».get(traced.«EcoreCraftingUtil.stringGetter(ptrace)».size()-1)); - «ENDFOR» - }««« end if instanceof - «ENDFOR» - }««« end if RemovedObjectModelChange - «ENDIF» - «IF !mutableClassesWithNonCollectionMutableFields.empty» - // Here we must look at non-collection mutable fields - // We must rollback the last values from the copied state, and add new values as well - // ie. mix of remove and new - «IF !newConcreteClassesNotEmpty.empty» else «ENDIF» if (modelChange instanceof org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange) { - stateChanged = true; - - org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange modelChange_cast = (org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange) modelChange; - «EStructuralFeature.canonicalName » p = modelChange_cast.getChangedField(); - «FOR c : partialOrderSort(mutableClassesWithNonCollectionMutableFields)» - «val nonCollectionMutableFields = traceability.getMutablePropertiesOf(c).filter[p|!p.many]» - - «val traced = traceability.getTracedClass(c)» - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - - «FOR p : nonCollectionMutableFields SEPARATOR " else "» - - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass valueClass = ptrace.getEType as EClass» - «val EReference pvalues = traceability.getStateClassToValueClass(p)» - - if (p.getFeatureID() == «stringFeatureID(p)») { - - // Rollback: we remove the last value of this field from the new state - «getJavaFQN(traced)» traced = («getJavaFQN(traced)») exeToTraced.get(o); - «getJavaFQN(valueClass)» lastValue = traced.«EcoreCraftingUtil.stringGetter(ptrace)».get(traced.«EcoreCraftingUtil.stringGetter(ptrace)».size()-1); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».remove(lastValue); - - // And we create a proper new value - ««« «IF traceability.allMutableClasses.contains(traceability.getRealMutableClass(p.EType))» - ««« addNewObjectToState((«getJavaFQN(traceability.getRealMutableClass(p.EType))»)o_cast.«EcoreCraftingUtil.stringGetter(p)», newState); - ««« «ENDIF» - «getJavaFQN(valueClass)» newValue = «EcoreCraftingUtil.stringCreate(valueClass)»; - «val valueProperty = traceability.getValuePropertyOfMutableProperty(p)» - - «IF p instanceof EReference» - «getJavaFQN(valueProperty.EType)» value = null; - if (o_cast.«EcoreCraftingUtil.stringGetter(p)» != null) { - value = «stringGetterTracedValue("o_cast", p)»; - } - «ELSE» - «getJavaFQN(valueProperty.EType)» value = o_cast.«EcoreCraftingUtil.stringGetter(p)»; - «ENDIF» - - newValue.«stringSetter(valueProperty,"value")»; - - traced.«EcoreCraftingUtil.stringGetter(ptrace)».add(newValue); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».add(newValue); - } - ««« end if feature id - «ENDFOR» - } - ««« end if instance of - «ENDFOR» - } - ««« end if NonCollectionFieldModelChange - «ENDIF» - «IF !mutableClassesWithCollectionMutableFields.empty» - // Here we look at collection mutable fields - // We must first manually find out if the collection changed... - // If it changed we must rollback the last values from the copied state, and add new values as well - «IF !newConcreteClassesNotEmpty.empty || !mutableClassesWithNonCollectionMutableFields.empty » else «ENDIF» if (modelChange instanceof org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange) { - org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange modelChange_cast = (org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange) modelChange; - «EStructuralFeature.canonicalName » p = modelChange_cast.getChangedField(); - «FOR c : partialOrderSort(mutableClassesWithCollectionMutableFields) » - «val collectionMutableFields = traceability.getMutablePropertiesOf(c).filter[p|p.many]» - «val traced = traceability.getTracedClass(c)» - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - «getJavaFQN(traced)» tracedObject = («getJavaFQN(traced)») exeToTraced.get(o_cast); - «FOR p : collectionMutableFields SEPARATOR " else "» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass valueClass = ptrace.getEType as EClass» - «val EReference pvalues = traceability.getStateClassToValueClass(p)» - if (p.getFeatureID() == «stringFeatureID(p)») { - // We compare the last collection in the value sequence, and the current one in the potentially changed object - List<«getJavaFQN(valueClass)»> valueSequence = tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)»; - «getJavaFQN(valueClass)» previousValue = null; - if (!valueSequence.isEmpty()) { - previousValue = valueSequence.get(valueSequence.size() - 1); - } - ««« If instances of new class, we have to make sure that there are traced versions - «IF traceability.allMutableClasses.contains(traceability.getRealMutableClass(p.EType))» - for(«getJavaFQN(p.EType)» aValue : o_cast.«EcoreCraftingUtil.stringGetter(p)») { - addNewObjectToState((«getJavaFQN(traceability.getRealMutableClass(p.EType))»)aValue, newState); - }««« end for loop on values - «ENDIF» - boolean change = false; - if (previousValue != null) { - if (previousValue.«EcoreCraftingUtil.stringGetter(p)».size() == o_cast - .«EcoreCraftingUtil.stringGetter(p)».size()) { - ««« We this is an ordered collection, we have to compare in the correct order - «IF p.ordered» - java.util.Iterator<«getJavaFQN(p.EType,true)»> it = o_cast.«EcoreCraftingUtil.stringGetter(p)».iterator(); - for («getTracedJavaFQN(traceability.getValuePropertyOfMutableProperty(p).EType,true)» aPreviousValue : previousValue - .«EcoreCraftingUtil.stringGetter(p)») { - «getJavaFQN(p.EType)» aCurrentValue = it.next(); - «IF p instanceof EReference» - if (aPreviousValue != exeToTraced.get(aCurrentValue)) - «ELSE» - if (!aPreviousValue.equals(aCurrentValue)) - «ENDIF» - { - change = true; - break; - } - } - ««« Else we simply check that the content is the same - «ELSE» - change = !previousValue.«EcoreCraftingUtil.stringGetter(p)».containsAll(«getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)»), newState); - «ENDIF» - ««« end case ordered - }««« end if same size - else { - change = true; - }««« end else - } else { - change = true; - }««« end else - if (change) { - stateChanged = true; - // Rollback: we remove the last value of this field from the new state - «getJavaFQN(valueClass)» lastValue = tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».get(tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».size()-1); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».remove(lastValue); - // And we create a proper new value - «getJavaFQN(valueClass)» newValue = «EcoreCraftingUtil.stringCreate(valueClass)»; - «val valueProperty = traceability.getValuePropertyOfMutableProperty(p)» - «IF p.many» - «IF p instanceof EReference» - newValue.«EcoreCraftingUtil.stringGetter(valueProperty)».addAll - ((Collection) «getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)», newState)); - «ELSE» - newValue.«EcoreCraftingUtil.stringGetter(valueProperty)».addAll - ((Collection) o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - «ELSE» - newValue.«stringSetter(valueProperty,stringGetterTracedValue("o_cast", p))»; - «ENDIF» - tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».add(newValue); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».add(newValue); - }««« end if change - }««« end if featureid - «ENDFOR» - } ««« end if instanceof - «ENDFOR» - }««« end if PotentialCollectionFieldModelChange - «ENDIF» - }««« end for all changes - if (stateChanged) { - final «specificStepFQN» currentStep = context.peekFirst(); - if (currentStep != null && currentStep instanceof «getJavaFQN(TracePackage.eINSTANCE.bigStep)») { - final «stateFQN» startingState = lastState; - final «stateFQN» endingState = newState; - addImplicitStep(currentStep, startingState, endingState); - } - lastState = newState; - traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_TraceToStates)».add(lastState); - }««« end if (stateChanged) - else if (copiedState) { - «FOR p : traceability.allMutableProperties.sortBy[FQN]» - newState.«EcoreCraftingUtil.stringGetter(traceability.getStateClassToValueClass(p))».clear(); - «ENDFOR» - } - copiedState = false; - }««« end if (!changes.isEmpty()) - }««« end method - ''' - } - - private def String generateAddStateMethods() { - return - ''' - @Override - public boolean addStateIfChanged() { - return addState(true); - } - - @Override - public void addState() { - addState(false); - } - - private boolean addState(boolean onlyIfChange) { - - «getJavaFQN(traceability.traceMMExplorer.getStateClass)» newState = «EcoreCraftingUtil.stringCreate( - traceability.traceMMExplorer.getStateClass)»; - boolean changed = false; - - Set allResources = getAllExecutedModelResources(); - - // We look at each object instance of a class with mutable properties - // Each of these objects should eventually become a traced object - for (Resource r : allResources) - for (TreeIterator i = r.getAllContents(); i.hasNext();){ - EObject o = i.next(); - «FOR c : partialOrderSort(getAllNonEmptyMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList) SEPARATOR "\n else "» - «val traced = traceability.getTracedClass(c)» - /** - * Storing the state of a «getJavaFQN(c)» object - */ - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - storeAsTracedObject(o_cast); - - «IF !getAllMutablePropertiesOf(c).empty» - «getJavaFQN(traced)» tracedObject = («getJavaFQN(traced)») exeToTraced.get(o); - «ENDIF» - «FOR p : getAllMutablePropertiesOf(c).sortBy[FQN]» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass valueClass = ptrace.getEType as EClass» - «incVar("valueSequence")» - «val EReference refGlobalToState = traceability.getStateClassToValueClass(p)» - «incVar("previousValue")» - «incVar("noChange")» - - // Then we compare the value of the field with the last stored value - // If same value, we create no local state and we refer to the previous - ««« TODO to change if we switch from refering the exeMM to refering the AS (as in the ECMFA paper) -> need to compare to refs to origobjs/tracedobj - ««« TODO handle collections of datatypes - List<«getJavaFQN(valueClass)»> «uniqueVar("valueSequence")» = tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)»; - «getJavaFQN(valueClass)» «uniqueVar("previousValue")» = null; - if (!«uniqueVar("valueSequence")».isEmpty()) { - «uniqueVar("previousValue")» = «uniqueVar("valueSequence")».get(«uniqueVar("valueSequence")».size() - 1); - } - ««« Case many - «IF p.many» - ««« If instances of new class, we have to make sure that there are traced versions - «IF traceability.allMutableClasses.contains(traceability.getRealMutableClass(p.EType))» - for(«getJavaFQN(p.EType)» aValue : o_cast.«EcoreCraftingUtil.stringGetter(p)») { - storeAsTracedObject(aValue); - } - «ENDIF» - - boolean «uniqueVar("noChange")»= true; - if («uniqueVar("previousValue")» != null) { - if («uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)».size() == o_cast - .«EcoreCraftingUtil.stringGetter(p)».size()) { - ««« We this is an ordered collection, we have to compare in the correct order - «IF p.ordered» - java.util.Iterator<«getJavaFQN(p.EType,true)»> it = o_cast.«EcoreCraftingUtil.stringGetter(p)».iterator(); - for («getTracedJavaFQN(traceability.getValuePropertyOfMutableProperty(p).EType,true)» aPreviousValue : «uniqueVar("previousValue")» - .«EcoreCraftingUtil.stringGetter(p)») { - «getJavaFQN(p.EType)» aCurrentValue = it.next(); - «IF p instanceof EReference» - if (aPreviousValue != exeToTraced.get(aCurrentValue)) { - «ELSE» - if (!aPreviousValue.equals(aCurrentValue)) { - «ENDIF» - «uniqueVar("noChange")» = false; - break; - } - } - - ««« Else we simply check that the content is the same - «ELSE» - «uniqueVar("noChange")» = «uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)».containsAll(«getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)»)); - «ENDIF» - ««« end case ordered - } else { - «uniqueVar("noChange")» = false; - } - } else { - «uniqueVar("noChange")» = false; - } - ««« Case single - «ELSE» - ««« If instance of new class, we have to make sure that there is a traced version - «IF traceability.allMutableClasses.contains(traceability.getRealMutableClass(p.EType))» - storeAsTracedObject(o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - ««« Getting the content of the field - «incVar("content")» - ««« Case reference - «IF p instanceof EReference» - «getTracedJavaFQN(traceability.getValuePropertyOfMutableProperty(p).EType)» «uniqueVar("content")» = null; - if (o_cast.«EcoreCraftingUtil.stringGetter(p)» != null) - «uniqueVar("content")» = «stringGetterTracedValue("o_cast", p)»; - ««« - ««« Case datatype - «ELSEIF p instanceof EAttribute» - «getJavaFQN(p.EType)» «uniqueVar("content")» = o_cast.«EcoreCraftingUtil.stringGetter(p)»; - «ENDIF» - ««« end declaring/getting content - - «IF getJavaFQN(p.EType) == "java.lang.Byte" - || getJavaFQN(p.EType) == "java.lang.Short" - || getJavaFQN(p.EType) == "java.lang.Integer" - || getJavaFQN(p.EType) == "java.lang.Long" - || getJavaFQN(p.EType) == "java.lang.Boolean" - || getJavaFQN(p.EType) == "java.lang.Float" - || getJavaFQN(p.EType) == "java.lang.Double" - || getJavaFQN(p.EType) == "java.lang.String"» - boolean «uniqueVar("noChange")» = «uniqueVar("previousValue")» != null - && «uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)» != null - && «uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)».equals(«uniqueVar("content")»); - «ELSE» - boolean «uniqueVar("noChange")» = «uniqueVar("previousValue")» != null - && «uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)» == «uniqueVar("content")»; - «ENDIF» - - «ENDIF» - ««« end collection/single - if («uniqueVar("noChange")») { - newState.«EcoreCraftingUtil.stringGetter(refGlobalToState)».add(«uniqueVar("previousValue")»); - - } // Else we create one - else { - changed = true; - «getJavaFQN(valueClass)» newValue = «EcoreCraftingUtil.stringCreate(valueClass)»; - ««« Case collection - ««« TODO: handle collections of datatypes! - «IF p.many» - - «IF p instanceof EReference» - newValue.«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) «getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)»)); - «ELSE» - newValue.«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - ««« Case single - «ELSE» - - newValue.«stringSetter(p, uniqueVar("content"))»; - - «ENDIF» - ««« end collection/Single - tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».add(newValue); - newState.«EcoreCraftingUtil.stringGetter(refGlobalToState)».add(newValue); - } - - «ENDFOR» - } - «ENDFOR» - } - - boolean createNewState = lastState == null || (!onlyIfChange || changed); - if (createNewState) { - - final «specificStepFQN» currentStep = context.peekFirst(); - if (currentStep != null && currentStep instanceof «getJavaFQN(TracePackage.eINSTANCE.bigStep)») { - final «stateFQN» startingState = lastState; - final «stateFQN» endingState = newState; - addImplicitStep(currentStep, startingState, endingState); - } - - lastState = newState; - traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_TraceToStates)».add(lastState); - } - - // Undoing the new state created for nothing - else { - - newState.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_StateToStep_started)».clear(); - newState.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_StateToStep_ended)».clear(); - - «FOR p : traceability.allMutableProperties.sortBy[FQN]» - «val EReference tuple = traceability.getStateClassToValueClass(p)» - newState.«EcoreCraftingUtil.stringGetter(tuple)».clear(); - «ENDFOR» - } - - return createNewState; - - } - ''' - } - - private def String generateAddStepMethods() { - return - ''' - «val stepRules = traceability.mmext.rules» - «IF gemoc» - @SuppressWarnings("unchecked") - @Override - public void addStep(fr.inria.diverse.trace.commons.model.trace.Step step) { - «specificStepFQN» step_cast = null; - if (step != null && step instanceof «specificStepFQN») { - step_cast = («specificStepFQN») step; - if (mseModel == null) { - mseModel = fr.inria.diverse.trace.commons.model.trace.TraceFactory.eINSTANCE.createMSEModel(); - traceResource.getContents().add(mseModel); - } - mseModel.getOwnedMSEs().add(step_cast.getMseoccurrence().getMse()); - - // Creating generic (or almost generic) links - «stateFQN» state = traceRoot.getStatesTrace().get(traceRoot.getStatesTrace().size()-1); - step_cast.setStartingState(state); - if (!context.isEmpty() && context.getFirst() != null) { - ((SequentialStep<«specificStepFQN»>) context.getFirst()).getSubSteps().add(step_cast); - } else { - traceRoot.getRootStep().getSubSteps().add(step_cast); - } - - // Adding step in its dedicated sequence/dimension - «IF !stepRules.empty» - «FOR stepRule : stepRules.sortBy[baseFQN] SEPARATOR "else"» - «val EClass stepClass = traceability.getStepClassFromStepRule(stepRule)» - «val String varName = stepClass.name.toFirstLower.replace(" ", "") + "Instance"» - if (step_cast instanceof «getJavaFQN(stepClass)») { - «getJavaFQN(stepClass)» «varName» = («getJavaFQN(stepClass)») step_cast; - traceRoot.«EcoreCraftingUtil.stringGetter(traceability.getStepSequence(stepClass))».add(«varName»); - } - «ENDFOR» - «ENDIF» - } - context.push(step_cast); - } - «ELSE» - @Override - public void addStep(String stepRule, Map params) { - addStep(stepRule, params, this.getTraceSize()-1); - } - - private void addStep(String stepRule, Map params, int stateIndex) { - «specificStepFQN» toPush = null; - if (stateIndex >= 0) { - «stateFQN» state = this.traceRoot.getStatesTrace().get(stateIndex); - «IF !stepRules.empty» - «FOR stepRule : stepRules.sortBy[baseFQN] SEPARATOR "else"» - «val stepCallerClass = stepRule.containingClass» - «val possibleCallerClasses = abstractSyntax.EClassifiers - .filter[c|c instanceof EClass] - .map[c|c as EClass] - .filter[c|c.equals(stepCallerClass)||c.EAllSuperTypes.contains(stepCallerClass)] - .toSet» - «val EClass stepClass = traceability.getStepClassFromStepRule(stepRule)» - «val String varName = stepClass.name.toFirstLower.replace(" ", "") + "Instance"» - «IF possibleCallerClasses.empty» - if (stepRule.equalsIgnoreCase("«getBaseFQN(stepRule)»")) { - «ELSE» - if ( - «FOR possibleCallerClass: possibleCallerClasses.sortBy[name] SEPARATOR " || "» - stepRule.equalsIgnoreCase("«getActualFQN(possibleCallerClass, stepRule)»") - «ENDFOR» - ) { - «ENDIF» - // First we create the step - «getJavaFQN(stepClass)» «varName» = «EcoreCraftingUtil.stringCreate(stepClass)»; - «varName».«stringSetter(TraceMMStrings.ref_StepToState_starting, "state")»; - - if (!context.isEmpty() && context.getFirst() != null){ - ((fr.inria.diverse.trace.commons.model.trace.SequentialStep) context.getFirst()).getSubSteps().add(«varName»); - } else { - traceRoot.getRootSteps().add(«varName»); - } - toPush = «varName»; - ««« TODO rely on information in Rule instead of the structural features? - «val properties = stepClass.EAllStructuralFeatures.filter[f| - !TracePackage.eINSTANCE.smallStep.EStructuralFeatures.contains(f) && - !TracePackage.eINSTANCE.bigStep.EStructuralFeatures.contains(f) && - !traceability.traceMMExplorer.getSpecificStepClass.EStructuralFeatures.contains(f) && - !f.name.equals(StepStrings.ref_BigStepToSub) - && !f.EContainingClass.name.equals("MSEOccurrence")]» - «IF !properties.empty» - if (params != null) { - for (String k : params.keySet()) { - switch(k) { - «FOR p : properties.sortBy[name]» - case "«p.name»": - Object «uniqueVar("v")» = params.get(k); - «val type = getEventParamRuntimeType(p)» - if («uniqueVar("v")» instanceof «getJavaFQN(type)») { - «IF type == p.EType» - «varName».«stringSetter(p, "(" + getJavaFQN(p.EType) + ")"+uniqueVar("v"))»; - «ELSE» - «varName».«stringSetter(p, "(" + getJavaFQN(p.EType) + ")exeToTraced.get("+uniqueVar("v"+")"))»; - «ENDIF» - } - break; - «incVar("v")» - «ENDFOR» - } - } - } - «ENDIF» - // Then we add it to its trace - this.traceRoot.«EcoreCraftingUtil.stringGetter(traceability.getStepSequence(stepClass))».add(«varName»); - } - «ENDFOR» - «ENDIF» - } - context.push(toPush); - } - «ENDIF» - - @SuppressWarnings("unchecked") - private void addImplicitStep(«specificStepFQN» currentStep, - «stateFQN» startingState, - «stateFQN» endingState) { - - «IF !stepRules.empty && !traceability.bigStepClasses.empty» - «specificStepFQN» implicitStep = null; - «FOR bigStepClass : traceability.bigStepClasses.sortBy[name] SEPARATOR "else"» - if (currentStep instanceof «getJavaFQN(bigStepClass)») { - implicitStep = «EcoreCraftingUtil.stringCreateImplicitStep(bigStepClass)»; - } - «ENDFOR» - if (implicitStep != null) { - implicitStep.setStartingState(startingState); - implicitStep.setEndingState(endingState); - (( SequentialStep<«specificStepFQN»>) currentStep).getSubSteps().add(implicitStep); - - } - «ENDIF» - } - - @Override - public void endStep(fr.inria.diverse.trace.commons.model.trace.Step step) { - «specificStepFQN» popped = context.pop(); - if (popped != null) - popped.«stringSetter(TraceMMStrings.ref_StepToState_ending, "lastState")»; - } - ''' - } - - private def String generateInitAndSaveTraceMethods() { - return - ''' - @Override - public EObject initTrace(LaunchConfiguration launchConfiguration) { - // Create root - traceRoot = «EcoreCraftingUtil.stringCreate(traceability.traceMMExplorer.getSpecificTraceClass)»; - traceRoot.setLaunchconfiguration(launchConfiguration); - - // Create root sequential step - fr.inria.diverse.trace.commons.model.trace.SequentialStep<«specificStepFQN»> rootStep = fr.inria.diverse.trace.commons.model.trace.TraceFactory.eINSTANCE.createSequentialStep(); - traceRoot.setRootStep(rootStep); - - // Put in the resource - traceResource.getContents().add(traceRoot); - - return traceRoot; - } - - @Override - public void save() { - try { - traceResource.save(null); - } catch (java.io.IOException e) { - e.printStackTrace(); - } - } - - @Override - public void save(URI uri) { - try { - traceResource.setURI(uri); - traceResource.save(null); - } catch (java.io.IOException e) { - e.printStackTrace(); - } - } - ''' - } - - private def String generateExeToFromTracedGenericMethods() { - return - ''' - «IF getExeToTracedUsed» - private Collection «getExeToTracedMethodName»(Collection exeObjects, «getJavaFQN(stateClass)» newState) { - Collection result = new ArrayList(); - for(EObject exeObject : exeObjects) { - result.add(exeToTraced.get(exeObject)); - } - return result; - } - «ENDIF» - ''' - } - - private def String generateTraceManagerClass() { - - val body = - ''' - public class «className» implements ITraceConstructor { - «generateFields» - «generateConstructor» - «IF gemoc» - «generateAddInitialStateMethod» - «generateAddNewObjectToStateMethods» - «generateAddStateUsingListenerMethods» - «ELSE» - «generateStoreAsTracedMethods» - «generateAddStateMethods» - «ENDIF» - «generateAddStepMethods» - «generateInitAndSaveTraceMethods» - «generateGetAllResourcesMethod» - «generateExeToFromTracedGenericMethods» - - @Override - public boolean isPartialTraceConstructor() { - return false; - } - } - ''' - - return - ''' - package «packageQN»; - - «generateImports» - - «body» - ''' - } - -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceExplorerGeneratorJava.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceExplorerGeneratorJava.xtend deleted file mode 100644 index f4561f37e..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceExplorerGeneratorJava.xtend +++ /dev/null @@ -1,985 +0,0 @@ -package fr.inria.diverse.trace.plugin.generator - -import ecorext.ClassExtension -import ecorext.Rule -import fr.inria.diverse.trace.commons.CodeGenUtil -import fr.inria.diverse.trace.commons.EcoreCraftingUtil -import fr.inria.diverse.trace.metamodel.generator.TraceMMGenerationTraceability -import fr.inria.diverse.trace.metamodel.generator.TraceMMStrings -import java.util.Collection -import java.util.HashSet -import java.util.Set -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EClassifier -import org.eclipse.emf.ecore.EOperation -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EReference -import org.eclipse.emf.ecore.EStructuralFeature - -class TraceExplorerGeneratorJava { - - // Inputs - private val String className - private val String packageQN - private val EPackage traceMM - private val EPackage abstractSyntax - private val TraceMMGenerationTraceability traceability - private val Set refGenPackages - - private boolean getTracedToExeUsed = false - - // Shortcuts - private val EClass stateClass - private val EClass valueClass - private val EClass specificStepClass - - private val String stateFQN - private val String valueFQN - private val String specificStepFQN - private val String statesPackageFQN - - public def String getClassName() { - return className - } - - new(String languageName, String packageQN, EPackage traceMM, TraceMMGenerationTraceability traceability, - Set refGenPackages, boolean gemoc, EPackage abstractSyntax, boolean partialTraceManagement) { - this.traceMM = traceMM - this.className = languageName.replaceAll(" ", "").toFirstUpper + "Explorer" - this.packageQN = packageQN - this.traceability = traceability - this.refGenPackages = refGenPackages - this.abstractSyntax = abstractSyntax - stateClass = traceability.traceMMExplorer.stateClass - valueClass = traceability.traceMMExplorer.valueClass - statesPackageFQN = EcoreCraftingUtil.getBaseFQN(traceability.traceMMExplorer.statesPackage) + "." + traceability.traceMMExplorer.statesPackage.name.toFirstUpper + "Package" - specificStepClass = traceability.traceMMExplorer.specificStepClass - stateFQN = getJavaFQN(stateClass) - valueFQN = getJavaFQN(valueClass) - specificStepFQN = getJavaFQN(specificStepClass) - } - - private def String getFQN(EStructuralFeature eFeature) { - return EcoreCraftingUtil.getBaseFQN(eFeature.EContainingClass) + "." + eFeature.name - } - - private def String getJavaFQN(EClassifier c) { - return getJavaFQN(c,false) - } - - private def String getJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { - return EcoreCraftingUtil.getJavaFQN(c,refGenPackages,enforcePrimitiveJavaClass) - } - - public def String generateCode() { - val String code = generateTraceManagerClass() - try { - return CodeGenUtil.formatJavaCode(code) - } catch (Throwable t) { - return code - } - - } - - public static def String getBaseFQN(Rule r) { - val EOperation o = r.operation - val EClass c = r.containingClass - return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name - } - - private def String stringGetterExeValue(String javaVarName, EStructuralFeature p) { - return ''' - «IF (p instanceof EReference && traceability.hasTracedClass(p.EType as EClass))» - - ««« If many elements are in this fields, we have to cast the element with a collection - «IF p.many» - (Collection) - «ELSE» - («getJavaFQN(p.EType, true)») - «ENDIF» - «getTracedToExeMethodName»(«javaVarName».«EcoreCraftingUtil.stringGetter(p)») - «ELSE» - «javaVarName».«EcoreCraftingUtil.stringGetter(p)» - «ENDIF»''' - } - - private def Set getConcreteSubtypesTraceClassOf(EClass tracedClass) { - val Set result = new HashSet() - result.addAll(this.traceMM.eAllContents.filter(EClass).filter [ c | - !c.abstract && c.EAllSuperTypes.contains(tracedClass) - ].toSet) - if (!tracedClass.abstract) - result.add(tracedClass) - return result - } - - private def Set getAllMutablePropertiesOf(EClass exeClass) { - val Set res = new HashSet - res.addAll(traceability.getMutablePropertiesOf(exeClass)) - res.addAll(exeClass.EAllSuperTypes.map[s|traceability.getMutablePropertiesOf(s)].flatten.toSet); - return res - } - - private def String getTracedToExeMethodName() { - getTracedToExeUsed = true - return "getTracedToExe" - } - - private def String generateImports() { - return - ''' - import java.util.ArrayList; - «IF getTracedToExeUsed» - import java.util.Collection; - «ENDIF» - import java.util.Collections; - import java.util.HashMap; - import java.util.List; - import java.util.Map; - import java.util.function.Predicate; - import java.util.stream.Collectors; - - import org.eclipse.emf.ecore.EObject; - import org.eclipse.emf.ecore.resource.Resource; - import org.eclipse.emf.transaction.RecordingCommand; - import org.eclipse.emf.transaction.TransactionalEditingDomain; - import org.eclipse.emf.transaction.util.TransactionUtil; - import org.gemoc.executionframework.engine.core.CommandExecution; - - import fr.inria.diverse.trace.commons.model.trace.SequentialStep; - import fr.inria.diverse.trace.commons.model.trace.Step; - import fr.inria.diverse.trace.gemoc.api.ITraceExplorer; - import fr.inria.diverse.trace.gemoc.api.ITraceListener; - ''' - } - - private def String generateFields() { - return - ''' - private «getJavaFQN(traceability.traceMMExplorer.specificTraceClass)» traceRoot; - private Resource modelResource; - private final Map tracedToExe; - - private int lastJumpIndex = -1; - private «stateFQN» currentState = null; - final private List callStack = new ArrayList<>(); - - final private List> valueTraces = new ArrayList<>(); - - private List<«stateFQN»> statesTrace; - - private «specificStepFQN» stepIntoResult; - private «specificStepFQN» stepOverResult; - private «specificStepFQN» stepReturnResult; - - private «specificStepFQN» stepBackIntoResult; - private «specificStepFQN» stepBackOverResult; - private «specificStepFQN» stepBackOutResult; - - final private Map<«specificStepFQN», Integer> stepToStartingIndex = new HashMap<>(); - final private Map<«specificStepFQN», Integer> stepToEndingIndex = new HashMap<>(); - - private final HashMap canBackValueCache = new HashMap<>(); - - final private List listeners = new ArrayList<>(); - ''' - } - - private def String generateConstructors() { - return - ''' - public «className»(Map tracedToExe) { - this.tracedToExe = tracedToExe; - } - - public «className»() { - this.tracedToExe = null; - } - ''' - } - - private def String generateValueUtilities() { - return - ''' - private List> getAllValueTraces() { - final List> result = new ArrayList<>(); - «FOR mutClass : traceability.allMutableClasses.filter[c|!c.isAbstract].sortBy[name]» - «val traced = traceability.getTracedClass(mutClass)» - «val mutProps = getAllMutablePropertiesOf(mutClass).sortBy[FQN]» - «IF !mutProps.empty» - for («getJavaFQN(traced)» tracedObject : traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_createTraceClassToTracedClass(traced))») { - «FOR p : mutProps» - «val EReference ptrace = traceability.getTraceOf(p)» - result.add(tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)»); - «ENDFOR» - } - «ENDIF» - «ENDFOR» - return result; - } - - private «valueFQN» getActiveValue(List valueTrace, «stateFQN» state) { - «valueFQN» result = null; - for («valueFQN» value : valueTrace) { - if (value.getStatesNoOpposite().contains(state)) { - result = value; - break; - } - } - return result; - } - - private int getPreviousValueIndex(final List valueTrace) { - «valueFQN» value = getActiveValue(valueTrace, currentState); - if (value != null) { - return valueTrace.indexOf(value) - 1; - } else { - int i = getCurrentStateIndex() - 1; - while (i > -1 && value == null) { - value = getActiveValue(valueTrace, statesTrace.get(i)); - i--; - } - if (value == null) { - return -1; - } else { - return valueTrace.indexOf(value) - 1; - } - } - } - - private int getNextValueIndex(List valueTrace) { - «valueFQN» value = getActiveValue(valueTrace, currentState); - if (value != null) { - final int idx = valueTrace.indexOf(value) + 1; - if (idx < valueTrace.size()) { - return idx; - } - return -1; - } else { - int i = getCurrentStateIndex() + 1; - final int traceLength = valueTrace.size(); - while (i < traceLength && value == null) { - value = getActiveValue(valueTrace, statesTrace.get(i)); - i++; - } - if (value == null) { - return -1; - } else { - final int idx = valueTrace.indexOf(value) + 1; - if (idx < valueTrace.size()) { - return idx; - } - return -1; - } - } - } - ''' - } - - private def generateStepUtilities() { - return - ''' - private int getStartingIndex(«specificStepFQN» step) { - return stepToStartingIndex.computeIfAbsent(step, s -> { - return statesTrace.indexOf(s.getStartingState()); - }); - } - - private int getEndingIndex(«specificStepFQN» step) { - if (step.getEndingState() != null) { - return stepToEndingIndex.computeIfAbsent(step, s -> { - return statesTrace.indexOf(s.getEndingState()); - }); - } - return -1; - } - - @SuppressWarnings("unchecked") - private «specificStepFQN» findNextStep(final List<«specificStepFQN»> stepPath, - final «specificStepFQN» previousStep, final int start) { - final List<«specificStepFQN»> rootSteps = traceRoot.getRootStep() - .getSubSteps(); - «specificStepFQN» result = null; - int i = start; - int depth = stepPath.size(); - «specificStepFQN» previous = previousStep; - while (result == null && i < depth) { - final «specificStepFQN» currentStep = stepPath.get(depth - i - 1); - final List<«specificStepFQN»> currentSubSteps = new ArrayList<>(); - if (currentStep instanceof SequentialStep) { - currentSubSteps - .addAll(((SequentialStep<«specificStepFQN»>) currentStep) - .getSubSteps()); - } - if (currentSubSteps.isEmpty()) { - // No substep to step into, we thus have to explore the substeps - // of the parent step - previous = currentStep; - } else { - if (previous == null) { - // First time we step into - result = currentSubSteps.get(0); - } else { - final int idx = currentSubSteps.indexOf(previous) + 1; - if (idx < currentSubSteps.size()) { - // We step into the next step - result = currentSubSteps.get(idx); - } else { - previous = currentStep; - } - } - } - i++; - } - if (result == null) { - final int idx = rootSteps.indexOf(previous) + 1; - if (idx < rootSteps.size()) { - result = rootSteps.get(idx); - } - } - return result; - } - ''' - } - - private def generateStepQueryMethods() { - return - ''' - @SuppressWarnings("unchecked") - private «specificStepFQN» computeBackInto(List<«specificStepFQN»> stepPath) { - final List<«specificStepFQN»> rootSteps = traceRoot.getRootStep().getSubSteps(); - final int depth = stepPath.size(); - «specificStepFQN» result = null; - if (depth > 1) { - final «specificStepFQN» currentStep = stepPath.get(depth - 1); - final «specificStepFQN» parentStep = stepPath.get(depth - 2); - final SequentialStep<«specificStepFQN»> parentStep_cast = (SequentialStep<«specificStepFQN»>) parentStep; - final List parentSubSteps = parentStep_cast.getSubSteps(); - final int idx = parentSubSteps.indexOf(currentStep); - if (idx == 0) { - // If the current step is the first in its parents substeps, - // return parent step - result = parentStep; - } else if (idx > 0) { - // Otherwise, return the deepest substep in the previous sibling - // step - final «specificStepFQN» previousSiblingStep = parentSubSteps.get(idx - 1); - «specificStepFQN» tmpStep = previousSiblingStep; - final List<«specificStepFQN»> tmpSubSteps = new ArrayList<>(); - tmpSubSteps.clear(); - if (tmpStep instanceof SequentialStep) { - SequentialStep<«specificStepFQN»> tmpStep_cast = (SequentialStep<«specificStepFQN»>) tmpStep; - tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); - } - while (!tmpSubSteps.isEmpty()) { - tmpStep = tmpSubSteps.get(tmpSubSteps.size() - 1); - tmpSubSteps.clear(); - if (tmpStep instanceof SequentialStep) { - SequentialStep<«specificStepFQN»> tmpStep_cast = (SequentialStep<«specificStepFQN»>) tmpStep; - tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); - } - } - result = tmpStep; - } - } else if (depth == 1) { - final «specificStepFQN» currentStep = stepPath.get(0); - final int idx = rootSteps.indexOf(currentStep); - if (idx > 0) { - «specificStepFQN» tmpStep = rootSteps.get(idx - 1); - final List<«specificStepFQN»> tmpSubSteps = new ArrayList<>(); - tmpSubSteps.clear(); - if (tmpStep instanceof SequentialStep) { - SequentialStep<«specificStepFQN»> tmpStep_cast = (SequentialStep<«specificStepFQN»>) tmpStep; - tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); - } - while (!tmpSubSteps.isEmpty()) { - tmpStep = tmpSubSteps.get(tmpSubSteps.size() - 1); - tmpSubSteps.clear(); - if (tmpStep instanceof SequentialStep) { - SequentialStep<«specificStepFQN»> tmpStep_cast = (SequentialStep<«specificStepFQN»>) tmpStep; - tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); - } - } - result = tmpStep; - } - } - return result; - } - - @SuppressWarnings("unchecked") - private «specificStepFQN» computeBackOver(List<«specificStepFQN»> stepPath) { - final List<«specificStepFQN»> rootSteps = traceRoot.getRootStep().getSubSteps(); - final int depth = stepPath.size(); - «specificStepFQN» result = null; - if (depth > 1) { - final «specificStepFQN» currentStep = stepPath.get(depth - 1); - final «specificStepFQN» parentStep = stepPath.get(depth - 2); - final SequentialStep<«specificStepFQN»> parentStep_cast = (SequentialStep<«specificStepFQN»>) parentStep; - final List<«specificStepFQN»> parentSubSteps = parentStep_cast.getSubSteps(); - final int idx = parentSubSteps.indexOf(currentStep); - if (idx == 0) { - // If the current step is the first in its parents substeps, - // return parent step - result = parentStep; - } else { - // Otherwise, return the previous sibling step - result = parentSubSteps.get(idx - 1); - } - } else if (depth == 1) { - final «specificStepFQN» currentStep = stepPath.get(0); - final int idx = rootSteps.indexOf(currentStep); - if (idx > 0) { - result = rootSteps.get(idx - 1); - } - } - return result; - } - - private «specificStepFQN» computeBackOut(List<«specificStepFQN»> stepPath) { - if (stepPath.size() > 1) { - return stepPath.get(stepPath.size() - 2); - } - return null; - } - - private «specificStepFQN» computeStepInto(List<«specificStepFQN»> stepPath, List<«specificStepFQN»> rootSteps) { - return findNextStep(stepPath, null, 0); - } - - private «specificStepFQN» computeStepOver(List<«specificStepFQN»> stepPath, List<«specificStepFQN»> rootSteps) { - if (!stepPath.isEmpty()) { - return findNextStep(stepPath, stepPath.get(stepPath.size() - 1), 1); - } - return null; - } - - private «specificStepFQN» computeStepReturn(List<«specificStepFQN»> stepPath, List<«specificStepFQN»> rootSteps) { - if (stepPath.size() > 1) { - return findNextStep(stepPath, stepPath.get(stepPath.size() - 2), 2); - } - return null; - } - - private void computeExplorerState(List<«specificStepFQN»> stepPath) { - final List<«specificStepFQN»> rootSteps = getStepsForStates(0, statesTrace.size()); - - final List<«specificStepFQN»> stepPathUnmodifiable = Collections.unmodifiableList(stepPath); - - stepIntoResult = computeStepInto(stepPathUnmodifiable, rootSteps); - stepOverResult = computeStepOver(stepPathUnmodifiable, rootSteps); - stepReturnResult = computeStepReturn(stepPathUnmodifiable, rootSteps); - - stepBackIntoResult = computeBackInto(stepPathUnmodifiable); - stepBackOverResult = computeBackOver(stepPathUnmodifiable); - stepBackOutResult = computeBackOut(stepPathUnmodifiable); - - callStack.clear(); - callStack.addAll(stepPathUnmodifiable.stream().map(s -> (Step) s) - .collect(Collectors.toList())); - } - ''' - } - - private def String generateGoToMethods() { - return - ''' - private void goTo(EObject eObject) { - if (eObject instanceof «stateFQN») { - «getJavaFQN(traceability.traceMMExplorer.stateClass)» stateToGo = («getJavaFQN(traceability.traceMMExplorer.stateClass)») eObject; - «FOR p : traceability.allMutableProperties.sortBy[FQN]» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass stateClass = ptrace.getEType as EClass» - for («getJavaFQN(stateClass)» value : stateToGo.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_createGlobalToState(stateClass))») { - ««« Case in which we can use the "originalObject" reference and simply set its values - «IF p.eContainer instanceof ClassExtension» - ««« We have to test at runtime be can't know at design time the type of the object containing the property - ««« The reason is that we keep the same class hierarchy in the trace. Maybe we should remove that. - «FOR concreteSubType : getConcreteSubtypesTraceClassOf(ptrace.getEContainingClass).sortBy[name]» - if (value.«EcoreCraftingUtil.stringGetter("parent")» instanceof «getJavaFQN(concreteSubType)») { - «val Collection origRefs = traceability.getRefs_originalObject(concreteSubType).sortBy[name]» - «getJavaFQN(concreteSubType)» parent_cast = («getJavaFQN(concreteSubType)») value.«EcoreCraftingUtil.stringGetter("parent")»; - «IF !origRefs.isEmpty» - «val EReference origRef = origRefs.get(0)» - «IF p.many» - «EcoreCraftingUtil.getJavaFQN(traceability.getExeClass(ptrace.getEContainingClass),refGenPackages)» originalObject = («EcoreCraftingUtil.getJavaFQN(traceability.getExeClass(ptrace.getEContainingClass),refGenPackages)») parent_cast.«EcoreCraftingUtil.stringGetter(origRef)»; - originalObject.«EcoreCraftingUtil.stringGetter(p)».clear(); - originalObject.«EcoreCraftingUtil.stringGetter(p)».addAll(«stringGetterExeValue("value",p)»); - «ELSE» - «getJavaFQN(p.EType)» toset = «stringGetterExeValue("value", p)»; - «getJavaFQN(p.EType)» current = ((«getJavaFQN((p.eContainer as ClassExtension).extendedExistingClass)»)parent_cast.«EcoreCraftingUtil.stringGetter(origRef)»).«EcoreCraftingUtil.stringGetter(p)»; - if (current != toset) { - ((«getJavaFQN((p.eContainer as ClassExtension).extendedExistingClass)»)parent_cast.«EcoreCraftingUtil.stringGetter(origRef)»).«EcoreCraftingUtil.stringSetter(p, "toset", refGenPackages)»; - } - «ENDIF» - «ENDIF» - } - «ENDFOR» - ««« Case in which we have to recreate/restore execution objects in the model - «ELSEIF p.eContainer instanceof EClass» - «getJavaFQN(p.EContainingClass)» exeObject = («getJavaFQN(p.EContainingClass)») «getTracedToExeMethodName»(value.getParent()); - «IF p.many» - exeObject.«EcoreCraftingUtil.stringGetter(p)».clear(); - «IF p instanceof EReference» -««« exeObject.«EcoreCraftingUtil.stringGetter(p)».addAll((Collection) «getTracedToExeMethodName»(value.«EcoreCraftingUtil.stringGetter(p)»)); - exeObject.«EcoreCraftingUtil.stringGetter(p)».addAll((Collection) «getTracedToExeMethodName»(value.«EcoreCraftingUtil.stringGetter(p)»)); - «ELSE» - exeObject.«EcoreCraftingUtil.stringGetter(p)».addAll((Collection) value.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - «ELSE» - exeObject.«EcoreCraftingUtil.stringSetter(p, stringGetterExeValue("value",p), refGenPackages)»; - «ENDIF» - «ENDIF» - } - «ENDFOR» - } else if (eObject instanceof «valueFQN») { - goTo(((«valueFQN»)eObject).getStatesNoOpposite().get(0)); - } - } - - private void goTo(int stateNumber) { - if (modelResource != null) { - try { - final TransactionalEditingDomain ed = TransactionUtil.getEditingDomain(modelResource); - if (ed != null) { - final RecordingCommand command = new RecordingCommand(ed, "") { - protected void doExecute() { - goTo(statesTrace.get(stateNumber)); - } - }; - CommandExecution.execute(ed, command); - } - } catch (Exception e) { - throw e; - } - } - } - ''' - } - - private def String generateExeToFromTracedGenericMethods() { - return - ''' - private Collection «getTracedToExeMethodName»( - Collection tracedObjects) { - Collection result = new ArrayList(); - for (EObject tracedObject : tracedObjects) { - result.add(«getTracedToExeMethodName»(tracedObject)); - } - return result; - } - - private EObject «getTracedToExeMethodName»(EObject tracedObject) { - return tracedToExe.get(tracedObject); - } - ''' - } - - private def String generateNavigationMethods() { - return - ''' - private void jumpBeforeStep(«specificStepFQN» step) { - if (step != null) { - final int i = getStartingIndex(step); - if (i == statesTrace.size() - 1) { - lastJumpIndex = -1; - currentState = statesTrace.get(statesTrace.size() - 1); - } else { - lastJumpIndex = i; - currentState = statesTrace.get(i); - } - if (tracedToExe != null) { - goTo(i); - } - updateCallStack(step); - } - } - ''' - } - - private def String generateLoadTraceUtilities() { - return - ''' - public void loadTrace(«getJavaFQN(traceability.traceMMExplorer.specificTraceClass)» root) { - traceRoot = root; - statesTrace = traceRoot.getStatesTrace(); - if (!statesTrace.isEmpty()) { - currentState = statesTrace.get(0); - } - valueTraces.addAll(getAllValueTraces()); - } - - public void loadTrace(Resource modelResource, «getJavaFQN(traceability.traceMMExplorer.specificTraceClass)» root) { - loadTrace(root); - this.modelResource = modelResource; - } - ''' - } - - private def String generateAPI() { - return - ''' - @Override - public boolean canBackValue(int traceIndex) { - if (traceIndex > -1 && traceIndex < valueTraces.size()) { - return canBackValueCache - .computeIfAbsent( - traceIndex, - i -> { - final List valueTrace = valueTraces - .get(traceIndex); - final int previousValueIndex = getPreviousValueIndex(valueTrace); - return previousValueIndex > -1; - }); - } - return false; - } - - @Override - public boolean canStepValue(int traceIndex) { - return true; - } - - @Override - public void backValue(int traceIndex) { - if (traceIndex > -1 && traceIndex < valueTraces.size()) { - final List valueTrace = valueTraces - .get(traceIndex); - final int previousValueIndex = getPreviousValueIndex(valueTrace); - if (previousValueIndex > -1) { - jump(valueTrace.get(previousValueIndex)); - } - } - } - - @Override - public void stepValue(int traceIndex) { - if (traceIndex > -1 && traceIndex < valueTraces.size()) { - final List valueTrace = valueTraces - .get(traceIndex); - final int nextValueIndex = getNextValueIndex(valueTrace); - if (nextValueIndex > -1) { - jump(valueTrace.get(nextValueIndex)); - } - } - } - - @SuppressWarnings("unchecked") - @Override - public void jump(int i) { - final List<«stateFQN»> states = statesTrace; - if (i < states.size()) { - final List<«specificStepFQN»> rootSteps = getStepsForStates(i, i); - final List<«specificStepFQN»> searchPath = new ArrayList<>(); - «specificStepFQN» firstStepOfState = null; - if (!rootSteps.isEmpty()) { - final Predicate<«specificStepFQN»> p = s -> { - final int stepStartingState = getStartingIndex(s); - final int stepEndingState = getEndingIndex(s); - return (stepEndingState == -1 || stepEndingState >= i) && stepStartingState <= i; - }; - «specificStepFQN» currentStep = rootSteps.get(0); - final List<«specificStepFQN»> siblingSteps = new ArrayList<>(rootSteps); - final List<«specificStepFQN»> currentSubSteps = new ArrayList<>(); - if (currentStep instanceof SequentialStep) { - final SequentialStep<«specificStepFQN»> currentStep_cast = (SequentialStep<«specificStepFQN»>) currentStep; - currentSubSteps.addAll(currentStep_cast.getSubSteps().stream().filter(p).collect(Collectors.toList())); - } - while (firstStepOfState == null) { - final int startingIndex = getStartingIndex(currentStep); - final int endingIndex = getEndingIndex(currentStep); - if (startingIndex < i && (endingIndex > i || endingIndex == -1)) { - if (currentSubSteps.isEmpty()) { - throw new IllegalStateException("Unreachable state"); - } else { - searchPath.add(0, currentStep); - siblingSteps.clear(); - siblingSteps.addAll(currentSubSteps); - currentStep = siblingSteps.get(0); - currentSubSteps.clear(); - if (currentStep instanceof SequentialStep) { - final SequentialStep<«specificStepFQN»> currentStep_cast = (SequentialStep<«specificStepFQN»>) currentStep; - currentSubSteps.addAll(currentStep_cast.getSubSteps().stream().filter(p).collect(Collectors.toList())); - } - } - } else if (endingIndex == i && startingIndex != i) { - if (currentSubSteps.isEmpty()) { - // We need to explore the next sibling step - «specificStepFQN» tmp = currentStep; - currentStep = null; - while (currentStep == null) { - final int idx = siblingSteps.indexOf(tmp) + 1; - if (idx < siblingSteps.size()) { - currentStep = siblingSteps.get(idx); - if (currentStep instanceof SequentialStep) { - final SequentialStep<«specificStepFQN»> currentStep_cast = (SequentialStep<«specificStepFQN»>) currentStep; - currentSubSteps.addAll(currentStep_cast.getSubSteps().stream().filter(p).collect(Collectors.toList())); - } - } else { - if (searchPath.isEmpty()) { - throw new IllegalStateException("Unreachable state"); - } else { - tmp = searchPath.remove(0); - siblingSteps.clear(); - if (searchPath.isEmpty()) { - siblingSteps.addAll(rootSteps); - } else { - final «specificStepFQN» s = searchPath.get(0); - if (s instanceof SequentialStep) { - final SequentialStep<«specificStepFQN»> s_cast = (SequentialStep<«specificStepFQN»>) s; - siblingSteps.addAll((s_cast).getSubSteps().stream().filter(p).collect(Collectors.toList())); - } - } - } - } - } - } else { - // We need to explore the substeps in case one of them starts on i - searchPath.add(0, currentStep); - siblingSteps.clear(); - siblingSteps.addAll(currentSubSteps); - currentStep = siblingSteps.get(0); - currentSubSteps.clear(); - if (currentStep instanceof SequentialStep) { - final SequentialStep<«specificStepFQN»> currentStep_cast = (SequentialStep<«specificStepFQN»>) currentStep; - currentSubSteps.addAll(currentStep_cast.getSubSteps().stream().filter(p).collect(Collectors.toList())); - } - } - } else if (startingIndex == i) { - firstStepOfState = currentStep; - } - } - } - jumpBeforeStep(firstStepOfState); - } - } - - @Override - public boolean canStepBackInto() { - return stepBackIntoResult != null; - } - - @Override - public boolean canStepBackOver() { - return stepBackOverResult != null; - } - - @Override - public boolean canStepBackOut() { - return stepBackOutResult != null; - } - - @Override - public int getCurrentStateIndex() { - if (lastJumpIndex != -1) { - return lastJumpIndex; - } - return statesTrace.size() - 1; - } - - @Override - public List getCallStack() { - return callStack; - } - - private List<«specificStepFQN»> getStepsForStates(int startingState, int endingState) { - Predicate<«specificStepFQN»> predicate = s -> { - final int stepStartingState = getStartingIndex(s); - final int stepEndingState = getEndingIndex(s); - return (stepEndingState == -1 || stepEndingState >= startingState) - && stepStartingState <= endingState; - }; - return traceRoot.getRootStep().getSubSteps().stream().filter(predicate) - .collect(Collectors.toList()); - } - - @Override - public void notifyListeners() { - for (ITraceListener listener : listeners) { - listener.update(); - } - } - - @Override - public void addListener(ITraceListener listener) { - if (listener != null) { - listeners.add(listener); - } - } - - @Override - public void removeListener(ITraceListener listener) { - if (listener != null) { - listeners.remove(listener); - } - } - - @Override - public void update() { - valueTraces.clear(); - valueTraces.addAll(getAllValueTraces()); - canBackValueCache.clear(); - notifyListeners(); - } - - @Override - public Step getCurrentForwardStep() { - if (!callStack.isEmpty()) { - return callStack.get(callStack.size() - 1); - } - return null; - } - - @Override - public Step getCurrentBackwardStep() { - return stepBackOverResult; - } - - @Override - public Step getCurrentBigStep() { - return stepBackOutResult; - } - - @Override - public void jump(EObject o) { - int idx = -1; - if (o instanceof «stateFQN») { - idx = statesTrace.indexOf(o); - } else if (o instanceof «valueFQN») { - final «stateFQN» state = ((«valueFQN») o).getStatesNoOpposite().get(0); - idx = statesTrace.indexOf(state); - } - if (idx != -1) { - jump(idx); - } - } - - @SuppressWarnings("unchecked") - @Override - public void loadLastState() { - final int idx = statesTrace.size() - 1; - final List<«specificStepFQN»> steps = getStepsForStates(idx, idx); - «specificStepFQN» lastStep = null; - while (!steps.isEmpty()) { - lastStep = steps.get(steps.size() - 1); - steps.clear(); - if (lastStep instanceof SequentialStep) { - steps.addAll(((SequentialStep<«specificStepFQN»>) lastStep) - .getSubSteps()); - } - } - final int endingIndex = getEndingIndex(lastStep); - if (endingIndex == -1 || endingIndex == idx) { - jumpBeforeStep(lastStep); - } - } - - @Override - public boolean stepInto() { - if (stepIntoResult != null) { - jumpBeforeStep(stepIntoResult); - return true; - } - return false; - } - - @Override - public boolean stepOver() { - if (stepOverResult != null) { - jumpBeforeStep(stepOverResult); - return true; - } - return false; - } - - @Override - public boolean stepReturn() { - if (stepReturnResult != null) { - jumpBeforeStep(stepReturnResult); - return true; - } - return false; - } - - @Override - public boolean stepBackInto() { - if (stepBackIntoResult != null) { - jumpBeforeStep(stepBackIntoResult); - return true; - } - return false; - } - - @Override - public boolean stepBackOver() { - if (stepBackOverResult != null) { - jumpBeforeStep(stepBackOverResult); - return true; - } - return false; - } - - @Override - public boolean stepBackOut() { - if (stepBackOutResult != null) { - jumpBeforeStep(stepBackOutResult); - return true; - } - return false; - } - - @Override - public boolean isInReplayMode() { - return stepIntoResult != null; - } - - @Override - public void updateCallStack(Step step) { - if (step instanceof «specificStepFQN») { - «specificStepFQN» step_cast = («specificStepFQN») step; - final List<«specificStepFQN»> newPath = new ArrayList<>(); - newPath.add(step_cast); - EObject container = step.eContainer(); - while (container != null && container instanceof «specificStepFQN») { - newPath.add(0, («specificStepFQN») container); - container = container.eContainer(); - } - computeExplorerState(newPath); - update(); - } else { - throw new IllegalArgumentException("«className» expects specific steps and cannot handle this: "+step); - } - } - ''' - } - - private def String generateTraceManagerClass() { - - val body = - ''' - public class «className» implements ITraceExplorer { - «generateFields» - «generateConstructors» - «generateValueUtilities» - «generateStepUtilities» - «generateStepQueryMethods» - «generateGoToMethods» - «IF getTracedToExeUsed» - «generateExeToFromTracedGenericMethods» - «ENDIF» - «generateNavigationMethods» - «generateLoadTraceUtilities» - «generateAPI» - } - ''' - - return - ''' - package «packageQN»; - - «generateImports» - - «body» - ''' - } -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceExtractorGeneratorJava.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceExtractorGeneratorJava.xtend deleted file mode 100644 index 2e7195a87..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceExtractorGeneratorJava.xtend +++ /dev/null @@ -1,840 +0,0 @@ -package fr.inria.diverse.trace.plugin.generator - -import ecorext.Rule -import fr.inria.diverse.trace.commons.CodeGenUtil -import fr.inria.diverse.trace.commons.EcoreCraftingUtil -import fr.inria.diverse.trace.metamodel.generator.TraceMMGenerationTraceability -import fr.inria.diverse.trace.metamodel.generator.TraceMMStrings -import java.util.HashSet -import java.util.Set -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EClassifier -import org.eclipse.emf.ecore.EOperation -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EReference -import org.eclipse.emf.ecore.EStructuralFeature - -class TraceExtractorGeneratorJava { - - // Inputs - private val String className - private val String packageQN - private val EPackage traceMM - private val EPackage abstractSyntax - private val TraceMMGenerationTraceability traceability - private val Set refGenPackages - - // Shortcuts - private val EClass stateClass - private val EClass valueClass - private val EClass specificStepClass - - private val String stateFQN - private val String valueFQN - private val String specificStepFQN - private val String specificTraceFQN - private val String statesPackageFQN - - public def String getClassName() { - return className - } - - new(String languageName, String packageQN, EPackage traceMM, TraceMMGenerationTraceability traceability, - Set refGenPackages, boolean gemoc, EPackage abstractSyntax, boolean partialTraceManagement) { - this.traceMM = traceMM - this.className = languageName.replaceAll(" ", "").toFirstUpper + "Extractor" - this.packageQN = packageQN - this.traceability = traceability - this.refGenPackages = refGenPackages - this.abstractSyntax = abstractSyntax - stateClass = traceability.traceMMExplorer.stateClass - valueClass = traceability.traceMMExplorer.valueClass - statesPackageFQN = EcoreCraftingUtil.getBaseFQN(traceability.traceMMExplorer.statesPackage) + "." + traceability.traceMMExplorer.statesPackage.name.toFirstUpper + "Package" - specificStepClass = traceability.traceMMExplorer.specificStepClass - stateFQN = getJavaFQN(stateClass) - valueFQN = getJavaFQN(valueClass) - specificStepFQN = getJavaFQN(specificStepClass) - specificTraceFQN = getJavaFQN(traceability.traceMMExplorer.specificTraceClass) - } - - private def String getFQN(EStructuralFeature eFeature) { - return EcoreCraftingUtil.getBaseFQN(eFeature.EContainingClass) + "." + eFeature.name - } - - private def String getJavaFQN(EClassifier c) { - return getJavaFQN(c,false) - } - - private def String getJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { - return EcoreCraftingUtil.getJavaFQN(c,refGenPackages,enforcePrimitiveJavaClass) - } - - public def String generateCode() { - val String code = generateTraceManagerClass() - try { - return CodeGenUtil.formatJavaCode(code) - } catch (Throwable t) { - return code - } - } - - public static def String getBaseFQN(Rule r) { - val EOperation o = r.operation - val EClass c = r.containingClass - return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name - } - - private def Set getAllMutablePropertiesOf(EClass exeClass) { - val Set res = new HashSet - res.addAll(traceability.getMutablePropertiesOf(exeClass)) - res.addAll(exeClass.EAllSuperTypes.map[s|traceability.getMutablePropertiesOf(s)].flatten.toSet); - return res - } - - private def String generateImports() { - return - ''' - import java.util.ArrayList; - import java.util.Collection; - import java.util.Collections; - import java.util.HashMap; - import java.util.List; - import java.util.Map; - import java.util.Map.Entry; - import java.util.Optional; - import java.util.function.Function; - import java.util.function.Predicate; - import java.util.regex.Pattern; - import java.util.stream.Collectors; - - import org.eclipse.emf.common.util.Monitor; - import org.eclipse.emf.compare.Comparison; - import org.eclipse.emf.compare.Diff; - import org.eclipse.emf.compare.EMFCompare; - import org.eclipse.emf.compare.Match; - import org.eclipse.emf.compare.diff.DefaultDiffEngine; - import org.eclipse.emf.compare.diff.DiffBuilder; - import org.eclipse.emf.compare.diff.FeatureFilter; - import org.eclipse.emf.compare.diff.IDiffEngine; - import org.eclipse.emf.compare.diff.IDiffProcessor; - import org.eclipse.emf.compare.internal.spec.MatchSpec; - import org.eclipse.emf.compare.postprocessor.BasicPostProcessorDescriptorImpl; - import org.eclipse.emf.compare.postprocessor.IPostProcessor; - import org.eclipse.emf.compare.postprocessor.IPostProcessor.Descriptor.Registry; - import org.eclipse.emf.compare.postprocessor.PostProcessorDescriptorRegistryImpl; - import org.eclipse.emf.compare.scope.DefaultComparisonScope; - import org.eclipse.emf.compare.scope.IComparisonScope; - import org.eclipse.emf.ecore.EObject; - import org.eclipse.emf.ecore.EReference; - import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; - import org.eclipse.xtext.naming.QualifiedName; - - import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; - import fr.inria.diverse.trace.commons.model.trace.SequentialStep; - import fr.inria.diverse.trace.commons.model.trace.Step; - import fr.inria.diverse.trace.gemoc.api.ITraceExtractor; - ''' - } - - private def String generateFields() { - return - ''' - private «getJavaFQN(traceability.traceMMExplorer.specificTraceClass)» traceRoot; - - final private List> valueTraces = Collections.synchronizedList(new ArrayList<>()); - - private List<«stateFQN»> statesTrace; - - final private Map<«specificStepFQN», Integer> stepToStartingIndex = new HashMap<>(); - final private Map<«specificStepFQN», Integer> stepToEndingIndex = new HashMap<>(); - - final private DefaultDeclarativeQualifiedNameProvider nameProvider = new DefaultDeclarativeQualifiedNameProvider(); - - final private Map ignoredValueTraces = new HashMap<>(); - ''' - } - - private def String generateConstructors() { - return - ''' - public «className»() { - configureDiffEngine(); - } - ''' - } - - private def String generateStateUtilities() { - return - ''' - private final IPostProcessor customPostProcessor = new IPostProcessor() { - - private final Function getIdFunction = e -> e.eClass().getName(); - - @Override - public void postMatch(Comparison comparison, Monitor monitor) { - final List matches = new ArrayList<>(comparison.getMatches()); - final List treatedMatches = new ArrayList<>(); - matches.forEach(m1 -> { - matches.forEach(m2 -> { - if (m1 != m2 && !treatedMatches.contains(m2)) { - final EObject left; - final EObject right; - if (m1.getLeft() != null && m1.getRight() == null && m2.getLeft() == null - && m2.getRight() != null) { - left = m1.getLeft(); - right = m2.getRight(); - } else if (m2.getLeft() != null && m2.getRight() == null && m1.getLeft() == null - && m1.getRight() != null) { - left = m2.getLeft(); - right = m1.getRight(); - } else { - return; - } - final String leftId = getIdFunction.apply(left); - final String rightId = getIdFunction.apply(right); - if (leftId.equals(rightId)) { - comparison.getMatches().remove(m1); - comparison.getMatches().remove(m2); - final Match match = new MatchSpec(); - match.setLeft(left); - match.setRight(right); - comparison.getMatches().add(match); - } - } - }); - treatedMatches.add(m1); - }); - } - - @Override - public void postDiff(Comparison comparison, Monitor monitor) { - } - - @Override - public void postRequirements(Comparison comparison, Monitor monitor) { - } - - @Override - public void postEquivalences(Comparison comparison, Monitor monitor) { - } - - @Override - public void postConflicts(Comparison comparison, Monitor monitor) { - } - - @Override - public void postComparison(Comparison comparison, Monitor monitor) { - } - }; - - private List compareEObjects(EObject e1, EObject e2) { - - if (e1 == e2) { - return Collections.emptyList(); - } - - IPostProcessor.Descriptor descriptor = new BasicPostProcessorDescriptorImpl(customPostProcessor, - Pattern.compile(".*"), null); - - Registry registry = new PostProcessorDescriptorRegistryImpl(); - registry.put(customPostProcessor.getClass().getName(), descriptor); - - final EMFCompare compare; - - compare = EMFCompare.builder().setPostProcessorRegistry(registry).setDiffEngine(diffEngine).build(); - - final IComparisonScope scope = new DefaultComparisonScope(e1, e2, null); - final Comparison comparison = compare.compare(scope); - return comparison.getDifferences(); - } - - private void computeStateComparisonValue(final «stateFQN» state, - final List<«valueFQN»> values, - final Map<«stateFQN», Integer> stateToComparisonValue, - final List<«valueFQN»> observedValues, final int statesNb) { - Integer stateComparisonValue = stateToComparisonValue.get(state); - for (int i = 0; i < values.size(); i++) { - final «valueFQN» value = values.get(i); - int idx = -1; - for (int j = 0; j < observedValues.size(); j++) { - final «valueFQN» v1 = observedValues.get(j); - final «valueFQN» v2 = value; - if (v1.eClass() == v2.eClass() && compareEObjects(v1, v2).isEmpty()) { - idx = j; - break; - } - } - final int pow = (int) Math.pow(statesNb, i); - if (idx != -1) { - if (stateComparisonValue == null) { - stateComparisonValue = (idx + 1) * pow; - } else { - stateComparisonValue = stateComparisonValue + (idx + 1) * pow; - } - } else { - observedValues.add(value); - idx = observedValues.size(); - if (stateComparisonValue == null) { - stateComparisonValue = idx * pow; - } else { - stateComparisonValue = stateComparisonValue + idx * pow; - } - } - stateToComparisonValue.put(state, stateComparisonValue); - } - } - - @Override - public Collection> computeStateEquivalenceClasses() { - return computeStateEquivalenceClasses(statesTrace); - } - - @Override - public Collection> computeStateEquivalenceClasses(List states) { - final Map> statesMap = new HashMap<>(); - final Map<«stateFQN», List<«valueFQN»>> stateToValues = new HashMap<>(); - // First we build the map of states, grouped by their number of dimensions - // and we associate to each state the list of its values - states.stream().distinct().map(e -> («stateFQN») e).forEach(s -> { - final List<«valueFQN»> values = getAllStateValues(s); - stateToValues.put(s, values); - final int size = values.size(); - List<«stateFQN»> tmp = statesMap.get(size); - if (tmp == null) { - tmp = new ArrayList<>(); - statesMap.put(size, tmp); - } - tmp.add(s); - }); - final int statesNb = stateToValues.keySet().size(); - - final List<«valueFQN»> observedValues = new ArrayList<>(); - final Map<«stateFQN», Integer> stateToComparisonValue = new HashMap<>(); - - for (Entry> entry : statesMap.entrySet()) { - for («stateFQN» state : entry.getValue()) { - final List<«valueFQN»> values = stateToValues.get(state); - // Filling stateTocomparisonValue by side-effect - computeStateComparisonValue(state, values, stateToComparisonValue, observedValues, statesNb); - } - } - - final Map> accumulator = new HashMap<>(); - - stateToComparisonValue.entrySet().stream().forEach(e -> { - final «stateFQN» state = e.getKey(); - final Integer n = e.getValue(); - if (n != null) { - List equivalentStates = accumulator.get(n); - if (equivalentStates == null) { - equivalentStates = new ArrayList<>(); - accumulator.put(n, equivalentStates); - } - equivalentStates.add(state); - } - }); - return accumulator.values(); - } - - @Override - public boolean compareStates(EObject eObject1, EObject eObject2, boolean respectIgnored) { - final «stateFQN» state1; - final «stateFQN» state2; - - if (eObject1 instanceof «stateFQN») { - state1 = («stateFQN») eObject1; - } else { - return false; - } - - if (eObject2 instanceof «stateFQN») { - state2 = («stateFQN») eObject2; - } else { - return false; - } - - final List<«valueFQN»> values1 = getAllStateValues(state1); - final List<«valueFQN»> values2 = getAllStateValues(state2); - - if (values1.size() != values2.size()) { - return false; - } - - final List> result = new ArrayList<>(); - for (int i = 0; i < values1.size(); i++) { - if (!respectIgnored || !isValueTraceIgnored(i)) { - final «valueFQN» value1 = values1.get(i); - final «valueFQN» value2 = values2.get(i); - if (value1 != value2) { - final List diffs = compareEObjects(value1, value2); - if (!diffs.isEmpty()) { - result.add(diffs); - } - } - } - } - - return result.isEmpty(); - } - - public boolean compareSteps(EObject eObject1, EObject eObject2) { - final «specificStepFQN» step1; - final «specificStepFQN» step2; - - if (eObject1 instanceof «specificStepFQN») { - step1 = («specificStepFQN») eObject1; - } else { - return false; - } - - if (eObject2 instanceof «specificStepFQN») { - step2 = («specificStepFQN») eObject2; - } else { - return false; - } - - if (step1.eClass() == step2.eClass()) { - return true; - } - - return false; - } - - public boolean compareStatesWithSteps(EObject eObject1, EObject eObject2, boolean respectIgnored) { - final «stateFQN» state1; - final «stateFQN» state2; - - if (eObject1 instanceof «stateFQN») { - state1 = («stateFQN») eObject1; - } else { - return false; - } - - if (eObject2 instanceof «stateFQN») { - state2 = («stateFQN») eObject2; - } else { - return false; - } - - if (compareStates(state1, state2, respectIgnored)) { - final List<«specificStepFQN»> endedSteps1 = state1.getEndedSteps(); - final List<«specificStepFQN»> startedSteps1 = state1.getStartedSteps(); - final List<«specificStepFQN»> endedSteps2 = state2.getEndedSteps(); - final List<«specificStepFQN»> startedSteps2 = state2.getStartedSteps(); - if (endedSteps1.size() == endedSteps2.size() && - startedSteps1.size() == startedSteps2.size()) { - boolean result = true; - for (int i = 0; i < endedSteps1.size(); i++) { - final «specificStepFQN» endedStep1 = endedSteps1.get(i); - final «specificStepFQN» endedStep2 = endedSteps2.get(i); - if (!compareSteps(endedStep1, endedStep2)) { - result = false; - break; - } - } - if (!result) { - return false; - } - for (int i = 0; i < startedSteps1.size(); i++) { - final «specificStepFQN» startedStep1 = startedSteps1.get(i); - final «specificStepFQN» startedStep2 = startedSteps2.get(i); - if (!compareSteps(startedStep1, startedStep2)) { - result = false; - break; - } - } - return result; - } else { - return false; - } - } else { - return false; - } - } - - public boolean compareTraces(EObject eObject1, EObject eObject2, boolean respectIgnored) { - final «specificTraceFQN» trace1; - final «specificTraceFQN» trace2; - - if (eObject1 instanceof «specificTraceFQN») { - trace1 = («specificTraceFQN») eObject1; - } else { - return false; - } - - if (eObject2 instanceof «specificTraceFQN») { - trace2 = («specificTraceFQN») eObject2; - } else { - return false; - } - - final List<«stateFQN»> states1 = trace1.getStatesTrace(); - final List<«stateFQN»> states2 = trace2.getStatesTrace(); - - if (states1.size() != states2.size()) { - return false; - } - - boolean result = true; - - for (int i = 0; i < states1.size(); i++) { - final «stateFQN» state1 = states1.get(i); - final «stateFQN» state2 = states2.get(i); - if (!compareStatesWithSteps(state1, state2, respectIgnored)) { - result = false; - break; - } - } - - return result; - } - - - private List<«valueFQN»> getAllStateValues(«stateFQN» state) { - final List> traces = new ArrayList<>(); - final List<«valueFQN»> result = new ArrayList<>(); - «FOR mutClass : traceability.allMutableClasses.filter[c|!c.isAbstract].sortBy[name]» - «val traced = traceability.getTracedClass(mutClass)» - «val mutProps = getAllMutablePropertiesOf(mutClass).sortBy[FQN]» - «IF !mutProps.empty» - for («getJavaFQN(traced)» tracedObject : ((«getJavaFQN(traceability.traceMMExplorer.specificTraceClass)») state.eContainer()).«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_createTraceClassToTracedClass(traced))») { - «FOR p : mutProps» - «val EReference ptrace = traceability.getTraceOf(p)» - traces.add(tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)»); - «ENDFOR» - } - «ENDIF» - «ENDFOR» - for (int i = 0; i < traces.size(); i++) { - if (!isValueTraceIgnored(i)) { - final List trace = traces.get(i); - for («valueFQN» value : trace) { - if (value.getStatesNoOpposite().contains(state)) { - result.add(value); - break; - } - } - } - } - return result; - } - ''' - } - - private def String generateValueUtilities() { - return - ''' - private IDiffEngine diffEngine = null; - - private void configureDiffEngine() { - IDiffProcessor diffProcessor = new DiffBuilder(); - diffEngine = new DefaultDiffEngine(diffProcessor) { - @Override - protected FeatureFilter createFeatureFilter() { - return new FeatureFilter() { - @Override - protected boolean isIgnoredReference(Match match, EReference reference) { - final String name = reference.getName(); - return name.equals("parent") || name.equals("states") || name.equals("statesNoOpposite"); - } - }; - } - }; - } - - private List> getAllValueTraces() { - final List> result = new ArrayList<>(); - «FOR mutClass : traceability.allMutableClasses.filter[c|!c.isAbstract].sortBy[name]» - «val traced = traceability.getTracedClass(mutClass)» - «val mutProps = getAllMutablePropertiesOf(mutClass).sortBy[FQN]» - «IF !mutProps.empty» - for («getJavaFQN(traced)» tracedObject : traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_createTraceClassToTracedClass(traced))») { - «FOR p : mutProps» - «val EReference ptrace = traceability.getTraceOf(p)» - result.add(tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)»); - «ENDFOR» - } - «ENDIF» - «ENDFOR» - return result; - } - - private ValueWrapper getValueWrapper(«valueFQN» value, int valueIndex) { - List<«stateFQN»> states = value.getStatesNoOpposite(); - «stateFQN» firstState = states.get(0); - final int firstStateIndex = statesTrace.indexOf(firstState); - final int lastStateIndex = (int) (firstStateIndex + states.stream().distinct().count() - 1); - return new ValueWrapper(value, firstStateIndex, lastStateIndex, valueIndex); - } - - private «valueFQN» getValueAt(int traceIndex, int stateIndex) { - «valueFQN» result = null; - if (traceIndex >= 0 && traceIndex < valueTraces.size()) { - final List valueTrace = valueTraces.get(traceIndex); - final «stateFQN» state = statesTrace.get(stateIndex); - for («valueFQN» value : valueTrace) { - if (value.getStatesNoOpposite().contains(state)) { - result = value; - break; - } - } - } - return result; - } - - @Override - public ValueWrapper getValueWrapper(int traceIndex, int stateIndex) { - «valueFQN» value = getValueAt(traceIndex, stateIndex); - if (value == null) { - return null; - } - List<«stateFQN»> states = value.getStatesNoOpposite(); - «stateFQN» firstState = states.get(0); - final int firstStateIndex = statesTrace.indexOf(firstState); - final int lastStateIndex = (int) (firstStateIndex + states.stream().distinct().count() - 1); - return new ValueWrapper(value, firstStateIndex, lastStateIndex, traceIndex); - } - ''' - } - - private def generateStepUtilities() { - return - ''' - private int getStartingIndex(«specificStepFQN» step) { - return stepToStartingIndex.computeIfAbsent(step, s -> { - return statesTrace.indexOf(s.getStartingState()); - }); - } - - private int getEndingIndex(«specificStepFQN» step) { - if (step.getEndingState() != null) { - return stepToEndingIndex.computeIfAbsent(step, s -> { - return statesTrace.indexOf(s.getEndingState()); - }); - } - return -1; - } - ''' - } - - private def String generateLoadTraceUtilities() { - return - ''' - public void loadTrace(«getJavaFQN(traceability.traceMMExplorer.specificTraceClass)» root) { - traceRoot = root; - statesTrace = traceRoot.getStatesTrace(); - valueTraces.addAll(getAllValueTraces()); - } - ''' - } - - private def String generateAPI() { - return - ''' - @Override - public List getStepWrappers(int startingState, int endingState) { - Predicate<«specificStepFQN»> predicate = s -> { - final int stepStartingState = getStartingIndex(s); - final int stepEndingState = getEndingIndex(s); - return (stepEndingState == -1 || stepEndingState >= startingState) - && stepStartingState <= endingState; - }; - return traceRoot.getRootStep().getSubSteps().stream().filter(predicate) - .map(s -> getStepWrapper(s)) - .collect(Collectors.toList()); - } - - private boolean isStateBreakable(«stateFQN» state) { - «IF !traceability.bigStepClasses.empty» - final boolean b = state.getStartedSteps().size() == 1; - if (b) { - «specificStepFQN» s = state.getStartedSteps().get(0); - return - !(«FOR bigStepClass : traceability.bigStepClasses.sortBy[name] SEPARATOR "||"» - s instanceof «getJavaFQN(bigStepClass)»_ImplicitStep - «ENDFOR»); - } - «ENDIF» - return true; - } - - @Override - public StateWrapper getStateWrapper(int stateIndex) { - if (stateIndex > -1 && stateIndex < statesTrace.size()) { - final «stateFQN» state = statesTrace.get(stateIndex); - return new StateWrapper(state, stateIndex, isStateBreakable(state)); - } - return null; - } - - @Override - public List getStateWrappers(int start, int end) { - final List result = new ArrayList<>(); - final int startStateIndex = Math.max(0, start); - final int endStateIndex = Math.min(statesTrace.size() - 1, end); - - for (int i = startStateIndex; i < endStateIndex + 1; i++) { - final «stateFQN» state = statesTrace.get(i); - result.add(new StateWrapper(state, i, isStateBreakable(state))); - } - - return result; - } - - @Override - public List getValueWrappers(int valueTraceIndex, int start, int end) { - final List result = new ArrayList<>(); - - if (valueTraceIndex < valueTraces.size()) { - final List valueTrace = valueTraces.get(valueTraceIndex); - for («valueFQN» value : valueTrace) { - final int currentValueIndex = valueTrace.indexOf(value); - ValueWrapper wrapper = getValueWrapper(value, currentValueIndex); - if (wrapper.firstStateIndex < end && wrapper.lastStateIndex > start) { - result.add(wrapper); - } - } - } - - return result; - } - - @SuppressWarnings("unchecked") - @Override - public StepWrapper getStepWrapper(Step step) { - if (step instanceof «specificStepFQN») { - final «specificStepFQN» step_cast = («specificStepFQN») step; - final int startingIndex = getStartingIndex(step_cast); - final int endingIndex = getEndingIndex(step_cast); - final List subSteps = new ArrayList<>(); - if (step_cast instanceof SequentialStep) { - subSteps.addAll(((SequentialStep<«specificStepFQN»>) step_cast).getSubSteps()); - } - return new StepWrapper(step, startingIndex, endingIndex, subSteps); - } - return null; - } - - @Override - public int getNumberOfTraces() { - return valueTraces.size(); - } - - @Override - public int getStatesTraceLength() { - return statesTrace.size(); - } - - @Override - public int getValuesTraceLength(int traceIndex) { - if (traceIndex > -1 && traceIndex < valueTraces.size()) { - List trace = valueTraces.get(traceIndex); - return trace.size(); - } - return -1; - } - - @Override - public String getValueLabel(int traceIndex) { - String attributeName = ""; - if (traceIndex > -1 && traceIndex < valueTraces.size()) { - final List valueTrace = valueTraces.get(traceIndex); - if (valueTrace.isEmpty()) { - return ""; - } - final «valueFQN» value = valueTrace.get(0); - final EObject container = value.eContainer(); - final List attributes = container.eClass().getEAllReferences().stream() - .filter(r -> r.getName().endsWith("Sequence")) - .map(r->r.getName().substring(0, r.getName().length() - 8)) - .collect(Collectors.toList()); - if (!attributes.isEmpty()) { - attributes.removeIf(s->!value.getClass().getName().contains("_" + s + "_")); - attributeName = attributes.get(0); - } - final Optional originalObject = container.eClass().getEAllReferences() - .stream().filter(r -> r.getName().equals("originalObject")) - .findFirst(); - if (originalObject.isPresent()) { - final Object o = container.eGet(originalObject.get()); - if (o instanceof EObject) { - final EObject eObject = (EObject) o; - final QualifiedName qname = nameProvider.getFullyQualifiedName(eObject); - if (qname == null) { - return attributeName + " (" + eObject.toString() + ")"; - } else { - return attributeName + " (" + qname.toString() + " :" + eObject.eClass().getName() + ")"; - } - } - } - } - return attributeName; - } - - @Override - public String getStateDescription(int stateIndex) { - String result = ""; - for (int i = 0; i < valueTraces.size(); i++) { - if (!isValueTraceIgnored(i)) { - result += (i == 0 ? "" : "\n") + getValueDescription(i, stateIndex); - } - } - return result; - } - - @Override - public String getValueDescription(int traceIndex, int stateIndex) { - final EObject value = getValueAt(traceIndex, stateIndex); - if (value == null) { - return null; - } - final String description = getValueLabel(traceIndex) + " : " + value; - return description; - } - - @Override - public LaunchConfiguration getLaunchConfiguration() { - return traceRoot.getLaunchconfiguration(); - } - - @Override - public void ignoreValueTrace(int trace, boolean ignore) { - ignoredValueTraces.put(trace, ignore); - } - - @Override - public boolean isValueTraceIgnored(int trace) { - Boolean result = ignoredValueTraces.get(trace); - return result != null && result; - } - - - @Override - public void update() { - valueTraces.clear(); - valueTraces.addAll(getAllValueTraces()); - } - ''' - } - - private def String generateTraceManagerClass() { - return - ''' - package «packageQN»; - - «generateImports» - - public class «className» implements ITraceExtractor { - - «generateFields» - «generateConstructors» - «generateValueUtilities» - «generateStateUtilities» - «generateStepUtilities» - «generateLoadTraceUtilities» - «generateAPI» - } - ''' - } -} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceManagerGeneratorJava.xtend b/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceManagerGeneratorJava.xtend deleted file mode 100644 index 87b08092a..000000000 --- a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/src/fr/inria/diverse/trace/plugin/generator/TraceManagerGeneratorJava.xtend +++ /dev/null @@ -1,1593 +0,0 @@ -package fr.inria.diverse.trace.plugin.generator - -import ecorext.ClassExtension -import ecorext.Rule -import fr.inria.diverse.trace.commons.CodeGenUtil -import fr.inria.diverse.trace.commons.EcoreCraftingUtil -import fr.inria.diverse.trace.commons.tracemetamodel.StepStrings -import fr.inria.diverse.trace.metamodel.generator.TraceMMGenerationTraceability -import fr.inria.diverse.trace.metamodel.generator.TraceMMStrings -import java.util.ArrayList -import java.util.Collection -import java.util.HashMap -import java.util.HashSet -import java.util.List -import java.util.Map -import java.util.Set -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage -import org.eclipse.emf.ecore.EAttribute -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EClassifier -import org.eclipse.emf.ecore.EOperation -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EReference -import org.eclipse.emf.ecore.EStructuralFeature -import fr.inria.diverse.trace.commons.model.trace.TracePackage - -class TraceManagerGeneratorJava { - - // Inputs - private val String className - private val String packageQN - private val EPackage traceMM - private val EPackage abstractSyntax - private val TraceMMGenerationTraceability traceability - private val Set refGenPackages - private val boolean gemoc - private val boolean partialTraceManagement - - // Transient - private boolean getExeToTracedUsed = false - private boolean getTracedToExeUsed = false - - - // Shortcuts - private val EClass stateClass - - public def String getClassName() { - return className - } - - new(String languageName, String packageQN, EPackage traceMM, TraceMMGenerationTraceability traceability, - Set refGenPackages, boolean gemoc, EPackage abstractSyntax, boolean partialTraceManagement) { - this.traceMM = traceMM - this.className = languageName.replaceAll(" ", "").toFirstUpper + "Manager" - this.packageQN = packageQN - this.traceability = traceability - this.refGenPackages = refGenPackages - this.gemoc = gemoc - this.abstractSyntax = abstractSyntax - stateClass = traceability.traceMMExplorer.stateClass - this.partialTraceManagement=partialTraceManagement - } - - private def String getActualFQN(EClass c, Rule r) { - val EOperation o = r.operation - return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name - } - - private def String getFQN(EStructuralFeature eFeature) { - return EcoreCraftingUtil.getBaseFQN(eFeature.EContainingClass) + "." + eFeature.name - } - - private static def boolean isNotSuperTypeOf(EClass c, Collection eclasses) { - for (eclass : eclasses) { - if (eclass.EAllSuperTypes.contains(c)) - return false - } - return true - } - - private def String getTracedJavaFQN(EClassifier c) { - return getTracedJavaFQN(c,false) - } - - private def String getTracedJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { - if (c instanceof EClass) { - val tracedClass = traceability.getTracedClass(c) - if (tracedClass != null) - return getJavaFQN(traceability.getTracedClass(c),enforcePrimitiveJavaClass) - else - return getJavaFQN(c,enforcePrimitiveJavaClass) - } else { - return getJavaFQN(c,enforcePrimitiveJavaClass) - } - } - - private def String getJavaFQN(EClassifier c) { - return getJavaFQN(c,false) - } - - private def String getJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { - return EcoreCraftingUtil.getJavaFQN(c,refGenPackages,enforcePrimitiveJavaClass) - } - - private static def List partialOrderSort (List eclasses) { - val List result = new ArrayList - for (ci : eclasses) { - if (result.isEmpty) - result.add(ci) - else { - var boolean found = false - for (var int i = 0; i < result.size && !found; i++) { - val Set followings = result.subList(i, result.size).toSet - if (ci.isNotSuperTypeOf(followings)) { - result.add(0, ci) - found = true - } - } - - if (!found) - result.add(ci) - } - } - return result - - } - - /* - private def String getEOperationGetCode (Rule r) { - val o = r.operation - val eclass = r.containingClass - val epackage = eclass.EPackage - val res = '''«getJavaFQN(epackage)».«epackage.name.toFirstUpper»Package.eINSTANCE.get«eclass.name»__«o.name.toFirstUpper»()''' - return res - } -*/ - - - - public def String generateCode() { - val String code = generateTraceManagerClass() - try { - return CodeGenUtil.formatJavaCode(code) - } catch (Throwable t) { - return code - } - - } - - private Map counters = new HashMap - - private def String uniqueVar(String s) { - if (!counters.containsKey(s)) { - counters.put(s, 0) - } - return s + counters.get(s) - } - - private def void incVar(String s) { - if (!counters.containsKey(s)) { - counters.put(s, 0) - } - counters.put(s, counters.get(s) + 1) - } - - public static def String getBaseFQN(Rule r) { - val EOperation o = r.operation - val EClass c = r.containingClass - return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name - } - - private def EClassifier getEventParamRuntimeType(EStructuralFeature f) { - var EClass res = null - if (f instanceof EAttribute) { - // TODO - } else if (f instanceof EReference) { - val potentialRealRuntimeClass = traceability.getRealMutableClass(f.EReferenceType) - if (potentialRealRuntimeClass != null) { - - // TODO here in the general case we need to find the exe class - res = potentialRealRuntimeClass - } else { - - // TODO same here - res = f.EReferenceType - } - } - return res - } - - private def String stringGetterTracedValue(String javaVarName, EStructuralFeature p) { - if (p instanceof EReference && traceability.hasTracedClass(p.EType as EClass)) - return '''((«getJavaFQN(traceability.getTracedClass(p.EType as EClass))»)exeToTraced.get(«javaVarName».«EcoreCraftingUtil.stringGetter( - p)»))''' - else - return javaVarName + "." + EcoreCraftingUtil.stringGetter(p) - } - - private def String stringGetterExeValue(String javaVarName, EStructuralFeature p) { - return ''' - «IF (p instanceof EReference && traceability.hasTracedClass(p.EType as EClass))» - - ««« If many elements are in this fields, we have to cast the element with a collection - «IF p.many» - (Collection) - «ELSE» - («getJavaFQN(p.EType, true)») - «ENDIF» - «getTracedToExeMethodName»(«javaVarName».«EcoreCraftingUtil.stringGetter(p)») - «ELSE» - «javaVarName».«EcoreCraftingUtil.stringGetter(p)» - «ENDIF»''' - } - - private def Set getConcreteSubtypesTraceClassOf(EClass tracedClass) { - val Set result = new HashSet() - result.addAll(this.traceMM.eAllContents.filter(EClass).filter [ c | - !c.abstract && c.EAllSuperTypes.contains(tracedClass) - ].toSet) - if (!tracedClass.abstract) - result.add(tracedClass) - return result - } - - private def Set getAllMutablePropertiesOf(EClass exeClass) { - val Set res = new HashSet - res.addAll(traceability.getMutablePropertiesOf(exeClass)) - res.addAll(exeClass.EAllSuperTypes.map[s|traceability.getMutablePropertiesOf(s)].flatten.toSet); - return res - } - - private def Set getAllMutableClasses() { - return traceability.allMutableClasses.filter[c|!c.allMutablePropertiesOf.empty].toSet - } - - - private def String generateImports() { - return ''' -import fr.inria.diverse.trace.api.IValueTrace; -import fr.inria.diverse.trace.api.impl.GenericValueTrace; - -import java.util.LinkedList; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Deque; -import java.util.HashMap; -import java.util.HashSet; -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.EObject; -import org.eclipse.emf.ecore.EReference; -«««import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.common.util.TreeIterator; -import org.eclipse.emf.common.util.URI; - ''' - } - - private def String generateFields() { - return ''' - - private «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)» traceRoot; - private fr.inria.diverse.trace.commons.model.trace.MSEModel mseModel; - private Resource executedModel; - - ««« TODO one map per type? So that we can completely stop manipulationg eobjects - private Map exeToTraced; - - private «getJavaFQN(traceability.traceMMExplorer.getStateClass)» lastState; - private List traces; - - private Resource traceResource; - private Deque<«getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)»> context = new LinkedList<«getJavaFQN( - traceability.traceMMExplorer.getSpecificStepClass)»>(); - ''' - } - - private def String generateConstructor() { - return ''' - public «className» (Resource exeModel, Resource traceResource) { - this.traceResource = traceResource; - this.executedModel = exeModel; - this.traces = new ArrayList(); - }''' - } - - - private def String getExeToTracedMethodName() { - getExeToTracedUsed = true - return "getExeToTraced" - } - - private def String getTracedToExeMethodName() { - getTracedToExeUsed = true - return "getTracedToExe" - } - - - private def String generateExeToFromTracedGenericMethods() { - return ''' - «IF getExeToTracedUsed» - private Collection «getExeToTracedMethodName»(Collection exeObjects) { - Collection result = new ArrayList(); - for(EObject exeObject : exeObjects) { - storeAsTracedObject(exeObject); - result.add(exeToTraced.get(exeObject)); - } - return result; - } - «ENDIF» - - «IF getTracedToExeUsed» - private Collection «getTracedToExeMethodName»( - Collection tracedObjects) { - Collection result = new ArrayList(); - for (EObject tracedObject : tracedObjects) { - result.add(«getTracedToExeMethodName»(tracedObject)); - } - return result; - } - - private EObject «getTracedToExeMethodName»(EObject tracedObject) { - for (EObject key : exeToTraced.keySet()) { - if (exeToTraced.get(key) == tracedObject) - return key; - } - return null; - } - «ENDIF» - ''' - } - - private def String generateStoreAsTracedMethods() { - return ''' «FOR mutClass : traceability.allMutableClasses.filter[c|!c.isAbstract].sortBy[name]» - -private void storeAsTracedObject(«getJavaFQN(mutClass)» o) { - «val traced = traceability.getTracedClass(mutClass)» - - // First we find the traced object, and we create it if required - «getJavaFQN(traced)» tracedObject; - if (!exeToTraced.containsKey(o)) { - tracedObject = «EcoreCraftingUtil.stringCreate(traced)»; - «val Set origRefs1 = traceability.getRefs_originalObject(traced)» - «FOR EReference origRef : origRefs1.sortBy[name]» - tracedObject.«EcoreCraftingUtil.stringSetter(origRef, "o")»; - «ENDFOR» - exeToTraced.put(o, tracedObject); - traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_createTraceClassToTracedClass(traced))».add(tracedObject); - - «FOR p : getAllMutablePropertiesOf(mutClass).sortBy[FQN]» - «val EReference ptrace = traceability.getTraceOf(p)» - traces.add(new GenericValueTrace(tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)», this)); - «ENDFOR» - } - } - - «ENDFOR» -«IF getExeToTracedUsed» -private void storeAsTracedObject(EObject o) { - «FOR mutClass : partialOrderSort(traceability.allMutableClasses.filter[c|!c.isAbstract].toList.sortBy[name]) SEPARATOR "\n else "» -if (o instanceof «getJavaFQN(mutClass)») { - storeAsTracedObject((«getJavaFQN(mutClass)»)o); -} -«ENDFOR» -} -«ENDIF» -''' - } - - private def String stringFeatureID(EStructuralFeature p) { - val containingClass = if (p.eContainer instanceof EClass) p.eContainer as EClassifier else (p.eContainer as ClassExtension).extendedExistingClass - return EcoreCraftingUtil.stringFeatureID(p,containingClass,refGenPackages) - } - - private def String generateGetAllResourcesMethod() { - return ''' - - private Set getAllExecutedModelResources() { - Set allResources = new HashSet<>(); - allResources.add(executedModel); - «IF gemoc» - allResources.addAll(org.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(executedModel)); - «ENDIF» - return allResources; - } - - ''' - } - - - private def String generateAddInitialStateMethod() { - return ''' - - private void addInitialState() { - if (lastState == null) { - // Creation of the initial state - Set allResources = getAllExecutedModelResources(); - lastState = «EcoreCraftingUtil.stringCreate(stateClass)»; - for (Resource r : allResources) { - for (TreeIterator i = r.getAllContents(); i.hasNext();) { - EObject o = i.next(); - «FOR c : partialOrderSort(getAllMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList) SEPARATOR "else"» - - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - addNewObjectToState(o_cast, lastState); - } - «ENDFOR» - } - } - this.traceRoot.getStatesTrace().add(lastState); - }} - ''' - } - - private def String generateAddNewObjectToStateMethods() { - val stateClass = traceability.traceMMExplorer.stateClass - return ''' - - «FOR c : partialOrderSort(getAllMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList)» - «val traced = traceability.getTracedClass(c)» - - «IF getAllMutablePropertiesOf(c).exists[p|p instanceof EReference && p.many]» - @SuppressWarnings("unchecked") - «ENDIF» - private void addNewObjectToState(«getJavaFQN(c)» o_cast, «getJavaFQN(stateClass)» newState) { - storeAsTracedObject(o_cast); - «getJavaFQN(traced)» traced = («getJavaFQN(traced)») exeToTraced.get(o_cast); - - «FOR p : getAllMutablePropertiesOf(c).sortBy[FQN]» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass valueClass = ptrace.getEType as EClass» - «val EReference pvalues = traceability.getStateClassToValueClass(p)» - - // Creation of the first value of the field «p.name» - «IF traceability.allMutableClasses.contains(p.EType)» - «IF p.many» - for(«getJavaFQN(p.EType)» aValue : o_cast.«EcoreCraftingUtil.stringGetter(p)») { - storeAsTracedObject(aValue); - } - «ELSE» - storeAsTracedObject(o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - «ENDIF» - «getJavaFQN(valueClass)» firstValue_«p.name» = «EcoreCraftingUtil.stringCreate(valueClass)»; - «IF p.many» - «IF p instanceof EReference» - firstValue_«p.name».«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) «getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)»)); - «ELSE» - firstValue_«p.name».«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - «ELSE» - firstValue_«p.name».«EcoreCraftingUtil.stringSetter(p,stringGetterTracedValue("o_cast", p))»; - «ENDIF» - traced.«EcoreCraftingUtil.stringGetter(ptrace)».add(firstValue_«p.name»); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».add(firstValue_«p.name»); - «ENDFOR» - } - «ENDFOR» - - - - ''' - } - -private def String generateAddStateUsingListenerMethods() { - - val stateClass = traceability.traceMMExplorer.stateClass - val newClassesNotEmpty = partialOrderSort(traceability.getNewClasses.filter[c|!c.EStructuralFeatures.empty].toList) - val allConcreteMutableClasses = partialOrderSort(getAllMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList) - val mutableClassesWithNonCollectionMutableFields = allConcreteMutableClasses.filter[c|getAllMutablePropertiesOf(c).exists[p|!p.many]] - val mutableClassesWithCollectionMutableFields = allConcreteMutableClasses.filter[c|getAllMutablePropertiesOf(c).exists[p| p.many]] - return ''' - - private «getJavaFQN(stateClass)» copyState(«getJavaFQN(stateClass)» oldState) { - «getJavaFQN(stateClass)» newState = «EcoreCraftingUtil.stringCreate(stateClass)»; - «FOR c : getAllMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList» - «FOR p : getAllMutablePropertiesOf(c).sortBy[FQN]» - newState.«EcoreCraftingUtil.stringGetter(traceability.getStateClassToValueClass(p))».addAll(oldState.«EcoreCraftingUtil.stringGetter(traceability.getStateClassToValueClass(p))»); - «ENDFOR» - «ENDFOR» - return newState; - } - - @Override - public void addState(Set changes) { - - - if (lastState == null) { - addInitialState(); - } ««« end if laststate null - - - if (!changes.isEmpty()) { - - boolean stateChanged = false; - - // We start by a (shallow) copy of the last state - // But we will have to rollback a little by replacing values that changed - «getJavaFQN(stateClass)» newState = copyState(lastState); - - for (org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange modelChange : changes) { - EObject o = modelChange.getChangedObject(); - - - - «IF !newClassesNotEmpty.empty» - // We only look at constructable objects that have mutable fields - // Here we have nothing to rollback, just a new object to add - if (modelChange instanceof org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NewObjectModelChange) { - stateChanged = true; - - ««« Loop over all classes that may be constructed and that have mutable fields - «FOR c : newClassesNotEmpty» - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - addNewObjectToState(o_cast, newState); - } ««« end if instanceof - «ENDFOR» - - } ««« end if NewObjectModelChange - - - - // We only look at constructable objects that have mutable fields - // Here we must rollback to remove the values of the removed object from the copied state - else if (modelChange instanceof org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.RemovedObjectModelChange) { - stateChanged = true; - - ««« Loop over all classes that may be constructed and that have mutable fields - «FOR c : newClassesNotEmpty» - «val traced = traceability.getTracedClass(c)» - if (o instanceof «getJavaFQN(c)») { - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - «getJavaFQN(traced)» traced = («getJavaFQN(traced)») exeToTraced.get(o_cast); - - ««« Loop over the fields of this class, which are all mutable - «FOR p : c.EStructuralFeatures» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EReference pvalues = traceability.getStateClassToValueClass(p)» - newState.«EcoreCraftingUtil.stringGetter(pvalues)».remove(traced.«EcoreCraftingUtil.stringGetter(ptrace)».get(traced.«EcoreCraftingUtil.stringGetter(ptrace)».size()-1)); - «ENDFOR» - } ««« end if instanceof - «ENDFOR» - } ««« end if RemovedObjectModelChange - «ENDIF» - - - - «IF !mutableClassesWithNonCollectionMutableFields.empty» - // Here we must look at non-collection mutable fields - // We must rollback the last values from the copied state, and add new values as well - // ie. mix of remove and new - «IF !newClassesNotEmpty.empty» else «ENDIF» if (modelChange instanceof org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange) { - stateChanged = true; - - org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange modelChange_cast = (org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange) modelChange; - «EStructuralFeature.canonicalName » p = modelChange_cast.getChangedField(); - - - «FOR c : mutableClassesWithNonCollectionMutableFields SEPARATOR "\n else "» - «val nonCollectionMutableFields = getAllMutablePropertiesOf(c).filter[p|!p.many]» - «val traced = traceability.getTracedClass(c)» - - if (o instanceof «getJavaFQN(c)») { - - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - - «FOR p : nonCollectionMutableFields » - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass valueClass = ptrace.getEType as EClass» - «val EReference pvalues = traceability.getStateClassToValueClass(p)» - - if (p.getFeatureID() == «stringFeatureID(p)») { - - // Rollback: we remove the last value of this field from the new state - «getJavaFQN(traced)» traced = («getJavaFQN(traced)») exeToTraced.get(o); - «getJavaFQN(valueClass)» lastValue = traced.«EcoreCraftingUtil.stringGetter(ptrace)».get(traced.«EcoreCraftingUtil.stringGetter(ptrace)».size()-1); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».remove(lastValue); - - // And we create a proper new value - «IF traceability.allMutableClasses.contains(p.EType)» - storeAsTracedObject(o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - «getJavaFQN(valueClass)» newValue = «EcoreCraftingUtil.stringCreate(valueClass)»; - newValue.«EcoreCraftingUtil.stringSetter(p,stringGetterTracedValue("o_cast", p))»; - traced.«EcoreCraftingUtil.stringGetter(ptrace)».add(newValue); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».add(newValue); - } ««« end if feature id - - «ENDFOR» - - } ««« end if instance of - «ENDFOR» - - - } ««« end if NonCollectionFieldModelChange - «ENDIF» - - - «IF !mutableClassesWithCollectionMutableFields.empty» - // Here we look at collection mutable fields - // We must first manually find out if the collection changed... - // If it changed we must rollback the last values from the copied state, and add new values as well - «IF !newClassesNotEmpty.empty || !mutableClassesWithNonCollectionMutableFields.empty » else «ENDIF» if (modelChange instanceof org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange) { - org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange modelChange_cast = (org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange) modelChange; - - - «EStructuralFeature.canonicalName » p = modelChange_cast.getChangedField(); - - «FOR c : mutableClassesWithCollectionMutableFields SEPARATOR "\n else "» - «val collectionMutableFields = getAllMutablePropertiesOf(c).filter[p|p.many]» - «val traced = traceability.getTracedClass(c)» - - - if (o instanceof «getJavaFQN(c)») { - - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - «getJavaFQN(traced)» tracedObject = («getJavaFQN(traced)») exeToTraced.get(o_cast); - - «FOR p : collectionMutableFields » - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass valueClass = ptrace.getEType as EClass» - «val EReference pvalues = traceability.getStateClassToValueClass(p)» - - - if (p.getFeatureID() == «stringFeatureID(p)») { - - // We compare the last collection in the value sequence, and the current one in the potentially changed object - List<«getJavaFQN(valueClass)»> valueSequence = tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)»; - «getJavaFQN(valueClass)» previousValue = null; - if (!valueSequence.isEmpty()) - previousValue = valueSequence.get(valueSequence.size() - 1); - - ««« If instances of new class, we have to make sure that there are traced versions - «IF traceability.allMutableClasses.contains(p.EType)» - for(«getJavaFQN(p.EType)» aValue : o_cast.«EcoreCraftingUtil.stringGetter(p)») { - storeAsTracedObject(aValue); - } ««« end for loop on values - «ENDIF» - - boolean change = false; - if (previousValue != null) { - - if (previousValue.«EcoreCraftingUtil.stringGetter(p)».size() == o_cast - .«EcoreCraftingUtil.stringGetter(p)».size()) { - - ««« We this is an ordered collection, we have to compare in the correct order - «IF p.ordered» - java.util.Iterator<«getJavaFQN(p.EType,true)»> it = o_cast.«EcoreCraftingUtil.stringGetter(p)».iterator(); - for («getTracedJavaFQN(p.EType,true)» aPreviousValue : previousValue - .«EcoreCraftingUtil.stringGetter(p)») { - «getJavaFQN(p.EType)» aCurrentValue = it.next(); - «IF p instanceof EReference» - if (aPreviousValue != exeToTraced.get(aCurrentValue)) - «ELSE» - if (!aPreviousValue.equals(aCurrentValue)) - «ENDIF» - { - change = true; - break; - } - } - - ««« Else we simply check that the content is the same - «ELSE» - change = !previousValue.«EcoreCraftingUtil.stringGetter(p)».containsAll(«getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter( - p)»)); - «ENDIF» - ««« end case ordered - - } ««« end if same size - - else { - change = true; - } ««« end else - - } ««« end if (previousValue != null) - - else { - change = true; - } ««« end else - - - - - if (change) { - stateChanged = true; - - // Rollback: we remove the last value of this field from the new state - «getJavaFQN(valueClass)» lastValue = tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».get(tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».size()-1); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».remove(lastValue); - - // And we create a proper new value - «getJavaFQN(valueClass)» newValue = «EcoreCraftingUtil.stringCreate(valueClass)»; - «IF p.many» - «IF p instanceof EReference» - newValue.«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) «getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)»)); - «ELSE» - newValue.«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - «ELSE» - newValue.«EcoreCraftingUtil.stringSetter(p,stringGetterTracedValue("o_cast", p))»; - «ENDIF» - tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».add(newValue); - newState.«EcoreCraftingUtil.stringGetter(pvalues)».add(newValue); - } ««« end if change - - } ««« end if featureid - - «ENDFOR» - } ««« end if instanceof - - «ENDFOR» - } ««« end if PotentialCollectionFieldModelChange - - «ENDIF» - - } ««« end for all changes - - if (stateChanged) { - final «getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» currentStep = context.peekFirst(); - if (currentStep != null && currentStep instanceof «getJavaFQN(TracePackage.eINSTANCE.bigStep)») { - final «getJavaFQN(traceability.traceMMExplorer.stateClass)» startingState = lastState; - final «getJavaFQN(traceability.traceMMExplorer.stateClass)» endingState = newState; - addImplicitStep(currentStep, startingState, endingState); - } - - lastState = newState; - traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_TraceToStates)».add(lastState); - } ««« end if (stateChanged) - - } ««« end if (!changes.isEmpty()) - } ««« end method - - ''' - - } - - private def String generateAddStateMethods() { return - ''' - @Override - public boolean addStateIfChanged() { - return addState(true); - } - - @Override - public void addState() { - addState(false); - } - - private boolean addState(boolean onlyIfChange) { - - «getJavaFQN(traceability.traceMMExplorer.getStateClass)» newState = «EcoreCraftingUtil.stringCreate( - traceability.traceMMExplorer.getStateClass)»; - boolean changed = false; - - Set allResources = getAllExecutedModelResources(); - - // We look at each object instance of a class with mutable properties - // Each of these objects should eventually become a traced object - for (Resource r : allResources) - for (TreeIterator i = r.getAllContents(); i.hasNext();){ - EObject o = i.next(); - - - - «FOR c : partialOrderSort(getAllMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList) SEPARATOR "\n else "» - «val traced = traceability.getTracedClass(c)» - - /** - * Storing the state of a «getJavaFQN(c)» object - */ - if (o instanceof «getJavaFQN(c)») { - - «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; - - storeAsTracedObject(o_cast); - - «IF !getAllMutablePropertiesOf(c).empty» - «getJavaFQN(traced)» tracedObject = («getJavaFQN(traced)») exeToTraced.get(o); - «ENDIF» - «FOR p : getAllMutablePropertiesOf(c).sortBy[FQN]» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass valueClass = ptrace.getEType as EClass» - «incVar("valueSequence")» - «val EReference refGlobalToState = traceability.getStateClassToValueClass(p)» - «incVar("previousValue")» - «incVar("noChange")» - - - // Then we compare the value of the field with the last stored value - // If same value, we create no local state and we refer to the previous - ««« TODO to change if we switch from refering the exeMM to refering the AS (as in the ECMFA paper) -> need to compare to refs to origobjs/tracedobj - ««« TODO handle collections of datatypes - List<«getJavaFQN(valueClass)»> «uniqueVar("valueSequence")» = tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)»; - «getJavaFQN(valueClass)» «uniqueVar("previousValue")» = null; - if (!«uniqueVar("valueSequence")».isEmpty()) - «uniqueVar("previousValue")» = «uniqueVar("valueSequence")».get(«uniqueVar("valueSequence")».size() - 1); - - ««« Case many - «IF p.many» - - ««« If instances of new class, we have to make sure that there are traced versions - «IF traceability.allMutableClasses.contains(p.EType)» - - for(«getJavaFQN(p.EType)» aValue : o_cast.«EcoreCraftingUtil.stringGetter(p)») { - storeAsTracedObject(aValue); - } - - «ENDIF» - - boolean «uniqueVar("noChange")»= true; - if («uniqueVar("previousValue")» != null) { - - if («uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)».size() == o_cast - .«EcoreCraftingUtil.stringGetter(p)».size()) { - - ««« We this is an ordered collection, we have to compare in the correct order - «IF p.ordered» - java.util.Iterator<«getJavaFQN(p.EType,true)»> it = o_cast.«EcoreCraftingUtil.stringGetter(p)».iterator(); - for («getTracedJavaFQN(p.EType,true)» aPreviousValue : «uniqueVar("previousValue")» - .«EcoreCraftingUtil.stringGetter(p)») { - «getJavaFQN(p.EType)» aCurrentValue = it.next(); - «IF p instanceof EReference» - if (aPreviousValue != exeToTraced.get(aCurrentValue)) { - «ELSE» - if (!aPreviousValue.equals(aCurrentValue)) { - «ENDIF» - «uniqueVar("noChange")» = false; - break; - } - } - - ««« Else we simply check that the content is the same - «ELSE» - «uniqueVar("noChange")» = «uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)».containsAll(«getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter( - p)»)); - «ENDIF» - ««« end case ordered - - } else { - «uniqueVar("noChange")» = false; - } - } else { - «uniqueVar("noChange")» = false; - } - - - ««« Case single - «ELSE» - - ««« If instance of new class, we have to make sure that there is a traced version - «IF traceability.allMutableClasses.contains(p.EType)» - storeAsTracedObject(o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - - - ««« Getting the content of the field - «incVar("content")» - ««« - ««« Case reference - «IF p instanceof EReference» - «getTracedJavaFQN(p.EType)» «uniqueVar("content")» = null; - if (o_cast.«EcoreCraftingUtil.stringGetter(p)» != null) - «uniqueVar("content")» = «stringGetterTracedValue("o_cast", p)»; - ««« - ««« Case datatype - «ELSEIF p instanceof EAttribute» - «getJavaFQN(p.EType)» «uniqueVar("content")» = o_cast.«EcoreCraftingUtil.stringGetter(p)»; - «ENDIF» - ««« end declaring/getting content - - «IF getJavaFQN(p.EType) == "java.lang.Byte" - || getJavaFQN(p.EType) == "java.lang.Short" - || getJavaFQN(p.EType) == "java.lang.Integer" - || getJavaFQN(p.EType) == "java.lang.Long" - || getJavaFQN(p.EType) == "java.lang.Boolean" - || getJavaFQN(p.EType) == "java.lang.Float" - || getJavaFQN(p.EType) == "java.lang.Double" - || getJavaFQN(p.EType) == "java.lang.String"» - boolean «uniqueVar("noChange")» = «uniqueVar("previousValue")» != null - && «uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)» != null - && «uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)».equals(«uniqueVar("content")»); - «ELSE» - boolean «uniqueVar("noChange")» = «uniqueVar("previousValue")» != null - && «uniqueVar("previousValue")».«EcoreCraftingUtil.stringGetter(p)» == «uniqueVar("content")»; - «ENDIF» - - - - - «ENDIF» - ««« end collection/single - - - - if («uniqueVar("noChange")») { - newState.«EcoreCraftingUtil.stringGetter(refGlobalToState)».add(«uniqueVar("previousValue")»); - - } // Else we create one - else { - changed = true; - «getJavaFQN(valueClass)» newValue = «EcoreCraftingUtil.stringCreate(valueClass)»; - - - - ««« Case collection - ««« TODO: handle collections of datatypes! - «IF p.many» - - «IF p instanceof EReference» - newValue.«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) «getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)»)); - «ELSE» - newValue.«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) o_cast.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - - ««« Case single - «ELSE» - - newValue.«EcoreCraftingUtil.stringSetter(p, uniqueVar("content"))»; - - - «ENDIF» - ««« end collection/Single - - tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)».add(newValue); - newState.«EcoreCraftingUtil.stringGetter(refGlobalToState)».add(newValue); - } - - «ENDFOR» - } - «ENDFOR» - } - - boolean createNewState = lastState == null || (!onlyIfChange || changed); - if (createNewState) { - - final «getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» currentStep = context.peekFirst(); - if (currentStep != null && currentStep instanceof «getJavaFQN(TracePackage.eINSTANCE.bigStep)») { - final «getJavaFQN(traceability.traceMMExplorer.stateClass)» startingState = lastState; - final «getJavaFQN(traceability.traceMMExplorer.stateClass)» endingState = newState; - addImplicitStep(currentStep, startingState, endingState); - } - - lastState = newState; - traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_TraceToStates)».add(lastState); - } - - // Undoing the new state created for nothing - else { - - newState.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_StateToStep_started)».clear(); - newState.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_StateToStep_ended)».clear(); - - «FOR p : traceability.allMutableProperties.sortBy[FQN]» - «val EReference tuple = traceability.getStateClassToValueClass(p)» - newState.«EcoreCraftingUtil.stringGetter(tuple)».clear(); - «ENDFOR» - } - - return createNewState; - - }''' -} - -private def String generateGoToMethods() { - return ''' - @Override - public void goTo(EObject state) { - - if (state instanceof «getJavaFQN(traceability.traceMMExplorer.stateClass)») { - «getJavaFQN(traceability.traceMMExplorer.stateClass)» stateToGo = («getJavaFQN( - traceability.traceMMExplorer.stateClass)») state; - - «FOR p : traceability.allMutableProperties.sortBy[FQN]» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass stateClass = ptrace.getEType as EClass» - - for («getJavaFQN(stateClass)» value : stateToGo.«EcoreCraftingUtil.stringGetter( - TraceMMStrings.ref_createGlobalToState(stateClass))») { - - - ««« Case in which we can use the "originalObject" reference and simply set its values - «IF p.eContainer instanceof ClassExtension» - - ««« We have to test at runtime because we can't know at design time the type of the object containing the property - ««« The reason is that we keep the same class hierarchy in the trace. Maybe we should remove that. - «FOR concreteSubType : getConcreteSubtypesTraceClassOf(ptrace.getEContainingClass).sortBy[name]» - if (value.«EcoreCraftingUtil.stringGetter("parent")» instanceof «getJavaFQN(concreteSubType)») { - «val Collection origRefs = traceability.getRefs_originalObject(concreteSubType).sortBy[name]» - «getJavaFQN(concreteSubType)» parent_cast = («getJavaFQN(concreteSubType)») value.«EcoreCraftingUtil.stringGetter("parent")»; - «IF !origRefs.isEmpty» - «val EReference origRef = origRefs.get(0)» - «IF p.many» - «EcoreCraftingUtil.getJavaFQN(traceability.getExeClass(ptrace.getEContainingClass),refGenPackages)» originalObject = («EcoreCraftingUtil.getJavaFQN(traceability.getExeClass(ptrace.getEContainingClass),refGenPackages)») parent_cast.«EcoreCraftingUtil.stringGetter(origRef)»; - originalObject.«EcoreCraftingUtil.stringGetter(p)».clear(); - originalObject.«EcoreCraftingUtil.stringGetter(p)».addAll(«stringGetterExeValue("value",p)»); - «ELSE» - «getJavaFQN(p.EType)» toset = «stringGetterExeValue("value", p)»; - «getJavaFQN(p.EType)» current = ((«getJavaFQN((p.eContainer as ClassExtension).extendedExistingClass)»)parent_cast.«EcoreCraftingUtil.stringGetter( - origRef)»).«EcoreCraftingUtil.stringGetter(p)»; - if (current != toset) - ((«getJavaFQN((p.eContainer as ClassExtension).extendedExistingClass)»)parent_cast.«EcoreCraftingUtil.stringGetter(origRef)»).«EcoreCraftingUtil.stringSetter( - p, "toset")»; - «ENDIF» - «ENDIF» - - } - «ENDFOR» - - ««« Case in which we have to recreate/restore execution objects in the model - «ELSEIF p.eContainer instanceof EClass» - «getJavaFQN(p.EContainingClass)» exeObject = («getJavaFQN(p.EContainingClass)») «getTracedToExeMethodName»(value.getParent()); - «IF p.many» - exeObject.«EcoreCraftingUtil.stringGetter(p)».clear(); - - «IF p instanceof EReference» - exeObject.«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) «getTracedToExeMethodName»(value.«EcoreCraftingUtil.stringGetter(p)»)); - «ELSE» - exeObject.«EcoreCraftingUtil.stringGetter(p)».addAll - ((Collection) value.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - «ELSE» - exeObject.«EcoreCraftingUtil.stringSetter(p, stringGetterExeValue("value",p))»; - «ENDIF» - - «ENDIF» - - - - } - - - - «ENDFOR» - } else { - goToValue(state); - } - } - - @Override - public void goTo(int stepNumber) { - «getJavaFQN(traceability.traceMMExplorer.getStateClass)» stateToGo = traceRoot.«EcoreCraftingUtil.stringGetter( - TraceMMStrings.ref_TraceToStates)».get(stepNumber); - goTo(stateToGo); - } - - private void goToValue(EObject value) { - Object states = emfGet(value, "states"); - if (states != null) { - if (states instanceof List) { - // We get the first state in which this value existed - Object state = ((List) states).get(0); - if (state instanceof «getJavaFQN(traceability.traceMMExplorer.getStateClass)») { - goTo((«getJavaFQN(traceability.traceMMExplorer.getStateClass)») state); - } - } - } - }''' -} - -private def String generateGenericEMFHelperMethods() { - return ''' - @SuppressWarnings("unchecked") - private static void emfAdd(EObject o, String property, Object value) { - for (EReference r : o.eClass().getEAllReferences()) { - if (r.getName().equalsIgnoreCase(property)) { - Object coll = o.eGet(r); - if (coll instanceof Collection) { - ((Collection) coll).add(value); - return; - } - } - } - } - - private static Object emfGet(EObject o, String property) { - for (EReference r : o.eClass().getEAllReferences()) { - if (r.getName().equalsIgnoreCase(property)) { - return o.eGet(r); - } - } - return null; - }''' -} - -private def String generateAddStepMethods() { - return ''' - - @Override - public void addStep(String stepRule, Map params) { - addStep(stepRule, params, this.getTraceSize()-1); - } - - «««TODO how to get the parameters of the operation call? Not possible with current gemoc - private void addStep(String stepRule, Map params, int stateIndex) { - - «getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» toPush = null; - - if (stateIndex >= 0) { - - «getJavaFQN(traceability.traceMMExplorer.stateClass)» state = this.traceRoot.getStatesTrace().get(stateIndex); - - - «val stepRules = traceability.mmext.rules» - «IF !stepRules.empty» - «FOR stepRule : stepRules.sortBy[baseFQN] SEPARATOR "else"» - «val stepCallerClass = stepRule.containingClass» - «val possibleCallerClasses = abstractSyntax.EClassifiers - .filter[c|c instanceof EClass] - .map[c|c as EClass] - .filter[c|c.equals(stepCallerClass)||c.EAllSuperTypes.contains(stepCallerClass)] - .toSet» - - «val EClass stepClass = traceability.getStepClassFromStepRule(stepRule)» - «val String varName = stepClass.name.toFirstLower.replace(" ", "") + "Instance"» - «IF possibleCallerClasses.empty» - if (stepRule.equalsIgnoreCase("«getBaseFQN(stepRule)»")) { - «ELSE» - if ( - «FOR possibleCallerClass: possibleCallerClasses.sortBy[name] SEPARATOR " || "» - stepRule.equalsIgnoreCase("«getActualFQN(possibleCallerClass, stepRule)»") - «ENDFOR» - ) { - «ENDIF» - // First we create the step - «getJavaFQN(stepClass)» «varName» = «EcoreCraftingUtil.stringCreate(stepClass)»; - «varName».«EcoreCraftingUtil.stringSetter(TraceMMStrings.ref_StepToState_starting, "state")»; - - if (!context.isEmpty() && context.getFirst() != null){ - emfAdd(context.getFirst(), "«StepStrings.ref_BigStepToSub»", «varName»); - } else { - traceRoot.getRootStep().getSubSteps().add(«varName»); - } - toPush = «varName»; - - ««« TODO if we want to use this method in the context of gemoc, need to fill the MSEOccurrence params with those from here - «IF !gemoc» - ««« TODO rely on information in Rule instead of the structural features? - «val properties = stepClass.EAllStructuralFeatures.filter[f| - !TracePackage.eINSTANCE.smallStep.EStructuralFeatures.contains(f) && - !TracePackage.eINSTANCE.bigStep.EStructuralFeatures.contains(f) && - !traceability.traceMMExplorer.getSpecificStepClass.EStructuralFeatures.contains(f) && - !f.name.equals(StepStrings.ref_BigStepToSub) - && !f.EContainingClass.name.equals("MSEOccurrence")]» - «IF !properties.empty» - if (params != null) { - for (String k : params.keySet()) { - - switch(k) { - «FOR p : properties.sortBy[name]» - case "«p.name»": - Object «uniqueVar("v")» = params.get(k); - «val type = getEventParamRuntimeType(p)» - if («uniqueVar("v")» instanceof «getJavaFQN(type)») - «IF type == p.EType» - «varName».«EcoreCraftingUtil.stringSetter(p, "(" + getJavaFQN(p.EType) + ")"+uniqueVar("v"))»; - «ELSE» - «varName».«EcoreCraftingUtil.stringSetter(p, "(" + getJavaFQN(p.EType) + ")exeToTraced.get("+uniqueVar("v"+")"))»; - «ENDIF» - - break; - - «incVar("v")» - «ENDFOR» - } - } - } - «ENDIF» - «ENDIF» - - // Then we add it to its trace - this.traceRoot.«EcoreCraftingUtil.stringGetter(traceability.getStepSequence(stepClass))».add(«varName»); - } - «ENDFOR» - - - «ENDIF» - - } - - context.push(toPush); - - } - - private void addImplicitStep(«getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» currentStep, - «getJavaFQN(traceability.traceMMExplorer.stateClass)» startingState, - «getJavaFQN(traceability.traceMMExplorer.stateClass)» endingState) { - - «IF !stepRules.empty && !traceability.bigStepClasses.empty» - «getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» implicitStep = null; - «FOR bigStepClass : traceability.bigStepClasses.sortBy[name] SEPARATOR "else"» - if (currentStep instanceof «getJavaFQN(bigStepClass)») { - implicitStep = «EcoreCraftingUtil.stringCreateImplicitStep(bigStepClass)»; - } - «ENDFOR» - if (implicitStep != null) { - implicitStep.setStartingState(startingState); - implicitStep.setEndingState(endingState); - emfAdd(currentStep, "subSteps", implicitStep); - } - «ENDIF» - } - - «IF gemoc» - @Override - public boolean addStep(fr.inria.diverse.trace.commons.model.trace.MSEOccurrence mseOccurrence) { - - «getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» step = null; - - if (mseOccurrence != null && mseOccurrence instanceof «getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)») { - - step = («getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)») mseOccurrence; - - if (mseModel == null) { - mseModel = fr.inria.diverse.trace.commons.model.trace.MseFactory.eINSTANCE.createMSEModel(); - traceResource.getContents().add(mseModel); - } - - mseModel.getOwnedMSEs().add(step.getMseoccurrence().getMse()); - - // Creating generic (or almost generic) links - «getJavaFQN(traceability.traceMMExplorer.stateClass)» state = this.traceRoot.getStatesTrace().get(this.getTraceSize()-1); - step.setStartingState(state); - if (!context.isEmpty() && context.getFirst() != null) { - emfAdd(context.getFirst(), "subSteps", step); - } else { - traceRoot.getRootStep().getSubSteps().add(step); - } - - // Adding step in its dedicated sequence/dimension - «IF !stepRules.empty» - «FOR stepRule : stepRules.sortBy[baseFQN] SEPARATOR "else"» - «val EClass stepClass = traceability.getStepClassFromStepRule(stepRule)» - «val String varName = stepClass.name.toFirstLower.replace(" ", "") + "Instance"» - if (step instanceof «getJavaFQN(stepClass)») { - «getJavaFQN(stepClass)» «varName» = («getJavaFQN(stepClass)») step; - this.traceRoot.«EcoreCraftingUtil.stringGetter(traceability.getStepSequence(stepClass))».add(«varName»); - } - «ENDFOR» - «ENDIF» - } - context.push(step); - - return (step != null); - } - - «ENDIF» - - - @Override - public void endStep(String stepRule, Object returnValue) { - «getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» popped = context.pop(); - if (popped != null) - popped.«EcoreCraftingUtil.stringSetter(TraceMMStrings.ref_StepToState_ending, "lastState")»; - }''' -} - - private def String generateInitAndSaveTraceMethods() { - return ''' - - @Override - public void initTrace() { - // Create root - this.traceRoot = «EcoreCraftingUtil.stringCreate(traceability.traceMMExplorer.getSpecificTraceClass)»; - - // Put in the resource - traceResource.getContents().add(traceRoot); - - // Initializing the map exeobject -> tracedobject - this.exeToTraced = new HashMap(); - } - - public void loadTrace(«getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)» traceRoot) { - this.traceRoot = traceRoot; - this.exeToTraced = new HashMap(); - «FOR mutClass : traceability.allMutableClasses.filter[c|!c.isAbstract].sortBy[name]» - «val traced = traceability.getTracedClass(mutClass)» - for («getJavaFQN(traced)» tracedObject : traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_createTraceClassToTracedClass(traced))») { - «FOR p : getAllMutablePropertiesOf(mutClass).sortBy[FQN]» - «val EReference ptrace = traceability.getTraceOf(p)» - traces.add(new GenericValueTrace(tracedObject.«EcoreCraftingUtil.stringGetter(ptrace)», this)); - «ENDFOR» - } - «ENDFOR» - } - - @Override - public void save() { - try { - traceResource.save(null); - } catch (java.io.IOException e) { - e.printStackTrace(); - } - } - - @Override - public void save(URI uri) { - try { - traceResource.setURI(uri); - traceResource.save(null); - } catch (java.io.IOException e) { - e.printStackTrace(); - } - } - ''' - } - - private def String generateGetDescriptionMethods() { - return ''' - - @Override - public String getDescriptionOfExecutionState(int index) { - StringBuilder result = new StringBuilder(); - «getJavaFQN(traceability.traceMMExplorer.getStateClass)» gs = traceRoot.«EcoreCraftingUtil.stringGetter( - TraceMMStrings.ref_TraceToStates)».get(index); - - «FOR p : traceability.allMutableProperties.sortBy[FQN]» - «val EReference refGlobalToState = traceability.getStateClassToValueClass(p)» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass stateClass = ptrace.getEType as EClass» - - if (!gs.«EcoreCraftingUtil.stringGetter(refGlobalToState)».isEmpty()) - result.append("\n«p.name.toFirstUpper» values:"); - for («getJavaFQN(stateClass)» currentState : gs.«EcoreCraftingUtil.stringGetter(refGlobalToState)») { - «IF p.many» - String d = ""; - List<«getTracedJavaFQN(p.EType,true)»> l = currentState.«EcoreCraftingUtil.stringGetter(p)»; - int s = l.size(); - for (int i=0;i0) { - d += l.get(s-1).toString(); - } - result.append("\n\t" + "["+d+"]"); - «ELSE» - result.append("\n\t" + currentState.«EcoreCraftingUtil.stringGetter(p)»); - «ENDIF» - } - «ENDFOR» - - if (!gs.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_StateToStep_started)».isEmpty()) { - result.append("\n\nStarting steps: "); - for («getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» m : gs.«EcoreCraftingUtil.stringGetter( - TraceMMStrings.ref_StateToStep_started)») { - result.append("\n\t" + m.eClass().getName()); - if (m.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_StepToState_ending)» != null) { - result.append(" (ends at state "+ traceRoot.getStatesTrace().indexOf(m.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_StepToState_ending)») +")"); - } - } - } - - result.deleteCharAt(0); - return result.toString(); - } - - @Override - public String getDescriptionOfValue(EObject value) { - «FOR p : traceability.allMutableProperties.sortBy[FQN] SEPARATOR " else " AFTER " else "» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass stateClass = ptrace.getEType as EClass» - if (value instanceof «getJavaFQN(stateClass)») { - return "«getJavaFQN(stateClass)»: "+ ((«getJavaFQN(stateClass)»)value).«EcoreCraftingUtil.stringGetter(p)»; - } - «ENDFOR» - return "ERROR"; - } - - @Override - public Object getContainedValue(EObject value) { - «FOR p : traceability.allMutableProperties.sortBy[FQN] SEPARATOR " else " AFTER " else "» - «val EReference ptrace = traceability.getTraceOf(p)» - «val EClass stateClass = ptrace.getEType as EClass» - if (value instanceof «getJavaFQN(stateClass)») { - return ((«getJavaFQN(stateClass)»)value).«EcoreCraftingUtil.stringGetter(p)»; - } - «ENDFOR» - return null; - } - - ''' - } - - private def String generateStateQueryMethods() { - return ''' - @Override - public EObject getExecutionState(int index) { - return traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_TraceToStates)».get(index); - } - - - @Override - public int getTraceSize() { - return traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_TraceToStates)».size(); - } - - - - @Override - public int getNumberOfValueTraces() { - return traces.size(); - } - - @Override - public Set getAllCurrentValues(int stateIndex) { - «getJavaFQN(traceability.traceMMExplorer.getStateClass)» currentState = this.traceRoot.getStatesTrace().get(stateIndex); - // We find all current values - Set currentValues = new HashSet(); - if (currentState != null) { - «FOR p : traceability.allMutableProperties.sortBy[FQN]» - «val EReference refGlobalToState = traceability.getStateClassToValueClass(p)» - currentValues.addAll(currentState.«EcoreCraftingUtil.stringGetter(refGlobalToState)»); - «ENDFOR» - } - return currentValues; - } - - public List getAllValueTraces() { - return traces; - } - - @Override - public int getStateOrValueIndex(EObject stateOrValue) { - int idx = traceRoot.getStatesTrace().indexOf(stateOrValue); - if (idx == -1) { - final Object states = emfGet(stateOrValue, "states"); - if (states != null) { - if (states instanceof List) { - // We get the first state in which this value existed - Object valueState = ((List) states).get(0); - if (valueState instanceof «getJavaFQN(traceability.traceMMExplorer.getStateClass)») { - idx = traceRoot.getStatesTrace().indexOf(valueState); - } - } - } - } - return idx; - }''' - } - - private def String generateStepQueryMethods() { - return ''' - @Override - public String currentBigStep() { - if(!context.isEmpty() && context.getFirst() != null) - return context.getFirst().eClass().getName(); - else - return null; - } - - @Override - public List getStepsForStates( - int startingState, int endingState) { - Predicate predicate = (s) -> { - final int stepStartingState = s.getStartingIndex(); - final int stepEndingState = s.getEndingIndex(); - return (stepEndingState == -1 || stepEndingState >= startingState) && stepStartingState <= endingState; - }; - return traceRoot.getRootStep().getSubSteps().stream() - .map(s -> createLazyGenericStep(s, null, predicate)) - .filter(predicate) - .collect(Collectors.toList()); - } - - @SuppressWarnings("unchecked") - private List generateSubSteps(«getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» step, - fr.inria.diverse.trace.api.IStep parent) { - - final List<«getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)»> subSteps = (List<«getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)»>) emfGet(step, "subSteps"); - final List result = new ArrayList<>(); - - if (subSteps != null && !subSteps.isEmpty()) { - for («getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» subStep : subSteps) { - result.add(createLazyGenericStep(subStep,parent)); - } - } - - return result; - } - - private fr.inria.diverse.trace.api.IStep createLazyGenericStep( - «getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» step, - fr.inria.diverse.trace.api.IStep parent) { - return createLazyGenericStep(step, parent, null); - } - - private fr.inria.diverse.trace.api.IStep createLazyGenericStep(«getJavaFQN(traceability.traceMMExplorer.getSpecificStepClass)» step, fr.inria.diverse.trace.api.IStep parent, Predicate predicate) { - fr.inria.diverse.trace.api.IStep result = null; - - «FOR Rule r : this.traceability.mmext.rules.sortBy[baseFQN] SEPARATOR "else" » - «val stepClass = this.traceability.getStepClassFromStepRule(r)» - if (step instanceof «getJavaFQN(stepClass)») { - «getJavaFQN(stepClass)» step_cast = («getJavaFQN(stepClass)») step; - int startIndex = this.traceRoot.getStatesTrace().indexOf(step.getStartingState()); - int endIndex = this.traceRoot.getStatesTrace().indexOf(step.getEndingState()); - - result = new fr.inria.diverse.trace.api.impl.PartiallyLazyGenericStep("«getJavaFQN(r.containingClass)»", "«r.operation.name»", startIndex, endIndex, parent,(s)->generateSubSteps(step_cast,s),predicate); - «IF r.containingClass != null» - result.addParameter("caller", (step_cast.getCaller())); - «ENDIF» - result.addParameter("this", step); - - «FOR a : r.operation.EParameters» - ««« TODO - «ENDFOR» - } - «ENDFOR» - «FOR implicitStepClass : this.traceability.implicitStepClasses.sortBy[name]» - else if (step instanceof «getJavaFQN(implicitStepClass)») { - int startIndex = this.traceRoot.getStatesTrace().indexOf(step.getStartingState()); - int endIndex = this.traceRoot.getStatesTrace().indexOf(step.getEndingState()); - - result = new fr.inria.diverse.trace.api.impl.GenericStep("«getJavaFQN(traceability.getImplicitStepContainingClass(implicitStepClass))»", "implicitStep",startIndex,endIndex,parent,new ArrayList<>()); - result.addParameter("this", step); - } - «ENDFOR» - - return result; - } - - ''' - } - - - private def String generateIsPartialTraceManager() { - return ''' - @Override - public boolean isPartialTraceManager() { - return «partialTraceManagement»; - } - ''' - } - - private def String generateSetTraceRoot() { - return - ''' - @Override - public void setTraceRoot(EObject object) { - if (object instanceof «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)») { - traceRoot = («getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)») object; - } - } - ''' - } - - private def String generateTraceManagerClass() { - return '''package «packageQN»; - - «generateImports» - -public class «className» implements «IF gemoc» fr.inria.diverse.trace.gemoc.api.IGemocTraceManager «ELSE» ITraceManager «ENDIF»{ - - «generateFields» - «generateConstructor» - «IF gemoc» - «generateAddInitialStateMethod» - «generateAddNewObjectToStateMethods» - «generateAddStateUsingListenerMethods» - «ELSE» - «generateAddStateMethods» - «ENDIF» - «generateAddStepMethods» - «generateGoToMethods» - «generateInitAndSaveTraceMethods» - «generateGetDescriptionMethods» - «generateStoreAsTracedMethods» - «generateGenericEMFHelperMethods» - «generateStateQueryMethods» - «generateStepQueryMethods» - «generateGetAllResourcesMethod» - «generateExeToFromTracedGenericMethods» - «generateIsPartialTraceManager» - «generateSetTraceRoot» -} - ''' - - - } - -} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/.checkstyle b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/.checkstyle new file mode 100644 index 000000000..42097404b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/.classpath b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/.classpath rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/.classpath diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/.project b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/.project new file mode 100644 index 000000000..641d7b3b9 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.annotations.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/META-INF/MANIFEST.MF b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/META-INF/MANIFEST.MF new file mode 100644 index 000000000..abf52201a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.trace.annotations.edit;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: tracingannotations.provider.TracingannotationsEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: tracingannotations.provider +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.gemoc.trace.annotations;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/build.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/build.properties new file mode 100644 index 000000000..b15430998 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/icons/full/obj16/TracingAnnotations.gif b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/icons/full/obj16/TracingAnnotations.gif similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/icons/full/obj16/TracingAnnotations.gif rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/icons/full/obj16/TracingAnnotations.gif diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/plugin.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/plugin.properties new file mode 100644 index 000000000..44e94d699 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/plugin.properties @@ -0,0 +1,33 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +pluginName = Tracingannotations 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_TracingAnnotations_type = Tracing Annotations +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_TracingAnnotations_propertiesToTrace_feature = Properties To Trace +_UI_TracingAnnotations_classestoTrace_feature = Classesto Trace +_UI_Unknown_feature = Unspecified + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/plugin.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/plugin.xml new file mode 100644 index 000000000..85ae8403a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/plugin.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/pom.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/pom.xml new file mode 100644 index 000000000..2ef409356 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/pom.xml @@ -0,0 +1,31 @@ + + + + + 4.0.0 + org.gemoc.multidimensional_trace_management + org.eclipse.gemoc.trace.annotations.edit + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.eclipse.gemoc.trace.generator + org.eclipse.gemoc.trace.generator.root + 2.3.0-SNAPSHOT + ../.. + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingAnnotationsItemProvider.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingAnnotationsItemProvider.java similarity index 90% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingAnnotationsItemProvider.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingAnnotationsItemProvider.java index 9ab002afa..49d8834e4 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingAnnotationsItemProvider.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingAnnotationsItemProvider.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.provider; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsEditPlugin.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsEditPlugin.java similarity index 78% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsEditPlugin.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsEditPlugin.java index b9a617b18..34b7f4a02 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsEditPlugin.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsEditPlugin.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.provider; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsItemProviderAdapterFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsItemProviderAdapterFactory.java similarity index 91% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsItemProviderAdapterFactory.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsItemProviderAdapterFactory.java index e313f7324..8d54ff994 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsItemProviderAdapterFactory.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.edit/src/tracingannotations/provider/TracingannotationsItemProviderAdapterFactory.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.provider; diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/.checkstyle b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/.checkstyle new file mode 100644 index 000000000..42097404b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/.classpath b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/.classpath rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/.classpath diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/.project b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/.project new file mode 100644 index 000000000..18f3ab7be --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.annotations.editor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/META-INF/MANIFEST.MF b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/META-INF/MANIFEST.MF new file mode 100644 index 000000000..4bff927e3 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.trace.annotations.editor;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: tracingannotations.presentation.TracingannotationsEditorPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: tracingannotations.presentation +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources;visibility:=reexport, + org.eclipse.gemoc.trace.annotations.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/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/build.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/build.properties new file mode 100644 index 000000000..d06a1696b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/icons/full/obj16/TracingannotationsModelFile.gif b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/icons/full/obj16/TracingannotationsModelFile.gif similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/icons/full/obj16/TracingannotationsModelFile.gif rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/icons/full/obj16/TracingannotationsModelFile.gif diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/icons/full/wizban/NewTracingannotations.gif b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/icons/full/wizban/NewTracingannotations.gif similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/icons/full/wizban/NewTracingannotations.gif rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/icons/full/wizban/NewTracingannotations.gif diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/plugin.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/plugin.properties new file mode 100644 index 000000000..fcb5fbc69 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/plugin.properties @@ -0,0 +1,63 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +pluginName = Tracingannotations Editor +providerName = www.example.org + +_UI_TracingannotationsEditor_menu = &Tracingannotations 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_TracingannotationsModelWizard_label = Tracingannotations Model +_UI_TracingannotationsModelWizard_description = Create a new Tracingannotations model + +_UI_TracingannotationsEditor_label = Tracingannotations Model Editor + +_UI_TracingannotationsEditorFilenameDefaultBase = My +_UI_TracingannotationsEditorFilenameExtensions = tracingannotations + +_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? + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/plugin.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/plugin.xml new file mode 100644 index 000000000..59aebda25 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/plugin.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + %_UI_TracingannotationsModelWizard_description + + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/pom.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/pom.xml new file mode 100644 index 000000000..0fad0665b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/pom.xml @@ -0,0 +1,31 @@ + + + + + 4.0.0 + org.gemoc.multidimensional_trace_management + org.eclipse.gemoc.trace.annotations.editor + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.eclipse.gemoc.trace.generator + org.eclipse.gemoc.trace.generator.root + 2.3.0-SNAPSHOT + ../.. + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsActionBarContributor.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsActionBarContributor.java similarity index 96% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsActionBarContributor.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsActionBarContributor.java index 4db7ff5b8..643b51ac0 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsActionBarContributor.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsActionBarContributor.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.presentation; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditor.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditor.java similarity index 98% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditor.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditor.java index 5fe030c73..d8f09df23 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditor.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditor.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.presentation; @@ -620,7 +630,7 @@ protected void updateProblemIndication() { BasicDiagnostic diagnostic = new BasicDiagnostic (Diagnostic.OK, - "fr.inria.diverse.trace.annotations.editor", + "org.eclipse.gemoc.trace.annotations.editor", 0, null, new Object [] { editingDomain.getResourceSet() }); @@ -984,7 +994,7 @@ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception BasicDiagnostic basicDiagnostic = new BasicDiagnostic (Diagnostic.ERROR, - "fr.inria.diverse.trace.annotations.editor", + "org.eclipse.gemoc.trace.annotations.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object [] { exception == null ? (Object)resource : exception }); @@ -995,7 +1005,7 @@ else if (exception != null) { return new BasicDiagnostic (Diagnostic.ERROR, - "fr.inria.diverse.trace.annotations.editor", + "org.eclipse.gemoc.trace.annotations.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditorPlugin.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditorPlugin.java similarity index 79% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditorPlugin.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditorPlugin.java index 22fefa125..7fe598fa2 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditorPlugin.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsEditorPlugin.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.presentation; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsModelWizard.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsModelWizard.java similarity index 97% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsModelWizard.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsModelWizard.java index 58c7cfd22..d04e30b71 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsModelWizard.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations.editor/src/tracingannotations/presentation/TracingannotationsModelWizard.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.presentation; diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.checkstyle b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.checkstyle new file mode 100644 index 000000000..42097404b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.classpath b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.classpath new file mode 100644 index 000000000..22f30643c --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.project b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.project new file mode 100644 index 000000000..365900d6a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.annotations + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/META-INF/MANIFEST.MF b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/META-INF/MANIFEST.MF new file mode 100644 index 000000000..569668aa8 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.trace.annotations;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: tracingannotations, + tracingannotations.impl, + tracingannotations.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/build.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/build.properties new file mode 100644 index 000000000..a5d67a32d --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/model/tracingannotations.ecore b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/model/tracingannotations.ecore similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/model/tracingannotations.ecore rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations/model/tracingannotations.ecore 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 new file mode 100644 index 000000000..8032adfcb --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/model/tracingannotations.genmodel @@ -0,0 +1,17 @@ + + + tracingannotations.ecore + + + + + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/plugin.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/plugin.properties new file mode 100644 index 000000000..8bb250d75 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/plugin.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +pluginName = Tracingannotations Model +providerName = www.example.org diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/plugin.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/plugin.xml new file mode 100644 index 000000000..a3488f2fc --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/plugin.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/pom.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/pom.xml new file mode 100644 index 000000000..0305e7215 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/pom.xml @@ -0,0 +1,31 @@ + + + + + 4.0.0 + org.gemoc.multidimensional_trace_management + org.eclipse.gemoc.trace.annotations + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.eclipse.gemoc.trace.generator + org.eclipse.gemoc.trace.generator.root + 2.3.0-SNAPSHOT + ../.. + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingAnnotations.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingAnnotations.java similarity index 80% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingAnnotations.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingAnnotations.java index af19d7193..e5326ac30 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingAnnotations.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingAnnotations.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations; diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingannotationsFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingannotationsFactory.java new file mode 100644 index 000000000..1d2a0077a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingannotationsFactory.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations; + +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 tracingannotations.TracingannotationsPackage + * @generated + */ +public interface TracingannotationsFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + TracingannotationsFactory eINSTANCE = tracingannotations.impl.TracingannotationsFactoryImpl.init(); + + /** + * Returns a new object of class 'Tracing Annotations'. + * + * + * @return a new object of class 'Tracing Annotations'. + * @generated + */ + TracingAnnotations createTracingAnnotations(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + TracingannotationsPackage getTracingannotationsPackage(); + +} //TracingannotationsFactory diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingannotationsPackage.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingannotationsPackage.java similarity index 91% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingannotationsPackage.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingannotationsPackage.java index 0e6623fc1..7cb939483 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/TracingannotationsPackage.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/TracingannotationsPackage.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingAnnotationsImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingAnnotationsImpl.java similarity index 89% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingAnnotationsImpl.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingAnnotationsImpl.java index 3e3e3dc31..8027ea926 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingAnnotationsImpl.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingAnnotationsImpl.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.impl; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingannotationsFactoryImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingannotationsFactoryImpl.java similarity index 81% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingannotationsFactoryImpl.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingannotationsFactoryImpl.java index 3f7356e95..8d3baa793 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingannotationsFactoryImpl.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingannotationsFactoryImpl.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.impl; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingannotationsPackageImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingannotationsPackageImpl.java similarity index 92% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingannotationsPackageImpl.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingannotationsPackageImpl.java index 434b46fb3..f486e17f1 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/impl/TracingannotationsPackageImpl.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/impl/TracingannotationsPackageImpl.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.impl; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/util/TracingannotationsAdapterFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/util/TracingannotationsAdapterFactory.java similarity index 86% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/util/TracingannotationsAdapterFactory.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/util/TracingannotationsAdapterFactory.java index e59ebe4fb..dff62795d 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/util/TracingannotationsAdapterFactory.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/util/TracingannotationsAdapterFactory.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.util; diff --git a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/util/TracingannotationsSwitch.java b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/util/TracingannotationsSwitch.java similarity index 86% rename from trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/util/TracingannotationsSwitch.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/util/TracingannotationsSwitch.java index 6ecb3eda0..a40cb5ed1 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.annotations/src/tracingannotations/util/TracingannotationsSwitch.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.annotations/src/tracingannotations/util/TracingannotationsSwitch.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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 tracingannotations.util; diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.checkstyle b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.checkstyle new file mode 100644 index 000000000..42097404b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.classpath b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.classpath rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.classpath diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.gitignore b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.gitignore similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.gitignore rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.gitignore diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.project b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.project new file mode 100644 index 000000000..28c494197 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.project @@ -0,0 +1,40 @@ + + + org.eclipse.gemoc.trace.gemoc.generator + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.settings/org.eclipse.core.resources.prefs b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/.settings/org.eclipse.core.resources.prefs rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.settings/org.eclipse.core.resources.prefs diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.settings/org.eclipse.jdt.core.prefs b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..0c68a61dc --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/.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/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 new file mode 100644 index 000000000..0652f66ea --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.tracemm.k3al.generator +Bundle-SymbolicName: org.eclipse.gemoc.trace.gemoc.generator;singleton:=true +Bundle-Version: 2.3.0.qualifier +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.emf.ecore, + org.eclipse.gemoc.trace.commons;bundle-version="1.0.0", + org.eclipse.jdt.core;bundle-version="3.10.0", + org.eclipse.ui, + org.eclipse.core.runtime;bundle-version="3.10.0", + org.eclipse.core.resources;bundle-version="3.9.1", + org.eclipse.gemoc.executionframework.ui;bundle-version="0.1.0", + org.eclipse.gemoc.xdsmlframework.ide.ui;bundle-version="0.1.0", + org.eclipse.gemoc.trace.metamodel.generator;bundle-version="1.0.0", + fr.inria.diverse.melange.ui, + fr.inria.diverse.melange.metamodel, + org.eclipse.xtext.ui, + 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" +Bundle-ClassPath: . +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.trace.gemoc.generator, + org.eclipse.gemoc.trace.gemoc.generator.codegen, + org.eclipse.gemoc.trace.gemoc.generator.util diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/about.html b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/about.html similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/about.html rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/about.html diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/build.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/build.properties new file mode 100644 index 000000000..4a7adc0d3 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/build.properties @@ -0,0 +1,17 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html +src.includes = about.html diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/pom.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/pom.xml new file mode 100644 index 000000000..b659163aa --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/pom.xml @@ -0,0 +1,62 @@ + + + + + 4.0.0 + org.gemoc.multidimensional_trace_management + org.eclipse.gemoc.trace.gemoc.generator + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.eclipse.gemoc.trace.generator + org.eclipse.gemoc.trace.generator.root + 2.3.0-SNAPSHOT + ../.. + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + 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 new file mode 100644 index 000000000..f4892376b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/GenericEngineTraceAddonGenerator.xtend @@ -0,0 +1,383 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.generator + +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 +import org.eclipse.gemoc.trace.metamodel.generator.TraceMMGenerationTraceability +import org.eclipse.gemoc.trace.metamodel.generator.TraceMMGenerator +import java.util.HashSet +import java.util.List +import java.util.Set +import opsemanticsview.OperationalSemanticsView +import opsemanticsview.Rule +import org.eclipse.core.resources.IFile +import org.eclipse.core.resources.IProject +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.emf.codegen.ecore.genmodel.GenPackage +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EClassifier +import org.eclipse.emf.ecore.EOperation +import org.eclipse.emf.ecore.EPackage +import org.eclipse.jdt.core.IJavaProject +import org.eclipse.jdt.core.IPackageFragment +import org.eclipse.jdt.core.IPackageFragmentRoot +import org.eclipse.jdt.core.JavaCore +import org.eclipse.ui.PlatformUI +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 + +class GenericEngineTraceAddonGenerator { + + // Inputs + private val OperationalSemanticsView opsemanticsview // URI + private val String pluginName + + // Transient vals (derived just from inputs) + private val String packageQN + private val String className + private val String languageName + private val String tracedLanguageName + private val String stepFactoryClassName + + // Transient vars + private var String traceConstructorClassName + private var String stateManagerClassName + private var TraceMMGenerationTraceability traceability + private var Set genPackages + private var IPackageFragment packageFragment + private var EPackage tracemm + private var boolean partialTraceManagement = false + + // Output + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) + IProject project + + + + new(OperationalSemanticsView opsemanticsview, String pluginName) { + this.opsemanticsview = opsemanticsview + this.pluginName = pluginName + this.packageQN = pluginName + ".tracemanager" + this.tracedLanguageName = opsemanticsview.executionMetamodel.name + this.languageName = tracedLanguageName.replaceAll(" ", "") + "Trace" + this.className = languageName.replaceAll(" ", "").toFirstUpper + "EngineAddon" + this.stepFactoryClassName = languageName.replaceAll(" ", "").toFirstUpper + "StepFactory" + } + + public def void generateCompleteAddon() { + PlatformUI.workbench.activeWorkbenchWindow.run(false, true, [ m | + generateCompleteAddon(m) + ]) + } + + public static def String getBaseFQN(Rule r) { + val EOperation o = r.operation + val EClass c = r.containingClass + return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name + } + + private def String getJavaFQN(EClassifier c) { + return getJavaFQN(c,false) + } + + private def String getJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { + return EcoreCraftingUtil.getJavaFQN(c,genPackages,enforcePrimitiveJavaClass) + } + + private static def Set findNestedGenpackages(GenPackage p) { + val result = p.nestedGenPackages.toSet + result.add(p) + for (n : p.nestedGenPackages) { + result.addAll(findNestedGenpackages(n)) + } + return result + } + + + public def void generateCompleteAddon(IProgressMonitor m) { + generateTraceMetamodelAndPlugin(m) + prepareManifest(m) + generateTraceManagementCode(m) + addExtensionPoint() + } + + private def void generateTraceMetamodelAndPlugin(IProgressMonitor m) { + +//TODO disabled for now, the whole approach must be adapted since Ecorext is not used anymore +// if (tracingAnnotations != null) { +// var Set classesToTrace = new HashSet +// var Set propertiesToTrace = new HashSet +// classesToTrace.addAll(tracingAnnotations.classestoTrace) +// propertiesToTrace.addAll(tracingAnnotations.propertiesToTrace) +// val filter = new ExtensionFilter(opsemanticsview, classesToTrace, propertiesToTrace) +// filter.execute() +// partialTraceManagement = filter.didFilterSomething +// } + + // Generate trace metamodel + val TraceMMGenerator tmmgenerator = new TraceMMGenerator(opsemanticsview, true) + tmmgenerator.computeAllMaterial + tmmgenerator.sortResult + tracemm = tmmgenerator.tracemmresult + + // Generate EMF project + val StandaloneEMFProjectGenerator emfGen = new StandaloneEMFProjectGenerator(pluginName, tracemm) + emfGen.generateBaseEMFProject(m) + val referencedGenPackagesRoots = emfGen.referencedGenPackages + this.genPackages = referencedGenPackagesRoots.map[findNestedGenpackages].flatten.toSet + + // At this point the wizard has created and reloaded a new resource with the trace metamodel + // We access this new metamodel/resource thanks to emfGen.rootPackages + // And we add add the missing gemoc getCaller implementations to the trace metamodel + tmmgenerator.addGetCallerEOperations(emfGen.rootPackages, genPackages) + emfGen.rootPackages.head.eResource.save(null) + + // Generate code + emfGen.generateModelCode(m) + this.project = emfGen.project + + // Finding the "src folder" in which to generate code + val IJavaProject javaProject = JavaCore.create(project) + val sourceFolders = EclipseUtil.findSrcFoldersOf(javaProject) + + // Now we need lots of things that require a monitor, so we do that in a dedicated action + // We use JDT to create the package folders from a string "xxx.yyy.zzz" + val IPackageFragmentRoot srcFolderFragment = javaProject.getPackageFragmentRoot(sourceFolders.get(0)); + packageFragment = srcFolderFragment.createPackageFragment(packageQN, true, m) + + + this.traceability = tmmgenerator.traceability + } + + private def void generateTraceManagementCode(IProgressMonitor m) { + + // Generate trace constructor + val TraceConstructorGeneratorJava tconstructorgen = new TraceConstructorGeneratorJava(languageName, + pluginName + ".tracemanager", tracemm, traceability, genPackages, + opsemanticsview.executionMetamodel, partialTraceManagement) + traceConstructorClassName = tconstructorgen.className + packageFragment.createCompilationUnit(traceConstructorClassName + ".java", tconstructorgen.generateCode, true, m) + + // Generate state manager + val StateManagerGeneratorJava statemanagergem = new StateManagerGeneratorJava(languageName, + pluginName + ".tracemanager", tracemm, traceability, genPackages) + stateManagerClassName = statemanagergem.className + packageFragment.createCompilationUnit(stateManagerClassName + ".java", statemanagergem.generateCode, true, m) + + // Getting java fragment to create classes + val IPackageFragment fragment = packageFragment + + // Generate trace engine addon class (same package as the trace manager) + val String prettyCode = CodeGenUtil.formatJavaCode(generateAddonClassCode()) + fragment.createCompilationUnit(className + ".java", prettyCode, true, m) + + // Generate step factory class (same package as the trace manager) + val String uglyFactoryCode = generateStepFactory + val String prettyCodeStepFactory = CodeGenUtil.formatJavaCode(uglyFactoryCode) + fragment.createCompilationUnit(stepFactoryClassName + ".java", prettyCodeStepFactory, true, m) + + } + + private def prepareManifest(IProgressMonitor m) { + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.emf.transaction") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.emf.compare") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.executionframework.engine") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.xtext") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.commons.eclipse") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.trace.gemoc") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.trace.gemoc.api") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.xdsmlframework.api") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.trace.commons.model") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.addon.multidimensional.timeline") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.timeline") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.trace.commons") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.xdsmlframework.api") + ManifestUtil.addToPluginManifest(project, m, "org.eclipse.gemoc.trace.commons.model") + ManifestUtil.setRequiredExecutionEnvironmentToPluginManifest(project, m, "JavaSE-1.8") + } + + private def void addExtensionPoint() { + + // Add extension point (taken from GemocLanguageDesignerBuilder) + this.project = project + val IFile pluginfile = project.getFile(PluginXMLHelper.PLUGIN_FILENAME); + PluginXMLHelper.createEmptyTemplateFile(pluginfile, false); + val PluginXMLHelper helper = new PluginXMLHelper(); + helper.loadDocument(pluginfile); + val Element extensionPoint = helper.getOrCreateExtensionPoint( + EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT); + updateDefinitionAttributeInExtensionPoint(extensionPoint, + EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_CLASS, packageQN + "." + className + ); + updateDefinitionAttributeInExtensionPoint(extensionPoint, + EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_DEFAULT, "false" + ); + updateDefinitionAttributeInExtensionPoint(extensionPoint, + EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_ID, pluginName + ); + updateDefinitionAttributeInExtensionPoint(extensionPoint, + EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_NAME, + tracedLanguageName + " MultiDimensional Trace" + ); + updateDefinitionAttributeInExtensionPoint(extensionPoint, + EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_SHORTDESCRIPTION, + "MultiDimensional Trace support dedicated to "+tracedLanguageName+" language" + ); + updateDefinitionAttributeInExtensionPoint(extensionPoint, + EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_OPENVIEWIDS, "org.eclipse.gemoc.addon.multidimensional.timeline.views.timeline.MultidimensionalTimeLineView" + ); + updateDefinitionAttributeInExtensionPoint(extensionPoint, + EngineAddonSpecificationExtensionPoint.GEMOC_ENGINE_ADDON_EXTENSION_POINT_ADDONGROUPID, "Sequential.AddonGroup" + ); + helper.saveDocument(pluginfile); + + } + + private def static Element updateDefinitionAttributeInExtensionPoint(Element extensionPoint, String atributeName, + String value) { + var Element result; + val String defName = "Addon" + val List elements = extensionPoint.getContent(new ElementFilter(defName)); + if (elements.size() == 0) { + + // create extension point + result = new Element(defName); + extensionPoint.addContent(result); + } else { + result = elements.get(0); + } + result.setAttribute(atributeName, value); + return result; + } + + private def String generateAddonClassCode() { + return '''package «packageQN»; + +import java.util.Map; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.gemoc.api.IStateManager; +import org.eclipse.gemoc.trace.gemoc.api.IStepFactory; +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; +import org.eclipse.gemoc.trace.gemoc.api.ITraceConstructor; +import org.eclipse.gemoc.trace.gemoc.traceaddon.AbstractTraceAddon; + +public class «className» extends AbstractTraceAddon { + + private «stepFactoryClassName» factory = null; + + @Override + public ITraceConstructor constructTraceConstructor(Resource modelResource, Resource traceResource, Map> exeToTraced) { + return new «traceConstructorClassName»(modelResource, traceResource, exeToTraced); + } + + @Override + public IStateManager> constructStateManager(Resource modelResource, Map, EObject> tracedToExe) { + return new «stateManagerClassName»(modelResource, tracedToExe); + } + + @Override + public IStepFactory getFactory() { + if (factory == null) + factory = new «stepFactoryClassName»(); + return factory; + } + + @Override + public boolean isAddonForTrace(EObject root) { + return root instanceof «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)»; + } + +}''' + } + + private def Set potentialCallerClasses(EClass stepCallerClass) { + val possibleCallerClasses = new HashSet + possibleCallerClasses.addAll(opsemanticsview.executionMetamodel.EClassifiers.filter(EClass)) + possibleCallerClasses.addAll(traceability.allMutableClasses) + val filtered = possibleCallerClasses.filter(EClass) + .filter[c|c.equals(stepCallerClass)||c.EAllSuperTypes.contains(stepCallerClass)] + .sortBy[name].toSet + return filtered + } + + private def String generateStepFactory() { + return ''' + + package «packageQN»; + + import java.util.List; + import org.eclipse.gemoc.trace.gemoc.api.IStepFactory; + + public class «stepFactoryClassName» implements IStepFactory { + + @Override + public org.eclipse.gemoc.trace.commons.model.trace.Step createStep(org.eclipse.gemoc.trace.commons.model.trace.MSE mse, List parameters, List result) { + + org.eclipse.gemoc.trace.commons.model.trace.Step step = null; +org.eclipse.emf.ecore.EClass ec = mse.getCaller().eClass(); +String stepRule = org.eclipse.gemoc.trace.commons.EcoreCraftingUtil.getFQN(ec, ".") + "." + + mse.getAction().getName(); + + «FOR Rule rule : opsemanticsview.rules.sortBy[baseFQN] SEPARATOR "else" AFTER "else"» + + «val stepCallerClass = rule.containingClass» + «val filtered = potentialCallerClasses(stepCallerClass)» + + «IF filtered.empty» + + if (stepRule.equalsIgnoreCase("«getBaseFQN(rule)»")) { + «ELSE» + if ( + mse.getAction().getName().equalsIgnoreCase("«rule.operation.name»") + && ( + «FOR possibleCallerClass: filtered SEPARATOR " || "» + ec.getClassifierID()== «EcoreCraftingUtil.stringClassifierID(possibleCallerClass, genPackages)» + «ENDFOR» + ) + ) + + { + «ENDIF» + step = «EcoreCraftingUtil.stringCreate(traceability.getStepClassFromStepRule(rule))»; + } + + «ENDFOR» + { + step = org.eclipse.gemoc.trace.commons.model.generictrace.GenerictraceFactory.eINSTANCE.createGenericSequentialStep(); + } + + org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence mseocc = org.eclipse.gemoc.trace.commons.model.trace.TraceFactory.eINSTANCE.createMSEOccurrence(); + mseocc.setMse(mse); + mseocc.getParameters().addAll(parameters); + mseocc.getResult().addAll(result); + step.setMseoccurrence(mseocc); + + return step; + } + } + ''' + } + + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/TraceAddonGeneratorIntegration.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/TraceAddonGeneratorIntegration.xtend new file mode 100644 index 000000000..595d7f456 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/TraceAddonGeneratorIntegration.xtend @@ -0,0 +1,138 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.generator + +import fr.inria.diverse.melange.metamodel.melange.Language +import fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace +import fr.inria.diverse.melange.ui.internal.MelangeActivator +import org.eclipse.gemoc.opsemanticsview.gen.OperationalSemanticsViewGenerator +import java.io.IOException +import opsemanticsview.OperationalSemanticsView +import org.eclipse.core.resources.IFile +import org.eclipse.core.resources.IProject +import org.eclipse.core.resources.IResource +import org.eclipse.core.resources.ResourcesPlugin +import org.eclipse.core.resources.WorkspaceJob +import org.eclipse.core.runtime.CoreException +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.core.runtime.IStatus +import org.eclipse.core.runtime.Platform +import org.eclipse.core.runtime.Status +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.resource.ResourceSet +import org.eclipse.xtext.ui.resource.IResourceSetProvider +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper + +/** + * Plenty of ways to call the generator in an eclipse context. + * Relies on a OperationalSemanticsViewGenerator found using an extension point. + */ +class TraceAddonGeneratorIntegration { + + static def void generateAddon(IFile melangeFile, String selectedLanguage, boolean replace, + IProgressMonitor monitor) { + // Computing output plugin name + val pluginName = MelangeXDSMLProjectHelper.baseProjectName(melangeFile.project) + "." + + selectedLanguage.toLowerCase + ".trace" + generateAddon(melangeFile, selectedLanguage, pluginName, replace, monitor) + } + + static def void generateAddon(IFile melangeFile, String selectedLanguage, String pluginName, boolean replace, + IProgressMonitor monitor) { + + // Loading Melange model + val URI uri = URI.createPlatformResourceURI(melangeFile.getFullPath().toString(), true); + val injector = MelangeActivator.getInstance().getInjector(MelangeActivator.FR_INRIA_DIVERSE_MELANGE_MELANGE) + val IResourceSetProvider provider = injector.getInstance(typeof(IResourceSetProvider)) + val ResourceSet resSet = provider.get(melangeFile.getProject()) + val Resource resource = resSet.getResource(uri, true) + val ModelTypingSpace root = resource.getContents().get(0) as ModelTypingSpace + val Language selection = root.elements.filter(Language).findFirst[name == selectedLanguage] + + // We find all extension points + val configNew = Platform.getExtensionRegistry().getConfigurationElementsFor( + "org.eclipse.gemoc.opsemanticsview.gen"); + + // Using them, we instantiate objects and look for one that can work with the current selected language + val OperationalSemanticsViewGenerator validViewGenerator = configNew.map [ e | + e.createExecutableExtension("class") + ].filter(OperationalSemanticsViewGenerator).findFirst [ conf | + conf.canHandle(selection, melangeFile.project) + ] + + // If we find one, we generate + if (validViewGenerator != null) { + val OperationalSemanticsView mmextension = validViewGenerator.generate(selection, melangeFile.project); + generateAddon(selectedLanguage, pluginName, replace, monitor, mmextension) + + } // Otherwise, we error + else { + throw new CoreException( + new Status( + Status. + ERROR, + "org.eclipse.gemoc.trace.gemoc.generator", + "Impossible to create a trace addon: couldn't find an opsemanticsview generator that can manage the chosen melange language." + )); + } + + } + + /** + * Central operation of the class, that calls business operations + */ + public static def void generateAddon(String mmName, String pluginName, boolean replace, IProgressMonitor monitor, + OperationalSemanticsView executionExtension) throws CoreException { + + // We look for an existing project with this name + val IProject existingProject = ResourcesPlugin.getWorkspace().getRoot().getProject(pluginName); + if (existingProject.exists()) { + + // If we replace, we delete most of its content + // (we keep the original project in order to be able to replace the project even if it was imported in the workspace) + if (replace) { + // existingProject.delete(true, monitor); + val WorkspaceJob job = new WorkspaceJob("deleting project " + existingProject.name + " content") { + override public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException { + for (IResource iRes : existingProject.members) { + if (!(iRes.name.equals(".project") || iRes.name.equals(".classpath"))) { + iRes.delete(true, monitor); + } + } + return Status.OK_STATUS; + } + }; + job.setRule(existingProject); + job.schedule(); + } // Else, error + else { + throw new CoreException( + new Status(Status.ERROR, "org.eclipse.gemoc.trace.gemoc.generator", + "Impossible to create a trace addon: a project already exists with this name.")); + } + } + + try { + + // Then we call all our business operations + // TODO handle languages defined with multiple ecores + val GenericEngineTraceAddonGenerator traceaddgen = new GenericEngineTraceAddonGenerator(executionExtension, + pluginName); + traceaddgen.generateCompleteAddon(monitor); + } catch (IOException e) { + + // TODO Do real error handling + e.printStackTrace(); + } + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/codegen/StateManagerGeneratorJava.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/codegen/StateManagerGeneratorJava.xtend new file mode 100644 index 000000000..7db5b7306 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/codegen/StateManagerGeneratorJava.xtend @@ -0,0 +1,229 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.generator.codegen + +import org.eclipse.gemoc.trace.commons.CodeGenUtil +import org.eclipse.gemoc.trace.commons.EcoreCraftingUtil +import org.eclipse.gemoc.trace.metamodel.generator.TraceMMGenerationTraceability +import java.util.Set +import org.eclipse.emf.codegen.ecore.genmodel.GenPackage +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EClassifier +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EReference +import org.eclipse.emf.ecore.EStructuralFeature + +class StateManagerGeneratorJava { + + // Inputs + private val String className + private val String packageQN + private val EPackage traceMM + private val TraceMMGenerationTraceability traceability + private val Set refGenPackages + + // Shortcuts + private val String stateFQN + private val String valueFQN + + private boolean getTracedToExeUsed = false + + public def String getClassName() { + return className + } + + new(String languageName, String packageQN, EPackage traceMM, TraceMMGenerationTraceability traceability, Set refGenPackages) { + this.traceMM = traceMM + this.className = languageName.replaceAll(" ", "").toFirstUpper + "StateManager" + this.packageQN = packageQN + this.traceability = traceability + this.refGenPackages = refGenPackages + + stateFQN = getJavaFQN(traceability.traceMMExplorer.getSpecificStateClass) + valueFQN = getJavaFQN(traceability.traceMMExplorer.specificValueClass) + } + + private def String getFQN(EStructuralFeature eFeature) { + return EcoreCraftingUtil.getBaseFQN(eFeature.getEContainingClass) + "." + eFeature.name + } + + private def String getJavaFQN(EClassifier c) { + return getJavaFQN(c,false) + } + + private def String getJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { + return EcoreCraftingUtil.getJavaFQN(c,refGenPackages,enforcePrimitiveJavaClass) + } + + public def String generateCode() { + val String code = generateStateManagerClass() + try { + return CodeGenUtil.formatJavaCode(code) + } catch (Throwable t) { + return code + } + } + + private def String stringGetterExeValue(String javaVarName, EStructuralFeature p, EClass typeToCastTo) { + return ''' + «IF (p instanceof EReference && traceability.hasTracedClass(p.getEType as EClass))» + + ««« If many elements are in this fields, we have to cast the element with a collection + «IF p.many» + (Collection) + «ELSE» + («getJavaFQN(p.getEType, true)») + «ENDIF» + «getTracedToExeMethodName»(((«getJavaFQN(typeToCastTo)») «javaVarName»).«EcoreCraftingUtil.stringGetter(p)») + «ELSE» + ((«getJavaFQN(typeToCastTo)») «javaVarName»).«EcoreCraftingUtil.stringGetter(p)» + «ENDIF»''' + } + + + private def String getTracedToExeMethodName() { + getTracedToExeUsed = true + return "getTracedToExe" + } + + private def String generateImports() { + return + ''' + import java.util.ArrayList; + import java.util.Collection; + import java.util.Map; + + import org.eclipse.emf.ecore.EObject; + import org.eclipse.emf.ecore.resource.Resource; + import org.eclipse.emf.transaction.RecordingCommand; + import org.eclipse.emf.transaction.TransactionalEditingDomain; + import org.eclipse.emf.transaction.util.TransactionUtil; + import org.eclipse.gemoc.executionframework.engine.core.CommandExecution; + + import org.eclipse.gemoc.trace.commons.model.trace.State; + import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; + import org.eclipse.gemoc.trace.gemoc.api.IStateManager; + ''' + } + + private def String generateFields() { + return + ''' + private final Resource modelResource; + + private final Map, EObject> tracedToExe; + ''' + } + + private def String generateConstructors() { + return + ''' + public «className»(Resource modelResource, Map, EObject> tracedToExe) { + this.modelResource = modelResource; + this.tracedToExe = tracedToExe; + } + ''' + } + + private def String generateMethods() { + return + ''' + @Override + public void restoreState(State state) { + if (modelResource != null && state instanceof «stateFQN») { + try { + final TransactionalEditingDomain ed = TransactionUtil.getEditingDomain(modelResource); + if (ed != null) { + final RecordingCommand command = new RecordingCommand(ed, "") { + protected void doExecute() { + restoreStateExecute((«stateFQN») state); + } + }; + CommandExecution.execute(ed, command); + } + } catch (Exception e) { + throw e; + } + } + } + + private EObject getTracedToExe(EObject tracedObject) { + return tracedToExe.get(tracedObject); + } + + private Collection getTracedToExe(Collection tracedObjects) { + Collection result = new ArrayList(); + for (EObject tracedObject : tracedObjects) { + result.add(tracedToExe.get(tracedObject)); + } + return result; + } + + @SuppressWarnings("unchecked") + private void restoreStateExecute(«stateFQN» state) { + for («valueFQN» value : state.getValues()) { + «FOR p : traceability.allMutableProperties.sortBy[getFQN] SEPARATOR "else"» + «val EReference pdimension = traceability.getDimensionRef(p)» + «val EClass tracedObjectClass = pdimension.getEContainingClass» + «val EClass valueClass = traceability.getValueClass(p)» + if (value instanceof «getJavaFQN(valueClass)») { + final «getJavaFQN(tracedObjectClass)» tracedObject = («getJavaFQN(tracedObjectClass)») value.eContainer().eContainer(); + «IF traceability.newClasses.contains(p.eContainer as EClass)» + «val extendedClass = p.eContainer as EClass » + final «getJavaFQN(extendedClass)» originalObject = («getJavaFQN(extendedClass)») tracedToExe.get(tracedObject); + «IF p.many» + originalObject.«EcoreCraftingUtil.stringGetter(p)».clear(); + originalObject.«EcoreCraftingUtil.stringGetter(p)».addAll(«stringGetterExeValue("value", p, valueClass)»); + «ELSE» + final «getJavaFQN(p.getEType)» toSet = «stringGetterExeValue("value", p, valueClass)»; + final «getJavaFQN(p.getEType)» current = originalObject.«EcoreCraftingUtil.stringGetter(p)»; + if (current != toSet) { + originalObject.«EcoreCraftingUtil.stringSetter(p, "toSet", refGenPackages)»; + } + «ENDIF» + «ELSEIF p.eContainer instanceof EClass» + «val containingClass = p.getEContainingClass» + «getJavaFQN(containingClass)» exeObject = («getJavaFQN(containingClass)») «getTracedToExeMethodName»(tracedObject); + «IF p.many» + exeObject.«EcoreCraftingUtil.stringGetter(p)».clear(); + «IF p instanceof EReference» + exeObject.«EcoreCraftingUtil.stringGetter(p)».addAll((Collection) «getTracedToExeMethodName»(((«getJavaFQN(valueClass)») value).«EcoreCraftingUtil.stringGetter(p)»)); + «ELSE» + exeObject.«EcoreCraftingUtil.stringGetter(p)».addAll((Collection) ((«getJavaFQN(valueClass)») value).«EcoreCraftingUtil.stringGetter(p)»); + «ENDIF» + «ELSE» + exeObject.«EcoreCraftingUtil.stringSetter(p, stringGetterExeValue("value", p, valueClass), refGenPackages)»; + «ENDIF» + «ENDIF» + } + «ENDFOR» + } + } + ''' + } + + private def String generateStateManagerClass() { + return + ''' + package «packageQN»; + + «generateImports» + + public class «className» implements IStateManager> { + + «generateFields» + «generateConstructors» + «generateMethods» + } + ''' + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/codegen/TraceConstructorGeneratorJava.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/codegen/TraceConstructorGeneratorJava.xtend new file mode 100644 index 000000000..b1b1b1436 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/codegen/TraceConstructorGeneratorJava.xtend @@ -0,0 +1,817 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.generator.codegen + +import org.eclipse.gemoc.trace.commons.CodeGenUtil +import org.eclipse.gemoc.trace.commons.EcoreCraftingUtil +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage +import org.eclipse.gemoc.trace.metamodel.generator.TraceMMGenerationTraceability +import java.util.ArrayList +import java.util.Collection +import java.util.HashSet +import java.util.List +import java.util.Set +import opsemanticsview.Rule +import org.eclipse.emf.codegen.ecore.genmodel.GenPackage +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EClassifier +import org.eclipse.emf.ecore.EOperation +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EReference +import org.eclipse.emf.ecore.EStructuralFeature + +class TraceConstructorGeneratorJava { + + // Inputs + private val String className + private val String packageQN + private val EPackage traceMM + private val EPackage abstractSyntax + private val TraceMMGenerationTraceability traceability + private val Set refGenPackages + private val boolean partialTraceManagement + + // Transient + private boolean getExeToTracedUsed = false + + + // Shortcuts + private val EClass stateClass + private val EClass specificStepClass + + private val String stateFQN + private val String specificStepFQN + + public def String getClassName() { + return className + } + + new(String languageName, String packageQN, EPackage traceMM, TraceMMGenerationTraceability traceability, + Set refGenPackages, EPackage abstractSyntax, boolean partialTraceManagement) { + this.traceMM = traceMM + this.className = languageName.replaceAll(" ", "").toFirstUpper + "Constructor" + this.packageQN = packageQN + this.traceability = traceability + this.refGenPackages = refGenPackages + this.abstractSyntax = abstractSyntax + this.stateClass = traceability.traceMMExplorer.getSpecificStateClass + this.specificStepClass = traceability.traceMMExplorer.getSpecificStepClass + this.partialTraceManagement=partialTraceManagement + this.stateFQN = getJavaFQN(stateClass) + this.specificStepFQN = getJavaFQN(specificStepClass) + } + + private def Set findAllDirectSubTypes(EClass clazz) { + traceability.allMutableClasses.filter[c|c.ESuperTypes.contains(clazz)].toSet + } + + private def String getFQN(EStructuralFeature eFeature) { + return EcoreCraftingUtil.getBaseFQN(eFeature.EContainingClass) + "." + eFeature.name + } + + private static def boolean isNotSuperTypeOf(EClass c, Collection eclasses) { + for (eclass : eclasses) { + if (eclass.EAllSuperTypes.contains(c)) + return false + } + return true + } + + + private def String getTracedJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { + if (c instanceof EClass) { + val tracedClass = traceability.getTracedClass(c) + if (tracedClass != null) + return getJavaFQN(traceability.getTracedClass(c),enforcePrimitiveJavaClass) + else + return getJavaFQN(c,enforcePrimitiveJavaClass) + } else { + return getJavaFQN(c,enforcePrimitiveJavaClass) + } + } + + private def String getJavaFQN(EClassifier c) { + return getJavaFQN(c,false) + } + + private def String getJavaFQN(EClassifier c, boolean enforcePrimitiveJavaClass) { + return EcoreCraftingUtil.getJavaFQN(c,refGenPackages,enforcePrimitiveJavaClass) + } + + + private def String stringSetter(EStructuralFeature f, String value) { + EcoreCraftingUtil.stringSetter(f,value,refGenPackages) + } + + + private static def Set findTopSuperClasses(Iterable eclasses) { + val res = new HashSet + for (c : eclasses) { + // TODO ugly fix to not include AS classes in the XMOF case, to remove at some point + val filtered = c.ESuperTypes.filter[s|! ( c.name.endsWith("Configuration") && c.name.startsWith(s.name))] + if (filtered.empty) { + res.add(c) + } else { + val candidates = findTopSuperClasses(filtered) + res.addAll(candidates) + } + } + return res + } + + private static def List partialOrderSort (Iterable eclasses) { + val List result = new ArrayList + for (ci : eclasses) { + if (result.isEmpty) + result.add(ci) + else { + var boolean found = false + for (var int i = 0; i < result.size && !found; i++) { + val Set followings = result.subList(i, result.size).toSet + if (ci.isNotSuperTypeOf(followings)) { + result.add(i, ci) + found = true + } + } + + if (!found) + result.add(ci) + } + } + return result + + } + + public def String generateCode() { + val String code = generateTraceConstructorClass() + try { + return CodeGenUtil.formatJavaCode(code) + } catch (Throwable t) { + return code + } + } + + + + + public static def String getBaseFQN(Rule r) { + val EOperation o = r.operation + val EClass c = r.containingClass + return EcoreCraftingUtil.getBaseFQN(c) + "." + o.name + } + + + private def String stringGetterTracedValue(String javaVarName, EStructuralFeature p) { + val pRealType = p.EType + if (p instanceof EReference && traceability.hasTracedClass(pRealType as EClass)) { + return ''' + ((«getJavaFQN(traceability.getTracedClass(pRealType as EClass))»)exeToTraced.get(«javaVarName».«EcoreCraftingUtil.stringGetter(p)»)) + ''' + } else { + return javaVarName + "." + EcoreCraftingUtil.stringGetter(p) + } + } + + private def Set getAllMutablePropertiesOf(EClass exeClass) { + val Set res = new HashSet + res.addAll(traceability.getMutablePropertiesOf(exeClass)) + res.addAll(exeClass.EAllSuperTypes.map[s|traceability.getMutablePropertiesOf(s)].flatten.toSet); + return res + } + + + + private def String generateImports() { + return + ''' + «IF getExeToTracedUsed» + import java.util.ArrayList; + «ENDIF» + import java.util.Collection; + import java.util.Deque; + import java.util.HashSet; + import java.util.LinkedList; + import java.util.List; + import java.util.Map; + import java.util.Set; + + import org.eclipse.emf.common.util.TreeIterator; + import org.eclipse.emf.common.util.URI; + import org.eclipse.emf.ecore.EObject; + import org.eclipse.emf.ecore.resource.Resource; + + import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; + import org.eclipse.gemoc.trace.commons.model.trace.MSEModel; + import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; + import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; + import org.eclipse.gemoc.trace.gemoc.api.ITraceConstructor; + ''' + } + + private def String generateFields() { + return + ''' + private «getJavaFQN(traceability.traceMMExplorer.getSpecificTraceClass)» traceRoot; + private MSEModel mseModel; + private Resource executedModel; + private final Map> exeToTraced; + + private «stateFQN» lastState; + + private Resource traceResource; + private final Deque<«specificStepFQN»> context = new LinkedList<«specificStepFQN»>(); + ''' + } + + private def String generateConstructor() { + return + ''' + public «className» (Resource exeModel, Resource traceResource, Map> exeToTraced) { + this.traceResource = traceResource; + this.executedModel = exeModel; + this.exeToTraced = exeToTraced; + } + ''' + } + + + private def String getExeToTracedMethodName() { + getExeToTracedUsed = true + return "getExeToTraced" + } + + + + private def String stringFeatureID(EStructuralFeature p) { + val containingClass = if (p.eContainer instanceof EClass) p.eContainer as EClassifier + return EcoreCraftingUtil.stringFeatureID(p,containingClass,refGenPackages) + } + + private def String generateGetAllResourcesMethod() { + return + ''' + private Set getAllExecutedModelResources() { + Set allResources = new HashSet<>(); + allResources.add(executedModel); + allResources.addAll(org.eclipse.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(executedModel)); + allResources.removeIf(r -> r == null || (r != executedModel && executedModel.getContents().contains(r.getContents().get(0)))); + return allResources; + } + ''' + } + + private def String generateAddInitialStateMethod() { + return ''' + + private void addInitialState() { + if (lastState == null) { + // Creation of the initial state + Set allResources = getAllExecutedModelResources(); + lastState = «EcoreCraftingUtil.stringCreate(stateClass)»; + for (Resource r : allResources) { + for (TreeIterator i = r.getAllContents(); i.hasNext();) { + EObject o = i.next(); + «FOR c : partialOrderSort(findTopSuperClasses(traceability.allMutableClasses.filter[c|!c.isAbstract].sortBy[name].toSet)) SEPARATOR "else"» + + if (o instanceof «getJavaFQN(c)») { + «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; + addNewObjectToState(o_cast, lastState); + } + «ENDFOR» + } + } + this.traceRoot.getStates().add(lastState); + }} + ''' + } + + private def boolean shouldHaveAddNewObjectToStateMethod(EClassifier c){ + if (c instanceof EClass) { + shouldHaveAddNewObjectToStateMethod(c) + } else + false + } + + private def boolean shouldHaveAddNewObjectToStateMethod(EClass c){ + val subTypes = findAllDirectSubTypes(c) + + if (traceability.allMutableClasses.contains(c) && !c.abstract) + return true + if (subTypes.empty && c.abstract) + return false + else if (!subTypes.empty && c.abstract) { + val validSubTypes = subTypes.filter[s|shouldHaveAddNewObjectToStateMethod(s)] + if (!validSubTypes.empty) + return true + } + + return false + } + + private def String generateAddNewObjectToStateMethods() { + return + ''' +«FOR c : traceability.allMutableClasses.sortBy[name]» +«««»«FOR c : partialOrderSort(getAllNonEmptyMutableClasses.filter[c|!c.isAbstract].sortBy[name].toList)» +«val traced = traceability.getTracedClass(c)» +«val subTypes = partialOrderSort(findAllDirectSubTypes(c))» +«IF shouldHaveAddNewObjectToStateMethod(c)» +«IF getAllMutablePropertiesOf(c).exists[p|p instanceof EReference && p.many]» +@SuppressWarnings("unchecked") +«ENDIF» +private boolean addNewObjectToState(«getJavaFQN(c)» o_cast, «stateFQN» newState) { +boolean added = false; +«val subTypesWithMethods = subTypes.filter[sub|shouldHaveAddNewObjectToStateMethod(sub)]» +«FOR subType : subTypesWithMethods SEPARATOR " else " » + if (o_cast instanceof «getJavaFQN(subType)») { + added = addNewObjectToState((«getJavaFQN(subType)»)o_cast, newState); + } +«ENDFOR» + +«IF ! c.abstract» + +if (!added && !exeToTraced.containsKey(o_cast)) { + «getJavaFQN(traced)» tracedObject = «EcoreCraftingUtil.stringCreate(traced)»; + «val Set origRefs1 = traceability.getRefs_originalObject(traced)» + «FOR EReference origRef : origRefs1.sortBy[name]» + tracedObject.«stringSetter(origRef, "o_cast")»; + «ENDFOR» + exeToTraced.put(o_cast, tracedObject); + traceRoot.getTracedObjects().add(tracedObject); + + «FOR p : getAllMutablePropertiesOf(c).sortBy[FQN]» + «val EClass pdimensionClass = traceability.getDimensionClass(p)» + «val EReference pdimensionRef = traceability.getDimensionRef(p)» + «val EClass valueClass = traceability.getValueClass(p)» + «val valueProperty = traceability.getValuePropertyOfMutableProperty(p)» + + // Creation of the dimension corresponding to the field «p.name» + tracedObject.«EcoreCraftingUtil.stringSetter(pdimensionRef, EcoreCraftingUtil.stringCreate(pdimensionClass))»; + // Creation of the first value of the field «p.name» + «getJavaFQN(valueClass)» firstValue_«p.name» = «EcoreCraftingUtil.stringCreate(valueClass)»; + + «IF p.many» + + «IF p instanceof EReference» + + + «IF shouldHaveAddNewObjectToStateMethod(p.EType)» + for(«getJavaFQN(p.EType)» aValue : o_cast.«EcoreCraftingUtil.stringGetter(p)») { + addNewObjectToState((«getJavaFQN(p.EType)»)aValue, newState); + } + «ENDIF» + + firstValue_«p.name».«EcoreCraftingUtil.stringGetter(p)».addAll + ( + (Collection) + «IF traceability.allMutableClasses.contains(p.EType)» + «getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)», newState) + «ELSE» + o_cast.«EcoreCraftingUtil.stringGetter(p)» + «ENDIF» + ); + «ELSE» ««« If attribute + firstValue_«p.name».«EcoreCraftingUtil.stringGetter(p)».addAll + ((Collection) o_cast.«EcoreCraftingUtil.stringGetter(p)»); + «ENDIF» ««« End IF EReference + + + «ELSE» ««« If !many + + «IF p instanceof EReference» + «val realMutableType = p.EType» + if (o_cast.«EcoreCraftingUtil.stringGetter(p)» != null) { + «IF shouldHaveAddNewObjectToStateMethod(realMutableType)» + addNewObjectToState((«getJavaFQN(realMutableType)»)o_cast.«EcoreCraftingUtil.stringGetter(p)», newState); + firstValue_«p.name».«stringSetter(valueProperty,stringGetterTracedValue("o_cast", p))»; + «ELSE» + firstValue_«p.name».«stringSetter(valueProperty,"o_cast."+EcoreCraftingUtil.stringGetter(p))»; + «ENDIF» ««« End IF traceability.isSomehowMutable(p.EType) + } else { + firstValue_«p.name».«stringSetter(valueProperty,"null")»; + } + + «ELSE» ««« If attribute + firstValue_«p.name».«stringSetter(valueProperty,"o_cast."+EcoreCraftingUtil.stringGetter(p))»; + «ENDIF» ««« End IF EReference + «ENDIF» ««« End IF p.many + + tracedObject.«EcoreCraftingUtil.stringGetter(pdimensionRef)».getValues().add(firstValue_«p.name»); + newState.getValues().add(firstValue_«p.name»); + +«ENDFOR» ««« End FOR p : getAllMutableProperties +} // end if (!exeToTraced.containsKey +«ENDIF» ««« End IF ! c.abstract» +return added; +}// end addNewObjectToState +«ENDIF» +«ENDFOR» ««« end FOR c : traceability.allMutableClasses.sortBy[name] +''' + } + +private def String generateAddStateUsingListenerMethods() { + val newClassesNotEmpty = traceability.getNewClasses.filter[c|!c.EStructuralFeatures.empty].toSet + val newAbstractClassesNotEmpty = partialOrderSort(newClassesNotEmpty.filter[c|!c.isAbstract].toSet) + val newConcreteClassesNotEmpty = traceability.getNewClasses.filter[c| + val superTypes = new ArrayList(c.EAllSuperTypes) + superTypes.retainAll(newAbstractClassesNotEmpty) + return !c.isAbstract && (!c.EStructuralFeatures.empty || !superTypes.empty) + ].toList + val mutableClassesWithNonCollectionMutableFields = traceability.allMutableClasses.filter[c|!traceability.getMutablePropertiesOf(c).empty && traceability.getMutablePropertiesOf(c).exists[p|!p.many]] + val mutableClassesWithCollectionMutableFields = traceability.allMutableClasses.filter[c|!traceability.getMutablePropertiesOf(c).empty && traceability.getMutablePropertiesOf(c).exists[p|p.many]] + return + ''' + private boolean copiedState = false; + + private «stateFQN» copyState(«stateFQN» oldState) { + «stateFQN» newState = «EcoreCraftingUtil.stringCreate(stateClass)»; + newState.getValues().addAll(oldState.getValues()); + copiedState = true; + return newState; + } + + @SuppressWarnings("unchecked") + @Override + public void addState(List changes) { + if (lastState == null) { + addInitialState(); + }««« end if laststate null + else if (!changes.isEmpty()) { + boolean stateChanged = false; + // We start by a (shallow) copy of the last state + // But we will have to rollback a little by replacing values that changed + «stateFQN» newState = copyState(lastState); + for (org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange modelChange : changes) { + EObject o = modelChange.getChangedObject(); + «IF !newConcreteClassesNotEmpty.empty» + // We only look at constructable objects that have mutable fields + // Here we have nothing to rollback, just a new object to add + if (modelChange instanceof org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NewObjectModelChange) { + stateChanged = true; + ««« Loop over all classes that may be constructed and that have mutable fields + «FOR c : partialOrderSort(findTopSuperClasses(newConcreteClassesNotEmpty)).filter[c|shouldHaveAddNewObjectToStateMethod(c)]» + if (o instanceof «getJavaFQN(c)») { + «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; + addNewObjectToState(o_cast, newState); + } ««« end if instanceof + «ENDFOR» + }««« end if NewObjectModelChange + + // We only look at constructable objects that have mutable fields + // Here we must rollback to remove the values of the removed object from the copied state + else if (modelChange instanceof org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.RemovedObjectModelChange) { + stateChanged = true; + ««« Loop over all classes that may type something constructed and that have mutable fields + «FOR c : partialOrderSort(newClassesNotEmpty)» + «val traced = traceability.getTracedClass(c)» + if (o instanceof «getJavaFQN(c)») { + «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; + «getJavaFQN(traced)» traced = («getJavaFQN(traced)») exeToTraced.get(o_cast); + ««« Loop over the fields of this class, which are all mutable + «FOR p : c.EStructuralFeatures» + «val EReference pdimension = traceability.getDimensionRef(p)» + newState.getValues().remove(traced.«EcoreCraftingUtil.stringGetter(pdimension)».getValues().get(traced.«EcoreCraftingUtil.stringGetter(pdimension)».getValues().size()-1)); + «ENDFOR» + }««« end if instanceof + «ENDFOR» + }««« end if RemovedObjectModelChange + «ENDIF» + «IF !mutableClassesWithNonCollectionMutableFields.empty» + // Here we must look at non-collection mutable fields + // We must rollback the last values from the copied state, and add new values as well + // ie. mix of remove and new + «IF !newConcreteClassesNotEmpty.empty» else «ENDIF» if (modelChange instanceof org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange) { + stateChanged = true; + + org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange modelChange_cast = (org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange) modelChange; + «EStructuralFeature.canonicalName » p = modelChange_cast.getChangedField(); + «FOR c : partialOrderSort(mutableClassesWithNonCollectionMutableFields)» + «val nonCollectionMutableFields = traceability.getMutablePropertiesOf(c).filter[p|!p.many]» + + «val traced = traceability.getTracedClass(c)» + if (o instanceof «getJavaFQN(c)») { + «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; + + «FOR p : nonCollectionMutableFields SEPARATOR " else "» + + «val EClass valueClass = traceability.getValueClass(p)» + «val EReference pdimension = traceability.getDimensionRef(p)» + + if (p.getFeatureID() == «stringFeatureID(p)») { + + // Rollback: we remove the last value of this field from the new state + «getJavaFQN(traced)» traced = («getJavaFQN(traced)») exeToTraced.get(o); + «getJavaFQN(valueClass)» lastValue = traced.«EcoreCraftingUtil.stringGetter(pdimension)».getValues().get(traced.«EcoreCraftingUtil.stringGetter(pdimension)».getValues().size()-1); + newState.getValues().remove(lastValue); + + // And we create a proper new value + «getJavaFQN(valueClass)» newValue = «EcoreCraftingUtil.stringCreate(valueClass)»; + «val valueProperty = traceability.getValuePropertyOfMutableProperty(p)» + + «IF p instanceof EReference && shouldHaveAddNewObjectToStateMethod(p.EType)» + «getJavaFQN(valueProperty.EType)» value = null; + if (o_cast.«EcoreCraftingUtil.stringGetter(p)» != null) { + addNewObjectToState(o_cast.«EcoreCraftingUtil.stringGetter(p)», newState); + value = «stringGetterTracedValue("o_cast", p)»; + } + «ELSE» + «getJavaFQN(valueProperty.EType)» value = o_cast.«EcoreCraftingUtil.stringGetter(p)»; + «ENDIF» + + newValue.«stringSetter(valueProperty,"value")»; + + traced.«EcoreCraftingUtil.stringGetter(pdimension)».getValues().add(newValue); +««« newState.«EcoreCraftingUtil.stringGetter(pvalues)».add(newValue); + newState.getValues().add(newValue); + } + ««« end if feature id + «ENDFOR» + } + ««« end if instance of + «ENDFOR» + } + ««« end if NonCollectionFieldModelChange + «ENDIF» + «IF !mutableClassesWithCollectionMutableFields.empty» + // Here we look at collection mutable fields + // We must first manually find out if the collection changed... + // If it changed we must rollback the last values from the copied state, and add new values as well + «IF !newConcreteClassesNotEmpty.empty || !mutableClassesWithNonCollectionMutableFields.empty » else «ENDIF» if (modelChange instanceof org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange) { + org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange modelChange_cast = (org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange) modelChange; + «EStructuralFeature.canonicalName » p = modelChange_cast.getChangedField(); + «FOR c : partialOrderSort(mutableClassesWithCollectionMutableFields) » + «val collectionMutableFields = traceability.getMutablePropertiesOf(c).filter[p|p.many]» + «val traced = traceability.getTracedClass(c)» + if (o instanceof «getJavaFQN(c)») { + «getJavaFQN(c)» o_cast = («getJavaFQN(c)») o; + «getJavaFQN(traced)» tracedObject = («getJavaFQN(traced)») exeToTraced.get(o_cast); + «FOR p : collectionMutableFields SEPARATOR " else "» + «val EClass valueClass = traceability.getValueClass(p)» + «val EReference pdimension = traceability.getDimensionRef(p)» + if (p.getFeatureID() == «stringFeatureID(p)») { + // We compare the last collection in the value sequence, and the current one in the potentially changed object + List<«getJavaFQN(valueClass)»> valueSequence = tracedObject.«EcoreCraftingUtil.stringGetter(pdimension)».getValues(); + «getJavaFQN(valueClass)» previousValue = null; + if (!valueSequence.isEmpty()) { + previousValue = valueSequence.get(valueSequence.size() - 1); + } + ««« If instances of new class, we have to make sure that there are traced versions + «IF shouldHaveAddNewObjectToStateMethod(p.EType)» + for(«getJavaFQN(p.EType)» aValue : o_cast.«EcoreCraftingUtil.stringGetter(p)») { + addNewObjectToState((«getJavaFQN(p.EType)»)aValue, newState); + }««« end for loop on values + «ENDIF» + boolean change = false; + if (previousValue != null) { + if (previousValue.«EcoreCraftingUtil.stringGetter(p)».size() == o_cast + .«EcoreCraftingUtil.stringGetter(p)».size()) { + ««« We this is an ordered collection, we have to compare in the correct order + «IF p.ordered» + java.util.Iterator<«getJavaFQN(p.EType,true)»> it = o_cast.«EcoreCraftingUtil.stringGetter(p)».iterator(); + for («getTracedJavaFQN(traceability.getValuePropertyOfMutableProperty(p).EType,true)» aPreviousValue : previousValue + .«EcoreCraftingUtil.stringGetter(p)») { + «getJavaFQN(p.EType)» aCurrentValue = it.next(); + «IF p instanceof EReference» + if (aPreviousValue != exeToTraced.get(aCurrentValue)) + «ELSE» + if (!aPreviousValue.equals(aCurrentValue)) + «ENDIF» + { + change = true; + break; + } + } + ««« Else we simply check that the content is the same + «ELSE» + change = !previousValue.«EcoreCraftingUtil.stringGetter(p)».containsAll(«getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)»), newState); + «ENDIF» + ««« end case ordered + }««« end if same size + else { + change = true; + }««« end else + } else { + change = true; + }««« end else + if (change) { + stateChanged = true; + // Rollback: we remove the last value of this field from the new state + «getJavaFQN(valueClass)» lastValue = tracedObject.«EcoreCraftingUtil.stringGetter(pdimension)».getValues().get(tracedObject.«EcoreCraftingUtil.stringGetter(pdimension)».getValues().size()-1); +««« newState.«EcoreCraftingUtil.stringGetter(pvalues)».remove(lastValue); + newState.getValues().remove(lastValue); + // And we create a proper new value + «getJavaFQN(valueClass)» newValue = «EcoreCraftingUtil.stringCreate(valueClass)»; + «val valueProperty = traceability.getValuePropertyOfMutableProperty(p)» + «IF p.many» + «IF p instanceof EReference» + newValue.«EcoreCraftingUtil.stringGetter(valueProperty)».addAll + ((Collection) «getExeToTracedMethodName»(o_cast.«EcoreCraftingUtil.stringGetter(p)», newState)); + «ELSE» + newValue.«EcoreCraftingUtil.stringGetter(valueProperty)».addAll + ((Collection) o_cast.«EcoreCraftingUtil.stringGetter(p)»); + «ENDIF» + «ELSE» + newValue.«stringSetter(valueProperty,stringGetterTracedValue("o_cast", p))»; + «ENDIF» + tracedObject.«EcoreCraftingUtil.stringGetter(pdimension)».getValues().add(newValue); +««« newState.«EcoreCraftingUtil.stringGetter(pvalues)».add(newValue); + newState.getValues().add(newValue); + }««« end if change + }««« end if featureid + «ENDFOR» + } ««« end if instanceof + «ENDFOR» + }««« end if PotentialCollectionFieldModelChange + «ENDIF» + }««« end for all changes + if (stateChanged) { + final «specificStepFQN» currentStep = context.peekFirst(); + if (currentStep != null && currentStep instanceof «getJavaFQN(TracePackage.eINSTANCE.bigStep)») { + final «stateFQN» startingState = lastState; + final «stateFQN» endingState = newState; + addImplicitStep(currentStep, startingState, endingState); + } + lastState = newState; + traceRoot.getStates().add(lastState); +««« traceRoot.«EcoreCraftingUtil.stringGetter(TraceMMStrings.ref_TraceToStates)».add(lastState); + }««« end if (stateChanged) + else if (copiedState) { + «FOR p : traceability.allMutableProperties.sortBy[FQN]» +««« newState.«EcoreCraftingUtil.stringGetter(traceability.getStateClassToValueClass(p))».clear(); + newState.getValues().clear(); + «ENDFOR» + } + copiedState = false; + }««« end if (!changes.isEmpty()) + }««« end method + ''' + } + + + private def String generateAddStepMethods() { + return + ''' + «val stepRules = traceability.mmext.rules» + @SuppressWarnings("unchecked") + @Override + public void addStep(org.eclipse.gemoc.trace.commons.model.trace.Step step) { + «specificStepFQN» step_cast = null; + if (step != null && step instanceof «specificStepFQN») { + step_cast = («specificStepFQN») step; + if (mseModel == null) { + mseModel = org.eclipse.gemoc.trace.commons.model.trace.TraceFactory.eINSTANCE.createMSEModel(); + traceResource.getContents().add(mseModel); + } + mseModel.getOwnedMSEs().add(step_cast.getMseoccurrence().getMse()); + + // Creating generic (or almost generic) links + «stateFQN» state = traceRoot.getStates().get(traceRoot.getStates().size()-1); + step_cast.setStartingState(state); + if (!context.isEmpty() && context.getFirst() != null) { + ((SequentialStep<«specificStepFQN», «stateFQN»>) context.getFirst()).getSubSteps().add(step_cast); + } else { + ((SequentialStep<«specificStepFQN», «stateFQN»>) traceRoot.getRootStep()).getSubSteps().add(step_cast); + } + + // Adding step in its dedicated sequence/dimension + «IF !stepRules.empty» + «FOR stepRule : stepRules.sortBy[baseFQN] SEPARATOR "else"» + «val EClass stepClass = traceability.getStepClassFromStepRule(stepRule)» + «val String varName = stepClass.name.toFirstLower.replace(" ", "") + "Instance"» + if (step_cast instanceof «getJavaFQN(stepClass)») { + «getJavaFQN(stepClass)» «varName» = («getJavaFQN(stepClass)») step_cast; + traceRoot.«EcoreCraftingUtil.stringGetter(traceability.getStepSequence(stepClass))».add(«varName»); + } + «ENDFOR» + «ENDIF» + } + context.push(step_cast); + } + + + @SuppressWarnings("unchecked") + private void addImplicitStep(«specificStepFQN» currentStep, + «stateFQN» startingState, + «stateFQN» endingState) { + + «IF !stepRules.empty && !traceability.bigStepClasses.empty» + «specificStepFQN» implicitStep = null; + «FOR bigStepClass : traceability.bigStepClasses.sortBy[name] SEPARATOR "else"» + if (currentStep instanceof «getJavaFQN(bigStepClass)») { + implicitStep = «EcoreCraftingUtil.stringCreateImplicitStep(bigStepClass)»; + } + «ENDFOR» + if (implicitStep != null) { + implicitStep.setStartingState(startingState); + implicitStep.setEndingState(endingState); + ((SequentialStep<«specificStepFQN», «stateFQN»>) currentStep).getSubSteps().add(implicitStep); + + } + «ENDIF» + } + + @Override + public void endStep(org.eclipse.gemoc.trace.commons.model.trace.Step step) { + «specificStepFQN» popped = context.pop(); + if (popped != null) + popped.setEndingState(lastState); + } + ''' + } + + private def String generateInitAndSaveTraceMethods() { + return + ''' + @Override + public EObject initTrace(LaunchConfiguration launchConfiguration) { + // Create root + traceRoot = «EcoreCraftingUtil.stringCreate(traceability.traceMMExplorer.getSpecificTraceClass)»; + traceRoot.setLaunchconfiguration(launchConfiguration); + + // Create root sequential step + org.eclipse.gemoc.trace.commons.model.trace.SequentialStep<«specificStepFQN», «stateFQN»> rootStep = «EcoreCraftingUtil.stringCreate(traceability.traceMMExplorer.getSpecificRootStepClass)»; + traceRoot.setRootStep(rootStep); + + // Put in the resource + traceResource.getContents().add(traceRoot); + + return traceRoot; + } + + @Override + public void save() { + try { + traceResource.save(null); + } catch (java.io.IOException e) { + e.printStackTrace(); + } + } + + @Override + public void save(URI uri) { + try { + traceResource.setURI(uri); + traceResource.save(null); + } catch (java.io.IOException e) { + e.printStackTrace(); + } + } + ''' + } + + private def String generateExeToFromTracedGenericMethods() { + return + ''' + «IF getExeToTracedUsed» + private Collection «getExeToTracedMethodName»(Collection exeObjects, «getJavaFQN(stateClass)» newState) { + Collection result = new ArrayList(); + for(EObject exeObject : exeObjects) { + result.add(exeToTraced.get(exeObject)); + } + return result; + } + «ENDIF» + ''' + } + + private def String generateTraceConstructorClass() { + + val body = + ''' + public class «className» implements ITraceConstructor { + «generateFields» + «generateConstructor» + «generateAddInitialStateMethod» + «generateAddNewObjectToStateMethods» + «generateAddStateUsingListenerMethods» + «generateAddStepMethods» + «generateInitAndSaveTraceMethods» + «generateGetAllResourcesMethod» + «generateExeToFromTracedGenericMethods» + + @Override + public boolean isPartialTraceConstructor() { + return false; + } + } + ''' + + return + ''' + package «packageQN»; + + «generateImports» + + «body» + ''' + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/ExtensionFilter.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/ExtensionFilter.xtend new file mode 100644 index 000000000..c3413ed68 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/ExtensionFilter.xtend @@ -0,0 +1,271 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.generator.util + +import org.eclipse.gemoc.trace.commons.EcoreCraftingUtil +import java.util.HashSet +import java.util.Set +import opsemanticsview.OperationalSemanticsView +import opsemanticsview.Rule +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EReference +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.xtend.lib.annotations.Accessors + +/** + * Given a set of references to classes and properties from the execution metamodel, + * will filter out all other elements from the execution extension transient model. + * + * For now it is implemented through fully qualified name comparisons. + */ +class ExtensionFilter { + + // Input + val Set chosenClasses + val Set chosenProperties + + // Input / Output + val OperationalSemanticsView executionExtension + + // Output + @Accessors(#[PUBLIC_GETTER, PRIVATE_SETTER]) + var boolean didFilterSomething = false + + // Transient + val Set retainedClasses = new HashSet + val Set retainedProperties = new HashSet + val Set retainedRules = new HashSet + + new(OperationalSemanticsView executionExtension, Set chosenClasses, + Set chosenProperties) { + if (chosenClasses != null) + this.chosenClasses = chosenClasses + else + this.chosenClasses = #{} + if (chosenProperties != null) + this.chosenProperties = chosenProperties + else + this.chosenProperties = #{} + this.executionExtension = executionExtension + } + + public def void execute() { + + if (!chosenClasses.empty || !chosenProperties.empty) { + + val Set chosenClassesFQNs = chosenClasses.map[c|EcoreCraftingUtil.getFQN(c, ".")].toSet + val Set chosenPropertiesFQNs = chosenProperties.map [ p | + EcoreCraftingUtil.getFQN(p.getEContainingClass, ".") + "." + p.name + ].toSet + + for (element : executionExtension.dynamicClasses) { + val fqn = EcoreCraftingUtil.getFQN(element, ".") + if (chosenClassesFQNs.contains(fqn)) { + retainedClasses.add(element) + retainedClasses.addAll((element)) + retainedProperties.addAll(element.getEStructuralFeatures) + } + } + + for (element : executionExtension.dynamicProperties) { + val fqn = EcoreCraftingUtil.getFQN(element.getEContainingClass, ".") + "." + element.name + if (chosenPropertiesFQNs.contains(fqn)) { + retainedProperties.add(element) + retainedClasses.add(element.getEContainingClass) + retainedClasses.addAll((element.getEContainingClass)) + if (element instanceof EReference) { + retainedClasses.add(element.getEReferenceType) + retainedClasses.addAll((element.getEReferenceType)) + } + } + } + + for (element : executionExtension.rules) { + if (element.stepRule) { + retainedRules.add(element) + for (paramClass : element.operation.getEParameters.map[p|p.getEType].filter(EClass)) { + retainedClasses.add(paramClass) + } + if (element.operation.getEType instanceof EClass) { + retainedClasses.add(element.operation.getEType as EClass) + } + retainedClasses.add(element.containingClass) + } + } + + // Hack: we replace indirect supertype relationships by direct ones + for (c1 : retainedClasses) { + for (c2 : retainedClasses.filter[c|c != c1]) { + if (c1.getEAllSuperTypes.contains(c2)) { + if (!hasSuperTypePathContainedIn(c1, c2, retainedClasses)) { + c1.getESuperTypes.add(c2) + } + } + } + } + + // Hack: likewise, we replace indirect rule calls by direct ones + for (r1 : retainedRules) { + for (r2 : retainedRules.filter[r|r != r1]) { + if (callsIndirectly(r1, r2, new HashSet)) { + r1.calledRules.add(r2) + } + } + } + +// // Second hack: if some leaf class is abstract, we make it concrete +// for (c : retainedClasses.filter[abstract]) { +// val subClasses = retainedClasses.filter[c2|c2.ESuperTypes.contains(c)] +// if (subClasses.empty) +// c.abstract = false +// } +// +// // Remove super types that are not retained +// for (c : retainedClasses) { +// c.ESuperTypes.removeIf([c2|!retainedClasses.contains(c2)]) +// } + + // Remove refs to other rules that are not retained + for (r : retainedRules) { + r.calledRules.removeIf([r2|!retainedRules.contains(r)]) + r.overridenBy.removeIf([r2|!retainedRules.contains(r)]) + if (!retainedRules.contains(r.overrides)) + r.overrides = null + } + + for (element : executionExtension.eAllContents.toSet) { + tryRemove(element) + } + + } + } + + def boolean callsIndirectly(Rule origin, Rule destination, Set visited) { + if (!visited.contains(origin)) { + if (origin == destination) { + return true + } + + for (r : origin.calledRules) { + val boolean result = callsIndirectly(r, destination, visited) + if (result) + return true + } + + } + return false + } + + static class CallPath { + public boolean isContainedInSet = false + } + + def static Set findCallPaths(Rule origin, Rule destination, Set mustBeContainedIn, + Set visited, boolean containedSoFar) { + val result = new HashSet + if (!visited.contains(origin)) { + visited.add(origin) + + if (origin == destination) { + val path = new CallPath + path.isContainedInSet = containedSoFar + result.add(path) + } + + for (s : origin.calledRules) { + val containedSoFarNext = containedSoFar && mustBeContainedIn.contains(s) + val interResult = ExtensionFilter.findCallPaths(s, destination, + mustBeContainedIn, visited, containedSoFarNext) + result.addAll(interResult) + } + } + return result + } + + private static def boolean hasSuperTypePathContainedIn(EClass origin, EClass destination, Set containedIn) { + + if (origin == destination) + return true + + for (s : origin.getESuperTypes.filter[s|containedIn.contains(s)]) { + val result = hasSuperTypePathContainedIn(s, destination, containedIn) + if (result) + return true + } + + return false + } + + private def Set tryRemove(EObject element) { +// val removedElements = new HashSet +// if (element instanceof EClass) { +// if (!retainedClasses.contains(element)) { +// didFilterSomething = true +// val package = element.EPackage +// package.EClassifiers.remove(element) +// removedElements.add(element) +// val removedAgain = cleanEPackage(package) +// removedElements.addAll(removedAgain) +// } +// } else if (element instanceof EStructuralFeature) { +// if (!retainedProperties.contains(element)) { +// didFilterSomething = true +// val container = element.eContainer +// if (container instanceof ClassExtension) { +// container.newProperties.remove(element) +// removedElements.add(element) +// if (container.newProperties.empty) { +// executionExtension.classesExtensions.remove(container) +// removedElements.add(container) +// } +// } else if (container instanceof EClass) { +// container.EStructuralFeatures.remove(element) +// removedElements.add(element) +// } +// } +// } else if (element instanceof Rule) { +// if (!retainedRules.contains(element)) { +// executionExtension.rules.remove(element) +// removedElements.add(element) +// for (r : executionExtension.rules) { +// r.calledRules.remove(element) +// if (r.overrides == element) +// r.overrides = null +// r.overridenBy.remove(element) +// } +// } +// } +// return removedElements + } + +// private def Set cleanEPackage(EPackage p) { +// val removedElements = new HashSet +// if (p != null) { +// if (p.EClassifiers.empty && p.ESubpackages.empty) { +// val container = p.eContainer +// if (container != null) { +// if (container instanceof EPackage) { +// container.ESubpackages.remove(p) +// removedElements.add(p) +// val removedAgain = cleanEPackage(container) +// removedElements.addAll(removedAgain) +// } else if (container instanceof Ecorext) { +// container.newPackages.remove(p) +// removedElements.add(p) +// } +// } +// } +// } +// return removedElements +// } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/PluginProjectHelper.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/PluginProjectHelper.xtend new file mode 100644 index 000000000..7fe56338e --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/PluginProjectHelper.xtend @@ -0,0 +1,200 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.generator.util; + +import java.io.ByteArrayInputStream +import java.io.InputStream +import java.util.ArrayList +import java.util.Collections +import java.util.Iterator +import java.util.List +import java.util.Set +import org.eclipse.core.resources.ICommand +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.IProjectDescription +import org.eclipse.core.resources.IWorkspace +import org.eclipse.core.resources.ResourcesPlugin +import org.eclipse.core.runtime.CoreException +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.core.runtime.NullProgressMonitor +import org.eclipse.core.runtime.Path +import org.eclipse.core.runtime.SubProgressMonitor +import org.eclipse.jdt.core.IClasspathEntry +import org.eclipse.jdt.core.IJavaProject +import org.eclipse.jdt.core.JavaCore + +/** + * Adapted from http://architecturware.cvs.sourceforge.net/viewvc/architecturware/oaw_v4/core.plugin/plugin.oaw4/main/src/org/openarchitectureware/wizards/EclipseHelper.java?revision=1.13&content-type=text%2Fplain + */ +public class PluginProjectHelper { + + public static val String ISO_8859_1 = "iso-8859-1"; + + public def static IProject createPluginProject(String projectName, List srcFolders, + List referencedProjects, Set requiredBundles, List exportedPackages, + IProgressMonitor progressMonitor) { + var IProject project = null; + + progressMonitor.beginTask("", 10); + progressMonitor.subTask("Creating project " + projectName); + val IWorkspace workspace = ResourcesPlugin.getWorkspace(); + project = workspace.getRoot().getProject(projectName); + + val IJavaProject javaProject = JavaCore.create(project); + val IProjectDescription projectDescription = ResourcesPlugin.getWorkspace().newProjectDescription( + projectName); + projectDescription.setLocation(null); + if (!project.exists) + project.create(projectDescription, new SubProgressMonitor(progressMonitor, 1)); + val List classpathEntries = new ArrayList(); + if (referencedProjects.size() != 0) { + val IProject[] referencedProjectsArray = newArrayOfSize(referencedProjects.size()) + projectDescription.setReferencedProjects(referencedProjects.toArray(referencedProjectsArray)) + for (IProject referencedProject : referencedProjects) { + val IClasspathEntry referencedProjectClasspathEntry = JavaCore.newProjectEntry( + referencedProject.getFullPath()); + classpathEntries.add(referencedProjectClasspathEntry); + } + } + val String[] natureIdsArray = #[JavaCore.NATURE_ID, "org.eclipse.pde.PluginNature"] + + projectDescription.setNatureIds(natureIdsArray); + + val ICommand java = projectDescription.newCommand(); + java.setBuilderName(JavaCore.BUILDER_ID); + + val ICommand manifest = projectDescription.newCommand(); + manifest.setBuilderName("org.eclipse.pde.ManifestBuilder"); + + val ICommand schema = projectDescription.newCommand(); + schema.setBuilderName("org.eclipse.pde.SchemaBuilder"); + + val ICommand[] commandArray = #[java, manifest, schema] + + projectDescription.setBuildSpec(commandArray); + + project.open(new SubProgressMonitor(progressMonitor, 1)); + project.setDescription(projectDescription, new SubProgressMonitor(progressMonitor, 1)); + + Collections.reverse(srcFolders); + for (String src : srcFolders) { + val IFolder srcContainer = project.getFolder(src); + if (!srcContainer.exists()) { + srcContainer.create(false, true, new SubProgressMonitor(progressMonitor, 1)); + } + val IClasspathEntry srcClasspathEntry = JavaCore.newSourceEntry(srcContainer.getFullPath()); + classpathEntries.add(0, srcClasspathEntry); + } + + classpathEntries.add(JavaCore.newContainerEntry(new Path( + "org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"))); + classpathEntries.add(JavaCore.newContainerEntry(new Path("org.eclipse.pde.core.requiredPlugins"))); + + val IClasspathEntry[] classPathEntriesArray = newArrayOfSize(classpathEntries.size()) + + javaProject.setRawClasspath(classpathEntries.toArray(classPathEntriesArray), + new SubProgressMonitor(progressMonitor, 1)); + + javaProject.setOutputLocation(new Path("/" + projectName + "/bin"), + new SubProgressMonitor(progressMonitor, 1)); + createManifest(projectName, requiredBundles, exportedPackages, progressMonitor, project); + createBuildProps(progressMonitor, project, srcFolders); + + return project; + + } + + public static def IFile createFile(String name, IContainer container, String content, + IProgressMonitor progressMonitor) { + + val IFile file = container.getFile(new Path(name)); + assertExist(file.getParent()); + + val InputStream stream = new ByteArrayInputStream(content.getBytes(file.getCharset())); + try { + if (file.exists()) { + file.setContents(stream, true, true, progressMonitor); + } else { + file.create(stream, true, progressMonitor); + } + progressMonitor.worked(1); + return file + } finally { + stream.close(); + } + } + + private static def void createBuildProps(IProgressMonitor progressMonitor, IProject project, + List srcFolders) { + val StringBuilder bpContent = new StringBuilder("source.. = "); + for (val Iterator iterator = srcFolders.iterator(); iterator.hasNext();) { + bpContent.append(iterator.next()).append('/'); + if (iterator.hasNext()) { + bpContent.append(","); + } + } + bpContent.append("\n"); + bpContent.append("bin.includes = META-INF/,.\n"); + createFile("build.properties", project, bpContent.toString(), progressMonitor); + } + + private static def void createManifest(String projectName, Set requiredBundles, + List exportedPackages, IProgressMonitor progressMonitor, IProject project) throws CoreException { + val StringBuilder maniContent = new StringBuilder("Manifest-Version: 1.0\n"); + maniContent.append("Bundle-ManifestVersion: 2\n"); + maniContent.append("Bundle-Name: " + projectName + "\n"); + maniContent.append("Bundle-SymbolicName: " + projectName + "; singleton:=true\n"); + maniContent.append("Bundle-Version: 1.0.0\n"); + // maniContent.append("Bundle-Localization: plugin\n"); + if (!requiredBundles.empty) + maniContent.append("Require-Bundle: "); + for (String entry : requiredBundles) { + + maniContent.append(" " + entry + ",\n"); + } + + if (exportedPackages != null && !exportedPackages.isEmpty()) { + maniContent.append("Require-Bundle: " + exportedPackages.get(0)); + val int x = exportedPackages.size() + for (var int i = 1; i < x; i++) { + maniContent.append(",\n " + exportedPackages.get(i)); + } + maniContent.append("\n"); + } + + maniContent.append("Bundle-RequiredExecutionEnvironment: J2SE-1.5\r\n"); + + val IFolder metaInf = project.getFolder("META-INF"); + metaInf.create(false, true, new SubProgressMonitor(progressMonitor, 1)); + + createFile("MANIFEST.MF", metaInf, maniContent.toString(), progressMonitor); + } + + private static def void assertExist( + IContainer c + ) { + if (!c.exists()) { + if (!c.getParent().exists()) { + assertExist(c.getParent()); + } + if (c instanceof IFolder) { + + (c as IFolder).create(false, true, new NullProgressMonitor()); + + } + } + } + + } + \ No newline at end of file diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/StandaloneEMFProjectGenerator.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/StandaloneEMFProjectGenerator.xtend new file mode 100644 index 000000000..43debba73 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.generator/src/org/eclipse/gemoc/trace/gemoc/generator/util/StandaloneEMFProjectGenerator.xtend @@ -0,0 +1,434 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.generator.util + +import java.io.IOException +import java.io.PrintWriter +import java.io.StringWriter +import java.util.ArrayList +import java.util.Collection +import java.util.Collections +import java.util.HashSet +import java.util.List +import java.util.Map +import java.util.Set +import java.util.jar.Manifest +import org.eclipse.core.resources.IFile +import org.eclipse.core.resources.IFolder +import org.eclipse.core.resources.IProject +import org.eclipse.core.runtime.CoreException +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.emf.codegen.ecore.generator.Generator +import org.eclipse.emf.codegen.ecore.genmodel.GenJDKLevel +import org.eclipse.emf.codegen.ecore.genmodel.GenModel +import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory +import org.eclipse.emf.codegen.ecore.genmodel.GenPackage +import org.eclipse.emf.codegen.ecore.genmodel.GenParameter +import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter +import org.eclipse.emf.codegen.ecore.genmodel.util.GenModelUtil +import org.eclipse.emf.codegen.util.CodeGenUtil +import org.eclipse.emf.common.util.BasicMonitor +import org.eclipse.emf.common.util.Diagnostic +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.common.util.UniqueEList +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EParameter +import org.eclipse.emf.ecore.EStructuralFeature.Setting +import org.eclipse.emf.ecore.EcorePackage +import org.eclipse.emf.ecore.plugin.EcorePlugin +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.util.EcoreUtil +import org.eclipse.ui.PlatformUI +import org.eclipse.xtend.lib.annotations.Accessors + +public class StandaloneEMFProjectGenerator { + + // Inputs + protected val EPackage ecoreModel + protected val String projectName + + // Outputs + @Accessors(#[PUBLIC_GETTER, PROTECTED_SETTER]) + protected var IProject project + @Accessors(#[PUBLIC_GETTER, PROTECTED_SETTER]) + protected val Set referencedGenPackages = new HashSet + @Accessors(#[PUBLIC_GETTER, PROTECTED_SETTER]) + protected val Set rootPackages = new HashSet + + // Transient + protected var GenModel genModel + + /** + * Helper method to generate code without a job. + */ + def void generateModelCode() { + PlatformUI.workbench.activeWorkbenchWindow.run(false, true, [ m | + generateModelCode(m) + ]) + } + + public static val String MODEL_GEN_FOLDER = "model" + + protected IProgressMonitor progressMonitor + + protected ResourceSet resourceSet + + protected URI modelGenFolderURI + protected String srcFolderPathString + + protected Resource ecoreModelResource + + new(String projectName, EPackage p) { + this.ecoreModel = p + this.projectName = projectName + } + + /** + * Creates a new EMF project with the ecore file and the genmodel in the "model" folder + * also mages project, referencedGenPackages and rootPackages available. + */ + def void generateBaseEMFProject(IProgressMonitor m) { + + this.progressMonitor = m; + this.resourceSet = new ResourceSetImpl + + // Create new EMF project + this.project = PluginProjectHelper.createPluginProject(projectName, // Project name + #["src"], // Src folders + #[], // referenced projects + #{}, // required bundles (plugins) TODO + #[], // exported packages TODO + m) + + // setup model-gen folder for saving temporary models + this.modelGenFolderURI = setupModelGenFolder(); + + // setup src folder for model code generation + this.srcFolderPathString = setupSrcFolder(); + + // Serialize epackage in the project + ecoreModelResource = resourceSet.createResource( + URI.createPlatformResourceURI('''«projectName»/«MODEL_GEN_FOLDER»/«ecoreModel.name».ecore''', true)) + ecoreModelResource.contents.add(ecoreModel) + ecoreModelResource.save + + ecoreModelResource.unload + ecoreModelResource.load(null) + + ecoreModelResource.unload + ecoreModelResource.load(null) + + // Check that all required ecore models are available + checkReferencedPackages(ecoreModelResource); + + // Creates the output gen model + this.genModel = generateGenModel((ecoreModelResource.getContents().get(0)) as EPackage, modelGenFolderURI); + this.rootPackages.addAll(ecoreModelResource.contents.filter(EPackage).toSet) + } + + /** + * Generates the code using the genmodel (within a Job). + */ + def void generateModelCode(IProgressMonitor m) throws Exception { + + generateCode(progressMonitor); + } + + private def URI setupModelGenFolder() { + var URI modelGenFolderURI = null; + val IFolder modelGenFolder = project.getFolder(MODEL_GEN_FOLDER); + if (!modelGenFolder.exists()) { + try { + modelGenFolder.create(true, true, null); + } catch (CoreException e) { + throw new RuntimeException('''The folder '«MODEL_GEN_FOLDER»' could not be created.''', e); + } + } + modelGenFolderURI = URI.createPlatformResourceURI(modelGenFolder.getFullPath().toString(), true); + return modelGenFolderURI; + } + + private def String setupSrcFolder() { + var String srcFolderPathString = null; + val IFolder srcFolder = project.getFolder("src"); + if (!srcFolder.exists()) { + try { + srcFolder.create(true, true, null); + } catch (CoreException e) { + throw new RuntimeException("The source folder \'src\' could not be created.", e); + } + } + srcFolderPathString = srcFolder.getFullPath().toString(); + return srcFolderPathString; + } + + private def void checkReferencedPackages(Resource xmofModelResource) { + val Set missingPackages = new HashSet(); + val Map> externalCrossReferences = EcoreUtil.ExternalCrossReferencer.find( + xmofModelResource); + for (EObject eObject : externalCrossReferences.keySet()) { + if (eObject.eIsProxy()) { + missingPackages.add(EcoreUtil.getURI(eObject).trimFragment()); + } + } + + if (missingPackages.size() > 0) { + + val String message = "Unable to load the following referenced resource" + + (if(missingPackages.size() == 1) "" else "s") + ": " + missingPackages.toString() + + throw new RuntimeException(message); + } + } + + protected def GenModel generateGenModel(EPackage rootEPackage, URI modelGenFolderURI) { + val Resource genModelResource = createGenModel(rootEPackage); + val GenModel genModel = genModelResource.getContents().get(0) as GenModel; + setInitializeByLoad(genModel); + save(genModelResource); + return genModel; + } + + protected def Resource createGenModel(EPackage rootEPackage) { + val Resource ecoreModelResource = rootEPackage.eResource(); + val String genModelFileName = ecoreModelResource.getURI().trimFileExtension().appendFileExtension("genmodel"). + lastSegment().toString(); + val URI genModelURI = this.modelGenFolderURI.appendSegment(genModelFileName); + + val Resource genModelResource = resourceSet.createResource(genModelURI); + val GenModel genModel = GenModelFactory.eINSTANCE.createGenModel(); + genModelResource.getContents().add(genModel); + + val IFolder srcFolder = project.getFolder("src"); + genModel.setModelDirectory(srcFolder.getFullPath().toString()); + genModel.getForeignModel().add(ecoreModelResource.getURI().toString()); + genModel.setModelName(getModelName(genModelURI)); + genModel.setModelPluginID(getPluginID(genModelURI)); + + // genModel.setOperationReflection(true); + // genModel.setMinimalReflectiveMethods(true); + genModel.setRootExtendsClass("org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"); + genModel.setComplianceLevel(getComplicanceLevel()); + genModel.setImportOrganizing(true); + + genModel.initialize(Collections.singleton(rootEPackage)); + setMissingParameterTypes(genModel); + + fixUsedGenPackages(genModel) + + return genModelResource; + } + + private Set fixedGenModels = new HashSet + + /** + * Tries to fix the "usedGenPackages" collection of a genmodel (and recursively of all genmodels it references) + * 1) remove all usedGenPackages that have a null genModel (for a mysterious reason...) + * 2) use the magical method 'computeMissingGenPackages' to find missing packages, and add them to usedGenPackages + * 3) as a bonus, store all referenced gen packages in 'referencedGenPackages' for later use + */ + private def void fixUsedGenPackages(GenModel genModel) { + if (!fixedGenModels.contains(genModel)) { + fixedGenModels.add(genModel) + genModel.usedGenPackages.removeAll(genModel.usedGenPackages.immutableCopy.filter[p|p.genModel == null]) + val List missingGenPackages = computeMissingGenPackages(genModel); + for (genPackage : missingGenPackages) { + fixUsedGenPackages(genPackage.genModel) + } + referencedGenPackages.addAll(missingGenPackages) + referencedGenPackages.addAll(genModel.genPackages) + genModel.getUsedGenPackages().addAll(missingGenPackages); + } + + } + + protected def String getModelName(URI genModelURI) { + val String genModelFileName = genModelURI.trimFileExtension().lastSegment(); + val String modelName = genModelFileName.substring(0, 1).toUpperCase() + genModelFileName.substring(1); + return modelName; + } + + protected def String getPluginID(URI uri) { + var String pluginID = ""; + val IFile manifestFile = project.getFolder("META-INF").getFile("MANIFEST.MF"); + try { + val Manifest manifest = new Manifest(manifestFile.getContents()); + var String symbolicName = manifest.getMainAttributes().getValue("Bundle-SymbolicName"); + if (symbolicName != null) { + val int index = symbolicName.indexOf(";"); + if (index > 0) { + symbolicName = symbolicName.substring(0, index); + } + pluginID = symbolicName.trim(); + } + } catch (Exception e) { + throw new RuntimeException( + "Could not find manifest file \'" + manifestFile.getFullPath().toString() + "\'.", e); + } + return pluginID; + } + + private def GenJDKLevel getComplicanceLevel() { + val String complianceLevel = CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project); + if ("1.4".equals(complianceLevel)) { + return GenJDKLevel.JDK14_LITERAL; + } else if ("1.5".equals(complianceLevel)) { + return GenJDKLevel.JDK50_LITERAL; + } else if ("1.6".equals(complianceLevel)) { + return GenJDKLevel.JDK60_LITERAL; + } else if ("1.7".equals(complianceLevel)) { + return GenJDKLevel.JDK70_LITERAL; + } else { + return GenJDKLevel.JDK80_LITERAL; + } + } + + /** + * In case of missing parameter types, the types are temporarily set to + * EObject + * + * @param genModel + */ + private def void setMissingParameterTypes(GenModel genModel) { + for (genModelElement : genModel.eAllContents().filter(GenParameter).toSet) { + val GenParameter genParameter = genModelElement as GenParameter; + val EParameter ecoreParameter = genParameter.getEcoreParameter(); + if (ecoreParameter.getEType() == null) { + ecoreParameter.setEType(EcorePackage.eINSTANCE.getEObject()); + } + } + } + + protected def List computeMissingGenPackages(GenModel genModel) { + val List missingGenPackages = new UniqueEList(); + val Map genModelLocationMapTargetEnvironment = EcorePlugin. + getEPackageNsURIToGenModelLocationMap(true); + val Map genModelLocationMapEnvironment = EcorePlugin.getEPackageNsURIToGenModelLocationMap(false); + for (EPackage ePackage : genModel.getMissingPackages()) { + if (ePackage != null) { // happens for activities + var URI missingGenModelURI = genModelLocationMapEnvironment.get(ePackage.getNsURI()); + if (missingGenModelURI == null) { + missingGenModelURI = genModelLocationMapTargetEnvironment.get(ePackage.getNsURI()); + } + if (missingGenModelURI == null) { + throw new RuntimeException( + "Unable to load generator model of required package \'" + ePackage.getNsURI() + "\'."); + } + var Resource missingGenModelResource = null; + try { + missingGenModelResource = resourceSet.getResource(missingGenModelURI, true); + } catch (RuntimeException e) { + throw new RuntimeException( + "Unable to load generator model of required package \'" + ePackage.getNsURI() + "\'."); + } + val GenModel missingGenModel = missingGenModelResource.getContents().get(0) as GenModel; + missingGenPackages.addAll(missingGenModel.getGenPackages()); + } + } + return missingGenPackages; + } + + protected def void setInitializeByLoad(GenModel genModel) { + for (GenPackage genPackage : genModel.getGenPackages()) { + setInitializeByLoad(genPackage); + } + } + + private def void setInitializeByLoad(GenPackage genPackage) { + genPackage.setLoadInitialization(false); + for (GenPackage subGenPackage : genPackage.getSubGenPackages()) { + setInitializeByLoad(subGenPackage); + } + } + + private def List expandDiagnostics(Diagnostic d) { + val result = new ArrayList + result.add(d) + result.addAll(d.children) + for (c : d.children) { + result.addAll(expandDiagnostics(c)) + } + return result + } + + private def String exceptionToStackString(Throwable e) { + val StringWriter sw = new StringWriter(); + e.printStackTrace(new PrintWriter(sw)); + val String exceptionAsString = sw.toString() + return exceptionAsString + } + + private def String diagnosticErrorsToString(Diagnostic diagnostic) { + + val errors = expandDiagnostics(diagnostic).filter[d|d.severity == Diagnostic.ERROR].toSet + val exceptions = errors.filter[e|e.exception != null].map[e|exceptionToStackString(e.exception)].toSet + return ''' + «FOR e : exceptions BEFORE "Encountered exceptions:\n" SEPARATOR "\n" AFTER "\n"» + - «e» + «ENDFOR» + «FOR e : errors BEFORE "Encountered diagnostic errors:\n" SEPARATOR "\n" AFTER "\n"» + - «e.message» «««»» (source: «e.source») + «ENDFOR» + ''' + } + + protected def void generateCode(IProgressMonitor progressMonitor) throws Exception { + var boolean success = false; + prepareGenModelForCodeGeneration(genModel); + val Generator generator = GenModelUtil.createGenerator(genModel); + val boolean canGenerate = generator.canGenerate(genModel, GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE); + var String message = '''Cannot generate code of EPackage «this.ecoreModel.name»''' + if (canGenerate) { + + var Diagnostic diagnostic = null + var String otherMessage = "" + try { + // Calling the generator + diagnostic = generator.generate(genModel, GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE, + BasicMonitor.toMonitor(progressMonitor)); + } catch (Throwable t) { + otherMessage = exceptionToStackString(t) + } + + if (diagnostic != null && diagnostic.getSeverity() == Diagnostic.OK) { + success = true; + } else { + if (diagnostic != null) + message += ''': «diagnosticErrorsToString(diagnostic)».''' + else { + message += otherMessage + } + } + + } else { + message += "generator.canGenerate returns false." + } + if (!success) + throw new Exception(message) + } + + protected def void prepareGenModelForCodeGeneration(GenModel genModel) { + genModel.reconcile(); + genModel.setCanGenerate(true); + } + + private def void save(Resource resource) { + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + throw new RuntimeException("Could not save resource \'" + resource.getURI() + "\'.", e); + } + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.checkstyle b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.checkstyle new file mode 100644 index 000000000..42097404b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.classpath b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.classpath rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.classpath diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.gitignore b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.gitignore similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/.gitignore rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.gitignore diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.project b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.project new file mode 100644 index 000000000..7b406b5e2 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.project @@ -0,0 +1,40 @@ + + + org.eclipse.gemoc.trace.gemoc.ui + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.settings/org.eclipse.jdt.core.prefs b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..0c68a61dc --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/.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/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/META-INF/MANIFEST.MF b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/META-INF/MANIFEST.MF new file mode 100644 index 000000000..3ee722a7a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.trace.gemoc.wizards +Bundle-SymbolicName: org.eclipse.gemoc.trace.gemoc.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.10.0", + org.eclipse.ui, + org.eclipse.ui.ide, + org.eclipse.jdt.debug.ui;bundle-version="3.6.300", + org.eclipse.debug.ui, + org.eclipse.jdt.core, + org.eclipse.core.variables;bundle-version="3.2.800", + org.eclipse.jdt.launching, + org.eclipse.gemoc.trace.gemoc.generator;bundle-version="1.0.0", + org.eclipse.xtend.lib, + org.eclipse.emf.ecore.xmi;bundle-version="2.10.2", + org.eclipse.gemoc.trace.gemoc.generator, + org.eclipse.ui.navigator, + fr.inria.diverse.melange.metamodel, + org.eclipse.core.expressions, + org.eclipse.gemoc.xdsmlframework.ide.ui;bundle-version="0.1.0", + org.eclipse.gemoc.xdsmlframework.ui.utils;bundle-version="0.1.0", + org.eclipse.gemoc.commons.eclipse;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/about.html b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/about.html similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.ecorext/about.html rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/about.html diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/build.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/build.properties new file mode 100644 index 000000000..4b512bace --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/,\ + about.html +jre.compilation.profile = JavaSE-1.8 +src.includes = about.html diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/icons/IconeGemocLanguage-16.png b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/icons/IconeGemocLanguage-16.png similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/icons/IconeGemocLanguage-16.png rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/icons/IconeGemocLanguage-16.png diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/icons/generate-16.png b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/icons/generate-16.png similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/icons/generate-16.png rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/icons/generate-16.png diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/plugin.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/plugin.xml new file mode 100644 index 000000000..042bf9978 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/plugin.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/pom.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/pom.xml new file mode 100644 index 000000000..20721dce1 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/pom.xml @@ -0,0 +1,63 @@ + + + + + 4.0.0 + org.gemoc.multidimensional_trace_management + org.eclipse.gemoc.trace.gemoc.ui + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.eclipse.gemoc.trace.generator + org.eclipse.gemoc.trace.generator.root + 2.3.0-SNAPSHOT + ../.. + + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/Activator.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/Activator.java new file mode 100644 index 000000000..7bd599c27 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.ui; + +import org.eclipse.core.runtime.Status; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.xdsmlframework.ide.ui"; //$NON-NLS-1$ + + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + public static void warn(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, Status.OK, msg, e)); + } + + public static void error(String msg, Throwable e) { + Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/commands/XDSMLProject2TraceAddonHandler.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/commands/XDSMLProject2TraceAddonHandler.xtend new file mode 100644 index 000000000..db885799a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/commands/XDSMLProject2TraceAddonHandler.xtend @@ -0,0 +1,90 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.ui.commands + +import fr.inria.diverse.melange.metamodel.melange.Language +import org.eclipse.gemoc.trace.gemoc.generator.TraceAddonGeneratorIntegration +import org.eclipse.core.commands.ExecutionEvent +import org.eclipse.core.commands.ExecutionException +import org.eclipse.core.commands.IHandler +import org.eclipse.core.resources.IFile +import org.eclipse.core.resources.IProject +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.core.runtime.Status +import org.eclipse.core.runtime.jobs.Job +import org.eclipse.jface.dialogs.InputDialog +import org.eclipse.jface.window.Window +import org.eclipse.gemoc.commons.eclipse.emf.EMFResource +import org.eclipse.gemoc.xdsmlframework.ide.ui.commands.AbstractMelangeSelectHandler +import org.eclipse.gemoc.xdsmlframework.ide.ui.xdsml.wizards.MelangeXDSMLProjectHelper + +/** + * Handler that allows to get an XDSML project (containing a melange file) + * and will ask for selection of the language (if necessary) and launch the generation + */ +class XDSMLProject2TraceAddonHandler extends AbstractMelangeSelectHandler implements IHandler { + val static String pluginId = "org.eclipse.gemoc.trace.gemoc.ui" + + override Object executeForSelectedLanguage(ExecutionEvent event, IProject updatedGemocLanguageProject, + Language language) throws ExecutionException { + + val IFile melangeFile = getMelangeIFile(event, language) + val baseProjectName = MelangeXDSMLProjectHelper.baseProjectName(melangeFile.project) + + // If the base project name doesn't end with the language name, we suggest it + val suggestedBasePluginName = if (baseProjectName.endsWith(language.name.toLowerCase)) + baseProjectName + else + baseProjectName + "." + language.name.toLowerCase + val suggestedPluginName = suggestedBasePluginName + ".trace" + + val InputDialog inputDialog = new InputDialog(null, + "Create MultiDimensional Trace addon for language " + language.getName(), "Enter project name ", + suggestedPluginName, null) + inputDialog.open(); + if (inputDialog.getReturnCode() == Window.OK) { + val String projectName = inputDialog.getValue(); + val Job j = new Job("Generating trace addon plugin for " + melangeFile.toString) { + override protected run(IProgressMonitor monitor) { + try { + + TraceAddonGeneratorIntegration.generateAddon(melangeFile, language.name, projectName, true, + monitor) + + } catch (Exception e) { + return new Status(Status.ERROR, pluginId, "An error occured while generating the trace addon. Please expand below for the complete error stack trace.",e) + } + return new Status(Status.OK, pluginId, "Multidimensional Trace addon plugin generated.") + } + } + // And we start the job + j.schedule + } + + return null; + } + + /** Search for the IFile of the melange language either via the event or directly from the eResource */ + protected def IFile getMelangeIFile(ExecutionEvent event, Language language) { + var IFile melangeFile = getMelangeFileFromSelection(event) + if (melangeFile == null) { + // this means that we have to retrieve the IFile from the language instance (either because + // it comes from an editor of because we have selected one language among other in the project) + melangeFile = EMFResource.getIFile(language) + } + return melangeFile + } + + override String getSelectionMessage() { + return "Select Language that is used to initialize the Multidimensional Trace addon creation wizard"; + } + +} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/launch/EcoreFileFilter.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/launch/EcoreFileFilter.java similarity index 87% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/launch/EcoreFileFilter.java rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/launch/EcoreFileFilter.java index f81213bd9..54d5aae1f 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/src/fr/inria/diverse/trace/gemoc/ui/launch/EcoreFileFilter.java +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc.ui/src/org/eclipse/gemoc/trace/gemoc/ui/launch/EcoreFileFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014 Université de Rennes 1. + * Copyright (c) 2014, 2017 Université de Rennes 1. * 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 @@ -8,7 +8,7 @@ * Contributors: * Erwan Bousse - initial API and implementation ******************************************************************************/ -package fr.inria.diverse.trace.gemoc.ui.launch; +package org.eclipse.gemoc.trace.gemoc.ui.launch; import java.io.File; import java.io.FileFilter; diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.checkstyle b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.checkstyle new file mode 100644 index 000000000..42097404b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/.classpath b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc/.classpath rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.classpath diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/.gitignore b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.gitignore similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc/.gitignore rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.gitignore diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.project b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.project new file mode 100644 index 000000000..2a5a4fc99 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.gemoc + + + + + + 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/trace/generator/plugins/fr.inria.diverse.trace.gemoc/.settings/org.eclipse.core.resources.prefs b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc/.settings/org.eclipse.core.resources.prefs rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.settings/org.eclipse.core.resources.prefs diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.settings/org.eclipse.jdt.core.prefs b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..0c68a61dc --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/.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/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/META-INF/MANIFEST.MF b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/META-INF/MANIFEST.MF new file mode 100644 index 000000000..1724b025e --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/META-INF/MANIFEST.MF @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.tracemm.gemoctrace +Bundle-SymbolicName: org.eclipse.gemoc.trace.gemoc;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.gemoc.timeline;bundle-version="1.0.0", + org.eclipse.gemoc.xdsmlframework.api;bundle-version="0.1.0", + org.eclipse.xtend.lib, + org.eclipse.gemoc.executionframework.engine;bundle-version="0.1.0", + org.eclipse.emf.transaction;bundle-version="1.8.0", + org.eclipse.gemoc.trace.gemoc.api;bundle-version="1.0.0", + org.eclipse.xtext, + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0", + org.eclipse.gemoc.commons.eclipse;bundle-version="0.1.0", + org.eclipse.emf.compare, + org.eclipse.gemoc.xdsmlframework.commons +Export-Package: org.eclipse.gemoc.trace.gemoc.traceaddon +Bundle-ActivationPolicy: lazy + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/about.html b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/about.html similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.generator/about.html rename to trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/about.html diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/build.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/build.properties new file mode 100644 index 000000000..c47997e7c --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.xml +src.includes = about.html diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/plugin.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/plugin.xml new file mode 100644 index 000000000..4968ab9aa --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/plugin.xml @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/pom.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/pom.xml new file mode 100644 index 000000000..fa8e30de3 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/pom.xml @@ -0,0 +1,63 @@ + + + + + 4.0.0 + org.gemoc.multidimensional_trace_management + org.eclipse.gemoc.trace.gemoc + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.eclipse.gemoc.trace.generator + org.eclipse.gemoc.trace.generator.root + 2.3.0-SNAPSHOT + ../.. + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + + 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 new file mode 100644 index 000000000..978c44d8f --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/AbstractTraceAddon.xtend @@ -0,0 +1,238 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.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 +import java.util.Map +import java.util.Set +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EPackage +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.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.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> { + + private IExecutionContext _executionContext + 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) + + override getTraceExplorer() { + return traceExplorer + } + + override getTraceConstructor() { + return traceConstructor + } + + 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> + traceExplorer = new GenericTraceExplorer(trace) + traceExtractor = new GenericTraceExtractor(trace) + } else { + traceExplorer = null + traceExtractor = null + } + } + + private static def String getEPackageFQN(EPackage p, String separator) { + val EPackage superP = p.getESuperPackage + if (superP != null) { + return getEPackageFQN(superP, separator) + separator + p.name + } else { + return p.name.toFirstUpper + } + } + + override aboutToExecuteStep(IExecutionEngine executionEngine, Step step) { + manageStep(step, true) + } + + override stepExecuted(IExecutionEngine engine, Step step) { + manageStep(step, false) + } + + private def manageStep(Step step, boolean add) { + 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) + // Updating other trace listeners with the last changes + traceNotifier.notifyListeners + // Updating the state of the trace explorer + traceExplorer.updateCallStack(step) + ]) + + if (shouldSave) { +// traceConstructor.save() + } + } + } + + /** + * To construct the trace manager + */ + override engineAboutToStart(IExecutionEngine engine) { + if (_executionContext == null) { + _executionContext = engine.executionContext + + val modelResource = _executionContext.resourceModel + + // Creating the resource of the trace + // val ResourceSet rs = modelResource.getResourceSet() + val ResourceSet rs = new ResourceSetImpl + + // We check whether or not we need transactions + val ed = TransactionUtil.getEditingDomain(rs) + needTransaction = ed != null + + val URI traceModelURI = URI.createPlatformResourceURI( + _executionContext.getWorkspace().getExecutionPath().toString() + "/execution.trace", false) + val Resource traceResource = rs.createResource(traceModelURI) + + // We construct a new listener addon if required + this.listenerAddon = new BatchModelChangeListener(EMFResource.getRelatedResources(engine.executionContext.resourceModel)) + listenerAddon.registerObserver(this) + + val launchConfiguration = engine.extractLaunchConfiguration + + val BiMap> exeToTraced = HashBiMap.create + + // We construct the trace constructor, using the concrete generated method + traceConstructor = constructTraceConstructor(modelResource, traceResource, exeToTraced) + + // We initialize the trace + modifyTrace([traceConstructor.initTrace(launchConfiguration)]) + + // 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> + val stateManager = constructStateManager(modelResource, exeToTraced.inverse) + traceExplorer = new GenericTraceExplorer(trace, stateManager) + traceExtractor = new GenericTraceExtractor(trace) + traceListener = new BatchModelChangeListener(EMFResource.getRelatedResources(traceResource)) + traceNotifier = new GenericTraceNotifier(traceListener) + traceNotifier.addListener(traceExtractor) + traceNotifier.addListener(traceExplorer) + } + } + } + + /** + * Wrapper using lambda to always use a RecordingCommand when modifying the trace + */ + private def void modifyTrace(Runnable r, String message) { + if (needTransaction) { + val ed = TransactionUtil.getEditingDomain(_executionContext.resourceModel) + val Set catchedException = new HashSet + var RecordingCommand command = new RecordingCommand(ed, message) { + protected override void doExecute() { + try { + r.run + } catch (Throwable t) { + catchedException.add(t) + } + } + } + CommandExecution.execute(ed, command) + if (!catchedException.empty) + throw catchedException.head + } else { + r.run + } + } + + /** + * Same as above, but without message. + */ + private def void modifyTrace(Runnable r) { + modifyTrace(r, "") + } + + public override List validate(List otherAddons) { + + val ArrayList errors = new ArrayList() + + var boolean found = false + var addonName = "" + for (IEngineAddon iEngineAddon : otherAddons) { + if (iEngineAddon instanceof AbstractTraceAddon && iEngineAddon !== this) { + found = true + addonName = EngineAddonSpecificationExtensionPoint.getName(iEngineAddon) + } + } + + if (found) { + val thisName = EngineAddonSpecificationExtensionPoint.getName(this) + errors.add(thisName + " can't run with " + addonName) + } + + return errors + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericStateManager.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericStateManager.java new file mode 100644 index 000000000..246c4b520 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericStateManager.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2017 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.trace.gemoc.traceaddon; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.gemoc.executionframework.engine.core.CommandExecution; + +import org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericState; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject; +import org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue; +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; +import org.eclipse.gemoc.trace.gemoc.api.IStateManager; + +public class GenericStateManager implements IStateManager> { + + private final Resource modelResource; + + private final Map, EObject> tracedToExe; + + public GenericStateManager(Resource modelResource, Map, EObject> tracedToExe) { + this.modelResource = modelResource; + this.tracedToExe = tracedToExe; + } + + @Override + public void restoreState(State state) { + + if (modelResource != null && state instanceof GenericState) { + try { + final TransactionalEditingDomain ed = TransactionUtil.getEditingDomain(modelResource); + if (ed != null) { + final RecordingCommand command = new RecordingCommand(ed, "") { + protected void doExecute() { + restoreStateExecute((GenericState) state); + } + }; + CommandExecution.execute(ed, command); + } + } catch (Exception e) { + throw e; + } + } + } + + public void restoreStateExecute(GenericState state) { + state.getValues().forEach(v -> { + GenericDimension dimension = (GenericDimension) v.eContainer(); + GenericTracedObject tracedObject = (GenericTracedObject) dimension.eContainer(); + EObject originalObject = tracedObject.getOriginalObject(); + if (originalObject == null) { + originalObject = tracedToExe.get(tracedObject); + } + if (v instanceof GenericAttributeValue) { + if (v instanceof IntegerAttributeValue) { + originalObject.eSet(dimension.getDynamicProperty(), ((IntegerAttributeValue) v).getAttributeValue()); + } else if (v instanceof BooleanAttributeValue) { + originalObject.eSet(dimension.getDynamicProperty(), ((BooleanAttributeValue) v).isAttributeValue()); + } else { + originalObject.eSet(dimension.getDynamicProperty(), ((StringAttributeValue) v).getAttributeValue()); + } + } else { + if (v instanceof SingleReferenceValue) { + final EObject refVal = ((SingleReferenceValue) v).getReferenceValue(); + if (refVal instanceof GenericTracedObject) { + final EObject exe = tracedToExe.get(refVal); + originalObject.eSet(dimension.getDynamicProperty(), exe); + } else { + originalObject.eSet(dimension.getDynamicProperty(), refVal); + } + } else { + final List values = new BasicEList(); + values.addAll(((ManyReferenceValue) v).getReferenceValues().stream().map(refVal -> { + if (refVal instanceof GenericTracedObject) { + return tracedToExe.get(refVal); + } else { + return refVal; + } + }).collect(Collectors.toList())); + originalObject.eSet(dimension.getDynamicProperty(), values); + } + } + }); + } +} 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 new file mode 100644 index 000000000..38d83870f --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceConstructor.java @@ -0,0 +1,416 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.traceaddon; + +import java.util.Deque; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.common.util.URI; +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.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NewObjectModelChange; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NonCollectionFieldModelChange; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.PotentialCollectionFieldModelChange; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.RemovedObjectModelChange; +import org.eclipse.gemoc.xdsmlframework.commons.DynamicAnnotationHelper; + +import org.eclipse.gemoc.trace.commons.model.generictrace.BooleanAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericSequentialStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericSmallStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericState; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictraceFactory; +import org.eclipse.gemoc.trace.commons.model.generictrace.IntegerAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.IntegerObjectAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.ManyReferenceValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.StringAttributeValue; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.MSEModel; +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.gemoc.api.ITraceConstructor; + +public class GenericTraceConstructor implements ITraceConstructor { + + private Trace traceRoot; + private Resource executedModel; + private MSEModel mseModel; + private Resource traceResource; + private final Map> exeToTraced; + private final Deque context = new LinkedList<>(); + private GenericState lastState; + + public GenericTraceConstructor(Resource executedModel, Resource traceResource, Map> exeToTraced) { + this.executedModel = executedModel; + this.traceResource = traceResource; + this.exeToTraced = exeToTraced; + } + + private Set getAllExecutedModelResources() { + Set allResources = new HashSet<>(); + allResources.add(executedModel); + allResources.addAll(org.eclipse.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(executedModel)); + 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() + .filter(p -> DynamicAnnotationHelper.isDynamic(p)) + .collect(Collectors.toList()); + if (DynamicAnnotationHelper.isDynamic(object.eClass()) || !mutableProperties.isEmpty()) { + return addNewObjectToState(object, mutableProperties, lastState); + } + return true; + } + + @SuppressWarnings("unchecked") + private GenericValue getGenericValue(EObject object, EStructuralFeature mutableProperty, GenericState state) { + GenericValue result = null; + if (mutableProperty instanceof EAttribute) { + final EClassifier eType = mutableProperty.getEType(); + if (eType == EcorePackage.Literals.EINT) { + final IntegerAttributeValue value = GenerictraceFactory.eINSTANCE.createIntegerAttributeValue(); + value.setAttributeValue((Integer) object.eGet(mutableProperty)); + result = value; + } else if (eType == EcorePackage.Literals.EBOOLEAN) { + final BooleanAttributeValue value = GenerictraceFactory.eINSTANCE.createBooleanAttributeValue(); + value.setAttributeValue((Boolean) object.eGet(mutableProperty)); + result = value; + } else if (eType == EcorePackage.Literals.ESTRING) { + final StringAttributeValue value = GenerictraceFactory.eINSTANCE.createStringAttributeValue(); + value.setAttributeValue((String) object.eGet(mutableProperty)); + result = value; + } else if (eType == EcorePackage.Literals.EINTEGER_OBJECT) { + final IntegerObjectAttributeValue value = GenerictraceFactory.eINSTANCE.createIntegerObjectAttributeValue(); + value.setAttributeValue((Integer) object.eGet(mutableProperty)); + result = value; + } + } else if (mutableProperty instanceof EReference) { + if (mutableProperty.isMany()) { + final List modelElements = (List) object.eGet(mutableProperty); + final ManyReferenceValue value = GenerictraceFactory.eINSTANCE.createManyReferenceValue(); + for (EObject o : modelElements) { + if (DynamicAnnotationHelper.isDynamic(o.eClass())) { + value.getReferenceValues().add(exeToTraced.get(o)); + } else { + value.getReferenceValues().add(o); + } + } + result = value; + } else { + final EObject o = (EObject) object.eGet(mutableProperty); + final SingleReferenceValue value = GenerictraceFactory.eINSTANCE.createSingleReferenceValue(); + if (DynamicAnnotationHelper.isDynamic(o.eClass())) { + value.setReferenceValue(exeToTraced.get(o)); + } else { + value.setReferenceValue(o); + } + result = value; + } + } + return result; + } + + @SuppressWarnings("unchecked") + private boolean addNewObjectToState(EObject object, List mutableProperties, GenericState state) { + boolean added = false; + if (!exeToTraced.containsKey(object)) { + final GenericTracedObject tracedObject = GenerictraceFactory.eINSTANCE.createGenericTracedObject(); + if (!DynamicAnnotationHelper.isDynamic(object.eClass())) { + tracedObject.setOriginalObject(object); + } + exeToTraced.put(object, tracedObject); + for (EStructuralFeature mutableProperty : mutableProperties) { + final GenericDimension dimension = GenerictraceFactory.eINSTANCE.createGenericDimension(); + GenericValue firstValue = null; + dimension.setDynamicProperty(mutableProperty); + tracedObject.getAllDimensions().add(dimension); + if (mutableProperty instanceof EAttribute) { + final EClassifier eType = mutableProperty.getEType(); + if (eType == EcorePackage.Literals.EINT) { + final IntegerAttributeValue value = GenerictraceFactory.eINSTANCE.createIntegerAttributeValue(); + value.setAttributeValue((Integer) object.eGet(mutableProperty)); + firstValue = value; + } else if (eType == EcorePackage.Literals.EBOOLEAN) { + final BooleanAttributeValue value = GenerictraceFactory.eINSTANCE.createBooleanAttributeValue(); + value.setAttributeValue((Boolean) object.eGet(mutableProperty)); + firstValue = value; + } else if (eType == EcorePackage.Literals.ESTRING) { + final StringAttributeValue value = GenerictraceFactory.eINSTANCE.createStringAttributeValue(); + value.setAttributeValue((String) object.eGet(mutableProperty)); + firstValue = value; + } + } else if (mutableProperty instanceof EReference) { + if (mutableProperty.isMany()) { + final List modelElements = (List) object.eGet(mutableProperty); + final ManyReferenceValue value = GenerictraceFactory.eINSTANCE.createManyReferenceValue(); + for (EObject o : modelElements) { + addNewObjectToStateIfDynamic(o, state); + value.getReferenceValues().add(exeToTraced.get(o)); + } + firstValue = value; + } else { + final EObject o = (EObject) object.eGet(mutableProperty); + if (o != null) { + addNewObjectToStateIfDynamic(o, state); + final SingleReferenceValue value = GenerictraceFactory.eINSTANCE.createSingleReferenceValue(); + value.setReferenceValue(exeToTraced.get(o)); + firstValue = value; + } + } + } + if (firstValue != null) { + dimension.getValues().add(firstValue); + state.getValues().add(firstValue); + } + } + traceRoot.getTracedObjects().add(tracedObject); + added = true; + } + return added; + } + + private void addInitialState() { + if (lastState == null) { + // Creation of the initial state + Set allResources = getAllExecutedModelResources(); + + lastState = GenerictraceFactory.eINSTANCE.createGenericState(); + for (Resource r : allResources) { + for (TreeIterator i = r.getAllContents(); i.hasNext();) { + final EObject o = i.next(); + addNewObjectToStateIfDynamic(o, lastState); + } + } + this.traceRoot.getStates().add(lastState); + } + } + + private boolean copiedState = false; + + private GenericState copyState(GenericState oldState) { + GenericState newState = GenerictraceFactory.eINSTANCE.createGenericState(); + newState.getValues().addAll(oldState.getValues()); + copiedState = true; + return newState; + } + + @SuppressWarnings("unchecked") + @Override + public void addState(List modelChanges) { + if (lastState == null) { + addInitialState(); + } + if (!modelChanges.isEmpty()) { + boolean stateChanged = false; + // We start by a (shallow) copy of the last state + // But we will have to rollback a little by replacing values that changed + GenericState newState = copyState(lastState); + for (ModelChange modelChange : modelChanges) { + EObject o = modelChange.getChangedObject(); + // We only look at constructable objects that have mutable fields + // Here we have nothing to rollback, just a new object to add + if (modelChange instanceof NewObjectModelChange) { + stateChanged = true; + addNewObjectToStateIfDynamic(o, newState); + } + // We only look at constructable objects that have mutable fields + // Here we must rollback to remove the values of the removed object from the copied state + else if (modelChange instanceof RemovedObjectModelChange) { + stateChanged = true; + final List values = newState.getValues(); + ((GenericTracedObject) exeToTraced.get(o)).getAllDimensions().forEach(d -> values.remove(d.getValues().get(d.getValues().size() - 1))); + } + // Here we must look at non-collection mutable fields + // We must rollback the last values from the copied state, and add new values as well + // ie. mix of remove and new + else if (modelChange instanceof NonCollectionFieldModelChange) { + stateChanged = true; + EStructuralFeature p = ((NonCollectionFieldModelChange) modelChange).getChangedField(); + // Rollback: we remove the last value of this field from the new state + final GenericTracedObject tracedObject = (GenericTracedObject) exeToTraced.get(o); + final GenericDimension dimension = tracedObject.getAllDimensions().stream() + .filter(d -> d.getDynamicProperty() == p) + .findFirst().orElse(null); + if (dimension != null) { + final List values = dimension.getValues(); + final Object pValue = o.eGet(p); + if (pValue instanceof EObject) { + addNewObjectToStateIfDynamic((EObject) pValue, newState); + } + final GenericValue lastValue = values.isEmpty() ? null : values.get(values.size() - 1); + if (lastValue != null) { + newState.getValues().remove(lastValue); + } + final GenericValue newValue = getGenericValue(o, p, newState); + values.add(newValue); + newState.getValues().add(newValue); + } + } + // Here we look at collection mutable fields + // We must first manually find out if the collection changed... + // If it changed we must rollback the last values from the copied state, and add new values as well + else if (modelChange instanceof PotentialCollectionFieldModelChange) { + final EStructuralFeature p = ((PotentialCollectionFieldModelChange) modelChange).getChangedField(); + final GenericTracedObject tracedObject = (GenericTracedObject) exeToTraced.get(o); + // We compare the last collection in the value sequence, and the current one in the potentially changed object + final GenericDimension dimension = tracedObject.getAllDimensions().stream() + .filter(d -> d.getDynamicProperty() == p) + .findFirst().orElse(null); + if (dimension != null) { + final List dimensionValues = dimension.getValues(); + final ManyReferenceValue lastValue = (ManyReferenceValue) dimensionValues.get(dimensionValues.size() - 1); + final List values = (List) o.eGet(p); + for (EObject eObj : values) { + addNewObjectToStateIfDynamic(eObj, newState); + } + boolean change = false; + if (lastValue != null) { + if (lastValue.getReferenceValues().size() == values.size()) { + java.util.Iterator it = values.iterator(); + for (EObject aPreviousValue : lastValue.getReferenceValues()) { + EObject aCurrentValue = it.next(); + if (aPreviousValue != exeToTraced.get(aCurrentValue)) { + change = true; + break; + } + } + } else { + change = true; + } + } else { + change = true; + } + if (change) { + stateChanged = true; + // Rollback: we remove the last value of this field from the new state + newState.getValues().remove(lastValue); + // And we create a proper new value + GenericValue newValue = getGenericValue(o, p, newState); + dimension.getValues().add(newValue); + newState.getValues().add(newValue); + } + } + } + } + if (stateChanged) { + final GenericStep currentStep = context.peekFirst(); + if (currentStep != null && currentStep instanceof BigStep) { + final GenericState startingState = lastState; + final GenericState endingState = newState; + addImplicitStep((BigStep) currentStep, startingState, endingState); + } + lastState = newState; + traceRoot.getStates().add(lastState); + } else if (copiedState) { + newState.getValues().clear(); + } + copiedState = false; + } + } + + private void addImplicitStep(BigStep currentStep, GenericState startingState, GenericState endingState) { + GenericSmallStep implicitStep = GenerictraceFactory.eINSTANCE.createGenericSmallStep(); + implicitStep.setStartingState(startingState); + implicitStep.setEndingState(endingState); + currentStep.getSubSteps().add(implicitStep); + } + + @Override + public void addStep(Step step) { + GenericSequentialStep step_cast = null; + if (step != null && step instanceof GenericSequentialStep) { + step_cast = (GenericSequentialStep) step; + if (mseModel == null) { + mseModel = org.eclipse.gemoc.trace.commons.model.trace.TraceFactory.eINSTANCE.createMSEModel(); + traceResource.getContents().add(mseModel); + } + mseModel.getOwnedMSEs().add(step_cast.getMseoccurrence().getMse()); + GenericState state = traceRoot.getStates().get(traceRoot.getStates().size() - 1); + step_cast.setStartingState(state); + if (!context.isEmpty() && context.getFirst() != null) { + context.getFirst().getSubSteps().add(step_cast); + } else { + traceRoot.getRootStep().getSubSteps().add(step_cast); + } + } + context.push(step_cast); + } + + @Override + public void endStep(Step step) { + GenericStep popped = context.pop(); + if (popped != null) + popped.setEndingState(lastState); + } + + @Override + public EObject initTrace(LaunchConfiguration launchConfiguration) { + // Create root + traceRoot = GenerictraceFactory.eINSTANCE.createGenericTrace(); + traceRoot.setLaunchconfiguration(launchConfiguration); + + // Create root sequential step + GenericSequentialStep rootStep = GenerictraceFactory.eINSTANCE.createGenericSequentialStep(); + traceRoot.setRootStep(rootStep); + + // Put in the resource + traceResource.getContents().add(traceRoot); + + return traceRoot; + } + + @Override + public void save() { + try { + traceResource.save(null); + } catch (java.io.IOException e) { + e.printStackTrace(); + } + } + + @Override + public void save(URI uri) { + try { + traceResource.setURI(uri); + traceResource.save(null); + } catch (java.io.IOException e) { + e.printStackTrace(); + } + } + + @Override + public boolean isPartialTraceConstructor() { + return false; + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceEngineAddon.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceEngineAddon.java new file mode 100644 index 000000000..49cc8298d --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceEngineAddon.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.traceaddon; + +import java.util.Map; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.commons.model.trace.Trace; +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; +import org.eclipse.gemoc.trace.gemoc.api.IStateManager; +import org.eclipse.gemoc.trace.gemoc.api.IStepFactory; +import org.eclipse.gemoc.trace.gemoc.api.ITraceConstructor; + +public class GenericTraceEngineAddon extends AbstractTraceAddon { + + private GenericTraceStepFactory factory = null; + + @Override + public IStepFactory getFactory() { + if (factory == null) { + factory = new GenericTraceStepFactory(); + } + return factory; + } + + @Override + public ITraceConstructor constructTraceConstructor(Resource modelResource, + Resource traceResource, Map> exeToTraced) { + return new GenericTraceConstructor(modelResource, traceResource, exeToTraced); + } + + @Override + public boolean isAddonForTrace(EObject traceRoot) { + return traceRoot instanceof Trace; + } + + @Override + public IStateManager> constructStateManager(Resource modelResource, Map, EObject> tracedToExe) { + return new GenericStateManager(modelResource, tracedToExe); + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceExplorer.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceExplorer.java new file mode 100644 index 000000000..856761ea3 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceExplorer.java @@ -0,0 +1,563 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.traceaddon; + +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 java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +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.IStateManager; +import org.eclipse.gemoc.trace.gemoc.api.ITraceExplorer; +import org.eclipse.gemoc.trace.gemoc.api.ITraceViewListener; + +public class GenericTraceExplorer implements ITraceExplorer, State, TracedObject, Dimension, Value> { + + private Trace trace; + + final private List> callStack = new ArrayList<>(); + + private State currentState; + + private Step stepIntoResult; + private Step stepOverResult; + private Step stepReturnResult; + + private Step stepBackIntoResult; + private Step stepBackOverResult; + private Step stepBackOutResult; + + private HashMap, Boolean> canBackValueCache = new HashMap<>(); + private HashMap, Boolean> canStepValueCache = new HashMap<>(); + + private Map> listeners = new HashMap<>(); + + private IStateManager> stateManager; + + public GenericTraceExplorer(Trace trace) { + this.trace = trace; + } + + public GenericTraceExplorer(Trace trace, IStateManager> stateManager) { + this.stateManager = stateManager; + this.trace = trace; + } + + private List> getSubSteps(Step step) { + if (step instanceof BigStep) { + return ((BigStep) step).getSubSteps(); + } else { + return Collections.emptyList(); + } + } + + private Step computeBackInto(List> stepPath) { + final List> rootSteps = getSubSteps(trace.getRootStep()); + final int depth = stepPath.size(); + Step result = null; + if (depth > 1) { + final Step currentStep = stepPath.get(depth - 1); + final Step parentStep = stepPath.get(depth - 2); + final SequentialStep parentStep_cast = (SequentialStep) parentStep; + final List> parentSubSteps = parentStep_cast.getSubSteps(); + final int idx = parentSubSteps.indexOf(currentStep); + if (idx == 0) { + // If the current step is the first in its parents substeps, + // return parent step + result = parentStep; + } else if (idx > 0) { + // Otherwise, return the deepest substep in the previous sibling + // step + final Step previousSiblingStep = parentSubSteps.get(idx - 1); + Step tmpStep = previousSiblingStep; + final List> tmpSubSteps = new ArrayList<>(); + tmpSubSteps.clear(); + if (tmpStep instanceof SequentialStep) { + SequentialStep tmpStep_cast = (SequentialStep) tmpStep; + tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); + } + while (!tmpSubSteps.isEmpty()) { + tmpStep = tmpSubSteps.get(tmpSubSteps.size() - 1); + tmpSubSteps.clear(); + if (tmpStep instanceof SequentialStep) { + SequentialStep tmpStep_cast = (SequentialStep) tmpStep; + tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); + } + } + result = tmpStep; + } + } else if (depth == 1) { + final Step currentStep = stepPath.get(0); + final int idx = rootSteps.indexOf(currentStep); + if (idx > 0) { + Step tmpStep = rootSteps.get(idx - 1); + final List> tmpSubSteps = new ArrayList<>(); + tmpSubSteps.clear(); + if (tmpStep instanceof SequentialStep) { + SequentialStep tmpStep_cast = (SequentialStep) tmpStep; + tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); + } + while (!tmpSubSteps.isEmpty()) { + tmpStep = tmpSubSteps.get(tmpSubSteps.size() - 1); + tmpSubSteps.clear(); + if (tmpStep instanceof SequentialStep) { + SequentialStep tmpStep_cast = (SequentialStep) tmpStep; + tmpSubSteps.addAll(tmpStep_cast.getSubSteps()); + } + } + result = tmpStep; + } + } + return result; + } + + private Step computeBackOver(List> stepPath) { + final List> rootSteps = getSubSteps(trace.getRootStep()); + final int depth = stepPath.size(); + Step result = null; + if (depth > 1) { + final Step currentStep = stepPath.get(depth - 1); + final Step parentStep = stepPath.get(depth - 2); + final BigStep parentStep_cast = (BigStep) parentStep; + final List> parentSubSteps = parentStep_cast.getSubSteps(); + final int idx = parentSubSteps.indexOf(currentStep); + if (idx == 0) { + // If the current step is the first in its parents substeps, + // return parent step + result = parentStep; + } else { + // Otherwise, return the previous sibling step + result = parentSubSteps.get(idx - 1); + } + } else if (depth == 1) { + final Step currentStep = stepPath.get(0); + final int idx = rootSteps.indexOf(currentStep); + if (idx > 0) { + result = rootSteps.get(idx - 1); + } + } + return result; + } + + private Step computeBackOut(List> stepPath) { + if (stepPath.size() > 1) { + return stepPath.get(stepPath.size() - 2); + } + return null; + } + + private Step computeStepInto(List> stepPath, List> rootSteps) { + return findNextStep(stepPath, null, 0); + } + + private Step computeStepOver(List> stepPath, List> rootSteps) { + if (!stepPath.isEmpty()) { + return findNextStep(stepPath, stepPath.get(stepPath.size() - 1), 1); + } + return null; + } + + private Step computeStepReturn(List> stepPath, List> rootSteps) { + if (stepPath.size() > 1) { + return findNextStep(stepPath, stepPath.get(stepPath.size() - 2), 2); + } + return null; + } + + private Step findNextStep(final List> stepPath, final Step previousStep, final int start) { + final List> rootSteps = getSubSteps(trace.getRootStep()); + Step result = null; + int i = start; + int depth = stepPath.size(); + Step previous = previousStep; + while (result == null && i < depth) { + final Step currentStep = stepPath.get(depth - i - 1); + final List> currentSubSteps = new ArrayList<>(); + if (currentStep instanceof BigStep) { + currentSubSteps.addAll(((BigStep) currentStep).getSubSteps()); + } + if (currentSubSteps.isEmpty()) { + // No substep to step into, we thus have to explore the substeps + // of the parent step + previous = currentStep; + } else { + if (previous == null) { + // First time we step into + result = currentSubSteps.get(0); + } else { + final int idx = currentSubSteps.indexOf(previous) + 1; + if (idx < currentSubSteps.size()) { + // We step into the next step + result = currentSubSteps.get(idx); + } else { + previous = currentStep; + } + } + } + i++; + } + if (result == null) { + final int idx = rootSteps.indexOf(previous) + 1; + if (idx < rootSteps.size()) { + result = rootSteps.get(idx); + } + } + return result; + } + + private void computeExplorerState(List> stepPath) { + final List> rootSteps = getSubSteps(trace.getRootStep()); + + stepIntoResult = computeStepInto(stepPath, rootSteps); + stepOverResult = computeStepOver(stepPath, rootSteps); + stepReturnResult = computeStepReturn(stepPath, rootSteps); + + stepBackIntoResult = computeBackInto(stepPath); + stepBackOverResult = computeBackOver(stepPath); + stepBackOutResult = computeBackOut(stepPath); + + callStack.clear(); + callStack.addAll(stepPath); + } + + private void goTo(State state) { + if (state != null && stateManager != null) { + stateManager.restoreState(state); + } + } + + private void jumpBeforeStep(Step step) { + if (step != null) { + final State state = step.getStartingState(); + currentState = state; + goTo(currentState); + updateCallStack(step); + } + } + + @Override + public void loadTrace(Trace, TracedObject, State> trace) { + this.trace = trace; + } + + @Override + public void loadTrace(Trace, TracedObject, State> trace, IStateManager> stateManager) { + this.stateManager = stateManager; + this.trace = trace; + } + + @Override + public Step getCurrentForwardStep() { + if (!callStack.isEmpty()) { + return callStack.get(callStack.size() - 1); + } + return null; + } + + @Override + public Step getCurrentBackwardStep() { + return stepBackOverResult; + } + + @Override + public Step getCurrentBigStep() { + return stepBackOutResult; + } + + @Override + public void jump(State state) { + if (state != null) { + currentState = state; + goTo(currentState); + final List> steps = currentState.getStartedSteps(); + final Step step = steps.isEmpty() ? null : steps.get(0); + updateCallStack(step); + } + } + + @Override + public void jump(Value value) { + if (value != null) { + List> states = value.getStates(); + if (!states.isEmpty()) { + jump(states.get(0)); + } + } + } + + private List> getStepsForStates(int startingState, int endingState) { + final List> states = trace.getStates(); + Predicate> predicate = s -> { + final State stepStartingState = s.getStartingState(); + final State stepEndingState = s.getEndingState(); + final int stepStartingIndex = states.indexOf(stepStartingState); + final int stepEndingIndex = stepEndingState == null ? -1 : states.indexOf(stepEndingState); + return (stepEndingIndex == -1 || stepEndingIndex >= startingState) && stepStartingIndex <= endingState; + }; + return getSubSteps(trace.getRootStep()).stream().filter(predicate).collect(Collectors.toList()); + } + + @Override + public void loadLastState() { + final int idx = trace.getStates().size() - 1; + final List> steps = new ArrayList<>(getStepsForStates(idx, idx)); + Step lastStep = null; + while (!steps.isEmpty()) { + lastStep = steps.get(steps.size() - 1); + steps.clear(); + if (lastStep instanceof BigStep) { + final List> subSteps = ((BigStep) lastStep).getSubSteps(); + steps.addAll(subSteps); + } + } + jumpBeforeStep(lastStep); + } + + @Override + public boolean stepInto() { + if (stepIntoResult != null) { + jumpBeforeStep(stepIntoResult); + return true; + } + return false; + } + + @Override + public boolean stepOver() { + if (stepOverResult != null) { + jumpBeforeStep(stepOverResult); + return true; + } + return false; + } + + @Override + public boolean stepReturn() { + if (stepReturnResult != null) { + jumpBeforeStep(stepReturnResult); + return true; + } + return false; + } + + @Override + public boolean canStepBackInto() { + return stepBackIntoResult != null; + } + + @Override + public boolean canStepBackOver() { + return stepBackOverResult != null; + } + + @Override + public boolean canStepBackOut() { + return stepBackOutResult != null; + } + + @Override + public boolean stepBackInto() { + if (stepBackIntoResult != null) { + jumpBeforeStep(stepBackIntoResult); + return true; + } + return false; + } + + @Override + public boolean stepBackOver() { + if (stepBackOverResult != null) { + jumpBeforeStep(stepBackOverResult); + return true; + } + return false; + } + + @Override + public boolean stepBackOut() { + if (stepBackOutResult != null) { + jumpBeforeStep(stepBackOutResult); + return true; + } + return false; + } + + private Value getCurrentValue(Dimension dimension) { + if (currentState == null) { + return null; + } + return currentState.getValues().stream() + .filter(v -> v.eContainer() == dimension) + .findFirst().orElse(null); + } + + @Override + public boolean canStepValue(Dimension dimension) { + final Boolean cachedValue = canStepValueCache.get(dimension); + if (cachedValue != null) { + return cachedValue; + } else { + final Value currentValue = getCurrentValue(dimension); + final boolean result; + if (currentValue != null) { + final List> values = dimension.getValues(); + final int idx = values.indexOf(currentValue); + result = idx < values.size(); + } else { + result = false; + } + canStepValueCache.put(dimension, result); + return result; + } + } + + @Override + public boolean canBackValue(Dimension dimension) { + final Boolean cachedValue = canBackValueCache.get(dimension); + if (cachedValue != null) { + return cachedValue; + } else { + final Value currentValue = getCurrentValue(dimension); + final boolean result; + if (currentValue != null) { + final List> values = dimension.getValues(); + final int idx = values.indexOf(currentValue); + result = idx > 0; + } else { + result = false; + } + canBackValueCache.put(dimension, result); + return result; + } + } + + @Override + public void stepValue(Dimension dimension) { + if (canStepValue(dimension)) { + Value currentValue = getCurrentValue(dimension); + final List> values = dimension.getValues(); + final int idx = values.indexOf(currentValue); + jump(values.get(idx + 1)); + } + } + + @Override + public void backValue(Dimension dimension) { + if (canBackValue(dimension)) { + Value currentValue = getCurrentValue(dimension); + final List> values = dimension.getValues(); + final int idx = values.indexOf(currentValue); + jump(values.get(idx - 1)); + } + } + + @Override + public boolean isInReplayMode() { + return stepIntoResult != null; + } + + @Override + public List> getCallStack() { + return callStack; + } + + @Override + public void updateCallStack(Step step) { + final List> newPath = new ArrayList<>(); + if (step != null) { + newPath.add(step); + EObject container = step.eContainer(); + while (container != null && container instanceof Step && container != trace.getRootStep()) { + newPath.add(0, (Step) container); + container = container.eContainer(); + } + currentState = step.getStartingState(); + } + computeExplorerState(newPath); + notifyListeners(); + } + + @Override + public void notifyListeners() { + for (Map.Entry> entry : listeners.entrySet()) { + entry.getValue().forEach(c -> c.execute()); + } + } + + @Override + public void registerCommand(ITraceViewListener listener, TraceViewCommand command) { + if (listener != null) { + Set commands = listeners.get(listener); + if (commands == null) { + commands = new HashSet<>(); + listeners.put(listener, commands); + } + commands.add(command); + } + } + + @Override + public void removeListener(ITraceViewListener listener) { + if (listener != null) { + listeners.remove(listener); + } + } + + @Override + public void statesAdded(List> states) { + // TODO Auto-generated method stub + + } + + @Override + public void stepsStarted(List> steps) { + // TODO Auto-generated method stub + + } + + @Override + public void stepsEnded(List> steps) { + // TODO Auto-generated method stub + + } + + @Override + public void valuesAdded(List> values) { + // TODO Auto-generated method stub + + } + + @Override + public void dimensionsAdded(List> dimensions) { + // TODO Auto-generated method stub + + } + + @Override + public State getCurrentState() { + return currentState; + } +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceExtractor.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceExtractor.java new file mode 100644 index 000000000..eeacc0f2e --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceExtractor.java @@ -0,0 +1,632 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.traceaddon; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.function.Function; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import org.eclipse.emf.common.util.Monitor; +import org.eclipse.emf.compare.Comparison; +import org.eclipse.emf.compare.EMFCompare; +import org.eclipse.emf.compare.Match; +import org.eclipse.emf.compare.diff.DefaultDiffEngine; +import org.eclipse.emf.compare.diff.DiffBuilder; +import org.eclipse.emf.compare.diff.FeatureFilter; +import org.eclipse.emf.compare.diff.IDiffEngine; +import org.eclipse.emf.compare.diff.IDiffProcessor; +import org.eclipse.emf.compare.internal.spec.MatchSpec; +import org.eclipse.emf.compare.postprocessor.BasicPostProcessorDescriptorImpl; +import org.eclipse.emf.compare.postprocessor.IPostProcessor; +import org.eclipse.emf.compare.postprocessor.IPostProcessor.Descriptor.Registry; +import org.eclipse.emf.compare.postprocessor.PostProcessorDescriptorRegistryImpl; +import org.eclipse.emf.compare.scope.DefaultComparisonScope; +import org.eclipse.emf.compare.scope.IComparisonScope; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.naming.QualifiedName; + +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericAttributeValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericDimension; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTracedObject; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericValue; +import org.eclipse.gemoc.trace.commons.model.generictrace.SingleReferenceValue; +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +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.ITraceExtractor; +import org.eclipse.gemoc.trace.gemoc.api.ITraceViewListener; + +@SuppressWarnings("restriction") +public class GenericTraceExtractor + implements ITraceExtractor, State, TracedObject, Dimension, Value> { + + private Trace trace; + private Map, Boolean> ignoredDimensions = new HashMap<>(); + private final IQualifiedNameProvider nameProvider = new DefaultDeclarativeQualifiedNameProvider(); + private Map> listeners = new HashMap<>(); + + /** + * Constructor + * + * @param trace + * The trace + */ + public GenericTraceExtractor(Trace, TracedObject, State> trace) { + this.trace = trace; + configureDiffEngine(); + } + + @Override + public void loadTrace(Trace, TracedObject, State> trace) { + this.trace = trace; + } + + @Override + public void notifyListeners() { + for (Map.Entry> entry : listeners.entrySet()) { + entry.getValue().forEach(c -> c.execute()); + } + } + + @Override + public void registerCommand(ITraceViewListener listener, TraceViewCommand command) { + if (listener != null) { + Set commands = listeners.get(listener); + if (commands == null) { + commands = new HashSet<>(); + listeners.put(listener, commands); + } + commands.add(command); + } + } + + @Override + public void removeListener(ITraceViewListener listener) { + if (listener != null) { + listeners.remove(listener); + } + } + + @Override + public void ignoreDimension(Dimension dimension, boolean ignore) { + ignoredDimensions.put(dimension, ignore); + } + + @Override + public boolean isDimensionIgnored(Dimension dimension) { + final Boolean ignored = ignoredDimensions.get(dimension); + return ignored != null && ignored.booleanValue(); + } + + private boolean isDimensionIgnored(int index) { + return isDimensionIgnored(getDimensions().get(index)); + } + + @Override + public boolean isStateBreakable(State state) { + // final boolean b = state.getStartedSteps().size() == 1; + // if (b) { + // Step s = state.getStartedSteps().get(0); + // return !(s instanceof ImplicitStep); + // } + return true; + } + + private final IPostProcessor customPostProcessor = new IPostProcessor() { + + private final Function getIdFunction = e -> e.eClass().getName(); + + @Override + public void postMatch(Comparison comparison, Monitor monitor) { + final List matches = new ArrayList<>(comparison.getMatches()); + final List treatedMatches = new ArrayList<>(); + matches.forEach(m1 -> { + matches.forEach(m2 -> { + if (m1 != m2 && !treatedMatches.contains(m2)) { + final EObject left; + final EObject right; + if (m1.getLeft() != null && m1.getRight() == null && m2.getLeft() == null + && m2.getRight() != null) { + left = m1.getLeft(); + right = m2.getRight(); + } else if (m2.getLeft() != null && m2.getRight() == null && m1.getLeft() == null + && m1.getRight() != null) { + left = m2.getLeft(); + right = m1.getRight(); + } else { + return; + } + final String leftId = getIdFunction.apply(left); + final String rightId = getIdFunction.apply(right); + if (leftId.equals(rightId)) { + comparison.getMatches().remove(m1); + comparison.getMatches().remove(m2); + final Match match = new MatchSpec(); + match.setLeft(left); + match.setRight(right); + comparison.getMatches().add(match); + } + } + }); + treatedMatches.add(m1); + }); + } + + @Override + public void postDiff(Comparison comparison, Monitor monitor) { + } + + @Override + public void postRequirements(Comparison comparison, Monitor monitor) { + } + + @Override + public void postEquivalences(Comparison comparison, Monitor monitor) { + } + + @Override + public void postConflicts(Comparison comparison, Monitor monitor) { + } + + @Override + public void postComparison(Comparison comparison, Monitor monitor) { + } + }; + + private boolean compareInitialized = false; + private IPostProcessor.Descriptor descriptor = null; + private Registry registry = null; + private EMFCompare compare; + private IDiffEngine diffEngine = null; + + private void configureDiffEngine() { + IDiffProcessor diffProcessor = new DiffBuilder(); + diffEngine = new DefaultDiffEngine(diffProcessor) { + @Override + protected FeatureFilter createFeatureFilter() { + return new FeatureFilter() { + @Override + protected boolean isIgnoredReference(Match match, EReference reference) { + final String name = reference.getName(); + return name.equals("parent") || name.equals("states") || name.equals("statesNoOpposite"); + } + }; + } + }; + } + + private boolean compareEObjects(EObject e1, EObject e2) { + if (e1 == e2) { + return true; + } + + if (e1 == null || e2 == null) { + return false; + } + + if (!compareInitialized) { + descriptor = new BasicPostProcessorDescriptorImpl(customPostProcessor, Pattern.compile(".*"), null); + registry = new PostProcessorDescriptorRegistryImpl(); + registry.put(customPostProcessor.getClass().getName(), descriptor); + compare = EMFCompare.builder().setPostProcessorRegistry(registry).setDiffEngine(diffEngine).build(); + compareInitialized = true; + } + + final IComparisonScope scope = new DefaultComparisonScope(e1, e2, null); + final Comparison comparison = compare.compare(scope); + return comparison.getDifferences().isEmpty(); + } + + @Override + public boolean compareStates(State state1, State state2, boolean respectIgnored) { + if (state1.getValues().size() != state2.getValues().size()) { + return false; + } + + final List> values1 = getStateValues(state1); + final List> values2 = getStateValues(state2); + + boolean result = true; + for (int i = 0; i < values1.size(); i++) { + if (!respectIgnored || !isDimensionIgnored(i)) { + final Value value1 = values1.get(i); + final Value value2 = values2.get(i); + if (value1 != value2) { + result = result && compareEObjects(value1, value2); + if (!result) { + break; + } + } + } + } + + return result; + } + + private final List> cachedDimensions = new ArrayList<>(); + private final Map, List>> stateEquivalenceClasses = Collections + .synchronizedMap(new HashMap<>()); + private final Map, List>> cachedMaskedStateEquivalenceClasses = Collections + .synchronizedMap(new HashMap<>()); + private final List> observedValues = new ArrayList<>(); + + private List computeStateComparisonList(List> values) { + final List valueIndexes = new ArrayList<>(); + for (int i = 0; i < values.size(); i++) { + final Value value = values.get(i); + int idx = -1; + for (int j = 0; j < observedValues.size(); j++) { + final Value v1 = observedValues.get(j); + final Value v2 = value; + if (compareEObjects(v1, v2)) { + idx = j; + break; + } + } + if (idx != -1) { + valueIndexes.add(idx); + } else { + valueIndexes.add(observedValues.size()); + observedValues.add(value); + } + } + return valueIndexes; + } + + private void updateEquivalenceClasses(State state) { + final List> values = getStateValues(state); + final List valueIndexes = computeStateComparisonList(values); + List> equivalenceClass = stateEquivalenceClasses.get(valueIndexes); + if (equivalenceClass == null) { + equivalenceClass = new ArrayList<>(); + stateEquivalenceClasses.put(valueIndexes, equivalenceClass); + } + equivalenceClass.add(state); + final List> dimensionsToMask = getIgnoredDimensions(); + // If the cached masked equivalence classes have not been flushed, + // updated them. + if (!(dimensionsToMask.isEmpty() || cachedMaskedStateEquivalenceClasses.isEmpty())) { + final List> dimensions = getDimensions(); + final List dimensionIndexesToMask = dimensionsToMask.stream().map(d -> dimensions.indexOf(d)) + .sorted().collect(Collectors.toList()); + final List maskedIndexList = applyMask(valueIndexes, dimensionIndexesToMask); + equivalenceClass = cachedMaskedStateEquivalenceClasses.get(maskedIndexList); + if (equivalenceClass == null) { + equivalenceClass = new ArrayList<>(); + cachedMaskedStateEquivalenceClasses.put(maskedIndexList, equivalenceClass); + } + equivalenceClass.add(state); + } + } + + private List applyMask(List source, List mask) { + final List result = new ArrayList<>(source); + int j = 0; + for (Integer i : mask) { + result.remove(i - j); + j++; + } + return result; + } + + private List>> getStateEquivalenceClasses() { + final Set> dimensionsToMask = ignoredDimensions.keySet(); + if (dimensionsToMask.isEmpty()) { + return new ArrayList<>(stateEquivalenceClasses.values()); + } + if (cachedMaskedStateEquivalenceClasses.isEmpty()) { + final List> dimensions = getDimensions(); + final List dimensionIndexesToMask = dimensionsToMask.stream().map(d -> dimensions.indexOf(d)) + .sorted().collect(Collectors.toList()); + stateEquivalenceClasses.forEach((indexList, stateList) -> { + final List maskedIndexList = applyMask(indexList, dimensionIndexesToMask); + List> equivalenceClass = cachedMaskedStateEquivalenceClasses.get(maskedIndexList); + if (equivalenceClass == null) { + equivalenceClass = new ArrayList<>(); + cachedMaskedStateEquivalenceClasses.put(maskedIndexList, equivalenceClass); + } + equivalenceClass.addAll(stateList); + }); + } + return new ArrayList<>(cachedMaskedStateEquivalenceClasses.values()); + } + + @Override + public List>> computeStateEquivalenceClasses(List> states) { + return getStateEquivalenceClasses().stream() + .map(l -> l.stream().filter(s -> states.contains(s)).collect(Collectors.toList())) + .collect(Collectors.toList()); + } + + @Override + public List>> computeStateEquivalenceClasses() { + return getStateEquivalenceClasses().stream().map(l -> new ArrayList<>(l)).collect(Collectors.toList()); + } + + @Override + public LaunchConfiguration getLaunchConfiguration() { + return trace.getLaunchconfiguration(); + } + + @Override + public int getNumberOfDimensions() { + return trace.getTracedObjects().stream().map(o -> o.getDimensions().size()).reduce(0, (i1, i2) -> i1 + i2); + } + + private List> getStateValues(State state) { + final Map, Value> dimensionToValue = new HashMap<>(); + state.getValues().forEach(v -> dimensionToValue.put((Dimension) v.eContainer(), v)); + return getDimensions().stream().map(d -> dimensionToValue.get(d)).collect(Collectors.toList()); + } + + @Override + public String getStateDescription(State state) { + String result = ""; + final List> values = getStateValues(state); + for (int i = 0; i < values.size(); i++) { + if (!isDimensionIgnored(i)) { + String description = getValueDescription(values.get(i)); + result += (description == null ? "" : (result.length() == 0 ? "" : "\n") + description); + } + } + + return result; + } + + @Override + public int getStatesTraceLength() { + return trace.getStates().size(); + } + + @Override + public State getState(int stateIndex) { + return trace.getStates().get(stateIndex); + } + + @Override + public List> getStates(int firstStateIndex, int lastStateIndex) { + final List> result = new ArrayList<>(); + final int effectiveFrom = Math.max(0, firstStateIndex); + final int effectiveTo = Math.min(trace.getStates().size(), lastStateIndex + 1); + trace.getStates().subList(effectiveFrom, effectiveTo).forEach(s -> result.add(s)); + return result; + } + + @Override + public int getStateIndex(State state) { + return trace.getStates().indexOf(state); + } + + @Override + public int getValueFirstStateIndex(Value value) { + return trace.getStates().indexOf(value.getStates().get(0)); + } + + @Override + public int getValueLastStateIndex(Value value) { + List> states = value.getStates(); + return trace.getStates().indexOf(states.get(states.size() - 1)); + } + + private String getValueName(Value value) { + final String eClassName = value.eClass().getName(); + return eClassName.substring(eClassName.indexOf('_') + 1, eClassName.indexOf("_Value")); + } + + private String getObjectDescription(Object object) { + if (object == null) { + return "null"; + } + if (object instanceof EObject) { + final Object originalObject = getOriginalObject((EObject) object); + if (originalObject != null) { + if (originalObject instanceof EObject) { + final QualifiedName qname = nameProvider.getFullyQualifiedName((EObject) originalObject); + if (qname != null) { + return qname.getLastSegment(); + } + } + return originalObject.toString(); + } + QualifiedName qname = nameProvider.getFullyQualifiedName((EObject) object); + if (qname != null) { + return qname.getLastSegment(); + } + } + if (object instanceof Collection) { + @SuppressWarnings("unchecked") + final Collection o_cast = (Collection) object; + if (!o_cast.isEmpty()) { + List strings = o_cast.stream().map(o -> getObjectDescription(o)).collect(Collectors.toList()); + return strings.toString(); + } + } + return object.toString(); + } + + public List> getValuesForStates(Dimension dimension, int from, int to) { + final List> values = dimension.getValues().stream().filter(v -> { + final List> states = v.getStates(); + final State firstState = states.get(0); + final State lastState = states.get(states.size() - 1); + return getStateIndex(firstState) < to && getStateIndex(lastState) > from; + }).collect(Collectors.toList()); + return values; + } + + @Override + public String getValueDescription(Value value) { + if (value == null) { + return ""; + } + String description = getDimensionLabel((Dimension) value.eContainer()) + " : "; + final String attributeName; + if (value instanceof GenericValue) { + if (value instanceof GenericAttributeValue) { + attributeName = "attributeValue"; + } else if (value instanceof SingleReferenceValue) { + attributeName = "referenceValue"; + } else { + attributeName = "referenceValues"; + } + } else { + attributeName = getValueName(value); + } + if (attributeName.length() > 0) { + final Optional attribute = value.eClass().getEAllStructuralFeatures().stream() + .filter(r -> r.getName().equals(attributeName)).findFirst(); + if (attribute.isPresent()) { + final Object o = value.eGet(attribute.get()); + return description + getObjectDescription(o); + } + } + return description + value; + } + + private Object getOriginalObject(EObject eObject) { + return eObject.eClass().getEAllReferences().stream().filter(r -> r.getName().startsWith("originalObject")) + .findFirst().map(r -> eObject.eGet(r)).orElse(null); + } + + private Map, String> dimensionToLabel = new HashMap<>(); + + @Override + public String getDimensionLabel(Dimension dimension) { + return dimensionToLabel.computeIfAbsent(dimension, d -> { + EObject container = dimension.eContainer(); + final String modelElement; + if (container != null) { + Object originalObject; + if (container instanceof GenericTracedObject) { + originalObject = ((GenericTracedObject) container).getOriginalObject(); + } else { + originalObject = getOriginalObject(container); + } + if (originalObject != null) { + final QualifiedName fqn = nameProvider.getFullyQualifiedName((EObject) originalObject); + modelElement = fqn == null ? "" : fqn.getLastSegment() + "."; + } else { + modelElement = ""; + } + } else { + modelElement = ""; + } + final String result; + if (dimension instanceof GenericDimension) { + result = ((GenericDimension) dimension).getDynamicProperty().getName(); + } else { + final String dimensionName = dimension.eClass().getName(); + final String tmp = dimensionName.substring(0, dimensionName.indexOf("_Dimension")); + result = tmp.substring(tmp.lastIndexOf("_") + 1); + } + return modelElement + result; + }); + } + + @Override + public int getDimensionLength(Dimension dimension) { + return dimension.getValues().size(); + } + + private void updateEquivalenceClasses(List> states) { + states.stream().distinct().forEach(s -> updateEquivalenceClasses(s)); + } + + @Override + public void statesAdded(List> states) { + //updateEquivalenceClasses(states); + notifyListeners(); + } + + @Override + public void stepsStarted(List> steps) { + } + + @Override + public void stepsEnded(List> steps) { + } + + @Override + public void valuesAdded(List> values) { + } + + @Override + public void dimensionsAdded(List> addedDimensions) { + cachedMaskedStateEquivalenceClasses.clear(); + cachedDimensions.clear(); + final List> dimensions = getDimensions(); + final List insertedTracesIndexes = new ArrayList<>(); + for (Dimension dimension : addedDimensions) { + final int i = dimensions.indexOf(dimension); + insertedTracesIndexes.add(i); + } + Collections.sort(insertedTracesIndexes); + final List> keys = new ArrayList<>(stateEquivalenceClasses.keySet()); + for (List key : keys) { + List> states = stateEquivalenceClasses.remove(key); + for (Integer i : insertedTracesIndexes) { + key.add(i, -1); + } + stateEquivalenceClasses.put(key, states); + } + } + + @Override + public List> getSubSteps(Step step) { + if (step instanceof BigStep) { + return new ArrayList<>(((BigStep) step).getSubSteps()); + } else { + return Collections.emptyList(); + } + } + + @Override + public List> getSteps(int firstStateIndex, int lastStateIndex) { + final Step rootStep = trace.getRootStep(); + if (rootStep instanceof BigStep) { + final List> steps = new ArrayList<>(((BigStep) rootStep).getSubSteps()); + steps.removeIf(s -> (s.getEndingState() != null && getStateIndex(s.getEndingState()) < firstStateIndex) + || getStateIndex(s.getStartingState()) > lastStateIndex); + return steps; + } + return Collections.singletonList(rootStep); + } + + @Override + public List> getDimensions() { + if (cachedDimensions.isEmpty()) { + trace.getTracedObjects().forEach(o -> cachedDimensions.addAll(o.getDimensions())); + } + return cachedDimensions; + } + + private List> getIgnoredDimensions() { + return getDimensions().stream().filter(d -> isDimensionIgnored(d)).collect(Collectors.toList()); + } +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceNotifier.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceNotifier.java new file mode 100644 index 000000000..109c27d7e --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceNotifier.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.traceaddon; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.BatchModelChangeListener; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.ModelChange; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.modelchangelistener.NewObjectModelChange; + +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.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.Value; +import org.eclipse.gemoc.trace.gemoc.api.ITraceListener; +import org.eclipse.gemoc.trace.gemoc.api.ITraceNotifier; + +public class GenericTraceNotifier implements ITraceNotifier { + + private BatchModelChangeListener traceListener; + + private final List listeners = new ArrayList<>(); + + public GenericTraceNotifier(BatchModelChangeListener traceListener) { + this.traceListener = traceListener; + } + + @Override + public void notifyListeners() { + for (ITraceListener listener : listeners) { + notifyListener(listener); + } + } + + @Override + public void notifyListener(ITraceListener listener) { + final List changes = traceListener.getChanges(listener); + if (!changes.isEmpty()) { + final List> startedSteps = new ArrayList<>(); + final List> endedSteps = new ArrayList<>(); + final List> newStates = new ArrayList<>(); + final List> newValues = new ArrayList<>(); + final List> newDimensions = new ArrayList<>(); + changes.forEach(c -> { + if (c instanceof NewObjectModelChange) { + final EObject o = c.getChangedObject(); + if (o instanceof Value) { + newValues.add((Value) o); + } else if (o instanceof Step) { + startedSteps.add((Step) o); + } else if (o instanceof State) { + final State newState = (State) o; + newStates.add(newState); + endedSteps.addAll(newState.getEndedSteps()); + } else if (o instanceof TracedObject) { + newDimensions.addAll(((TracedObject) o).getDimensions()); + } + } + }); + if (!newValues.isEmpty()) { + listener.valuesAdded(newValues); + } + if (!newDimensions.isEmpty()) { + listener.dimensionsAdded(newDimensions); + } + if (!newStates.isEmpty()) { + listener.statesAdded(newStates); + } + if (!startedSteps.isEmpty()) { + listener.stepsStarted(startedSteps); + } + if (!endedSteps.isEmpty()) { + listener.stepsEnded(endedSteps); + } + } + } + + @Override + public void addListener(ITraceListener listener) { + listeners.add(listener); + traceListener.registerObserver(listener); + } + + @Override + public void removeListener(ITraceListener listener) { + listeners.remove(listener); + traceListener.removeObserver(listener); + } +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceStepFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceStepFactory.java new file mode 100644 index 000000000..c0c96ae14 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceStepFactory.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.gemoc.traceaddon; + +import java.util.List; + +import org.eclipse.gemoc.trace.commons.model.trace.MSE; +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericSequentialStep; +import org.eclipse.gemoc.trace.commons.model.generictrace.GenerictraceFactory; +import org.eclipse.gemoc.trace.gemoc.api.IStepFactory; + +public class GenericTraceStepFactory implements IStepFactory { + + @Override + public Step createStep(MSE mse, List parameters, List result) { + final GenericSequentialStep step = GenerictraceFactory.eINSTANCE.createGenericSequentialStep(); + org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence mseocc = org.eclipse.gemoc.trace.commons.model.trace.TraceFactory.eINSTANCE.createMSEOccurrence(); + mseocc.setMse(mse); + mseocc.getParameters().addAll(parameters); + mseocc.getResult().addAll(result); + step.setMseoccurrence(mseocc); + return step; + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.checkstyle b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.checkstyle new file mode 100644 index 000000000..42097404b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.checkstyle @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.classpath b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.classpath rename to trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.classpath diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.gitignore b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.gitignore similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.gitignore rename to trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.gitignore diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.project b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.project new file mode 100644 index 000000000..c11cfa9ee --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.metamodel.generator + + + + + + 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/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.settings/org.eclipse.core.resources.prefs b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/.settings/org.eclipse.core.resources.prefs rename to trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/.settings/org.eclipse.core.resources.prefs diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/META-INF/MANIFEST.MF b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/META-INF/MANIFEST.MF new file mode 100644 index 000000000..be56072c0 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/META-INF/MANIFEST.MF @@ -0,0 +1,32 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.trace.metamodel.generator;singleton:=true +Bundle-Version: 2.3.0.qualifier +Require-Bundle: org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xmi;bundle-version="2.10.1", + org.eclipse.gemoc.trace.commons;bundle-version="1.0.0", + org.eclipse.emf.codegen.ecore;bundle-version="2.10.2", + org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0";visibility:=reexport, + org.eclipse.gemoc.opsemanticsview.model;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.gemoc.trace.metamodel.generator, + base, + base.States, + base.States.impl, + base.States.util, + base.Steps, + base.Steps.impl, + base.Steps.util, + base.impl, + base.util +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/about.html b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/about.html similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc.ui/about.html rename to trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/about.html diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/build.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/build.properties new file mode 100644 index 000000000..26e92cc0e --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/build.properties @@ -0,0 +1,21 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/,\ + xtend-gen/ +output.. = bin/ 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 new file mode 100644 index 000000000..18625232f --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.aird @@ -0,0 +1,1325 @@ + + + + base.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/org.eclipse.gemoc.trace.commons.model/model/LaunchConfiguration.ecore + + + + + + + + + + + + + + bold + + + + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + bold + + + + + + + + + + labelSize + bold + + + labelSize + + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + + routingStyle + + + italic + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + italic + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + + + routingStyle + + + italic + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + routingStyle + + + italic + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + routingStyle + + + italic + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + italic + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + italic + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..2cf771b85 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.ecore @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/model/base.genmodel b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.genmodel similarity index 87% rename from trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/model/base.genmodel rename to trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/model/base.genmodel index 6092c9546..1baae2c51 100644 --- a/trace/generator/plugins/fr.inria.diverse.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/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/plugin.properties b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/plugin.properties new file mode 100644 index 000000000..bf5b6c324 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/plugin.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +# + +pluginName = Base Model +providerName = www.example.org diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/plugin.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/plugin.xml new file mode 100644 index 000000000..ceb023e7a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/plugin.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/pom.xml b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/pom.xml new file mode 100644 index 000000000..bcf480824 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/pom.xml @@ -0,0 +1,65 @@ + + + + + 4.0.0 + org.gemoc.multidimensional_trace_management + org.eclipse.gemoc.trace.metamodel.generator + 2.3.0-SNAPSHOT + eclipse-plugin + + + org.eclipse.gemoc.trace.generator + org.eclipse.gemoc.trace.generator.root + 2.3.0-SNAPSHOT + ../.. + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.version} + + + + compile + + + xtend-gen + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + + + + + + + + + + diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/BaseFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/BaseFactory.java new file mode 100644 index 000000000..d21254183 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/BaseFactory.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base; + +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 base.BasePackage + * @generated + */ +public interface BaseFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + BaseFactory eINSTANCE = base.impl.BaseFactoryImpl.init(); + + /** + * Returns a new object of class 'Specific Trace'. + * + * + * @return a new object of class 'Specific Trace'. + * @generated + */ + SpecificTrace createSpecificTrace(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + BasePackage getBasePackage(); + +} //BaseFactory diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/BasePackage.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/BasePackage.java new file mode 100644 index 000000000..ef44f9e99 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/BasePackage.java @@ -0,0 +1,179 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * 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 base.BaseFactory + * @model kind="package" + * @generated + */ +public interface BasePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "base"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://base/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "base"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + BasePackage eINSTANCE = base.impl.BasePackageImpl.init(); + + /** + * The meta object id for the '{@link base.impl.SpecificTraceImpl Specific Trace}' class. + * + * + * @see base.impl.SpecificTraceImpl + * @see base.impl.BasePackageImpl#getSpecificTrace() + * @generated + */ + int SPECIFIC_TRACE = 0; + + /** + * The feature id for the 'Root Step' containment reference. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACE__ROOT_STEP = TracePackage.TRACE__ROOT_STEP; + + /** + * The feature id for the 'Traced Objects' containment reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACE__TRACED_OBJECTS = TracePackage.TRACE__TRACED_OBJECTS; + + /** + * The feature id for the 'States' containment reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACE__STATES = TracePackage.TRACE__STATES; + + /** + * The feature id for the 'Launchconfiguration' containment reference. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACE__LAUNCHCONFIGURATION = TracePackage.TRACE__LAUNCHCONFIGURATION; + + /** + * The number of structural features of the 'Specific Trace' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACE_FEATURE_COUNT = TracePackage.TRACE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Specific Trace' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACE_OPERATION_COUNT = TracePackage.TRACE_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link base.SpecificTrace Specific Trace}'. + * + * + * @return the meta object for class 'Specific Trace'. + * @see base.SpecificTrace + * @generated + */ + EClass getSpecificTrace(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + BaseFactory getBaseFactory(); + + /** + * + * 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 base.impl.SpecificTraceImpl Specific Trace}' class. + * + * + * @see base.impl.SpecificTraceImpl + * @see base.impl.BasePackageImpl#getSpecificTrace() + * @generated + */ + EClass SPECIFIC_TRACE = eINSTANCE.getSpecificTrace(); + + } + +} //BasePackage diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/SpecificTrace.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/SpecificTrace.java new file mode 100644 index 000000000..afc1290ac --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/SpecificTrace.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base; + +import base.States.SpecificDimension; +import base.States.SpecificState; +import base.States.SpecificTracedObject; +import base.States.SpecificValue; + +import base.Steps.SpecificStep; + +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +import org.eclipse.gemoc.trace.commons.model.trace.Trace; + +/** + * + * A representation of the model object 'Specific Trace'. + * + * + * + * @see base.BasePackage#getSpecificTrace() + * @model + * @generated + */ +public interface SpecificTrace extends Trace, SpecificTracedObject>, SpecificState> { + +} // SpecificTrace diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificAttributeValue.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificAttributeValue.java new file mode 100644 index 000000000..4e1bdb367 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificAttributeValue.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States; + + +/** + * + * A representation of the model object 'Specific Attribute Value'. + * + * + * + * @see base.States.StatesPackage#getSpecificAttributeValue() + * @model interface="true" abstract="true" + * @generated + */ +public interface SpecificAttributeValue extends SpecificValue { +} // SpecificAttributeValue diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificDimension.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificDimension.java new file mode 100644 index 000000000..5b669b861 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificDimension.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States; + +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; + +/** + * + * A representation of the model object 'Specific Dimension'. + * + * + * + * @see base.States.StatesPackage#getSpecificDimension() + * @model abstract="true" + * @generated + */ +public interface SpecificDimension extends Dimension { +} // SpecificDimension diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificReferenceValue.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificReferenceValue.java new file mode 100644 index 000000000..4058efe69 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificReferenceValue.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States; + + +/** + * + * A representation of the model object 'Specific Reference Value'. + * + * + * + * @see base.States.StatesPackage#getSpecificReferenceValue() + * @model interface="true" abstract="true" + * @generated + */ +public interface SpecificReferenceValue extends SpecificValue { +} // SpecificReferenceValue diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificState.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificState.java new file mode 100644 index 000000000..68874950e --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificState.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States; + +import base.Steps.SpecificStep; + +import org.eclipse.gemoc.trace.commons.model.trace.State; + +/** + * + * A representation of the model object 'Specific State'. + * + * + * + * @see base.States.StatesPackage#getSpecificState() + * @model + * @generated + */ +public interface SpecificState extends State { + +} // SpecificState diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificTracedObject.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificTracedObject.java new file mode 100644 index 000000000..cd3a2ae54 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificTracedObject.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States; + +import org.eclipse.gemoc.trace.commons.model.trace.TracedObject; + +/** + * + * A representation of the model object 'Specific Traced Object'. + * + * + * + * @see base.States.StatesPackage#getSpecificTracedObject() + * @model abstract="true" + * @generated + */ +public interface SpecificTracedObject> extends TracedObject { +} // SpecificTracedObject diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificValue.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificValue.java new file mode 100644 index 000000000..88412b8c6 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/SpecificValue.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States; + +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +/** + * + * A representation of the model object 'Specific Value'. + * + * + * + * @see base.States.StatesPackage#getSpecificValue() + * @model abstract="true" + * @generated + */ +public interface SpecificValue extends Value { + +} // SpecificValue diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/StatesFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/StatesFactory.java new file mode 100644 index 000000000..b5dba168e --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/StatesFactory.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States; + +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 base.States.StatesPackage + * @generated + */ +public interface StatesFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + StatesFactory eINSTANCE = base.States.impl.StatesFactoryImpl.init(); + + /** + * Returns a new object of class 'Specific State'. + * + * + * @return a new object of class 'Specific State'. + * @generated + */ + SpecificState createSpecificState(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + StatesPackage getStatesPackage(); + +} //StatesFactory diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/StatesPackage.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/StatesPackage.java new file mode 100644 index 000000000..890df56d3 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/StatesPackage.java @@ -0,0 +1,464 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * 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 base.States.StatesFactory + * @model kind="package" + * @generated + */ +public interface StatesPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "States"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://tracedclasses/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "tracedclasses"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + StatesPackage eINSTANCE = base.States.impl.StatesPackageImpl.init(); + + /** + * The meta object id for the '{@link base.States.impl.SpecificStateImpl Specific State}' class. + * + * + * @see base.States.impl.SpecificStateImpl + * @see base.States.impl.StatesPackageImpl#getSpecificState() + * @generated + */ + int SPECIFIC_STATE = 0; + + /** + * The feature id for the 'Started Steps' reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STATE__STARTED_STEPS = TracePackage.STATE__STARTED_STEPS; + + /** + * The feature id for the 'Ended Steps' reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STATE__ENDED_STEPS = TracePackage.STATE__ENDED_STEPS; + + /** + * The feature id for the 'Values' reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STATE__VALUES = TracePackage.STATE__VALUES; + + /** + * The number of structural features of the 'Specific State' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STATE_FEATURE_COUNT = TracePackage.STATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Specific State' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STATE_OPERATION_COUNT = TracePackage.STATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link base.States.impl.SpecificValueImpl Specific Value}' class. + * + * + * @see base.States.impl.SpecificValueImpl + * @see base.States.impl.StatesPackageImpl#getSpecificValue() + * @generated + */ + int SPECIFIC_VALUE = 5; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_VALUE__STATES = TracePackage.VALUE__STATES; + + /** + * The number of structural features of the 'Specific Value' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_VALUE_FEATURE_COUNT = TracePackage.VALUE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Specific Value' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_VALUE_OPERATION_COUNT = TracePackage.VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link base.States.SpecificAttributeValue Specific Attribute Value}' class. + * + * + * @see base.States.SpecificAttributeValue + * @see base.States.impl.StatesPackageImpl#getSpecificAttributeValue() + * @generated + */ + int SPECIFIC_ATTRIBUTE_VALUE = 1; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ATTRIBUTE_VALUE__STATES = SPECIFIC_VALUE__STATES; + + /** + * The number of structural features of the 'Specific Attribute Value' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ATTRIBUTE_VALUE_FEATURE_COUNT = SPECIFIC_VALUE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Specific Attribute Value' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ATTRIBUTE_VALUE_OPERATION_COUNT = SPECIFIC_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link base.States.impl.SpecificDimensionImpl Specific Dimension}' class. + * + * + * @see base.States.impl.SpecificDimensionImpl + * @see base.States.impl.StatesPackageImpl#getSpecificDimension() + * @generated + */ + int SPECIFIC_DIMENSION = 2; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_DIMENSION__VALUES = TracePackage.DIMENSION__VALUES; + + /** + * The number of structural features of the 'Specific Dimension' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_DIMENSION_FEATURE_COUNT = TracePackage.DIMENSION_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Specific Dimension' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_DIMENSION_OPERATION_COUNT = TracePackage.DIMENSION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link base.States.impl.SpecificTracedObjectImpl Specific Traced Object}' class. + * + * + * @see base.States.impl.SpecificTracedObjectImpl + * @see base.States.impl.StatesPackageImpl#getSpecificTracedObject() + * @generated + */ + int SPECIFIC_TRACED_OBJECT = 3; + + /** + * The feature id for the 'Dimensions' reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACED_OBJECT__DIMENSIONS = TracePackage.TRACED_OBJECT__DIMENSIONS; + + /** + * The number of structural features of the 'Specific Traced Object' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACED_OBJECT_FEATURE_COUNT = TracePackage.TRACED_OBJECT_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Get Dimensions Internal' operation. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACED_OBJECT___GET_DIMENSIONS_INTERNAL = TracePackage.TRACED_OBJECT___GET_DIMENSIONS_INTERNAL; + + /** + * The number of operations of the 'Specific Traced Object' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_TRACED_OBJECT_OPERATION_COUNT = TracePackage.TRACED_OBJECT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link base.States.SpecificReferenceValue Specific Reference Value}' class. + * + * + * @see base.States.SpecificReferenceValue + * @see base.States.impl.StatesPackageImpl#getSpecificReferenceValue() + * @generated + */ + int SPECIFIC_REFERENCE_VALUE = 4; + + /** + * The feature id for the 'States' reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_REFERENCE_VALUE__STATES = SPECIFIC_VALUE__STATES; + + /** + * The number of structural features of the 'Specific Reference Value' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_REFERENCE_VALUE_FEATURE_COUNT = SPECIFIC_VALUE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Specific Reference Value' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_REFERENCE_VALUE_OPERATION_COUNT = SPECIFIC_VALUE_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link base.States.SpecificState Specific State}'. + * + * + * @return the meta object for class 'Specific State'. + * @see base.States.SpecificState + * @generated + */ + EClass getSpecificState(); + + /** + * Returns the meta object for class '{@link base.States.SpecificAttributeValue Specific Attribute Value}'. + * + * + * @return the meta object for class 'Specific Attribute Value'. + * @see base.States.SpecificAttributeValue + * @generated + */ + EClass getSpecificAttributeValue(); + + /** + * Returns the meta object for class '{@link base.States.SpecificDimension Specific Dimension}'. + * + * + * @return the meta object for class 'Specific Dimension'. + * @see base.States.SpecificDimension + * @generated + */ + EClass getSpecificDimension(); + + /** + * Returns the meta object for class '{@link base.States.SpecificTracedObject Specific Traced Object}'. + * + * + * @return the meta object for class 'Specific Traced Object'. + * @see base.States.SpecificTracedObject + * @generated + */ + EClass getSpecificTracedObject(); + + /** + * Returns the meta object for class '{@link base.States.SpecificReferenceValue Specific Reference Value}'. + * + * + * @return the meta object for class 'Specific Reference Value'. + * @see base.States.SpecificReferenceValue + * @generated + */ + EClass getSpecificReferenceValue(); + + /** + * Returns the meta object for class '{@link base.States.SpecificValue Specific Value}'. + * + * + * @return the meta object for class 'Specific Value'. + * @see base.States.SpecificValue + * @generated + */ + EClass getSpecificValue(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + StatesFactory getStatesFactory(); + + /** + * + * 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 base.States.impl.SpecificStateImpl Specific State}' class. + * + * + * @see base.States.impl.SpecificStateImpl + * @see base.States.impl.StatesPackageImpl#getSpecificState() + * @generated + */ + EClass SPECIFIC_STATE = eINSTANCE.getSpecificState(); + + /** + * The meta object literal for the '{@link base.States.SpecificAttributeValue Specific Attribute Value}' class. + * + * + * @see base.States.SpecificAttributeValue + * @see base.States.impl.StatesPackageImpl#getSpecificAttributeValue() + * @generated + */ + EClass SPECIFIC_ATTRIBUTE_VALUE = eINSTANCE.getSpecificAttributeValue(); + + /** + * The meta object literal for the '{@link base.States.impl.SpecificDimensionImpl Specific Dimension}' class. + * + * + * @see base.States.impl.SpecificDimensionImpl + * @see base.States.impl.StatesPackageImpl#getSpecificDimension() + * @generated + */ + EClass SPECIFIC_DIMENSION = eINSTANCE.getSpecificDimension(); + + /** + * The meta object literal for the '{@link base.States.impl.SpecificTracedObjectImpl Specific Traced Object}' class. + * + * + * @see base.States.impl.SpecificTracedObjectImpl + * @see base.States.impl.StatesPackageImpl#getSpecificTracedObject() + * @generated + */ + EClass SPECIFIC_TRACED_OBJECT = eINSTANCE.getSpecificTracedObject(); + + /** + * The meta object literal for the '{@link base.States.SpecificReferenceValue Specific Reference Value}' class. + * + * + * @see base.States.SpecificReferenceValue + * @see base.States.impl.StatesPackageImpl#getSpecificReferenceValue() + * @generated + */ + EClass SPECIFIC_REFERENCE_VALUE = eINSTANCE.getSpecificReferenceValue(); + + /** + * The meta object literal for the '{@link base.States.impl.SpecificValueImpl Specific Value}' class. + * + * + * @see base.States.impl.SpecificValueImpl + * @see base.States.impl.StatesPackageImpl#getSpecificValue() + * @generated + */ + EClass SPECIFIC_VALUE = eINSTANCE.getSpecificValue(); + + } + +} //StatesPackage diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificDimensionImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificDimensionImpl.java new file mode 100644 index 000000000..2ded16ea1 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificDimensionImpl.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States.impl; + +import base.States.SpecificDimension; +import base.States.SpecificValue; +import base.States.StatesPackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.DimensionImpl; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; + +/** + * + * An implementation of the model object 'Specific Dimension'. + * + * + * @generated + */ +public abstract class SpecificDimensionImpl extends DimensionImpl implements SpecificDimension { + /** + * + * + * @generated + */ + protected SpecificDimensionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StatesPackage.Literals.SPECIFIC_DIMENSION; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getValues() { + if (values == null) { + values = new EObjectContainmentEList(SpecificValue.class, this, StatesPackage.SPECIFIC_DIMENSION__VALUES); + } + return values; + } + +} //SpecificDimensionImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificStateImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificStateImpl.java new file mode 100644 index 000000000..db91f36cb --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificStateImpl.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States.impl; + +import base.States.SpecificState; +import base.States.SpecificValue; +import base.States.StatesPackage; + +import base.Steps.SpecificStep; +import org.eclipse.gemoc.trace.commons.model.trace.Step; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.Value; +import org.eclipse.gemoc.trace.commons.model.trace.impl.StateImpl; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; + +/** + * + * An implementation of the model object 'Specific State'. + * + * + * @generated + */ +public class SpecificStateImpl extends StateImpl implements SpecificState { + /** + * + * + * @generated + */ + protected SpecificStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StatesPackage.Literals.SPECIFIC_STATE; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getStartedSteps() { + if (startedSteps == null) { + startedSteps = new EObjectWithInverseResolvingEList(SpecificStep.class, this, StatesPackage.SPECIFIC_STATE__STARTED_STEPS, TracePackage.STEP__STARTING_STATE) { private static final long serialVersionUID = 1L; @Override public Class getInverseFeatureClass() { return Step.class; } }; + } + return startedSteps; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getEndedSteps() { + if (endedSteps == null) { + endedSteps = new EObjectWithInverseResolvingEList(SpecificStep.class, this, StatesPackage.SPECIFIC_STATE__ENDED_STEPS, TracePackage.STEP__ENDING_STATE) { private static final long serialVersionUID = 1L; @Override public Class getInverseFeatureClass() { return Step.class; } }; + } + return endedSteps; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getValues() { + if (values == null) { + values = new EObjectWithInverseResolvingEList.ManyInverse(SpecificValue.class, this, StatesPackage.SPECIFIC_STATE__VALUES, TracePackage.VALUE__STATES) { private static final long serialVersionUID = 1L; @Override public Class getInverseFeatureClass() { return Value.class; } }; + } + return values; + } + +} //SpecificStateImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificTracedObjectImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificTracedObjectImpl.java new file mode 100644 index 000000000..5984d8b8b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificTracedObjectImpl.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States.impl; + +import base.States.SpecificDimension; +import base.States.SpecificTracedObject; +import base.States.SpecificValue; +import base.States.StatesPackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.TracedObjectImpl; +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Specific Traced Object'. + * + * + * @generated + */ +public abstract class SpecificTracedObjectImpl> extends TracedObjectImpl implements SpecificTracedObject { + /** + * + * + * @generated + */ + protected SpecificTracedObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StatesPackage.Literals.SPECIFIC_TRACED_OBJECT; + } + +} //SpecificTracedObjectImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificValueImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificValueImpl.java new file mode 100644 index 000000000..048b4a2f8 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/SpecificValueImpl.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States.impl; + +import base.States.SpecificState; +import base.States.SpecificValue; +import base.States.StatesPackage; + +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; +import org.eclipse.gemoc.trace.commons.model.trace.impl.ValueImpl; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; + +/** + * + * An implementation of the model object 'Specific Value'. + * + * + * @generated + */ +public abstract class SpecificValueImpl extends ValueImpl implements SpecificValue { + /** + * + * + * @generated + */ + protected SpecificValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StatesPackage.Literals.SPECIFIC_VALUE; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getStates() { + if (states == null) { + states = new EObjectWithInverseResolvingEList.ManyInverse(SpecificState.class, this, StatesPackage.SPECIFIC_VALUE__STATES, TracePackage.STATE__VALUES) { private static final long serialVersionUID = 1L; @Override public Class getInverseFeatureClass() { return State.class; } }; + } + return states; + } + +} //SpecificValueImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/StatesFactoryImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/StatesFactoryImpl.java new file mode 100644 index 000000000..e9a5d647f --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/StatesFactoryImpl.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States.impl; + +import base.States.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class StatesFactoryImpl extends EFactoryImpl implements StatesFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static StatesFactory init() { + try { + StatesFactory theStatesFactory = (StatesFactory)EPackage.Registry.INSTANCE.getEFactory(StatesPackage.eNS_URI); + if (theStatesFactory != null) { + return theStatesFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new StatesFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public StatesFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case StatesPackage.SPECIFIC_STATE: return createSpecificState(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public SpecificState createSpecificState() { + SpecificStateImpl specificState = new SpecificStateImpl(); + return specificState; + } + + /** + * + * + * @generated + */ + public StatesPackage getStatesPackage() { + return (StatesPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static StatesPackage getPackage() { + return StatesPackage.eINSTANCE; + } + +} //StatesFactoryImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/StatesPackageImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/StatesPackageImpl.java new file mode 100644 index 000000000..5b875eb26 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/impl/StatesPackageImpl.java @@ -0,0 +1,335 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States.impl; + +import base.BasePackage; + +import base.States.SpecificAttributeValue; +import base.States.SpecificDimension; +import base.States.SpecificReferenceValue; +import base.States.SpecificState; +import base.States.SpecificTracedObject; +import base.States.SpecificValue; +import base.States.StatesFactory; +import base.States.StatesPackage; + +import base.Steps.StepsPackage; + +import base.Steps.impl.StepsPackageImpl; + +import base.impl.BasePackageImpl; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.ETypeParameter; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class StatesPackageImpl extends EPackageImpl implements StatesPackage { + /** + * + * + * @generated + */ + private EClass specificStateEClass = null; + + /** + * + * + * @generated + */ + private EClass specificAttributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass specificDimensionEClass = null; + + /** + * + * + * @generated + */ + private EClass specificTracedObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass specificReferenceValueEClass = null; + + /** + * + * + * @generated + */ + private EClass specificValueEClass = 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 base.States.StatesPackage#eNS_URI + * @see #init() + * @generated + */ + private StatesPackageImpl() { + super(eNS_URI, StatesFactory.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 StatesPackage#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 StatesPackage init() { + if (isInited) return (StatesPackage)EPackage.Registry.INSTANCE.getEPackage(StatesPackage.eNS_URI); + + // Obtain or create and register package + StatesPackageImpl theStatesPackage = (StatesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StatesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StatesPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + TracePackage.eINSTANCE.eClass(); + + // Obtain or create and register interdependencies + BasePackageImpl theBasePackage = (BasePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI) instanceof BasePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI) : BasePackage.eINSTANCE); + StepsPackageImpl theStepsPackage = (StepsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StepsPackage.eNS_URI) instanceof StepsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StepsPackage.eNS_URI) : StepsPackage.eINSTANCE); + + // Create package meta-data objects + theStatesPackage.createPackageContents(); + theBasePackage.createPackageContents(); + theStepsPackage.createPackageContents(); + + // Initialize created meta-data + theStatesPackage.initializePackageContents(); + theBasePackage.initializePackageContents(); + theStepsPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theStatesPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(StatesPackage.eNS_URI, theStatesPackage); + return theStatesPackage; + } + + /** + * + * + * @generated + */ + public EClass getSpecificState() { + return specificStateEClass; + } + + /** + * + * + * @generated + */ + public EClass getSpecificAttributeValue() { + return specificAttributeValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getSpecificDimension() { + return specificDimensionEClass; + } + + /** + * + * + * @generated + */ + public EClass getSpecificTracedObject() { + return specificTracedObjectEClass; + } + + /** + * + * + * @generated + */ + public EClass getSpecificReferenceValue() { + return specificReferenceValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getSpecificValue() { + return specificValueEClass; + } + + /** + * + * + * @generated + */ + public StatesFactory getStatesFactory() { + return (StatesFactory)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 + specificStateEClass = createEClass(SPECIFIC_STATE); + + specificAttributeValueEClass = createEClass(SPECIFIC_ATTRIBUTE_VALUE); + + specificDimensionEClass = createEClass(SPECIFIC_DIMENSION); + + specificTracedObjectEClass = createEClass(SPECIFIC_TRACED_OBJECT); + + specificReferenceValueEClass = createEClass(SPECIFIC_REFERENCE_VALUE); + + specificValueEClass = createEClass(SPECIFIC_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 + TracePackage theTracePackage = (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); + StepsPackage theStepsPackage = (StepsPackage)EPackage.Registry.INSTANCE.getEPackage(StepsPackage.eNS_URI); + + // Create type parameters + ETypeParameter specificDimensionEClass_ValueSubType = addETypeParameter(specificDimensionEClass, "ValueSubType"); + ETypeParameter specificTracedObjectEClass_DimensionSubType = addETypeParameter(specificTracedObjectEClass, "DimensionSubType"); + addETypeParameter(specificReferenceValueEClass, "T"); + + // Set bounds for type parameters + EGenericType g1 = createEGenericType(this.getSpecificValue()); + specificDimensionEClass_ValueSubType.getEBounds().add(g1); + g1 = createEGenericType(this.getSpecificDimension()); + EGenericType g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + EGenericType g3 = createEGenericType(this.getSpecificValue()); + g2.setEUpperBound(g3); + specificTracedObjectEClass_DimensionSubType.getEBounds().add(g1); + + // Add supertypes to classes + g1 = createEGenericType(theTracePackage.getState()); + g2 = createEGenericType(theStepsPackage.getSpecificStep()); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(this.getSpecificValue()); + g1.getETypeArguments().add(g2); + specificStateEClass.getEGenericSuperTypes().add(g1); + specificAttributeValueEClass.getESuperTypes().add(this.getSpecificValue()); + g1 = createEGenericType(theTracePackage.getDimension()); + g2 = createEGenericType(specificDimensionEClass_ValueSubType); + g1.getETypeArguments().add(g2); + specificDimensionEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getTracedObject()); + g2 = createEGenericType(specificTracedObjectEClass_DimensionSubType); + g1.getETypeArguments().add(g2); + specificTracedObjectEClass.getEGenericSuperTypes().add(g1); + specificReferenceValueEClass.getESuperTypes().add(this.getSpecificValue()); + g1 = createEGenericType(theTracePackage.getValue()); + g2 = createEGenericType(this.getSpecificState()); + g1.getETypeArguments().add(g2); + specificValueEClass.getEGenericSuperTypes().add(g1); + + // Initialize classes, features, and operations; add parameters + initEClass(specificStateEClass, SpecificState.class, "SpecificState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(specificAttributeValueEClass, SpecificAttributeValue.class, "SpecificAttributeValue", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(specificDimensionEClass, SpecificDimension.class, "SpecificDimension", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(specificTracedObjectEClass, SpecificTracedObject.class, "SpecificTracedObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(specificReferenceValueEClass, SpecificReferenceValue.class, "SpecificReferenceValue", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(specificValueEClass, SpecificValue.class, "SpecificValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + } + +} //StatesPackageImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/util/StatesAdapterFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/util/StatesAdapterFactory.java new file mode 100644 index 000000000..bb72b51dd --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/util/StatesAdapterFactory.java @@ -0,0 +1,298 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States.util; + +import base.States.*; + +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.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see base.States.StatesPackage + * @generated + */ +public class StatesAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static StatesPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public StatesAdapterFactory() { + if (modelPackage == null) { + modelPackage = StatesPackage.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 StatesSwitch modelSwitch = + new StatesSwitch() { + @Override + public Adapter caseSpecificState(SpecificState object) { + return createSpecificStateAdapter(); + } + @Override + public Adapter caseSpecificAttributeValue(SpecificAttributeValue object) { + return createSpecificAttributeValueAdapter(); + } + @Override + public Adapter caseSpecificDimension(SpecificDimension object) { + return createSpecificDimensionAdapter(); + } + @Override + public > Adapter caseSpecificTracedObject(SpecificTracedObject object) { + return createSpecificTracedObjectAdapter(); + } + @Override + public Adapter caseSpecificReferenceValue(SpecificReferenceValue object) { + return createSpecificReferenceValueAdapter(); + } + @Override + public Adapter caseSpecificValue(SpecificValue object) { + return createSpecificValueAdapter(); + } + @Override + public , ValueSubType extends Value> Adapter caseState(State object) { + return createStateAdapter(); + } + @Override + public > Adapter caseValue(Value object) { + return createValueAdapter(); + } + @Override + public > Adapter caseDimension(Dimension object) { + return createDimensionAdapter(); + } + @Override + public > Adapter caseTracedObject(TracedObject object) { + return createTracedObjectAdapter(); + } + @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 base.States.SpecificState Specific 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 base.States.SpecificState + * @generated + */ + public Adapter createSpecificStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link base.States.SpecificAttributeValue Specific Attribute Value}'. + * + * 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 base.States.SpecificAttributeValue + * @generated + */ + public Adapter createSpecificAttributeValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link base.States.SpecificDimension Specific Dimension}'. + * + * 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 base.States.SpecificDimension + * @generated + */ + public Adapter createSpecificDimensionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link base.States.SpecificTracedObject Specific Traced Object}'. + * + * 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 base.States.SpecificTracedObject + * @generated + */ + public Adapter createSpecificTracedObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link base.States.SpecificReferenceValue Specific Reference Value}'. + * + * 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 base.States.SpecificReferenceValue + * @generated + */ + public Adapter createSpecificReferenceValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link base.States.SpecificValue Specific Value}'. + * + * 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 base.States.SpecificValue + * @generated + */ + public Adapter createSpecificValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.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.trace.commons.model.trace.State + * @generated + */ + public Adapter createStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Value Value}'. + * + * 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.trace.commons.model.trace.Value + * @generated + */ + public Adapter createValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Dimension Dimension}'. + * + * 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.trace.commons.model.trace.Dimension + * @generated + */ + public Adapter createDimensionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.TracedObject Traced Object}'. + * + * 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.trace.commons.model.trace.TracedObject + * @generated + */ + public Adapter createTracedObjectAdapter() { + 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; + } + +} //StatesAdapterFactory diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/util/StatesSwitch.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/util/StatesSwitch.java new file mode 100644 index 000000000..bc530264b --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/States/util/StatesSwitch.java @@ -0,0 +1,299 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.States.util; + +import base.States.*; + +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.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.Value; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * 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 base.States.StatesPackage + * @generated + */ +public class StatesSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static StatesPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public StatesSwitch() { + if (modelPackage == null) { + modelPackage = StatesPackage.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 StatesPackage.SPECIFIC_STATE: { + SpecificState specificState = (SpecificState)theEObject; + T1 result = caseSpecificState(specificState); + if (result == null) result = caseState(specificState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StatesPackage.SPECIFIC_ATTRIBUTE_VALUE: { + SpecificAttributeValue specificAttributeValue = (SpecificAttributeValue)theEObject; + T1 result = caseSpecificAttributeValue(specificAttributeValue); + if (result == null) result = caseSpecificValue(specificAttributeValue); + if (result == null) result = caseValue(specificAttributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StatesPackage.SPECIFIC_DIMENSION: { + SpecificDimension specificDimension = (SpecificDimension)theEObject; + T1 result = caseSpecificDimension(specificDimension); + if (result == null) result = caseDimension(specificDimension); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StatesPackage.SPECIFIC_TRACED_OBJECT: { + SpecificTracedObject specificTracedObject = (SpecificTracedObject)theEObject; + T1 result = caseSpecificTracedObject(specificTracedObject); + if (result == null) result = caseTracedObject(specificTracedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StatesPackage.SPECIFIC_REFERENCE_VALUE: { + SpecificReferenceValue specificReferenceValue = (SpecificReferenceValue)theEObject; + T1 result = caseSpecificReferenceValue(specificReferenceValue); + if (result == null) result = caseSpecificValue(specificReferenceValue); + if (result == null) result = caseValue(specificReferenceValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StatesPackage.SPECIFIC_VALUE: { + SpecificValue specificValue = (SpecificValue)theEObject; + T1 result = caseSpecificValue(specificValue); + if (result == null) result = caseValue(specificValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific 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 'Specific State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseSpecificState(SpecificState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific Attribute Value'. + * + * 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 'Specific Attribute Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseSpecificAttributeValue(SpecificAttributeValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific Dimension'. + * + * 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 'Specific Dimension'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseSpecificDimension(SpecificDimension object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific Traced Object'. + * + * 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 'Specific Traced Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T1 caseSpecificTracedObject(SpecificTracedObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific Reference Value'. + * + * 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 'Specific Reference Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseSpecificReferenceValue(SpecificReferenceValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific Value'. + * + * 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 'Specific Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseSpecificValue(SpecificValue 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 , ValueSubType extends Value> T1 caseState(State object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Value'. + * + * 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 'Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T1 caseValue(Value object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dimension'. + * + * 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 'Dimension'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T1 caseDimension(Dimension object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Traced Object'. + * + * 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 'Traced Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T1 caseTracedObject(TracedObject 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; + } + +} //StatesSwitch diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/RootImplicitStep.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/RootImplicitStep.java new file mode 100644 index 000000000..8b61a02e5 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/RootImplicitStep.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps; + +import base.States.SpecificState; + +import org.eclipse.gemoc.trace.commons.model.trace.SmallStep; + +/** + * + * A representation of the model object 'Root Implicit Step'. + * + * + * + * @see base.Steps.StepsPackage#getRootImplicitStep() + * @model + * @generated + */ +public interface RootImplicitStep extends SmallStep { +} // RootImplicitStep diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/SpecificRootStep.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/SpecificRootStep.java new file mode 100644 index 000000000..6494b4b2f --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/SpecificRootStep.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps; + +import base.States.SpecificState; + +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; + +/** + * + * A representation of the model object 'Specific Root Step'. + * + * + * + * @see base.Steps.StepsPackage#getSpecificRootStep() + * @model + * @generated + */ +public interface SpecificRootStep extends SequentialStep, SpecificStep { +} // SpecificRootStep diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/SpecificStep.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/SpecificStep.java new file mode 100644 index 000000000..d02fb9f89 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/SpecificStep.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps; + +import base.States.SpecificState; + +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +/** + * + * A representation of the model object 'Specific Step'. + * + * + * + * @see base.Steps.StepsPackage#getSpecificStep() + * @model abstract="true" + * @generated + */ +public interface SpecificStep extends Step { + +} // SpecificStep diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/StepsFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/StepsFactory.java new file mode 100644 index 000000000..1438f52b7 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/StepsFactory.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps; + +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 base.Steps.StepsPackage + * @generated + */ +public interface StepsFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + StepsFactory eINSTANCE = base.Steps.impl.StepsFactoryImpl.init(); + + /** + * Returns a new object of class 'Root Implicit Step'. + * + * + * @return a new object of class 'Root Implicit Step'. + * @generated + */ + RootImplicitStep createRootImplicitStep(); + + /** + * Returns a new object of class 'Specific Root Step'. + * + * + * @return a new object of class 'Specific Root Step'. + * @generated + */ + SpecificRootStep createSpecificRootStep(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + StepsPackage getStepsPackage(); + +} //StepsFactory diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/StepsPackage.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/StepsPackage.java new file mode 100644 index 000000000..37671888a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/StepsPackage.java @@ -0,0 +1,329 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * 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 base.Steps.StepsFactory + * @model kind="package" + * @generated + */ +public interface StepsPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "Steps"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://events/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "events"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + StepsPackage eINSTANCE = base.Steps.impl.StepsPackageImpl.init(); + + /** + * The meta object id for the '{@link base.Steps.impl.SpecificStepImpl Specific Step}' class. + * + * + * @see base.Steps.impl.SpecificStepImpl + * @see base.Steps.impl.StepsPackageImpl#getSpecificStep() + * @generated + */ + int SPECIFIC_STEP = 0; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STEP__MSEOCCURRENCE = TracePackage.STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STEP__STARTING_STATE = TracePackage.STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STEP__ENDING_STATE = TracePackage.STEP__ENDING_STATE; + + /** + * The number of structural features of the 'Specific Step' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STEP_FEATURE_COUNT = TracePackage.STEP_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Specific Step' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_STEP_OPERATION_COUNT = TracePackage.STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link base.Steps.impl.RootImplicitStepImpl Root Implicit Step}' class. + * + * + * @see base.Steps.impl.RootImplicitStepImpl + * @see base.Steps.impl.StepsPackageImpl#getRootImplicitStep() + * @generated + */ + int ROOT_IMPLICIT_STEP = 1; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int ROOT_IMPLICIT_STEP__MSEOCCURRENCE = TracePackage.SMALL_STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int ROOT_IMPLICIT_STEP__STARTING_STATE = TracePackage.SMALL_STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int ROOT_IMPLICIT_STEP__ENDING_STATE = TracePackage.SMALL_STEP__ENDING_STATE; + + /** + * The number of structural features of the 'Root Implicit Step' class. + * + * + * @generated + * @ordered + */ + int ROOT_IMPLICIT_STEP_FEATURE_COUNT = TracePackage.SMALL_STEP_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Root Implicit Step' class. + * + * + * @generated + * @ordered + */ + int ROOT_IMPLICIT_STEP_OPERATION_COUNT = TracePackage.SMALL_STEP_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link base.Steps.impl.SpecificRootStepImpl Specific Root Step}' class. + * + * + * @see base.Steps.impl.SpecificRootStepImpl + * @see base.Steps.impl.StepsPackageImpl#getSpecificRootStep() + * @generated + */ + int SPECIFIC_ROOT_STEP = 2; + + /** + * The feature id for the 'Mseoccurrence' containment reference. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ROOT_STEP__MSEOCCURRENCE = TracePackage.SEQUENTIAL_STEP__MSEOCCURRENCE; + + /** + * The feature id for the 'Starting State' reference. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ROOT_STEP__STARTING_STATE = TracePackage.SEQUENTIAL_STEP__STARTING_STATE; + + /** + * The feature id for the 'Ending State' reference. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ROOT_STEP__ENDING_STATE = TracePackage.SEQUENTIAL_STEP__ENDING_STATE; + + /** + * The feature id for the 'Sub Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ROOT_STEP__SUB_STEPS = TracePackage.SEQUENTIAL_STEP__SUB_STEPS; + + /** + * The number of structural features of the 'Specific Root Step' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ROOT_STEP_FEATURE_COUNT = TracePackage.SEQUENTIAL_STEP_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Specific Root Step' class. + * + * + * @generated + * @ordered + */ + int SPECIFIC_ROOT_STEP_OPERATION_COUNT = TracePackage.SEQUENTIAL_STEP_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link base.Steps.SpecificStep Specific Step}'. + * + * + * @return the meta object for class 'Specific Step'. + * @see base.Steps.SpecificStep + * @generated + */ + EClass getSpecificStep(); + + /** + * Returns the meta object for class '{@link base.Steps.RootImplicitStep Root Implicit Step}'. + * + * + * @return the meta object for class 'Root Implicit Step'. + * @see base.Steps.RootImplicitStep + * @generated + */ + EClass getRootImplicitStep(); + + /** + * Returns the meta object for class '{@link base.Steps.SpecificRootStep Specific Root Step}'. + * + * + * @return the meta object for class 'Specific Root Step'. + * @see base.Steps.SpecificRootStep + * @generated + */ + EClass getSpecificRootStep(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + StepsFactory getStepsFactory(); + + /** + * + * 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 base.Steps.impl.SpecificStepImpl Specific Step}' class. + * + * + * @see base.Steps.impl.SpecificStepImpl + * @see base.Steps.impl.StepsPackageImpl#getSpecificStep() + * @generated + */ + EClass SPECIFIC_STEP = eINSTANCE.getSpecificStep(); + + /** + * The meta object literal for the '{@link base.Steps.impl.RootImplicitStepImpl Root Implicit Step}' class. + * + * + * @see base.Steps.impl.RootImplicitStepImpl + * @see base.Steps.impl.StepsPackageImpl#getRootImplicitStep() + * @generated + */ + EClass ROOT_IMPLICIT_STEP = eINSTANCE.getRootImplicitStep(); + + /** + * The meta object literal for the '{@link base.Steps.impl.SpecificRootStepImpl Specific Root Step}' class. + * + * + * @see base.Steps.impl.SpecificRootStepImpl + * @see base.Steps.impl.StepsPackageImpl#getSpecificRootStep() + * @generated + */ + EClass SPECIFIC_ROOT_STEP = eINSTANCE.getSpecificRootStep(); + + } + +} //StepsPackage diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/RootImplicitStepImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/RootImplicitStepImpl.java new file mode 100644 index 000000000..14eb0d3c8 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/RootImplicitStepImpl.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps.impl; + +import base.States.SpecificState; + +import base.Steps.RootImplicitStep; +import base.Steps.StepsPackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.SmallStepImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Root Implicit Step'. + * + * + * @generated + */ +public class RootImplicitStepImpl extends SmallStepImpl implements RootImplicitStep { + /** + * + * + * @generated + */ + protected RootImplicitStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StepsPackage.Literals.ROOT_IMPLICIT_STEP; + } + +} //RootImplicitStepImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/SpecificRootStepImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/SpecificRootStepImpl.java new file mode 100644 index 000000000..b0c60f28a --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/SpecificRootStepImpl.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps.impl; + +import base.States.SpecificState; +import base.Steps.SpecificRootStep; +import base.Steps.SpecificStep; +import base.Steps.StepsPackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.SequentialStepImpl; +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Specific Root Step'. + * + * + * @generated + */ +public class SpecificRootStepImpl extends SequentialStepImpl implements SpecificRootStep { + /** + * + * + * @generated + */ + protected SpecificRootStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StepsPackage.Literals.SPECIFIC_ROOT_STEP; + } + +} //SpecificRootStepImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/SpecificStepImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/SpecificStepImpl.java new file mode 100644 index 000000000..e07d33b34 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/SpecificStepImpl.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps.impl; + +import base.States.SpecificState; +import base.Steps.SpecificStep; +import base.Steps.StepsPackage; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.StepImpl; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Specific Step'. + * + * + * @generated + */ +public abstract class SpecificStepImpl extends StepImpl implements SpecificStep { + /** + * + * + * @generated + */ + protected SpecificStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StepsPackage.Literals.SPECIFIC_STEP; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public NotificationChain basicSetStartingState(SpecificState newStartingState, NotificationChain msgs) { + return super.basicSetStartingState(newStartingState, msgs); + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public NotificationChain basicSetEndingState(SpecificState newEndingState, NotificationChain msgs) { + return super.basicSetEndingState(newEndingState, msgs); + } + +} //SpecificStepImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/StepsFactoryImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/StepsFactoryImpl.java new file mode 100644 index 000000000..dc2dae4ad --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/StepsFactoryImpl.java @@ -0,0 +1,116 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps.impl; + +import base.Steps.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class StepsFactoryImpl extends EFactoryImpl implements StepsFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static StepsFactory init() { + try { + StepsFactory theStepsFactory = (StepsFactory)EPackage.Registry.INSTANCE.getEFactory(StepsPackage.eNS_URI); + if (theStepsFactory != null) { + return theStepsFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new StepsFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public StepsFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case StepsPackage.ROOT_IMPLICIT_STEP: return createRootImplicitStep(); + case StepsPackage.SPECIFIC_ROOT_STEP: return createSpecificRootStep(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public RootImplicitStep createRootImplicitStep() { + RootImplicitStepImpl rootImplicitStep = new RootImplicitStepImpl(); + return rootImplicitStep; + } + + /** + * + * + * @generated + */ + public SpecificRootStep createSpecificRootStep() { + SpecificRootStepImpl specificRootStep = new SpecificRootStepImpl(); + return specificRootStep; + } + + /** + * + * + * @generated + */ + public StepsPackage getStepsPackage() { + return (StepsPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static StepsPackage getPackage() { + return StepsPackage.eINSTANCE; + } + +} //StepsFactoryImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/StepsPackageImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/StepsPackageImpl.java new file mode 100644 index 000000000..5555bf43d --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/impl/StepsPackageImpl.java @@ -0,0 +1,255 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps.impl; + +import base.BasePackage; + +import base.States.StatesPackage; + +import base.States.impl.StatesPackageImpl; + +import base.Steps.RootImplicitStep; +import base.Steps.SpecificRootStep; +import base.Steps.SpecificStep; +import base.Steps.StepsFactory; +import base.Steps.StepsPackage; + +import base.impl.BasePackageImpl; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class StepsPackageImpl extends EPackageImpl implements StepsPackage { + /** + * + * + * @generated + */ + private EClass specificStepEClass = null; + + /** + * + * + * @generated + */ + private EClass rootImplicitStepEClass = null; + + /** + * + * + * @generated + */ + private EClass specificRootStepEClass = 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 base.Steps.StepsPackage#eNS_URI + * @see #init() + * @generated + */ + private StepsPackageImpl() { + super(eNS_URI, StepsFactory.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 StepsPackage#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 StepsPackage init() { + if (isInited) return (StepsPackage)EPackage.Registry.INSTANCE.getEPackage(StepsPackage.eNS_URI); + + // Obtain or create and register package + StepsPackageImpl theStepsPackage = (StepsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StepsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StepsPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + TracePackage.eINSTANCE.eClass(); + + // Obtain or create and register interdependencies + BasePackageImpl theBasePackage = (BasePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI) instanceof BasePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI) : BasePackage.eINSTANCE); + StatesPackageImpl theStatesPackage = (StatesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StatesPackage.eNS_URI) instanceof StatesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StatesPackage.eNS_URI) : StatesPackage.eINSTANCE); + + // Create package meta-data objects + theStepsPackage.createPackageContents(); + theBasePackage.createPackageContents(); + theStatesPackage.createPackageContents(); + + // Initialize created meta-data + theStepsPackage.initializePackageContents(); + theBasePackage.initializePackageContents(); + theStatesPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theStepsPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(StepsPackage.eNS_URI, theStepsPackage); + return theStepsPackage; + } + + /** + * + * + * @generated + */ + public EClass getSpecificStep() { + return specificStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getRootImplicitStep() { + return rootImplicitStepEClass; + } + + /** + * + * + * @generated + */ + public EClass getSpecificRootStep() { + return specificRootStepEClass; + } + + /** + * + * + * @generated + */ + public StepsFactory getStepsFactory() { + return (StepsFactory)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 + specificStepEClass = createEClass(SPECIFIC_STEP); + + rootImplicitStepEClass = createEClass(ROOT_IMPLICIT_STEP); + + specificRootStepEClass = createEClass(SPECIFIC_ROOT_STEP); + } + + /** + * + * + * @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 + TracePackage theTracePackage = (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); + StatesPackage theStatesPackage = (StatesPackage)EPackage.Registry.INSTANCE.getEPackage(StatesPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + EGenericType g1 = createEGenericType(theTracePackage.getStep()); + EGenericType g2 = createEGenericType(theStatesPackage.getSpecificState()); + g1.getETypeArguments().add(g2); + specificStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getSmallStep()); + g2 = createEGenericType(theStatesPackage.getSpecificState()); + g1.getETypeArguments().add(g2); + rootImplicitStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(theTracePackage.getSequentialStep()); + g2 = createEGenericType(this.getSpecificStep()); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(theStatesPackage.getSpecificState()); + g1.getETypeArguments().add(g2); + specificRootStepEClass.getEGenericSuperTypes().add(g1); + g1 = createEGenericType(this.getSpecificStep()); + specificRootStepEClass.getEGenericSuperTypes().add(g1); + + // Initialize classes, features, and operations; add parameters + initEClass(specificStepEClass, SpecificStep.class, "SpecificStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(rootImplicitStepEClass, RootImplicitStep.class, "RootImplicitStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(specificRootStepEClass, SpecificRootStep.class, "SpecificRootStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + } + +} //StepsPackageImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/util/StepsAdapterFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/util/StepsAdapterFactory.java new file mode 100644 index 000000000..d757d7bc4 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/util/StepsAdapterFactory.java @@ -0,0 +1,244 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps.util; + +import base.Steps.*; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +import org.eclipse.gemoc.trace.commons.model.trace.SmallStep; +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see base.Steps.StepsPackage + * @generated + */ +public class StepsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static StepsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public StepsAdapterFactory() { + if (modelPackage == null) { + modelPackage = StepsPackage.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 StepsSwitch modelSwitch = + new StepsSwitch() { + @Override + public Adapter caseSpecificStep(SpecificStep object) { + return createSpecificStepAdapter(); + } + @Override + public Adapter caseRootImplicitStep(RootImplicitStep object) { + return createRootImplicitStepAdapter(); + } + @Override + public Adapter caseSpecificRootStep(SpecificRootStep object) { + return createSpecificRootStepAdapter(); + } + @Override + public > Adapter caseStep(Step object) { + return createStepAdapter(); + } + @Override + public > Adapter caseSmallStep(SmallStep object) { + return createSmallStepAdapter(); + } + @Override + public , StateSubType extends State> Adapter caseBigStep(BigStep object) { + return createBigStepAdapter(); + } + @Override + public , StateSubType extends State> Adapter caseSequentialStep(SequentialStep object) { + return createSequentialStepAdapter(); + } + @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 base.Steps.SpecificStep Specific Step}'. + * + * 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 base.Steps.SpecificStep + * @generated + */ + public Adapter createSpecificStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link base.Steps.RootImplicitStep Root Implicit Step}'. + * + * 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 base.Steps.RootImplicitStep + * @generated + */ + public Adapter createRootImplicitStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link base.Steps.SpecificRootStep Specific Root Step}'. + * + * 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 base.Steps.SpecificRootStep + * @generated + */ + public Adapter createSpecificRootStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Step Step}'. + * + * 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.trace.commons.model.trace.Step + * @generated + */ + public Adapter createStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.SmallStep Small Step}'. + * + * 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.trace.commons.model.trace.SmallStep + * @generated + */ + public Adapter createSmallStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.BigStep Big Step}'. + * + * 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.trace.commons.model.trace.BigStep + * @generated + */ + public Adapter createBigStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.SequentialStep Sequential Step}'. + * + * 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.trace.commons.model.trace.SequentialStep + * @generated + */ + public Adapter createSequentialStepAdapter() { + 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; + } + +} //StepsAdapterFactory diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/util/StepsSwitch.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/util/StepsSwitch.java new file mode 100644 index 000000000..5f5c67dca --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/Steps/util/StepsSwitch.java @@ -0,0 +1,235 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.Steps.util; + +import base.Steps.*; + +import org.eclipse.gemoc.trace.commons.model.trace.BigStep; +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; +import org.eclipse.gemoc.trace.commons.model.trace.SmallStep; +import org.eclipse.gemoc.trace.commons.model.trace.State; +import org.eclipse.gemoc.trace.commons.model.trace.Step; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * 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 base.Steps.StepsPackage + * @generated + */ +public class StepsSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static StepsPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public StepsSwitch() { + if (modelPackage == null) { + modelPackage = StepsPackage.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 StepsPackage.SPECIFIC_STEP: { + SpecificStep specificStep = (SpecificStep)theEObject; + T result = caseSpecificStep(specificStep); + if (result == null) result = caseStep(specificStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StepsPackage.ROOT_IMPLICIT_STEP: { + RootImplicitStep rootImplicitStep = (RootImplicitStep)theEObject; + T result = caseRootImplicitStep(rootImplicitStep); + if (result == null) result = caseSmallStep(rootImplicitStep); + if (result == null) result = caseStep(rootImplicitStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StepsPackage.SPECIFIC_ROOT_STEP: { + SpecificRootStep specificRootStep = (SpecificRootStep)theEObject; + T result = caseSpecificRootStep(specificRootStep); + if (result == null) result = caseSequentialStep(specificRootStep); + if (result == null) result = caseSpecificStep(specificRootStep); + if (result == null) result = caseBigStep(specificRootStep); + if (result == null) result = caseStep(specificRootStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific Step'. + * + * 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 'Specific Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSpecificStep(SpecificStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Root Implicit Step'. + * + * 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 'Root Implicit Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRootImplicitStep(RootImplicitStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific Root Step'. + * + * 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 'Specific Root Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSpecificRootStep(SpecificRootStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Step'. + * + * 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'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseStep(Step object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Small Step'. + * + * 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 'Small Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public > T caseSmallStep(SmallStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Big Step'. + * + * 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 'Big Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , StateSubType extends State> T caseBigStep(BigStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Sequential Step'. + * + * 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 'Sequential Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , StateSubType extends State> T caseSequentialStep(SequentialStep 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; + } + +} //StepsSwitch diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/BaseFactoryImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/BaseFactoryImpl.java new file mode 100644 index 000000000..3a2a17292 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/BaseFactoryImpl.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.impl; + +import base.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class BaseFactoryImpl extends EFactoryImpl implements BaseFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static BaseFactory init() { + try { + BaseFactory theBaseFactory = (BaseFactory)EPackage.Registry.INSTANCE.getEFactory(BasePackage.eNS_URI); + if (theBaseFactory != null) { + return theBaseFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new BaseFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public BaseFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case BasePackage.SPECIFIC_TRACE: return createSpecificTrace(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public SpecificTrace createSpecificTrace() { + SpecificTraceImpl specificTrace = new SpecificTraceImpl(); + return specificTrace; + } + + /** + * + * + * @generated + */ + public BasePackage getBasePackage() { + return (BasePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static BasePackage getPackage() { + return BasePackage.eINSTANCE; + } + +} //BaseFactoryImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/BasePackageImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/BasePackageImpl.java new file mode 100644 index 000000000..fc2c3cddb --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/BasePackageImpl.java @@ -0,0 +1,230 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.impl; + +import base.BaseFactory; +import base.BasePackage; +import base.SpecificTrace; + +import base.States.StatesPackage; + +import base.States.impl.StatesPackageImpl; + +import base.Steps.StepsPackage; + +import base.Steps.impl.StepsPackageImpl; + +import org.eclipse.gemoc.trace.commons.model.trace.TracePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class BasePackageImpl extends EPackageImpl implements BasePackage { + /** + * + * + * @generated + */ + private EClass specificTraceEClass = 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 base.BasePackage#eNS_URI + * @see #init() + * @generated + */ + private BasePackageImpl() { + super(eNS_URI, BaseFactory.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 BasePackage#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 BasePackage init() { + if (isInited) return (BasePackage)EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI); + + // Obtain or create and register package + BasePackageImpl theBasePackage = (BasePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof BasePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new BasePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + TracePackage.eINSTANCE.eClass(); + + // Obtain or create and register interdependencies + StepsPackageImpl theStepsPackage = (StepsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StepsPackage.eNS_URI) instanceof StepsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StepsPackage.eNS_URI) : StepsPackage.eINSTANCE); + StatesPackageImpl theStatesPackage = (StatesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StatesPackage.eNS_URI) instanceof StatesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StatesPackage.eNS_URI) : StatesPackage.eINSTANCE); + + // Create package meta-data objects + theBasePackage.createPackageContents(); + theStepsPackage.createPackageContents(); + theStatesPackage.createPackageContents(); + + // Initialize created meta-data + theBasePackage.initializePackageContents(); + theStepsPackage.initializePackageContents(); + theStatesPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theBasePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(BasePackage.eNS_URI, theBasePackage); + return theBasePackage; + } + + /** + * + * + * @generated + */ + public EClass getSpecificTrace() { + return specificTraceEClass; + } + + /** + * + * + * @generated + */ + public BaseFactory getBaseFactory() { + return (BaseFactory)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 + specificTraceEClass = createEClass(SPECIFIC_TRACE); + } + + /** + * + * + * @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 + StepsPackage theStepsPackage = (StepsPackage)EPackage.Registry.INSTANCE.getEPackage(StepsPackage.eNS_URI); + StatesPackage theStatesPackage = (StatesPackage)EPackage.Registry.INSTANCE.getEPackage(StatesPackage.eNS_URI); + TracePackage theTracePackage = (TracePackage)EPackage.Registry.INSTANCE.getEPackage(TracePackage.eNS_URI); + + // Add subpackages + getESubpackages().add(theStepsPackage); + getESubpackages().add(theStatesPackage); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + EGenericType g1 = createEGenericType(theTracePackage.getTrace()); + EGenericType g2 = createEGenericType(theTracePackage.getSequentialStep()); + g1.getETypeArguments().add(g2); + EGenericType g3 = createEGenericType(); + g2.getETypeArguments().add(g3); + EGenericType g4 = createEGenericType(theStepsPackage.getSpecificStep()); + g3.setEUpperBound(g4); + g3 = createEGenericType(); + g2.getETypeArguments().add(g3); + g4 = createEGenericType(theStatesPackage.getSpecificState()); + g3.setEUpperBound(g4); + g2 = createEGenericType(theStatesPackage.getSpecificTracedObject()); + g1.getETypeArguments().add(g2); + g3 = createEGenericType(); + g2.getETypeArguments().add(g3); + g4 = createEGenericType(theStatesPackage.getSpecificDimension()); + g3.setEUpperBound(g4); + EGenericType g5 = createEGenericType(); + g4.getETypeArguments().add(g5); + EGenericType g6 = createEGenericType(theStatesPackage.getSpecificValue()); + g5.setEUpperBound(g6); + g2 = createEGenericType(theStatesPackage.getSpecificState()); + g1.getETypeArguments().add(g2); + specificTraceEClass.getEGenericSuperTypes().add(g1); + + // Initialize classes, features, and operations; add parameters + initEClass(specificTraceEClass, SpecificTrace.class, "SpecificTrace", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //BasePackageImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/SpecificTraceImpl.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/SpecificTraceImpl.java new file mode 100644 index 000000000..40bf864e0 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/impl/SpecificTraceImpl.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.impl; + +import base.BasePackage; +import base.SpecificTrace; + +import base.States.SpecificDimension; +import base.States.SpecificState; +import base.States.SpecificTracedObject; +import base.States.SpecificValue; + +import base.Steps.SpecificStep; + +import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep; + +import org.eclipse.gemoc.trace.commons.model.trace.impl.TraceImpl; +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.util.EObjectContainmentEList; + +/** + * + * An implementation of the model object 'Specific Trace'. + * + * + * @generated + */ +public class SpecificTraceImpl extends TraceImpl, SpecificTracedObject>, SpecificState> implements SpecificTrace { + /** + * + * + * @generated + */ + protected SpecificTraceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return BasePackage.Literals.SPECIFIC_TRACE; + } + + /** + * + * + * This is specialized for the more specific type known in this context. + * @generated + */ + @Override + public NotificationChain basicSetRootStep(SequentialStep newRootStep, NotificationChain msgs) { + return super.basicSetRootStep(newRootStep, msgs); + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList>> getTracedObjects() { + if (tracedObjects == null) { + tracedObjects = new EObjectContainmentEList>>(SpecificTracedObject.class, this, BasePackage.SPECIFIC_TRACE__TRACED_OBJECTS); + } + return tracedObjects; + } + + /** + * + * + * This is specialized for the more specific element type known in this context. + * @generated + */ + @Override + public EList getStates() { + if (states == null) { + states = new EObjectContainmentEList(SpecificState.class, this, BasePackage.SPECIFIC_TRACE__STATES); + } + return states; + } + +} //SpecificTraceImpl diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/util/BaseAdapterFactory.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/util/BaseAdapterFactory.java new file mode 100644 index 000000000..d79b9ac5e --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/util/BaseAdapterFactory.java @@ -0,0 +1,153 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.util; + +import base.*; + +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.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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see base.BasePackage + * @generated + */ +public class BaseAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static BasePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public BaseAdapterFactory() { + if (modelPackage == null) { + modelPackage = BasePackage.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 BaseSwitch modelSwitch = + new BaseSwitch() { + @Override + public Adapter caseSpecificTrace(SpecificTrace object) { + return createSpecificTraceAdapter(); + } + @Override + public , TracedObjectSubtype extends TracedObject, StateSubType extends State> Adapter caseTrace(Trace object) { + return createTraceAdapter(); + } + @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 base.SpecificTrace Specific Trace}'. + * + * 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 base.SpecificTrace + * @generated + */ + public Adapter createSpecificTraceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gemoc.trace.commons.model.trace.Trace Trace}'. + * + * 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.trace.commons.model.trace.Trace + * @generated + */ + public Adapter createTraceAdapter() { + 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; + } + +} //BaseAdapterFactory diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/util/BaseSwitch.java b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/util/BaseSwitch.java new file mode 100644 index 000000000..61eb9bbcc --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/base/util/BaseSwitch.java @@ -0,0 +1,141 @@ +/******************************************************************************* + * Copyright (c) 2017 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 base.util; + +import base.*; + +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.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * 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 base.BasePackage + * @generated + */ +public class BaseSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static BasePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public BaseSwitch() { + if (modelPackage == null) { + modelPackage = BasePackage.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 BasePackage.SPECIFIC_TRACE: { + SpecificTrace specificTrace = (SpecificTrace)theEObject; + T result = caseSpecificTrace(specificTrace); + if (result == null) result = caseTrace(specificTrace); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Specific Trace'. + * + * 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 'Specific Trace'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSpecificTrace(SpecificTrace object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Trace'. + * + * 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 'Trace'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public , TracedObjectSubtype extends TracedObject, StateSubType extends State> T caseTrace(Trace 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; + } + +} //BaseSwitch diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMExplorer.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMExplorer.xtend new file mode 100644 index 000000000..0527ec4f5 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMExplorer.xtend @@ -0,0 +1,195 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.metamodel.generator + +import java.util.HashMap +import java.util.HashSet +import java.util.Map +import java.util.Set +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EFactory +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EReference +import org.eclipse.xtend.lib.annotations.Accessors + +class TraceMMExplorer { + + private val EPackage tracemm + + // Base classes + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass stateClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificStateClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificTraceClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificTracedObjectClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificDimensionClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificStepClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificRootStepClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificValueClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificAttributeValueClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EClass specificReferenceValueClass + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EReference dimensionsReference + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EPackage stepsPackage + @Accessors(PUBLIC_GETTER, PROTECTED_SETTER) protected val EPackage statesPackage + + protected val EFactory rootFactory; + protected val EFactory stepFactory; + + // protected EFactory tracedFactory; + protected val EFactory stateFactory + + /** + * Here we focus on the part of the base trace mm, because TraceMMExplorer is + * used in the TraceMMGenerator as well. + */ + new(EPackage traceMetamodel) { + this.tracemm = traceMetamodel + + // Find the Trace class + specificTraceClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_Trace) + ] as EClass + + // Find the SpecificState class + specificStateClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_SpecificState) + ] as EClass + + // Find the State class + stateClass = specificStateClass.EAllSuperTypes.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_State) + ] as EClass + + // Find the SpecificTracedObject class + specificTracedObjectClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_TracedObject) + ] as EClass + + dimensionsReference = specificTracedObjectClass.EAllContainments.findFirst [ r | + r.name.equals(TraceMMStrings.ref_Dimensions) + ] + + // Find the SpecificValue class + specificDimensionClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_Dimension) + ] as EClass + + // Find the SpecificValue class + specificValueClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_Value) + ] as EClass + + // Find the AttributeValue class + specificAttributeValueClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_AttributeValue) + ] as EClass + + // Find the ReferenceValue class + specificReferenceValueClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_ReferenceValue) + ] as EClass + + // Find the SpecificStep class + specificStepClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_Step) + ] as EClass + stepsPackage = specificStepClass.EPackage + + // Find the SpecificRootStep class + specificRootStepClass = tracemm.eAllContents.filter(EClass).findFirst [ c | + c.name.equals(TraceMMStrings.class_RootStep) + ] as EClass + + // Find the States package + statesPackage = tracemm.eAllContents.filter(EPackage).findFirst [ p | + p.name.equals(TraceMMStrings.package_States) + ] as EPackage + + rootFactory = tracemm.EFactoryInstance + stepFactory = stepsPackage.EFactoryInstance + stateFactory = statesPackage.EFactoryInstance + } + + private var initDone = false + + def void init() { + if (!initDone) { + + stepClassesCache = new HashSet + stepClassesCache.addAll(stepsPackage.eAllContents.filter(EClass).filter [ c | + c != specificStepClass + ].toSet) + + refs_valueRefsFromStateClassCache = specificStateClass.getEAllReferences.filter [ r | + !r.name.equals(TraceMMStrings.ref_ValueToStates) + ].toSet + + initDone = true + } + + } + + private Set stepClassesCache = null + + public def Set stepClasses() { + init() + return stepClassesCache + } + + private val Map stepSequenceRefOfCache = new HashMap + + public def EReference stepSequenceRefOf(EClass stepClass) { + + if (!stepSequenceRefOfCache.containsKey(stepClass)) { + stepSequenceRefOfCache.put(stepClass, specificTraceClass.EReferences.findFirst [ r | + r.name.equals(TraceMMStrings.ref_createTraceClassToStepClass(stepClass)) + ]) + } + + return stepSequenceRefOfCache.get(stepClass) + } + + def EObject createEventOccurrence(EClass stepClass) { + return stepFactory.create(stepClass) + } + + def EObject createTracedObject(EClass tracedClass) { + + // TODO provide somewhere a generic create method? not related to trace mm explorer + return tracedClass.EPackage.EFactoryInstance.create(tracedClass) + } + + def EObject createState(EClass stateClass) { + return stateFactory.create(stateClass) + } + + // References to state classes from the global state class + private var Set refs_valueRefsFromStateClassCache + + def Set refs_valueRefsFromStateClass() { + init() + return refs_valueRefsFromStateClassCache + } + + private val Map> refs_originalObjectCache = new HashMap + + def Set refs_originalObject(EClass traceClass) { + + if (!refs_originalObjectCache.containsKey(traceClass)) { + refs_originalObjectCache.put(traceClass, traceClass.EAllReferences.filter [ r | + r.name.startsWith(TraceMMStrings.ref_OriginalObject) + ].toSet) + } + + return refs_originalObjectCache.get(traceClass) + } + +} diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGenerationTraceability.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGenerationTraceability.xtend new file mode 100644 index 000000000..6a57d91c8 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGenerationTraceability.xtend @@ -0,0 +1,260 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.metamodel.generator + +import java.util.HashMap +import java.util.HashSet +import java.util.Map +import java.util.Set +import opsemanticsview.OperationalSemanticsView +import opsemanticsview.Rule +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EReference +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.xtend.lib.annotations.Accessors + +/** + * Second output of the transformation: a class both to access to parts + * of the trace metamodel, and with links between the original metamodels + * and the trace metamodel. + */ +class TraceMMGenerationTraceability { + + new(TraceMMExplorer traceMMExplorer, OperationalSemanticsView mmext) { + this.traceMMExplorer = traceMMExplorer + this.mmext = mmext + } + + @Accessors(PUBLIC_GETTER, PACKAGE_SETTER) + private val TraceMMExplorer traceMMExplorer + + @Accessors(PUBLIC_GETTER, PACKAGE_SETTER) + private val OperationalSemanticsView mmext + + private Set runtimeClasses = new HashSet + + package def void addRuntimeClass(EClass c) { + runtimeClasses.add(c) + } + + public def Set getRuntimeClasses() { + return runtimeClasses.immutableCopy + } + + private Map> mutableProperties = new HashMap> + + package def void addMutableProperty(EClass c, EStructuralFeature r) { + if (!mutableProperties.containsKey(c)) + mutableProperties.put(c, new HashSet) + mutableProperties.get(c).add(r) + } + + public def Set getMutablePropertiesOf(EClass c) { + if (mutableProperties.containsKey(c)) { + return mutableProperties.get(c).immutableCopy + } else { + return #{} + } + } + + public def Set getAllMutableProperties() { + return mutableProperties.values.flatten.toSet + } + + val tracedClasses = new HashMap + + package def void putTracedClasses(EClass runtimeClass, EClass tracedClass) { + tracedClasses.put(runtimeClass, tracedClass) + } + + public def EClass getTracedClass(EClass mutableClass) { + return tracedClasses.get(mutableClass) + } + + public def Set getTracedClassSet() { + val result = new HashSet + result.addAll(tracedClasses.keySet) + return result + } + + val dimensionClasses = new HashMap + + public def putDimensionClass(EStructuralFeature property, EClass dimension) { + dimensionClasses.put(property, dimension) + } + + public def EClass getDimensionClass(EStructuralFeature property) { + return dimensionClasses.get(property) + } + + val dimensionRefs = new HashMap + + public def putDimensionRef(EStructuralFeature property, EReference dimensionRef) { + dimensionRefs.put(property, dimensionRef) + } + + public def EReference getDimensionRef(EStructuralFeature property) { + return dimensionRefs.get(property) + } + + public def Set getNewClasses() { + return mmext.dynamicClasses.toSet + } + + public def boolean hasTracedClass(EClass mutableClass) { + return tracedClasses.containsKey(mutableClass) + } + + public def Set getAllMutableClasses() { + return tracedClasses.keySet; + } + + + + public def EClass getRealMutableClass(EClass tracedClass) { + val mutClass = tracedClasses.entrySet.findFirst[p|p.value == tracedClass] + if (mutClass != null) + return mutClass.key + else + return null + } + + private Map> refs_originalObject = new HashMap> + + package def void addRefs_originalObject(EClass c1, EReference r) { + if (!refs_originalObject.containsKey(c1)) + refs_originalObject.put(c1, new HashSet) + refs_originalObject.get(c1).add(r) + } + + public def Set getRefs_originalObject(EClass class1) { + val Set res = new HashSet + val existingRefs = class1.EAllSuperTypes.map[c|getRefs_originalObject(c)].flatten.toSet + res.addAll(existingRefs) + val refsForThisClass = refs_originalObject.get(class1) + if (refsForThisClass != null && !refsForThisClass.isEmpty) + res.addAll(refsForThisClass) + return res + } + +// private Map traceOf = new HashMap +// +// package def void putTraceOf(EStructuralFeature r1, EReference r2) { +// traceOf.put(r1, r2) +// } +// +// public def EReference getTraceOf(EStructuralFeature s) { +// return traceOf.get(s) +// } + + private Map valueClass = new HashMap + + package def void putValueClass(EStructuralFeature r, EClass c) { + valueClass.put(r, c) + } + + public def EClass getValueClass(EStructuralFeature s) { + return valueClass.get(s) + } + + private Map stateClassToValueClass = new HashMap + + package def void putStateClassToValueClass(EStructuralFeature r1, EReference r2) { + stateClassToValueClass.put(r1, r2) + } + + public def EReference getStateClassToValueClass(EStructuralFeature s) { + if (mutablePropertyToValueProperty.containsValue(s)) { + val key = mutablePropertyToValueProperty.entrySet.findFirst[entry|entry.value == s].key + return stateClassToValueClass.get(key) + } else { + return stateClassToValueClass.get(s) + } + + } + + private Set stepClasses = new HashSet + + package def void addStepClass(EClass c) { + stepClasses.add(c) + } + + public def Set getStepClasses() { + return stepClasses.immutableCopy + } + + private val Map stepRuleToStepClass = new HashMap + + package def void addStepRuleToStepClass(Rule stepRule, EClass stepClass) { + stepRuleToStepClass.put(stepRule, stepClass) + } + + public def EClass getStepClassFromStepRule(Rule stepRule) { + return stepRuleToStepClass.get(stepRule) + } + + private Set bigStepClasses = new HashSet + + package def void addBigStepClass(EClass c) { + bigStepClasses.add(c) + } + + public def Set getBigStepClasses() { + return bigStepClasses.immutableCopy + } + + private Map implicitStepClasses = new HashMap + + package def void putImplicitStepClass(EClass step, EClass containgClass) { + implicitStepClasses.put(step,containgClass) + } + + public def Set getImplicitStepClasses() { + return implicitStepClasses.keySet.immutableCopy + } + + public def EClass getImplicitStepContainingClass(EClass implicitStepClass) { + return implicitStepClasses.get(implicitStepClass) + } + + private val Map stepSequences = new HashMap + + package def void addStepSequence(EClass stepClass, EReference trace) { + stepSequences.put(stepClass, trace) + } + + public def EReference getStepSequence(EClass stepClass) { + return stepSequences.get(stepClass) + } + + def boolean hasExeClass(EClass tracedClass) { + return tracedClasses.keySet.exists[k|tracedClasses.get(k) == tracedClass]; + } + + def EClass getExeClass(EClass tracedClass) { + return tracedClasses.keySet.findFirst[k|tracedClasses.get(k) == tracedClass]; + } + + private val Map mutablePropertyToValueProperty = new HashMap + + def void putMutablePropertyToValueProperty(EStructuralFeature mutableProperty, EStructuralFeature valueProperty) { + mutablePropertyToValueProperty.put(mutableProperty,valueProperty) + } + + def EStructuralFeature getValuePropertyOfMutableProperty(EStructuralFeature mutableProperty) { + return mutablePropertyToValueProperty.get(mutableProperty) + } + + + + + +} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGenerator.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGenerator.xtend similarity index 79% rename from trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGenerator.xtend rename to trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGenerator.xtend index a6e3d69b9..4ff1a8290 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGenerator.xtend +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGenerator.xtend @@ -1,26 +1,35 @@ -package fr.inria.diverse.trace.metamodel.generator - -import fr.inria.diverse.trace.commons.EMFUtil +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.metamodel.generator + +import org.eclipse.gemoc.trace.commons.EMFUtil import java.io.IOException +import java.util.Set +import opsemanticsview.OperationalSemanticsView +import org.eclipse.emf.codegen.ecore.genmodel.GenPackage +import org.eclipse.emf.common.util.Diagnostic import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.EClass import org.eclipse.emf.ecore.EPackage 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.util.Diagnostician import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl import org.eclipse.xtend.lib.annotations.Accessors -import ecorext.Ecorext -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.util.Diagnostician -import org.eclipse.emf.common.util.Diagnostic -import java.util.Set -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage class TraceMMGenerator { // Inputs - private val Ecorext mmext - private val EPackage mm + private val OperationalSemanticsView mmext private val ResourceSet rs private val String languageName private val boolean gemoc @@ -34,15 +43,14 @@ class TraceMMGenerator { private var boolean done = false - new(Ecorext mmext, EPackage mm, boolean gemoc) { + new(OperationalSemanticsView mmext, boolean gemoc) { // Storing inputs this.mmext = mmext - this.mm = mm this.gemoc = gemoc // Create name of the trace metamodel - languageName = mm.name.replaceAll(" ", "") + "Trace" + languageName = mmext.executionMetamodel.name.replaceAll(" ", "") + "Trace" // Creating resource set to work with this.rs = new ResourceSetImpl() @@ -50,7 +58,7 @@ class TraceMMGenerator { // Create the root package by loading the base ecore and changing its name and stuff val Resource base = EMFUtil.loadModelURI( - URI.createPlatformPluginURI("fr.inria.diverse.trace.metamodel.generator/model/base.ecore", true), rs) + URI.createPlatformPluginURI("org.eclipse.gemoc.trace.metamodel.generator/model/base.ecore", true), rs) tracemmresult = base.contents.get(0) as EPackage base.contents.remove(tracemmresult) tracemmresult.name = languageName @@ -76,7 +84,7 @@ class TraceMMGenerator { public def void computeAllMaterial() throws IOException { if (!done) { - val statesGen = new TraceMMGeneratorStates(mmext, mm, traceability, traceMMExplorer, languageName, + val statesGen = new TraceMMGeneratorStates(mmext, traceability, traceMMExplorer, languageName, tracemmresult, gemoc) statesGen.process diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGeneratorStates.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGeneratorStates.xtend new file mode 100644 index 000000000..5f7cbbfd3 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGeneratorStates.xtend @@ -0,0 +1,380 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.metamodel.generator + +import org.eclipse.gemoc.trace.commons.EcoreCraftingUtil +import org.eclipse.gemoc.trace.commons.ExecutionMetamodelTraceability +import java.util.ArrayList +import java.util.HashMap +import java.util.HashSet +import java.util.Map +import java.util.Set +import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EReference +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.emf.ecore.EcoreFactory +import org.eclipse.emf.ecore.util.EcoreUtil + +import static org.eclipse.gemoc.trace.commons.EcoreCraftingUtil.* +import opsemanticsview.OperationalSemanticsView + +class TraceMMGeneratorStates { + + // Inputs + private val OperationalSemanticsView mmext + private val TraceMMExplorer traceMMExplorer + private val String languageName + private val boolean gemoc + + // Input/Output (already accessible because created before) + private val EPackage tracemmresult + private val TraceMMGenerationTraceability traceability + + // Transient stuff + private val Map runtimeToTraced = new HashMap + private val Set allRuntimeClasses = new HashSet + private val Set allStaticClasses = new HashSet + private val Set allNewEClasses + private val Set multipleOrig = new HashSet + + new(OperationalSemanticsView mmext,TraceMMGenerationTraceability traceability, + TraceMMExplorer traceMMExplorer, String languageName, EPackage tracemmresult, boolean gemoc) { + this.mmext = mmext + this.allNewEClasses = mmext.eAllContents.toSet.filter(EClass).toSet + this.traceability = traceability + this.traceMMExplorer = traceMMExplorer + this.languageName = languageName + this.tracemmresult = tracemmresult + this.gemoc = gemoc + } + + private def void cleanup() { + val allCreatedEClasses = this.tracemmresult.eAllContents.filter(EClass).toSet + + for (c : allCreatedEClasses) { + cleanupAnnotations(c); + } + + // TODO is this this necessary? + for (r : runtimeToTraced.values.filter(EReference)) { + r.EOpposite = null + } + } + + public def void process() { + handleTraceClasses() + cleanup() + } + + private def void cleanupAnnotations(EClass eClass) { + val traceabilityAnnotation = ExecutionMetamodelTraceability.getTraceabilityAnnotation(eClass); + eClass.EAnnotations.clear + if (traceabilityAnnotation != null) { + eClass.EAnnotations.add(traceabilityAnnotation); + } + } + + private def EPackage obtainTracedPackage(EPackage runtimePackage) { + var EPackage result = traceMMExplorer.statesPackage + + if (runtimePackage != null) { + val tracedSuperPackage = obtainTracedPackage(runtimePackage.ESuperPackage) + val String tracedPackageName = TraceMMStrings.package_createTracedPackage(runtimePackage) + result = tracedSuperPackage.ESubpackages.findFirst[p|p.name.equals(tracedPackageName)] + if (result == null) { + result = EcoreFactory.eINSTANCE.createEPackage + result.name = tracedPackageName + result.nsURI = languageName + "_" + result.name // TODO + result.nsPrefix = "" // TODO + tracedSuperPackage.ESubpackages.add(result) + } + } + return result + } + + private def String computeTraceabilityAnnotationValue(EClass extendedClass) { + var String traceabilityAnnotationValue = null; + val dynamicProperties = extendedClass.EStructuralFeatures.filter[f|mmext.dynamicProperties.contains(f)].toSet + if (!dynamicProperties.empty) { + val mutableProperty = dynamicProperties.get(0); + val String mutablePropertyTraceabilityValue = ExecutionMetamodelTraceability. + getTraceabilityAnnotationValue(mutableProperty) + if (mutablePropertyTraceabilityValue != null) { + val classSubstringStartIndex = mutablePropertyTraceabilityValue.lastIndexOf("/"); + traceabilityAnnotationValue = mutablePropertyTraceabilityValue.substring(0, classSubstringStartIndex); + } + } + return traceabilityAnnotationValue; + } + + private def boolean isInPackage(EPackage c, EPackage p) { + if (c != null && p != null && c == p) { + return true + } else if (c.ESuperPackage != null) { + return isInPackage(c.ESuperPackage, p) + } else { + return false + } + } + + private def Set getSubTypesOf(EClass c) { + val result = new HashSet + for (someEClass : mmext.executionMetamodel.eAllContents.toSet.filter(EClass)) { + if (someEClass.ESuperTypes.contains(c)) { + result.add(someEClass) + } + } + return result + } + + + private def void getAllInheritance(Set result, EClass c) { + if (!result.contains(c)) { + result.add(c) + for (sup : c.ESuperTypes) { + getAllInheritance(result, sup) + } + for (sub : getSubTypesOf(c)) { + getAllInheritance(result, sub) + } + } + } + + private def Set getAllInheritance(EClass c) { + val result = new HashSet() + getAllInheritance(result, c) + return result + } + + private def void handleTraceClasses() { + + // First we find ALL classes linked to runtime properties + for (dp : mmext.dynamicProperties) { + val extendedExistingClass = dp.EContainingClass + allRuntimeClasses.add(extendedExistingClass) + val allInheritance = getAllInheritance(extendedExistingClass) + allRuntimeClasses.addAll(allInheritance) + } + + val baseClassToNewEClass = new HashMap + + for (c : allNewEClasses) { + baseClassToNewEClass.put(mmext.executionMetamodel.eAllContents.toSet.filter(EClass).findFirst[cls|cls.name == c.name], c) + } + + for (c : allNewEClasses) { + val allInheritance = getAllInheritance(mmext.executionMetamodel.eAllContents.toSet.filter(EClass).findFirst [cls| + cls.name == c.name + ]) + allRuntimeClasses.addAll(allInheritance.map [ cls | + val newEClass = baseClassToNewEClass.get(cls) + if(newEClass == null) cls else newEClass + ]) + } + + // We also store the dual set of classes not linked to anything dynamic + allStaticClasses.addAll(mmext.executionMetamodel.eAllContents.toSet.filter(EClass).filter[c|!allRuntimeClasses.contains(c)]) + + // Here we find classes that inherit from multiple concrete classes + // This allows later to handle multiple non-conflicting "originalObject" references in such cases + for (rc : allRuntimeClasses) { + val concreteSuperTypes = rc.EAllSuperTypes.filter[c|!c.abstract && allRuntimeClasses.contains(c)].toSet + multipleOrig.addAll(concreteSuperTypes) + } + + val tracedClasses = new ArrayList + // We go through all dynamic classes and we create traced versions of them + // we sort them by name to ensure reproducibility of the generated ecore file + val runtimeClasses = allRuntimeClasses.toList + val runtimeClassesSorted = runtimeClasses.sortBy[name] + for (runtimeClass : runtimeClassesSorted) { + val tracedClass = handleTraceClass(runtimeClass) + tracedClasses.add(tracedClass) + } + } + + private def EClass handleTraceClass(EClass runtimeClass) { + + if (!allRuntimeClasses.contains(runtimeClass)) + return runtimeClass + + if (! runtimeToTraced.containsKey(runtimeClass)) { + + + // Creating the traced version of the class + val tracedClass = EcoreFactory.eINSTANCE.createEClass + tracedClass.name = TraceMMStrings.class_createTraceClassName(runtimeClass) + tracedClass.abstract = runtimeClass.abstract || runtimeClass.interface + runtimeToTraced.put(runtimeClass, tracedClass) + + // Storing traceability stuff + traceability.putTracedClasses(runtimeClass, tracedClass) + + // "Copying" super types + for (superType : runtimeClass.ESuperTypes.filter[t|allRuntimeClasses.contains(t)]) { + val tracedSuperType = handleTraceClass(superType) + tracedClass.ESuperTypes.add(tracedSuperType) + } + + val boolean notNewClass = !allNewEClasses.contains(runtimeClass) + val boolean notAbstract = !tracedClass.abstract + + // Adding the SpecificTracedObject super type + if (tracedClass.ESuperTypes.empty) { + val tracedObjectGenericSuperType = EcoreFactory.eINSTANCE.createEGenericType + tracedObjectGenericSuperType.EClassifier = traceMMExplorer.specificTracedObjectClass + val dimensionClassTracedObjectTypeBinding = EcoreFactory.eINSTANCE.createEGenericType + tracedObjectGenericSuperType.ETypeArguments.add(dimensionClassTracedObjectTypeBinding) + // And binds its type parameters to the runtime and specific dimension classes + dimensionClassTracedObjectTypeBinding.EClassifier = traceMMExplorer.specificDimensionClass + dimensionClassTracedObjectTypeBinding.ETypeArguments.add(EcoreFactory.eINSTANCE.createEGenericType) + tracedClass.EGenericSuperTypes.add(tracedObjectGenericSuperType) + } + + // We recreate the same package organization + val tracedPackage = obtainTracedPackage(runtimeClass.EPackage) + tracedPackage.EClassifiers.add(tracedClass) + + // If this is a class extension, then we add a reference, to be able to refer to the element of the original model (if originally static element of the model) + val dynamicProperties = runtimeClass.EStructuralFeatures.filter[f|mmext.dynamicProperties.contains(f)] + if (notNewClass && !dynamicProperties.empty) { + val traceabilityAnnotationValue = computeTraceabilityAnnotationValue(runtimeClass); + if (traceabilityAnnotationValue != null) + ExecutionMetamodelTraceability.createTraceabilityAnnotation(tracedClass, + traceabilityAnnotationValue); + } + + // Also we must check that there isn't already a concrete class in the super classes, which would have its own origObj ref + val boolean onlyAbstractSuperTypes = runtimeClass.EAllSuperTypes.forall [ c | + !allRuntimeClasses.contains(c) || c.abstract + ] + if (notNewClass && notAbstract && onlyAbstractSuperTypes) { + val refName = if (multipleOrig.contains(runtimeClass)) { + TraceMMStrings.ref_OriginalObject_MultipleInheritance(runtimeClass) + } else { + TraceMMStrings.ref_OriginalObject + } + val EReference ref = addReferenceToClass(tracedClass, refName, runtimeClass) + traceability.addRefs_originalObject(tracedClass, ref) + } + + + // Then going through all properties for the remaining generation + var Set runtimeProperties = new HashSet + if (allNewEClasses.contains(runtimeClass)) + runtimeProperties.addAll(runtimeClass.EStructuralFeatures) + else { + if (!dynamicProperties.empty) { + runtimeProperties.addAll(dynamicProperties); + } + } + + // Storing traceability stuff + if (!runtimeProperties.isEmpty) + traceability.addRuntimeClass(runtimeClass) + + val dimensionsGetters = new ArrayList + + // We go through the runtime properties of this class + for (runtimeProperty : runtimeProperties) { + + // Storing traceability stuff + traceability.addMutableProperty(runtimeClass, runtimeProperty) + + // ------------ Value class + val valueClass = EcoreFactory.eINSTANCE.createEClass + valueClass.name = TraceMMStrings.class_createStateClassName(runtimeClass, runtimeProperty) + + // We copy the property inside the value class + val copiedProperty = EcoreUtil.copy(runtimeProperty) as EStructuralFeature + if (copiedProperty instanceof EReference) { + copiedProperty.containment = false + copiedProperty.EOpposite = null + copiedProperty.EType = handleTraceClass(runtimeProperty.EType as EClass) + copiedProperty.derived = false + copiedProperty.changeable = true + copiedProperty.volatile = false + + // The value class inherits the SpecificReferenceValue abstract class + val valueGenericSuperType = EcoreFactory.eINSTANCE.createEGenericType + valueGenericSuperType.EClassifier = traceMMExplorer.specificReferenceValueClass + val valueTypeBinding = EcoreFactory.eINSTANCE.createEGenericType + valueGenericSuperType.ETypeArguments.add(valueTypeBinding) + // And binds its type parameter to the generated traced object class + valueTypeBinding.EClassifier = copiedProperty.EType + valueClass.EGenericSuperTypes.add(valueGenericSuperType) + } else { + // The value class inherits the SpecificAttributeValue abstract class + valueClass.ESuperTypes.add(traceMMExplorer.specificAttributeValueClass) + } + valueClass.EStructuralFeatures.add(copiedProperty) + traceMMExplorer.statesPackage.EClassifiers.add(valueClass) + + traceability.putMutablePropertyToValueProperty(runtimeProperty, copiedProperty) + + ExecutionMetamodelTraceability.createTraceabilityAnnotation(valueClass, + ExecutionMetamodelTraceability.getTraceabilityAnnotationValue(runtimeProperty)) + + // ------------ Dimension class + val dimensionClass = EcoreFactory.eINSTANCE.createEClass + dimensionClass.name = TraceMMStrings.class_createDimensionClassName(runtimeClass, runtimeProperty) + // The dimension class inherits the SpecificDimension abstract class + val dimensionGenericSuperType = EcoreFactory.eINSTANCE.createEGenericType + dimensionGenericSuperType.EClassifier = traceMMExplorer.specificDimensionClass + val dimensionTypeBinding = EcoreFactory.eINSTANCE.createEGenericType + dimensionGenericSuperType.ETypeArguments.add(dimensionTypeBinding) + // And binds its type parameter to the generated value class + dimensionTypeBinding.EClassifier = valueClass + dimensionClass.EGenericSuperTypes.add(dimensionGenericSuperType) + traceMMExplorer.statesPackage.EClassifiers.add(dimensionClass) + + val dimensionRef = addReferenceToClass(tracedClass, dimensionClass.name.toFirstLower, dimensionClass) + dimensionRef.containment = true + dimensionRef.lowerBound = 0 + dimensionRef.upperBound = 1 + dimensionsGetters.add(EcoreCraftingUtil.stringGetter(dimensionRef)) + + traceability.putDimensionClass(runtimeProperty, dimensionClass) + traceability.putDimensionRef(runtimeProperty, dimensionRef) + + traceability.putValueClass(runtimeProperty, valueClass) + } + val getDimensionsInternal = EcoreFactory.eINSTANCE.createEOperation + val getDimensionsAnnotation = EcoreFactory.eINSTANCE.createEAnnotation + getDimensionsInternal.EAnnotations.add(getDimensionsAnnotation) + getDimensionsInternal.name = "getDimensionsInternal" + getDimensionsInternal.lowerBound = 0 + getDimensionsInternal.upperBound = -1 + val dimensionGenericSuperType = EcoreFactory.eINSTANCE.createEGenericType + dimensionGenericSuperType.EClassifier = traceMMExplorer.specificDimensionClass + val dimensionTypeBinding = EcoreFactory.eINSTANCE.createEGenericType + dimensionGenericSuperType.ETypeArguments.add(dimensionTypeBinding) + getDimensionsInternal.EGenericType = dimensionGenericSuperType + getDimensionsAnnotation.source = GenModelPackage.eNS_URI + getDimensionsAnnotation.details.put("body", ''' + final EList> result = new org.eclipse.emf.ecore.util.BasicInternalEList>(Object.class); + result.addAll(super.getDimensionsInternal()); + «FOR getter : dimensionsGetters» + result.add(«getter»); + «ENDFOR» + return result; + ''') + tracedClass.EOperations.add(getDimensionsInternal) + + return tracedClass + } else { + return runtimeToTraced.get(runtimeClass) + } + } + +} diff --git a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGeneratorSteps.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGeneratorSteps.xtend similarity index 79% rename from trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGeneratorSteps.xtend rename to trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGeneratorSteps.xtend index 2e260a1f1..ed11aa8bf 100644 --- a/trace/generator/plugins/fr.inria.diverse.trace.metamodel.generator/src/fr/inria/diverse/trace/metamodel/generator/TraceMMGeneratorSteps.xtend +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMGeneratorSteps.xtend @@ -1,9 +1,17 @@ -package fr.inria.diverse.trace.metamodel.generator - -import ecorext.Ecorext -import ecorext.Rule -import fr.inria.diverse.trace.commons.EcoreCraftingUtil -import fr.inria.diverse.trace.commons.tracemetamodel.StepStrings +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.metamodel.generator + +import org.eclipse.gemoc.trace.commons.EcoreCraftingUtil +import org.eclipse.gemoc.trace.commons.tracemetamodel.StepStrings import java.util.HashMap import java.util.HashSet import java.util.Map @@ -16,12 +24,14 @@ import org.eclipse.emf.ecore.EOperation import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.EcoreFactory -import static fr.inria.diverse.trace.commons.EcoreCraftingUtil.* +import static org.eclipse.gemoc.trace.commons.EcoreCraftingUtil.* +import opsemanticsview.OperationalSemanticsView +import opsemanticsview.Rule class TraceMMGeneratorSteps { // Inputs - private val Ecorext mmext + private val OperationalSemanticsView mmext private val TraceMMExplorer traceMMExplorer private val boolean gemoc @@ -36,7 +46,7 @@ class TraceMMGeneratorSteps { // Constant private static val String GET_CALLER_OPERATION_NAME = "getCaller"; - new(Ecorext mmext, EPackage tracemmresult, TraceMMGenerationTraceability traceability, + new(OperationalSemanticsView mmext, EPackage tracemmresult, TraceMMGenerationTraceability traceability, TraceMMExplorer traceMMExplorer, boolean gemoc) { this.traceability = traceability this.tracemmresult = tracemmresult @@ -173,7 +183,6 @@ class TraceMMGeneratorSteps { // Default basic name stepClass.name = stepRule.operation.name - // If in the context of gemoc, we implement a "getCaller" eoperation that is well typed if (gemoc && stepRule.containingClass != null) { val EOperation getCallerEOperation = EcoreFactory.eINSTANCE.createEOperation @@ -217,7 +226,13 @@ class TraceMMGeneratorSteps { if (stepRule.calledRules.isEmpty) { // Adding inheritance to SmallStep class - stepClass.ESuperTypes.add(mseSmallStepClass) + val smallStepGenericSuperType = EcoreFactory.eINSTANCE.createEGenericType + smallStepGenericSuperType.EClassifier = mseSmallStepClass + val smallStepTypeBinding = EcoreFactory.eINSTANCE.createEGenericType + smallStepGenericSuperType.ETypeArguments.add(smallStepTypeBinding) + // And binds its type parameter to the generated traced object class + smallStepTypeBinding.EClassifier = traceMMExplorer.specificStateClass + stepClass.EGenericSuperTypes.add(smallStepGenericSuperType) } // Case Big Step else { @@ -227,8 +242,9 @@ class TraceMMGeneratorSteps { // Adding inheritance to SequentialStep abstract class val genericSuperType = EcoreFactory.eINSTANCE.createEGenericType genericSuperType.EClassifier = mseSequentialStepClass - val typeBinding = EcoreFactory.eINSTANCE.createEGenericType - genericSuperType.ETypeArguments.add(typeBinding) + val stepTypeBinding = EcoreFactory.eINSTANCE.createEGenericType + val stateTypeBinding = EcoreFactory.eINSTANCE.createEGenericType + genericSuperType.ETypeArguments.addAll(stepTypeBinding, stateTypeBinding) stepClass.EGenericSuperTypes.add(genericSuperType) // SubStepSuperClass @@ -241,7 +257,10 @@ class TraceMMGeneratorSteps { subStepSuperClass.ESuperTypes.add(traceMMExplorer.specificStepClass) // Link StepClass -> SubStepSuperClass, simply through type binding - typeBinding.EClassifier = subStepSuperClass + stepTypeBinding.EClassifier = subStepSuperClass + + // Link StepClass -> StateClass + stateTypeBinding.EClassifier = traceMMExplorer.specificStateClass // Fill step class val EClass implicitStepClass = EcoreFactory.eINSTANCE.createEClass @@ -250,10 +269,19 @@ class TraceMMGeneratorSteps { StepStrings.implicitStepClassName(stepRule.containingClass, stepRule.operation)) // Inheritance Fill > SubStepSuper - implicitStepClass.ESuperTypes.addAll(subStepSuperClass, mseSmallStepClass) + implicitStepClass.ESuperTypes.add(subStepSuperClass) + + // Adding inheritance to SmallStep class + val smallStepGenericSuperType = EcoreFactory.eINSTANCE.createEGenericType + smallStepGenericSuperType.EClassifier = mseSmallStepClass + val smallStepTypeBinding = EcoreFactory.eINSTANCE.createEGenericType + smallStepGenericSuperType.ETypeArguments.add(smallStepTypeBinding) + // And binds its type parameter to the generated traced object class + smallStepTypeBinding.EClassifier = traceMMExplorer.specificStateClass + implicitStepClass.EGenericSuperTypes.add(smallStepGenericSuperType) traceability.putImplicitStepClass(implicitStepClass, stepRule.containingClass) - + for (calledStepRule : stepRule.calledRules) { // For each called step rule, we create an step class (if not created already) val EClass subStepClass = getStepClass(calledStepRule) diff --git a/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMStrings.xtend b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMStrings.xtend new file mode 100644 index 000000000..794360106 --- /dev/null +++ b/trace/generator/plugins/org.eclipse.gemoc.trace.metamodel.generator/src/org/eclipse/gemoc/trace/metamodel/generator/TraceMMStrings.xtend @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.trace.metamodel.generator + +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.emf.ecore.EPackage + +class TraceMMStrings { + + public static val String class_Trace = "SpecificTrace" + + public static val String class_State = "State" + + public static val String class_SpecificState = "SpecificState" + + public static val String class_TracedObject = "SpecificTracedObject" + + public static val String class_Dimension = "SpecificDimension" + + public static val String class_Value = "SpecificValue" + + public static val String class_AttributeValue = "SpecificAttributeValue" + + public static val String class_ReferenceValue = "SpecificReferenceValue" + + public static val String class_Step = "SpecificStep" + + public static val String class_RootStep = "SpecificRootStep" + + public static val String package_States = "States" + + public static val String package_Steps = "Steps" + + public static val String ref_Dimensions = "dimensions" + + public static val String ref_OriginalObject = "originalObject" + + public static val String ref_ValueToTrace = "parent" + + public static val String ref_ValueToStates = "statesRef" + + public static val String ref_TraceToStates = "statesTrace" + + public static val String ref_StateToStep_started = "startedStepsRef" + + public static val String ref_StateToStep_ended = "endedStepsRef" + + public static val String ref_StepToState_starting = "startingStateRef" + + public static val String ref_StepToState_ending = "endingStateRef" + + static def String class_createTraceClassName(EClass runtimeClass) { return "Traced" + runtimeClass.name } + + static def String ref_createTraceClassToTracedClass(EClass tracedClass) { + return tracedClass.EPackage.name.toFirstLower + "_" + tracedClass.name.toFirstLower + "s" + } + + static def String class_createStateClassName(EClass runtimeClass, EStructuralFeature runtimeProperty) { + return runtimeClass.name + "_" + runtimeProperty.name + "_Value" + } + + static def String class_createDimensionClassName(EClass runtimeClass, EStructuralFeature runtimeProperty) { + return runtimeClass.name + "_" + runtimeProperty.name + "_Dimension" + } + + static def String ref_createTraceClassToValueClass(EStructuralFeature runtimeProperty) { + return runtimeProperty.name + "Sequence" + } + + static def String ref_createGlobalToState(EClass stateClass) { return stateClass.name.toFirstLower + "s" } + + static def String ref_createTraceClassToStepClass(EClass stepClass) { return stepClass.name + "_Sequence" } + + static def String package_createTracedPackage(EPackage runtimePackage) { + return runtimePackage.name + } + + static def String ref_OriginalObject_MultipleInheritance(EClass originalClass) { + return ref_OriginalObject + "_" + originalClass.name + } + +} diff --git a/trace/generator/pom.xml b/trace/generator/pom.xml index b0ac36283..4dde4caa0 100644 --- a/trace/generator/pom.xml +++ b/trace/generator/pom.xml @@ -2,34 +2,29 @@ 4.0.0 - org.gemoc.modeldebugging.trace.generator - org.gemoc.modeldebugging.trace.generator.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc.trace.generator + org.eclipse.gemoc.trace.generator.root + 2.3.0-SNAPSHOT pom - org.gemoc - org.gemoc.siriusanimation.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.root + 2.3.0-SNAPSHOT ../.. - plugins/fr.inria.diverse.ecorext - plugins/fr.inria.diverse.trace.gemoc - plugins/fr.inria.diverse.trace.gemoc.generator - plugins/fr.inria.diverse.trace.gemoc.generator.k3 - plugins/fr.inria.diverse.trace.gemoc.ui - plugins/fr.inria.diverse.trace.metamodel.generator - plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor - plugins/fr.inria.diverse.trace.plugin.generator - plugins/fr.inria.diverse.trace.annotations + plugins/org.eclipse.gemoc.trace.gemoc + plugins/org.eclipse.gemoc.trace.gemoc.generator + plugins/org.eclipse.gemoc.trace.gemoc.ui + plugins/org.eclipse.gemoc.trace.metamodel.generator + plugins/org.eclipse.gemoc.trace.annotations - - releng/org.gemoc.modeldebugging.trace.generator.feature - releng/org.gemoc.modeldebugging.trace.generator.updatesite + + releng/org.eclipse.gemoc.trace.generator.feature @@ -56,29 +51,17 @@ - - gemoc-studio_gemoc_commons on CI - p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_gemoc_commons/lastSuccessfulBuild/artifact/gemoc_commons/releng/org.gemoc.gemoc_commons.repository/target/repository/ - - - - - modelanimation_executionengine_java on CI - p2 - https://ci.inria.fr/gemoc/job/modelanimation_executionengine_java/lastSuccessfulBuild/artifact/java_execution/releng/org.gemoc.execution.sequential.java.repository/target/repository/ - gemoc-studio_commons on CI p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.gemoc.commons.repository/target/repository/ + https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.eclipse.gemoc.commons.repository/target/repository/ - - - diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.classpath b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.classpath new file mode 100644 index 000000000..eca7bdba8 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.project b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.project new file mode 100644 index 000000000..cb91a1342 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.project @@ -0,0 +1,28 @@ + + + org.eclipse.gemoc.addon.diffviewer + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.settings/org.eclipse.jdt.core.prefs b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..0c68a61dc --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/.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/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/META-INF/MANIFEST.MF b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/META-INF/MANIFEST.MF new file mode 100644 index 000000000..0338a49a9 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Diffviewer +Bundle-SymbolicName: org.eclipse.gemoc.addon.diffviewer;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.addon.diffviewer.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.gemoc.trace.gemoc.api;bundle-version="1.0.0", + org.eclipse.gemoc.trace.gemoc;bundle-version="1.0.0", + org.eclipse.gemoc.executionframework.ui, + org.eclipse.gemoc.xdsmlframework.api;bundle-version="0.1.0", + org.eclipse.emf.ecore.xmi, + org.eclipse.emf.compare, + org.eclipse.gemoc.trace.commons.model;bundle-version="2.3.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/build.properties b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/build.properties new file mode 100644 index 000000000..8b64bcac0 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/ diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/icons/IconeGemocModel-16.png b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/icons/IconeGemocModel-16.png similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.stategraph/icons/IconeGemocModel-16.png rename to trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/icons/IconeGemocModel-16.png diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/insp_sbook.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/icons/insp_sbook.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/insp_sbook.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/icons/insp_sbook.gif diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/icons/scoped_ovr.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/icons/scoped_ovr.gif new file mode 100644 index 000000000..5b9752392 Binary files /dev/null and b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/icons/scoped_ovr.gif differ diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/plugin.xml b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/plugin.xml new file mode 100644 index 000000000..84e84a94c --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/plugin.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/pom.xml b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/pom.xml new file mode 100644 index 000000000..d1ae50500 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + org.eclipse.gemoc.trace.manager + org.eclipse.gemoc.trace.manager.root + 2.3.0-SNAPSHOT + ../.. + + + org.eclipse.gemoc.addon.diffviewer + eclipse-plugin + 2.3.0-SNAPSHOT + \ No newline at end of file diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/Activator.java b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/Activator.java new file mode 100644 index 000000000..a2cbc0da7 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/Activator.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.diffviewer; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.addon.diffviewer"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/logic/Diff.java b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/logic/Diff.java new file mode 100644 index 000000000..7b8880fa8 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/logic/Diff.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.diffviewer.logic; + +public class Diff { + + public enum DiffKind { + SUBST, IN, DEL, EQ + } + + public final DiffKind kind; + + public final int idx1; + + public final int idx2; + + public Diff(DiffKind kind, int idx1, int idx2) { + this.kind = kind; + this.idx1 = idx1; + this.idx2 = idx2; + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/logic/DiffComputer.java b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/logic/DiffComputer.java new file mode 100644 index 000000000..2dfb7c918 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/logic/DiffComputer.java @@ -0,0 +1,554 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.diffviewer.logic; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Function; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import org.eclipse.emf.common.util.Monitor; +import org.eclipse.emf.compare.Comparison; +import org.eclipse.emf.compare.EMFCompare; +import org.eclipse.emf.compare.Match; +import org.eclipse.emf.compare.diff.DefaultDiffEngine; +import org.eclipse.emf.compare.diff.DiffBuilder; +import org.eclipse.emf.compare.diff.FeatureFilter; +import org.eclipse.emf.compare.diff.IDiffEngine; +import org.eclipse.emf.compare.diff.IDiffProcessor; +import org.eclipse.emf.compare.internal.spec.MatchSpec; +import org.eclipse.emf.compare.postprocessor.BasicPostProcessorDescriptorImpl; +import org.eclipse.emf.compare.postprocessor.IPostProcessor; +import org.eclipse.emf.compare.postprocessor.IPostProcessor.Descriptor.Registry; +import org.eclipse.emf.compare.postprocessor.PostProcessorDescriptorRegistryImpl; +import org.eclipse.emf.compare.scope.DefaultComparisonScope; +import org.eclipse.emf.compare.scope.IComparisonScope; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.gemoc.addon.diffviewer.logic.Diff.DiffKind; + +import org.eclipse.gemoc.trace.commons.model.trace.Value; +import javafx.util.Pair; + +@SuppressWarnings("restriction") +public class DiffComputer { + + @SuppressWarnings("rawtypes") + private Registry registry = null; + private IDiffEngine diffEngine = null; + private EMFCompare compare; + private IPostProcessor.Descriptor descriptor = null; + private boolean compareInitialized = false; + + private final List>, List>>> eqGroup = new ArrayList<>(); + private final List>, List>>> substGroup = new ArrayList<>(); + private final List>> inGroup = new ArrayList<>(); + private final List>> delGroup = new ArrayList<>(); + + private final List diffs = new ArrayList<>(); + + private void configureDiffEngine() { + IDiffProcessor diffProcessor = new DiffBuilder(); + diffEngine = new DefaultDiffEngine(diffProcessor) { + @Override + protected FeatureFilter createFeatureFilter() { + return new FeatureFilter() { + @Override + protected boolean isIgnoredReference(Match match, EReference reference) { + final String name = reference.getName(); + return name.equals("parent") || name.equals("states") || name.equals("statesNoOpposite"); + } + }; + } + }; + } + + private final IPostProcessor customPostProcessor = new IPostProcessor() { + + private final Function getIdFunction = e -> e.eClass().getName(); + + @Override + public void postMatch(Comparison comparison, Monitor monitor) { + final List matches = new ArrayList<>(comparison.getMatches()); + final List treatedMatches = new ArrayList<>(); + matches.forEach(m1 -> { + matches.forEach(m2 -> { + if (m1 != m2 && !treatedMatches.contains(m2)) { + final EObject left; + final EObject right; + if (m1.getLeft() != null && m1.getRight() == null && m2.getLeft() == null + && m2.getRight() != null) { + left = m1.getLeft(); + right = m2.getRight(); + } else if (m2.getLeft() != null && m2.getRight() == null && m1.getLeft() == null + && m1.getRight() != null) { + left = m2.getLeft(); + right = m1.getRight(); + } else { + return; + } + final String leftId = getIdFunction.apply(left); + final String rightId = getIdFunction.apply(right); + if (leftId.equals(rightId)) { + comparison.getMatches().remove(m1); + comparison.getMatches().remove(m2); + final Match match = new MatchSpec(); + match.setLeft(left); + match.setRight(right); + comparison.getMatches().add(match); + } + } + }); + treatedMatches.add(m1); + }); + } + + @Override + public void postDiff(Comparison comparison, Monitor monitor) { + } + + @Override + public void postRequirements(Comparison comparison, Monitor monitor) { + } + + @Override + public void postEquivalences(Comparison comparison, Monitor monitor) { + } + + @Override + public void postConflicts(Comparison comparison, Monitor monitor) { + } + + @Override + public void postComparison(Comparison comparison, Monitor monitor) { + } + }; + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public boolean compareEObjects(EObject e1, EObject e2) { + if (e1 == e2) { + return true; + } + + if (e1 == null || e2 == null) { + return false; + } + + if (e1.eClass() != e2.eClass()) { + return false; + } + + if (!compareInitialized) { + configureDiffEngine(); + descriptor = new BasicPostProcessorDescriptorImpl(customPostProcessor, Pattern.compile(".*"), null); + registry = new PostProcessorDescriptorRegistryImpl(); + registry.put(customPostProcessor.getClass().getName(), descriptor); + compare = EMFCompare.builder().setPostProcessorRegistry(registry).setDiffEngine(diffEngine).build(); + compareInitialized = true; + } + + final IComparisonScope scope = new DefaultComparisonScope(e1, e2, null); + final Comparison comparison = compare.compare(scope); + return comparison.getDifferences().isEmpty(); + } + + private boolean compareTraces(final List> trace1, final List> trace2) { + final int length1 = trace1.size(); + final int length2 = trace2.size(); + + if (length1 != length2) { + return false; + } + boolean result = true; + int i = 0; + while (i < length1 && result) { + result = compareEObjects(trace1.get(i), trace2.get(i)); + i++; + } + return result; + } + + private int computeDistanceBetweenTraces(final List> trace1, final List> trace2) { + final int[][] m = new int[trace1.size() + 1][trace2.size() + 1]; + + for (int i = 0; i < m.length; i++) { + m[i][0] = i; + } + for (int i = 1; i < m[0].length; i++) { + m[0][i] = i; + } + + final int[][] cost = new int[trace1.size()][trace2.size()]; + for (int i = 0; i < cost.length; i++) { + for (int j = 0; j < cost[0].length; j++) { + if (compareEObjects(trace1.get(i), trace2.get(j))) { + cost[i][j] = 0; + } else { + cost[i][j] = 1; + } + } + } + + int result = 0; + + for (int i = 1; i < m.length; i++) { + for (int j = 1; j < m[1].length; j++) { + final int deletion = m[i - 1][j] + 1; + final int insertion = m[i][j - 1] + 1; + final int substitution = m[i - 1][j - 1] + cost[i - 1][j - 1]; + result = Math.min(Math.min(insertion, deletion), substitution); + m[i][j] = result; + } + } + + return result; + } + + private Map matchTraces(final List>> traces1, List>> traces2) { + final Map> pairs = new HashMap<>(); + for (int i = 0; i < traces1.size(); i++) { + for (int j = 0; j < traces2.size(); j++) { + final int k = computeDistanceBetweenTraces(traces1.get(i), traces2.get(j)); + List l = pairs.get(k); + if (l == null) { + l = new ArrayList<>(); + pairs.put(k, l); + } + l.add(new int[] { i, j }); + } + } + + List distances = pairs.keySet().stream().sorted().collect(Collectors.toList()); + Map result = new HashMap<>(); + for (Integer d : distances) { + List l = pairs.get(d); + while (l != null && !l.isEmpty()) { + int[] p = l.remove(0); + result.put(p, d); + pairs.values().forEach(toClean -> toClean.removeIf(t -> t[0] == p[0] || t[1] == p[1])); + } + } + + return result; + } + + private EClass getTraceEClass(final List> trace) { + EClass result = null; + for (Value e : trace) { + if (e != null) { + result = e.eClass(); + break; + } + } + return result; + } + + public List getDiffs() { + return diffs; + } + + public List>, List>>> getEqGroup() { + return eqGroup; + } + + public List>, List>>> getSubstGroup() { + return substGroup; + } + + public List>> getInGroup() { + return inGroup; + } + + public List>> getDelGroup() { + return delGroup; + } + + public void loadTraces(final List>> traces1, final List>> traces2) { + final Map>>> traceGroups1 = new HashMap<>(); + final Map>>> traceGroups2 = new HashMap<>(); + diffs.clear(); + + for (List> trace : traces1) { + EClass eClass = getTraceEClass(trace); + if (eClass != null) { + List>> l = traceGroups1.get(eClass); + if (l == null) { + l = new ArrayList<>(); + traceGroups1.put(eClass, l); + } + l.add(trace); + } + } + + for (List> trace : traces2) { + final EClass eClass = getTraceEClass(trace); + if (eClass != null) { + List>> l = traceGroups2.get(eClass); + if (l == null) { + l = new ArrayList<>(); + traceGroups2.put(eClass, l); + } + l.add(trace); + } + } + + eqGroup.clear(); + substGroup.clear(); + inGroup.clear(); + delGroup.clear(); + + final Set classes = new HashSet<>(traceGroups1.keySet()); + classes.addAll(traceGroups2.keySet()); + final List classesSorted = classes.stream().sorted((e1, e2) -> e2.getName().compareTo(e1.getName())) + .collect(Collectors.toList()); + + final Map>, List>>, Integer> substGroupAccumulator = new HashMap<>(); + + for (EClass eClass : classesSorted) { + if (traceGroups1.containsKey(eClass) && traceGroups2.containsKey(eClass)) { + List>> traceGroup1 = traceGroups1.get(eClass); + List>> traceGroup2 = traceGroups2.get(eClass); + int i = 0; + int j = 0; + while (i < traceGroup1.size() && j < traceGroup2.size()) { + List> trace1 = traceGroup1.get(i); + List> trace2 = traceGroup2.get(j); + if (compareTraces(trace1, trace2)) { + traceGroup1.remove(i); + traceGroup2.remove(j); + j = 0; + eqGroup.add(new Pair<>(trace1, trace2)); + } else { + if (j < traceGroup2.size() - 1) { + j++; + } else { + i++; + j = 0; + } + } + } + if (!traceGroup1.isEmpty() && !traceGroup2.isEmpty()) { + for (Map.Entry pair : matchTraces(traceGroup1, traceGroup2).entrySet()) { + final List> t1 = traceGroup1.get(pair.getKey()[0]); + final List> t2 = traceGroup2.get(pair.getKey()[1]); + substGroupAccumulator.put(new Pair<>(t1, t2), pair.getValue()); + } + } + } + } + + delGroup.addAll(traces1); + inGroup.addAll(traces2); + + eqGroup.forEach(p -> { + inGroup.remove(p.getKey()); + inGroup.remove(p.getValue()); + delGroup.remove(p.getKey()); + delGroup.remove(p.getValue()); + }); + + for (Map.Entry>, List>>, Integer> e : substGroupAccumulator.entrySet().stream() + .sorted((e1, e2) -> { + return e1.getValue() - e2.getValue(); + }).collect(Collectors.toList())) { + substGroup.add(e.getKey()); + } + + substGroup.forEach(p -> { + inGroup.remove(p.getKey()); + inGroup.remove(p.getValue()); + delGroup.remove(p.getKey()); + delGroup.remove(p.getValue()); + }); + + List>> stateTrace1 = new ArrayList<>(); + List>> stateTrace2 = new ArrayList<>(); + + if (!substGroup.isEmpty()) { + List>> valuesTrace1 = new ArrayList<>(); + List>> valuesTrace2 = new ArrayList<>(); + + substGroup.forEach(p -> { + valuesTrace1.add(p.getKey()); + valuesTrace2.add(p.getValue()); + }); + + for (int i = 0; i < valuesTrace1.get(0).size(); i++) { + final List> stateValues = new ArrayList<>(); + for (List> l : valuesTrace1) { + stateValues.add(l.get(i)); + } + stateTrace1.add(stateValues); + } + + for (int i = 0; i < valuesTrace2.get(0).size(); i++) { + final List> stateValues = new ArrayList<>(); + for (List> l : valuesTrace2) { + stateValues.add(l.get(i)); + } + stateTrace2.add(stateValues); + } + + final List>> allStates = new ArrayList<>(stateTrace1); + allStates.addAll(stateTrace2); + + List>>> equivalenceClasses = computeEquivalenceClasses(allStates); + diffs.addAll(computeDiff(stateTrace1, stateTrace2, equivalenceClasses)); + } else { + eqGroup.stream().findAny().ifPresent(p -> { + for (int i = 0; i < p.getKey().size(); i++) { + diffs.add(new Diff(DiffKind.EQ, i, i)); + } + }); + } + } + + private List>>> computeEquivalenceClasses(final List>> states) { + final List>, List>> stateToValueIndexes = new ArrayList<>(); + final List> observedValues = new ArrayList<>(); + + for (List> state : states) { + final List valueIndexes = new ArrayList<>(); + stateToValueIndexes.add(new Pair<>(state, valueIndexes)); + for (int i = 0; i < state.size(); i++) { + final Value value = state.get(i); + int idx = -1; + for (int j = 0; j < observedValues.size(); j++) { + final Value v1 = observedValues.get(j); + final Value v2 = value; + if (compareEObjects(v1, v2)) { + idx = j; + break; + } + } + if (idx != -1) { + valueIndexes.add(idx); + } else { + valueIndexes.add(observedValues.size()); + observedValues.add(value); + } + } + } + + final List> distinctClasses = stateToValueIndexes.stream() + .map(p -> p.getValue()).distinct().collect(Collectors.toList()); + final Map>>> result = new HashMap<>(); + + stateToValueIndexes.forEach(p -> { + final List> state = p.getKey(); + final List indexes = p.getValue(); + int v = distinctClasses.indexOf(indexes); + List>> equivalentStates = result.get(v); + if (equivalentStates == null) { + equivalentStates = new ArrayList<>(); + result.put(v, equivalentStates); + } + if (equivalentStates.isEmpty()) { + equivalentStates.add(state); + } else { + if (states.indexOf(state) < states.indexOf(equivalentStates.get(0))) { + equivalentStates.add(0, state); + } else { + equivalentStates.add(state); + } + } + }); + + return result.values().stream().collect(Collectors.toList()); + } + + private int[][] alignTraces(final List>> states1, final List>> states2, + final Collection>>> classes) { + final Map>, List>>> stateToEquivalentStates = new HashMap<>(); + classes.forEach(l -> { + l.forEach(s -> { + final List>> equivalentStates = new ArrayList<>(l); + equivalentStates.remove(s); + stateToEquivalentStates.put(s, equivalentStates); + }); + }); + + final int[][] m = new int[states1.size() + 1][states2.size() + 1]; + + for (int i = 0; i < m.length; i++) { + m[i][0] = i; + } + for (int i = 1; i < m[0].length; i++) { + m[0][i] = i; + } + + final int[][] cost = new int[states1.size()][states2.size()]; + for (int i = 0; i < cost.length; i++) { + for (int j = 0; j < cost[0].length; j++) { + final List> s1 = states1.get(i); + final List> s2 = states2.get(j); + final List>> equivalentStates = stateToEquivalentStates.get(s1); + if (equivalentStates.contains(s2)) { + cost[i][j] = 0; + } else { + cost[i][j] = 1; + } + } + } + + for (int i = 1; i < m.length; i++) { + for (int j = 1; j < m[1].length; j++) { + final int deletion = m[i - 1][j] + 1; + final int insertion = m[i][j - 1] + 1; + final int substitution = m[i - 1][j - 1] + cost[i - 1][j - 1]; + m[i][j] = Math.min(Math.min(insertion, deletion), substitution); + } + } + + return m; + } + + public List computeDiff(final List>> states1, final List>> states2, + final Collection>>> classes) { + final int[][] comparisonMatrix = alignTraces(states1, states2, classes); + final int[][] highlightedCells = new int[comparisonMatrix.length][comparisonMatrix[0].length]; + int i = comparisonMatrix.length - 1; + int j = comparisonMatrix[0].length - 1; + List diffs = new ArrayList<>(); + while (i > 0 && j > 0) { + final int current = comparisonMatrix[i][j]; + final int deletion = comparisonMatrix[i - 1][j]; + final int insertion = comparisonMatrix[i][j - 1]; + final int substitution = comparisonMatrix[i - 1][j - 1]; + final int min = Math.min(deletion, Math.min(insertion, substitution)); + highlightedCells[i][j] = 1; + if (min == substitution) { + diffs.add(new Diff(current == substitution ? DiffKind.EQ : DiffKind.SUBST, i - 1, j - 1)); + i--; + j--; + } else if (min == deletion) { + diffs.add(new Diff(DiffKind.DEL, i - 1, j - 1)); + i--; + } else { + diffs.add(new Diff(DiffKind.IN, i - 1, j - 1)); + j--; + } + } + // Since we added the i and j indexes in reverse order, + // we get them in the right order after the reverse. + Collections.reverse(diffs); + + return diffs; + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TimelineDiffViewerRenderer.java b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TimelineDiffViewerRenderer.java new file mode 100644 index 000000000..9a6f29ac8 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TimelineDiffViewerRenderer.java @@ -0,0 +1,644 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.diffviewer.views; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.gemoc.addon.diffviewer.logic.Diff; +import org.eclipse.gemoc.addon.diffviewer.logic.Diff.DiffKind; +import org.eclipse.gemoc.addon.diffviewer.logic.DiffComputer; + +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.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.Value; +import org.eclipse.gemoc.trace.gemoc.api.ITraceExtractor; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.Cursor; +import javafx.scene.Node; +import javafx.scene.control.Label; +import javafx.scene.control.OverrunStyle; +import javafx.scene.control.ScrollBar; +import javafx.scene.control.ScrollPane; +import javafx.scene.control.Tooltip; +import javafx.scene.layout.Background; +import javafx.scene.layout.BackgroundFill; +import javafx.scene.layout.Border; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Pane; +import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; +import javafx.scene.paint.Color; +import javafx.scene.paint.Paint; +import javafx.scene.shape.Polygon; +import javafx.scene.shape.Rectangle; +import javafx.scene.text.Font; +import javafx.scene.text.FontWeight; +import javafx.util.Pair; + +public class TimelineDiffViewerRenderer extends Pane { + + private static final int H_MARGIN = 8; + private static final int V_MARGIN = 2; + private static final int WIDTH = 24; + private static final int UNIT = WIDTH + H_MARGIN * 2; + + private static final Insets HALF_MARGIN_INSETS = new Insets(V_MARGIN, H_MARGIN / 2, V_MARGIN, H_MARGIN / 2); + private static final Insets MARGIN_INSETS = new Insets(V_MARGIN, H_MARGIN, V_MARGIN, H_MARGIN); + + private static final Paint LINE_PAINT = new Color(Color.LIGHTGRAY.getRed(), Color.LIGHTGRAY.getGreen(), + Color.LIGHTGRAY.getBlue(), 0.5); + + private static final Background LINE_BACKGROUND = new Background(new BackgroundFill(LINE_PAINT, null, null)); + private static final Background HEADER_BACKGROUND = new Background(new BackgroundFill(Color.LIGHTGRAY, null, null)); + private static final Background WHITE_BACKGROUND = new Background(new BackgroundFill(Color.WHITE, null, null)); + private static final Background TRANSPARENT_BACKGROUND = new Background( + new BackgroundFill(Color.TRANSPARENT, null, null)); + + private static final Font STATE_FONT = Font.font("Arial", FontWeight.BOLD, 9); + private static final Font VALUE_FONT = Font.font("Arial", FontWeight.BOLD, 11); + private static final Font GROUP_FONT = Font.font("Arial", FontWeight.BOLD, 12); + + private final VBox rootVBox = new VBox(); + private final HBox line1 = new HBox(); + private final HBox line2 = new HBox(); + private final VBox eqLines = new VBox(); + private final VBox eqBox = new VBox(); + private final VBox substLines = new VBox(); + private final VBox substBox = new VBox(); + private final VBox inLines = new VBox(); + private final VBox inBox = new VBox(); + private final VBox delLines = new VBox(); + private final VBox delBox = new VBox(); + private final ScrollBar scrollBar = new ScrollBar(); + + private final IntegerProperty nbDisplayableStates; + private final IntegerProperty statesRange; + private final IntegerProperty nbStates; + + private int currentState = 0; + + final Map>> lineToSegments = new HashMap<>(); + final Map> segmentToDescription = new HashMap<>(); + final Map>, String> dimensionDescriptions = new HashMap<>(); + + private ITraceExtractor, State, TracedObject, Dimension, Value> extractor1 = null; + private ITraceExtractor, State, TracedObject, Dimension, Value> extractor2 = null; + + private final List>> values1 = new ArrayList<>(); + private final List>> values2 = new ArrayList<>(); + + private final List> states1 = new ArrayList<>(); + private final List> states2 = new ArrayList<>(); + + private DiffComputer diffComputer; + + public TimelineDiffViewerRenderer() { + + nbStates = new SimpleIntegerProperty(); + statesRange = new SimpleIntegerProperty(); + nbDisplayableStates = new SimpleIntegerProperty(); + nbDisplayableStates.bind(widthProperty().divide(UNIT)); + statesRange.bind(nbStates.subtract(nbDisplayableStates)); + + nbDisplayableStates.addListener((v, o, n) -> { + refresh(); + }); + + setupBox(eqBox, "Toggle identical traces", eqLines); + setupBox(substBox, "Toggle similar traces", substLines); + setupBox(inBox, "Toggle inserted traces", inLines); + setupBox(delBox, "Toggle deleted traces", delLines); + + ScrollPane scrollPane = new ScrollPane(rootVBox); + scrollPane.minWidthProperty().bind(widthProperty()); + scrollPane.maxWidthProperty().bind(widthProperty()); + scrollPane.prefWidthProperty().bind(widthProperty()); + scrollPane.setFitToWidth(true); + scrollPane.setBorder(Border.EMPTY); + + VBox headerPane = new VBox(); + headerPane.minWidthProperty().bind(widthProperty()); + headerPane.maxWidthProperty().bind(widthProperty()); + headerPane.setBackground(HEADER_BACKGROUND); + + scrollPane.translateYProperty().bind(headerPane.heightProperty()); + scrollPane.maxHeightProperty().bind(heightProperty().subtract(headerPane.heightProperty())); + + getChildren().add(headerPane); + getChildren().add(scrollPane); + minHeightProperty().bind(headerPane.heightProperty().add(scrollPane.heightProperty())); + prefHeightProperty().bind(headerPane.heightProperty().add(scrollPane.heightProperty())); + maxHeightProperty().bind(headerPane.heightProperty().add(scrollPane.heightProperty())); + + scrollBar.setVisibleAmount(1); + scrollBar.setBlockIncrement(10); + scrollBar.setMin(0); + scrollBar.disableProperty().bind(statesRange.lessThanOrEqualTo(0)); + scrollBar.maxProperty().bind(statesRange); + scrollBar.valueProperty().addListener((v, o, n) -> { + if (o.intValue() != n.intValue() && n.intValue() != currentState) { + currentState = n.intValue(); + refresh(); + } + }); + + headerPane.getChildren().add(scrollBar); + headerPane.getChildren().add(line1); + headerPane.getChildren().add(line2); + + setBackground(WHITE_BACKGROUND); + scrollPane.setBackground(WHITE_BACKGROUND); + rootVBox.setBackground(WHITE_BACKGROUND); + } + + private void setupBox(VBox box, String labelString, VBox content) { + final HBox boxLabel = new HBox(); + final Polygon arrow = new Polygon(2.5, 10, 10, 5, 2.5, 0); + final Label label = new Label(labelString); + boxLabel.setBackground(HEADER_BACKGROUND); + label.setFont(GROUP_FONT); + HBox.setMargin(arrow, HALF_MARGIN_INSETS); + boxLabel.setAlignment(Pos.CENTER_LEFT); + boxLabel.getChildren().addAll(arrow, label); + boxLabel.setCursor(Cursor.HAND); + box.getChildren().add(boxLabel); + boxLabel.setOnMouseClicked(e -> { + if (box.getChildren().size() > 1) { + box.getChildren().remove(content); + arrow.setRotate(0); + } else { + box.getChildren().add(content); + arrow.setRotate(90); + } + }); + } + + private String computeStateLabel(int stateNumber) { + if (stateNumber > 999) { + return (stateNumber / 1000) + "k" + ((stateNumber % 1000) / 10); + } else { + return "" + stateNumber; + } + } + + private void addState(State state, HBox line, Color color, int stateIndex, String stateDescription) { + final Rectangle rectangle = new Rectangle(WIDTH, WIDTH, color); + rectangle.setArcHeight(WIDTH); + rectangle.setArcWidth(WIDTH); + rectangle.setUserData(state); + Label text = new Label(computeStateLabel(stateIndex)); + text.setTextOverrun(OverrunStyle.ELLIPSIS); + text.setAlignment(Pos.CENTER); + text.setMouseTransparent(true); + text.setTextFill(Color.WHITE); + text.setFont(STATE_FONT); + text.setMaxWidth(WIDTH); + final Tooltip tooltip = new Tooltip(stateDescription); + Tooltip.install(rectangle, tooltip); + StackPane layout = new StackPane(); + StackPane.setMargin(rectangle, MARGIN_INSETS); + layout.getChildren().addAll(rectangle, text); + line.getChildren().add(layout); + } + + private void addBlankState(HBox line) { + final Rectangle rectangle = new Rectangle(WIDTH, WIDTH, Color.TRANSPARENT); + HBox.setMargin(rectangle, MARGIN_INSETS); + line.getChildren().add(rectangle); + } + + private void addValue(Value value, HBox line, String description, boolean newValue, DiffKind diffKind) { + final List> segments = lineToSegments.get(line); + List segment; + boolean addDescription = false; + if (segments.isEmpty()) { + segment = new ArrayList<>(); + addDescription = true; + segments.add(segment); + } else { + if (newValue) { + segment = new ArrayList<>(); + addDescription = true; + segments.add(segment); + } else { + segment = segments.get(segments.size() - 1); + if (segment == null) { + segment = new ArrayList<>(); + addDescription = true; + segments.add(segment); + } + } + + } + if (addDescription) { + List descriptions = segmentToDescription.get(line); + if (descriptions == null) { + descriptions = new ArrayList<>(); + segmentToDescription.put(line, descriptions); + } + descriptions.add(description); + } + segment.add(diffKind); + } + + private void addValue(Value value, HBox line, String description, boolean newValue) { + addValue(value, line, description, newValue, DiffKind.EQ); + } + + private void addDelayedValue(HBox line, String description) { + final List> segments = lineToSegments.get(line); + final List segment; + boolean addDescription = false; + if (segments.isEmpty()) { + segment = new ArrayList<>(); + addDescription = true; + segments.add(segment); + } else { + segment = segments.get(segments.size() - 1); + } + if (addDescription) { + List descriptions = segmentToDescription.get(line); + if (descriptions == null) { + descriptions = new ArrayList<>(); + segmentToDescription.put(line, descriptions); + } + descriptions.add(description); + } + segment.add(DiffKind.DEL); + } + + private void addBlankValue(HBox line) { + lineToSegments.get(line).add(null); + } + + private List> normalizeValueTrace(List> trace, int start, int end, ITraceExtractor, State, TracedObject, Dimension, Value> extractor) { + final List> result = new ArrayList<>(); + for (Value w : trace) { + final int firstStateIndex = extractor.getValueFirstStateIndex(w); + final int lastStateIndex = extractor.getValueLastStateIndex(w); + while (result.size() < firstStateIndex - start) { + result.add(null); + } + for (int i = Math.max(firstStateIndex, start); i <= Math.min(lastStateIndex, end); i++) { + result.add(w); + } + } + return result; + } + + public void loadTraces(final ITraceExtractor, State, TracedObject, Dimension, Value> extractor1, + final ITraceExtractor, State, TracedObject, Dimension, Value> extractor2) { + loadTraces(extractor1, extractor2, 0, 0, extractor1.getStatesTraceLength() - 1, extractor2.getStatesTraceLength() - 1); + } + + public void loadTraces(final ITraceExtractor, State, TracedObject, Dimension, Value> extractor1, + final ITraceExtractor, State, TracedObject, Dimension, Value> extractor2, int s1, int s2, int e1, int e2) { + this.extractor1 = extractor1; + this.extractor2 = extractor2; + values1.clear(); + values2.clear(); + states1.clear(); + states2.clear(); + dimensionDescriptions.clear(); + + states1.addAll(extractor1.getStates(s1, e1)); + for (Dimension dimension : this.extractor1.getDimensions()) { + final List> values = extractor1.getValuesForStates(dimension, s1, e1); + final List> normalizedValues = normalizeValueTrace(values, s1, e1, extractor1); + while (normalizedValues.size() < e1 - s1 + 1) { + normalizedValues.add(null); + } + values1.add(normalizedValues); + dimensionDescriptions.put(normalizedValues, extractor1.getDimensionLabel(dimension)); + } + + states2.addAll(extractor2.getStates(s2, e2)); + for (Dimension dimension : this.extractor2.getDimensions()) { + final List> values = extractor2.getValuesForStates(dimension, s2, e2); + final List> normalizedValues = normalizeValueTrace(values, s2, e2, extractor2); + while (normalizedValues.size() < e2 - s2 + 1) { + normalizedValues.add(null); + } + values2.add(normalizedValues); + dimensionDescriptions.put(normalizedValues, extractor1.getDimensionLabel(dimension)); + } + + diffComputer = new DiffComputer(); + diffComputer.loadTraces(values1, values2); + nbStates.set(diffComputer.getDiffs().size()); + currentState = 0; + scrollBar.setValue(0); + + refresh(); + } + + private boolean isNewValue(int idx, List> list) { + return idx == 0 || (idx < list.size() && idx > 0 && list.get(idx - 1) != list.get(idx)); + } + + private void fillGap(HBox line, List> trace, int idx, String description) { + if (idx > 0 && idx < trace.size()) { + if (trace.get(idx - 1) != null || (idx < trace.size() - 1 && trace.get(idx + 1) != null)) { + addDelayedValue(line, description); + } else { + addBlankValue(line); + } + } else { + addBlankValue(line); + } + } + + public void refresh() { + if (diffComputer != null) { + line1.getChildren().clear(); + line2.getChildren().clear(); + eqLines.getChildren().clear(); + substLines.getChildren().clear(); + inLines.getChildren().clear(); + delLines.getChildren().clear(); + lineToSegments.clear(); + rootVBox.getChildren().clear(); + + final List>, List>>> eqGroup = diffComputer.getEqGroup(); + final List>, List>>> substGroup = diffComputer.getSubstGroup(); + final List>> inGroup = diffComputer.getInGroup(); + final List>> delGroup = diffComputer.getDelGroup(); + + if (!eqGroup.isEmpty()) { + rootVBox.getChildren().add(eqBox); + } + + if (!substGroup.isEmpty()) { + rootVBox.getChildren().add(substBox); + } + + if (!inGroup.isEmpty()) { + rootVBox.getChildren().add(inBox); + } + + if (!delGroup.isEmpty()) { + rootVBox.getChildren().add(delBox); + } + + final Map>, HBox> traceToLine = new HashMap<>(); + + int c = 0; + + for (Pair>, List>> e : eqGroup) { + final VBox pairBox = new VBox(); + final HBox trace1Box = new HBox(); + final HBox trace2Box = new HBox(); + traceToLine.put(e.getKey(), trace1Box); + traceToLine.put(e.getValue(), trace2Box); + lineToSegments.put(trace1Box, new ArrayList<>()); + lineToSegments.put(trace2Box, new ArrayList<>()); + Label l1 = new Label(dimensionDescriptions.get(e.getKey())); + Label l2 = new Label(dimensionDescriptions.get(e.getValue())); + VBox.setMargin(l1, HALF_MARGIN_INSETS); + VBox.setMargin(l2, HALF_MARGIN_INSETS); + l1.setFont(VALUE_FONT); + l2.setFont(VALUE_FONT); + pairBox.getChildren().addAll(l1, trace1Box, l2, trace2Box); + eqLines.getChildren().add(pairBox); + pairBox.setBackground(c % 2 == 0 ? LINE_BACKGROUND : WHITE_BACKGROUND); + trace1Box.setBackground(TRANSPARENT_BACKGROUND); + trace2Box.setBackground(TRANSPARENT_BACKGROUND); + c++; + } + + for (Pair>, List>> e : substGroup) { + final VBox pairBox = new VBox(); + final HBox trace1Box = new HBox(); + final HBox trace2Box = new HBox(); + traceToLine.put(e.getKey(), trace1Box); + traceToLine.put(e.getValue(), trace2Box); + lineToSegments.put(trace1Box, new ArrayList<>()); + lineToSegments.put(trace2Box, new ArrayList<>()); + Label l1 = new Label(dimensionDescriptions.get(e.getKey())); + Label l2 = new Label(dimensionDescriptions.get(e.getValue())); + VBox.setMargin(l1, HALF_MARGIN_INSETS); + VBox.setMargin(l2, HALF_MARGIN_INSETS); + l1.setFont(VALUE_FONT); + l2.setFont(VALUE_FONT); + pairBox.getChildren().addAll(l1, trace1Box, l2, trace2Box); + substLines.getChildren().add(pairBox); + pairBox.setBackground(c % 2 == 0 ? LINE_BACKGROUND : WHITE_BACKGROUND); + trace1Box.setBackground(TRANSPARENT_BACKGROUND); + trace2Box.setBackground(TRANSPARENT_BACKGROUND); + c++; + } + + for (List> in : inGroup) { + final VBox inVBox = new VBox(); + final HBox traceBox = new HBox(); + traceToLine.put(in, traceBox); + lineToSegments.put(traceBox, new ArrayList<>()); + Label l = new Label(dimensionDescriptions.get(in)); + VBox.setMargin(l, HALF_MARGIN_INSETS); + l.setFont(VALUE_FONT); + inVBox.getChildren().addAll(l, traceBox); + inLines.getChildren().add(inVBox); + traceBox.setBackground(c % 2 == 0 ? LINE_BACKGROUND : WHITE_BACKGROUND); + c++; + } + + for (List> del : delGroup) { + final VBox delVBox = new VBox(); + final HBox traceBox = new HBox(); + traceToLine.put(del, traceBox); + lineToSegments.put(traceBox, new ArrayList<>()); + Label l = new Label(dimensionDescriptions.get(del)); + VBox.setMargin(l, HALF_MARGIN_INSETS); + l.setFont(VALUE_FONT); + delVBox.getChildren().addAll(l, traceBox); + delLines.getChildren().add(delVBox); + traceBox.setBackground(c % 2 == 0 ? LINE_BACKGROUND : WHITE_BACKGROUND); + c++; + } + + final List diffs = diffComputer.getDiffs(); + for (Diff diff : diffs.subList(currentState, + Math.min(currentState + nbDisplayableStates.intValue(), diffs.size()))) { + int i = diff.idx1; + int j = diff.idx2; + switch (diff.kind) { + case EQ: { + final State state1 = states1.get(i); + final State state2 = states2.get(j); + addState(state1, line1, Color.SLATEBLUE, extractor1.getStateIndex(state1), extractor1.getStateDescription(state1)); + addState(state2, line2, Color.SLATEBLUE, extractor2.getStateIndex(state2), extractor2.getStateDescription(state2)); + for (Pair>, List>> e : eqGroup) { + final List> t1 = e.getKey(); + final List> t2 = e.getValue(); + final Value v1 = t1.get(i); + final Value v2 = t2.get(j); + String d1 = extractor1.getValueDescription(v1); + String d2 = extractor2.getValueDescription(v2); + addValue(v1, traceToLine.get(t1), d1, isNewValue(i, t1)); + addValue(v2, traceToLine.get(t2), d2, isNewValue(j, t2)); + } + for (Pair>, List>> e : substGroup) { + final List> t1 = e.getKey(); + final List> t2 = e.getValue(); + final Value v1 = t1.get(i); + final Value v2 = t2.get(j); + String d1 = extractor1.getValueDescription(v1); + String d2 = extractor2.getValueDescription(v2); + addValue(v1, traceToLine.get(t1), d1, isNewValue(i, t1)); + addValue(v2, traceToLine.get(t2), d2, isNewValue(j, t2)); + } + for (List> del : delGroup) { + String d = extractor1.getValueDescription(del.get(i)); + addValue(del.get(i), traceToLine.get(del), d, isNewValue(i, del)); + } + for (List> in : inGroup) { + String d = extractor2.getValueDescription(in.get(j)); + addValue(in.get(j), traceToLine.get(in), d, isNewValue(j, in)); + } + break; + } + case SUBST: { + final State state1 = states1.get(i); + final State state2 = states2.get(j); + addState(state1, line1, Color.TOMATO, extractor1.getStateIndex(state1), extractor1.getStateDescription(state1)); + addState(state2, line2, Color.TOMATO, extractor2.getStateIndex(state2), extractor2.getStateDescription(state2)); + for (Pair>, List>> e : eqGroup) { + final List> t1 = e.getKey(); + final List> t2 = e.getValue(); + String d1 = extractor1.getValueDescription(t1.get(i)); + String d2 = extractor2.getValueDescription(t2.get(j)); + addValue(t1.get(i), traceToLine.get(t1), d1, isNewValue(i, t1)); + addValue(t2.get(j), traceToLine.get(t2), d2, isNewValue(j, t2)); + } + for (Pair>, List>> e : substGroup) { + final List> t1 = e.getKey(); + final List> t2 = e.getValue(); + String d1 = extractor1.getValueDescription(t1.get(i)); + String d2 = extractor2.getValueDescription(t2.get(j)); + if (diffComputer.compareEObjects(t1.get(i), t2.get(j))) { + addValue(t1.get(i), traceToLine.get(t1), d1, isNewValue(i, t1)); + addValue(t2.get(j), traceToLine.get(t2), d2, isNewValue(j, t2)); + } else { + addValue(t1.get(i), traceToLine.get(t1), d1, isNewValue(i, t1), DiffKind.SUBST); + addValue(t2.get(j), traceToLine.get(t2), d2, isNewValue(j, t2), DiffKind.SUBST); + } + } + for (List> del : delGroup) { + String d = extractor1.getValueDescription(del.get(i)); + addValue(del.get(i), traceToLine.get(del), d, isNewValue(i, del)); + } + for (List> in : inGroup) { + String d = extractor2.getValueDescription(in.get(j)); + addValue(in.get(j), traceToLine.get(in), d, isNewValue(j, in)); + } + break; + } + case DEL: { + final State state1 = states1.get(i); + addState(state1, line1, Color.BROWN, extractor1.getStateIndex(state1), extractor1.getStateDescription(state1)); + addBlankState(line2); + for (Pair>, List>> e : eqGroup) { + final List> t1 = e.getKey(); + final List> t2 = e.getValue(); + String d1 = extractor1.getValueDescription(t1.get(i)); + String d2 = extractor2.getValueDescription(t2.get(j)); + addValue(t1.get(i), traceToLine.get(t1), d1, isNewValue(i, t1)); + fillGap(traceToLine.get(t2), t2, j, d2); + } + for (Pair>, List>> e : substGroup) { + final List> t1 = e.getKey(); + final List> t2 = e.getValue(); + String d1 = extractor1.getValueDescription(t1.get(i)); + String d2 = extractor2.getValueDescription(t2.get(j)); + addValue(t1.get(i), traceToLine.get(t1), d1, isNewValue(i, t1)); + fillGap(traceToLine.get(t2), t2, j, d2); + } + for (List> del : delGroup) { + String d = extractor1.getValueDescription(del.get(i)); + addValue(del.get(i), traceToLine.get(del), d, isNewValue(i, del)); + } + for (List> in : inGroup) { + String d = extractor2.getValueDescription(in.get(j)); + fillGap(traceToLine.get(in), in, j, d); + } + break; + } + case IN: { + final State state2 = states2.get(i); + addBlankState(line1); + addState(state2, line2, Color.BROWN, extractor2.getStateIndex(state2), extractor2.getStateDescription(state2)); + for (Pair>, List>> e : eqGroup) { + final List> t1 = e.getKey(); + final List> t2 = e.getValue(); + String d1 = extractor1.getValueDescription(t1.get(i)); + String d2 = extractor2.getValueDescription(t2.get(j)); + fillGap(traceToLine.get(t1), t1, i, d1); + addValue(t2.get(j), traceToLine.get(t2), d2, isNewValue(j, t2)); + } + for (Pair>, List>> e : substGroup) { + final List> t1 = e.getKey(); + final List> t2 = e.getValue(); + String d1 = extractor1.getValueDescription(t1.get(i)); + String d2 = extractor2.getValueDescription(t2.get(j)); + fillGap(traceToLine.get(t1), t1, i, d1); + addValue(t2.get(j), traceToLine.get(t2), d2, isNewValue(j, t2)); + } + for (List> del : delGroup) { + String d = extractor1.getValueDescription(del.get(i)); + fillGap(traceToLine.get(del), del, i, d); + } + for (List> in : inGroup) { + String d = extractor2.getValueDescription(in.get(j)); + addValue(in.get(j), traceToLine.get(in), d, isNewValue(j, in)); + } + break; + } + } + } + processSegments(); + } + } + + private void processSegments() { + for (Map.Entry>> e : lineToSegments.entrySet()) { + final HBox line = e.getKey(); + final List descriptions = segmentToDescription.get(line); + final List children = line.getChildren(); + final List> segments = e.getValue(); + int idx = 0; + for (List segment : segments) { + if (segment == null) { + final Rectangle rectangle = new Rectangle(WIDTH, 8, Color.TRANSPARENT); + HBox.setMargin(rectangle, MARGIN_INSETS); + children.add(rectangle); + } else { + DiffKind[] seg = new DiffKind[segment.size()]; + for (int i = 0; i < seg.length; i++) { + seg[i] = segment.get(i); + } + final String description = descriptions.get(idx); + final ValueView view = new ValueView(description, seg); + HBox.setMargin(view, MARGIN_INSETS); + children.add(view); + idx++; + } + } + } + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TimelineDiffViewerViewPart.java b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TimelineDiffViewerViewPart.java new file mode 100644 index 000000000..f7c096d90 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TimelineDiffViewerViewPart.java @@ -0,0 +1,193 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.addon.diffviewer.views; + +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.Platform; +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.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.part.ViewPart; +import org.eclipse.gemoc.executionframework.ui.views.engine.actions.AbstractEngineAction; +import org.eclipse.gemoc.addon.diffviewer.Activator; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; + +import org.eclipse.gemoc.trace.gemoc.api.ITraceExtractor; +import org.eclipse.gemoc.trace.gemoc.traceaddon.AbstractTraceAddon; +import javafx.embed.swt.FXCanvas; +import javafx.scene.Scene; + +public class TimelineDiffViewerViewPart extends ViewPart { + + public static final String ID = "org.eclipse.gemoc.addon.diffviewer.views.TimelineDiffViewerRenderer"; + + private FXCanvas fxCanvas; + + private TimelineDiffViewerRenderer diffViewer; + + private ITraceExtractor extractor1; + private ITraceExtractor extractor2; + + @Override + public void createPartControl(Composite parent) { + fxCanvas = new FXCanvas(parent, SWT.NONE); + diffViewer = new TimelineDiffViewerRenderer(); + Scene scene = new Scene(diffViewer); + fxCanvas.setScene(scene); + parent.getShell().addListener(SWT.Resize, (e) -> { + diffViewer.refresh(); + }); + buildMenu(parent.getShell()); + } + + private void buildMenu(Shell shell) { + addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { + private FileDialog fileDialog; + + @Override + protected void init() { + super.init(); + setText("Compare Traces"); + setToolTipText("Compare Traces"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/insp_sbook.gif"); + setImageDescriptor(id); + setEnabled(true); + + fileDialog = new FileDialog(shell, SWT.OPEN); + fileDialog.setFilterExtensions(new String[] { "*.trace" }); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + fileDialog.setText("Choose a first trace to load"); + String filePath1 = fileDialog.open(); + if (filePath1 != null && !filePath1.equals("")) { + fileDialog.setText("Choose a second trace to load"); + String filePath2 = fileDialog.open(); + if (filePath2 != null && !filePath2.equals("")) { + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("trace", new XMIResourceFactoryImpl()); + + // Obtain a new resource set + ResourceSet resSet = new ResourceSetImpl(); + + // Get the resources + URI filePath1URI = URI.createFileURI(filePath1); + Resource traceResource1 = resSet.getResource(filePath1URI, true); + EcoreUtil.resolveAll(traceResource1); + URI filePath2URI = URI.createFileURI(filePath2); + Resource traceResource2 = resSet.getResource(filePath2URI, true); + EcoreUtil.resolveAll(traceResource2); + + AbstractTraceAddon newTraceAddon = null; + try { + IExtensionRegistry extReg = Platform.getExtensionRegistry(); + IExtensionPoint ep = extReg + .getExtensionPoint("org.gemoc.gemoc_language_workbench.engine_addon"); + IExtension[] extensions = ep.getExtensions(); + for (int i = 0; i < extensions.length && newTraceAddon == null; i++) { + IExtension ext = extensions[i]; + IConfigurationElement[] confElements = ext.getConfigurationElements(); + for (int j = 0; j < confElements.length; j++) { + IConfigurationElement confElement = confElements[j]; + String attr = confElement.getAttribute("Class"); + if (attr != null) { + Object obj = confElement.createExecutableExtension("Class"); + if (obj instanceof AbstractTraceAddon) { + AbstractTraceAddon obj_cast = (AbstractTraceAddon) obj; + if (obj_cast.isAddonForTrace(traceResource1.getContents().get(0)) + && obj_cast.isAddonForTrace(traceResource2.getContents().get(0))) { + newTraceAddon = obj_cast; + break; + } + } + } + } + } + } catch (CoreException e) { + e.printStackTrace(); + } + + if (newTraceAddon != null) { + newTraceAddon.load(traceResource1); + extractor1 = newTraceAddon.getTraceExtractor(); + newTraceAddon.load(traceResource2); + extractor2 = newTraceAddon.getTraceExtractor(); + diffViewer.loadTraces(extractor1, extractor2); + } + } + } + } + }); + + addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { + @Override + protected void init() { + super.init(); + setText("Select Trace Sections"); + setToolTipText("Select Trace Sections"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/scoped_ovr.gif"); + setImageDescriptor(id); + setEnabled(true); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + TraceSectionsDialog dialog = new TraceSectionsDialog(shell, extractor1, extractor2); + dialog.open(); + if (dialog.getReturnCode() == Window.OK) { + diffViewer.loadTraces(extractor1, extractor2, dialog.getS1(), dialog.getS2(), dialog.getE1(), + dialog.getE2()); + } + } + }); + } + + private void addActionToToolbar(Action action) { + IActionBars actionBars = getViewSite().getActionBars(); + IToolBarManager toolBar = actionBars.getToolBarManager(); + toolBar.add(action); + } + + @Override + public void setFocus() { + if (fxCanvas != null) { + fxCanvas.setFocus(); + } + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TraceSectionsDialog.java b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TraceSectionsDialog.java new file mode 100644 index 000000000..6345dff74 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/TraceSectionsDialog.java @@ -0,0 +1,165 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.diffviewer.views; + +import org.eclipse.jface.dialogs.IMessageProvider; +import org.eclipse.jface.dialogs.TitleAreaDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + +import org.eclipse.gemoc.trace.gemoc.api.ITraceExtractor; +import javafx.beans.property.ReadOnlyDoubleProperty; +import javafx.embed.swt.FXCanvas; +import javafx.geometry.Pos; +import javafx.scene.Group; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.control.OverrunStyle; +import javafx.scene.layout.Background; +import javafx.scene.layout.BackgroundFill; +import javafx.scene.layout.Pane; +import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; +import javafx.scene.paint.Color; +import javafx.scene.shape.Polygon; +import javafx.scene.shape.Rectangle; +import javafx.scene.shape.Shape; +import javafx.scene.text.Font; +import javafx.scene.text.FontWeight; + +public class TraceSectionsDialog extends TitleAreaDialog { + + private int s1 = -1; + private int s2 = -1; + private int e1 = -1; + private int e2 = -1; + + private ITraceExtractor extractor1; + private ITraceExtractor extractor2; + + private static final Background TRANSPARENT_BACKGROUND = new Background( + new BackgroundFill(Color.TRANSPARENT, null, null)); + + public TraceSectionsDialog(Shell parentShell, ITraceExtractor extractor1, ITraceExtractor extractor2) { + super(parentShell); + this.extractor1 = extractor1; + this.extractor2 = extractor2; + } + + @Override + public void create() { + super.create(); + setTitle("Trace Sections"); + setMessage("Enter starting and ending states of trace sections", IMessageProvider.INFORMATION); + } + + private static final Font FONT = Font.font("Arial", FontWeight.BOLD, 11); + + private Shape createCursor() { + return new Polygon(0, 7.5, 5, 0, -5, 0); + } + + private Pane createTraceWidget(ITraceExtractor extractor, String label, ReadOnlyDoubleProperty width) { + final Pane pane = new Pane(); + pane.setBackground(TRANSPARENT_BACKGROUND); + final Rectangle rectangle = new Rectangle(0, 0, 0, 12); + rectangle.setFill(Color.LIGHTGRAY); + rectangle.widthProperty().bind(width.subtract(10)); + rectangle.setArcHeight(12); + rectangle.setArcWidth(12); + Label text = new Label(label); + text.setTextOverrun(OverrunStyle.ELLIPSIS); + text.setAlignment(Pos.CENTER); + text.setMouseTransparent(true); + text.setTextFill(Color.WHITE); + text.setFont(FONT); + text.setMaxWidth(0); + text.maxWidthProperty().bind(rectangle.widthProperty()); + StackPane layout = new StackPane(); + layout.getChildren().addAll(rectangle, text); + pane.getChildren().add(layout); + layout.setTranslateY(13); + layout.setTranslateX(5); + pane.setPrefHeight(25); + pane.setMinHeight(25); + pane.setMaxHeight(25); + + final Group group1 = new Group(); + final Label label1 = new Label(); + final Shape arrow1 = createCursor(); + final Group group2 = new Group(); + final Shape arrow2 = createCursor(); + arrow1.setTranslateX(5); + arrow1.setTranslateY(4); + arrow2.translateXProperty().bind(rectangle.widthProperty().add(5)); + arrow2.setTranslateY(4); + pane.getChildren().add(arrow1); + pane.getChildren().add(arrow2); + + return pane; + } + + @Override + protected Control createDialogArea(Composite parent) { + Composite area = (Composite) super.createDialogArea(parent); + Composite container = new Composite(area, SWT.NONE); + container.setLayout(new GridLayout(1, false)); + container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + FXCanvas fxCanvas = new FXCanvas(container, SWT.NONE); + fxCanvas.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + VBox vBox = new VBox(); + Scene scene = new Scene(vBox); + fxCanvas.setScene(scene); + vBox.getChildren().add(createTraceWidget(extractor1, "First Trace", scene.widthProperty())); + vBox.getChildren().add(createTraceWidget(extractor2, "Second Trace", scene.widthProperty())); + + return area; + } + + @Override + protected boolean isResizable() { + return true; + } + + private void saveInput() { +// s1 = new Integer(txts1.getText()); +// s2 = new Integer(txts2.getText()); +// e1 = new Integer(txte1.getText()); +// e2 = new Integer(txte2.getText()); + } + + @Override + protected void okPressed() { + saveInput(); + super.okPressed(); + } + + public int getS1() { + return s1; + } + + public int getS2() { + return s2; + } + + public int getE1() { + return e1; + } + + public int getE2() { + return e2; + } +} \ No newline at end of file diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/ValueView.java b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/ValueView.java new file mode 100644 index 000000000..8cbb45960 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.diffviewer/src/org/eclipse/gemoc/addon/diffviewer/views/ValueView.java @@ -0,0 +1,183 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.diffviewer.views; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gemoc.addon.diffviewer.logic.Diff.DiffKind; + +import javafx.scene.control.Tooltip; +import javafx.scene.layout.HBox; +import javafx.scene.paint.Color; +import javafx.scene.shape.LineTo; +import javafx.scene.shape.MoveTo; +import javafx.scene.shape.Path; +import javafx.scene.shape.Rectangle; +import javafx.scene.shape.Shape; + +public class ValueView extends HBox { + + private static final int HEIGHT = 8; + private static final int H_MARGIN = 8; + private static final int WIDTH = 24; + + private Shape getHatching(int length, int offset) { + final Path p = new Path(); + for (int i = 0; i < (length / 2.5) + 1; i++) { + final double x1 = (i - 1) * 2.5 + offset; + final double y1 = 8; + final double x2 = (i + 1) * 2.5 + offset; + final double y2 = 0; + final MoveTo move = new MoveTo(x1, y1); + final LineTo line = new LineTo(x2, y2); + p.getElements().addAll(move, line); + p.setStrokeWidth(1); + } + return p; + } + + public void setSegments(DiffKind... segmentParts) { + if (segmentParts.length > 0) { + int totalLength = (WIDTH + H_MARGIN * 2) * segmentParts.length - H_MARGIN * 2; + final List rectangles = new ArrayList<>(); + int j = 0; + final List segmentLengths = new ArrayList<>(); + final List segmentTypes = new ArrayList<>(); + segmentLengths.add(1); + segmentTypes.add(segmentParts[0]); + for (int i = 1; i < segmentParts.length; i++) { + if (segmentParts[i] != segmentParts[i - 1]) { + j++; + segmentLengths.add(1); + segmentTypes.add(segmentParts[i]); + } else { + segmentLengths.add(1 + segmentLengths.remove(j)); + } + } + + if (segmentLengths.size() > 1) { + final int segmentCount = segmentLengths.size(); + for (int i = 1; i < segmentCount - 1; i++) { + final Shape s; + final int length = (WIDTH + H_MARGIN * 2) * segmentLengths.get(i); + switch (segmentTypes.get(i)) { + case EQ: + s = new Rectangle(length, HEIGHT, Color.BLUE); + break; + case SUBST: + s = new Rectangle(length, HEIGHT, Color.TOMATO); + break; + case DEL: + case IN: + final Rectangle r = new Rectangle(length, HEIGHT); + s = Shape.subtract(r, getHatching(length, 0)); + s.setFill(Color.BROWN); + break; + default: + s = null; + } + rectangles.add(s); + } + + final Shape firstR; + final Color firstC; + final int l1 = (WIDTH + H_MARGIN * 2) * segmentLengths.get(0) - H_MARGIN; + switch (segmentTypes.get(0)) { + case EQ: + firstR = new Rectangle(l1, HEIGHT); + firstC = Color.BLUE; + break; + case SUBST: + firstR = new Rectangle(l1, HEIGHT); + firstC = Color.TOMATO; + break; + case DEL: + case IN: + final Rectangle r = new Rectangle(l1, HEIGHT); + firstR = Shape.subtract(r, getHatching(l1, 0)); + firstC = Color.BROWN; + break; + default: + firstR = null; + firstC = null; + } + + final Shape lastR; + final Color lastC; + final int l2 = (WIDTH + H_MARGIN * 2) * segmentLengths.get(segmentCount - 1) - H_MARGIN; + switch (segmentTypes.get(segmentCount - 1)) { + case EQ: + lastR = new Rectangle(totalLength - l2, 0, l2, HEIGHT); + lastC = Color.BLUE; + break; + case SUBST: + lastR = new Rectangle(totalLength - l2, 0, l2, HEIGHT); + lastC = Color.TOMATO; + break; + case DEL: + case IN: + final Rectangle r = new Rectangle(totalLength - l2, 0, l2, HEIGHT); + lastR = Shape.subtract(r, getHatching(l2, totalLength - l2)); + lastC = Color.BROWN; + break; + default: + lastR = null; + lastC = null; + } + + final Rectangle r = new Rectangle(totalLength, HEIGHT); + r.setArcHeight(HEIGHT); + r.setArcWidth(12); + final Shape s1 = Shape.intersect(firstR, r); + final Shape s2 = Shape.intersect(lastR, r); + s1.setFill(firstC); + s2.setFill(lastC); + rectangles.add(0, s1); + rectangles.add(s2); + } else { + final int length = (WIDTH + H_MARGIN * 2) * segmentLengths.get(0) - H_MARGIN * 2; + final Rectangle r; + switch (segmentTypes.get(0)) { + case EQ: + r = new Rectangle(length, HEIGHT, Color.BLUE); + r.setArcHeight(HEIGHT); + r.setArcWidth(12); + rectangles.add(r); + break; + case SUBST: + r = new Rectangle(length, HEIGHT, Color.TOMATO); + r.setArcHeight(HEIGHT); + r.setArcWidth(12); + rectangles.add(r); + break; + case DEL: + case IN: + r = new Rectangle(length, HEIGHT); + r.setArcHeight(HEIGHT); + r.setArcWidth(12); + final Shape s = Shape.subtract(r, getHatching(length, totalLength - length)); + s.setFill(Color.BROWN); + rectangles.add(s); + break; + } + + } + getChildren().addAll(rectangles); + } + } + + public ValueView(String description, DiffKind... segmentParts) { + setSegments(segmentParts); + final Tooltip tooltip = new Tooltip(description); + Tooltip.install(this, tooltip); + } +} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/.classpath b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/.classpath similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/.classpath rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/.classpath diff --git a/trace/generator/plugins/fr.inria.diverse.ecorext/.gitignore b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/.gitignore similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.ecorext/.gitignore rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/.gitignore diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/.project b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/.project new file mode 100644 index 000000000..65027049f --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/.project @@ -0,0 +1,28 @@ + + + org.eclipse.gemoc.addon.multidimensional.timeline + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/META-INF/MANIFEST.MF b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/META-INF/MANIFEST.MF new file mode 100644 index 000000000..7f7f387c3 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/META-INF/MANIFEST.MF @@ -0,0 +1,56 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Gemoc MultiDimensional Timeline Addon +Bundle-SymbolicName: org.eclipse.gemoc.addon.multidimensional.timeline;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.gemoc.addon.multidimensional.timeline.Activator +Require-Bundle: org.eclipse.gemoc.timeline;bundle-version="1.0.0", + org.eclipse.gemoc.executionframework.engine, + org.eclipse.emf.edit.ui, + org.eclipse.sirius.ui, + org.eclipse.gef, + org.eclipse.emf.transaction, + org.eclipse.gemoc.executionframework.ui, + org.eclipse.gemoc.trace.gemoc;bundle-version="1.0.0", + org.eclipse.gemoc.trace.gemoc.api, + org.eclipse.gemoc.commons.eclipse.ui, + org.eclipse.debug.core, + org.eclipse.emf.compare, + org.eclipse.debug.ui, + org.eclipse.gemoc.executionframework.engine.ui, + org.eclipse.gemoc.dsl.debug.ide.sirius.ui;bundle-version="1.0.0", + org.eclipse.gemoc.dsl.debug.ide, + org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.executionframework.debugger +Import-Package: javafx.animation;version="2.0.0", + javafx.application;version="2.0.0", + javafx.beans;version="2.0.0", + javafx.beans.binding;version="2.0.0", + javafx.beans.property;version="2.0.0", + javafx.beans.value;version="2.0.0", + javafx.collections;version="2.0.0", + javafx.concurrent;version="2.0.0", + javafx.event;version="2.0.0", + javafx.fxml;version="2.0.0", + javafx.geometry;version="2.0.0", + javafx.scene;version="2.0.0", + javafx.scene.chart;version="2.0.0", + javafx.scene.control;version="2.0.0", + javafx.scene.control.cell;version="2.0.0", + javafx.scene.effect;version="2.0.0", + javafx.scene.image;version="2.0.0", + javafx.scene.input;version="2.0.0", + javafx.scene.layout;version="2.0.0", + javafx.scene.media;version="2.0.0", + javafx.scene.paint;version="2.0.0", + javafx.scene.shape;version="2.0.0", + javafx.scene.text;version="2.0.0", + javafx.scene.transform;version="2.0.0", + javafx.scene.web;version="2.0.0", + javafx.stage;version="2.0.0", + javafx.util;version="2.0.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.gemoc.addon.multidimensional.timeline, + org.eclipse.gemoc.addon.multidimensional.timeline.views + diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/about.html b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/about.html similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc/about.html rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/about.html diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/build.properties b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/build.properties new file mode 100644 index 000000000..0ceaa1968 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/build.properties @@ -0,0 +1,19 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + about.html +src.includes = about.html + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/IconeGemocModel-16.png b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/IconeGemocModel-16.png new file mode 100644 index 000000000..1fafbd671 Binary files /dev/null and b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/IconeGemocModel-16.png differ diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/backvalue.png b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/backvalue.png similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/backvalue.png rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/backvalue.png diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/insp_sbook.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/insp_sbook.gif new file mode 100644 index 000000000..d8d7fad3d Binary files /dev/null and b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/insp_sbook.gif differ diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/jload_obj.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/jload_obj.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/jload_obj.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/jload_obj.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/lock_co.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/lock_co.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/lock_co.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/lock_co.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/nav_backward.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/nav_backward.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/nav_backward.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/nav_backward.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/nav_forward.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/nav_forward.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/nav_forward.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/nav_forward.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/play-4-16.png b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/play-4-16.png similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/play-4-16.png rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/play-4-16.png diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/remove.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/remove.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/remove.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/remove.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/restart_task.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/restart_task.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/restart_task.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/restart_task.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/runtoline_co.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/runtoline_co.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/runtoline_co.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/runtoline_co.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/save.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/save.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/save.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/save.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/start_task.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/start_task.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/start_task.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/start_task.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/state_coloration.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/state_coloration.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/state_coloration.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/state_coloration.gif diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/stepvalue.png b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/stepvalue.png similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/stepvalue.png rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/stepvalue.png diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/synced.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/synced.gif similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/icons/synced.gif rename to trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/icons/synced.gif diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/plugin.xml b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/plugin.xml new file mode 100644 index 000000000..62f63a8de --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/plugin.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/pom.xml b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/pom.xml new file mode 100644 index 000000000..1b24f7be7 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + org.eclipse.gemoc.trace.manager + org.eclipse.gemoc.trace.manager.root + 2.3.0-SNAPSHOT + ../.. + + + org.eclipse.gemoc.addon.multidimensional.timeline + eclipse-plugin + 2.3.0-SNAPSHOT + \ No newline at end of file diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/Activator.java b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/Activator.java new file mode 100644 index 000000000..896caf3f2 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/Activator.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.addon.multidimensional.timeline; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.addon.multidimensional.timeline"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext context) throws Exception { + try { + Class.forName("javafx.embed.swt.FXCanvas"); + super.start(context); + plugin = this; + } catch (ClassNotFoundException e) { + ErrorDialog.openError(null,"Multidimensional Timeline Unavailable", "Please install JavaFX or use the Oracle JRE", + new Status(IStatus.ERROR,PLUGIN_ID,"JavaFX is needed for the timeline to work")); + } + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + + public static void warn(String msg, Throwable e){ + Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, + Status.OK, + msg, + e)); + } + public static void error(String msg, Throwable e){ + Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, + Status.OK, + msg, + e)); + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/views/MultidimensionalTimelineRenderer.java b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/views/MultidimensionalTimelineRenderer.java new file mode 100644 index 000000000..38565d8ef --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/views/MultidimensionalTimelineRenderer.java @@ -0,0 +1,825 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.addon.multidimensional.timeline.views; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import org.eclipse.emf.ecore.EObject; + +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.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.Value; +import org.eclipse.gemoc.trace.gemoc.api.ITraceExplorer; +import org.eclipse.gemoc.trace.gemoc.api.ITraceExtractor; +import org.eclipse.gemoc.trace.gemoc.api.ITraceViewListener; +import javafx.application.Platform; +import javafx.beans.binding.Bindings; +import javafx.beans.binding.BooleanBinding; +import javafx.beans.binding.IntegerBinding; +import javafx.beans.binding.NumberExpression; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleDoubleProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.collections.ListChangeListener; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.Cursor; +import javafx.scene.Node; +import javafx.scene.control.Button; +import javafx.scene.control.CheckBox; +import javafx.scene.control.ContentDisplay; +import javafx.scene.control.Label; +import javafx.scene.control.OverrunStyle; +import javafx.scene.control.ScrollBar; +import javafx.scene.control.ScrollPane; +import javafx.scene.control.Tooltip; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.input.MouseButton; +import javafx.scene.input.MouseEvent; +import javafx.scene.layout.Background; +import javafx.scene.layout.BackgroundFill; +import javafx.scene.layout.Border; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Pane; +import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; +import javafx.scene.paint.Color; +import javafx.scene.paint.Paint; +import javafx.scene.shape.HLineTo; +import javafx.scene.shape.LineTo; +import javafx.scene.shape.MoveTo; +import javafx.scene.shape.Path; +import javafx.scene.shape.Polygon; +import javafx.scene.shape.Rectangle; +import javafx.scene.shape.Shape; +import javafx.scene.shape.StrokeLineCap; +import javafx.scene.shape.VLineTo; +import javafx.scene.text.Font; +import javafx.scene.text.FontWeight; + +public class MultidimensionalTimelineRenderer extends Pane implements ITraceViewListener { + + private ITraceExplorer, State, TracedObject, Dimension, Value> traceExplorer; + private ITraceExtractor, State, TracedObject, Dimension, Value> traceExtractor; + + private final IntegerProperty currentState; + private final IntegerProperty currentStep; + + private final ScrollPane bodyScrollPane; + private final VBox headerPane; + private final Pane bodyPane; + private final VBox valuesLines; + + private final DoubleProperty valueTitleWidth; + private final DoubleProperty statesPaneHeight; + private final BooleanProperty displayGrid; + private final IntegerProperty nbDisplayableStates; + private final IntegerProperty visibleStatesRange; + private final IntegerProperty nbStates; + private BooleanBinding displayGridBinding; + private final Path diagonalHatching = new Path(); + + private final Font statesFont = Font.font("Arial", FontWeight.BOLD, 12); + private final Font valuesFont = Font.font("Arial", FontWeight.BOLD, 11); + private final Font stateNumbersFont = Font.font("Arial", FontWeight.BOLD, 9); + + private final Image stepValueGraphic; + private final Image backValueGraphic; + + private int lastClickedState = -1; + + private final Consumer jumpConsumer = (i) -> traceExplorer.jump(traceExtractor.getState(i)); + private final Supplier lastClickedStateSupplier = () -> lastClickedState; + + private boolean stateColoration; + + private static final int H_MARGIN = 8; + private static final int V_MARGIN = 2; + private static final int DIAMETER = 24; + private static final int V_HEIGHT = 8; + private static final int UNIT = DIAMETER + 2 * H_MARGIN; + private static final Insets MARGIN_INSETS = new Insets(V_MARGIN, H_MARGIN, V_MARGIN, H_MARGIN); + private static final Insets HALF_MARGIN_INSETS = new Insets(V_MARGIN, H_MARGIN / 2, V_MARGIN, H_MARGIN / 2); + private static final Background HEADER_BACKGROUND = new Background(new BackgroundFill(Color.LIGHTGRAY, null, null)); + private static final Background BODY_BACKGROUND = new Background(new BackgroundFill(Color.WHITE, null, null)); + private static final Background TRANSPARENT_BACKGROUND = new Background( + new BackgroundFill(Color.TRANSPARENT, null, null)); + private static final Paint LINE_PAINT = new Color(Color.LIGHTGRAY.getRed(), Color.LIGHTGRAY.getGreen(), + Color.LIGHTGRAY.getBlue(), 0.5); + private static final Background LINE_BACKGROUND = new Background(new BackgroundFill(LINE_PAINT, null, null)); + + private Path statesGrid = null; + private Rectangle highlightRectangle = null; + + private boolean scrollLock = false; + private final Pane statesPane = new Pane(); + + private final Image playGraphic; + private final Image replayGraphic; + + private final BooleanProperty isInReplayMode; + + private static final int CURRENT_FORWARD_STEP = 0; + private static final int CURRENT_BACKWARD_STEP = 1; + private static final int CURRENT_BIGSTEP = 2; + + private Consumer> displayMenu = null; + + public MultidimensionalTimelineRenderer() { + headerPane = new VBox(); + valuesLines = new VBox(); + bodyPane = new Pane(); + bodyScrollPane = new ScrollPane(bodyPane); + backValueGraphic = new Image("/icons/nav_backward.gif"); + stepValueGraphic = new Image("/icons/nav_forward.gif"); + playGraphic = new Image("/icons/start_task.gif"); + replayGraphic = new Image("/icons/restart_task.gif"); + + valueTitleWidth = new SimpleDoubleProperty(); + statesPaneHeight = new SimpleDoubleProperty(); + displayGrid = new SimpleBooleanProperty(); + isInReplayMode = new SimpleBooleanProperty(); + + nbDisplayableStates = new SimpleIntegerProperty(); + nbDisplayableStates.bind(headerPane.widthProperty().divide(UNIT)); + nbStates = new SimpleIntegerProperty(0); + currentState = new SimpleIntegerProperty(); + currentStep = new SimpleIntegerProperty(0); + visibleStatesRange = new SimpleIntegerProperty(); + visibleStatesRange.bind(nbStates.add(1).subtract(nbDisplayableStates)); + + nbDisplayableStates.addListener((v, o, n) -> { + refresh(); + }); + currentState.addListener((v, o, n) -> { + refresh(); + }); + currentStep.addListener((v, o, n) -> { + refresh(); + }); + visibleStatesRange.addListener((v, o, n) -> { + if (currentState.intValue() >= visibleStatesRange.intValue()) { + currentState.set(visibleStatesRange.intValue() - 1); + } + }); + + bodyScrollPane.setFitToWidth(true); + bodyScrollPane.setBorder(Border.EMPTY); + bodyScrollPane.setBackground(BODY_BACKGROUND); + bodyScrollPane.setVisible(false); + bodyPane.setBackground(BODY_BACKGROUND); + + statesPane.minHeightProperty().bind(statesPaneHeight); + statesPane.heightProperty().addListener((v, o, n) -> { + if (n.doubleValue() > statesPaneHeight.doubleValue()) { + statesPaneHeight.set(n.doubleValue()); + } + }); + headerPane.minWidthProperty().bind(widthProperty()); + headerPane.maxWidthProperty().bind(widthProperty()); + valuesLines.minWidthProperty().bind(widthProperty()); + valuesLines.maxWidthProperty().bind(widthProperty()); + valuesLines.getChildren().addListener(new ListChangeListener() { + @Override + public void onChanged(javafx.collections.ListChangeListener.Change c) { + List l = c.getList(); + int i = 0; + for (Node n : l) { + Pane p = (Pane) n; + if (i % 2 == 1) { + p.setBackground(LINE_BACKGROUND); + } else { + p.setBackground(TRANSPARENT_BACKGROUND); + } + i++; + } + } + }); + + for (int i = 0; i < 5; i++) { + final double x1 = Math.max(-0.5 + 0.25 * i, 0); + final double y1 = Math.max(0.5 - 0.25 * i, 0); + final double x2 = Math.min(0.5 + 0.25 * i, 1); + final double y2 = Math.min(1.5 - 0.25 * i, 1); + final MoveTo move = new MoveTo(x1 * DIAMETER, y1 * DIAMETER); + final LineTo line = new LineTo(x2 * DIAMETER, y2 * DIAMETER); + diagonalHatching.getElements().addAll(move, line); + } + + headerPane.setBackground(HEADER_BACKGROUND); + valuesLines.setBackground(TRANSPARENT_BACKGROUND); + setBackground(BODY_BACKGROUND); + + setupStatesPane(); + + bodyPane.getChildren().add(valuesLines); + bodyScrollPane.translateYProperty().bind(headerPane.heightProperty()); + bodyScrollPane.maxHeightProperty().bind(heightProperty().subtract(headerPane.heightProperty())); + + getChildren().add(headerPane); + getChildren().add(bodyScrollPane); + minHeightProperty().bind(headerPane.heightProperty().add(bodyScrollPane.heightProperty())); + prefHeightProperty().bind(headerPane.heightProperty().add(bodyScrollPane.heightProperty())); + maxHeightProperty().bind(headerPane.heightProperty().add(bodyScrollPane.heightProperty())); + } + + private void showState(State state, boolean jump) { + int toShow = Math.min(nbStates.intValue() - 1, Math.max(0, traceExtractor.getStateIndex(state))); + int effectiveToShow = Math.min(visibleStatesRange.intValue() - 1, + Math.max(0, toShow - nbDisplayableStates.intValue() / 2)); + if (jump) { + traceExplorer.jump(traceExtractor.getState(effectiveToShow)); + } + currentState.set(effectiveToShow); + } + + private Pane setupStatesPane() { + final Label titleLabel = new Label("All execution states (0)"); + nbStates.addListener((v, o, n) -> { + String s = "All execution states (" + n.intValue() + ")"; + Platform.runLater(() -> { + titleLabel.setText(s); + titleLabel.setContentDisplay(ContentDisplay.RIGHT); + final ImageView nodeGraphic = new ImageView(); + nodeGraphic.setImage(playGraphic); + titleLabel.setGraphic(nodeGraphic); + isInReplayMode.addListener((val, old, neu) -> { + if (old != neu) { + if (neu) { + nodeGraphic.setImage(replayGraphic); + } else { + nodeGraphic.setImage(playGraphic); + } + } + }); + }); + }); + titleLabel.setFont(statesFont); + VBox.setMargin(titleLabel, HALF_MARGIN_INSETS); + titleLabel.setAlignment(Pos.CENTER); + final ScrollBar scrollBar = new ScrollBar(); + scrollBar.setVisibleAmount(1); + scrollBar.setBlockIncrement(10); + scrollBar.setMin(0); + final IntegerBinding statesRange = visibleStatesRange.subtract(1); + scrollBar.disableProperty().bind(statesRange.lessThanOrEqualTo(0)); + scrollBar.maxProperty().bind(statesRange); + scrollBar.valueProperty().addListener((v, o, n) -> { + if (o.intValue() != n.intValue() && n.intValue() != currentState.intValue()) { + currentState.set(n.intValue()); + } + }); + currentState.addListener((v, o, n) -> { + if (o.intValue() != n.intValue() && n.intValue() != scrollBar.valueProperty().intValue()) { + scrollBar.setValue(n.intValue()); + } + }); + final HBox hBox = new HBox(); + final Polygon arrow = new Polygon(2.5, 10, 10, 5, 2.5, 0); + HBox.setMargin(arrow, HALF_MARGIN_INSETS); + final Label toggleValuesLabel = new Label("Timeline for dynamic information "); + toggleValuesLabel.setFont(statesFont); + hBox.setAlignment(Pos.CENTER_LEFT); + hBox.getChildren().addAll(arrow, toggleValuesLabel); + hBox.setCursor(Cursor.HAND); + hBox.setOnMouseClicked((e) -> { + if (bodyScrollPane.isVisible()) { + bodyScrollPane.setVisible(false); + arrow.setRotate(0); + } else { + bodyScrollPane.setVisible(true); + arrow.setRotate(90); + } + }); + VBox.setMargin(hBox, HALF_MARGIN_INSETS); + headerPane.getChildren().addAll(scrollBar, titleLabel, statesPane, hBox); + VBox.setMargin(statesPane, MARGIN_INSETS); + + return headerPane; + } + + private Pane setupValuePane(Dimension dimension, Label titleLabel, Pane contentPane) { + final HBox titlePane = new HBox(); + final VBox valueVBox = new VBox(); + final Node backValueGraphicNode = new ImageView(backValueGraphic); + final double buttonScale = 0.66; + backValueGraphicNode.setScaleX(1 / buttonScale); + backValueGraphicNode.setScaleY(1 / buttonScale); + final Button backValue = new Button("", backValueGraphicNode); + backValue.setOnAction((e) -> { + traceExplorer.backValue(dimension); + }); + backValue.setScaleX(buttonScale); + backValue.setScaleY(buttonScale); + backValue.setDisable(!traceExplorer.canBackValue(dimension)); + final Node stepValueGraphicNode = new ImageView(stepValueGraphic); + stepValueGraphicNode.setScaleX(1 / buttonScale); + stepValueGraphicNode.setScaleY(1 / buttonScale); + final Button stepValue = new Button("", stepValueGraphicNode); + stepValue.setOnAction((e) -> { + traceExplorer.stepValue(dimension); + }); + stepValue.setDisable(!traceExplorer.canStepValue(dimension)); + stepValue.setScaleX(buttonScale); + stepValue.setScaleY(buttonScale); + titlePane.setAlignment(Pos.CENTER_LEFT); + VBox.setMargin(titlePane, HALF_MARGIN_INSETS); + VBox.setMargin(contentPane, MARGIN_INSETS); + + final CheckBox showValueCheckBox = new CheckBox(); + showValueCheckBox.setScaleX(buttonScale); + showValueCheckBox.setScaleY(buttonScale); + boolean hide = traceExtractor.isDimensionIgnored(dimension); + if (hide) { + showValueCheckBox.setSelected(false); + } else { + showValueCheckBox.setSelected(true); + } + BooleanProperty sel = showValueCheckBox.selectedProperty(); + backValue.visibleProperty().bind(sel); + stepValue.visibleProperty().bind(sel); + sel.addListener((v, o, n) -> { + if (o != n) { + traceExtractor.ignoreDimension(dimension, !n); + if (n) { + valueVBox.getChildren().add(contentPane); + } else { + valueVBox.getChildren().remove(contentPane); + } + sortValueLines(); + } + }); + titlePane.getChildren().addAll(showValueCheckBox, titleLabel, backValue, stepValue); + valueVBox.getChildren().add(titlePane); + if (!hide) { + valueVBox.getChildren().add(contentPane); + } + + valuesLines.getChildren().add(valueVBox); + valueVBox.setUserData(dimension); + titleLabel.minWidthProperty().bind(valueTitleWidth); + titleLabel.widthProperty().addListener((v, o, n) -> { + if (n.doubleValue() > valueTitleWidth.get()) { + valueTitleWidth.set(n.doubleValue()); + } + }); + if (titleLabel.widthProperty().doubleValue() > valueTitleWidth.get()) { + valueTitleWidth.set(titleLabel.widthProperty().doubleValue()); + } + + return valueVBox; + } + + private HBox createStateTraceLine() { + final HBox hBox = new HBox(); + statesPane.getChildren().add(hBox); + headerPane.setFocusTraversable(true); + return hBox; + } + + private HBox createValueTraceLine(Dimension dimension) { + final HBox hBox = new HBox(); + final String title = traceExtractor.getDimensionLabel(dimension) + " "; + final Label titleLabel = new Label(title); + titleLabel.setFont(valuesFont); + final Pane pane = setupValuePane(dimension, titleLabel, hBox); + pane.setFocusTraversable(true); + return hBox; + } + + private String computeStateLabel(int stateNumber) { + if (stateNumber > 999) { + return (stateNumber / 1000) + "k" + ((stateNumber % 1000) / 100); + } else { + return "" + stateNumber; + } + } + + private void fillStateLine(HBox line, List> states, int selectedState) { + final Color currentColor = Color.CORAL; + final Color otherColor = Color.SLATEBLUE; + final int height = DIAMETER; + final int width = DIAMETER; + final int currentStateIndex = Math.max(0, currentState.intValue()); + final int diff = states.isEmpty() ? 0 : currentStateIndex - traceExtractor.getStateIndex(states.get(0)); + + final List> colorGroups = stateColoration ? computeColorGroups(states) : Collections.emptyList(); + final int nbColors = colorGroups.size(); + final List colorPalette = new ArrayList<>(); + if (nbColors > 0) { + double interval = 360. / nbColors; + for (int i = currentStateIndex % nbColors; i < nbColors; i++) { + colorPalette.add(Color.hsb(i * interval, 0.75, 0.70)); + } + for (int i = 0; i < currentStateIndex % nbColors; i++) { + colorPalette.add(Color.hsb(i * interval, 0.75, 0.70)); + } + } + + final int[] stateToColor = new int[states.size()]; + for (int i = 0; i < nbColors; i++) { + final List stateGroup = colorGroups.get(i); + for (Integer state : stateGroup) { + stateToColor[state % stateToColor.length] = i; + } + } + + line.getChildren().clear(); + if (diff > 0) { + line.setTranslateX(-(UNIT * diff)); + } + + for (State state : states) { + final int stateIndex = traceExtractor.getStateIndex(state); + final Rectangle rectangle; + if (selectedState == stateIndex) { + rectangle = new Rectangle(width, height, currentColor); + } else { + if (stateColoration && !colorPalette.isEmpty()) { + final int idx = stateToColor[stateIndex % stateToColor.length]; + if (idx != -1) { + rectangle = new Rectangle(width, height, colorPalette.get(idx)); + } else { + rectangle = new Rectangle(width, height, otherColor); + } + } else { + rectangle = new Rectangle(width, height, otherColor); + } + } + + rectangle.setArcHeight(height); + rectangle.setArcWidth(width); + rectangle.setUserData(state); + rectangle.addEventHandler(MouseEvent.MOUSE_CLICKED, (e) -> { + if (e.getClickCount() > 1 && e.getButton() == MouseButton.PRIMARY) { + traceExplorer.jump(state); + } + if (e.getClickCount() == 1 && e.getButton() == MouseButton.SECONDARY) { + lastClickedState = stateIndex; + final List enabledItems = new ArrayList<>(); + enabledItems.add(traceExtractor.isStateBreakable(state)); + enabledItems.add(true); + displayMenu.accept(enabledItems); + } + }); + + displayGridBinding = displayGridBinding.or(rectangle.hoverProperty()); + + final String s = traceExtractor.getStateDescription(state); + final Tooltip t = new Tooltip(s); + Tooltip.install(rectangle, t); + Label text = new Label(computeStateLabel(stateIndex)); + text.setTextOverrun(OverrunStyle.ELLIPSIS); + text.setAlignment(Pos.CENTER); + text.setMouseTransparent(true); + text.setTextFill(Color.WHITE); + text.setFont(stateNumbersFont); + text.setMaxWidth(width); + StackPane layout = new StackPane(); + StackPane.setMargin(rectangle, MARGIN_INSETS); + if (!traceExtractor.isStateBreakable(state)) { + Shape hatching = Shape.intersect(rectangle, diagonalHatching); + hatching.setFill(Color.LIGHTGRAY); + layout.getChildren().addAll(rectangle, hatching, text); + } else { + layout.getChildren().addAll(rectangle, text); + } + line.getChildren().add(layout); + } + } + + private void fillValueLine(HBox line, Dimension dimension, int start, int end, int selectedState) { + final List> values = traceExtractor.getValuesForStates(dimension, start, end); + final Color currentColor = Color.DARKORANGE; + final Color otherColor = Color.DARKBLUE; + final int height = V_HEIGHT; + + line.getChildren().clear(); + + final int currentStateIndex = Math.max(0, currentState.intValue()); + int stateIndex = currentStateIndex; + + int diff = values.isEmpty() ? 0 : currentStateIndex - traceExtractor.getValueFirstStateIndex(values.get(0)); + + if (diff > 0) { + line.setTranslateX(-(UNIT * diff)); + } + + for (Value value : values) { + final int firstStateIndex = traceExtractor.getValueFirstStateIndex(value); + final int lastStateIndex = traceExtractor.getValueLastStateIndex(value); + + if (firstStateIndex > stateIndex) { + // When the first visible value starts after the first state, + // we fill the space with a transparent rectangle. + int width = DIAMETER + UNIT * (firstStateIndex - stateIndex - 1); + final Rectangle rectangle = new Rectangle(width, height, Color.TRANSPARENT); + line.getChildren().add(rectangle); + HBox.setMargin(rectangle, MARGIN_INSETS); + } + + final Rectangle rectangle; + final int width = DIAMETER + UNIT * (lastStateIndex - firstStateIndex); + if (selectedState >= firstStateIndex && selectedState <= lastStateIndex) { + rectangle = new Rectangle(width, height, currentColor); + } else { + rectangle = new Rectangle(width, height, otherColor); + } + rectangle.setArcHeight(height); + rectangle.setArcWidth(DIAMETER / 2); + rectangle.setUserData(value); + rectangle.addEventHandler(MouseEvent.MOUSE_CLICKED, (e) -> { + if (e.getClickCount() > 1 && e.getButton() == MouseButton.PRIMARY) { + traceExplorer.jump(value); + } + }); + + displayGridBinding = displayGridBinding.or(rectangle.hoverProperty()); + + final String s = traceExtractor.getValueDescription(value); + final Tooltip t = new Tooltip(s); + Tooltip.install(rectangle, t); + line.getChildren().add(rectangle); + HBox.setMargin(rectangle, MARGIN_INSETS); + + stateIndex = lastStateIndex + 1; + } + } + + private NumberExpression createSteps(Step step, int depth, int currentStateIndex, int selectedStateIndex, int firstStateIndex, int lastStateIndex, + List accumulator, Object[] stepTargets) { + + final int stepStartingIndex = traceExtractor.getStateIndex(step.getStartingState()); + + final boolean endedStep = step.getEndingState() != null; + + final int startingIndex = stepStartingIndex - currentStateIndex; + final int endingIndex = (endedStep ? traceExtractor.getStateIndex(step.getEndingState()) + : nbStates.intValue()) - currentStateIndex; + final Path path = new Path(); + path.setStrokeWidth(2); + + final double x1 = startingIndex * UNIT + UNIT / 2; + final double x4 = endingIndex * UNIT + UNIT / 2; + final double x2 = x1 + UNIT / 4; + final double x3 = x4 - UNIT / 4; + final double baseLineY = DIAMETER / 2 + V_MARGIN; + final MoveTo moveTo = new MoveTo(x1, baseLineY); + final LineTo lineTo = new LineTo(x2, baseLineY); + final HLineTo hLineTo = new HLineTo(x3); + path.getElements().addAll(moveTo, lineTo, hLineTo); + if (endedStep) { + final LineTo lastLineTo = new LineTo(x4, baseLineY); + path.getElements().add(lastLineTo); + } + + accumulator.add(path); + + final List> subSteps = traceExtractor.getSubSteps(step); + NumberExpression yOffset = new SimpleDoubleProperty(0); + if (subSteps != null && !subSteps.isEmpty()) { + for (Step subStep : subSteps) { + if (subStep.getStartingState() != subStep.getEndingState() +// && ((traceExtractor.getStateIndex(subStep.getEndingState()) < firstStateIndex) || traceExtractor.getStateIndex(subStep.getStartingState()) > lastStateIndex) + ) { + yOffset = Bindings.max(yOffset, createSteps(subStep, depth + 1, currentStateIndex, selectedStateIndex, firstStateIndex, lastStateIndex, accumulator, stepTargets)); + } + } + } + + lineTo.yProperty().bind(yOffset.add(DIAMETER / 2 + V_MARGIN)); + + if (stepTargets[CURRENT_FORWARD_STEP] == step) { + path.setStroke(Color.DARKORANGE); + } else if (stepTargets[CURRENT_BACKWARD_STEP] == step) { + path.setStroke(Color.DARKGREEN); + } else if (stepTargets[CURRENT_BIGSTEP] == step) { + path.setStroke(Color.DARKRED); + } else { + path.setStroke(Color.DARKBLUE); + if (!traceExplorer.getCallStack().contains(step) && (stepStartingIndex > selectedStateIndex + || (stepStartingIndex == selectedStateIndex && endedStep))) { + path.getStrokeDashArray().addAll(5., 5.); + path.setStrokeLineCap(StrokeLineCap.ROUND); + } + } + + return lineTo.yProperty(); + } + + private void sortValueLines() { + final Map, Node> map = new HashMap<>(); + List lines = valuesLines.getChildren(); + final List nodes = new ArrayList<>(); + final List hiddenNodes = new ArrayList<>(); + lines.forEach(n -> map.put((Dimension) n.getUserData(), n)); + lines.clear(); + traceExtractor.getDimensions().forEach(d -> { + final Node n = map.get(d); + if (traceExtractor.isDimensionIgnored(d)) { + hiddenNodes.add(n); + } else { + nodes.add(n); + } + }); + lines.addAll(nodes); + lines.addAll(hiddenNodes); + } + + public void refresh() { + Platform.runLater(() -> { + valuesLines.getChildren().clear(); + statesPane.getChildren().clear(); + displayGrid.unbind(); + + if (traceExplorer == null) { + return; + } + + isInReplayMode.set(traceExplorer.isInReplayMode()); + + final int currentStateStartIndex = Math.max(0, currentState.intValue()); + final int currentStateEndIndex = Math.min(currentStateStartIndex + nbDisplayableStates.intValue(), + traceExtractor.getStatesTraceLength()); + + final int selectedStateIndex = traceExtractor.getStateIndex(traceExplorer.getCurrentState()); + + displayGridBinding = new BooleanBinding() { + @Override + protected boolean computeValue() { + return false; + } + }; + + { + final HBox hBox = createStateTraceLine(); + fillStateLine(hBox, traceExtractor.getStates(currentStateStartIndex - 1, currentStateEndIndex + 1), + selectedStateIndex); + } + + final List> dimensions = new ArrayList<>(traceExtractor.getDimensions()); + for (Dimension dimension : dimensions) { + final HBox hBox = createValueTraceLine(dimension); + fillValueLine(hBox, dimension, currentStateStartIndex, currentStateEndIndex + 1, selectedStateIndex); + } + + sortValueLines(); + + displayGrid.bind(displayGridBinding); + + // ---------------- Steps creation + + final List> rootSteps = traceExtractor.getSteps(currentStateStartIndex - 1, currentStateEndIndex + 1); + + final List steps = new ArrayList<>(); + + final Object[] stepTargets = new Object[3]; + + Step tmp = traceExplorer.getCurrentForwardStep(); + if (tmp != null) { + stepTargets[CURRENT_FORWARD_STEP] = tmp; + } + tmp = traceExplorer.getCurrentBackwardStep(); + if (tmp != null) { + stepTargets[CURRENT_BACKWARD_STEP] = tmp; + } + tmp = traceExplorer.getCurrentBigStep(); + if (tmp != null) { + stepTargets[CURRENT_BIGSTEP] = tmp; + } + + for (Step step : rootSteps) { + if (step.getStartingState() != step.getEndingState()) { + createSteps(step, 0, currentStateStartIndex, selectedStateIndex, currentStateStartIndex - 1, currentStateEndIndex + 1, steps, stepTargets); + } + } + + statesPane.getChildren().addAll(0, steps); + + // ---------------- Adding grid and highlight rectangle + + if (statesGrid != null) { + bodyPane.getChildren().remove(statesGrid); + } + if (highlightRectangle != null) { + bodyPane.getChildren().remove(highlightRectangle); + } + + statesGrid = new Path(); + final VLineTo vLineTo = new VLineTo(); + vLineTo.yProperty().bind(valuesLines.heightProperty()); + displayGrid.addListener((v, o, n) -> { + if (n) { + statesGrid.setStroke(Color.GRAY); + } else { + statesGrid.setStroke(Color.LIGHTGRAY); + } + }); + highlightRectangle = new Rectangle(); + for (int i = currentStateStartIndex; i <= currentStateEndIndex; i++) { + if (i == selectedStateIndex) { + highlightRectangle.setX(H_MARGIN + (i - currentStateStartIndex) * (2 * H_MARGIN + DIAMETER)); + highlightRectangle.setWidth(2 * H_MARGIN + DIAMETER); + highlightRectangle.heightProperty().bind(valuesLines.heightProperty()); + } + statesGrid.getElements().addAll( + new MoveTo(H_MARGIN + (i - currentStateStartIndex) * (2 * H_MARGIN + DIAMETER), 0), vLineTo); + } + statesGrid.getStrokeDashArray().addAll(10., 10.); + statesGrid.setStrokeWidth(1); + statesGrid.setStroke(Color.LIGHTGRAY); + statesGrid.setStrokeLineCap(StrokeLineCap.ROUND); + bodyPane.getChildren().add(0, statesGrid); + highlightRectangle.setFill(Color.LIGHTGRAY); + bodyPane.getChildren().add(0, highlightRectangle); + }); + } + + public void setScrollLock(boolean value) { + scrollLock = value; + } + + public void setStateColoration(boolean value) { + stateColoration = value; + refresh(); + } + + public Consumer getJumpConsumer() { + return jumpConsumer; + } + + public void setTraceExplorer( + ITraceExplorer, State, TracedObject, Dimension, Value> traceExplorer) { + if (this.traceExplorer != null) { + this.traceExplorer.removeListener(this); + } + this.traceExplorer = traceExplorer; + if (this.traceExplorer != null) { + this.traceExplorer.registerCommand(this, () -> update()); + } + update(); + } + + public void setTraceExtractor( + ITraceExtractor, State, TracedObject, Dimension, Value> traceExtractor) { + this.traceExtractor = traceExtractor; + } + + @Override + public void update() { + // TODO divide update between trace explorer listening (for the current + // state) + // and trace model listening (for the view of the trace) ? + if (traceExplorer != null) { + nbStates.set(traceExtractor.getStatesTraceLength()); + if (!scrollLock) { + showState(traceExplorer.getCurrentState(), false); + } + } else { + nbStates.set(0); + } + refresh(); + } + + public void dimensionsAdded(List> dimensions) { + // TODO Auto-generated method stub + } + + public void setMenuDisplayer(Consumer> displayMenu) { + this.displayMenu = displayMenu; + } + + public Supplier getLastClickedStateSupplier() { + return lastClickedStateSupplier; + } + + private List> computeColorGroups(List> states) { + return traceExtractor.computeStateEquivalenceClasses().stream().sorted((l1, l2) -> { + final int min1 = l1.stream().map(e -> traceExtractor.getStateIndex(e)).min((i1, i2) -> i1 - i2).get(); + final int min2 = l2.stream().map(e -> traceExtractor.getStateIndex(e)).min((i1, i2) -> i1 - i2).get(); + return min1 - min2; + }).map(l -> l.stream().filter(s -> states.contains(s)).map(e -> traceExtractor.getStateIndex(e)) + .collect(Collectors.toList())).collect(Collectors.toList()); + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/views/MultidimensionalTimelineViewPart.java b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/views/MultidimensionalTimelineViewPart.java new file mode 100644 index 000000000..98a94e660 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.multidimensional.timeline/src/org/eclipse/gemoc/addon/multidimensional/timeline/views/MultidimensionalTimelineViewPart.java @@ -0,0 +1,504 @@ +/******************************************************************************* + * Copyright (c) 2016, 2017 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.addon.multidimensional.timeline.views; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.function.BiPredicate; +import java.util.function.Consumer; +import java.util.function.Supplier; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.Platform; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +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.util.EcoreUtil; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.dialogs.InputDialog; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.MenuItem; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IActionBars; +import org.eclipse.gemoc.executionframework.debugger.AbstractGemocDebugger; +import org.eclipse.gemoc.executionframework.engine.ui.launcher.AbstractGemocLauncher; +import org.eclipse.gemoc.executionframework.ui.views.engine.EngineSelectionDependentViewPart; +import org.eclipse.gemoc.executionframework.ui.views.engine.actions.AbstractEngineAction; +import org.eclipse.gemoc.addon.multidimensional.timeline.Activator; +import org.eclipse.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration; + +import org.eclipse.gemoc.trace.commons.model.launchconfiguration.LaunchConfiguration; +import org.eclipse.gemoc.trace.commons.model.trace.Dimension; +import org.eclipse.gemoc.trace.commons.model.trace.MSEOccurrence; +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.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.ITraceExtractor; +import org.eclipse.gemoc.trace.gemoc.traceaddon.AbstractTraceAddon; +import javafx.embed.swt.FXCanvas; +import javafx.scene.Scene; + +public class MultidimensionalTimelineViewPart extends EngineSelectionDependentViewPart { + + public static final String ID = "org.eclipse.gemoc.addon.multidimensional.timeline.views.timeline.MultidimensionalTimeLineView"; + + private FXCanvas fxCanvas; + + private MultidimensionalTimelineRenderer timelineRenderer; + + private IMultiDimensionalTraceAddon, State, TracedObject, Dimension, Value> traceAddon; + + final private List statesToBreakTo = new ArrayList<>(); + + private AbstractGemocDebugger debugger = null; + + private IExecutionEngine engine = null; + + public List getStatesToBreakTo() { + return Collections.unmodifiableList(statesToBreakTo); + } + + @Override + public void dispose() { + super.dispose(); + timelineRenderer.setTraceExplorer(null); + timelineRenderer.setTraceExtractor(null); + } + + @Override + public void createPartControl(Composite parent) { + fxCanvas = new FXCanvas(parent, SWT.NONE); + timelineRenderer = new MultidimensionalTimelineRenderer(); + Scene scene = new Scene(timelineRenderer); + fxCanvas.setScene(scene); + parent.getShell().addListener(SWT.Resize, (e) -> { + timelineRenderer.refresh(); + }); + buildMenu(parent.getShell()); + + final Supplier getLastClickedState = timelineRenderer.getLastClickedStateSupplier(); + + final Menu menu = new Menu(fxCanvas); + MenuItem launchAndBreakAtStateMenuItem = new MenuItem(menu, SWT.NONE); + launchAndBreakAtStateMenuItem.setText("Relaunch and break at this state"); + launchAndBreakAtStateMenuItem.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent evt) { + breakAtStateIndex = getLastClickedState.get(); + if (debugger != null && !debugger.isTerminated()) { + debugger.terminate(); + } + if (engine != null) { + engine.stop(); + } + launchConfigFromTrace(); + } + }); + MenuItem launchAndBreakAtVectorMenuItem = new MenuItem(menu, SWT.NONE); + launchAndBreakAtVectorMenuItem.setText("Relaunch and break at this value vector"); + launchAndBreakAtVectorMenuItem.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent evt) { + final State state = traceAddon.getTraceExtractor().getState(getLastClickedState.get()); + breakAtVectorState = state; + if (debugger != null && !debugger.isTerminated()) { + debugger.terminate(); + } + if (engine != null) { + engine.stop(); + } + launchConfigFromTrace(); + } + }); + + menu.addListener(SWT.Show, (event) -> { + menu.setVisible(true); + }); + + Consumer> displayMenu = (l) -> { + int i = 0; + for (boolean b : l) { + menu.getItem(i).setEnabled(b); + i++; + } + Event event = new Event(); + event.type = SWT.Show; + event.button = SWT.BUTTON2; + menu.notifyListeners(SWT.Show, event); + }; + + timelineRenderer.setMenuDisplayer(displayMenu); + } + + private void buildMenu(Shell shell) { + + addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { + + private FileDialog saveAsDialog; + + @Override + protected void init() { + super.init(); + setText("Save Trace"); + setToolTipText("Save Trace"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/save.gif"); + setImageDescriptor(id); + setEnabled(true); + + saveAsDialog = new FileDialog(shell, SWT.SAVE); + saveAsDialog.setFilterNames(new String[] { "Trace Files", "All Files (*.*)" }); + saveAsDialog.setFilterExtensions(new String[] { "*.trace", "*.*" }); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + saveAsDialog.setText("Save As"); + String filePath = saveAsDialog.open(); + + URI uri = URI.createFileURI(filePath); + traceAddon.getTraceConstructor().save(uri); + } + }); + + addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { + + @Override + protected void init() { + super.init(); + setText("Remove Trace"); + setToolTipText("Remove Trace"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/remove.gif"); + setImageDescriptor(id); + setEnabled(true); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + traceAddon = null; + timelineRenderer.setTraceExtractor(null); + timelineRenderer.setTraceExplorer(null); + } + }); + + addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { + + private FileDialog fileDialog; + + @Override + protected void init() { + super.init(); + setText("Open Trace"); + setToolTipText("Open Trace"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/jload_obj.gif"); + setImageDescriptor(id); + setEnabled(true); + + fileDialog = new FileDialog(shell, SWT.OPEN); + fileDialog.setFilterExtensions(new String[] { "*.trace" }); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + fileDialog.setText("Open Trace"); + String filePath = fileDialog.open(); + + if (filePath != null && !filePath.equals("")) { + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("trace", new XMIResourceFactoryImpl()); + + // Obtain a new resource set + ResourceSet resSet = new ResourceSetImpl(); + + // Get the resources + URI filePath1URI = URI.createFileURI(filePath); + Resource traceResource = resSet.getResource(filePath1URI, true); + EcoreUtil.resolveAll(traceResource); + AbstractTraceAddon newTraceAddon = null; + try { + IExtensionRegistry extReg = Platform.getExtensionRegistry(); + IExtensionPoint ep = extReg + .getExtensionPoint("org.gemoc.gemoc_language_workbench.engine_addon"); + IExtension[] extensions = ep.getExtensions(); + for (int i = 0; i < extensions.length && newTraceAddon == null; i++) { + IExtension ext = extensions[i]; + IConfigurationElement[] confElements = ext.getConfigurationElements(); + for (int j = 0; j < confElements.length; j++) { + IConfigurationElement confElement = confElements[j]; + String attr = confElement.getAttribute("Class"); + if (attr != null) { + Object obj = confElement.createExecutableExtension("Class"); + if (obj instanceof AbstractTraceAddon) { + AbstractTraceAddon obj_cast = (AbstractTraceAddon) obj; + if (obj_cast.isAddonForTrace(traceResource.getContents().get(0))) { + newTraceAddon = obj_cast; + break; + } + } + } + } + } + } catch (CoreException e) { + e.printStackTrace(); + } + + if (newTraceAddon != null) { + traceAddon = newTraceAddon; + newTraceAddon.load(traceResource); + timelineRenderer.setTraceExtractor(traceAddon.getTraceExtractor()); + timelineRenderer.setTraceExplorer(traceAddon.getTraceExplorer()); + } + } + } + }); + + addActionToToolbar(new AbstractEngineAction(Action.AS_CHECK_BOX) { + @Override + protected void init() { + super.init(); + setText("Scroll Lock"); + setToolTipText("Scroll Lock"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/lock_co.gif"); + setImageDescriptor(id); + setEnabled(true); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + timelineRenderer.setScrollLock(isChecked()); + } + }); + + addActionToToolbar(new AbstractEngineAction(Action.AS_CHECK_BOX) { + @Override + protected void init() { + super.init(); + setText("State Coloration"); + setToolTipText("State Coloration"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/state_coloration.gif"); + setImageDescriptor(id); + setEnabled(true); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + timelineRenderer.setStateColoration(isChecked()); + } + }); + + addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { + + private InputDialog dialog; + + @Override + protected void init() { + super.init(); + setText("Jump to state"); + setToolTipText("Jump To State"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/runtoline_co.gif"); + setImageDescriptor(id); + setEnabled(true); + + dialog = new InputDialog(shell, "Jump to state", "Enter the desired state", "0", s -> { + ITraceExtractor, State, TracedObject, Dimension, Value> extractor = traceAddon.getTraceExtractor(); + if (extractor == null) { + return "Not trace currently loaded"; + } + try { + int i = Integer.parseInt(s); + if (i > -1 && i < extractor.getStatesTraceLength()) { + return null; + } + return "Not a valid state"; + } catch (NumberFormatException e) { + return "Not a valid state"; + } + }); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + dialog.open(); + if (dialog.getReturnCode() == Window.OK) { + int state = Integer.parseInt(dialog.getValue()); + timelineRenderer.getJumpConsumer().accept(state); + } + } + }); + } + + private void addActionToToolbar(Action action) { + IActionBars actionBars = getViewSite().getActionBars(); + IToolBarManager toolBar = actionBars.getToolBarManager(); + toolBar.add(action); + } + + @Override + public void setFocus() { + if (fxCanvas != null) { + fxCanvas.setFocus(); + } + } + + private boolean canDisplayTimeline(IExecutionEngine engine) { + if (engine.getExecutionContext().getExecutionMode().equals(ExecutionMode.Run) + && engine.getRunningStatus().equals(RunStatus.Stopped)) { + return true; + } + if (engine.getExecutionContext().getExecutionMode().equals(ExecutionMode.Animation)) { + return true; + } + return false; + } + + private State breakAtVectorState = null; + private int breakAtStateIndex = -1; + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + if (engine != null) { + this.engine = engine; + if (canDisplayTimeline(engine)) { + @SuppressWarnings("rawtypes") + Set traceAddons = engine + .getAddonsTypedBy(IMultiDimensionalTraceAddon.class); + if (!traceAddons.isEmpty()) { + @SuppressWarnings("unchecked") + final IMultiDimensionalTraceAddon, State, TracedObject, Dimension, Value> traceAddon = traceAddons.iterator().next(); + final ITraceExtractor, State, TracedObject, Dimension, Value> extractor = traceAddon.getTraceExtractor(); + final Collection debuggers = engine.getAddonsTypedBy(AbstractGemocDebugger.class); + if (!debuggers.isEmpty()) { + debugger = debuggers.stream().findFirst().get(); + if (breakAtVectorState != null) { + BiPredicate predicate = new BiPredicate() { + final State baseState = breakAtVectorState; + @Override + public boolean test(IExecutionEngine executionEngine, MSEOccurrence mseOccurrence) { + final ITraceExtractor, State, TracedObject, Dimension, Value> traceExtractor = traceAddon.getTraceExtractor(); + final int lastStateIndex = traceExtractor.getStatesTraceLength() - 1; + final State state = traceExtractor.getState(lastStateIndex); + return traceExtractor.compareStates(baseState, state, true); + } + }; + debugger.addPredicateBreak(predicate); + breakAtVectorState = null; + } + if (breakAtStateIndex != -1) { + BiPredicate predicate = new BiPredicate() { + final int stateToBreakTo = breakAtStateIndex; + @Override + public boolean test(IExecutionEngine executionEngine, MSEOccurrence mseOccurrence) { + final int traceLength = extractor.getStatesTraceLength(); + final int stateToBreakTo = this.stateToBreakTo; + final boolean result = traceLength == stateToBreakTo + 1; + return result; + } + }; + debugger.addPredicateBreak(predicate); + breakAtStateIndex = -1; + } + } + this.traceAddon = traceAddon; + timelineRenderer.setTraceExtractor(traceAddon.getTraceExtractor()); + timelineRenderer.setTraceExplorer(traceAddon.getTraceExplorer()); + } + } else { + // TODO + } + } + } + + private void launchConfigFromTrace() { + final LaunchConfiguration launchConfiguration = traceAddon.getTraceExtractor().getLaunchConfiguration(); + final String launchConfigurationType = launchConfiguration.getType(); + final IConfigurationElement[] elements = Platform.getExtensionRegistry() + .getConfigurationElementsFor("org.eclipse.debug.core.launchConfigurationTypes"); + final Optional optElt = Arrays.asList(elements) + .stream().filter(e->e.getAttribute("id").equals(launchConfigurationType)).findFirst(); + if (optElt.isPresent()) { + final IConfigurationElement elt = optElt.get(); + try { + final Object obj = elt.createExecutableExtension("delegate"); + final AbstractGemocLauncher launcher = (AbstractGemocLauncher) obj; + final Map parameters = launcher.parseLaunchConfiguration(launchConfiguration); + final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); + final String launchName = manager.generateLaunchConfigurationName((String) parameters + .get(IRunConfiguration.LAUNCH_SELECTED_LANGUAGE)); + final ILaunchConfigurationType type = manager + .getLaunchConfigurationType(launchConfigurationType); + try { + final ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, launchName); + workingCopy.setAttributes(parameters); + workingCopy.launch("debug", null, false, true); + } catch (CoreException e) { + Activator.error(e.getMessage(), e); + } + } catch (CoreException e1) { + Activator.error(e1.getMessage(), e1); + } + } + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.classpath b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.classpath new file mode 100644 index 000000000..eca7bdba8 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.project b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.project new file mode 100644 index 000000000..a0993d523 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.project @@ -0,0 +1,28 @@ + + + org.eclipse.gemoc.addon.stategraph + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.settings/org.eclipse.jdt.core.prefs b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..0c68a61dc --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/.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/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/META-INF/MANIFEST.MF b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/META-INF/MANIFEST.MF new file mode 100644 index 000000000..a7698d360 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/META-INF/MANIFEST.MF @@ -0,0 +1,53 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.gemoc.addon.stategraph;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-Activator: org.eclipse.gemoc.addon.stategraph.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.fx.ui.workbench3, + org.eclipse.gemoc.executionframework.ui, + org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.gemoc.trace.gemoc.api, + org.eclipse.gemoc.trace.commons.model;bundle-version="0.1.0", + org.eclipse.emf.ecore.xmi, + org.eclipse.gemoc.trace.gemoc;bundle-version="1.0.0", + org.eclipse.elk.core.service;bundle-version="0.1.0", + org.eclipse.elk.graph;bundle-version="0.1.0", + com.google.guava;bundle-version="15.0.0", + org.eclipse.elk.alg.layered;bundle-version="0.1.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: javafx.animation;version="2.0.0", + javafx.application;version="2.0.0", + javafx.beans;version="2.0.0", + javafx.beans.binding;version="2.0.0", + javafx.beans.property;version="2.0.0", + javafx.beans.value;version="2.0.0", + javafx.collections;version="2.0.0", + javafx.concurrent;version="2.0.0", + javafx.embed.swing;version="2.0.0", + javafx.event;version="2.0.0", + javafx.fxml;version="2.0.0", + javafx.geometry;version="2.0.0", + javafx.scene;version="2.0.0", + javafx.scene.chart;version="2.0.0", + javafx.scene.control;version="2.0.0", + javafx.scene.control.cell;version="2.0.0", + javafx.scene.effect;version="2.0.0", + javafx.scene.image;version="2.0.0", + javafx.scene.input;version="2.0.0", + javafx.scene.layout;version="2.0.0", + javafx.scene.media;version="2.0.0", + javafx.scene.paint;version="2.0.0", + javafx.scene.shape;version="2.0.0", + javafx.scene.text;version="2.0.0", + javafx.scene.transform;version="2.0.0", + javafx.scene.web;version="2.0.0", + javafx.stage;version="2.0.0", + javafx.util;version="2.0.0" +Bundle-ActivationPolicy: lazy diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/build.properties b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/build.properties new file mode 100644 index 000000000..4d0fc232b --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2017 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/ diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/IconeGemocModel-16.png b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/IconeGemocModel-16.png new file mode 100644 index 000000000..1fafbd671 Binary files /dev/null and b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/IconeGemocModel-16.png differ diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/cycle_coloration.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/cycle_coloration.gif new file mode 100644 index 000000000..5ba5b91c5 Binary files /dev/null and b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/cycle_coloration.gif differ diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/jload_obj.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/jload_obj.gif new file mode 100644 index 000000000..8c64db638 Binary files /dev/null and b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/jload_obj.gif differ diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/refresh_layout.gif b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/refresh_layout.gif new file mode 100644 index 000000000..3ca04d06f Binary files /dev/null and b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/icons/refresh_layout.gif differ diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/plugin.xml b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/plugin.xml new file mode 100644 index 000000000..c7e4e191a --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/plugin.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/pom.xml b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/pom.xml new file mode 100644 index 000000000..ab71518ea --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/pom.xml @@ -0,0 +1,26 @@ + + + + + 4.0.0 + + + org.eclipse.gemoc.trace.manager + org.eclipse.gemoc.trace.manager.root + 2.3.0-SNAPSHOT + ../.. + + + org.eclipse.gemoc.addon.stategraph + eclipse-plugin + 2.3.0-SNAPSHOT + \ No newline at end of file diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/Activator.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/Activator.java new file mode 100644 index 000000000..584c7b395 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/Activator.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.gemoc.addon.stategraph"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + try { + Class.forName("javafx.embed.swt.FXCanvas"); + super.start(context); + plugin = this; + } catch (ClassNotFoundException e) { + ErrorDialog.openError(null,"State Graph Unavailable", "Please install JavaFX or use the Oracle JRE", + new Status(IStatus.ERROR,PLUGIN_ID,"JavaFX is needed for the timeline to work")); + } + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutCommand.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutCommand.java new file mode 100644 index 000000000..949322822 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutCommand.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.layout; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import org.eclipse.elk.alg.layered.p2layers.LayeringStrategy; +import org.eclipse.elk.alg.layered.properties.LayeredOptions; +import org.eclipse.elk.core.LayoutConfigurator; +import org.eclipse.elk.core.options.CoreOptions; +import org.eclipse.elk.core.service.DiagramLayoutEngine; +import org.eclipse.elk.core.service.DiagramLayoutEngine.Parameters; +import org.eclipse.elk.graph.KNode; +import org.eclipse.elk.graph.properties.Property; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.gemoc.addon.stategraph.logic.StateVertex; +import org.eclipse.gemoc.addon.stategraph.views.VertexView; + +public class StateGraphLayoutCommand { + + final private IWorkbenchPart workbenchPart; + + final private Property> VERTEX2SHAPE_MAP = new Property>( + "vertex.to.shape.map", new HashMap<>()); + + public StateGraphLayoutCommand(IWorkbenchPart workbenchPart) { + this.workbenchPart = workbenchPart; + } + + public void applyLayout(Map nodeToShape, Set movedVertice) { + Parameters params = new Parameters(); + LayoutConfigurator configurator = new LayoutConfigurator(); + configurator.configure(KNode.class) + .setProperty(CoreOptions.ALGORITHM, "org.eclipse.elk.layered") + .setProperty(LayeredOptions.LAYERING_STRATEGY, LayeringStrategy.COFFMAN_GRAHAM) + .setProperty(LayeredOptions.LAYERING_COFFMAN_GRAHAM_LAYER_BOUND, 5) + .setProperty(CoreOptions.SPACING_NODE, 50.0f) + .setProperty(VERTEX2SHAPE_MAP, nodeToShape); + params.addLayoutRun(configurator); + DiagramLayoutEngine.invokeLayout(workbenchPart, null, params); + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutConnector.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutConnector.java new file mode 100644 index 000000000..e663ee77c --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutConnector.java @@ -0,0 +1,119 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.layout; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +import org.eclipse.elk.core.klayoutdata.KShapeLayout; +import org.eclipse.elk.core.math.KVector; +import org.eclipse.elk.core.options.CoreOptions; +import org.eclipse.elk.core.service.IDiagramLayoutConnector; +import org.eclipse.elk.core.service.LayoutMapping; +import org.eclipse.elk.core.util.ElkUtil; +import org.eclipse.elk.graph.KEdge; +import org.eclipse.elk.graph.KGraphElement; +import org.eclipse.elk.graph.KNode; +import org.eclipse.elk.graph.properties.IPropertyHolder; +import org.eclipse.elk.graph.properties.Property; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.gemoc.addon.stategraph.logic.DirectedGraph; +import org.eclipse.gemoc.addon.stategraph.logic.StateGraph; +import org.eclipse.gemoc.addon.stategraph.logic.StateVertex; +import org.eclipse.gemoc.addon.stategraph.views.StateGraphViewPart; +import org.eclipse.gemoc.addon.stategraph.views.VertexView; + +public class StateGraphLayoutConnector implements IDiagramLayoutConnector { + + @Override + public LayoutMapping buildLayoutGraph(IWorkbenchPart workbenchPart, Object diagramPart) { + + StateGraphViewPart layoutRootPart = null; + + if (!(workbenchPart instanceof StateGraphViewPart)) { + return null; + } + + layoutRootPart = (StateGraphViewPart) workbenchPart; + final StateGraph stateGraph = layoutRootPart.getStateGraph(); + LayoutMapping mapping = new LayoutMapping(workbenchPart); + mapping.setParentElement(layoutRootPart); + + KNode topNode = ElkUtil.createInitializedNode(); + mapping.getGraphMap().put(topNode, layoutRootPart); + mapping.setLayoutGraph(topNode); + + final Set movedVertice = layoutRootPart.getMovedVertice(); + + final List vertice = new ArrayList<>(stateGraph.getVertice()); + vertice.removeAll(movedVertice); + + for (StateVertex vertex : vertice) { + KNode node = createNode(mapping, vertex, topNode); + mapping.getGraphMap().put(node, vertex); + } + + List> edges = stateGraph.getEdges().stream() + .filter(e -> !movedVertice.contains(e.getSource()) && !movedVertice.contains(e.getTarget())) + .collect(Collectors.toList()); + + for (DirectedGraph.Edge edge : edges) { + KEdge kEdge = createEdge(mapping, edge); + mapping.getGraphMap().put(kEdge, edge); + } + + return mapping; + } + + private KNode createNode(final LayoutMapping mapping, final StateVertex nodeStateVertex, final KNode rootNode) { + KNode childLayoutNode = ElkUtil.createInitializedNode(); + rootNode.getChildren().add(childLayoutNode); + KShapeLayout nodeLayout = childLayoutNode.getData(KShapeLayout.class); + nodeLayout.setSize(24, 24); + ((KShapeLayout) nodeLayout).resetModificationFlag(); + nodeLayout.setProperty(CoreOptions.NODE_SIZE_MINIMUM, new KVector(24, 24)); + mapping.getGraphMap().put(childLayoutNode, nodeStateVertex); + return childLayoutNode; + } + + private KEdge createEdge(final LayoutMapping mapping, final DirectedGraph.Edge edge) { + KEdge layoutEdge = ElkUtil.createInitializedEdge(); + layoutEdge.setSource((KNode) mapping.getGraphMap().inverse().get(edge.getSource())); + layoutEdge.setTarget((KNode) mapping.getGraphMap().inverse().get(edge.getTarget())); + mapping.getGraphMap().put(layoutEdge, edge); + return layoutEdge; + } + + final private Property> VERTEX2SHAPE_MAP = new Property>( + "vertex.to.shape.map", new HashMap<>()); + + @Override + public void applyLayout(LayoutMapping layoutMapping, IPropertyHolder propertyHolder) { + for (Entry entry : layoutMapping.getGraphMap().entrySet()) { + final KShapeLayout layout = entry.getKey().getData(KShapeLayout.class); + if (layout != null) { + final double xPos = layout.getXpos(); + final double yPos = layout.getYpos(); + Map map = layout.getProperty(VERTEX2SHAPE_MAP); + Optional.ofNullable(map.get(entry.getValue())).ifPresent(v -> { + v.setTranslateX(xPos); + v.setTranslateY(yPos); + }); + } + } + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutSetup.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutSetup.java new file mode 100644 index 000000000..1758aedda --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/layout/StateGraphLayoutSetup.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.layout; + +import java.util.Collection; + +import org.eclipse.elk.core.service.IDiagramLayoutConnector; +import org.eclipse.elk.core.service.ILayoutSetup; +import org.eclipse.gemoc.addon.stategraph.logic.StateVertex; +import org.eclipse.gemoc.addon.stategraph.views.StateGraphViewPart; + +import com.google.inject.Binder; +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.google.inject.Module; +import com.google.inject.util.Modules; + +public class StateGraphLayoutSetup implements ILayoutSetup { + + public Injector createInjector(final Module defaultModule) { + return Guice.createInjector(Modules.override(defaultModule).with(new StateGraphLayoutModule())); + } + + public static class StateGraphLayoutModule implements Module { + @Override + public void configure(final Binder binder) { + binder.bind(IDiagramLayoutConnector.class).to(StateGraphLayoutConnector.class); + } + } + + @Override + public boolean supports(Object object) { + if (object instanceof Collection) { + for (Object o : (Collection) object) { + if (o instanceof StateVertex) { + return true; + } + } + return false; + } + return object instanceof StateGraphViewPart || object instanceof StateVertex; + } +} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/DirectedGraph.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/DirectedGraph.java similarity index 87% rename from trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/DirectedGraph.java rename to trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/DirectedGraph.java index b71ac3cfd..787fdfe05 100644 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/DirectedGraph.java +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/DirectedGraph.java @@ -1,4 +1,14 @@ -package org.gemoc.sequential_addons.stategraph.logic; +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.logic; import java.util.ArrayList; import java.util.Collections; diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/StateGraph.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/StateGraph.java new file mode 100644 index 000000000..4b7b508aa --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/StateGraph.java @@ -0,0 +1,265 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.logic; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.function.BiConsumer; + +import org.eclipse.emf.ecore.EObject; + +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.TracedObject; +import org.eclipse.gemoc.trace.commons.model.trace.Value; +import org.eclipse.gemoc.trace.gemoc.api.ITraceExplorer; +import org.eclipse.gemoc.trace.gemoc.api.ITraceExtractor; +import org.eclipse.gemoc.trace.gemoc.api.ITraceListener; +import org.eclipse.gemoc.trace.gemoc.api.ITraceViewListener; + +public class StateGraph extends DirectedGraphimplements ITraceViewListener, ITraceListener { + + private ITraceExplorer, State, TracedObject, Dimension, Value> traceExplorer; + private ITraceExtractor, State, TracedObject, Dimension, Value> traceExtractor; + + private final Map, StateVertex> stateToNode = new HashMap<>(); + + private final Map, State> stateToEquivalentState = new HashMap<>(); + + private final List> equivalentStates = new ArrayList<>(); + + private BiConsumer renderCommand = null; + + public void setTraceExtractor(ITraceExtractor, State, TracedObject, Dimension, Value> traceExtractor) { + if (this.traceExtractor != null) { + this.traceExtractor.removeListener(this); + } + this.traceExtractor = traceExtractor; + if (this.traceExtractor != null) { + this.traceExtractor.registerCommand(this, () -> updateGraph()); + } + } + + public void setTraceExplorer(ITraceExplorer, State, TracedObject, Dimension, Value> traceExplorer) { + if (this.traceExplorer != null) { + this.traceExplorer.removeListener(this); + } + this.traceExplorer = traceExplorer; + if (this.traceExplorer != null) { + this.traceExplorer.registerCommand(this, () -> updateCurrentState()); + } + } + + public void setUpdateCommand(BiConsumer command) { + renderCommand = command; + } + + private final List ignoredValueTraces = new ArrayList<>(); + + private void updateGraph() { + // Finding out whether the list of ignored values has changed + final List newIgnoredValueTraces = new ArrayList<>(); + for (Dimension dimension : traceExtractor.getDimensions()) { + newIgnoredValueTraces.add(traceExtractor.isDimensionIgnored(dimension)); + } + // If it did we have to recompute the graph + if (!newIgnoredValueTraces.equals(ignoredValueTraces)) { + ignoredValueTraces.clear(); + ignoredValueTraces.addAll(newIgnoredValueTraces); + computeStateSpace(); + render(false, null); + } + } + + private void updateCurrentState() { + StateVertex currentNode = null; + if (traceExplorer != null) { + final State currentState = traceExplorer.getCurrentState(); + if (currentState != null) { + final EObject equivalentState = stateToEquivalentState.get(currentState); + currentNode = stateToNode.get(equivalentState); + } + } + render(false, currentNode); + } + + @Override + public void update() { + } + + private void updateEquivalentStates(Collection>> equivalenceClasses) { + equivalenceClasses.forEach(l -> { + State equivalentState = null; + for (State state : l) { + if (equivalentStates.contains(state)) { + equivalentState = state; + break; + } + } + if (equivalentState == null) { + if (l.isEmpty()) { + return; + } + // The current equivalence class does not yet have + // a dedicated vertex, we thus add its first state + // to the list of equivalent states. + equivalentState = l.remove(0); + equivalentStates.add(equivalentState); + } else { + // The current equivalence class does have a + // dedicated vertex. + l.remove(equivalentState); + l.forEach(s -> { + equivalentStates.remove(s); + // Cleaning up old vertice in case the equivalence class of + // the state changed. + removeVertex(stateToNode.remove(s)); + }); + } + stateToEquivalentState.put(equivalentState, equivalentState); + for (State otherState : l) { + stateToEquivalentState.put(otherState, equivalentState); + } + }); + } + + private void computeStateSpace() { + stateToEquivalentState.clear(); + List>> equivalenceClasses = traceExtractor.computeStateEquivalenceClasses(); + updateEquivalentStates(equivalenceClasses); + + final int n = traceExtractor.getStatesTraceLength(); + final List> steps = traceExtractor.getSteps(0, n); + final List> addedEdges = new ArrayList<>(); + + while (!steps.isEmpty()) { + final Step step = steps.remove(0); + final List> subSteps = traceExtractor.getSubSteps(step); + if (step.getEndingState() != null && subSteps.isEmpty()) { + final State startingState = step.getStartingState(); + final State endingState = step.getEndingState(); + final Edge addedEdge = addEdge(startingState, endingState, step); + if (addedEdge != null) { + addedEdges.add(addedEdge); + } + } + steps.addAll(0, subSteps); + } + + final List> edgesToRemove = new ArrayList<>(getEdges()); + edgesToRemove.removeAll(addedEdges); + edgesToRemove.forEach(e -> removeEdge(e)); + } + + public Edge addEdge(State startState, State endState, Step step) { + final State equivalentStartState = stateToEquivalentState.get(startState); + final State equivalentEndState = stateToEquivalentState.get(endState); + if (equivalentEndState == equivalentStartState || equivalentStartState == null || equivalentEndState == null) { + return null; + } + StateVertex startNode = null; + StateVertex endNode = null; + for (Entry, StateVertex> entry : stateToNode.entrySet()) { + final EObject entryState = entry.getKey(); + if (startNode == null) { + if (equivalentStartState == entryState) { + startNode = entry.getValue(); + continue; + } + } + + if (endNode == null) { + if (equivalentEndState == entryState) { + endNode = entry.getValue(); + } + } + + if (startNode != null && endNode != null) { + break; + } + } + + if (startNode == null) { + startNode = addVertex(new StateVertex(traceExtractor.getStateDescription(startState), traceExtractor.getStateIndex(startState))); + stateToNode.put(equivalentStartState, startNode); + } else { + final int startIndex = traceExtractor.getStateIndex(equivalentStartState); + final String description = traceExtractor.getStateDescription(equivalentStartState); + startNode.setTooltip(description); + startNode.setIndex(startIndex); + } + if (endNode == null) { + endNode = addVertex(new StateVertex(traceExtractor.getStateDescription(endState), traceExtractor.getStateIndex(endState))); + stateToNode.put(equivalentEndState, endNode); + } else { + final int endIndex = traceExtractor.getStateIndex(equivalentEndState); + final String description = traceExtractor.getStateDescription(equivalentEndState); + endNode.setTooltip(description); + endNode.setIndex(endIndex); + } + + Edge result = getEdge(startNode, endNode); + + if (result == null) { + result = addEdge(startNode, endNode); + } + return result; + } + + public void clear() { + stateToNode.clear(); + if (renderCommand != null) { + renderCommand.accept(true, null); + } + update(); + } + + private void render(boolean clear, StateVertex currentVertex) { + if (renderCommand != null) { + renderCommand.accept(clear, currentVertex); + } + } + + @Override + public void statesAdded(List> states) { + List>> equivalenceClasses = traceExtractor.computeStateEquivalenceClasses(); + updateEquivalentStates(equivalenceClasses); + render(false, null); + } + + @Override + public void stepsEnded(List> steps) { + for (Step step : steps) { + addEdge(step.getStartingState(), step.getEndingState(), step); + } + render(false, null); + } + + @Override + public void stepsStarted(List> steps) { + // Nothing to do here. + }; + + @Override + public void valuesAdded(List> values) { + // TODO Auto-generated method stub + } + + @Override + public void dimensionsAdded(List> dimensions) { + // TODO Auto-generated method stub + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/StateVertex.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/StateVertex.java new file mode 100644 index 000000000..e257e2fda --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/StateVertex.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.logic; + +import java.util.function.Consumer; + +public class StateVertex { + + private String tooltip; + private int index; + private Consumer command; + + public StateVertex() { + } + + public StateVertex(String tooltip, int index) { + this.tooltip = tooltip; + } + + public String getTooltip() { + return tooltip; + } + + public void setTooltip(String tooltip) { + this.tooltip = tooltip; + if (command != null) { + command.accept(tooltip); + } + } + + public void setOnTooltipUpdateCommand(Consumer command) { + this.command = command; + } + + public int getIndex() { + return index; + } + + public void setIndex(int index) { + this.index = index; + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/IHullAlgorithm.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/IHullAlgorithm.java new file mode 100644 index 000000000..391fe559e --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/IHullAlgorithm.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.logic.alg; + +import java.util.List; + +public interface IHullAlgorithm { + List convexHull(List points); +} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/JarvisMarch.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/JarvisMarch.java similarity index 76% rename from trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/JarvisMarch.java rename to trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/JarvisMarch.java index c012834d8..3244a7a1e 100644 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/JarvisMarch.java +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/JarvisMarch.java @@ -1,4 +1,14 @@ -package org.gemoc.sequential_addons.stategraph.logic.alg; +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.logic.alg; import java.util.ArrayList; import java.util.List; diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/JohnsonSimpleCycles.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/JohnsonSimpleCycles.java similarity index 89% rename from trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/JohnsonSimpleCycles.java rename to trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/JohnsonSimpleCycles.java index 106fd3474..44256aece 100644 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/JohnsonSimpleCycles.java +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/logic/alg/JohnsonSimpleCycles.java @@ -1,4 +1,14 @@ -package org.gemoc.sequential_addons.stategraph.logic.alg; +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.logic.alg; import java.util.ArrayDeque; import java.util.ArrayList; @@ -9,8 +19,8 @@ import java.util.Map; import java.util.Set; -import org.gemoc.sequential_addons.stategraph.logic.DirectedGraph; -import org.gemoc.sequential_addons.stategraph.logic.DirectedGraph.Edge; +import org.eclipse.gemoc.addon.stategraph.logic.DirectedGraph; +import org.eclipse.gemoc.addon.stategraph.logic.DirectedGraph.Edge; public class JohnsonSimpleCycles { // The graph diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/CurvedEdgeView.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/CurvedEdgeView.java new file mode 100644 index 000000000..51350d990 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/CurvedEdgeView.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.views; + +import javafx.beans.binding.DoubleBinding; +import javafx.beans.property.DoubleProperty; +import javafx.beans.value.ChangeListener; +import javafx.scene.paint.Color; +import javafx.scene.shape.Polygon; +import javafx.scene.shape.QuadCurve; + +public class CurvedEdgeView extends EdgeView { + + public CurvedEdgeView(final DoubleProperty sX, final DoubleProperty sY, final DoubleProperty eX, + final DoubleProperty eY) { + super(sX, sY, eX, eY); + + final DoubleBinding cX = new DoubleBinding() { + + { + super.bind(sX, eX, a); + } + + @Override + protected double computeValue() { + final double tX = (sX.get() + eX.get()) / 2; + return tX + 20 * Math.cos(a.get() - Math.PI / 2); + } + }; + + final DoubleBinding cY = new DoubleBinding() { + + { + super.bind(sY, eY, a); + } + + @Override + protected double computeValue() { + final double tY = (sY.get() + eY.get()) / 2; + return tY + 20 * Math.sin(a.get() - Math.PI / 2); + } + }; + + final DoubleBinding aX = new DoubleBinding() { + + { + super.bind(sX, eX, cX); + } + + @Override + protected double computeValue() { + return .25 * sX.get() + .5 * cX.get() + 0.25 * eX.get(); + } + }; + + final DoubleBinding aY = new DoubleBinding() { + + { + super.bind(sY, eY, cY); + } + + @Override + protected double computeValue() { + return .25 * sY.get() + .5 * cY.get() + 0.25 * eY.get(); + } + }; + + QuadCurve quadCurve = new QuadCurve(); + quadCurve.setStrokeWidth(1.5); + quadCurve.setStroke(Color.BLUE); + quadCurve.setFill(Color.TRANSPARENT); + quadCurve.startXProperty().bind(sX); + quadCurve.startYProperty().bind(sY); + quadCurve.endXProperty().bind(eX); + quadCurve.endYProperty().bind(eY); + quadCurve.controlXProperty().bind(cX); + quadCurve.controlYProperty().bind(cY); + + Polygon arrow = new Polygon(); + arrow.setFill(Color.BLUE); + final ChangeListener listener = (_0, _1, _2) -> { + final double angle = a.get() + Math.PI; + final double x = aX.get(); + final double y = aY.get(); + final double x0 = x + 5 * Math.cos(angle); + final double x1 = x + 5 * Math.cos(angle + 2 * Math.PI / 3); + final double x2 = x + 5 * Math.cos(angle - 2 * Math.PI / 3); + final double y0 = y + 5 * Math.sin(angle); + final double y1 = y + 5 * Math.sin(angle + 2 * Math.PI / 3); + final double y2 = y + 5 * Math.sin(angle - 2 * Math.PI / 3); + arrow.getPoints().clear(); + arrow.getPoints().addAll(x0, y0, x1, y1, x2, y2); + }; + + aX.addListener(listener); + aY.addListener(listener); + a.addListener(listener); + + getChildren().addAll(quadCurve, arrow); + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/CycleView.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/CycleView.java new file mode 100644 index 000000000..da8c24a64 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/CycleView.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.views; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gemoc.addon.stategraph.logic.alg.IHullAlgorithm; +import org.eclipse.gemoc.addon.stategraph.logic.alg.JarvisMarch; + +import javafx.beans.value.ChangeListener; +import javafx.scene.Node; +import javafx.scene.paint.Color; +import javafx.scene.paint.Paint; +import javafx.scene.shape.Polygon; +import javafx.scene.shape.StrokeLineJoin; +import javafx.scene.shape.StrokeType; + +public class CycleView extends Polygon { + + private final static IHullAlgorithm HULL_ALGORITHM = new JarvisMarch(); + + public CycleView(final List nodes, final int cycleIndex, final double hueInterval) { + Paint p = Color.hsb(cycleIndex * hueInterval, 0.75, 0.70, 0.25); + setFill(p); + setStroke(p); + setStrokeWidth(20); + setStrokeLineJoin(StrokeLineJoin.ROUND); + setStrokeType(StrokeType.OUTSIDE); + updateHull(nodes, HULL_ALGORITHM); + final ChangeListener listener = (_0, _1, _2) -> { + updateHull(nodes, HULL_ALGORITHM); + }; + for (Node n : nodes) { + n.translateXProperty().addListener(listener); + n.translateYProperty().addListener(listener); + } + } + + private void updateHull(List nodes, IHullAlgorithm hullAlgo) { + List points = new ArrayList<>(); + + for (Node n : nodes) { + points.add(new double[] { n.getTranslateX(), n.getTranslateY() }); + } + + List coordinates = new ArrayList<>(); + if (points.size() <= 3) { + for (double[] point : points) { + coordinates.add(point[0]); + coordinates.add(point[1]); + } + } else { + for (double[] point : hullAlgo.convexHull(points)) { + coordinates.add(point[0]); + coordinates.add(point[1]); + } + } + + getPoints().clear(); + getPoints().addAll(coordinates); + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/EdgeView.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/EdgeView.java new file mode 100644 index 000000000..0cde5327d --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/EdgeView.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.views; + +import javafx.beans.binding.DoubleBinding; +import javafx.beans.property.DoubleProperty; +import javafx.scene.Group; + +public abstract class EdgeView extends Group { + + protected final DoubleBinding a; + + public EdgeView(final DoubleProperty sX, final DoubleProperty sY, final DoubleProperty eX, + final DoubleProperty eY) { + a = new DoubleBinding() { + private final DoubleBinding dX = sX.subtract(eX); + private final DoubleBinding dY = sY.subtract(eY); + + { + super.bind(dX, dY); + } + + @Override + protected double computeValue() { + return Math.atan2(dY.get(), dX.get()); + } + }; + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StateGraphRenderer.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StateGraphRenderer.java new file mode 100644 index 000000000..fe40281a2 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StateGraphRenderer.java @@ -0,0 +1,235 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.views; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import org.eclipse.gemoc.addon.stategraph.layout.StateGraphLayoutCommand; +import org.eclipse.gemoc.addon.stategraph.logic.DirectedGraph.Edge; +import org.eclipse.gemoc.addon.stategraph.logic.StateGraph; +import org.eclipse.gemoc.addon.stategraph.logic.StateVertex; +import org.eclipse.gemoc.addon.stategraph.logic.alg.JohnsonSimpleCycles; + +import javafx.application.Platform; +import javafx.scene.Group; +import javafx.scene.Node; +import javafx.scene.layout.Background; +import javafx.scene.layout.BackgroundFill; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; + +public class StateGraphRenderer extends Pane { + + private StateGraph stateGraph; + + final private StateGraphLayoutCommand layoutCommand; + + final private Map nodeToGroup = new HashMap<>(); + + final private Map, EdgeView> edgeToGroup = new HashMap<>(); + + final private Set movedVertice = new HashSet<>(); + + final private List hulls = new ArrayList<>(); + + final private JohnsonSimpleCycles cycleFindingAlgorithm; + + public StateGraphRenderer(StateGraph stateGraph, StateGraphLayoutCommand layoutCommand) { + this.layoutCommand = layoutCommand; + this.stateGraph = stateGraph; + this.stateGraph.setUpdateCommand((clear, currentVertex) -> render(clear, currentVertex)); + setBackground(new Background(new BackgroundFill(Color.WHITE, null, null))); + cycleFindingAlgorithm = new JohnsonSimpleCycles<>(this.stateGraph); + } + + public void setStateGraph(final StateGraph stateGraph) { + this.stateGraph = stateGraph; + this.stateGraph.setUpdateCommand((clear, currentVertex) -> render(clear, currentVertex)); + cycleFindingAlgorithm.setGraph(this.stateGraph); + } + + private boolean changed = false; + private StateVertex currentVertex = null; + + private void render(boolean clear, StateVertex currentVertex) { + if (currentVertex != null) { + this.currentVertex = currentVertex; + } + Platform.runLater(() -> { + + if (clear) { + changed = true; + getChildren().clear(); + nodeToGroup.clear(); + edgeToGroup.clear(); + } + + final Map, StateVertex> workList = new HashMap<>(); + final List vertexShapesToAdd = new ArrayList<>(); + final List edgeShapesToAdd = new ArrayList<>(); + final List vertice = stateGraph.getVertice().stream() + .sorted((v1, v2) -> {return v1.getIndex() - v2.getIndex();}) + .collect(Collectors.toList()); + final List verticeToRemove = new ArrayList<>(nodeToGroup.keySet()); + verticeToRemove.removeAll(vertice); + + if (!verticeToRemove.isEmpty()) { + changed = true; + } + + verticeToRemove.forEach(n -> { + final VertexView vertexShape = nodeToGroup.get(n); + nodeToGroup.remove(n); + if (vertexShape != null) { + getChildren().remove(vertexShape); + } + }); + + for (int i = 0; i < vertice.size(); i++) { + final StateVertex v = vertice.get(i); + VertexView vertexShape = nodeToGroup.get(v); + if (vertexShape == null) { + changed = true; + vertexShape = new VertexView(i, v); + nodeToGroup.put(v, vertexShape); + vertexShapesToAdd.add(vertexShape); + } + vertexShape.setCurrentState(currentVertex == v); + vertexShape.setStateIndex(i); + + for (Edge e : stateGraph.getOutgoingEdges(v)) { + workList.put(e, v); + } + } + + final List> edgesToRemove = new ArrayList<>(edgeToGroup.keySet()); + + for (StateVertex v : vertice) { + for (Edge e : stateGraph.getIncomingEdges(v)) { + final StateVertex w = workList.get(e); + if (w != null && v != w) { + final Edge reverseEdge = stateGraph.getEdge(v, w); + if (reverseEdge != null) { + EdgeView edgeGroup = edgeToGroup.get(e); + if (edgeGroup == null || edgeGroup instanceof StraightEdgeView) { + changed = true; + if (edgeGroup != null) { + getChildren().remove(edgeGroup); + } + final VertexView source = nodeToGroup.get(w); + final VertexView target = nodeToGroup.get(v); + edgeGroup = new CurvedEdgeView(source.translateXProperty(), source.translateYProperty(), + target.translateXProperty(), target.translateYProperty()); + edgeToGroup.put(e, edgeGroup); + edgeShapesToAdd.add(edgeGroup); + } + edgesToRemove.remove(e); + EdgeView reverseEdgeGroup = edgeToGroup.get(reverseEdge); + if (reverseEdgeGroup == null || reverseEdgeGroup instanceof StraightEdgeView) { + changed = true; + if (reverseEdgeGroup != null) { + getChildren().remove(reverseEdgeGroup); + } + final VertexView source = nodeToGroup.get(v); + final VertexView target = nodeToGroup.get(w); + reverseEdgeGroup = new CurvedEdgeView(source.translateXProperty(), source.translateYProperty(), + target.translateXProperty(), target.translateYProperty()); + edgeToGroup.put(reverseEdge, reverseEdgeGroup); + edgeShapesToAdd.add(reverseEdgeGroup); + } + edgesToRemove.remove(reverseEdge); + } else { + EdgeView edgeGroup = edgeToGroup.get(e); + if (edgeGroup == null || edgeGroup instanceof CurvedEdgeView) { + changed = true; + if (edgeGroup != null) { + getChildren().remove(edgeGroup); + } + final VertexView source = nodeToGroup.get(w); + final VertexView target = nodeToGroup.get(v); + edgeGroup = new StraightEdgeView(source.translateXProperty(), source.translateYProperty(), + target.translateXProperty(), target.translateYProperty()); + edgeToGroup.put(e, edgeGroup); + edgeShapesToAdd.add(edgeGroup); + } + edgesToRemove.remove(e); + } + } + } + } + + if (!edgesToRemove.isEmpty()) { + changed = true; + } + + edgesToRemove.forEach(e -> { + final Group edgeGroup = edgeToGroup.get(e); + edgeToGroup.remove(e); + if (edgeGroup != null) { + getChildren().remove(edgeGroup); + } + }); + + getChildren().addAll(0, edgeShapesToAdd); + getChildren().addAll(vertexShapesToAdd); + + if (changed) { + layoutCommand.applyLayout(nodeToGroup, movedVertice); + } + + if (!isCycleColorationEnabled) { + getChildren().removeAll(hulls); + hulls.clear(); + } else if (changed) { + getChildren().removeAll(hulls); + hulls.clear(); + final List> cycles = cycleFindingAlgorithm.findSimpleCycles(); + if (!cycles.isEmpty()) { + double hueInterval = 360. / (double) cycles.size(); + for (int i = 0; i < cycles.size(); i++) { + List nodes = cycles.get(i).stream().map(v -> (Node) nodeToGroup.get(v)) + .collect(Collectors.toList()); + CycleView cycleView = new CycleView(nodes, i, hueInterval); + getChildren().add(0, cycleView); + hulls.add(cycleView); + } + } + } + + changed = false; + }); + } + + private boolean isCycleColorationEnabled = false; + + public void setCycleColorationEnabled(boolean checked) { + if (isCycleColorationEnabled != checked) { + isCycleColorationEnabled = checked; + changed = true; + render(false, currentVertex); + } + } + + public void forceLayout() { + movedVertice.clear(); + Platform.runLater(() -> layoutCommand.applyLayout(nodeToGroup, movedVertice)); + } + + public Set getMovedVertice() { + return movedVertice; + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StateGraphViewPart.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StateGraphViewPart.java new file mode 100644 index 000000000..c28dea1b0 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StateGraphViewPart.java @@ -0,0 +1,268 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.views; + +import java.util.Map; +import java.util.Set; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.Platform; +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.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IActionBars; +import org.eclipse.gemoc.executionframework.ui.views.engine.EngineSelectionDependentViewPart; +import org.eclipse.gemoc.executionframework.ui.views.engine.actions.AbstractEngineAction; +import org.eclipse.gemoc.addon.stategraph.Activator; +import org.eclipse.gemoc.addon.stategraph.layout.StateGraphLayoutCommand; +import org.eclipse.gemoc.addon.stategraph.logic.StateGraph; +import org.eclipse.gemoc.addon.stategraph.logic.StateVertex; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; + +import org.eclipse.gemoc.trace.gemoc.api.IMultiDimensionalTraceAddon; +import org.eclipse.gemoc.trace.gemoc.traceaddon.AbstractTraceAddon; +import javafx.embed.swt.FXCanvas; +import javafx.scene.Cursor; +import javafx.scene.Scene; +import javafx.scene.layout.Background; +import javafx.scene.layout.BackgroundFill; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; + +public class StateGraphViewPart extends EngineSelectionDependentViewPart { + + public static final String ID = "org.eclipse.gemoc.addon.multidimensional.timeline.views.timeline.StateGraphViewPart"; + + private FXCanvas fxCanvas; + + private StateGraphRenderer renderer; + + private StateGraph stateGraph; + + private Pane root; + + private double mouseX; + + private double mouseY; + + public StateGraph getStateGraph() { + return stateGraph; + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + if (engine != null) { + Set traceAddons = engine.getAddonsTypedBy(IMultiDimensionalTraceAddon.class); + if (!traceAddons.isEmpty()) { + final IMultiDimensionalTraceAddon traceAddon = traceAddons.iterator().next(); + stateGraph = new StateGraph(); + stateGraph.setTraceExtractor(traceAddon.getTraceExtractor()); + stateGraph.setTraceExplorer(traceAddon.getTraceExplorer()); + traceAddon.getTraceNotifier().addListener(stateGraph); + renderer.setStateGraph(stateGraph); + stateGraph.update(); + } + } + } + + private void setupRoot() { + stateGraph = new StateGraph(); + renderer = new StateGraphRenderer(stateGraph, new StateGraphLayoutCommand(this)); + root.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null))); + root.getChildren().add(renderer); + renderer.minWidthProperty().bind(root.widthProperty()); + renderer.prefWidthProperty().bind(root.widthProperty()); + renderer.maxWidthProperty().bind(root.widthProperty()); + renderer.minHeightProperty().bind(root.heightProperty()); + renderer.prefHeightProperty().bind(root.heightProperty()); + renderer.maxHeightProperty().bind(root.heightProperty()); + + root.setOnMousePressed(event -> { + root.setCursor(Cursor.MOVE); + mouseX = event.getX(); + mouseY = event.getY(); + event.consume(); + }); + + root.setOnMouseReleased(event -> { + root.setCursor(Cursor.DEFAULT); + }); + + root.setOnMouseDragged(event -> { + double deltaX = event.getX() - mouseX; + double deltaY = event.getY() - mouseY; + renderer.setTranslateX(renderer.getTranslateX() + deltaX); + renderer.setTranslateY(renderer.getTranslateY() + deltaY); + mouseX = event.getX(); + mouseY = event.getY(); + event.consume(); + }); + } + + @Override + public void createPartControl(Composite parent) { + fxCanvas = new FXCanvas(parent, SWT.NONE); + root = new Pane(); + final Scene scene = new Scene(root); + fxCanvas.setScene(scene); + setupRoot(); + buildMenu(parent.getShell()); + } + + private void buildMenu(Shell shell) { + addActionToToolbar(new AbstractEngineAction(Action.AS_CHECK_BOX) { + @Override + protected void init() { + super.init(); + setText("Toggle Cycle Coloration"); + setToolTipText("Toggle Cycle Coloration"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, + "icons/cycle_coloration.gif"); + setImageDescriptor(id); + setEnabled(true); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + renderer.setCycleColorationEnabled(isChecked()); + } + }); + + addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { + @Override + protected void init() { + super.init(); + setText("Refresh Layout"); + setToolTipText("Refresh Layout"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, + "icons/refresh_layout.gif"); + setImageDescriptor(id); + setEnabled(true); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + renderer.forceLayout(); + } + }); + + addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { + + private FileDialog fileDialog; + + @Override + protected void init() { + super.init(); + setText("Open Trace"); + setToolTipText("Open Trace"); + ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/jload_obj.gif"); + setImageDescriptor(id); + setEnabled(true); + + fileDialog = new FileDialog(shell, SWT.OPEN); + fileDialog.setFilterExtensions(new String[] { "*.trace" }); + } + + @Override + public void engineSelectionChanged(IExecutionEngine engine) { + } + + @Override + public void run() { + fileDialog.setText("Open Trace"); + String filePath = fileDialog.open(); + + if (filePath != null && !filePath.equals("")) { + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("trace", new XMIResourceFactoryImpl()); + + ResourceSet resSet = new ResourceSetImpl(); + URI filePath1URI = URI.createFileURI(filePath); + Resource traceResource = resSet.getResource(filePath1URI, true); + EcoreUtil.resolveAll(traceResource); + AbstractTraceAddon newTraceAddon = null; + try { + IExtensionRegistry extReg = Platform.getExtensionRegistry(); + IExtensionPoint ep = extReg + .getExtensionPoint("org.gemoc.gemoc_language_workbench.engine_addon"); + IExtension[] extensions = ep.getExtensions(); + for (int i = 0; i < extensions.length && newTraceAddon == null; i++) { + IExtension ext = extensions[i]; + IConfigurationElement[] confElements = ext.getConfigurationElements(); + for (int j = 0; j < confElements.length; j++) { + IConfigurationElement confElement = confElements[j]; + String attr = confElement.getAttribute("Class"); + if (attr != null) { + Object obj = confElement.createExecutableExtension("Class"); + if (obj instanceof AbstractTraceAddon) { + AbstractTraceAddon obj_cast = (AbstractTraceAddon) obj; + if (obj_cast.isAddonForTrace(traceResource.getContents().get(0))) { + newTraceAddon = obj_cast; + break; + } + } + } + } + } + } catch (CoreException e) { + e.printStackTrace(); + } + + if (newTraceAddon != null) { + newTraceAddon.load(traceResource); + stateGraph.setTraceExtractor(newTraceAddon.getTraceExtractor()); + stateGraph.update(); + } + } + } + }); + } + + private void addActionToToolbar(Action action) { + IActionBars actionBars = getViewSite().getActionBars(); + IToolBarManager toolBar = actionBars.getToolBarManager(); + toolBar.add(action); + } + + public Set getMovedVertice() { + return renderer.getMovedVertice(); + } + + @Override + public void setFocus() { + if (fxCanvas != null) { + fxCanvas.setFocus(); + } + } +} \ No newline at end of file diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StraightEdgeView.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StraightEdgeView.java new file mode 100644 index 000000000..94799ceb9 --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/StraightEdgeView.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.views; + +import javafx.beans.binding.DoubleBinding; +import javafx.beans.property.DoubleProperty; +import javafx.beans.value.ChangeListener; +import javafx.scene.paint.Color; +import javafx.scene.shape.Line; +import javafx.scene.shape.Polygon; + +public class StraightEdgeView extends EdgeView { + + private final DoubleBinding aX; + + private final DoubleBinding aY; + + public StraightEdgeView(DoubleProperty sX, DoubleProperty sY, DoubleProperty eX, DoubleProperty eY) { + super(sX, sY, eX, eY); + + aX = new DoubleBinding() { + + { + super.bind(sX, eX); + } + + @Override + protected double computeValue() { + return (sX.get() + eX.get()) * .5; + } + }; + + aY = new DoubleBinding() { + + { + super.bind(sY, eY); + } + + @Override + protected double computeValue() { + return (sY.get() + eY.get()) * .5; + } + }; + + Line line = new Line(); + line.setStrokeWidth(1.5); + line.setStroke(Color.BLUE); + line.startXProperty().bind(sX); + line.startYProperty().bind(sY); + line.endXProperty().bind(eX); + line.endYProperty().bind(eY); + + Polygon arrow = new Polygon(); + arrow.setFill(Color.BLUE); + final ChangeListener listener = (_0, _1, _2) -> { + final double angle = a.get() + Math.PI; + final double x = aX.get(); + final double y = aY.get(); + final double x0 = x + 5 * Math.cos(angle); + final double x1 = x + 5 * Math.cos(angle + 2 * Math.PI / 3); + final double x2 = x + 5 * Math.cos(angle - 2 * Math.PI / 3); + final double y0 = y + 5 * Math.sin(angle); + final double y1 = y + 5 * Math.sin(angle + 2 * Math.PI / 3); + final double y2 = y + 5 * Math.sin(angle - 2 * Math.PI / 3); + arrow.getPoints().clear(); + arrow.getPoints().addAll(x0, y0, x1, y1, x2, y2); + }; + + aX.addListener(listener); + aY.addListener(listener); + + getChildren().addAll(line, arrow); + } +} diff --git a/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/VertexView.java b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/VertexView.java new file mode 100644 index 000000000..2db83160a --- /dev/null +++ b/trace/manager/plugins/org.eclipse.gemoc.addon.stategraph/src/org/eclipse/gemoc/addon/stategraph/views/VertexView.java @@ -0,0 +1,122 @@ +/******************************************************************************* + * Copyright (c) 2017 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.addon.stategraph.views; + +import org.eclipse.gemoc.addon.stategraph.logic.StateVertex; + +import javafx.application.Platform; +import javafx.geometry.Pos; +import javafx.scene.Cursor; +import javafx.scene.Group; +import javafx.scene.control.Label; +import javafx.scene.control.OverrunStyle; +import javafx.scene.control.Tooltip; +import javafx.scene.effect.DropShadow; +import javafx.scene.layout.StackPane; +import javafx.scene.paint.Color; +import javafx.scene.shape.Circle; +import javafx.scene.text.Font; +import javafx.scene.text.FontWeight; + +public class VertexView extends Group { + + private double mouseX; + + private double mouseY; + + private boolean currentState = false; + + private int stateIndex; + + private static final double RADIUS = 12; + + private static final DropShadow GLOW = new DropShadow(2.5, Color.BLACK); + + private static final Font STATE_INDEX_FONT = Font.font("Arial", FontWeight.BOLD, 9); + + private final Circle circle; + + private final Label label; + + public VertexView(final int stateIndex, StateVertex vertex) { + circle = new Circle(RADIUS); + circle.setFill(Color.SLATEBLUE); + + this.stateIndex = stateIndex; + + final String s = vertex.getTooltip(); + final Tooltip t = new Tooltip(s); + Tooltip.install(this, t); + vertex.setOnTooltipUpdateCommand(text -> Platform.runLater(() -> t.setText(text))); + + label = new Label(computeStateLabel(this.stateIndex)); + label.setTextOverrun(OverrunStyle.ELLIPSIS); + label.setAlignment(Pos.CENTER); + label.setMouseTransparent(true); + label.setTextFill(Color.WHITE); + label.setFont(STATE_INDEX_FONT); + label.setMaxWidth(RADIUS * 2); + StackPane layout = new StackPane(); + layout.getChildren().addAll(circle, label); + layout.setTranslateX(-RADIUS); + layout.setTranslateY(-RADIUS); + + getChildren().add(layout); + + setOnMousePressed(event -> { + circle.setCursor(Cursor.MOVE); + mouseX = event.getX(); + mouseY = event.getY(); + event.consume(); + }); + + setOnMouseReleased(event -> { + setCursor(Cursor.DEFAULT); + }); + + setOnMouseDragged(event -> { + double deltaX = event.getX() - mouseX; + double deltaY = event.getY() - mouseY; + setTranslateX(getTranslateX() + deltaX); + setTranslateY(getTranslateY() + deltaY); + event.consume(); + }); + + setOnMouseEntered(event -> circle.setEffect(GLOW)); + setOnMouseExited(event -> circle.setEffect(null)); + } + + private String computeStateLabel(int stateNumber) { + if (stateNumber > 999) { + return (stateNumber / 1000) + "k" + ((stateNumber % 1000) / 10); + } else { + return "" + stateNumber; + } + } + + public void setCurrentState(final boolean currentState) { + if (this.currentState != currentState) { + this.currentState = currentState; + if (this.currentState) { + circle.setFill(Color.CORAL); + } else { + circle.setFill(Color.SLATEBLUE); + } + } + } + + public void setStateIndex(final int stateIndex) { + if (this.stateIndex != stateIndex) { + this.stateIndex = stateIndex; + label.setText(computeStateLabel(this.stateIndex)); + } + } +} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/.project b/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/.project deleted file mode 100644 index e9a856ed5..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.sequential_addons.multidimensional.timeline - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/META-INF/MANIFEST.MF b/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/META-INF/MANIFEST.MF deleted file mode 100644 index f5ebf7f98..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/META-INF/MANIFEST.MF +++ /dev/null @@ -1,56 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Gemoc MultiDimensional Timeline Addon -Bundle-SymbolicName: org.gemoc.sequential_addons.multidimensional.timeline;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Activator: org.gemoc.sequential_addons.multidimensional.timeline.Activator -Require-Bundle: org.gemoc.xdsmlframework.api, - fr.obeo.timeline;bundle-version="1.0.0", - org.gemoc.executionframework.engine, - org.eclipse.emf.edit.ui, - org.eclipse.sirius.ui, - org.eclipse.gef, - org.eclipse.emf.transaction, - org.gemoc.executionframework.ui, - fr.inria.diverse.trace.gemoc;bundle-version="1.0.0", - fr.inria.diverse.trace.api, - fr.inria.diverse.trace.gemoc.api, - org.gemoc.commons.eclipse.ui, - org.eclipse.debug.core, - org.eclipse.emf.compare, - org.eclipse.debug.ui, - org.gemoc.executionframework.engine.ui, - fr.obeo.dsl.debug.ide.sirius.ui;bundle-version="1.0.0", - fr.obeo.dsl.debug.ide -Import-Package: javafx.animation;version="2.0.0", - javafx.application;version="2.0.0", - javafx.beans;version="2.0.0", - javafx.beans.binding;version="2.0.0", - javafx.beans.property;version="2.0.0", - javafx.beans.value;version="2.0.0", - javafx.collections;version="2.0.0", - javafx.concurrent;version="2.0.0", - javafx.event;version="2.0.0", - javafx.fxml;version="2.0.0", - javafx.geometry;version="2.0.0", - javafx.scene;version="2.0.0", - javafx.scene.chart;version="2.0.0", - javafx.scene.control;version="2.0.0", - javafx.scene.control.cell;version="2.0.0", - javafx.scene.effect;version="2.0.0", - javafx.scene.image;version="2.0.0", - javafx.scene.input;version="2.0.0", - javafx.scene.layout;version="2.0.0", - javafx.scene.media;version="2.0.0", - javafx.scene.paint;version="2.0.0", - javafx.scene.shape;version="2.0.0", - javafx.scene.text;version="2.0.0", - javafx.scene.transform;version="2.0.0", - javafx.scene.web;version="2.0.0", - javafx.stage;version="2.0.0", - javafx.util;version="2.0.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: org.gemoc.sequential_addons.multidimensional.timeline, - org.gemoc.sequential_addons.multidimensional.timeline.views.timeline - diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/build.properties b/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/build.properties deleted file mode 100644 index 72e7b80f2..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/,\ - about.html -src.includes = about.html - diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/plugin.xml b/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/plugin.xml deleted file mode 100644 index 51a844021..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/plugin.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/pom.xml b/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/pom.xml deleted file mode 100644 index 22c789f6f..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - org.gemoc.modeldebugging.trace.manager - org.gemoc.modeldebugging.trace.manager.root - 0.1.0-SNAPSHOT - ../.. - - - org.gemoc.sequential_addons.multidimensional.timeline - eclipse-plugin - 0.1.0-SNAPSHOT - \ No newline at end of file diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/Activator.java b/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/Activator.java deleted file mode 100644 index 9fbb15b2f..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/Activator.java +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* - * 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.gemoc.sequential_addons.multidimensional.timeline; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.sequential_addons.multidimensional.timeline"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - try { - Class.forName("javafx.embed.swt.FXCanvas"); - super.start(context); - plugin = this; - } catch (ClassNotFoundException e) { - ErrorDialog.openError(null,"Multidimensional Timeline Unavailable", "Please install JavaFX or use the Oracle JRE", - new Status(IStatus.ERROR,PLUGIN_ID,"JavaFX is needed for the timeline to work")); - } - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - - public static void warn(String msg, Throwable e){ - Activator.getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, - Status.OK, - msg, - e)); - } - public static void error(String msg, Throwable e){ - Activator.getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, - Status.OK, - msg, - e)); - } -} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/views/timeline/FxTraceListener.java b/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/views/timeline/FxTraceListener.java deleted file mode 100644 index 031fa0822..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/views/timeline/FxTraceListener.java +++ /dev/null @@ -1,878 +0,0 @@ -/******************************************************************************* - * 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.gemoc.sequential_addons.multidimensional.timeline.views.timeline; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.commons.model.trace.Step; -import fr.inria.diverse.trace.gemoc.api.ITraceExplorer; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor.StateWrapper; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor.StepWrapper; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor.ValueWrapper; -import fr.inria.diverse.trace.gemoc.api.ITraceListener; -import javafx.application.Platform; -import javafx.beans.binding.Bindings; -import javafx.beans.binding.BooleanBinding; -import javafx.beans.binding.IntegerBinding; -import javafx.beans.binding.NumberExpression; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.DoubleProperty; -import javafx.beans.property.IntegerProperty; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.property.SimpleDoubleProperty; -import javafx.beans.property.SimpleIntegerProperty; -import javafx.collections.ListChangeListener; -import javafx.geometry.Bounds; -import javafx.geometry.Insets; -import javafx.geometry.Pos; -import javafx.scene.Cursor; -import javafx.scene.Node; -import javafx.scene.control.Button; -import javafx.scene.control.CheckBox; -import javafx.scene.control.ContentDisplay; -import javafx.scene.control.Label; -import javafx.scene.control.OverrunStyle; -import javafx.scene.control.ScrollBar; -import javafx.scene.control.ScrollPane; -import javafx.scene.control.Tooltip; -import javafx.scene.effect.Glow; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; -import javafx.scene.input.MouseButton; -import javafx.scene.input.MouseEvent; -import javafx.scene.layout.Background; -import javafx.scene.layout.BackgroundFill; -import javafx.scene.layout.Border; -import javafx.scene.layout.HBox; -import javafx.scene.layout.Pane; -import javafx.scene.layout.StackPane; -import javafx.scene.layout.VBox; -import javafx.scene.paint.Color; -import javafx.scene.paint.Paint; -import javafx.scene.shape.HLineTo; -import javafx.scene.shape.LineTo; -import javafx.scene.shape.MoveTo; -import javafx.scene.shape.Path; -import javafx.scene.shape.Polygon; -import javafx.scene.shape.Rectangle; -import javafx.scene.shape.Shape; -import javafx.scene.shape.StrokeLineCap; -import javafx.scene.shape.VLineTo; -import javafx.scene.text.Font; -import javafx.scene.text.FontWeight; - -public class FxTraceListener extends Pane implements ITraceListener { - - private ITraceExplorer traceExplorer; - - private ITraceExtractor traceExtractor; - - final private IntegerProperty currentState; - - final private IntegerProperty currentStep; - - final private ScrollPane bodyScrollPane; - - final private VBox headerPane; - - final private Pane bodyPane; - - final private VBox valuesLines; - - final private DoubleProperty valueTitleWidth; - - final private DoubleProperty statesPaneHeight; - - final private BooleanProperty displayGrid; - - private BooleanBinding displayGridBinding; - - final private IntegerProperty nbDisplayableStates; - - final private IntegerProperty visibleStatesRange; - - final private IntegerProperty nbStates; - - final private Font statesFont = Font.font("Arial", FontWeight.BOLD, 12); - - final private Font valuesFont = Font.font("Arial", FontWeight.BOLD, 11); - - final private Font stateNumbersFont = Font.font("Arial", FontWeight.BOLD, 9); - - final private Path diagonalHatching = new Path(); - - final private Glow glow = new Glow(0.8); - - final private Image stepValueGraphic; - - final private Image backValueGraphic; - - final private Consumer jumpConsumer = (i) -> traceExplorer.jump(i); - - private int lastClickedState = -1; - - final private Supplier lastClickedStateSupplier = () -> lastClickedState; - - public FxTraceListener() { - headerPane = new VBox(); - valuesLines = new VBox(); - bodyPane = new Pane(); - bodyScrollPane = new ScrollPane(bodyPane); - backValueGraphic = new Image("/icons/nav_backward.gif"); - stepValueGraphic = new Image("/icons/nav_forward.gif"); - playGraphic = new Image("/icons/start_task.gif"); - replayGraphic = new Image("/icons/restart_task.gif"); - - valueTitleWidth = new SimpleDoubleProperty(); - statesPaneHeight = new SimpleDoubleProperty(); - displayGrid = new SimpleBooleanProperty(); - isInReplayMode = new SimpleBooleanProperty(); - - nbDisplayableStates = new SimpleIntegerProperty(); - nbDisplayableStates.bind(headerPane.widthProperty().divide(UNIT)); - nbStates = new SimpleIntegerProperty(0); - currentState = new SimpleIntegerProperty(); - currentStep = new SimpleIntegerProperty(0); - visibleStatesRange = new SimpleIntegerProperty(); - visibleStatesRange.bind(nbStates.add(1).subtract(nbDisplayableStates)); - - nbDisplayableStates.addListener((v, o, n) -> { - refresh(); - }); - currentState.addListener((v, o, n) -> { - refresh(); - }); - currentStep.addListener((v, o, n) -> { - refresh(); - }); - visibleStatesRange.addListener((v, o, n) -> { - if (currentState.intValue() >= visibleStatesRange.intValue()) { - currentState.set(visibleStatesRange.intValue() - 1); - } - }); - - bodyScrollPane.setFitToWidth(true); - bodyScrollPane.setBorder(Border.EMPTY); - bodyScrollPane.setBackground(BODY_BACKGROUND); - bodyScrollPane.setVisible(false); - bodyPane.setBackground(BODY_BACKGROUND); - - statesPane.minHeightProperty().bind(statesPaneHeight); - statesPane.heightProperty().addListener((v, o, n) -> { - if (n.doubleValue() > statesPaneHeight.doubleValue()) { - statesPaneHeight.set(n.doubleValue()); - } - }); - headerPane.minWidthProperty().bind(widthProperty()); - headerPane.maxWidthProperty().bind(widthProperty()); - valuesLines.minWidthProperty().bind(widthProperty()); - valuesLines.maxWidthProperty().bind(widthProperty()); - valuesLines.getChildren().addListener(new ListChangeListener() { - @Override - public void onChanged(javafx.collections.ListChangeListener.Change c) { - List l = c.getList(); - int i = 0; - for (Node n : l) { - Pane p = (Pane) n; - if (i % 2 == 1) { - p.setBackground(LINE_BACKGROUND); - } else { - p.setBackground(TRANSPARENT_BACKGROUND); - } - i++; - } - } - }); - - for (int i = 0; i < 5; i++) { - final double x1 = Math.max(-0.5 + 0.25 * i, 0); - final double y1 = Math.max(0.5 - 0.25 * i, 0); - final double x2 = Math.min(0.5 + 0.25 * i, 1); - final double y2 = Math.min(1.5 - 0.25 * i, 1); - final MoveTo move = new MoveTo(x1 * DIAMETER, y1 * DIAMETER); - final LineTo line = new LineTo(x2 * DIAMETER, y2 * DIAMETER); - diagonalHatching.getElements().addAll(move, line); - } - - headerPane.setBackground(HEADER_BACKGROUND); - valuesLines.setBackground(TRANSPARENT_BACKGROUND); - setBackground(BODY_BACKGROUND); - - setupStatesPane(); - - bodyPane.getChildren().add(valuesLines); - bodyScrollPane.translateYProperty().bind(headerPane.heightProperty()); - bodyScrollPane.maxHeightProperty().bind(heightProperty().subtract(headerPane.heightProperty())); - - getChildren().add(headerPane); - getChildren().add(bodyScrollPane); - minHeightProperty().bind(headerPane.heightProperty().add(bodyScrollPane.heightProperty())); - prefHeightProperty().bind(headerPane.heightProperty().add(bodyScrollPane.heightProperty())); - maxHeightProperty().bind(headerPane.heightProperty().add(bodyScrollPane.heightProperty())); - } - - private void showState(int state, boolean jump) { - int toShow = Math.min(nbStates.intValue() - 1, Math.max(0, state)); - int effectiveToShow = Math.min(visibleStatesRange.intValue() - 1, - Math.max(0, toShow - nbDisplayableStates.intValue() / 2)); - if (jump) { - traceExplorer.jump(toShow); - } - currentState.set(effectiveToShow); - } - - private Path statesGrid = null; - private Rectangle highlightRectangle = null; - - private boolean scrollLock = false; - private final Pane statesPane = new Pane(); - - private final Image playGraphic; - private final Image replayGraphic; - - private final BooleanProperty isInReplayMode; - - private Pane setupStatesPane() { - final Label titleLabel = new Label("All execution states (0)"); - nbStates.addListener((v, o, n) -> { - String s = "All execution states (" + n.intValue() + ")"; - Platform.runLater(() -> { - titleLabel.setText(s); - titleLabel.setContentDisplay(ContentDisplay.RIGHT); - final ImageView nodeGraphic = new ImageView(); - nodeGraphic.setImage(playGraphic); - titleLabel.setGraphic(nodeGraphic); - isInReplayMode.addListener((val, old, neu) -> { - if (old != neu) { - if (neu) { - nodeGraphic.setImage(replayGraphic); - } else { - nodeGraphic.setImage(playGraphic); - } - } - }); - }); - }); - titleLabel.setFont(statesFont); - VBox.setMargin(titleLabel, HALF_MARGIN_INSETS); - titleLabel.setAlignment(Pos.CENTER); - final ScrollBar scrollBar = new ScrollBar(); - scrollBar.setVisibleAmount(1); - scrollBar.setBlockIncrement(10); - scrollBar.setMin(0); - final IntegerBinding statesRange = visibleStatesRange.subtract(1); - scrollBar.disableProperty().bind(statesRange.lessThanOrEqualTo(0)); - scrollBar.maxProperty().bind(statesRange); - scrollBar.valueProperty().addListener((v, o, n) -> { - if (o.intValue() != n.intValue() && n.intValue() != currentState.intValue()) { - currentState.set(n.intValue()); - } - }); - currentState.addListener((v, o, n) -> { - if (o.intValue() != n.intValue() && n.intValue() != scrollBar.valueProperty().intValue()) { - scrollBar.setValue(n.intValue()); - } - }); - final HBox hBox = new HBox(); - final Polygon arrow = new Polygon(2.5, 10, 10, 5, 2.5, 0); - HBox.setMargin(arrow, HALF_MARGIN_INSETS); - final Label toggleValuesLabel = new Label("Timeline for dynamic information "); - toggleValuesLabel.setFont(statesFont); - hBox.setAlignment(Pos.CENTER_LEFT); - hBox.getChildren().addAll(arrow, toggleValuesLabel); - hBox.setCursor(Cursor.HAND); - hBox.setOnMouseClicked((e) -> { - if (bodyScrollPane.isVisible()) { - bodyScrollPane.setVisible(false); - arrow.setRotate(0); - } else { - bodyScrollPane.setVisible(true); - arrow.setRotate(90); - } - }); - VBox.setMargin(hBox, HALF_MARGIN_INSETS); - headerPane.getChildren().addAll(scrollBar, titleLabel, statesPane, hBox); - VBox.setMargin(statesPane, MARGIN_INSETS); - - return headerPane; - } - - private Pane setupValuePane(int line, Label titleLabel, Pane contentPane) { - final HBox titlePane = new HBox(); - final VBox valueVBox = new VBox(); - final Node backValueGraphicNode = new ImageView(backValueGraphic); - final double buttonScale = 0.66; - backValueGraphicNode.setScaleX(1 / buttonScale); - backValueGraphicNode.setScaleY(1 / buttonScale); - final Button backValue = new Button("", backValueGraphicNode); - backValue.setOnAction((e) -> { - traceExplorer.backValue(line); - }); - backValue.setScaleX(buttonScale); - backValue.setScaleY(buttonScale); - backValue.setDisable(!traceExplorer.canBackValue(line)); - final Node stepValueGraphicNode = new ImageView(stepValueGraphic); - stepValueGraphicNode.setScaleX(1 / buttonScale); - stepValueGraphicNode.setScaleY(1 / buttonScale); - final Button stepValue = new Button("", stepValueGraphicNode); - stepValue.setOnAction((e) -> { - traceExplorer.stepValue(line); - }); - stepValue.setDisable(!traceExplorer.canStepValue(line)); - stepValue.setScaleX(buttonScale); - stepValue.setScaleY(buttonScale); - titlePane.setAlignment(Pos.CENTER_LEFT); - VBox.setMargin(titlePane, HALF_MARGIN_INSETS); - VBox.setMargin(contentPane, MARGIN_INSETS); - - final CheckBox showValueCheckBox = new CheckBox(); - showValueCheckBox.setScaleX(buttonScale); - showValueCheckBox.setScaleY(buttonScale); - boolean hide = traceExtractor.isValueTraceIgnored(line); - if (hide) { - showValueCheckBox.setSelected(false); - } else { - showValueCheckBox.setSelected(true); - } - BooleanProperty sel = showValueCheckBox.selectedProperty(); - backValue.visibleProperty().bind(sel); - stepValue.visibleProperty().bind(sel); - sel.addListener((v, o, n) -> { - if (o != n) { - traceExtractor.ignoreValueTrace(line, !n); - if (n) { - valueVBox.getChildren().add(contentPane); - } else { - valueVBox.getChildren().remove(contentPane); - } - sortValueLines(); - // TODO optimize - if (stateColoration) { - refresh(); - } - } - }); - titlePane.getChildren().addAll(showValueCheckBox, titleLabel, backValue, stepValue); - valueVBox.getChildren().add(titlePane); - if (!hide) { - valueVBox.getChildren().add(contentPane); - } - - valuesLines.getChildren().add(valueVBox); - valueVBox.setUserData(line); - titleLabel.minWidthProperty().bind(valueTitleWidth); - titleLabel.widthProperty().addListener((v, o, n) -> { - if (n.doubleValue() > valueTitleWidth.get()) { - valueTitleWidth.set(n.doubleValue()); - } - }); - if (titleLabel.widthProperty().doubleValue() > valueTitleWidth.get()) { - valueTitleWidth.set(titleLabel.widthProperty().doubleValue()); - } - - return valueVBox; - } - - private final Map valueNames = new HashMap<>(); - - private boolean stateColoration; - - private static final int H_MARGIN = 8; - private static final int V_MARGIN = 2; - private static final int DIAMETER = 24; - private static final int V_HEIGHT = 8; - private static final int UNIT = DIAMETER + 2 * H_MARGIN; - private static final Insets MARGIN_INSETS = new Insets(V_MARGIN, H_MARGIN, V_MARGIN, H_MARGIN); - private static final Insets HALF_MARGIN_INSETS = new Insets(V_MARGIN, H_MARGIN / 2, V_MARGIN, H_MARGIN / 2); - private static final Background HEADER_BACKGROUND = new Background(new BackgroundFill(Color.LIGHTGRAY, null, null)); - private static final Background BODY_BACKGROUND = new Background(new BackgroundFill(Color.WHITE, null, null)); - private static final Background TRANSPARENT_BACKGROUND = new Background( - new BackgroundFill(Color.TRANSPARENT, null, null)); - private static final Paint LINE_PAINT = new Color(Color.LIGHTGRAY.getRed(), Color.LIGHTGRAY.getGreen(), - Color.LIGHTGRAY.getBlue(), 0.5); - private static final Background LINE_BACKGROUND = new Background(new BackgroundFill(LINE_PAINT, null, null)); - - private HBox createStateTraceLine() { - final HBox hBox = new HBox(); - statesPane.getChildren().add(hBox); - headerPane.setFocusTraversable(true); - return hBox; - } - - private HBox createValueTraceLine(int traceIndex) { - final HBox hBox = new HBox(); - final String title = traceExtractor.getValueLabel(traceIndex) + " "; - final Label titleLabel = new Label(title); - titleLabel.setFont(valuesFont); - final Pane pane = setupValuePane(traceIndex, titleLabel, hBox); - pane.setFocusTraversable(true); - return hBox; - } - - private String computeStateLabel(int stateNumber) { - if (stateNumber > 999) { - return (stateNumber / 1000) + "k" + ((stateNumber % 1000) / 10); - } else { - return "" + stateNumber; - } - } - - private void fillStateLine(HBox line, List stateWrappers, int selectedState) { - final Color currentColor = Color.CORAL; - final Color otherColor = Color.SLATEBLUE; - final int height = DIAMETER; - final int width = DIAMETER; - final int currentStateIndex = Math.max(0, currentState.intValue()); - final int diff = stateWrappers.isEmpty() ? 0 : currentStateIndex - stateWrappers.get(0).stateIndex; - final List> colorGroups = stateColoration ? computeColorGroups(stateWrappers) - : Collections.emptyList(); - final int nbColors = colorGroups.size(); - final List colorPalette = new ArrayList<>(); - if (nbColors > 0) { - double interval = 360. / nbColors; - for (int i = currentStateIndex % nbColors; i < nbColors; i++) { - colorPalette.add(Color.hsb(i * interval, 0.75, 0.70)); - } - for (int i = 0; i < currentStateIndex % nbColors; i++) { - colorPalette.add(Color.hsb(i * interval, 0.75, 0.70)); - } - } - - final int[] stateToColor = new int[stateWrappers.size()]; - for (int i = 0; i < nbColors; i++) { - final List states = colorGroups.get(i); - for (Integer state : states) { - stateToColor[state%stateToColor.length] = i; - } - } - - line.getChildren().clear(); - if (diff > 0) { - line.setTranslateX(-(UNIT * diff)); - } - - for (StateWrapper stateWrapper : stateWrappers) { - final Rectangle rectangle; - if (selectedState == stateWrapper.stateIndex) { - rectangle = new Rectangle(width, height, currentColor); - } else { - if (stateColoration) { - final int idx = stateToColor[stateWrapper.stateIndex%stateToColor.length]; - if (idx != -1) { - rectangle = new Rectangle(width, height, - colorPalette.get(idx)); - } else { - rectangle = new Rectangle(width, height, otherColor); - } - } else { - rectangle = new Rectangle(width, height, otherColor); - } - } - - rectangle.setArcHeight(height); - rectangle.setArcWidth(width); - rectangle.setUserData(stateWrapper.state); - rectangle.addEventHandler(MouseEvent.MOUSE_CLICKED, (e) -> { - if (e.getClickCount() > 1 && e.getButton() == MouseButton.PRIMARY) { - Object o = rectangle.getUserData(); - traceExplorer.jump((EObject) o); - } - if (e.getClickCount() == 1 && e.getButton() == MouseButton.SECONDARY) { - lastClickedState = stateWrapper.stateIndex; - final List enabledItems = new ArrayList<>(); - enabledItems.add(stateWrapper.breakable); - enabledItems.add(true); - displayMenu.accept(enabledItems); - } - }); - - displayGridBinding = displayGridBinding.or(rectangle.hoverProperty()); - - final String s = traceExtractor.getStateDescription(stateWrapper.stateIndex); - final Tooltip t = new Tooltip(s); - Tooltip.install(rectangle, t); - Label text = new Label(computeStateLabel(stateWrapper.stateIndex)); - text.setTextOverrun(OverrunStyle.ELLIPSIS); - text.setAlignment(Pos.CENTER); - text.setMouseTransparent(true); - text.setTextFill(Color.WHITE); - text.setFont(stateNumbersFont); - text.setMaxWidth(width); - StackPane layout = new StackPane(); - StackPane.setMargin(rectangle, MARGIN_INSETS); - if (!stateWrapper.breakable) { - Shape hatching = Shape.intersect(rectangle, diagonalHatching); - hatching.setFill(Color.LIGHTGRAY); - layout.getChildren().addAll(rectangle, hatching, text); - } else { - layout.getChildren().addAll(rectangle, text); - } - line.getChildren().add(layout); - } - } - - private void fillValueLine(HBox line, int idx, List valueWrappers, int selectedState) { - final Color currentColor = Color.DARKORANGE; - final Color otherColor = Color.DARKBLUE; - final int height = V_HEIGHT; - - line.getChildren().clear(); - - final int currentStateIndex = Math.max(0, currentState.intValue()); - int stateIndex = currentStateIndex; - - int diff = valueWrappers.isEmpty() ? 0 : currentStateIndex - valueWrappers.get(0).firstStateIndex; - - if (diff > 0) { - line.setTranslateX(-(UNIT * diff)); - } - - for (ValueWrapper valueWrapper : valueWrappers) { - if (valueWrapper.firstStateIndex > stateIndex) { - // When the first visible value starts after the first state, - // we fill the space with a transparent rectangle. - int width = DIAMETER + UNIT * (valueWrapper.firstStateIndex - stateIndex - 1); - final Rectangle rectangle = new Rectangle(width, height, Color.TRANSPARENT); - line.getChildren().add(rectangle); - HBox.setMargin(rectangle, MARGIN_INSETS); - } - - final Rectangle rectangle; - final int width = DIAMETER + UNIT * (valueWrapper.lastStateIndex - valueWrapper.firstStateIndex); - if (selectedState >= valueWrapper.firstStateIndex && selectedState <= valueWrapper.lastStateIndex) { - rectangle = new Rectangle(width, height, currentColor); - } else { - rectangle = new Rectangle(width, height, otherColor); - } - rectangle.setArcHeight(height); - rectangle.setArcWidth(DIAMETER / 2); - rectangle.setUserData(valueWrapper.value); - rectangle.addEventHandler(MouseEvent.MOUSE_CLICKED, (e) -> { - if (e.getClickCount() > 1 && e.getButton() == MouseButton.PRIMARY) { - Object o = rectangle.getUserData(); - traceExplorer.jump((EObject) o); - } - }); - - displayGridBinding = displayGridBinding.or(rectangle.hoverProperty()); - - final String s = traceExtractor.getValueDescription(idx, valueWrapper.firstStateIndex); - final Tooltip t = new Tooltip(s); - Tooltip.install(rectangle, t); - line.getChildren().add(rectangle); - HBox.setMargin(rectangle, MARGIN_INSETS); - - stateIndex = valueWrapper.lastStateIndex + 1; - } - } - - private static final int CURRENT_FORWARD_STEP = 0; - private static final int CURRENT_BACKWARD_STEP = 1; - private static final int CURRENT_BIGSTEP = 2; - - private void addGlowOnMouseOverStep(Step step, Path stepPath, List accumulator) { - final Path mousingPath = new Path(); - mousingPath.setStrokeWidth(12); - mousingPath.setStroke(Color.rgb(255, 255, 255, 0.01)); - Bindings.bindContent(mousingPath.getElements(), stepPath.getElements()); - accumulator.add(mousingPath); - // Tooltip t = new - // Tooltip(step.getMseoccurrence().getMse().getAction().getName()); - // Tooltip.install(mousingPath, t); - mousingPath.setOnMouseEntered(e -> stepPath.setEffect(glow)); - mousingPath.setOnMouseExited(e -> stepPath.setEffect(null)); - mousingPath.setOnMouseClicked(e -> { - if (e.getClickCount() > 1) { - final double x = e.getX(); - final Bounds bounds = mousingPath.getBoundsInLocal(); - final double midX = bounds.getMinX() + bounds.getWidth() / 2.; - if (x < midX) { - System.out.println("BACKWARD"); - } else { - System.out.println("FORWARD"); - } - } - }); - } - - private NumberExpression createSteps(StepWrapper stepWrapper, int depth, int currentStateStartIndex, - int selectedStateIndex, List accumulator, Object[] stepTargets) { - - final boolean endedStep = stepWrapper.endingIndex != -1; - - final int stepStartingIndex = stepWrapper.startingIndex; - - final int startingIndex = stepStartingIndex - currentStateStartIndex; - final int endingIndex = (endedStep ? stepWrapper.endingIndex : nbStates.intValue()) - currentStateStartIndex; - final Path path = new Path(); - path.setStrokeWidth(2); - - final double x1 = startingIndex * UNIT + UNIT / 2; - final double x4 = endingIndex * UNIT + UNIT / 2; - final double x2 = x1 + UNIT / 4; - final double x3 = x4 - UNIT / 4; - final double baseLineY = DIAMETER / 2 + V_MARGIN; - final MoveTo moveTo = new MoveTo(x1, baseLineY); - final LineTo lineTo = new LineTo(x2, baseLineY); - final HLineTo hLineTo = new HLineTo(x3); - path.getElements().addAll(moveTo, lineTo, hLineTo); - if (endedStep) { - final LineTo lastLineTo = new LineTo(x4, baseLineY); - path.getElements().add(lastLineTo); - } - - accumulator.add(path); - addGlowOnMouseOverStep(stepWrapper.step, path, accumulator); - - final List subSteps = stepWrapper.subSteps; - NumberExpression yOffset = new SimpleDoubleProperty(0); - if (subSteps != null && !subSteps.isEmpty()) { - for (Step subStep : subSteps) { - final StepWrapper subStepWrapper = traceExtractor.getStepWrapper(subStep); - if (subStepWrapper.startingIndex != subStepWrapper.endingIndex) { - yOffset = Bindings.max(yOffset, createSteps(subStepWrapper, depth + 1, currentStateStartIndex, - selectedStateIndex, accumulator, stepTargets)); - } - } - } - - lineTo.yProperty().bind(yOffset.add(DIAMETER / 2 + V_MARGIN)); - - final Step step = stepWrapper.step; - - if (stepTargets[CURRENT_FORWARD_STEP] == step) { - path.setStroke(Color.DARKORANGE); - } else if (stepTargets[CURRENT_BACKWARD_STEP] == step) { - path.setStroke(Color.DARKGREEN); - } else if (stepTargets[CURRENT_BIGSTEP] == step) { - path.setStroke(Color.DARKRED); - } else { - path.setStroke(Color.DARKBLUE); - if (!traceExplorer.getCallStack().contains(step) && (stepStartingIndex > selectedStateIndex - || (stepStartingIndex == selectedStateIndex && endedStep))) { - path.getStrokeDashArray().addAll(5., 5.); - path.setStrokeLineCap(StrokeLineCap.ROUND); - } - } - - return lineTo.yProperty(); - } - - private void sortValueLines() { - final List nodes = new ArrayList<>(valuesLines.getChildren()); - nodes.sort((n1, n2) -> { - final int line1 = (Integer) n1.getUserData(); - final int line2 = (Integer) n2.getUserData(); - final boolean hiden1 = traceExtractor.isValueTraceIgnored(line1); - final boolean hiden2 = traceExtractor.isValueTraceIgnored(line2); - if (hiden1 == hiden2) { - return line1 - line2; - } else if (hiden1) { - return 1; - } else { - return -1; - } - }); - valuesLines.getChildren().clear(); - valuesLines.getChildren().addAll(nodes); - } - - public void refresh() { - Platform.runLater(() -> { - valuesLines.getChildren().clear(); - statesPane.getChildren().clear(); - displayGrid.unbind(); - - if (traceExplorer == null) { - return; - } - - isInReplayMode.set(traceExplorer.isInReplayMode()); - - final int currentStateStartIndex = Math.max(0, currentState.intValue()); - final int currentStateEndIndex = currentStateStartIndex + nbDisplayableStates.intValue(); - - final int selectedStateIndex = traceExplorer.getCurrentStateIndex(); - - displayGridBinding = new BooleanBinding() { - @Override - protected boolean computeValue() { - return false; - } - }; - - { - final HBox hBox = createStateTraceLine(); - fillStateLine(hBox, - traceExtractor.getStateWrappers(currentStateStartIndex - 1, currentStateEndIndex + 1), - selectedStateIndex); - } - for (int i = 0; i < traceExtractor.getNumberOfTraces(); i++) { - final HBox hBox = createValueTraceLine(i); - fillValueLine(hBox, i, - traceExtractor.getValueWrappers(i, currentStateStartIndex - 1, currentStateEndIndex + 1), - selectedStateIndex); - } - - sortValueLines(); - - displayGrid.bind(displayGridBinding); - - // ---------------- Steps creation - - final List rootSteps = traceExtractor.getStepWrappers(currentStateStartIndex - 1, - currentStateEndIndex + 1); - - final List steps = new ArrayList<>(); - - final Object[] stepTargets = new Object[3]; - - Step tmp = traceExplorer.getCurrentForwardStep(); - if (tmp != null) { - stepTargets[CURRENT_FORWARD_STEP] = tmp; - } - tmp = traceExplorer.getCurrentBackwardStep(); - if (tmp != null) { - stepTargets[CURRENT_BACKWARD_STEP] = tmp; - } - tmp = traceExplorer.getCurrentBigStep(); - if (tmp != null) { - stepTargets[CURRENT_BIGSTEP] = tmp; - } - - for (StepWrapper stepWrapper : rootSteps) { - if (stepWrapper.startingIndex != stepWrapper.endingIndex) { - createSteps(stepWrapper, 0, currentStateStartIndex, selectedStateIndex, steps, stepTargets); - } - } - - statesPane.getChildren().addAll(0, steps); - - // ---------------- Adding grid and highlight rectangle - - if (statesGrid != null) { - bodyPane.getChildren().remove(statesGrid); - } - if (highlightRectangle != null) { - bodyPane.getChildren().remove(highlightRectangle); - } - - statesGrid = new Path(); - final VLineTo vLineTo = new VLineTo(); - vLineTo.yProperty().bind(valuesLines.heightProperty()); - displayGrid.addListener((v, o, n) -> { - if (n) { - statesGrid.setStroke(Color.GRAY); - } else { - statesGrid.setStroke(Color.LIGHTGRAY); - } - }); - highlightRectangle = new Rectangle(); - for (int i = currentStateStartIndex; i <= currentStateEndIndex; i++) { - if (i == selectedStateIndex) { - highlightRectangle.setX(H_MARGIN + (i - currentStateStartIndex) * (2 * H_MARGIN + DIAMETER)); - highlightRectangle.setWidth(2 * H_MARGIN + DIAMETER); - highlightRectangle.heightProperty().bind(valuesLines.heightProperty()); - } - statesGrid.getElements().addAll( - new MoveTo(H_MARGIN + (i - currentStateStartIndex) * (2 * H_MARGIN + DIAMETER), 0), vLineTo); - } - statesGrid.getStrokeDashArray().addAll(10., 10.); - statesGrid.setStrokeWidth(1); - statesGrid.setStroke(Color.LIGHTGRAY); - statesGrid.setStrokeLineCap(StrokeLineCap.ROUND); - bodyPane.getChildren().add(0, statesGrid); - highlightRectangle.setFill(Color.LIGHTGRAY); - bodyPane.getChildren().add(0, highlightRectangle); - }); - } - - public void setScrollLock(boolean value) { - scrollLock = value; - } - - public void setStateColoration(boolean value) { - stateColoration = value; - refresh(); - } - - public Consumer getJumpConsumer() { - return jumpConsumer; - } - - public void setTraceExplorer(ITraceExplorer traceExplorer) { - valueNames.clear(); - if (this.traceExplorer != null) { - this.traceExplorer.removeListener(this); - } - this.traceExplorer = traceExplorer; - if (this.traceExplorer != null) { - this.traceExplorer.addListener(this); - } - update(); - } - - public void setTraceExtractor(ITraceExtractor traceExtractor) { - this.traceExtractor = traceExtractor; - } - - @Override - public void update() { - if (traceExplorer != null) { - nbStates.set(traceExtractor.getStatesTraceLength()); - if (!scrollLock) { - showState(traceExplorer.getCurrentStateIndex(), false); - } - } else { - nbStates.set(0); - } - refresh(); - } - - private Consumer> displayMenu = null; - - public void setMenuDisplayer(Consumer> displayMenu) { - this.displayMenu = displayMenu; - } - - public Supplier getLastClickedStateSupplier() { - return lastClickedStateSupplier; - } - - private List> computeColorGroups(List stateWrappers) { - final Map eObjectToWrapper = new HashMap<>(); - final List states = stateWrappers.stream().map(w->{ - eObjectToWrapper.put(w.state, w); - return w.state; - }).collect(Collectors.toList()); - - return traceExtractor.computeStateEquivalenceClasses(states).stream() - .map(l -> l.stream() - .map(e -> eObjectToWrapper.get(e).stateIndex) - .collect(Collectors.toList())) - .sorted((l1,l2) -> { - final int min1 = l1.stream().min((i1,i2)->i1-i2).get(); - final int min2 = l2.stream().min((i1,i2)->i1-i2).get(); - return min1-min2; - }) - .collect(Collectors.toList()); - } -} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/views/timeline/MultidimensionalTimeLineView.java b/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/views/timeline/MultidimensionalTimeLineView.java deleted file mode 100644 index df7fae6a5..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/src/org/gemoc/sequential_addons/multidimensional/timeline/views/timeline/MultidimensionalTimeLineView.java +++ /dev/null @@ -1,555 +0,0 @@ -/******************************************************************************* - * 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.gemoc.sequential_addons.multidimensional.timeline.views.timeline; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.function.BiPredicate; -import java.util.function.Consumer; -import java.util.function.Supplier; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.Platform; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.compare.Comparison; -import org.eclipse.emf.compare.Diff; -import org.eclipse.emf.compare.EMFCompare; -import org.eclipse.emf.compare.scope.DefaultComparisonScope; -import org.eclipse.emf.compare.scope.IComparisonScope; -import org.eclipse.emf.ecore.EObject; -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.util.EcoreUtil; -import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.MenuItem; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IActionBars; -import org.gemoc.executionframework.engine.ui.debug.AbstractGemocDebugger; -import org.gemoc.executionframework.engine.ui.launcher.AbstractGemocLauncher; -import org.gemoc.executionframework.ui.views.engine.EngineSelectionDependentViewPart; -import org.gemoc.executionframework.ui.views.engine.actions.AbstractEngineAction; -import org.gemoc.sequential_addons.multidimensional.timeline.Activator; -import org.gemoc.xdsmlframework.api.core.EngineStatus.RunStatus; -import org.gemoc.xdsmlframework.api.core.ExecutionMode; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; -import org.gemoc.xdsmlframework.api.core.IRunConfiguration; - -import fr.inria.diverse.trace.commons.model.trace.LaunchConfiguration; -import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence; -import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor; -import fr.inria.diverse.trace.gemoc.traceaddon.AbstractTraceAddon; -import javafx.embed.swt.FXCanvas; -import javafx.scene.Scene; - -public class MultidimensionalTimeLineView extends EngineSelectionDependentViewPart { - - public static final String ID = "org.gemoc.sequential_addons.multidimensional.timeline.views.timeline.MultidimensionalTimeLineView"; - - private FXCanvas fxCanvas; - - private FxTraceListener traceListener; - - private IMultiDimensionalTraceAddon traceAddon; - - final private List statesToBreakTo = new ArrayList<>(); - - private AbstractGemocDebugger debugger = null; - - private IExecutionEngine engine = null; - - public List getStatesToBreakTo() { - return Collections.unmodifiableList(statesToBreakTo); - } - - @Override - public void dispose() { - super.dispose(); - } - - @Override - public void createPartControl(Composite parent) { - fxCanvas = new FXCanvas(parent, SWT.NONE); - traceListener = new FxTraceListener(); - Scene scene = new Scene(traceListener); - fxCanvas.setScene(scene); - parent.getShell().addListener(SWT.Resize, (e) -> { - traceListener.refresh(); - }); - buildMenu(parent.getShell()); - - final Supplier getLastClickedState = traceListener.getLastClickedStateSupplier(); - - final Menu menu = new Menu(fxCanvas); - MenuItem launchAndBreakAtStateMenuItem = new MenuItem(menu, SWT.NONE); - launchAndBreakAtStateMenuItem.setText("Relaunch and break at this state"); - launchAndBreakAtStateMenuItem.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent evt) { - breakAtStateIndex = getLastClickedState.get(); - if (debugger != null && !debugger.isTerminated()) { - debugger.terminate(); - } - if (engine != null) { - engine.stop(); - } - launchConfigFromTrace(); - } - }); - MenuItem launchAndBreakAtVectorMenuItem = new MenuItem(menu, SWT.NONE); - launchAndBreakAtVectorMenuItem.setText("Relaunch and break at this value vector"); - launchAndBreakAtVectorMenuItem.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent evt) { - final EObject state = traceAddon.getTraceExtractor().getStateWrapper(getLastClickedState.get()).state; - breakAtVectorState = state; - if (debugger != null && !debugger.isTerminated()) { - debugger.terminate(); - } - if (engine != null) { - engine.stop(); - } - launchConfigFromTrace(); - } - }); - - menu.addListener(SWT.Show, (event) -> { - menu.setVisible(true); - }); - - Consumer> displayMenu = (l) -> { - int i = 0; - for (boolean b : l) { - menu.getItem(i).setEnabled(b); - i++; - } - Event event = new Event(); - event.type = SWT.Show; - event.button = SWT.BUTTON2; - menu.notifyListeners(SWT.Show, event); - }; - - traceListener.setMenuDisplayer(displayMenu); - } - - private void buildMenu(Shell shell) { - - addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { - - private FileDialog saveAsDialog; - - @Override - protected void init() { - super.init(); - setText("Save Trace"); - setToolTipText("Save Trace"); - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/save.gif"); - setImageDescriptor(id); - setEnabled(true); - - saveAsDialog = new FileDialog(shell, SWT.SAVE); - saveAsDialog.setFilterNames(new String[] { "Trace Files", "All Files (*.*)" }); - saveAsDialog.setFilterExtensions(new String[] { "*.trace", "*.*" }); - } - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - } - - @Override - public void run() { - saveAsDialog.setText("Save As"); - String filePath = saveAsDialog.open(); - - URI uri = URI.createFileURI(filePath); - traceAddon.getTraceConstructor().save(uri); - } - }); - - addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { - - @Override - protected void init() { - super.init(); - setText("Remove Trace"); - setToolTipText("Remove Trace"); - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/remove.gif"); - setImageDescriptor(id); - setEnabled(true); - } - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - } - - @Override - public void run() { - traceAddon = null; - traceListener.setTraceExtractor(null); - traceListener.setTraceExplorer(null); - } - }); - - addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { - - private FileDialog fileDialog; - - @Override - protected void init() { - super.init(); - setText("Compare Traces"); - setToolTipText("Compare Traces"); - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/insp_sbook.gif"); - setImageDescriptor(id); - setEnabled(true); - - fileDialog = new FileDialog(shell, SWT.OPEN); - fileDialog.setFilterExtensions(new String[] { "*.trace" }); - } - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - } - - @Override - public void run() { - fileDialog.setText("Choose a first trace to load"); - String filePath1 = fileDialog.open(); - if (filePath1 != null && !filePath1.equals("")) { - fileDialog.setText("Choose a second trace to load"); - String filePath2 = fileDialog.open(); - if (filePath2 != null && !filePath2.equals("")) { - Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; - Map m = reg.getExtensionToFactoryMap(); - m.put("trace", new XMIResourceFactoryImpl()); - - // Obtain a new resource set - ResourceSet resSet = new ResourceSetImpl(); - - // Get the resources - URI filePath1URI = URI.createFileURI(filePath1); - Resource traceResource1 = resSet.getResource(filePath1URI, true); - EcoreUtil.resolveAll(traceResource1); - URI filePath2URI = URI.createFileURI(filePath2); - Resource traceResource2 = resSet.getResource(filePath2URI, true); - EcoreUtil.resolveAll(traceResource2); - - EMFCompare compare = EMFCompare.builder().build(); - IComparisonScope comparisonScope = new DefaultComparisonScope(traceResource1, traceResource2, - null); - Comparison comparison = compare.compare(comparisonScope); - List differences = comparison.getDifferences(); - System.out.println(differences); - } - } - } - }); - - addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { - - private FileDialog fileDialog; - - @Override - protected void init() { - super.init(); - setText("Open Trace"); - setToolTipText("Open Trace"); - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/jload_obj.gif"); - setImageDescriptor(id); - setEnabled(true); - - fileDialog = new FileDialog(shell, SWT.OPEN); - fileDialog.setFilterExtensions(new String[] { "*.trace" }); - } - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - } - - @Override - public void run() { - fileDialog.setText("Open Trace"); - String filePath = fileDialog.open(); - - if (filePath != null && !filePath.equals("")) { - Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; - Map m = reg.getExtensionToFactoryMap(); - m.put("trace", new XMIResourceFactoryImpl()); - - // Obtain a new resource set - ResourceSet resSet = new ResourceSetImpl(); - - // Get the resources - URI filePath1URI = URI.createFileURI(filePath); - Resource traceResource = resSet.getResource(filePath1URI, true); - EcoreUtil.resolveAll(traceResource); - AbstractTraceAddon newTraceAddon = null; - try { - IExtensionRegistry extReg = Platform.getExtensionRegistry(); - IExtensionPoint ep = extReg - .getExtensionPoint("org.gemoc.gemoc_language_workbench.engine_addon"); - IExtension[] extensions = ep.getExtensions(); - for (int i = 0; i < extensions.length && newTraceAddon == null; i++) { - IExtension ext = extensions[i]; - IConfigurationElement[] confElements = ext.getConfigurationElements(); - for (int j = 0; j < confElements.length; j++) { - IConfigurationElement confElement = confElements[j]; - String attr = confElement.getAttribute("Class"); - if (attr != null) { - Object obj = confElement.createExecutableExtension("Class"); - if (obj instanceof AbstractTraceAddon) { - AbstractTraceAddon obj_cast = (AbstractTraceAddon) obj; - if (obj_cast.isAddonForTrace(traceResource.getContents().get(0))) { - newTraceAddon = obj_cast; - break; - } - } - } - } - } - } catch (CoreException e) { - e.printStackTrace(); - } - - if (newTraceAddon != null) { - traceAddon = newTraceAddon; - newTraceAddon.load(traceResource); - traceListener.setTraceExtractor(traceAddon.getTraceExtractor()); - traceListener.setTraceExplorer(traceAddon.getTraceExplorer()); - } - } - } - }); - - addActionToToolbar(new AbstractEngineAction(Action.AS_CHECK_BOX) { - @Override - protected void init() { - super.init(); - setText("Scroll Lock"); - setToolTipText("Scroll Lock"); - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/lock_co.gif"); - setImageDescriptor(id); - setEnabled(true); - } - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - } - - @Override - public void run() { - traceListener.setScrollLock(isChecked()); - } - }); - - addActionToToolbar(new AbstractEngineAction(Action.AS_CHECK_BOX) { - @Override - protected void init() { - super.init(); - setText("State Coloration"); - setToolTipText("State Coloration"); - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/state_coloration.gif"); - setImageDescriptor(id); - setEnabled(true); - } - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - } - - @Override - public void run() { - traceListener.setStateColoration(isChecked()); - } - }); - - addActionToToolbar(new AbstractEngineAction(Action.AS_PUSH_BUTTON) { - - private InputDialog dialog; - - @Override - protected void init() { - super.init(); - setText("Jump to state"); - setToolTipText("Jump To State"); - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/runtoline_co.gif"); - setImageDescriptor(id); - setEnabled(true); - - dialog = new InputDialog(shell, "Jump to state", "Enter the desired state", "0", s -> { - ITraceExtractor extractor = traceAddon.getTraceExtractor(); - if (extractor == null) { - return "Not trace currently loaded"; - } - try { - int i = Integer.parseInt(s); - if (i > -1 && i < extractor.getStatesTraceLength()) { - return null; - } - return "Not a valid state"; - } catch (NumberFormatException e) { - return "Not a valid state"; - } - }); - } - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - } - - @Override - public void run() { - dialog.open(); - if (dialog.getReturnCode() == Window.OK) { - int state = Integer.parseInt(dialog.getValue()); - traceListener.getJumpConsumer().accept(state); - } - } - }); - } - - private void addActionToToolbar(Action action) { - IActionBars actionBars = getViewSite().getActionBars(); - IToolBarManager toolBar = actionBars.getToolBarManager(); - toolBar.add(action); - } - - @Override - public void setFocus() { - if (fxCanvas != null) { - fxCanvas.setFocus(); - } - } - - private boolean canDisplayTimeline(IExecutionEngine engine) { - if (engine.getExecutionContext().getExecutionMode().equals(ExecutionMode.Run) - && engine.getRunningStatus().equals(RunStatus.Stopped)) { - return true; - } - if (engine.getExecutionContext().getExecutionMode().equals(ExecutionMode.Animation)) { - return true; - } - return false; - } - - private EObject breakAtVectorState = null; - private int breakAtStateIndex = -1; - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - if (engine != null) { - this.engine = engine; - if (canDisplayTimeline(engine)) { - Set traceAddons = engine - .getAddonsTypedBy(IMultiDimensionalTraceAddon.class); - if (!traceAddons.isEmpty()) { - final IMultiDimensionalTraceAddon traceAddon = traceAddons.iterator().next(); - final ITraceExtractor extractor = traceAddon.getTraceExtractor(); - final Collection debuggers = engine.getAddonsTypedBy(AbstractGemocDebugger.class); - if (!debuggers.isEmpty()) { - debugger = debuggers.stream().findFirst().get(); - if (breakAtVectorState != null) { - BiPredicate predicate = new BiPredicate() { - final EObject baseState = breakAtVectorState; - @Override - public boolean test(IExecutionEngine executionEngine, MSEOccurrence mseOccurrence) { - final ITraceExtractor traceExtractor = traceAddon.getTraceExtractor(); - final int lastStateIndex = traceExtractor.getStatesTraceLength() - 1; - final EObject state = traceExtractor.getStateWrapper(lastStateIndex).state; - return traceExtractor.compareStates(baseState, state, true); - } - }; - debugger.addPredicateBreak(predicate); - breakAtVectorState = null; - } - if (breakAtStateIndex != -1) { - BiPredicate predicate = new BiPredicate() { - final int stateToBreakTo = breakAtStateIndex; - @Override - public boolean test(IExecutionEngine executionEngine, MSEOccurrence mseOccurrence) { - final int traceLength = extractor.getStatesTraceLength(); - final int stateToBreakTo = this.stateToBreakTo; - final boolean result = traceLength == stateToBreakTo + 1; - return result; - } - }; - debugger.addPredicateBreak(predicate); - breakAtStateIndex = -1; - } - } - this.traceAddon = traceAddon; - traceListener.setTraceExtractor(traceAddon.getTraceExtractor()); - traceListener.setTraceExplorer(traceAddon.getTraceExplorer()); - } - } else { - // TODO - } - } - } - - private void launchConfigFromTrace() { - final LaunchConfiguration launchConfiguration = traceAddon.getTraceExtractor().getLaunchConfiguration(); - final String launchConfigurationType = launchConfiguration.getType(); - final IConfigurationElement[] elements = Platform.getExtensionRegistry() - .getConfigurationElementsFor("org.eclipse.debug.core.launchConfigurationTypes"); - final Optional optElt = Arrays.asList(elements) - .stream().filter(e->e.getAttribute("id").equals(launchConfigurationType)).findFirst(); - if (optElt.isPresent()) { - final IConfigurationElement elt = optElt.get(); - try { - final Object obj = elt.createExecutableExtension("delegate"); - final AbstractGemocLauncher launcher = (AbstractGemocLauncher) obj; - final Map parameters = launcher.parseLaunchConfiguration(launchConfiguration); - final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); - final String launchName = manager.generateLaunchConfigurationName((String) parameters - .get(IRunConfiguration.LAUNCH_SELECTED_LANGUAGE)); - final ILaunchConfigurationType type = manager - .getLaunchConfigurationType(launchConfigurationType); - try { - final ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, launchName); - workingCopy.setAttributes(parameters); - workingCopy.launch("debug", null, false, true); - } catch (CoreException e) { - Activator.error(e.getMessage(), e); - } - } catch (CoreException e1) { - Activator.error(e1.getMessage(), e1); - } - } - } -} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/.project b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/.project deleted file mode 100644 index 86ab4ffe1..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.gemoc.sequential_addons.stategraph - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/META-INF/MANIFEST.MF b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/META-INF/MANIFEST.MF deleted file mode 100644 index 9cfa55fe0..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/META-INF/MANIFEST.MF +++ /dev/null @@ -1,44 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Stategraph -Bundle-SymbolicName: org.gemoc.sequential_addons.stategraph;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: org.gemoc.sequential_addons.stategraph.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.fx.ui.workbench3, - org.gemoc.executionframework.ui, - org.gemoc.xdsmlframework.api, - org.eclipse.emf.ecore, - fr.inria.diverse.trace.gemoc.api, - fr.inria.diverse.trace.commons.model;bundle-version="0.1.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: javafx.animation;version="2.0.0", - javafx.application;version="2.0.0", - javafx.beans;version="2.0.0", - javafx.beans.binding;version="2.0.0", - javafx.beans.property;version="2.0.0", - javafx.beans.value;version="2.0.0", - javafx.collections;version="2.0.0", - javafx.concurrent;version="2.0.0", - javafx.embed.swing;version="2.0.0", - javafx.event;version="2.0.0", - javafx.fxml;version="2.0.0", - javafx.geometry;version="2.0.0", - javafx.scene;version="2.0.0", - javafx.scene.chart;version="2.0.0", - javafx.scene.control;version="2.0.0", - javafx.scene.control.cell;version="2.0.0", - javafx.scene.effect;version="2.0.0", - javafx.scene.image;version="2.0.0", - javafx.scene.input;version="2.0.0", - javafx.scene.layout;version="2.0.0", - javafx.scene.media;version="2.0.0", - javafx.scene.paint;version="2.0.0", - javafx.scene.shape;version="2.0.0", - javafx.scene.text;version="2.0.0", - javafx.scene.transform;version="2.0.0", - javafx.scene.web;version="2.0.0", - javafx.stage;version="2.0.0", - javafx.util;version="2.0.0" -Bundle-ActivationPolicy: lazy diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/build.properties b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/build.properties deleted file mode 100644 index 0d3d3a745..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/ diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/icons/cycle_coloration.png b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/icons/cycle_coloration.png deleted file mode 100644 index 2a63b7885..000000000 Binary files a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/icons/cycle_coloration.png and /dev/null differ diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/plugin.xml b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/plugin.xml deleted file mode 100644 index 8690f99ee..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/plugin.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/Activator.java b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/Activator.java deleted file mode 100644 index 46f663616..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/Activator.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.gemoc.sequential_addons.stategraph; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.gemoc.sequential_addons.stategraph"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - try { - Class.forName("javafx.embed.swt.FXCanvas"); - super.start(context); - plugin = this; - } catch (ClassNotFoundException e) { - ErrorDialog.openError(null,"State Graph Unavailable", "Please install JavaFX or use the Oracle JRE", - new Status(IStatus.ERROR,PLUGIN_ID,"JavaFX is needed for the timeline to work")); - } - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/StateGraph.java b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/StateGraph.java deleted file mode 100644 index 976d7aa50..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/StateGraph.java +++ /dev/null @@ -1,169 +0,0 @@ -package org.gemoc.sequential_addons.stategraph.logic; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.function.BiConsumer; -import java.util.stream.Collectors; - -import org.eclipse.emf.ecore.EObject; - -import fr.inria.diverse.trace.gemoc.api.ITraceExplorer; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor.StateWrapper; -import fr.inria.diverse.trace.gemoc.api.ITraceExtractor.StepWrapper; -import fr.inria.diverse.trace.gemoc.api.ITraceListener; - -public class StateGraph extends DirectedGraph implements ITraceListener { - - private ITraceExtractor traceExtractor; - - private ITraceExplorer traceExplorer; - - private final Map stateToNode = new HashMap<>(); - - private final Map stateToEquivalentState = new HashMap<>(); - - private final List equivalentStates = new ArrayList<>(); - - private BiConsumer renderCommand = null; - - public void setTraceExtractor(ITraceExtractor traceExtractor) { - this.traceExtractor = traceExtractor; - } - - public void setTraceExplorer(ITraceExplorer traceExplorer) { - if (this.traceExplorer != null) { - this.traceExplorer.removeListener(this); - } - this.traceExplorer = traceExplorer; - if (this.traceExplorer != null) { - this.traceExplorer.addListener(this); - } - update(); - } - - public void setUpdateCommand(BiConsumer command) { - renderCommand = command; - } - - @Override - public void update() { - stateToEquivalentState.clear(); - traceExtractor.computeStateEquivalenceClasses().stream().forEach(l->{ - EObject equivalentState = null; - for (EObject state : l) { - if (equivalentStates.contains(state)) { - equivalentState = state; - break; - } - } - if (equivalentState == null) { - equivalentState = l.remove(0); - equivalentStates.add(equivalentState); - } else { - l.remove(equivalentState); - l.forEach(s->{ - equivalentStates.remove(s); - removeVertex(stateToNode.remove(s)); - }); - } - stateToEquivalentState.put(equivalentState,equivalentState); - for (EObject otherState : l) { - stateToEquivalentState.put(otherState,equivalentState); - } - }); - final List stateWrappers = traceExtractor.getStateWrappers(0, traceExtractor.getStatesTraceLength()); - final List stepWrappers = traceExtractor.getStepWrappers(0, traceExtractor.getStatesTraceLength()); - final List> addedEdges = new ArrayList<>(); - - while (!stepWrappers.isEmpty()) { - final StepWrapper stepWrapper = stepWrappers.remove(0); - if (stepWrapper.endingIndex != -1 && stepWrapper.subSteps.isEmpty()) { - final StateWrapper startingStateWrapper = stateWrappers.get(stepWrapper.startingIndex); - final StateWrapper endingStateWrapper = stateWrappers.get(stepWrapper.endingIndex); - final Edge addedEdge = addEdge(startingStateWrapper, endingStateWrapper, stepWrapper.step); - if (addedEdge != null) { - addedEdges.add(addedEdge); - } - } - stepWrappers.addAll(0,stepWrapper.subSteps.stream().map(s->traceExtractor.getStepWrapper(s)).collect(Collectors.toList())); - } - - final List> edgesToRemove = new ArrayList<>(getEdges()); - edgesToRemove.removeAll(addedEdges); - edgesToRemove.forEach(e -> removeEdge(e)); - - if (renderCommand != null) { - StateVertex currentNode = null; - final StateWrapper currentStateWrapper = traceExtractor.getStateWrapper(traceExplorer.getCurrentStateIndex()); - if (currentStateWrapper != null) { - final EObject equivalentState = stateToEquivalentState.get(currentStateWrapper.state); - currentNode = stateToNode.get(equivalentState); - } - renderCommand.accept(false, currentNode); - } - } - - public Edge addEdge(StateWrapper startStateWrapper, StateWrapper endStateWrapper, EObject step) { - final EObject startState = startStateWrapper.state; - final EObject endState = endStateWrapper.state; - final EObject equivalentStartState = stateToEquivalentState.get(startState); - final EObject equivalentEndState = stateToEquivalentState.get(endState); - if (equivalentEndState == equivalentStartState) { - return null; - } else { - StateVertex startNode = null; - StateVertex endNode = null; - for (Entry entry : stateToNode.entrySet()) { - final EObject entryState = entry.getKey(); - if (startNode == null) { - if (equivalentStartState == entryState) { - startNode = entry.getValue(); - continue; - } - } - - if (endNode == null) { - if (equivalentEndState == entryState) { - endNode = entry.getValue(); - } - } - - if (startNode != null && endNode != null) { - break; - } - } - - if (startNode == null) { - startNode = addVertex(new StateVertex(traceExtractor.getStateDescription(startStateWrapper.stateIndex))); - stateToNode.put(equivalentStartState, startNode); - } else { - startNode.setTooltip(traceExtractor.getStateDescription(startStateWrapper.stateIndex)); - } - if (endNode == null) { - endNode = addVertex(new StateVertex(traceExtractor.getStateDescription(endStateWrapper.stateIndex))); - stateToNode.put(equivalentEndState, endNode); - } else { - endNode.setTooltip(traceExtractor.getStateDescription(endStateWrapper.stateIndex)); - } - - Edge result = getEdge(startNode, endNode); - - if (result == null) { - result = addEdge(startNode, endNode); - } - return result; - } - } - - public void clear() { - stateToNode.clear(); - if (renderCommand != null) { - renderCommand.accept(true, null); - } - update(); - } -} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/StateVertex.java b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/StateVertex.java deleted file mode 100644 index 3dfa48932..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/StateVertex.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.gemoc.sequential_addons.stategraph.logic; - -import java.util.function.Consumer; - -public class StateVertex { - - private String tooltip; - private Consumer command; - - public StateVertex() { - } - - public StateVertex(String tooltip) { - this.tooltip = tooltip; - } - - public String getTooltip() { - return tooltip; - } - - public void setTooltip(String tooltip) { - this.tooltip = tooltip; - if (command != null) { - command.accept(tooltip); - } - } - - public void setOnTooltipUpdateCommand(Consumer command) { - this.command = command; - } -} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/IHullAlgorithm.java b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/IHullAlgorithm.java deleted file mode 100644 index 28e2c6613..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/logic/alg/IHullAlgorithm.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.gemoc.sequential_addons.stategraph.logic.alg; - -import java.util.List; - -public interface IHullAlgorithm { - List convexHull(List points); -} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/views/StateGraphRenderer.java b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/views/StateGraphRenderer.java deleted file mode 100644 index 54ef4fddc..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/views/StateGraphRenderer.java +++ /dev/null @@ -1,363 +0,0 @@ -package org.gemoc.sequential_addons.stategraph.views; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -import org.gemoc.sequential_addons.stategraph.logic.DirectedGraph.Edge; -import org.gemoc.sequential_addons.stategraph.logic.StateGraph; -import org.gemoc.sequential_addons.stategraph.logic.StateVertex; -import org.gemoc.sequential_addons.stategraph.logic.alg.IHullAlgorithm; -import org.gemoc.sequential_addons.stategraph.logic.alg.JarvisMarch; -import org.gemoc.sequential_addons.stategraph.logic.alg.JohnsonSimpleCycles; - -import javafx.application.Platform; -import javafx.beans.binding.DoubleBinding; -import javafx.beans.property.DoubleProperty; -import javafx.beans.value.ChangeListener; -import javafx.scene.Node; -import javafx.scene.control.Tooltip; -import javafx.scene.layout.Background; -import javafx.scene.layout.BackgroundFill; -import javafx.scene.layout.Pane; -import javafx.scene.paint.Color; -import javafx.scene.paint.Paint; -import javafx.scene.shape.Circle; -import javafx.scene.shape.LineTo; -import javafx.scene.shape.MoveTo; -import javafx.scene.shape.Path; -import javafx.scene.shape.Polygon; -import javafx.scene.shape.Shape; -import javafx.scene.shape.StrokeLineJoin; -import javafx.scene.shape.StrokeType; - -public class StateGraphRenderer extends Pane { - - private StateGraph stateGraph; - - final private Map nodeToShape = new HashMap<>(); - - final private Map,Shape> edgeToShape = new HashMap<>(); - - final private List hulls = new ArrayList<>(); - - private double mouseX; - - private double mouseY; - - public StateGraphRenderer(StateGraph stateGraph) { - this.stateGraph = stateGraph; - this.stateGraph.setUpdateCommand((clear, currentVertex)->render(clear, currentVertex)); - setBackground(new Background(new BackgroundFill(Color.WHITE, null, null))); - } - - public void setStateGraph(StateGraph stateGraph) { - this.stateGraph = stateGraph; - this.stateGraph.setUpdateCommand((clear, currentVertex)->render(clear, currentVertex)); - } - - private Circle createVertexShape(StateVertex node) { - final double radius = Math.log(1 + (stateGraph.getIncomingEdges(node).size() + stateGraph.getOutgoingEdges(node).size())) * 5; - Circle circle = new Circle(radius); - - final int n = stateGraph.getVertice().indexOf(node); - if (n / 5 == 1) { - circle.setTranslateX(500 - n % 5 * 100); - } else { - circle.setTranslateX(100 + n % 5 * 100); - } - circle.setTranslateY(100 + n / 5 * 100); - circle.setFill(Color.SLATEBLUE); - - circle.setOnMousePressed(event -> { - mouseX = event.getX(); - mouseY = event.getY(); - }); - - circle.setOnMouseDragged(event -> { - double deltaX = event.getX() - mouseX; - double deltaY = event.getY() - mouseY; - circle.setTranslateX(circle.getTranslateX() + deltaX); - circle.setTranslateY(circle.getTranslateY() + deltaY); - }); - - final String s = node.getTooltip(); - final Tooltip t = new Tooltip(s); - Tooltip.install(circle, t); - node.setOnTooltipUpdateCommand(text -> Platform.runLater(() -> t.setText(text))); - - return circle; - } - - private Shape createEdgeShape(Edge edge, Circle startVertex, Circle endVertex) { - final Path path = new Path(); - path.setStrokeWidth(1.5); - path.setStroke(Color.BLUE); - final MoveTo moveTo = new MoveTo(); - moveTo.xProperty().bind(startVertex.translateXProperty()); - moveTo.yProperty().bind(startVertex.translateYProperty()); - - final DoubleBinding a = new DoubleBinding() { - private final DoubleBinding dX = startVertex.translateXProperty().subtract(endVertex.translateXProperty()); - private final DoubleBinding dY = startVertex.translateYProperty().subtract(endVertex.translateYProperty()); - { - super.bind(dX, dY); - } - @Override - protected double computeValue() { - return Math.atan2(dY.get(), dX.get()); - } - }; - - final DoubleBinding x = new DoubleBinding() { - private final DoubleProperty cX = endVertex.translateXProperty(); - private final DoubleProperty r = endVertex.radiusProperty(); - { - super.bind(cX, r, a); - } - @Override - protected double computeValue() { - return cX.get() + Math.cos(a.get()) * r.get(); - } - }; - - final DoubleBinding y = new DoubleBinding() { - private final DoubleProperty cY = endVertex.translateYProperty(); - private final DoubleProperty r = endVertex.radiusProperty(); - { - super.bind(cY, r, a); - } - @Override - protected double computeValue() { - return cY.get() + Math.sin(a.get()) * r.get(); - } - }; - - final LineTo lineTo = new LineTo(); - lineTo.xProperty().bind(x); - lineTo.yProperty().bind(y); - - final DoubleBinding aX1 = new DoubleBinding() { - { - super.bind(a,x); - } - @Override - protected double computeValue() { - return x.get() + Math.cos(a.get() - Math.PI / 6) * 5; - } - }; - - final DoubleBinding aY1 = new DoubleBinding() { - { - super.bind(a,y); - } - @Override - protected double computeValue() { - return y.get() + Math.sin(a.get() - Math.PI / 6) * 5; - } - }; - - final DoubleBinding aX2 = new DoubleBinding() { - { - super.bind(a,x); - } - @Override - protected double computeValue() { - return x.get() + Math.cos(a.get() + Math.PI / 6) * 5; - } - }; - - final DoubleBinding aY2 = new DoubleBinding() { - { - super.bind(a,y); - } - @Override - protected double computeValue() { - return y.get() + Math.sin(a.get() + Math.PI / 6) * 5; - } - }; - - final LineTo lineTo2 = new LineTo(); - lineTo2.xProperty().bind(aX1); - lineTo2.yProperty().bind(aY1); - - final MoveTo moveTo2 = new MoveTo(); - moveTo2.xProperty().bind(x); - moveTo2.yProperty().bind(y); - - final LineTo lineTo3 = new LineTo(); - lineTo3.xProperty().bind(aX2); - lineTo3.yProperty().bind(aY2); - - path.getElements().addAll(moveTo,lineTo,lineTo2,moveTo2,lineTo3); - - return path; - } - - private boolean changed = false; - private StateVertex currentVertex = null; - - private void render(boolean clear, StateVertex currentVertex) { - this.currentVertex = currentVertex; - Platform.runLater(() -> { - if (clear) { - getChildren().clear(); - nodeToShape.clear(); - edgeToShape.clear(); - } - - final Map, StateVertex> workList = new HashMap<>(); - final List vertexShapesToAdd = new ArrayList<>(); - final List edgeShapesToAdd = new ArrayList<>(); - final List vertice = stateGraph.getVertice(); - final List verticeToRemove = new ArrayList<>(nodeToShape.keySet()); - verticeToRemove.removeAll(vertice); - - if (!verticeToRemove.isEmpty()) { - changed = true; - } - - verticeToRemove.forEach(n->{ - final Shape vertexShape = nodeToShape.get(n); - nodeToShape.remove(n); - if (vertexShape != null) { - getChildren().remove(vertexShape); - } - }); - - for (StateVertex v : vertice) { - Circle vertexShape = nodeToShape.get(v); - if (vertexShape == null) { - changed = true; - vertexShape = createVertexShape(v); - nodeToShape.put(v, vertexShape); - vertexShapesToAdd.add(vertexShape); - } else { - final double radius = Math.log(1 + (stateGraph.getIncomingEdges(v).size() + stateGraph.getOutgoingEdges(v).size())) * 5; - vertexShape.setRadius(radius); - } - if (currentVertex == v) { - vertexShape.setFill(Color.CORAL); - } else { - vertexShape.setFill(Color.SLATEBLUE); - } - - for (Edge e : stateGraph.getOutgoingEdges(v)) { - workList.put(e, v); - } - } - - final List> edgesToRemove = new ArrayList<>(edgeToShape.keySet()); - - for (StateVertex v : vertice) { - for (Edge e : stateGraph.getIncomingEdges(v)) { - final StateVertex w = workList.get(e); - if (w != null && v != w) { - Shape edgeShape = edgeToShape.get(e); - if (edgeShape == null) { - changed = true; - edgeShape = createEdgeShape(e, nodeToShape.get(w), nodeToShape.get(v)); - edgeToShape.put(e, edgeShape); - edgeShapesToAdd.add(edgeShape); - } - edgesToRemove.remove(e); - } - } - } - - if (!edgesToRemove.isEmpty()) { - changed = true; - } - - edgesToRemove.forEach(e->{ - final Shape edgeShape = edgeToShape.get(e); - edgeToShape.remove(e); - if (edgeShape != null) { - getChildren().remove(edgeShape); - } - }); - - getChildren().addAll(0,edgeShapesToAdd); - getChildren().addAll(vertexShapesToAdd); - - if (!isCycleColorationEnabled) { - getChildren().removeAll(hulls); - hulls.clear(); - } else if (changed) { - getChildren().removeAll(hulls); - hulls.clear(); - - final JohnsonSimpleCycles algo = new JohnsonSimpleCycles<>(stateGraph); - final List> cycles = algo.findSimpleCycles(); - final IHullAlgorithm hullAlgo = new JarvisMarch(); - - if (!cycles.isEmpty()) { - double hueInterval = 360. / (double) cycles.size(); - - for (int i = 0; i < cycles.size(); i++) { - Polygon hull = new Polygon(); - Paint p = Color.hsb(i * hueInterval, 0.75, 0.70, 0.25); - hull.setFill(p); - hull.setStroke(p); - hull.setStrokeWidth(20); - hull.setStrokeLineJoin(StrokeLineJoin.ROUND); - hull.setStrokeType(StrokeType.OUTSIDE); - getChildren().add(0, hull); - hulls.add(hull); - List nodes = cycles.get(i).stream().map(v -> (Node) nodeToShape.get(v)) - .collect(Collectors.toList()); - - updateHull(hull, nodes, hullAlgo); - - final ChangeListener listener = (_0,_1,_2) -> { - updateHull(hull, nodes, hullAlgo); - }; - - for (Node n : nodes) { - n.translateXProperty().addListener(listener); - n.translateYProperty().addListener(listener); - } - } - } - - changed = false; - } - }); - } - - private void updateHull(Polygon hull, List nodes, IHullAlgorithm hullAlgo) { - List points = new ArrayList<>(); - - for (Node n : nodes) { - points.add(new double[] {n.getTranslateX(), n.getTranslateY()}); - } - - List coordinates = new ArrayList<>(); - if (points.size() <= 3) { - for (double[] point : points) { - coordinates.add(point[0]); - coordinates.add(point[1]); - } - } else { - for (double[] point : hullAlgo.convexHull(points)) { - coordinates.add(point[0]); - coordinates.add(point[1]); - } - } - - hull.getPoints().clear(); - hull.getPoints().addAll(coordinates); - } - - private boolean isCycleColorationEnabled = false; - - public void setCycleColorationEnabled(boolean checked) { - if (isCycleColorationEnabled != checked) { - isCycleColorationEnabled = checked; - changed = true; - render(false, currentVertex); - } - } -} diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/views/StateGraphViewPart.java b/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/views/StateGraphViewPart.java deleted file mode 100644 index ee5e957c7..000000000 --- a/trace/manager/plugins/org.gemoc.sequential_addons.stategraph/src/org/gemoc/sequential_addons/stategraph/views/StateGraphViewPart.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.gemoc.sequential_addons.stategraph.views; - -import java.util.Set; -import org.gemoc.sequential_addons.stategraph.Activator; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IActionBars; -import org.gemoc.executionframework.ui.views.engine.EngineSelectionDependentViewPart; -import org.gemoc.executionframework.ui.views.engine.actions.AbstractEngineAction; -import org.gemoc.sequential_addons.stategraph.logic.StateGraph; -import org.gemoc.xdsmlframework.api.core.IExecutionEngine; - -import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon; -import javafx.embed.swt.FXCanvas; -import javafx.scene.Scene; -import javafx.scene.layout.Pane; - -public class StateGraphViewPart extends EngineSelectionDependentViewPart { - - public static final String ID = "org.gemoc.sequential_addons.multidimensional.timeline.views.timeline.StateGraphViewPart"; - - private FXCanvas fxCanvas; - - private StateGraphRenderer renderer; - - private StateGraph stateGraph; - - private Pane root; - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - if (engine != null) { - Set traceAddons = engine.getAddonsTypedBy(IMultiDimensionalTraceAddon.class); - if (!traceAddons.isEmpty()) { - final IMultiDimensionalTraceAddon traceAddon = traceAddons.iterator().next(); - stateGraph = new StateGraph(); - stateGraph.setTraceExtractor(traceAddon.getTraceExtractor()); - stateGraph.setTraceExplorer(traceAddon.getTraceExplorer()); - renderer.setStateGraph(stateGraph); - } - } - } - - private void setupRoot() { - stateGraph = new StateGraph(); - renderer = new StateGraphRenderer(stateGraph); - root.getChildren().add(renderer); - renderer.minWidthProperty().bind(root.widthProperty()); - renderer.prefWidthProperty().bind(root.widthProperty()); - renderer.maxWidthProperty().bind(root.widthProperty()); - renderer.minHeightProperty().bind(root.heightProperty()); - renderer.prefHeightProperty().bind(root.heightProperty()); - renderer.maxHeightProperty().bind(root.heightProperty()); - } - - @Override - public void createPartControl(Composite parent) { - fxCanvas = new FXCanvas(parent, SWT.NONE); - root = new Pane(); - final Scene scene = new Scene(root); - fxCanvas.setScene(scene); - setupRoot(); - buildMenu(parent.getShell()); - } - - private void buildMenu(Shell shell) { - addActionToToolbar(new AbstractEngineAction(Action.AS_CHECK_BOX) { - @Override - protected void init() { - super.init(); - setText("Toggle Cycle Coloration"); - setToolTipText("Toggle Cycle Coloration"); - ImageDescriptor id = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/cycle_coloration.png"); - setImageDescriptor(id); - setEnabled(true); - } - - @Override - public void engineSelectionChanged(IExecutionEngine engine) { - } - - @Override - public void run() { - renderer.setCycleColorationEnabled(isChecked()); - } - }); - } - - private void addActionToToolbar(Action action) { - IActionBars actionBars = getViewSite().getActionBars(); - IToolBarManager toolBar = actionBars.getToolBarManager(); - toolBar.add(action); - } - - @Override - public void setFocus() { - if (fxCanvas != null) { - fxCanvas.setFocus(); - } - } -} \ No newline at end of file diff --git a/trace/manager/pom.xml b/trace/manager/pom.xml index f4e1f180f..0709c3d7f 100644 --- a/trace/manager/pom.xml +++ b/trace/manager/pom.xml @@ -2,26 +2,27 @@ 4.0.0 - org.gemoc.modeldebugging.trace.manager - org.gemoc.modeldebugging.trace.manager.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc.trace.manager + org.eclipse.gemoc.trace.manager.root + 2.3.0-SNAPSHOT pom - org.gemoc - org.gemoc.siriusanimation.root - 0.1.0-SNAPSHOT + org.eclipse.gemoc + org.eclipse.gemoc.modeldebugging.root + 2.3.0-SNAPSHOT ../.. - plugins/org.gemoc.sequential_addons.multidimensional.timeline + plugins/org.eclipse.gemoc.addon.multidimensional.timeline + plugins/org.eclipse.gemoc.addon.stategraph + plugins/org.eclipse.gemoc.addon.diffviewer - - releng/org.gemoc.modeldebugging.trace.manager.feature - releng/org.gemoc.modeldebugging.trace.manager.updatesite + + releng/org.eclipse.gemoc.trace.manager.feature @@ -47,28 +48,18 @@ - - - gemoc-studio_gemoc_commons on CI - p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_gemoc_commons/lastSuccessfulBuild/artifact/gemoc_commons/releng/org.gemoc.gemoc_commons.repository/target/repository/ - - - modelanimation_executionengine_java on CI - p2 - https://ci.inria.fr/gemoc/job/modelanimation_executionengine_java/lastSuccessfulBuild/artifact/java_execution/releng/org.gemoc.execution.sequential.java.repository/target/repository/ - - + + gemoc-studio_commons on CI p2 - https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.gemoc.commons.repository/target/repository/ + https://ci.inria.fr/gemoc/job/gemoc-studio_commons/lastSuccessfulBuild/artifact/commons/releng/org.eclipse.gemoc.commons.repository/target/repository/ - - - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/.classpath b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/.classpath deleted file mode 100644 index 248b4c5dc..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/.project b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/.project deleted file mode 100644 index 62d229e7d..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.benchmark - - - - - - 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/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/META-INF/MANIFEST.MF deleted file mode 100644 index 458c68e00..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/META-INF/MANIFEST.MF +++ /dev/null @@ -1,34 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.trace.benchmark -Bundle-SymbolicName: fr.inria.diverse.trace.benchmark -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - org.eclipse.emf;bundle-version="2.6.0", - org.eclipse.emf.ecore;bundle-version="2.10.2", - fr.inria.diverse.trace.api;bundle-version="1.0.0", - org.gemoc.execution.engine.trace.model;bundle-version="0.1.0", - org.gemoc.execution.engine.commons;bundle-version="0.1.0", - org.eclipse.debug.core;bundle-version="3.9.1", - org.eclipse.core.runtime;bundle-version="3.10.0", - org.gemoc.gemoc_language_workbench.api;bundle-version="0.1.0", - org.gemoc.gemoc_language_workbench.extensions.k3;bundle-version="0.1.0", - fr.inria.diverse.trace.gemoc;bundle-version="1.0.0", - org.gemoc.execution.engine.io;bundle-version="0.1.0", - org.eclipse.mat.api, - org.eclipse.mat.parser, - org.eclipse.mat.hprof, - org.eclipse.mat.jdt, - org.junit;bundle-version="4.11.0", - org.eclipse.jdt.core, - fr.inria.diverse.commons.provisionner4eclipse, - fr.inria.diverse.trace.commons.testutil;bundle-version="1.0.0", - org.eclipse.emf.transaction;bundle-version="1.8.0", - fr.inria.diverse.k3.al.annotationprocessor.plugin;bundle-version="1.0.0", - org.gemoc.execution.engine;bundle-version="0.1.0" -Import-Package: fr.obeo.timeline.model, - org.eclipse.jdt.core.search diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Benchmark.xtend b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Benchmark.xtend deleted file mode 100644 index a6e34a891..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Benchmark.xtend +++ /dev/null @@ -1,164 +0,0 @@ -package fr.inria.diverse.trace.benchmark - -import fr.inria.diverse.trace.benchmark.api.IDebuggerHelper -import java.io.File -import java.io.IOException -import java.util.Collections -import java.util.HashSet -import java.util.List -import java.util.Map -import java.util.Set -import org.eclipse.core.runtime.CoreException -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.ecore.resource.Resource -import org.gemoc.execution.engine.commons.EngineContextException - -/** - * We want one line per tuple - * Each line has: - * language,model,debugger,model_size,nbMut,timeStep,traceSize,traceMemoryFootprint,meanJumpTime,allJumpTimes - */ -class Benchmark { - - private val Map> languagesAndModels - private val List debuggers - private val int nbRetries - private val File dumpFolder - private val waitTime = 500 - - /** - * TODO un set de models par language! - */ - new(Map> languagesAndModels, List debuggers, int nbRetries, - File dumpFolder) { - this.languagesAndModels = languagesAndModels - this.debuggers = debuggers - this.nbRetries = nbRetries - this.dumpFolder = dumpFolder - } - - def Results computeAll() throws CoreException, EngineContextException , IOException { - - println("Starting the benchmark...") - - // First variable here to be filled and thrown away - var Results results = new Results() - - val nbWarmup = 1 - - for (int w : 0 .. nbWarmup) { - - if(w == nbWarmup) { - - // This one is the real being used - results = new Results() - } - for (l : languagesAndModels.keySet) { - println("Language " + l.languageName) - for (debugger : debuggers) { - println("Debugger " + debugger.debuggerName) - for (model : languagesAndModels.get(l)) { - debugger.init(); - println("Model " + model.lastSegment) - val Set toMerge = new HashSet - for (int i : 1 .. nbRetries) { - println("Try " + i) - - val Result result = new Result() - - // General information - result.languageName = l.languageName - result.debuggerName = debugger.debuggerName - result.modelName = model.lastSegment - result.nbRetries = nbRetries - - // Preparing engine parameters - val EngineHelper engine = new EngineHelper(); - engine.removeStoppedEngines(); - - // Creating gemoc engine for the execution (up until first model state created...?) - println("Preparing engine...") - Thread.sleep(waitTime) - val long setUpBegin = System.nanoTime - engine.prepareEngine(model, debugger, l); - val long setUpEnd = System.nanoTime - result.timeInit = setUpEnd - setUpBegin - - // Information about the executed model - println("Getting information about model...") - result.modelNbElements = computeModelSize(engine.model) // number of eobjects - result.modelNbMutFields = computeNumberMutableElements(engine.model) // sum of : (number of instances) times (number of mutable properties in class) - - // Executing the model entirely - println("Execution the model...") - Thread.sleep(waitTime) - val long completeExeBegin = System.nanoTime - engine.execute() - val long completeExeEnd = System.nanoTime - result.timeExe = completeExeEnd - completeExeBegin - - // Retrieving information about the created trace - println("Getting information about the trace...") - val int traceSize = debugger.getTraceSize(); - result.traceNbStates = traceSize - - // We don't capture memory during warmups - if(w == nbWarmup) - result.traceMemoryFootprint = debugger.getTraceMemoryFootprint(l, dumpFolder, traceSize) - - println("... done") - - // Doing the jumps (or simply retrieving times that correspond) - println("Doing the jumps...") - if(debugger.canJump()) { - - // Mean jump time (hopping into all states, in a random order) - println("Mean jump time (hopping into all states, in a random order)") - val allJumps = (1 .. traceSize - 1).toList - Collections.shuffle(allJumps) - debugger.jump(0); - Thread.sleep(waitTime) - val long jumpAllBegin = System.nanoTime - for (toJump : allJumps) { - println("\tJumping to " + toJump) - debugger.jump(toJump); - } - val long jumpAllEnd = System.nanoTime - result.timeJumpMean = (jumpAllEnd - jumpAllBegin) / (allJumps.size) - - } - - println("Done! Result:") - println(result) - - // We do the warmup once per measure - toMerge.add(result) - - engine.clearCommandStackAndAdapters - debugger.unloadTraceResource - - } - results.addResult(Result.merge(toMerge)) - - } - } - - } - } - - return results - } - - def int computeModelSize(Resource resource) { - return resource.allContents.filter(EObject).size - } - - def int computeNumberMutableElements(Resource r) { - val allProperties = r.allContents.filter(EObject).map[o|o.eClass.EAllStructuralFeatures].toList.flatten - // TODO replace by usage of DynamicAnnotationHelper - val annotatedProps = allProperties.filter[f|f.EAnnotations.size > 0] - return annotatedProps.size() - } - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/BenchmarkRunConfiguration.xtend b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/BenchmarkRunConfiguration.xtend deleted file mode 100644 index f718e14a0..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/BenchmarkRunConfiguration.xtend +++ /dev/null @@ -1,80 +0,0 @@ -package fr.inria.diverse.trace.benchmark - -import java.util.ArrayList -import java.util.List -import org.gemoc.gemoc_language_workbench.api.core.IRunConfiguration -import org.gemoc.gemoc_language_workbench.api.extensions.engine_addon.EngineAddonSpecificationExtension -import org.gemoc.gemoc_language_workbench.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint -import org.eclipse.emf.common.util.URI -import java.util.HashSet -import fr.inria.diverse.trace.benchmark.api.IDebuggerHelper -import fr.inria.diverse.trace.benchmark.debuggers.DSTraceDebuggerHelper - -class BenchmarkRunConfiguration implements IRunConfiguration { - - val IDebuggerHelper debugger - val Language language - val URI model - - new(IDebuggerHelper debugger, Language language, URI model) { - this.debugger = debugger - this.language = language - this.model = model - } - - override getAnimationDelay() { - return 0; - } - - override getAnimatorURI() { - return null; - } - - override getDeadlockDetectionDepth() { - return 0; - } - - override getDeciderName() { - return "Random decider" - } - - override getEngineAddonExtensions() { - - // We find the addons we need - val addons = new HashSet() - - addons.addAll(debugger.getAddons()) - if(debugger instanceof DSTraceDebuggerHelper) - addons.add(language.traceAddonName) - - // Then we find all corresponing addon objects and return them - val List result = new ArrayList(); - val loadedAddons = EngineAddonSpecificationExtensionPoint.getSpecifications() - for (ext : loadedAddons) { - if(addons.contains(ext.name)) - result.add(ext) - } - return result - } - - override getExecutedModelAsMelangeURI() { - return getExecutedModelURI(); - } - - override getExecutedModelURI() { - return model - } - - override getExecutionEntryPoint() { - return language.entryPoint - } - - override getLanguageName() { - return language.languageName - } - - override getMelangeQuery() { - throw new UnsupportedOperationException("TODO: auto-generated method stub") - } - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/EngineHelper.java b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/EngineHelper.java deleted file mode 100644 index 13ea0e89b..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/EngineHelper.java +++ /dev/null @@ -1,172 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.benchmark; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Map.Entry; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.transaction.util.TransactionUtil; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.search.IJavaSearchConstants; -import org.eclipse.jdt.core.search.IJavaSearchScope; -import org.eclipse.jdt.core.search.SearchEngine; -import org.eclipse.jdt.core.search.SearchMatch; -import org.eclipse.jdt.core.search.SearchParticipant; -import org.eclipse.jdt.core.search.SearchPattern; -import org.eclipse.jdt.core.search.SearchRequestor; -import org.gemoc.execution.engine.commons.EngineContextException; -import org.gemoc.execution.engine.commons.ModelExecutionContext; -import org.gemoc.gemoc_language_workbench.api.core.ExecutionMode; -import org.gemoc.gemoc_language_workbench.api.core.IExecutionContext; -import org.gemoc.gemoc_language_workbench.api.core.IExecutionEngine; -import org.gemoc.gemoc_language_workbench.api.core.IRunConfiguration; -import org.gemoc.gemoc_language_workbench.extensions.k3.PlainK3ExecutionEngine; -import org.kermeta.utils.provisionner4eclipse.Provisionner; -import org.osgi.framework.Bundle; - -import fr.inria.diverse.trace.benchmark.api.IDebuggerHelper; - -public class EngineHelper { - - static class DefaultSearchRequestor extends SearchRequestor { - - public IType _binaryType; - - @Override - public void acceptSearchMatch(SearchMatch match) throws CoreException { - _binaryType = (IType) match.getElement(); - System.out.println(match.getElement()); - } - - } - - private PlainK3ExecutionEngine _executionEngine; - - // Parameters to create execution engine - private IExecutionContext executionContext; - private Object o; - private Method method; - private ArrayList parameters; - - public void prepareEngine(URI model, IDebuggerHelper debugger, Language language) throws CoreException, - EngineContextException { - - IRunConfiguration runConfiguration = new BenchmarkRunConfiguration(debugger, language, model); - - // We don't want to debug actually, ie we don't want the animator - ExecutionMode executionMode = ExecutionMode.Run; - - // In this construction, the addons are created and loaded as well - executionContext = new ModelExecutionContext(runConfiguration, executionMode); - - String className = executionContext.getRunConfiguration().getExecutionEntryPoint(); - SearchPattern pattern = SearchPattern.createPattern(className, IJavaSearchConstants.CLASS, - IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH); - IJavaSearchScope scope = SearchEngine.createWorkspaceScope(); - DefaultSearchRequestor requestor = new DefaultSearchRequestor(); - SearchEngine engine = new SearchEngine(); - - engine.search(pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, scope, - requestor, null); - - IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) requestor._binaryType.getPackageFragment() - .getParent(); - - parameters = new ArrayList<>(); - parameters.add(executionContext.getResourceModel().getContents().get(0)); - String bundleName = null; - bundleName = packageFragmentRoot.getPath().removeLastSegments(1).lastSegment().toString(); - - Class c = null; - - Bundle bundle = Platform.getBundle(bundleName); - - // If not found, we try again with projects - if (bundle == null) { - - String projectName = requestor._binaryType.getJavaProject().getElementName(); - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); - if (project != null && project.exists() - && !project.getFullPath().equals(executionContext.getWorkspace().getProjectPath())) { - Provisionner p = new Provisionner(); - IStatus status = p.provisionFromProject(project, null); - if (!status.isOK()) { - throw new CoreException(new Status(1, "EngineHelper", "couldn't provision project :(")); - } - } - bundleName = project.getName(); - bundle = Platform.getBundle(bundleName); - - } - - try { - c = bundle.loadClass(executionContext.getRunConfiguration().getExecutionEntryPoint()); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - throw new CoreException(new Status(1, "EngineHelper", "couldn't load Main class")); - } - method = null; - try { - method = c.getMethod("main", parameters.get(0).getClass().getInterfaces()[0]); - } catch (Exception e) { - e.printStackTrace(); - throw new CoreException(new Status(1, "EngineHelper", "couldn't find main method")); - } - o = null; - try { - o = c.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - throw new CoreException(new Status(1, "EngineHelper", "couldn't create Main object")); - } - - _executionEngine = new PlainK3ExecutionEngine(executionContext, o, method, parameters); - debugger.setExecutionEngine(_executionEngine); - - } - - public void execute() { - _executionEngine.start(); - _executionEngine.joinThread(); - } - - public Resource getModel() { - return _executionEngine.getExecutionContext().getResourceModel(); - } - - public void removeStoppedEngines() { - for (Entry engineEntry : org.gemoc.execution.engine.Activator.getDefault().gemocRunningEngineRegistry - .getRunningEngines().entrySet()) { - switch (engineEntry.getValue().getRunningStatus()) { - case Stopped: - org.gemoc.execution.engine.Activator.getDefault().gemocRunningEngineRegistry - .unregisterEngine(engineEntry.getKey()); - break; - default: - } - } - } - - public void clearCommandStackAndAdapters() { - TransactionUtil.getEditingDomain(executionContext.getResourceModel()).getCommandStack().flush();; - executionContext.getResourceModel().eAdapters().clear(); - executionContext.getResourceModel().unload(); - } -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Result.xtend b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Result.xtend deleted file mode 100644 index bd3947145..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Result.xtend +++ /dev/null @@ -1,73 +0,0 @@ -package fr.inria.diverse.trace.benchmark - -import java.util.Set - -//model_size,nbMut,timeStep,traceSize,traceMemoryFootprint,meanJumpTime,allJumpTimes -class Result { - - public String languageName = "" - public String debuggerName = "" - public String modelName = "" - public Integer modelNbElements = 0 - public Integer modelNbMutFields = 0 - public Long timeExe = new Long(0) - public Long timeInit = new Long(0) - public Long timeJumpMean = new Long(0) - public Integer traceNbStates = 0 - public Integer traceMemoryFootprint = 0 - public Integer nbRetries = 0 - - - /** - * TODO - */ - def static Result merge(Set results) { - -// if (results.size < 2) -// throw new Exception ("Cannot merge less than two results!") - - val ret = new Result - - for (p : Result.declaredFields) { - switch (p.type) { - Class: { - p.set(ret, p.get(results.get(0))) - } - Class: { - var long sum = 0 - for (r : results) { - sum = sum + p.getLong(r) - } - val long mean = sum / results.size - p.setLong(ret, mean) - } - Class: { - var int sum = 0 - for (r : results) { - sum = sum + p.getInt(r) - } - val int mean = sum / results.size - p.setInt(ret, mean) - } - } - } - - return ret - } - - def static String getColumnNames() { - val allNames = Result.declaredFields.map[f|f.name] - return allNames.join(",") - } - - override toString() { - return Result.declaredFields.map[f| - try { - f.get(this) - } catch(IllegalAccessException exc) { - throw new RuntimeException("auto-generated try/catch", exc) - }].join(",") - - } - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Results.xtend b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Results.xtend deleted file mode 100644 index e7a1c2411..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Results.xtend +++ /dev/null @@ -1,39 +0,0 @@ -package fr.inria.diverse.trace.benchmark - -import java.util.HashSet -import java.util.List -import java.util.Set -import java.util.ArrayList - -class Results { - - private List results = new ArrayList - - new() { - } - - def void addResult(Result r) { - results.add(r) - } - - static def Results merge(Set manyResults) { - val Results someResults = manyResults.get(0); - val ret = new Results() - for (var int i = 0; i < someResults.results.size; i++) { - val Set iLines = new HashSet() - for (results : manyResults) { - iLines.add(results.results.get(i)) - } - ret.addResult(Result.merge(iLines)) - } - return ret - } - - override public String toString() { - return '''«Result.getColumnNames» -«FOR r : results» -«r.toString» -«ENDFOR»''' - } - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/AbstractTraceDebugger.java b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/AbstractTraceDebugger.java deleted file mode 100644 index 7e72b8249..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/AbstractTraceDebugger.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.benchmark.debuggers; - -import java.io.File; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.eclipse.emf.ecore.resource.Resource; - -import fr.inria.diverse.trace.benchmark.Language; -import fr.inria.diverse.trace.benchmark.api.IDebuggerHelper; -import fr.inria.diverse.trace.benchmark.memory.HeapDump; -import fr.inria.diverse.trace.benchmark.memory.MemoryAnalyzer; - -public abstract class AbstractTraceDebugger implements IDebuggerHelper { - - @Override - public void init() { - memory = -1; - } - - int memory = -1; - - public static void deleteFolder(File folder) { - File[] files = folder.listFiles(); - if (files != null) { // some JVMs return null for empty dirs - for (File f : files) { - if (f.isDirectory()) { - deleteFolder(f); - } else { - f.delete(); - } - } - } - folder.delete(); - } - - @Override - /** - * TODO - * In fact we forget lots of stuff: clones are stored at the root of the resource! - */ - public int getTraceMemoryFootprint(Language l, File dumpFolder, int traceSize) throws Exception { - - DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss"); - Date date = new Date(); - String dateString = dateFormat.format(date); - String folderName = dateString + "_" + this.getDebuggerName() + "_" + l.languageName; - - if (memory == -1) { - - - // MemoryAnalyzer.dumpHeap(dumpFile); - - boolean ok = false; - for (int i = 0; i < 5 && !ok; i++) { - - try { - - if (dumpFolder == null) { - dumpFolder = File.createTempFile(folderName, ""); - dumpFolder.delete(); - dumpFolder.mkdir(); - } - - deleteFolder(dumpFolder); - - File innerDumpFolder = new File(dumpFolder, folderName); - innerDumpFolder.mkdirs(); - - File dumpFile = new File(innerDumpFolder, "heapDump"); - HeapDump.dumpHeap(dumpFile.getAbsolutePath(), true); - memory = computeTraceMemoryFootprint(l, dumpFile, traceSize); - deleteFolder(dumpFolder); - ok = true; - } catch (Exception e) { - e.printStackTrace(); - System.out.println("ERROR while analyzing memory - attempt "+i+"/4"); - if (i == 5) - throw e; - } - } - - } - return memory; - - } -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/DSTraceDebuggerHelper.xtend b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/DSTraceDebuggerHelper.xtend deleted file mode 100644 index 6b5ce0295..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/DSTraceDebuggerHelper.xtend +++ /dev/null @@ -1,73 +0,0 @@ -package fr.inria.diverse.trace.benchmark.debuggers - -import fr.inria.diverse.trace.benchmark.api.IDebuggerHelper -import fr.inria.diverse.trace.gemoc.traceaddon.AbstractTraceAddon -import java.util.Collections -import java.io.File -import fr.inria.diverse.trace.benchmark.memory.MemoryAnalyzer -import fr.inria.diverse.trace.benchmark.Language -import org.gemoc.gemoc_language_workbench.extensions.k3.PlainK3ExecutionEngine - -class DSTraceDebuggerHelper extends AbstractTraceDebugger implements IDebuggerHelper { - - var AbstractTraceAddon traceAddon - - override getAddons() { - return Collections.singleton("TimeLineProviderProvider"); - } - - override getDebuggerName() { - return "DomainSpecificTraceDebugger" - } - - override canJump() { - return true; - } - - override getTraceSize() { - return traceAddon.traceManager.traceSize - } - - override jump(int i) { - traceAddon.goToNoTimelineNotification(i) - } - - override setExecutionEngine(PlainK3ExecutionEngine _executionEngine) { - traceAddon = _executionEngine.getAddonsTypedBy(AbstractTraceAddon).get(0) - traceAddon.disableTraceSaving - } - - override computeTraceMemoryFootprint(Language l, File dumpFile, int traceSize) { - - val analyzer = new MemoryAnalyzer(dumpFile); - - // First we make sure that there is only one trace - val String queryCheck = "SELECT * FROM " + l.javaTraceRootName; - val resCheck = analyzer.computeRetainedSizeWithOQLQuery(queryCheck, dumpFile); - if(resCheck.nbElements != 1) { - //println("SLEEPING WHILE TOO MANY TRACES"); - //Thread.sleep(100000000); - throw new Exception("Wrong number of traces: " + resCheck.nbElements); - } - - val queryAll = "select a.@retainedHeapSize from \".*" + l.javaTracePackageName + ".*\" a"; - val queryRemove = "select a.@retainedHeapSize from \".*" + l.javaTracePackageName + - ".*(PackageImpl|FactoryImpl|AdapterFactory|Switch)$\" a"; - - println("QueryAll: "+queryAll) - println("QueryRemove: "+queryRemove) - - val resAll = analyzer.computeRetainedSizeWithOQLQuery(queryAll, dumpFile); - val resRemove = analyzer.computeRetainedSizeWithOQLQuery(queryRemove, dumpFile); - - println("Memory all package: " + resAll.memorySum) - println("Memory to remove: " + resRemove.memorySum) - - return resAll.memorySum - resRemove.memorySum - } - - override unloadTraceResource() { - traceAddon.traceManager.getExecutionState(0).eContainer.eResource.unload - } - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/NoTraceDebuggerHelper.java b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/NoTraceDebuggerHelper.java deleted file mode 100644 index eba7ee9d5..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/NoTraceDebuggerHelper.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.benchmark.debuggers; - -import java.io.File; -import java.util.Collection; -import java.util.Collections; - -import org.gemoc.gemoc_language_workbench.extensions.k3.PlainK3ExecutionEngine; - -import fr.inria.diverse.trace.benchmark.Language; -import fr.inria.diverse.trace.benchmark.api.IDebuggerHelper; - -public class NoTraceDebuggerHelper implements IDebuggerHelper { - - @Override - public boolean canJump() { - return false; - } - - @Override - public void jump(int i) { - - } - - @Override - public int getTraceSize() { - return 0; - } - - @Override - public int getTraceMemoryFootprint(Language l, File dumpFolder, int traceSize) { - return 0; - } - - @Override - public String getDebuggerName() { - return "NoTraceDebuggerHelper"; - } - - @Override - public Collection getAddons() { - return Collections.emptySet(); - } - - @Override - public void setExecutionEngine(PlainK3ExecutionEngine _executionEngine) { - - } - - @Override - public void init() { - // TODO Auto-generated method stub - - } - - @Override - public int computeTraceMemoryFootprint(Language l, File dumpFile, int traceSize) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void unloadTraceResource() { - // TODO Auto-generated method stub - - } - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/SnapshotDebugger.java b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/SnapshotDebugger.java deleted file mode 100644 index c5f3c1029..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/debuggers/SnapshotDebugger.java +++ /dev/null @@ -1,127 +0,0 @@ -/******************************************************************************* - * 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 fr.inria.diverse.trace.benchmark.debuggers; - -import java.io.File; -import java.util.Collection; -import java.util.Collections; - -import org.gemoc.execution.engine.commons.trace.ModelExecutionTracingAddon; -import org.gemoc.execution.engine.trace.gemoc_execution_trace.ModelState; -import org.gemoc.gemoc_language_workbench.extensions.k3.PlainK3ExecutionEngine; - -import fr.inria.diverse.trace.benchmark.Language; -import fr.inria.diverse.trace.benchmark.api.IDebuggerHelper; -import fr.inria.diverse.trace.benchmark.memory.MemoryAnalyzer; -import fr.inria.diverse.trace.benchmark.memory.MemoryAnalyzer.QueryResult; - -public class SnapshotDebugger extends AbstractTraceDebugger implements IDebuggerHelper { - - private static final String javaPackageName = "org.gemoc.execution.engine.trace"; - private static final String javaTraceRootName = "org.gemoc.execution.engine.trace.gemoc_execution_trace.impl.ExecutionTraceModelImpl"; - - ModelExecutionTracingAddon traceAddon; - - @Override - public boolean canJump() { - return true; - } - - @Override - public void jump(int i) { - - ModelState state = traceAddon.getExecutionTrace().getReachedStates().get(i); - traceAddon.jump(state); - } - - @Override - public int getTraceSize() { - return traceAddon.getExecutionTrace().getReachedStates().size(); - } - - @Override - public String getDebuggerName() { - return "SnapshotDebugger"; - } - - @Override - public void setExecutionEngine(PlainK3ExecutionEngine executionEngine) { - traceAddon = executionEngine.getAddon(ModelExecutionTracingAddon.class); - traceAddon.disableTraceSaving(); - } - - @Override - public Collection getAddons() { - return Collections.singleton("Execution tracing"); - } - - @Override - public int computeTraceMemoryFootprint(Language l, File dumpFile, int traceSize) throws Exception { - - System.out.println("Parsing the dump..."); - MemoryAnalyzer analyzer = new MemoryAnalyzer(dumpFile); - - // First we make sure that there is only one trace - String queryCheck = "SELECT * FROM " + javaTraceRootName; - - System.out.println("Query check..."); - QueryResult resCheck = analyzer.computeRetainedSizeWithOQLQuery(queryCheck, dumpFile); - - if (resCheck.nbElements != 1) { - //System.out.println("SLEEPING WHILE TOO MANY TRACES"); - //Thread.sleep(100000000); - throw new Exception("Wrong number of traces: " + resCheck.nbElements); - } - - // Then we prepare the queries - String queryClones = "SELECT a.@retainedHeapSize FROM " - + l.languageRootClassName + " a " - + " WHERE (" - + " (a.eStorage.toString() LIKE \".*Object.*\")" - + " and (a.eStorage[1].toString() LIKE \".*XMI.*\")" - + " and (a.eStorage[1].uri.segments[2].toString() LIKE \"gemoc-gen\")" - + ")"; - String queryAll = "select a.@retainedHeapSize from \".*" + javaPackageName + ".*\" a"; - String queryRemove = "select a.@retainedHeapSize from \".*" + javaPackageName - + ".*(PackageImpl|FactoryImpl|AdapterFactory|Switch)$\" a"; - - // Memory used by trace structure - System.out.println("Query all..."); - QueryResult resAll = analyzer.computeRetainedSizeWithOQLQuery(queryAll, dumpFile); - - System.out.println("Query to remove..."); - QueryResult resRemove = analyzer.computeRetainedSizeWithOQLQuery(queryRemove, dumpFile); - - // Memory used by clones - System.out.println("Query clones..."); - QueryResult resClones = analyzer.computeRetainedSizeWithOQLQuery(queryClones, dumpFile); - - // To be sure that our weird clone query works - if (resClones.nbElements != traceSize) { - //System.out.println("SLEEPING WHILE: "+"Wrong trace size: " + resClones.nbElements + " instead of " + traceSize); - //Thread.sleep(100000000); - throw new Exception("Wrong trace size: " + resClones.nbElements + " instead of " + traceSize); - } - - // Debug prints - System.out.println("Memory all package: " + resAll.memorySum); - System.out.println("Memory to remove: " + resRemove.memorySum); - System.out.println("Memory clones: " + resClones.memorySum); - - return resAll.memorySum - resRemove.memorySum + resClones.memorySum; - } - - @Override - public void unloadTraceResource() { - traceAddon.getExecutionTrace().eResource().unload(); - } - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/memory/MemoryAnalyzer.java b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/memory/MemoryAnalyzer.java deleted file mode 100644 index c66766232..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/memory/MemoryAnalyzer.java +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Université de Rennes 1. - * 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: - * Erwan Bousse - initial API and implementation - ******************************************************************************/ -package fr.inria.diverse.trace.benchmark.memory; - -import java.io.File; -import java.lang.management.ManagementFactory; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.mat.SnapshotException; -import org.eclipse.mat.internal.acquire.HeapDumpProviderRegistry; -import org.eclipse.mat.query.IResultTable; -import org.eclipse.mat.snapshot.IOQLQuery; -import org.eclipse.mat.snapshot.ISnapshot; -import org.eclipse.mat.snapshot.OQLParseException; -import org.eclipse.mat.snapshot.SnapshotFactory; -import org.eclipse.mat.snapshot.acquire.IHeapDumpProvider; -import org.eclipse.mat.snapshot.acquire.VmInfo; -import org.eclipse.mat.snapshot.model.IClass; -import org.eclipse.mat.util.IProgressListener; -import org.eclipse.mat.util.VoidProgressListener; - -public class MemoryAnalyzer { - - public static final IProgressListener progressListener = new VoidProgressListener(); - - public static class QueryResult { - public int nbElements; - public int memorySum; - } - - public ISnapshot snapshot; - - public MemoryAnalyzer(File dumpFile) { - try { - snapshot = SnapshotFactory.openSnapshot(dumpFile, new HashMap(), progressListener); - } catch (SnapshotException e) { - System.err.println("Error while parsing dump!"); - e.printStackTrace(); - } - assert (snapshot != null); - } - - public QueryResult computeRetainedSizeWithOQLQuery(String query, File dumpFile) { - // We open the dump with Eclipse Memory Analyzer, and obtain a snapshot - // object - QueryResult res = new QueryResult(); - try { - IOQLQuery queryObj = SnapshotFactory.createQuery(query); - Object result = queryObj.execute(snapshot, new VoidProgressListener()); - - //System.out.println("OQL result: " + result); - //System.out.println("OQL class: " + result.getClass().getCanonicalName()); - - if (result instanceof IOQLQuery.Result) { - IResultTable castResult2 = (IResultTable) result; - int sum = 0; - for (int i = 0; i < castResult2.getRowCount(); i++) { - sum += (long) castResult2.getColumnValue(i, 0); - } - res.memorySum = sum; - res.nbElements = castResult2.getRowCount(); - } else if (result instanceof int[]) { - int[] castResult = (int[]) result; - res.nbElements = castResult.length; - } - - } catch (OQLParseException e) { - System.out.println("Error: parsing of the OQL query failed. Line " + e.getLine() + ", Column " - + e.getColumn() + "."); - e.printStackTrace(); - } catch (SnapshotException e) { - System.err.println("Error while computing memory consumption!"); - e.printStackTrace(); - } - return res; - } - - public int computeRetainedSizeOfClass(String className, File dumpFile) { - - // We open the dump with Eclipse Memory Analyzer, and obtain a snapshot - // object - int sum = 0; - try { - // First we look for the class in the dump file - Collection foundClasses = snapshot.getClassesByName(className, false); - if (foundClasses == null) { - System.out.println("Warning: class " + className + " not found."); - } else { - // There can be multiple times the same class in weird - // situations - if (foundClasses.size() > 1) { - System.out.println("Warning: multiple classes with name " + className + "."); - } - // For each class occurrence with this name found - for (IClass foundClass : foundClasses) { - // This is where the calculation is done. - sum += foundClass.getRetainedHeapSizeOfObjects(true, false, null); - } - } - - SnapshotFactory.dispose(snapshot); - - } catch (SnapshotException e) { - System.err.println("Error while computing memory consumption!"); - e.printStackTrace(); - } - return sum; - - } - - - public static void dumpHeap(File dumpFile) throws SnapshotException { - - HeapDumpProviderRegistry registry = HeapDumpProviderRegistry.instance(); - IHeapDumpProvider dumpProvider = registry.getHeapDumpProvider("jmapheapdumpprovider").getHeapDumpProvider(); - List vms = dumpProvider.getAvailableVMs(progressListener); - VmInfo currentVm = null; - int pid = Integer.parseInt(ManagementFactory.getRuntimeMXBean().getName().split("@")[0]); - for (VmInfo vm : vms) { - if (vm.getPid() == pid) { - currentVm = vm; - break; - } - } - - dumpProvider.acquireDump(currentVm, dumpFile, progressListener); - - - - - } - - - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/start/BenchmarkStart.xtend b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/start/BenchmarkStart.xtend deleted file mode 100644 index 1af14a3fe..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/start/BenchmarkStart.xtend +++ /dev/null @@ -1,112 +0,0 @@ -package fr.inria.diverse.trace.benchmark.start - -import fr.inria.diverse.trace.benchmark.Benchmark -import fr.inria.diverse.trace.benchmark.Language -import fr.inria.diverse.trace.benchmark.Results -import fr.inria.diverse.trace.benchmark.debuggers.DSTraceDebuggerHelper -import fr.inria.diverse.trace.benchmark.debuggers.NoTraceDebuggerHelper -import fr.inria.diverse.trace.benchmark.debuggers.SnapshotDebugger -import fr.inria.diverse.trace.commons.testutil.EclipseTestUtil -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.text.DateFormat -import java.text.SimpleDateFormat -import java.util.ArrayList -import java.util.Date -import java.util.List -import java.util.Map -import org.eclipse.core.resources.IWorkspace -import org.eclipse.core.resources.ResourcesPlugin -import org.eclipse.core.runtime.IProgressMonitor -import org.eclipse.core.runtime.Status -import org.eclipse.core.runtime.jobs.Job -import org.eclipse.emf.common.util.URI -import org.junit.Test - -class BenchmarkStart { - - - private val String heapDumpFolder = "/home/ebousse/tmp/bench-debugging" - private val String outputFolder = "/home/ebousse/Documents/Thèse/2015-02 Omniscient debugging of xDSMLs/results/" - - private def URI createURI(String s) { - return URI.createPlatformResourceURI(s, true); - } - - @Test - /** - * Needs to be run in a workspace with the model! - */ - def void test() { - - EclipseTestUtil.waitForJobs - - val Job j = new Job("Running the benchmark") { - - override protected run(IProgressMonitor monitor) { - - val IWorkspace workspace = ResourcesPlugin.getWorkspace(); - val project = workspace.root.getProjects().get(0); - val folder = project.getFolder("model") - val List modelsList = new ArrayList(); - for (m : folder.members) { - val String fullPath = m.fullPath.toString - if(fullPath.endsWith("xmi")) - modelsList.add(createURI(fullPath)) - } - - val Map> languagesAndModels = newLinkedHashMap( - Language.AD -> modelsList - ) - - val debuggers = #[ - new SnapshotDebugger(), - new DSTraceDebuggerHelper(), - new NoTraceDebuggerHelper() - ] - - val int nbRetries = 4 - - val Benchmark bench = new Benchmark(languagesAndModels, debuggers, nbRetries, - new File(heapDumpFolder)); - try { - - // Executing the benchmark - val Results results = bench.computeAll - - // Printing results - println("\n\n Final Results:\n") - println(results) - - // Writing them in a file - val DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss"); - val Date date = new Date(); - val String dateString = dateFormat.format(date); - val String fileName = dateString + "_benchmarkResults.csv" - val File output = new File(outputFolder,fileName) - val FileWriter fstream = new FileWriter(output); - val BufferedWriter out = new BufferedWriter(fstream); - try { - out.write(results.toString) - } finally { - out.close - } - - } catch(Exception exc) { - exc.printStackTrace - //println("Major,error, SLEEEPING") - //Thread.sleep(100000000) - return new Status(Status.ERROR, "benchmark", "something went wrong :'("); - } - return Status.OK_STATUS - - } - - } - j.schedule(); - EclipseTestUtil.waitForJobsThenWindowClosed - - } - -} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/META-INF/MANIFEST.MF deleted file mode 100644 index 2f738c45b..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/META-INF/MANIFEST.MF +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Moliz-models -Bundle-SymbolicName: moliz-models -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: moliz_models.Activator -Require-Bundle: org.eclipse.core.runtime, - org.modelexecution.operationalsemantics.gemoc.sequential.dynamic;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ActivationPolicy: lazy diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/build.properties b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/build.properties deleted file mode 100644 index 9cbab3c13..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html -src.includes = about.html diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-1.xmi b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-1.xmi deleted file mode 100644 index c7aa79970..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-1.xmi +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV1.xmi b/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV1.xmi deleted file mode 100644 index 5d0c18809..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV1.xmi +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/.project b/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/.project deleted file mode 100644 index 755198050..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.commons.testutil - - - - - - 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/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/META-INF/MANIFEST.MF deleted file mode 100644 index 9faf11902..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.trace.commons.test -Bundle-SymbolicName: fr.inria.diverse.trace.commons.testutil -Bundle-Version: 1.0.0.qualifier -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - org.eclipse.core.runtime;bundle-version="3.10.0", - org.eclipse.ui, - org.eclipse.emf.ecore;bundle-version="2.10.2" -Export-Package: fr.inria.diverse.trace.commons.testutil -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.project b/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.project deleted file mode 100644 index 70a0e14ef..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.gemoc.generator.test - - - - - - 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/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.settings/org.eclipse.core.resources.prefs b/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c020..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/META-INF/MANIFEST.MF deleted file mode 100644 index c31628c1a..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/META-INF/MANIFEST.MF +++ /dev/null @@ -1,19 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.trace.gemoc.generator.test -Bundle-SymbolicName: fr.inria.diverse.trace.gemoc.generator.test -Bundle-Version: 1.0.0.qualifier -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - fr.inria.diverse.trace.gemoc.generator;bundle-version="1.0.0", - org.junit;bundle-version="4.11.0", - fr.inria.diverse.trace.commons.testutil;bundle-version="1.0.0", - org.eclipse.emf.common;bundle-version="2.10.1", - org.eclipse.core.resources;bundle-version="3.9.1", - org.eclipse.emf.ecore, - fr.inria.diverse.ecorext;bundle-version="0.1.0", - fr.inria.diverse.trace.commons;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/build.properties b/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/build.properties deleted file mode 100644 index 0ca040a19..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html -src.includes = about.html diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/.gitignore b/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/.gitignore deleted file mode 100644 index 5e56e040e..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/.project b/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/.project deleted file mode 100644 index 8e35087a1..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.metamodel.generator.test - - - - - - 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/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/META-INF/MANIFEST.MF deleted file mode 100644 index f6b39f483..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Test -Bundle-SymbolicName: fr.inria.diverse.trace.metamodel.generator.test -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.emf.ecore;bundle-version="2.10.1", - org.junit;bundle-version="4.11.0", - fr.inria.diverse.trace.metamodel.generator;bundle-version="1.0.0", - fr.inria.diverse.ecorext;bundle-version="0.1.0", - org.eclipse.core.runtime;bundle-version="3.9.100", - fr.inria.diverse.trace.commons;bundle-version="1.0.0" - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/about.html b/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/about.html deleted file mode 100644 index 420ad0f93..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/about.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2006

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

- - - \ No newline at end of file diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/hs_err_pid8464.log b/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/hs_err_pid8464.log deleted file mode 100644 index 998a66bac..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.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) - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/src/fr/inria/diverse/trace/metamodel/test/XMOFTraceMMGeneratorTest.xtend b/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/src/fr/inria/diverse/trace/metamodel/test/XMOFTraceMMGeneratorTest.xtend deleted file mode 100644 index 0bca1f3ad..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/src/fr/inria/diverse/trace/metamodel/test/XMOFTraceMMGeneratorTest.xtend +++ /dev/null @@ -1,16 +0,0 @@ -package fr.inria.diverse.trace.metamodel.test - -import fr.inria.diverse.trace.metamodel.test.TraceMMGeneratorTest -import java.io.File - -class XMOFTraceMMGeneratorTest extends TraceMMGeneratorTest { - - override protected getMMExtension() { - return "xmof" - } - - override protected getInputFolder() { - return new File("model_inputs_xmof") - } - -} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/.classpath b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/.classpath deleted file mode 100644 index 87e8cd659..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/.project b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/.project deleted file mode 100644 index 1d321ee01..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.plaink3.tracematerialextractor.test - - - - - - 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/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/META-INF/MANIFEST.MF deleted file mode 100644 index 3be87e293..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/META-INF/MANIFEST.MF +++ /dev/null @@ -1,27 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.trace.plaink3.tracematerialextractor.test -Bundle-SymbolicName: fr.inria.diverse.trace.plaink3.tracematerialextractor.test -Bundle-Version: 1.0.0.qualifier -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - org.junit;bundle-version="4.11.0", - fr.inria.diverse.trace.plaink3.tracematerialextractor;bundle-version="1.0.0", - fr.inria.diverse.trace.commons;bundle-version="1.0.0", - org.eclipse.core.runtime;bundle-version="3.10.0", - org.eclipse.core.resources;bundle-version="3.9.1", - org.eclipse.ui, - fr.inria.diverse.trace.commons.testutil;bundle-version="1.0.0", - org.eclipse.jdt.core;bundle-version="3.10.0", - org.eclipse.emf.ecore, - org.eclipse.emf.ecore.xmi, - fr.inria.diverse.ecorext;bundle-version="0.1.0", - org.apache.log4j, - org.eclipse.xtend.core, - com.google.inject;bundle-version="3.0.0", - fr.inria.diverse.k3.al.annotationprocessor.plugin, - org.eclipse.xtext -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/about.html b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/about.html deleted file mode 100644 index 420ad0f93..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/about.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2006

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

- - - \ No newline at end of file diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/build.properties b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/build.properties deleted file mode 100644 index 0ca040a19..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html -src.includes = about.html diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/META-INF/MANIFEST.MF deleted file mode 100644 index 3dfc46de2..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/META-INF/MANIFEST.MF +++ /dev/null @@ -1,25 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: org.gemoc.sample.tfsm.plaink3.dsa -Bundle-SymbolicName: org.gemoc.sample.tfsm.plaink3.dsa;singleton:=true -Bundle-Version: 0.1.0.qualifier -Require-Bundle: org.eclipse.xtend2.lib;bundle-version="2.4.3", - org.eclipse.emf.ecore;bundle-version="2.9.1";visibility:=reexport, - org.eclipse.core.runtime, - org.eclipse.core.resources, - fr.inria.diverse.commons.eclipse.messagingsystem.api;bundle-version="1.0.0", - org.eclipse.emf.transaction;bundle-version="1.8.0", - org.eclipse.emf.ecore.xmi;bundle-version="2.10.1", - org.eclipse.core.expressions;bundle-version="3.4.600", - org.gemoc.commons.eclipse.pde;bundle-version="0.1.0", - org.gemoc.commons;bundle-version="0.1.0", - org.gemoc.commons.eclipse;bundle-version="0.1.0", - org.gemoc.execution.engine;bundle-version="0.1.0", - fr.inria.diverse.k3.al.annotationprocessor.plugin, - org.gemoc.sample.tfsm.plaink3.model;bundle-version="0.1.0" -Bundle-ClassPath: . -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Export-Package: org.gemoc.sample.tfsm.plaink3.dsa -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/about.html b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/about.html deleted file mode 100644 index 420ad0f93..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/about.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2006

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

- - - \ No newline at end of file diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/pom.xml b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/pom.xml deleted file mode 100644 index d45432082..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - 4.0.0 - - - org.gemoc.sample.robotml - org.gemoc.sample.robotml.root - 0.1.0-SNAPSHOT - ../../../RobotML/Language/org.gemoc.sample.robotml.root - - - org.gemoc.sample.tfsm.k3dsa - eclipse-plugin - 0.1.0-SNAPSHOT - - - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/.classpath b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/.classpath deleted file mode 100644 index 92c61ad42..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/.project b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/.project deleted file mode 100644 index 2ec83ae08..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - fr.inria.diverse.trace.plugin.generator.test - - - - - - 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/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/META-INF/MANIFEST.MF deleted file mode 100644 index 87b402cdf..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: fr.inria.diverse.trace.plugin.generator.test -Bundle-SymbolicName: fr.inria.diverse.trace.plugin.generator.test -Bundle-Version: 1.0.0.qualifier -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - org.junit;bundle-version="4.11.0", - fr.inria.diverse.trace.plugin.generator;bundle-version="1.0.0", - org.eclipse.core.resources;bundle-version="3.9.1", - fr.inria.diverse.trace.commons.testutil;bundle-version="1.0.0", - org.eclipse.emf.common;bundle-version="2.10.1", - org.eclipse.core.runtime;bundle-version="3.10.0", - org.eclipse.emf.ecore, - fr.inria.diverse.trace.commons;bundle-version="1.0.0", - fr.inria.diverse.ecorext;bundle-version="0.1.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/about.html b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/about.html deleted file mode 100644 index 420ad0f93..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/about.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2006

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

- - - \ No newline at end of file diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/build.properties b/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/build.properties deleted file mode 100644 index 0ca040a19..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/,\ - xtend-gen/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html -src.includes = about.html diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/.project b/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/.project deleted file mode 100644 index 5bc0ee4b4..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - fr.inria.diverse.tracemm.semdiff.eval - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/META-INF/MANIFEST.MF deleted file mode 100644 index 86a7c1726..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: TraceEvaluation -Bundle-SymbolicName: fr.inria.diverse.tracemm.semdiff.eval -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.modelexecution.xmof;bundle-version="1.0.0", - org.modelexecution.xmof.vm;bundle-version="1.0.0", - org.eclipse.emf.transaction, - org.modelexecution.xmof.configuration, - org.modelexecution.xmof.states, - org.junit, - org.eclipse.emf.ecore.xmi, - org.eclipse.epsilon.ecl.engine, - org.eclipse.epsilon.common;bundle-version="1.2.0", - org.eclipse.epsilon.eol.engine;bundle-version="1.2.0", - org.eclipse.epsilon.emc.emf;bundle-version="1.2.0", - org.eclipse.uml2.uml;bundle-version="5.0.1", - org.modelexecution.xmof.diff, - fr.inria.diverse.tracemm.xmof.statesbuilder;bundle-version="1.0.0" diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/about.html b/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/about.html deleted file mode 100644 index 420ad0f93..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/about.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2006

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

- - - \ No newline at end of file diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/build.properties b/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/build.properties deleted file mode 100644 index 9cbab3c13..000000000 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html -src.includes = about.html diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/.classpath new file mode 100644 index 000000000..88763a2b9 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/.project new file mode 100644 index 000000000..07da27988 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.benchmark + + + + + + 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/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 new file mode 100644 index 000000000..f0afc04a9 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Clone.launch @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..789f916a4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generated.launch @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..a0d1b3a88 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-Generic.launch @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..2ab4a58d7 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/2557-1_4-None.launch @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/META-INF/MANIFEST.MF new file mode 100644 index 000000000..0cda38c16 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/META-INF/MANIFEST.MF @@ -0,0 +1,35 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.trace.benchmark +Bundle-SymbolicName: org.eclipse.gemoc.trace.benchmark +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.emf;bundle-version="2.6.0", + org.eclipse.emf.ecore;bundle-version="2.10.2", + org.eclipse.debug.core;bundle-version="3.9.1", + org.eclipse.core.runtime;bundle-version="3.10.0", + org.eclipse.gemoc.trace.gemoc;bundle-version="1.0.0", + org.junit;bundle-version="4.11.0", + org.eclipse.jdt.core, + fr.inria.diverse.commons.provisionner4eclipse, + org.eclipse.gemoc.trace.commons.testutil;bundle-version="1.0.0", + org.eclipse.emf.transaction;bundle-version="1.8.0", + fr.inria.diverse.k3.al.annotationprocessor.plugin;bundle-version="1.0.0", + org.eclipse.gemoc.xdsmlframework.api, + org.eclipse.gemoc.executionframework.engine, + org.eclipse.gemoc.execution.sequential.javaengine;bundle-version="2.3.0", + org.eclipse.jdt.junit.core, + org.eclipse.gemoc.trace.gemoc.api;bundle-version="2.3.0", + org.gemoc.activitydiagram.sequential.xactivitydiagram;bundle-version="0.1.0", + org.eclipse.xtext;bundle-version="2.10.0", + org.gemoc.activitydiagram.sequential.xactivitydiagram.grammar;bundle-version="1.0.0", + org.eclipse.mat.api, + org.gemoc.activitydiagram.sequential.xactivitydiagram.trace;bundle-version="1.0.0", + org.apache.log4j;bundle-version="1.2.15" +Import-Package: org.eclipse.gemoc.timeline.model, + org.eclipse.jdt.core.search, + org.eclipse.gemoc.execution.sequential.javaengine diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/about.html similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/about.html diff --git a/java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/build.properties similarity index 100% rename from java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/build.properties diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_1.trace new file mode 100644 index 000000000..04a3de8f5 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_1.trace @@ -0,0 +1,2278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_2.trace new file mode 100644 index 000000000..61dc75389 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_2.trace @@ -0,0 +1,2150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_3.trace new file mode 100644 index 000000000..e9b052b1d --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_3.trace @@ -0,0 +1,2150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_4.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_4.trace new file mode 100644 index 000000000..691ea9afd --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_4.trace @@ -0,0 +1,2150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_5.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_5.trace new file mode 100644 index 000000000..8dbeb34fc --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_5.trace @@ -0,0 +1,2150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_6.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_6.trace new file mode 100644 index 000000000..a7e737f7d --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-1_6.trace @@ -0,0 +1,2150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_1.trace new file mode 100644 index 000000000..5d6e29ab4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_1.trace @@ -0,0 +1,1774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_2.trace new file mode 100644 index 000000000..1ae0f26a2 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_2.trace @@ -0,0 +1,1774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_3.trace new file mode 100644 index 000000000..499eabc45 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_3.trace @@ -0,0 +1,1774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_4.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_4.trace new file mode 100644 index 000000000..547e1f07d --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_4.trace @@ -0,0 +1,1774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_5.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_5.trace new file mode 100644 index 000000000..c5002ec99 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_5.trace @@ -0,0 +1,1774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_6.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_6.trace new file mode 100644 index 000000000..99cb9eaf7 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/2557-2_6.trace @@ -0,0 +1,1774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_1.trace new file mode 100644 index 000000000..7e6ae646e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_1.trace @@ -0,0 +1,1627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_2.trace new file mode 100644 index 000000000..215e2af59 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_2.trace @@ -0,0 +1,1627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_3.trace new file mode 100644 index 000000000..d9d51de75 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-1_3.trace @@ -0,0 +1,1627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_1.trace new file mode 100644 index 000000000..ffc7b99c4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_1.trace @@ -0,0 +1,1627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_2.trace new file mode 100644 index 000000000..577fc3595 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_2.trace @@ -0,0 +1,1627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_3.trace new file mode 100644 index 000000000..c18919629 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/3561-2_3.trace @@ -0,0 +1,1627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_false_false.trace new file mode 100644 index 000000000..086f7c62f --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_false_false.trace @@ -0,0 +1,960 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_false_true.trace new file mode 100644 index 000000000..e4ceba0fc --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_false_true.trace @@ -0,0 +1,1160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_true_false.trace new file mode 100644 index 000000000..17500c5d2 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_true_false.trace @@ -0,0 +1,1060 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_true_true.trace new file mode 100644 index 000000000..06f960fd1 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV1_true_true.trace @@ -0,0 +1,1060 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_false_false.trace new file mode 100644 index 000000000..6893e83c3 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_false_false.trace @@ -0,0 +1,960 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_false_true.trace new file mode 100644 index 000000000..fdbfabe38 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_false_true.trace @@ -0,0 +1,1160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_true_false.trace new file mode 100644 index 000000000..de94ee7da --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_true_false.trace @@ -0,0 +1,1060 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_true_true.trace new file mode 100644 index 000000000..9268de2ef --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV2_true_true.trace @@ -0,0 +1,1060 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_false_false.trace new file mode 100644 index 000000000..975bbf5fa --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_false_false.trace @@ -0,0 +1,1482 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_false_true.trace new file mode 100644 index 000000000..58f00343a --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_false_true.trace @@ -0,0 +1,1610 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_true_false.trace new file mode 100644 index 000000000..da4f5410f --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_true_false.trace @@ -0,0 +1,1482 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_true_true.trace new file mode 100644 index 000000000..52ddbe054 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_false_true_true.trace @@ -0,0 +1,1482 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_false_false.trace new file mode 100644 index 000000000..7f451fa9b --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_false_false.trace @@ -0,0 +1,1354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_false_true.trace new file mode 100644 index 000000000..2ecf7bba8 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_false_true.trace @@ -0,0 +1,1354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_true_false.trace new file mode 100644 index 000000000..9314ab866 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_true_false.trace @@ -0,0 +1,1354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_true_true.trace new file mode 100644 index 000000000..c44b2c33e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/ExampleBV3_true_true_true.trace @@ -0,0 +1,1354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV1_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV1_false.trace new file mode 100644 index 000000000..2a41b9ccb --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV1_false.trace @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV1_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV1_true.trace new file mode 100644 index 000000000..1e6cd62f4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV1_true.trace @@ -0,0 +1,1316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV2_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV2_false.trace new file mode 100644 index 000000000..bb50435bc --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV2_false.trace @@ -0,0 +1,608 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV2_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV2_true.trace new file mode 100644 index 000000000..e48bb2049 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV2_true.trace @@ -0,0 +1,1669 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV3_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV3_false.trace new file mode 100644 index 000000000..aa7e7ab77 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV3_false.trace @@ -0,0 +1,595 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV3_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV3_true.trace new file mode 100644 index 000000000..8cde6212e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV3_true.trace @@ -0,0 +1,1470 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV4_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV4_false.trace new file mode 100644 index 000000000..9fbc01c6d --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV4_false.trace @@ -0,0 +1,685 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV4_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV4_true.trace new file mode 100644 index 000000000..cfdf592fd --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl/hireV4_true.trace @@ -0,0 +1,1470 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_1.trace new file mode 100644 index 000000000..d12615910 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_1.trace @@ -0,0 +1,608 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_2.trace new file mode 100644 index 000000000..68b459f3d --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_2.trace @@ -0,0 +1,593 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_3.trace new file mode 100644 index 000000000..5e6a00ffb --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_3.trace @@ -0,0 +1,593 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_4.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_4.trace new file mode 100644 index 000000000..cdf8a2f69 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_4.trace @@ -0,0 +1,593 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_5.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_5.trace new file mode 100644 index 000000000..0057a5f81 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_5.trace @@ -0,0 +1,593 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_6.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_6.trace new file mode 100644 index 000000000..36c8383b4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-1_6.trace @@ -0,0 +1,593 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_1.trace new file mode 100644 index 000000000..69dd55be2 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_1.trace @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_2.trace new file mode 100644 index 000000000..c672f6f3c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_2.trace @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_3.trace new file mode 100644 index 000000000..550fd36ec --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_3.trace @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_4.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_4.trace new file mode 100644 index 000000000..79411e212 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_4.trace @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_5.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_5.trace new file mode 100644 index 000000000..0ddce7733 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_5.trace @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_6.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_6.trace new file mode 100644 index 000000000..5189f82ac --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/2557-2_6.trace @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_1.trace new file mode 100644 index 000000000..bc5bc8372 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_1.trace @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_2.trace new file mode 100644 index 000000000..2a6bbfb9d --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_2.trace @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_3.trace new file mode 100644 index 000000000..315ec933a --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-1_3.trace @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_1.trace new file mode 100644 index 000000000..1dee2d0d0 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_1.trace @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_2.trace new file mode 100644 index 000000000..3b9543575 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_2.trace @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_3.trace new file mode 100644 index 000000000..121a05529 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/3561-2_3.trace @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_false_false.trace new file mode 100644 index 000000000..4865f90ce --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_false_false.trace @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_false_true.trace new file mode 100644 index 000000000..736274ddc --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_false_true.trace @@ -0,0 +1,443 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_true_false.trace new file mode 100644 index 000000000..520e6c98e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_true_false.trace @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_true_true.trace new file mode 100644 index 000000000..a0f3467e3 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV1_true_true.trace @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_false_false.trace new file mode 100644 index 000000000..dbd178a88 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_false_false.trace @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_false_true.trace new file mode 100644 index 000000000..87d03ff54 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_false_true.trace @@ -0,0 +1,443 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_true_false.trace new file mode 100644 index 000000000..8102bda84 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_true_false.trace @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_true_true.trace new file mode 100644 index 000000000..c977719e0 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV2_true_true.trace @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_false_false.trace new file mode 100644 index 000000000..1e73848a8 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_false_false.trace @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_false_true.trace new file mode 100644 index 000000000..e03ef8cbf --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_false_true.trace @@ -0,0 +1,536 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_true_false.trace new file mode 100644 index 000000000..c3fc0252a --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_true_false.trace @@ -0,0 +1,521 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_true_true.trace new file mode 100644 index 000000000..68389a62f --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_false_true_true.trace @@ -0,0 +1,521 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_false_false.trace new file mode 100644 index 000000000..2bb56a639 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_false_false.trace @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_false_true.trace new file mode 100644 index 000000000..5d16e5038 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_false_true.trace @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_true_false.trace new file mode 100644 index 000000000..1fc467690 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_true_false.trace @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_true_true.trace new file mode 100644 index 000000000..33acd42de --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/ExampleBV3_true_true_true.trace @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV1_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV1_false.trace new file mode 100644 index 000000000..1acbc3c08 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV1_false.trace @@ -0,0 +1,337 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV1_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV1_true.trace new file mode 100644 index 000000000..3426d67c6 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV1_true.trace @@ -0,0 +1,469 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV2_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV2_false.trace new file mode 100644 index 000000000..7d5eb66ca --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV2_false.trace @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV2_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV2_true.trace new file mode 100644 index 000000000..3a1b975df --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV2_true.trace @@ -0,0 +1,531 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV3_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV3_false.trace new file mode 100644 index 000000000..b1cd96f18 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV3_false.trace @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV3_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV3_true.trace new file mode 100644 index 000000000..4a67b9500 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV3_true.trace @@ -0,0 +1,498 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV4_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV4_false.trace new file mode 100644 index 000000000..fe4f50fee --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV4_false.trace @@ -0,0 +1,366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV4_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV4_true.trace new file mode 100644 index 000000000..c5aef6bd1 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl/hireV4_true.trace @@ -0,0 +1,498 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_1.trace new file mode 100644 index 000000000..f5e925ba3 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_1.trace @@ -0,0 +1,551 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_2.trace new file mode 100644 index 000000000..e718ca8d2 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_2.trace @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_3.trace new file mode 100644 index 000000000..f09cdf742 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_3.trace @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_4.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_4.trace new file mode 100644 index 000000000..edb652e7e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_4.trace @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_5.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_5.trace new file mode 100644 index 000000000..ef6c5da4b --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_5.trace @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_6.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_6.trace new file mode 100644 index 000000000..ef42a66bb --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-1_6.trace @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_1.trace new file mode 100644 index 000000000..d4654faf3 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_1.trace @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_2.trace new file mode 100644 index 000000000..9e025d3ad --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_2.trace @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_3.trace new file mode 100644 index 000000000..8e7ec3990 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_3.trace @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_4.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_4.trace new file mode 100644 index 000000000..d0f360ce0 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_4.trace @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_5.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_5.trace new file mode 100644 index 000000000..e6dda26f4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_5.trace @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_6.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_6.trace new file mode 100644 index 000000000..5725c6266 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/2557-2_6.trace @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_1.trace new file mode 100644 index 000000000..8f0ebea30 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_1.trace @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_2.trace new file mode 100644 index 000000000..cf8f1ee7f --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_2.trace @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_3.trace new file mode 100644 index 000000000..58b7e4ee1 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-1_3.trace @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_1.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_1.trace new file mode 100644 index 000000000..52a1c4744 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_1.trace @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_2.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_2.trace new file mode 100644 index 000000000..41b75b35a --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_2.trace @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_3.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_3.trace new file mode 100644 index 000000000..1f655b035 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/3561-2_3.trace @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_false_false.trace new file mode 100644 index 000000000..09866615e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_false_false.trace @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_false_true.trace new file mode 100644 index 000000000..8ded0399e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_false_true.trace @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_true_false.trace new file mode 100644 index 000000000..5318d0fff --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_true_false.trace @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_true_true.trace new file mode 100644 index 000000000..8a0b33806 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV1_true_true.trace @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_false_false.trace new file mode 100644 index 000000000..094ae9dce --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_false_false.trace @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_false_true.trace new file mode 100644 index 000000000..75f338890 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_false_true.trace @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_true_false.trace new file mode 100644 index 000000000..ef7b22764 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_true_false.trace @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_true_true.trace new file mode 100644 index 000000000..fb2854fae --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV2_true_true.trace @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_false_false.trace new file mode 100644 index 000000000..a2902626e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_false_false.trace @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_false_true.trace new file mode 100644 index 000000000..3009f7ab2 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_false_true.trace @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_true_false.trace new file mode 100644 index 000000000..b956d668e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_true_false.trace @@ -0,0 +1,469 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_true_true.trace new file mode 100644 index 000000000..d277395c4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_false_true_true.trace @@ -0,0 +1,469 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_false_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_false_false.trace new file mode 100644 index 000000000..21793bd29 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_false_false.trace @@ -0,0 +1,455 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_false_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_false_true.trace new file mode 100644 index 000000000..b4337163a --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_false_true.trace @@ -0,0 +1,455 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_true_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_true_false.trace new file mode 100644 index 000000000..c1dd71a57 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_true_false.trace @@ -0,0 +1,455 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_true_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_true_true.trace new file mode 100644 index 000000000..f12e07643 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/ExampleBV3_true_true_true.trace @@ -0,0 +1,455 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV1_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV1_false.trace new file mode 100644 index 000000000..16955dc8f --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV1_false.trace @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV1_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV1_true.trace new file mode 100644 index 000000000..97b746e1c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV1_true.trace @@ -0,0 +1,422 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV2_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV2_false.trace new file mode 100644 index 000000000..4a7076223 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV2_false.trace @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV2_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV2_true.trace new file mode 100644 index 000000000..5b98cab01 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV2_true.trace @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV3_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV3_false.trace new file mode 100644 index 000000000..61b9eea3e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV3_false.trace @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV3_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV3_true.trace new file mode 100644 index 000000000..4a8bd50d4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV3_true.trace @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV4_false.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV4_false.trace new file mode 100644 index 000000000..c5307eacb --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV4_false.trace @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV4_true.trace b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV4_true.trace new file mode 100644 index 000000000..9a265d6b5 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl/hireV4_true.trace @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_1.aird b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_1.aird new file mode 100644 index 000000000..84e19a701 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_1.aird @@ -0,0 +1,1037 @@ + + + + 2557-1_1.xsad + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_1.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_1.xsad new file mode 100644 index 000000000..bb372685d --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_1.xsad @@ -0,0 +1,54 @@ +activity "IBM2557-1" { + int i = 1, + int one = 1, + int two = 2, + bool eq2, + bool eq1, + bool gr2 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e6 ) out ( e7 ), + action g in ( e7 ) out ( e8 ), + action h in ( e10 ) out ( e11 ), + action i in ( e17 ) out ( e18 ), + action j in ( e15 ) out ( e16 ), + action k in ( e12 ) out ( e13 ), + action l in ( e13 ) out ( e14 ), + initial ^initial out ( e0 ), + final ^final in ( e9 ), + fork ^fork in ( e4 ) out ( e5, e10 ), + join ^join in ( e8, e19 ) out ( e9 ), + decision ^decision in ( e11 ) out ( e12, e15, e17 ), + merge ^merge in ( e14, e16, e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to f, + flow e7 from f to g, + flow e8 from g to ^join, + flow e9 from ^join to ^final, + flow e10 from ^fork to h, + flow e11 from h to ^decision, + flow e12 from ^decision to k [ eq1 ], + flow e13 from k to l, + flow e14 from l to ^merge, + flow e15 from ^decision to j [ eq2 ], + flow e16 from j to ^merge, + flow e17 from ^decision to i [ gr2 ], + flow e18 from i to ^merge, + flow e19 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_2.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_2.xsad new file mode 100644 index 000000000..37743b720 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_2.xsad @@ -0,0 +1,60 @@ +activity "IBM2557-1" { + int i = 2, + int one = 1, + int two = 2, + bool eq2, + bool eq1, + bool gr2 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e6 ) out ( e7 ), + action g in ( e7 ) out ( e8 ), + action h in ( e10 ) out ( e11 ), + action i in ( e17 ) out ( e18 ), + action j in ( e15 ) out ( e16 ), + action k in ( e12 ) out ( e13 ), + action l in ( e13 ) out ( e14 ), + initial ^initial out ( e0 ), + final ^final in ( e9 ), + fork ^fork in ( e4 ) out ( e5, + e10 ), + join ^join in ( e8, + e19 ) out ( e9 ), + decision ^decision in ( e11 ) out ( e12, + e15, + e17 ), + merge ^merge in ( e14, + e16, + e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to f, + flow e7 from f to g, + flow e8 from g to ^join, + flow e9 from ^join to ^final, + flow e10 from ^fork to h, + flow e11 from h to ^decision, + flow e12 from ^decision to k [ eq1 ], + flow e13 from k to l, + flow e14 from l to ^merge, + flow e15 from ^decision to j [ eq2 ], + flow e16 from j to ^merge, + flow e17 from ^decision to i [ gr2 ], + flow e18 from i to ^merge, + flow e19 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_3.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_3.xsad new file mode 100644 index 000000000..3b4ce197b --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_3.xsad @@ -0,0 +1,60 @@ +activity "IBM2557-1" { + int i = 3, + int one = 1, + int two = 2, + bool eq2, + bool eq1, + bool gr2 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e6 ) out ( e7 ), + action g in ( e7 ) out ( e8 ), + action h in ( e10 ) out ( e11 ), + action i in ( e17 ) out ( e18 ), + action j in ( e15 ) out ( e16 ), + action k in ( e12 ) out ( e13 ), + action l in ( e13 ) out ( e14 ), + initial ^initial out ( e0 ), + final ^final in ( e9 ), + fork ^fork in ( e4 ) out ( e5, + e10 ), + join ^join in ( e8, + e19 ) out ( e9 ), + decision ^decision in ( e11 ) out ( e12, + e15, + e17 ), + merge ^merge in ( e14, + e16, + e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to f, + flow e7 from f to g, + flow e8 from g to ^join, + flow e9 from ^join to ^final, + flow e10 from ^fork to h, + flow e11 from h to ^decision, + flow e12 from ^decision to k [ eq1 ], + flow e13 from k to l, + flow e14 from l to ^merge, + flow e15 from ^decision to j [ eq2 ], + flow e16 from j to ^merge, + flow e17 from ^decision to i [ gr2 ], + flow e18 from i to ^merge, + flow e19 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_4.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_4.xsad new file mode 100644 index 000000000..46f2273b7 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_4.xsad @@ -0,0 +1,60 @@ +activity "IBM2557-1" { + int i = 4, + int one = 1, + int two = 2, + bool eq2, + bool eq1, + bool gr2 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e6 ) out ( e7 ), + action g in ( e7 ) out ( e8 ), + action h in ( e10 ) out ( e11 ), + action i in ( e17 ) out ( e18 ), + action j in ( e15 ) out ( e16 ), + action k in ( e12 ) out ( e13 ), + action l in ( e13 ) out ( e14 ), + initial ^initial out ( e0 ), + final ^final in ( e9 ), + fork ^fork in ( e4 ) out ( e5, + e10 ), + join ^join in ( e8, + e19 ) out ( e9 ), + decision ^decision in ( e11 ) out ( e12, + e15, + e17 ), + merge ^merge in ( e14, + e16, + e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to f, + flow e7 from f to g, + flow e8 from g to ^join, + flow e9 from ^join to ^final, + flow e10 from ^fork to h, + flow e11 from h to ^decision, + flow e12 from ^decision to k [ eq1 ], + flow e13 from k to l, + flow e14 from l to ^merge, + flow e15 from ^decision to j [ eq2 ], + flow e16 from j to ^merge, + flow e17 from ^decision to i [ gr2 ], + flow e18 from i to ^merge, + flow e19 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_5.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_5.xsad new file mode 100644 index 000000000..9a58a107a --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_5.xsad @@ -0,0 +1,60 @@ +activity "IBM2557-1" { + int i = 5, + int one = 1, + int two = 2, + bool eq2, + bool eq1, + bool gr2 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e6 ) out ( e7 ), + action g in ( e7 ) out ( e8 ), + action h in ( e10 ) out ( e11 ), + action i in ( e17 ) out ( e18 ), + action j in ( e15 ) out ( e16 ), + action k in ( e12 ) out ( e13 ), + action l in ( e13 ) out ( e14 ), + initial ^initial out ( e0 ), + final ^final in ( e9 ), + fork ^fork in ( e4 ) out ( e5, + e10 ), + join ^join in ( e8, + e19 ) out ( e9 ), + decision ^decision in ( e11 ) out ( e12, + e15, + e17 ), + merge ^merge in ( e14, + e16, + e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to f, + flow e7 from f to g, + flow e8 from g to ^join, + flow e9 from ^join to ^final, + flow e10 from ^fork to h, + flow e11 from h to ^decision, + flow e12 from ^decision to k [ eq1 ], + flow e13 from k to l, + flow e14 from l to ^merge, + flow e15 from ^decision to j [ eq2 ], + flow e16 from j to ^merge, + flow e17 from ^decision to i [ gr2 ], + flow e18 from i to ^merge, + flow e19 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_6.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_6.xsad new file mode 100644 index 000000000..83e2c06a8 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-1_6.xsad @@ -0,0 +1,60 @@ +activity "IBM2557-1" { + int i = 6, + int one = 1, + int two = 2, + bool eq2, + bool eq1, + bool gr2 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e6 ) out ( e7 ), + action g in ( e7 ) out ( e8 ), + action h in ( e10 ) out ( e11 ), + action i in ( e17 ) out ( e18 ), + action j in ( e15 ) out ( e16 ), + action k in ( e12 ) out ( e13 ), + action l in ( e13 ) out ( e14 ), + initial ^initial out ( e0 ), + final ^final in ( e9 ), + fork ^fork in ( e4 ) out ( e5, + e10 ), + join ^join in ( e8, + e19 ) out ( e9 ), + decision ^decision in ( e11 ) out ( e12, + e15, + e17 ), + merge ^merge in ( e14, + e16, + e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to f, + flow e7 from f to g, + flow e8 from g to ^join, + flow e9 from ^join to ^final, + flow e10 from ^fork to h, + flow e11 from h to ^decision, + flow e12 from ^decision to k [ eq1 ], + flow e13 from k to l, + flow e14 from l to ^merge, + flow e15 from ^decision to j [ eq2 ], + flow e16 from j to ^merge, + flow e17 from ^decision to i [ gr2 ], + flow e18 from i to ^merge, + flow e19 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_1.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_1.xsad new file mode 100644 index 000000000..3672f903d --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_1.xsad @@ -0,0 +1,56 @@ +activity "IBM2557-2" { + int one, + int two, + bool eq2, + bool eq1, + bool gr2, + int i = 1 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action h in ( e8 ) out ( e9 ), + action i in ( e15 ) out ( e16 ), + action j in ( e13 ) out ( e14 ), + action k in ( e10 ) out ( e11 ), + action l in ( e11 ) out ( e12 ), + initial ^initial out ( e0 ), + final ^final in ( e7 ), + fork ^fork in ( e4 ) out ( e5, + e8 ), + join ^join in ( e6, + e17 ) out ( e7 ), + decision ^decision in ( e9 ) out ( e10, + e13, + e15 ), + merge ^merge in ( e12, + e14, + e16 ) out ( e17 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to ^join, + flow e7 from ^join to ^final, + flow e8 from ^fork to h, + flow e9 from h to ^decision, + flow e10 from ^decision to k [ eq1 ], + flow e11 from k to l, + flow e12 from l to ^merge, + flow e13 from ^decision to j [ eq2 ], + flow e14 from j to ^merge, + flow e15 from ^decision to i [ gr2 ], + flow e16 from i to ^merge, + flow e17 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_2.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_2.xsad new file mode 100644 index 000000000..7495de025 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_2.xsad @@ -0,0 +1,56 @@ +activity "IBM2557-2" { + int one, + int two, + bool eq2, + bool eq1, + bool gr2, + int i = 2 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action h in ( e8 ) out ( e9 ), + action i in ( e15 ) out ( e16 ), + action j in ( e13 ) out ( e14 ), + action k in ( e10 ) out ( e11 ), + action l in ( e11 ) out ( e12 ), + initial ^initial out ( e0 ), + final ^final in ( e7 ), + fork ^fork in ( e4 ) out ( e5, + e8 ), + join ^join in ( e6, + e17 ) out ( e7 ), + decision ^decision in ( e9 ) out ( e10, + e13, + e15 ), + merge ^merge in ( e12, + e14, + e16 ) out ( e17 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to ^join, + flow e7 from ^join to ^final, + flow e8 from ^fork to h, + flow e9 from h to ^decision, + flow e10 from ^decision to k [ eq1 ], + flow e11 from k to l, + flow e12 from l to ^merge, + flow e13 from ^decision to j [ eq2 ], + flow e14 from j to ^merge, + flow e15 from ^decision to i [ gr2 ], + flow e16 from i to ^merge, + flow e17 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_3.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_3.xsad new file mode 100644 index 000000000..50a825ded --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_3.xsad @@ -0,0 +1,56 @@ +activity "IBM2557-2" { + int one, + int two, + bool eq2, + bool eq1, + bool gr2, + int i = 3 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action h in ( e8 ) out ( e9 ), + action i in ( e15 ) out ( e16 ), + action j in ( e13 ) out ( e14 ), + action k in ( e10 ) out ( e11 ), + action l in ( e11 ) out ( e12 ), + initial ^initial out ( e0 ), + final ^final in ( e7 ), + fork ^fork in ( e4 ) out ( e5, + e8 ), + join ^join in ( e6, + e17 ) out ( e7 ), + decision ^decision in ( e9 ) out ( e10, + e13, + e15 ), + merge ^merge in ( e12, + e14, + e16 ) out ( e17 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to ^join, + flow e7 from ^join to ^final, + flow e8 from ^fork to h, + flow e9 from h to ^decision, + flow e10 from ^decision to k [ eq1 ], + flow e11 from k to l, + flow e12 from l to ^merge, + flow e13 from ^decision to j [ eq2 ], + flow e14 from j to ^merge, + flow e15 from ^decision to i [ gr2 ], + flow e16 from i to ^merge, + flow e17 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_4.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_4.xsad new file mode 100644 index 000000000..b608c4c34 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_4.xsad @@ -0,0 +1,56 @@ +activity "IBM2557-2" { + int one, + int two, + bool eq2, + bool eq1, + bool gr2, + int i = 4 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action h in ( e8 ) out ( e9 ), + action i in ( e15 ) out ( e16 ), + action j in ( e13 ) out ( e14 ), + action k in ( e10 ) out ( e11 ), + action l in ( e11 ) out ( e12 ), + initial ^initial out ( e0 ), + final ^final in ( e7 ), + fork ^fork in ( e4 ) out ( e5, + e8 ), + join ^join in ( e6, + e17 ) out ( e7 ), + decision ^decision in ( e9 ) out ( e10, + e13, + e15 ), + merge ^merge in ( e12, + e14, + e16 ) out ( e17 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to ^join, + flow e7 from ^join to ^final, + flow e8 from ^fork to h, + flow e9 from h to ^decision, + flow e10 from ^decision to k [ eq1 ], + flow e11 from k to l, + flow e12 from l to ^merge, + flow e13 from ^decision to j [ eq2 ], + flow e14 from j to ^merge, + flow e15 from ^decision to i [ gr2 ], + flow e16 from i to ^merge, + flow e17 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_5.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_5.xsad new file mode 100644 index 000000000..5d213696b --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_5.xsad @@ -0,0 +1,56 @@ +activity "IBM2557-2" { + int one, + int two, + bool eq2, + bool eq1, + bool gr2, + int i = 5 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action h in ( e8 ) out ( e9 ), + action i in ( e15 ) out ( e16 ), + action j in ( e13 ) out ( e14 ), + action k in ( e10 ) out ( e11 ), + action l in ( e11 ) out ( e12 ), + initial ^initial out ( e0 ), + final ^final in ( e7 ), + fork ^fork in ( e4 ) out ( e5, + e8 ), + join ^join in ( e6, + e17 ) out ( e7 ), + decision ^decision in ( e9 ) out ( e10, + e13, + e15 ), + merge ^merge in ( e12, + e14, + e16 ) out ( e17 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to ^join, + flow e7 from ^join to ^final, + flow e8 from ^fork to h, + flow e9 from h to ^decision, + flow e10 from ^decision to k [ eq1 ], + flow e11 from k to l, + flow e12 from l to ^merge, + flow e13 from ^decision to j [ eq2 ], + flow e14 from j to ^merge, + flow e15 from ^decision to i [ gr2 ], + flow e16 from i to ^merge, + flow e17 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_6.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_6.xsad new file mode 100644 index 000000000..3ec8960cb --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/2557-2_6.xsad @@ -0,0 +1,56 @@ +activity "IBM2557-2" { + int one, + int two, + bool eq2, + bool eq1, + bool gr2, + int i = 6 nodes { + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action h in ( e8 ) out ( e9 ), + action i in ( e15 ) out ( e16 ), + action j in ( e13 ) out ( e14 ), + action k in ( e10 ) out ( e11 ), + action l in ( e11 ) out ( e12 ), + initial ^initial out ( e0 ), + final ^final in ( e7 ), + fork ^fork in ( e4 ) out ( e5, + e8 ), + join ^join in ( e6, + e17 ) out ( e7 ), + decision ^decision in ( e9 ) out ( e10, + e13, + e15 ), + merge ^merge in ( e12, + e14, + e16 ) out ( e17 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to ^fork, + flow e5 from ^fork to e, + flow e6 from e to ^join, + flow e7 from ^join to ^final, + flow e8 from ^fork to h, + flow e9 from h to ^decision, + flow e10 from ^decision to k [ eq1 ], + flow e11 from k to l, + flow e12 from l to ^merge, + flow e13 from ^decision to j [ eq2 ], + flow e14 from j to ^merge, + flow e15 from ^decision to i [ gr2 ], + flow e16 from i to ^merge, + flow e17 from ^merge to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_1.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_1.xsad new file mode 100644 index 000000000..c11829740 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_1.xsad @@ -0,0 +1,71 @@ +activity "3651-1" { + int loop1, + bool gr2, + bool eq2, + bool eq1, + bool inf13, + bool eq13, + int one, + int two, + int thirteen, + int i = 1 nodes { + initial ^initial out ( e0 ), + final ^final in ( e9 ), + merge mergeE in ( e4, + e19 ) out ( e5 ), + merge mergeFinal in ( e8, + e12, + e17 ) out ( e9 ), + decision decisionI in ( e6 ) out ( e7, + e10, + e13 ), + decision decisionLoop1 in ( e15 ) out ( e16, + e18 ), + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e7 ) out ( e8 ), + action g in ( e10 ) out ( e11 ), + action h in ( e11 ) out ( e12 ), + action i in ( e13 ) out ( e14 ), + action j comp { + inf13 = loop1 < thirteen, + eq13 = loop1 == thirteen + } + in ( e14 ) out ( e15 ), + action k in ( e16 ) out ( e17 ), + action l comp { + loop1 = loop1 + one + } + in ( e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to mergeE, + flow e5 from mergeE to e, + flow e6 from e to decisionI, + flow e7 from decisionI to f [ gr2 ], + flow e8 from f to mergeFinal, + flow e9 from mergeFinal to ^final, + flow e10 from decisionI to g [ eq2 ], + flow e11 from g to h, + flow e12 from h to mergeFinal, + flow e13 from decisionI to i [ eq1 ], + flow e14 from i to j, + flow e15 from j to decisionLoop1, + flow e16 from decisionLoop1 to k [ eq13 ], + flow e17 from k to mergeFinal, + flow e18 from decisionLoop1 to l [ inf13 ], + flow e19 from l to mergeE + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_2.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_2.xsad new file mode 100644 index 000000000..9dc746c3b --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_2.xsad @@ -0,0 +1,71 @@ +activity "3651-1" { + int loop1, + bool gr2, + bool eq2, + bool eq1, + bool inf13, + bool eq13, + int one, + int two, + int thirteen, + int i = 2 nodes { + initial ^initial out ( e0 ), + final ^final in ( e9 ), + merge mergeE in ( e4, + e19 ) out ( e5 ), + merge mergeFinal in ( e8, + e12, + e17 ) out ( e9 ), + decision decisionI in ( e6 ) out ( e7, + e10, + e13 ), + decision decisionLoop1 in ( e15 ) out ( e16, + e18 ), + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e7 ) out ( e8 ), + action g in ( e10 ) out ( e11 ), + action h in ( e11 ) out ( e12 ), + action i in ( e13 ) out ( e14 ), + action j comp { + inf13 = loop1 < thirteen, + eq13 = loop1 == thirteen + } + in ( e14 ) out ( e15 ), + action k in ( e16 ) out ( e17 ), + action l comp { + loop1 = loop1 + one + } + in ( e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to mergeE, + flow e5 from mergeE to e, + flow e6 from e to decisionI, + flow e7 from decisionI to f [ gr2 ], + flow e8 from f to mergeFinal, + flow e9 from mergeFinal to ^final, + flow e10 from decisionI to g [ eq2 ], + flow e11 from g to h, + flow e12 from h to mergeFinal, + flow e13 from decisionI to i [ eq1 ], + flow e14 from i to j, + flow e15 from j to decisionLoop1, + flow e16 from decisionLoop1 to k [ eq13 ], + flow e17 from k to mergeFinal, + flow e18 from decisionLoop1 to l [ inf13 ], + flow e19 from l to mergeE + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_3.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_3.xsad new file mode 100644 index 000000000..7980fc762 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-1_3.xsad @@ -0,0 +1,71 @@ +activity "3651-1" { + int loop1, + bool gr2, + bool eq2, + bool eq1, + bool inf13, + bool eq13, + int one, + int two, + int thirteen, + int i = 3 nodes { + initial ^initial out ( e0 ), + final ^final in ( e9 ), + merge mergeE in ( e4, + e19 ) out ( e5 ), + merge mergeFinal in ( e8, + e12, + e17 ) out ( e9 ), + decision decisionI in ( e6 ) out ( e7, + e10, + e13 ), + decision decisionLoop1 in ( e15 ) out ( e16, + e18 ), + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e7 ) out ( e8 ), + action g in ( e10 ) out ( e11 ), + action h in ( e11 ) out ( e12 ), + action i in ( e13 ) out ( e14 ), + action j comp { + inf13 = loop1 < thirteen, + eq13 = loop1 == thirteen + } + in ( e14 ) out ( e15 ), + action k in ( e16 ) out ( e17 ), + action l comp { + loop1 = loop1 + one + } + in ( e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to mergeE, + flow e5 from mergeE to e, + flow e6 from e to decisionI, + flow e7 from decisionI to f [ gr2 ], + flow e8 from f to mergeFinal, + flow e9 from mergeFinal to ^final, + flow e10 from decisionI to g [ eq2 ], + flow e11 from g to h, + flow e12 from h to mergeFinal, + flow e13 from decisionI to i [ eq1 ], + flow e14 from i to j, + flow e15 from j to decisionLoop1, + flow e16 from decisionLoop1 to k [ eq13 ], + flow e17 from k to mergeFinal, + flow e18 from decisionLoop1 to l [ inf13 ], + flow e19 from l to mergeE + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_1.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_1.xsad new file mode 100644 index 000000000..1a1d163ed --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_1.xsad @@ -0,0 +1,71 @@ +activity "3651-2" { + int loop1, + bool gr2, + bool eq2, + bool eq1, + bool inf14, + bool eq14, + int one, + int two, + int fourteen, + int i = 1 nodes { + initial ^initial out ( e0 ), + final ^final in ( e9 ), + merge mergeE in ( e4, + e19 ) out ( e5 ), + merge mergeFinal in ( e8, + e12, + e17 ) out ( e9 ), + decision decisionI in ( e6 ) out ( e7, + e10, + e13 ), + decision decisionLoop1 in ( e15 ) out ( e16, + e18 ), + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e7 ) out ( e8 ), + action g in ( e10 ) out ( e11 ), + action h in ( e11 ) out ( e12 ), + action i in ( e13 ) out ( e14 ), + action j comp { + inf14 = loop1 < fourteen, + eq14 = loop1 == fourteen + } + in ( e14 ) out ( e15 ), + action k in ( e16 ) out ( e17 ), + action l comp { + loop1 = loop1 + one + } + in ( e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to mergeE, + flow e5 from mergeE to e, + flow e6 from e to decisionI, + flow e7 from decisionI to f [ gr2 ], + flow e8 from f to mergeFinal, + flow e9 from mergeFinal to ^final, + flow e10 from decisionI to g [ eq2 ], + flow e11 from g to h, + flow e12 from h to mergeFinal, + flow e13 from decisionI to i [ eq1 ], + flow e14 from i to j, + flow e15 from j to decisionLoop1, + flow e16 from decisionLoop1 to k [ eq14 ], + flow e17 from k to mergeFinal, + flow e18 from decisionLoop1 to l [ inf14 ], + flow e19 from l to mergeE + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_2.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_2.xsad new file mode 100644 index 000000000..9ff09f5c0 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_2.xsad @@ -0,0 +1,71 @@ +activity "3651-2" { + int loop1, + bool gr2, + bool eq2, + bool eq1, + bool inf14, + bool eq14, + int one, + int two, + int fourteen, + int i = 2 nodes { + initial ^initial out ( e0 ), + final ^final in ( e9 ), + merge mergeE in ( e4, + e19 ) out ( e5 ), + merge mergeFinal in ( e8, + e12, + e17 ) out ( e9 ), + decision decisionI in ( e6 ) out ( e7, + e10, + e13 ), + decision decisionLoop1 in ( e15 ) out ( e16, + e18 ), + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e7 ) out ( e8 ), + action g in ( e10 ) out ( e11 ), + action h in ( e11 ) out ( e12 ), + action i in ( e13 ) out ( e14 ), + action j comp { + inf14 = loop1 < fourteen, + eq14 = loop1 == fourteen + } + in ( e14 ) out ( e15 ), + action k in ( e16 ) out ( e17 ), + action l comp { + loop1 = loop1 + one + } + in ( e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to mergeE, + flow e5 from mergeE to e, + flow e6 from e to decisionI, + flow e7 from decisionI to f [ gr2 ], + flow e8 from f to mergeFinal, + flow e9 from mergeFinal to ^final, + flow e10 from decisionI to g [ eq2 ], + flow e11 from g to h, + flow e12 from h to mergeFinal, + flow e13 from decisionI to i [ eq1 ], + flow e14 from i to j, + flow e15 from j to decisionLoop1, + flow e16 from decisionLoop1 to k [ eq14 ], + flow e17 from k to mergeFinal, + flow e18 from decisionLoop1 to l [ inf14 ], + flow e19 from l to mergeE + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_3.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_3.xsad new file mode 100644 index 000000000..de2cc8826 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/3561-2_3.xsad @@ -0,0 +1,71 @@ +activity "3651-2" { + int loop1, + bool gr2, + bool eq2, + bool eq1, + bool inf14, + bool eq14, + int one, + int two, + int fourteen, + int i = 3 nodes { + initial ^initial out ( e0 ), + final ^final in ( e9 ), + merge mergeE in ( e4, + e19 ) out ( e5 ), + merge mergeFinal in ( e8, + e12, + e17 ) out ( e9 ), + decision decisionI in ( e6 ) out ( e7, + e10, + e13 ), + decision decisionLoop1 in ( e15 ) out ( e16, + e18 ), + action a comp { + eq1 = i == one, + eq2 = i == two, + gr2 = i > two + } + in ( e0 ) out ( e1 ), + action b in ( e1 ) out ( e2 ), + action c in ( e2 ) out ( e3 ), + action d in ( e3 ) out ( e4 ), + action e in ( e5 ) out ( e6 ), + action f in ( e7 ) out ( e8 ), + action g in ( e10 ) out ( e11 ), + action h in ( e11 ) out ( e12 ), + action i in ( e13 ) out ( e14 ), + action j comp { + inf14 = loop1 < fourteen, + eq14 = loop1 == fourteen + } + in ( e14 ) out ( e15 ), + action k in ( e16 ) out ( e17 ), + action l comp { + loop1 = loop1 + one + } + in ( e18 ) out ( e19 ) + } + edges { + flow e0 from ^initial to a, + flow e1 from a to b, + flow e2 from b to c, + flow e3 from c to d, + flow e4 from d to mergeE, + flow e5 from mergeE to e, + flow e6 from e to decisionI, + flow e7 from decisionI to f [ gr2 ], + flow e8 from f to mergeFinal, + flow e9 from mergeFinal to ^final, + flow e10 from decisionI to g [ eq2 ], + flow e11 from g to h, + flow e12 from h to mergeFinal, + flow e13 from decisionI to i [ eq1 ], + flow e14 from i to j, + flow e15 from j to decisionLoop1, + flow e16 from decisionLoop1 to k [ eq14 ], + flow e17 from k to mergeFinal, + flow e18 from decisionLoop1 to l [ inf14 ], + flow e19 from l to mergeE + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_false_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_false_false.xsad new file mode 100644 index 000000000..c397e53b8 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_false_false.xsad @@ -0,0 +1,48 @@ +activity ExampleBV1 { + bool notExists, + bool notFound, + bool exists = false, + bool found = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action acc in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15 ) out ( e8 ), + merge mergeFinal in ( e9, + e14 ) out ( e10 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to acc [ exists ], + flow e7 from acc to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to mergeFinal, + flow e15 from cont to mergeDoRq + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_false_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_false_true.xsad new file mode 100644 index 000000000..0b9391c86 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_false_true.xsad @@ -0,0 +1,48 @@ +activity ExampleBV1 { + bool notExists, + bool notFound, + bool exists = false, + bool found = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action acc in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15 ) out ( e8 ), + merge mergeFinal in ( e9, + e14 ) out ( e10 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to acc [ exists ], + flow e7 from acc to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to mergeFinal, + flow e15 from cont to mergeDoRq + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_true_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_true_false.xsad new file mode 100644 index 000000000..7945d1733 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_true_false.xsad @@ -0,0 +1,48 @@ +activity ExampleBV1 { + bool notExists, + bool notFound, + bool exists = true, + bool found = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action acc in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15 ) out ( e8 ), + merge mergeFinal in ( e9, + e14 ) out ( e10 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to acc [ exists ], + flow e7 from acc to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to mergeFinal, + flow e15 from cont to mergeDoRq + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_true_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_true_true.xsad new file mode 100644 index 000000000..d81423c1c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV1_true_true.xsad @@ -0,0 +1,48 @@ +activity ExampleBV1 { + bool notExists, + bool notFound, + bool exists = true, + bool found = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action acc in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15 ) out ( e8 ), + merge mergeFinal in ( e9, + e14 ) out ( e10 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to acc [ exists ], + flow e7 from acc to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to mergeFinal, + flow e15 from cont to mergeDoRq + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_false_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_false_false.xsad new file mode 100644 index 000000000..6fa5e440e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_false_false.xsad @@ -0,0 +1,47 @@ +activity ExampleBV2 { + bool notExists, + bool notFound, + bool exists = false, + bool found = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notExists = ! exists, + notFound = ! found + } in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15 ) out ( e8 ), + merge mergeFinal in ( e9, + e14 ) out ( e10 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to mergeFinal, + flow e15 from cont to mergeDoRq + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_false_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_false_true.xsad new file mode 100644 index 000000000..1db3e0ab3 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_false_true.xsad @@ -0,0 +1,47 @@ +activity ExampleBV2 { + bool notExists, + bool notFound, + bool exists = false, + bool found = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notExists = ! exists, + notFound = ! found + } in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15 ) out ( e8 ), + merge mergeFinal in ( e9, + e14 ) out ( e10 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to mergeFinal, + flow e15 from cont to mergeDoRq + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_true_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_true_false.xsad new file mode 100644 index 000000000..840080b5c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_true_false.xsad @@ -0,0 +1,47 @@ +activity ExampleBV2 { + bool notExists, + bool notFound, + bool exists = true, + bool found = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notExists = ! exists, + notFound = ! found + } in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15 ) out ( e8 ), + merge mergeFinal in ( e9, + e14 ) out ( e10 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to mergeFinal, + flow e15 from cont to mergeDoRq + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_true_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_true_true.xsad new file mode 100644 index 000000000..58efa6f53 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV2_true_true.xsad @@ -0,0 +1,47 @@ +activity ExampleBV2 { + bool notExists, + bool notFound, + bool exists = true, + bool found = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notExists = ! exists, + notFound = ! found + } in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15 ) out ( e8 ), + merge mergeFinal in ( e9, + e14 ) out ( e10 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to mergeFinal, + flow e15 from cont to mergeDoRq + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_false_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_false_false.xsad new file mode 100644 index 000000000..7b5b9ae80 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_false_false.xsad @@ -0,0 +1,62 @@ +activity ExampleBV3 { + bool notExists, + bool notFound, + bool notAcc, + bool exists = false, + bool found = false, + bool acc = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notAcc = ! acc, + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15, + e18 ) out ( e8 ), + merge mergeFinal in ( e9, + e20 ) out ( e10 ), + decision acc1 in ( e14 ) out ( e16, + e17 ), + action acc2 in ( e17 ) out ( e18 ), + action val in ( e16 ) out ( e19 ), + action noacc in ( e19 ) out ( e20 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to acc1, + flow e15 from cont to mergeDoRq, + flow e16 from acc1 to val [ notAcc ], + flow e17 from acc1 to acc2 [ acc ], + flow e18 from acc2 to mergeDoRq, + flow e19 from val to noacc, + flow e20 from noacc to mergeFinal + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_false_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_false_true.xsad new file mode 100644 index 000000000..14f3e5923 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_false_true.xsad @@ -0,0 +1,62 @@ +activity ExampleBV3 { + bool notExists, + bool notFound, + bool notAcc, + bool exists = false, + bool found = false, + bool acc = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notAcc = ! acc, + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15, + e18 ) out ( e8 ), + merge mergeFinal in ( e9, + e20 ) out ( e10 ), + decision acc1 in ( e14 ) out ( e16, + e17 ), + action acc2 in ( e17 ) out ( e18 ), + action val in ( e16 ) out ( e19 ), + action noacc in ( e19 ) out ( e20 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to acc1, + flow e15 from cont to mergeDoRq, + flow e16 from acc1 to val [ notAcc ], + flow e17 from acc1 to acc2 [ acc ], + flow e18 from acc2 to mergeDoRq, + flow e19 from val to noacc, + flow e20 from noacc to mergeFinal + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_true_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_true_false.xsad new file mode 100644 index 000000000..b3a68af51 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_true_false.xsad @@ -0,0 +1,62 @@ +activity ExampleBV3 { + bool notExists, + bool notFound, + bool notAcc, + bool exists = false, + bool found = true, + bool acc = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notAcc = ! acc, + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15, + e18 ) out ( e8 ), + merge mergeFinal in ( e9, + e20 ) out ( e10 ), + decision acc1 in ( e14 ) out ( e16, + e17 ), + action acc2 in ( e17 ) out ( e18 ), + action val in ( e16 ) out ( e19 ), + action noacc in ( e19 ) out ( e20 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to acc1, + flow e15 from cont to mergeDoRq, + flow e16 from acc1 to val [ notAcc ], + flow e17 from acc1 to acc2 [ acc ], + flow e18 from acc2 to mergeDoRq, + flow e19 from val to noacc, + flow e20 from noacc to mergeFinal + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_true_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_true_true.xsad new file mode 100644 index 000000000..a046acc50 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_false_true_true.xsad @@ -0,0 +1,62 @@ +activity ExampleBV3 { + bool notExists, + bool notFound, + bool notAcc, + bool exists = false, + bool found = true, + bool acc = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notAcc = ! acc, + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15, + e18 ) out ( e8 ), + merge mergeFinal in ( e9, + e20 ) out ( e10 ), + decision acc1 in ( e14 ) out ( e16, + e17 ), + action acc2 in ( e17 ) out ( e18 ), + action val in ( e16 ) out ( e19 ), + action noacc in ( e19 ) out ( e20 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to acc1, + flow e15 from cont to mergeDoRq, + flow e16 from acc1 to val [ notAcc ], + flow e17 from acc1 to acc2 [ acc ], + flow e18 from acc2 to mergeDoRq, + flow e19 from val to noacc, + flow e20 from noacc to mergeFinal + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_false_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_false_false.xsad new file mode 100644 index 000000000..a4a4c6fef --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_false_false.xsad @@ -0,0 +1,62 @@ +activity ExampleBV3 { + bool notExists, + bool notFound, + bool notAcc, + bool exists = true, + bool found = false, + bool acc = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notAcc = ! acc, + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15, + e18 ) out ( e8 ), + merge mergeFinal in ( e9, + e20 ) out ( e10 ), + decision acc1 in ( e14 ) out ( e16, + e17 ), + action acc2 in ( e17 ) out ( e18 ), + action val in ( e16 ) out ( e19 ), + action noacc in ( e19 ) out ( e20 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to acc1, + flow e15 from cont to mergeDoRq, + flow e16 from acc1 to val [ notAcc ], + flow e17 from acc1 to acc2 [ acc ], + flow e18 from acc2 to mergeDoRq, + flow e19 from val to noacc, + flow e20 from noacc to mergeFinal + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_false_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_false_true.xsad new file mode 100644 index 000000000..18e8343cd --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_false_true.xsad @@ -0,0 +1,62 @@ +activity ExampleBV3 { + bool notExists, + bool notFound, + bool notAcc, + bool exists = true, + bool found = false, + bool acc = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notAcc = ! acc, + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15, + e18 ) out ( e8 ), + merge mergeFinal in ( e9, + e20 ) out ( e10 ), + decision acc1 in ( e14 ) out ( e16, + e17 ), + action acc2 in ( e17 ) out ( e18 ), + action val in ( e16 ) out ( e19 ), + action noacc in ( e19 ) out ( e20 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to acc1, + flow e15 from cont to mergeDoRq, + flow e16 from acc1 to val [ notAcc ], + flow e17 from acc1 to acc2 [ acc ], + flow e18 from acc2 to mergeDoRq, + flow e19 from val to noacc, + flow e20 from noacc to mergeFinal + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_true_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_true_false.xsad new file mode 100644 index 000000000..7cfeadac2 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_true_false.xsad @@ -0,0 +1,62 @@ +activity ExampleBV3 { + bool notExists, + bool notFound, + bool notAcc, + bool exists = true, + bool found = true, + bool acc = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notAcc = ! acc, + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15, + e18 ) out ( e8 ), + merge mergeFinal in ( e9, + e20 ) out ( e10 ), + decision acc1 in ( e14 ) out ( e16, + e17 ), + action acc2 in ( e17 ) out ( e18 ), + action val in ( e16 ) out ( e19 ), + action noacc in ( e19 ) out ( e20 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to acc1, + flow e15 from cont to mergeDoRq, + flow e16 from acc1 to val [ notAcc ], + flow e17 from acc1 to acc2 [ acc ], + flow e18 from acc2 to mergeDoRq, + flow e19 from val to noacc, + flow e20 from noacc to mergeFinal + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_true_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_true_true.xsad new file mode 100644 index 000000000..c8412603e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/ExampleBV3_true_true_true.xsad @@ -0,0 +1,62 @@ +activity ExampleBV3 { + bool notExists, + bool notFound, + bool notAcc, + bool exists = true, + bool found = true, + bool acc = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e10 ), + action req comp { + notAcc = ! acc, + notExists = ! exists, + notFound = ! found + } + in ( e0 ) out ( e1 ), + action nCode in ( e1 ) out ( e2 ), + action def in ( e2 ) out ( e3 ), + action contInt in ( e3 ) out ( e4 ), + action search in ( e5 ) out ( e11 ), + action ord in ( e6 ) out ( e7 ), + action cont in ( e12 ) out ( e15 ), + action contExt in ( e13 ) out ( e14 ), + action doReq in ( e8 ) out ( e9 ), + decision exists in ( e4 ) out ( e5, + e6 ), + decision found in ( e11 ) out ( e12, + e13 ), + merge mergeDoRq in ( e7, + e15, + e18 ) out ( e8 ), + merge mergeFinal in ( e9, + e20 ) out ( e10 ), + decision acc1 in ( e14 ) out ( e16, + e17 ), + action acc2 in ( e17 ) out ( e18 ), + action val in ( e16 ) out ( e19 ), + action noacc in ( e19 ) out ( e20 ) + } + edges { + flow e0 from ^initial to req, + flow e1 from req to nCode, + flow e2 from nCode to def, + flow e3 from def to contInt, + flow e4 from contInt to exists, + flow e5 from exists to search [ notExists ], + flow e6 from exists to ord [ exists ], + flow e7 from ord to mergeDoRq, + flow e8 from mergeDoRq to doReq, + flow e9 from doReq to mergeFinal, + flow e10 from mergeFinal to ^final, + flow e11 from search to found, + flow e12 from found to cont [ found ], + flow e13 from found to contExt [ notFound ], + flow e14 from contExt to acc1, + flow e15 from cont to mergeDoRq, + flow e16 from acc1 to val [ notAcc ], + flow e17 from acc1 to acc2 [ acc ], + flow e18 from acc2 to mergeDoRq, + flow e19 from val to noacc, + flow e20 from noacc to mergeFinal + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV1_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV1_false.xsad new file mode 100644 index 000000000..4e51e20c4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV1_false.xsad @@ -0,0 +1,43 @@ +activity hireV1 { + bool notInternal, + bool internal = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e13 ), + decision internal in ( e1 ) out ( e2, + e3 ), + merge ^merge in ( e11, + e14 ) out ( e12 ), + action register comp { + notInternal = ! internal + } + in ( e0 ) out ( e1 ), + action assignToProjectExternal in ( e2 ) out ( e14 ), + action getWelcomePack in ( e3 ) out ( e4 ), + action assignToProjectInternal in ( e5 ) out ( e7 ), + action addToWebsite in ( e6 ) out ( e8 ), + action managerInterview in ( e9 ) out ( e10 ), + action managerReport in ( e10 ) out ( e11 ), + action authorizePayment in ( e12 ) out ( e13 ), + fork ^fork in ( e4 ) out ( e5, + e6 ), + join ^join in ( e7, + e8 ) out ( e9 ) + } + edges { + flow e0 from ^initial to register, + flow e1 from register to internal, + flow e2 from internal to assignToProjectExternal [ notInternal ], + flow e3 from internal to getWelcomePack [ internal ], + flow e4 from getWelcomePack to ^fork, + flow e5 from ^fork to assignToProjectInternal, + flow e6 from ^fork to addToWebsite, + flow e7 from assignToProjectInternal to ^join, + flow e8 from addToWebsite to ^join, + flow e9 from ^join to managerInterview, + flow e10 from managerInterview to managerReport, + flow e11 from managerReport to ^merge, + flow e12 from ^merge to authorizePayment, + flow e13 from authorizePayment to ^final, + flow e14 from assignToProjectExternal to ^merge + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV1_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV1_true.xsad new file mode 100644 index 000000000..cb8ec63d9 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV1_true.xsad @@ -0,0 +1,43 @@ +activity hireV1 { + bool notInternal, + bool internal = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e13 ), + decision internal in ( e1 ) out ( e2, + e3 ), + merge ^merge in ( e11, + e14 ) out ( e12 ), + action register comp { + notInternal = ! internal + } + in ( e0 ) out ( e1 ), + action assignToProjectExternal in ( e2 ) out ( e14 ), + action getWelcomePack in ( e3 ) out ( e4 ), + action assignToProjectInternal in ( e5 ) out ( e7 ), + action addToWebsite in ( e6 ) out ( e8 ), + action managerInterview in ( e9 ) out ( e10 ), + action managerReport in ( e10 ) out ( e11 ), + action authorizePayment in ( e12 ) out ( e13 ), + fork ^fork in ( e4 ) out ( e5, + e6 ), + join ^join in ( e7, + e8 ) out ( e9 ) + } + edges { + flow e0 from ^initial to register, + flow e1 from register to internal, + flow e2 from internal to assignToProjectExternal [ notInternal ], + flow e3 from internal to getWelcomePack [ internal ], + flow e4 from getWelcomePack to ^fork, + flow e5 from ^fork to assignToProjectInternal, + flow e6 from ^fork to addToWebsite, + flow e7 from assignToProjectInternal to ^join, + flow e8 from addToWebsite to ^join, + flow e9 from ^join to managerInterview, + flow e10 from managerInterview to managerReport, + flow e11 from managerReport to ^merge, + flow e12 from ^merge to authorizePayment, + flow e13 from authorizePayment to ^final, + flow e14 from assignToProjectExternal to ^merge + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV2_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV2_false.xsad new file mode 100644 index 000000000..731c9adc4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV2_false.xsad @@ -0,0 +1,48 @@ +activity hireV2 { + bool noInternal, + bool internal = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e13 ), + decision internal in ( e1 ) out ( e2, + e3 ), + merge ^merge in ( e11, + e14 ) out ( e12 ), + action register comp { + noInternal = ! internal + } + in ( e0 ) out ( e1 ), + action assignToProjectExternal in ( e2 ) out ( e14 ), + action getWelcomePack in ( e3 ) out ( e4 ), + action assignToProjectInternal in ( e5 ) out ( e7 ), + action addToWebsite in ( e6 ) out ( e8 ), + action managerInterview in ( e9 ) out ( e10 ), + action managerReport in ( e10 ) out ( e11 ), + action authorizePayment in ( e12 ) out ( e13 ), + fork ^fork in ( e4 ) out ( e5, + e6, + e15 ), + join ^join in ( e7, + e8, + e16 ) out ( e9 ), + action assignKeys in ( e15 ) out ( e16 ) + } + edges { + flow e0 from ^initial to register, + flow e1 from register to internal, + flow e2 from internal to assignToProjectExternal [ noInternal ], + flow e3 from internal to getWelcomePack [ internal ], + flow e4 from getWelcomePack to ^fork, + flow e5 from ^fork to assignToProjectInternal, + flow e6 from ^fork to addToWebsite, + flow e7 from assignToProjectInternal to ^join, + flow e8 from addToWebsite to ^join, + flow e9 from ^join to managerInterview, + flow e10 from managerInterview to managerReport, + flow e11 from managerReport to ^merge, + flow e12 from ^merge to authorizePayment, + flow e13 from authorizePayment to ^final, + flow e14 from assignToProjectExternal to ^merge, + flow e15 from ^fork to assignKeys, + flow e16 from assignKeys to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV2_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV2_true.xsad new file mode 100644 index 000000000..00ba5744e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV2_true.xsad @@ -0,0 +1,48 @@ +activity hireV2 { + bool noInternal, + bool internal = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e13 ), + decision internal in ( e1 ) out ( e2, + e3 ), + merge ^merge in ( e11, + e14 ) out ( e12 ), + action register comp { + noInternal = ! internal + } + in ( e0 ) out ( e1 ), + action assignToProjectExternal in ( e2 ) out ( e14 ), + action getWelcomePack in ( e3 ) out ( e4 ), + action assignToProjectInternal in ( e5 ) out ( e7 ), + action addToWebsite in ( e6 ) out ( e8 ), + action managerInterview in ( e9 ) out ( e10 ), + action managerReport in ( e10 ) out ( e11 ), + action authorizePayment in ( e12 ) out ( e13 ), + fork ^fork in ( e4 ) out ( e5, + e6, + e15 ), + join ^join in ( e7, + e8, + e16 ) out ( e9 ), + action assignKeys in ( e15 ) out ( e16 ) + } + edges { + flow e0 from ^initial to register, + flow e1 from register to internal, + flow e2 from internal to assignToProjectExternal [ noInternal ], + flow e3 from internal to getWelcomePack [ internal ], + flow e4 from getWelcomePack to ^fork, + flow e5 from ^fork to assignToProjectInternal, + flow e6 from ^fork to addToWebsite, + flow e7 from assignToProjectInternal to ^join, + flow e8 from addToWebsite to ^join, + flow e9 from ^join to managerInterview, + flow e10 from managerInterview to managerReport, + flow e11 from managerReport to ^merge, + flow e12 from ^merge to authorizePayment, + flow e13 from authorizePayment to ^final, + flow e14 from assignToProjectExternal to ^merge, + flow e15 from ^fork to assignKeys, + flow e16 from assignKeys to ^join + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV3_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV3_false.xsad new file mode 100644 index 000000000..8bdb1238c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV3_false.xsad @@ -0,0 +1,44 @@ +activity hireV3 { + bool notInternal, + bool internal = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e13 ), + decision internal in ( e1 ) out ( e2, + e3 ), + merge ^merge in ( e11, + e14 ) out ( e12 ), + action register comp { + notInternal = ! internal + } in ( e0 ) out ( e1 ), + action assignToProjectExternal in ( e2 ) out ( e14 ), + action getWelcomePack in ( e3 ) out ( e4 ), + action assignToProjectInternal in ( e5 ) out ( e7 ), + action addToWebsite in ( e6 ) out ( e8 ), + action managerInterview in ( e9 ) out ( e10 ), + action managerReport in ( e10 ) out ( e11 ), + action authorizePayment in ( e12 ) out ( e13 ), + fork ^fork in ( e4 ) out ( e6, + e15 ), + join ^join in ( e7, + e8 ) out ( e9 ), + action assignKeys in ( e15 ) out ( e5 ) + } + edges { + flow e0 from ^initial to register, + flow e1 from register to internal, + flow e2 from internal to assignToProjectExternal [ notInternal ], + flow e3 from internal to getWelcomePack [ internal ], + flow e4 from getWelcomePack to ^fork, + flow e5 from assignKeys to assignToProjectInternal, + flow e6 from ^fork to addToWebsite, + flow e7 from assignToProjectInternal to ^join, + flow e8 from addToWebsite to ^join, + flow e9 from ^join to managerInterview, + flow e10 from managerInterview to managerReport, + flow e11 from managerReport to ^merge, + flow e12 from ^merge to authorizePayment, + flow e13 from authorizePayment to ^final, + flow e14 from assignToProjectExternal to ^merge, + flow e15 from ^fork to assignKeys + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV3_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV3_true.xsad new file mode 100644 index 000000000..a0906d1ec --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV3_true.xsad @@ -0,0 +1,44 @@ +activity hireV3 { + bool notInternal, + bool internal = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e13 ), + decision internal in ( e1 ) out ( e2, + e3 ), + merge ^merge in ( e11, + e14 ) out ( e12 ), + action register comp { + notInternal = ! internal + } in ( e0 ) out ( e1 ), + action assignToProjectExternal in ( e2 ) out ( e14 ), + action getWelcomePack in ( e3 ) out ( e4 ), + action assignToProjectInternal in ( e5 ) out ( e7 ), + action addToWebsite in ( e6 ) out ( e8 ), + action managerInterview in ( e9 ) out ( e10 ), + action managerReport in ( e10 ) out ( e11 ), + action authorizePayment in ( e12 ) out ( e13 ), + fork ^fork in ( e4 ) out ( e6, + e15 ), + join ^join in ( e7, + e8 ) out ( e9 ), + action assignKeys in ( e15 ) out ( e5 ) + } + edges { + flow e0 from ^initial to register, + flow e1 from register to internal, + flow e2 from internal to assignToProjectExternal [ notInternal ], + flow e3 from internal to getWelcomePack [ internal ], + flow e4 from getWelcomePack to ^fork, + flow e5 from assignKeys to assignToProjectInternal, + flow e6 from ^fork to addToWebsite, + flow e7 from assignToProjectInternal to ^join, + flow e8 from addToWebsite to ^join, + flow e9 from ^join to managerInterview, + flow e10 from managerInterview to managerReport, + flow e11 from managerReport to ^merge, + flow e12 from ^merge to authorizePayment, + flow e13 from authorizePayment to ^final, + flow e14 from assignToProjectExternal to ^merge, + flow e15 from ^fork to assignKeys + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV4_false.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV4_false.xsad new file mode 100644 index 000000000..a6b689e25 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV4_false.xsad @@ -0,0 +1,44 @@ +activity hireV4 { + bool notInternal, + bool internal = false nodes { + initial ^initial out ( e0 ), + final ^final in ( e13 ), + decision internal in ( e1 ) out ( e2, + e3 ), + merge ^merge in ( e14, + e10 ) out ( e11 ), + action register comp { + notInternal = ! internal + } in ( e0 ) out ( e1 ), + action assignToProjectExternal in ( e2 ) out ( e14 ), + action getWelcomePack in ( e3 ) out ( e4 ), + action assignToProjectInternal in ( e5 ) out ( e7 ), + action addToWwebsite in ( e6 ) out ( e8 ), + action managerInterview in ( e9 ) out ( e10 ), + action managerReport in ( e11 ) out ( e12 ), + action authorizePayment in ( e12 ) out ( e13 ), + fork ^fork in ( e4 ) out ( e6, + e15 ), + join ^join in ( e7, + e8 ) out ( e9 ), + action assignKeys in ( e15 ) out ( e5 ) + } + edges { + flow e0 from ^initial to register, + flow e1 from register to internal, + flow e2 from internal to assignToProjectExternal [ notInternal ], + flow e3 from internal to getWelcomePack [ internal ], + flow e4 from getWelcomePack to ^fork, + flow e5 from assignKeys to assignToProjectInternal, + flow e6 from ^fork to addToWwebsite, + flow e7 from assignToProjectInternal to ^join, + flow e8 from addToWwebsite to ^join, + flow e9 from ^join to managerInterview, + flow e10 from managerInterview to ^merge, + flow e11 from ^merge to managerReport, + flow e12 from managerReport to authorizePayment, + flow e13 from authorizePayment to ^final, + flow e14 from assignToProjectExternal to ^merge, + flow e15 from ^fork to assignKeys + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV4_true.xsad b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV4_true.xsad new file mode 100644 index 000000000..477a08bdb --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV4_true.xsad @@ -0,0 +1,44 @@ +activity hireV4 { + bool notInternal, + bool internal = true nodes { + initial ^initial out ( e0 ), + final ^final in ( e13 ), + decision internal in ( e1 ) out ( e2, + e3 ), + merge ^merge in ( e14, + e10 ) out ( e11 ), + action register comp { + notInternal = ! internal + } in ( e0 ) out ( e1 ), + action assignToProjectExternal in ( e2 ) out ( e14 ), + action getWelcomePack in ( e3 ) out ( e4 ), + action assignToProjectInternal in ( e5 ) out ( e7 ), + action addToWwebsite in ( e6 ) out ( e8 ), + action managerInterview in ( e9 ) out ( e10 ), + action managerReport in ( e11 ) out ( e12 ), + action authorizePayment in ( e12 ) out ( e13 ), + fork ^fork in ( e4 ) out ( e6, + e15 ), + join ^join in ( e7, + e8 ) out ( e9 ), + action assignKeys in ( e15 ) out ( e5 ) + } + edges { + flow e0 from ^initial to register, + flow e1 from register to internal, + flow e2 from internal to assignToProjectExternal [ notInternal ], + flow e3 from internal to getWelcomePack [ internal ], + flow e4 from getWelcomePack to ^fork, + flow e5 from assignKeys to assignToProjectInternal, + flow e6 from ^fork to addToWwebsite, + flow e7 from assignToProjectInternal to ^join, + flow e8 from addToWwebsite to ^join, + flow e9 from ^join to managerInterview, + flow e10 from managerInterview to ^merge, + flow e11 from ^merge to managerReport, + flow e12 from managerReport to authorizePayment, + flow e13 from authorizePayment to ^final, + flow e14 from assignToProjectExternal to ^merge, + flow e15 from ^fork to assignKeys + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/output_memory_08-03-2017_16-32-39/results.csv b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/output_memory_08-03-2017_16-32-39/results.csv new file mode 100644 index 000000000..0564869dd --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/output_memory_08-03-2017_16-32-39/results.csv @@ -0,0 +1,43 @@ +SpecificTraceImplMemory,SpecificTraceImplStates,GenericTraceImplMemory,GenericTraceImplStates,ExecutionTraceModelImplMemory,ExecutionTraceModelImplStates +49064,32,50128,32,305880,32 +27944,12,27776,12,117472,13 +36712,18,36928,18,188280,19 +46440,21,46672,21,268032,21 +49064,32,50128,32,306136,32 +59080,34,60128,34,414248,34 +31872,14,31872,14,143344,15 +46400,21,46632,21,268032,21 +43616,30,44592,30,271080,30 +53184,35,54528,35,344248,35 +51248,30,52120,30,333656,30 +47552,21,47448,21,283992,21 +47552,21,47448,21,283992,21 +46400,21,46632,21,268032,21 +47776,22,48080,22,293472,23 +47552,21,47448,21,283992,21 +42008,23,42408,23,227784,23 +59080,34,60128,34,414248,34 +51248,30,52120,30,333656,30 +50360,25,50776,25,318912,25 +40008,21,40336,21,208056,21 +30480,12,30376,12,127248,13 +51248,30,52120,30,333656,30 +40008,21,40336,21,208056,21 +61120,36,62280,36,438760,36 +59080,34,60128,34,414248,34 +48400,23,48704,23,293472,23 +47552,21,47448,21,283992,21 +51248,30,52120,30,333656,30 +59080,34,60128,34,414248,34 +40056,21,40384,21,208056,21 +42008,23,42408,23,227784,23 +51248,30,52120,30,333656,30 +29968,12,29856,12,124232,13 +36712,18,36928,18,188280,19 +40056,21,40384,21,208056,21 +46352,21,46584,21,268032,21 +48400,23,48704,23,293472,23 +47552,21,47448,21,283992,21 +51248,30,52120,30,333656,30 +47552,21,47448,21,283992,21 +59080,34,60128,34,414248,34 diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkData.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkData.xtend new file mode 100644 index 000000000..a82d36eb2 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkData.xtend @@ -0,0 +1,76 @@ +package org.eclipse.gemoc.trace.benchmark + +import org.eclipse.gemoc.trace.benchmark.languages.ActivityDiagram + +class BenchmarkData { + + // Constants + public static val String modelFolderName = "models" + public static val String outputFolderName = "output" + public static val int NBMEASURES = 1 + public static val String projectName = "benchmark-project" + + static val activitydiagram = new ActivityDiagram(#{ + "2557-1_1.xsad", + "2557-1_2.xsad", + "2557-1_3.xsad", + "2557-1_4.xsad", + "2557-1_5.xsad", + "2557-1_6.xsad", + "2557-2_1.xsad", + "2557-2_2.xsad", + "2557-2_3.xsad", + "2557-2_4.xsad", + "2557-2_5.xsad", + "2557-2_6.xsad", + "3561-1_1.xsad", + "3561-1_2.xsad", + "3561-1_3.xsad", + "3561-2_1.xsad", + "3561-2_2.xsad", + "3561-2_3.xsad", + "ExampleBV1_false_false.xsad", + "ExampleBV1_false_true.xsad", + "ExampleBV1_true_false.xsad", + "ExampleBV1_true_true.xsad", + "ExampleBV2_false_false.xsad", + "ExampleBV2_false_true.xsad", + "ExampleBV2_true_false.xsad", + "ExampleBV2_true_true.xsad", + "ExampleBV3_false_false_false.xsad", + "ExampleBV3_false_false_true.xsad", + "ExampleBV3_false_true_false.xsad", + "ExampleBV3_false_true_true.xsad", + "ExampleBV3_true_false_false.xsad", + "ExampleBV3_true_false_true.xsad", + "ExampleBV3_true_true_false.xsad", + "ExampleBV3_true_true_true.xsad", + "hireV1_false.xsad", + "hireV1_true.xsad", + "hireV2_false.xsad", + "hireV2_true.xsad", + "hireV3_false.xsad", + "hireV3_true.xsad", + "hireV4_false.xsad", + "hireV4_true.xsad" + }) + + // Input data for all tests + public static val tracingCases = #[ +// "Clone", + "None" +// "Generic", +// "Generated" + ] + public static val languages = #{activitydiagram} + + public static val tracePackages = #{ + "SpecificTraceImpl" -> #["activitydiagramTrace.impl", + "activitydiagramTrace.States.impl", + "activitydiagramTrace.States.activitydiagram.impl", + "activitydiagramTrace.Steps.impl"], + "GenericTraceImpl" -> #["generictrace.impl"], + "ExecutionTraceModelImpl" -> #["org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.impl", + "org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.impl"] + } +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkMemoryTestSuite.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkMemoryTestSuite.xtend new file mode 100644 index 000000000..6ecb4c687 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkMemoryTestSuite.xtend @@ -0,0 +1,230 @@ +package org.eclipse.gemoc.trace.benchmark + +import org.eclipse.gemoc.trace.benchmark.memory.MemoryAnalyzer +import org.eclipse.gemoc.trace.benchmark.utils.MemoryCSVHelper +import org.eclipse.gemoc.trace.commons.testutil.EclipseTestUtil +import org.eclipse.gemoc.trace.commons.testutil.Investigation +import java.io.File +import java.io.FileOutputStream +import java.io.PrintWriter +import java.nio.file.Files +import java.nio.file.Path +import java.text.SimpleDateFormat +import java.util.ArrayList +import java.util.Calendar +import java.util.Collection +import java.util.List +import java.util.Random +import java.util.function.Consumer +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.EClass +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.util.EcoreUtil +import org.junit.AfterClass +import org.junit.BeforeClass +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.junit.runners.Parameterized +import org.junit.runners.Parameterized.Parameters +import org.eclipse.gemoc.trace.commons.model.generictrace.GenericTrace +import org.eclipse.gemoc.executionframework.reflectivetrace.gemoc_execution_trace.ExecutionTraceModel + +@RunWith(Parameterized) +class BenchmarkMemoryTestSuite { + + val String tmpFolderContainer = "/home/dorian/tmp/yay" + + @Rule public TemporaryFolder tmpFolderCreator = new TemporaryFolder(new File(tmpFolderContainer)); + + private def File createTmpFolder() { + // return tmpFolderCreator.newFolder + val rand = new Random + val id = rand.nextInt(1000) + val fileFriendlyTestCaseName = this.testCaseName.replaceAll(",", "-").replaceAll("/", "_") + val folder = new File(tmpFolderContainer, fileFriendlyTestCaseName + "_" + id) + folder.mkdirs + return folder + } + + // Parameters specific to each test + val String testCaseName + val String traceType + val List tracePackages + val URI traceURI + + // Common to all tests + static var File outputFolder + static var File outputCSV + static var PrintWriter outputCSVWriter + static var FileOutputStream outputCSVStream + static var MemoryCSVHelper csv + + new(String testCaseName, String traceType, List tracePackages, URI traceURI) { + this.traceURI = traceURI + this.traceType = traceType + this.tracePackages = tracePackages + this.testCaseName = testCaseName + } + + @BeforeClass + def static void before() { + // Create output folder in test project + val Calendar currentDate = Calendar::getInstance(); + val SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-YYYY_HH-mm-ss"); + val String dateNow = formatter.format(currentDate.getTime()); + outputFolder = new File("output_memory" + "_" + dateNow) + if (!outputFolder.exists) + outputFolder.mkdir + + // Prepare CSV file in output folder + outputCSV = new File(outputFolder, "results.csv") + outputCSVStream = new FileOutputStream(outputCSV) + outputCSVWriter = new PrintWriter(outputCSVStream, true) + // Prepare csv helper + csv = new MemoryCSVHelper + csv.traceTypes.addAll("SpecificTraceImpl", "GenericTraceImpl", "ExecutionTraceModelImpl") + } + + @AfterClass + def static void after() { + outputCSVWriter.println(csv.exportLines) + outputCSVStream.close + outputCSVWriter.close + EclipseTestUtil.waitForJobs + } + + @Test + def void test() { + + + // Loading + println("Loading model") + val ResourceSet rs = new ResourceSetImpl + val Resource traceResource = rs.createResource(traceURI) + traceResource.load(null) + EcoreUtil::resolveAll(traceResource) + + // Confuse the memory by preserving refs to all EClasses + val List allEClasses = new ArrayList + val allStuff = Investigation::findAllReachableObjects(traceResource) + for (o : allStuff) { + allEClasses.add(o?.eClass) + } + allStuff.clear + + // GC (in case...) + println("GC...") + System.gc + + // Measure memory + // Dump memory and compute memory usage of the trace + val heapFolder = createTmpFolder + val heap = new File(heapFolder, traceType) + println("Dumping memory") + MemoryAnalyzer.dumpHeap(heap) + println("Analyzing dump") + + var lMemory = csv.memoryFootprints.get(traceType) + if (lMemory == null) { + lMemory = new ArrayList + csv.memoryFootprints.put(traceType, lMemory) + } + lMemory.add(computeMemoryUsage(heap)) + + var nbStates = 0 + switch (traceType) { + case "SpecificTraceImpl": nbStates = (traceResource.contents.get(0) as activitydiagramTrace.SpecificTrace).states.length + case "GenericTraceImpl": nbStates = (traceResource.contents.get(0) as GenericTrace).states.length + case "ExecutionTraceModelImpl": nbStates = (traceResource.contents.get(0) as ExecutionTraceModel).reachedStates.length + } + + var lStates = csv.numberOfStates.get(traceType) + if (lStates == null) { + lStates = new ArrayList + csv.numberOfStates.put(traceType, lStates) + } + lStates.add(nbStates) + + // Unloading + println("Unloading model") + for (c : traceResource.allContents.toSet) { + c.eAdapters.clear + } + traceResource.eAdapters.clear + traceResource.contents.clear + traceResource.unload + rs.resources.clear + + } + + static val String queryStart = '''SELECT * FROM "''' + static val String queryEnd = '''"''' + + static val String queryAllUtil = '''SELECT * FROM ".*(PackageImpl|FactoryImpl|AdapterFactory|Switch)$"''' + + static def String createQuery(String... packagesNames) { + '''«queryStart»(«packagesNames.map[s|'''.*«s».*'''].join("|")»)«queryEnd»''' + } + + def long computeMemoryUsage(File heap) { + val analyzer = new MemoryAnalyzer(heap) + + // First we make sure that there is only one trace + val String queryCheck = '''SELECT * FROM ".*«traceType».*"''' + println(queryCheck) + val resCheck = analyzer.computeRetainedSizeWithOQLQuery(queryCheck) + if (resCheck.nbElements != 1) { + throw new Exception("Wrong number of traces: " + resCheck.nbElements) + } + + val List queries = new ArrayList() + val query = '''«queryStart»(«tracePackages.map[s|'''.*«s».*'''].join("|")»)«queryEnd»''' + queries.add(query) + + val resquery = analyzer.computeRetainedSizeWithOQLQuery(queries, #[queryAllUtil]) + + analyzer.cleanUp + + return resquery.memorySum + } + + @Parameters(name="{0}") + public def static Collection data() { + + val Collection data = new ArrayList(); + + for (entry : BenchmarkData::tracePackages.entrySet) { + + val File traceFolder = new File("model_traces") + if (traceFolder.exists) { + val File traceTypeFolder = new File(traceFolder, entry.key) + if (traceTypeFolder.exists) { + val forEachFunc = new Consumer() { + override accept(Path f) { + val URI traceURI = URI.createFileURI(f.toAbsolutePath.toString) + // Preparing test case name + val String testCaseName = f.toString + // Creating test case input data + val Object[] testCaseData = #[ + testCaseName, + entry.key, + entry.value, + traceURI + ]; + data.add(testCaseData) + } + } + Files.walk(traceTypeFolder.toPath).filter([f|Files::isRegularFile(f)]).forEach(forEachFunc); + } + } + } + + return data + + } + +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkSingleJVMTestSuite.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkSingleJVMTestSuite.xtend new file mode 100644 index 000000000..1c394f34c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkSingleJVMTestSuite.xtend @@ -0,0 +1,202 @@ +package org.eclipse.gemoc.trace.benchmark + +import org.eclipse.gemoc.trace.benchmark.languages.ActivityDiagram +import org.eclipse.gemoc.trace.benchmark.languages.BenchmarkLanguage +import org.eclipse.gemoc.trace.benchmark.tracingcases.BenchmarkTracingCase +import org.eclipse.gemoc.trace.benchmark.tracingcases.CloneBasedTracingCase +import org.eclipse.gemoc.trace.benchmark.tracingcases.GeneratedTracingCase +import org.eclipse.gemoc.trace.benchmark.tracingcases.GenericTracingCase +import org.eclipse.gemoc.trace.benchmark.tracingcases.NoTracingCase +import org.eclipse.gemoc.trace.commons.testutil.EclipseTestUtil +import java.io.BufferedReader +import java.io.File +import java.io.FileOutputStream +import java.io.FileReader +import java.io.PrintWriter +import java.io.StringWriter +import java.util.ArrayList +import java.util.HashMap +import java.util.List +import java.util.Map +import org.eclipse.core.resources.ResourcesPlugin +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.core.runtime.Status +import org.eclipse.core.runtime.jobs.Job +import org.eclipse.emf.common.util.URI +import org.junit.After +import org.junit.Test + +import static org.eclipse.gemoc.trace.benchmark.BenchmarkData.* +import static org.eclipse.gemoc.trace.benchmark.utils.BenchmarkHelpers.* +import org.eclipse.gemoc.trace.benchmark.utils.CSVHelper + +class BenchmarkSingleJVMTestSuite { + + public static val String modelProperty = "modelProperty" + public static val String paramProperty = "paramProperty" + public static val String languageProperty = "languageProperty" + public static val String tracingCaseProperty = "tracingCaseProperty" + public static val String outputFolderProperty = "outputFolderProperty" + public static val String tmpAddFileProperty = "tmpAddFileProperty" + public static val String tmpRestoreFileProperty = "tmpRestoreFileProperty" + public static val String tmpExecuteFileProperty = "tmpExecuteFileProperty" + + public static val String errorString = "!!!!ERROR" + + var BenchmarkLanguage language + var URI modelURI + var BenchmarkTracingCase tracingCase + + public def void log(String s) { + println("### [single test case] " + s) + } + + private def execute(IProgressMonitor m) { + // Create engine parameterized with inputs + log("Preparing engine") + System.gc + Thread.sleep(3000) + log("Running engine") + tracingCase.execute + } + + val Map streams = new HashMap + val Map writers = new HashMap + + private def void addCSV(String filename, String folder) { + val csv = new File(folder + "/" + filename) + val csvStream = new FileOutputStream(csv) + val csvWriter = new PrintWriter(csvStream, true) + streams.put(filename, csvStream) + writers.put(filename, csvWriter) + } + + private def List getResults(File file) { + val FileReader fileReader = new FileReader(file) + val BufferedReader bufferedReader = new BufferedReader(fileReader) + val List lines = new ArrayList + for (var String l = bufferedReader.readLine(); l != null; l = bufferedReader.readLine()) { + lines.add(l) + } + fileReader.close + file.delete + return lines + } + + @Test + def void test() { + // Disable logs + val emptyPrintStream = createEmptyPrintStream + System.setOut(emptyPrintStream) + System.setErr(emptyPrintStream) + + // Read properties + val String model = System.getProperty(modelProperty) + val String tracingCaseString = System.getProperty(tracingCaseProperty) + val String languageName = System.getProperty(languageProperty) + val String outputFolder = System.getProperty(outputFolderProperty) + + val String addCSVFilename = "add"+tracingCaseString+".csv" + val String restoreCSVFilename = "restore"+tracingCaseString+".csv" + val String executionCSVFilename = "execute"+tracingCaseString+".csv" + val String initializationCSVFilename = "initialize"+tracingCaseString+".csv" + + System.setProperty(tmpAddFileProperty,"") + System.setProperty(tmpRestoreFileProperty,"") + System.setProperty(tmpExecuteFileProperty,"") + + val csv = new CSVHelper + + addCSV(addCSVFilename, outputFolder) + addCSV(restoreCSVFilename, outputFolder) + addCSV(executionCSVFilename, outputFolder) + addCSV(initializationCSVFilename, outputFolder) + + switch (tracingCaseString) { + case "Clone": tracingCase = new CloneBasedTracingCase + case "Generic": tracingCase = new GenericTracingCase + case "Generated": tracingCase = new GeneratedTracingCase + case "None" : tracingCase = new NoTracingCase + } + + switch (languageName) { + case "ActivityDiagram": language = new ActivityDiagram(null) + } + + val job = new Job("single test case") { + + override protected run(IProgressMonitor m) { + + try { + // Create eclipse project in test WS + val eclipseProject = ResourcesPlugin::getWorkspace().getRoot().getProject(projectName); + if (eclipseProject.exists) + eclipseProject.delete(true, m) + eclipseProject.create(m) + eclipseProject.open(m) + + // Copy all the models in the test WS + // TODO copy single model + val modelFolder = new File(modelFolderName); + val modelFolderInWS = copyFolderInWS(modelFolder, eclipseProject, m) + + // Create model URI + val modelFileInProject = modelFolderInWS.getFile(model) + modelURI = URI.createPlatformResourceURI(modelFileInProject.fullPath.toString, true) + + log("Warming up.") + for (var i = 0; i < 10; i++) { + tracingCase.initialize(modelURI, language) + execute(m) + } + + for (var i = 0; i < 20; i++) { + log("Starting measure "+i) + val long initTime = tracingCase.initialize(modelURI, language) + val tmpAddFile = File.createTempFile("benchmarkAdd", "benchmark") + val tmpRestoreFile = File.createTempFile("benchmarkRestore", "benchmark") + val tmpExecuteFile = File.createTempFile("benchmarkExecute", "benchmark") + System.setProperty(tmpAddFileProperty,tmpAddFile.absolutePath) + System.setProperty(tmpRestoreFileProperty,tmpRestoreFile.absolutePath) + System.setProperty(tmpExecuteFileProperty,tmpExecuteFile.absolutePath) + execute(m) + val addResults = getResults(tmpAddFile) + val restoreResults = getResults(tmpRestoreFile) + csv.addStateExecutionTimes.add(addResults.map[s|Long.parseLong(s)]) + csv.restoreStateExecutionTimes.add(restoreResults.map[s|Long.parseLong(s)]) + csv.totalExecutionTimes.add(Long.parseLong(getResults(tmpExecuteFile).head)) + csv.initializationTimes.add(initTime) + } + + writers.get(addCSVFilename).println(csv.exportAddStateExecutionTimes) + writers.get(restoreCSVFilename).println(csv.exportRestoreStateExecutionTimes) + writers.get(executionCSVFilename).println(csv.exportExecutionTimes) + writers.get(initializationCSVFilename).println(csv.exportInitializationTimes) + + // Done + return Status.OK_STATUS + + } catch (Throwable t) { + log("Exception caught.") + t.printStackTrace + val StringWriter sw = new StringWriter(); + t.printStackTrace(new PrintWriter(sw)); + val status = new Status(Status.ERROR, "trace single time test", "An error occured in the test case", t) + return status + } + } + } + job.schedule + EclipseTestUtil.waitForJobs + + if (job.result != Status.OK_STATUS) { + throw job.result.exception + } + } + + @After + def void closeCSV() { + streams.values.forEach[v|v.close] + writers.values.forEach[v|v.close] + } +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkTimeTestSuite.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkTimeTestSuite.xtend new file mode 100644 index 000000000..96ce5666c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/BenchmarkTimeTestSuite.xtend @@ -0,0 +1,160 @@ +package org.eclipse.gemoc.trace.benchmark + +import org.eclipse.gemoc.trace.benchmark.languages.BenchmarkLanguage +import org.eclipse.gemoc.trace.benchmark.utils.PDETestResultsCollector +import java.io.File +import java.util.ArrayList +import java.util.Collection +import java.util.List +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.junit.runners.Parameterized +import org.junit.runners.Parameterized.Parameters + +import static org.eclipse.gemoc.trace.benchmark.BenchmarkData.* + +@RunWith(Parameterized) +class BenchmarkTimeTestSuite { + + @Rule + public TemporaryFolder tmpFolderCreator = new TemporaryFolder(); + + // Parameters specific to each test + val BenchmarkLanguage language + val String tracingCase + val String model + val String testCaseName + val int modelID + + var String outputFolderPath + + // Constants + static val int port = 7777 + static val int minMemory = 1024 + static val int maxMemory = 5120 + static val String javaHome = "/usr/lib/jvm/java-8-oracle/bin/java" + static val String wsPath = "file:/home/dorian/workspace" + static val String rWdPath = "/home/dorian/workspace/R" + static val String outputRPath = "results" + + // Test case constructor + new(String testCaseName, int modelID, BenchmarkLanguage language, String tracingCase, String model) { + this.modelID = modelID + this.language = language + this.tracingCase = tracingCase + this.model = model + this.testCaseName = testCaseName + } + + static def String prepareProperty(String key, String value) { + return '''-D«key»=«value»''' + } + + @Before + def void prepareOutput() { + // Create output folder + val languageSimpleName = language.languageName.substring(language.languageName.lastIndexOf(".")+1) + val modelSimpleName = model.substring(0,model.lastIndexOf(".")) + val outputFolder = new File(rWdPath + "/" + outputRPath + "/" + languageSimpleName + "_" + modelSimpleName) + if (!outputFolder.exists) + outputFolder.mkdir + outputFolderPath = outputFolder.absolutePath + } + + public def void log(String s) { + println("### [" + testCaseName + "] " + s) + } + + @Test + def void test() { + // These params are completely specific to an environment, + // and they need the PDE test suite (there, BenchmarkPhase1SingleJVMTestSuite) to have + // been executed at least one before via Eclispe, so that its conf files + // are ready. + // NOTE: requires passwordless sudo! + + log ("Preparing tmp folder") + val tmpWs = tmpFolderCreator.root + + val List params = #["sudo", "ionice", "-c", "2", "-n", "0", "nice", "-19", + javaHome, "-Xms" + minMemory + "m", "-Xmx" + maxMemory + "m", + "-Declipse.pde.launch=true", "-Declipse.p2.data.area=@config.dir/p2", "-Dfile.encoding=UTF-8", + prepareProperty(BenchmarkSingleJVMTestSuite::modelProperty, model), + prepareProperty(BenchmarkSingleJVMTestSuite::languageProperty, language.class.simpleName), + prepareProperty(BenchmarkSingleJVMTestSuite::tracingCaseProperty, tracingCase), + prepareProperty(BenchmarkSingleJVMTestSuite::outputFolderProperty, outputFolderPath), "-classpath", + "/home/dorian/Downloads/gemoc-studio/plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar", + "org.eclipse.equinox.launcher.Main", "-os", "linux", "-ws", "gtk", "-arch", "x86_64", "-nl", "fr_FR", + "-consoleLog", "-version", "3", "-port", port.toString, "-testLoaderClass", + "org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader", "-loaderpluginname", + "org.eclipse.jdt.junit4.runtime", "-classNames", BenchmarkSingleJVMTestSuite.name, "-application", + "org.eclipse.pde.junit.runtime.uitestapplication", "-product org.eclipse.platform.ide", + "-testApplication", "org.eclipse.ui.ide.workbench", "-data", tmpWs.absolutePath, "-configuration", + wsPath + "/.metadata/.plugins/org.eclipse.pde.core/pde-junit/", "-dev", + wsPath + "/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties", + "-os", "linux", "-ws", "gtk", "-arch", "x86_64", "-nl", "fr_FR", "-consoleLog", "-testpluginname", + "org.eclipse.gemoc.trace.benchmark"] + + // Start Junit listener in separate job + log ("Start dummy junit listener") + val junitListener = new Runnable() { + override run() { + val PDETestResultsCollector collector = new PDETestResultsCollector( + "listening for measure") + collector.run(port); + } + } + val junitListenerThread = new Thread(junitListener) + junitListenerThread.start + + // Run actual test + log ("Start test in dedicated JVM") + val ProcessBuilder processBuilder = new ProcessBuilder(params) + val Process process = processBuilder.start() + process.waitFor() + + // Finish test listener + log ("Kill dummy junit listener") + junitListenerThread.stop + } + + @Parameters(name="{0}") + public def static Collection data() { + + val Collection data = new ArrayList(); + + // For each language + for (language : languages) { + + // For each kind of trace metamodel + for (tracingCase : tracingCases) { + + var int i = 1; + + // For each model + for (model : language.models) { + // Preparing test case name + val testCaseNameElements = new ArrayList + testCaseNameElements.addAll(#[i, language.folderName, tracingCase, model]) + + val testCaseName = testCaseNameElements.join(",") + + // Creating test case input data + val Object[] testCaseData = #[ + testCaseName, + i, + language, + tracingCase, + model + ]; + data.add(testCaseData) + i++ + } + } + } + return data + } +} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Language.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/Language.java similarity index 96% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Language.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/Language.java index ee492db74..bcf3153af 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/Language.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/Language.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.trace.benchmark; +package org.eclipse.gemoc.trace.benchmark; public enum Language { TFSM("tfsmextendedTrace Addon", @@ -18,9 +18,6 @@ public enum Language { "org.modelexecution.operationalsemantics.gemoc.sequential.dynamic.Main", "xad_sequential","activitydiagramTrace", "activitydiagram.impl.ActivityImpl", "activitydiagramTrace.impl.TraceImpl"); - - - private Language(String traceAddonName,String entryPoint, String languageName, String javaTracePackageName, String languageRootClassName, String javaTraceRootName) { this.traceAddonName = traceAddonName; this.entryPoint = entryPoint; @@ -30,13 +27,10 @@ private Language(String traceAddonName,String entryPoint, String languageName, S this.javaTraceRootName = javaTraceRootName; } - public final String traceAddonName; public final String entryPoint; public final String languageName; public final String javaTracePackageName; public final String languageRootClassName; public final String javaTraceRootName; - - } diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/XTextConverter.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/XTextConverter.java new file mode 100644 index 000000000..ce5f4d776 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/XTextConverter.java @@ -0,0 +1,45 @@ +package org.eclipse.gemoc.trace.benchmark; + +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +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.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.serializer.ISerializer; +import org.gemoc.activitydiagram.sequential.xactivitydiagram.ActivityDiagramStandaloneSetup; +import org.junit.Test; + +import com.google.inject.Injector; + +public class XTextConverter { + + @Test + public void test() { + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("xmi", new XMIResourceFactoryImpl()); + ResourceSet resSet = new ResourceSetImpl(); + Resource resource = resSet.getResource(URI.createURI("models/hireV4.xmi"), true); + XtextResource xtextResource = new XtextResource(URI.createURI("models/hireV4_false.xsad")); + try { + resource.load(Collections.EMPTY_MAP); + xtextResource.getContents().addAll(resource.getContents()); + Map options = new HashMap<>(); + options.put(XtextResource.OPTION_ENCODING, "UTF-8"); + + Injector injector = new ActivityDiagramStandaloneSetup().createInjectorAndDoEMFRegistration(); + ISerializer serializer = injector.getInstance(ISerializer.class); + + xtextResource.setSerializer(serializer); + xtextResource.save(options); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/XTextFixer2.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/XTextFixer2.java new file mode 100644 index 000000000..7f77ed6a1 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/XTextFixer2.java @@ -0,0 +1,45 @@ +package org.eclipse.gemoc.trace.benchmark; + +import java.io.File; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; + +public class XTextFixer2 { + + public static void main(String[] args) { + try { + String path = "/home/dorian/workspace/ModelDebugging/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/models/hireV4.xmi"; + File inputFile = new File(path); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder; + dBuilder = dbFactory.newDocumentBuilder(); + Document doc = dBuilder.parse(inputFile); + doc.getDocumentElement().normalize(); + NodeList nList = doc.getElementsByTagName("edges"); + for (int i = 0; i < nList.getLength(); i++) { + ((Element) nList.item(i)).setAttribute("name", "e"+i); + } + + Transformer transformer = TransformerFactory.newInstance().newTransformer(); + Result output = new StreamResult(new File(path)); + Source input = new DOMSource(doc); + + transformer.transform(input, output); + + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } +} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/api/IDebuggerHelper.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/api/IDebuggerHelper.java similarity index 85% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/api/IDebuggerHelper.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/api/IDebuggerHelper.java index de188c473..ea4b4364a 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/api/IDebuggerHelper.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/api/IDebuggerHelper.java @@ -8,14 +8,14 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.trace.benchmark.api; +package org.eclipse.gemoc.trace.benchmark.api; import java.io.File; import java.util.Collection; -import org.gemoc.gemoc_language_workbench.extensions.k3.PlainK3ExecutionEngine; +import org.eclipse.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine; -import fr.inria.diverse.trace.benchmark.Language; +import org.eclipse.gemoc.trace.benchmark.Language; public interface IDebuggerHelper { @@ -39,5 +39,4 @@ public interface IDebuggerHelper { void unloadTraceResource(); - } \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/languages/ActivityDiagram.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/languages/ActivityDiagram.xtend new file mode 100644 index 000000000..3c5776734 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/languages/ActivityDiagram.xtend @@ -0,0 +1,27 @@ +package org.eclipse.gemoc.trace.benchmark.languages + +import java.util.Set + +class ActivityDiagram extends BenchmarkLanguage { + + new(Set models) { + super(models) + } + + override getFolderName() { + "activitydiagram" + } + + override getEntryPoint() { + "public static void org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityAspect.main(org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.Activity)" + } + + override getLanguageName() { + "org.gemoc.activitydiagram.sequential.XActivityDiagram" + } + + override getInitializationMethod() { + "org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityAspect.initializeModel" + } + +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/languages/BenchmarkLanguage.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/languages/BenchmarkLanguage.xtend new file mode 100644 index 000000000..ecd1250b6 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/languages/BenchmarkLanguage.xtend @@ -0,0 +1,29 @@ +package org.eclipse.gemoc.trace.benchmark.languages + +import java.util.Set + +abstract class BenchmarkLanguage { + + val Set models + + new(Set models) { + this.models = models + } + + def getModels() { + return models + } + + def getJavaTraceRootName() { + "SpecificTraceImpl" + } + + def String getEntryPoint() + + def String getLanguageName() + + def String getFolderName() + + def String getInitializationMethod() + +} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/memory/HeapDump.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/memory/HeapDump.java similarity index 98% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/memory/HeapDump.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/memory/HeapDump.java index 9c25de8d2..f29073a90 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/src/fr/inria/diverse/trace/benchmark/memory/HeapDump.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/memory/HeapDump.java @@ -8,7 +8,7 @@ * Contributors: * Erwan Bousse - initial API and implementation ******************************************************************************/ -package fr.inria.diverse.trace.benchmark.memory; +package org.eclipse.gemoc.trace.benchmark.memory; import javax.management.MBeanServer; diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/memory/MemoryAnalyzer.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/memory/MemoryAnalyzer.java new file mode 100644 index 000000000..7b59ff838 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/memory/MemoryAnalyzer.java @@ -0,0 +1,214 @@ +/******************************************************************************* + * Copyright (c) 2014 Université de Rennes 1. + * 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: + * Erwan Bousse - initial API and implementation + ******************************************************************************/ +package org.eclipse.gemoc.trace.benchmark.memory; + +import java.io.File; +import java.lang.management.ManagementFactory; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.eclipse.mat.SnapshotException; +import org.eclipse.mat.internal.acquire.HeapDumpProviderRegistry; +import org.eclipse.mat.query.IResultTable; +import org.eclipse.mat.snapshot.IOQLQuery; +import org.eclipse.mat.snapshot.ISnapshot; +import org.eclipse.mat.snapshot.OQLParseException; +import org.eclipse.mat.snapshot.SnapshotFactory; +import org.eclipse.mat.snapshot.acquire.IHeapDumpProvider; +import org.eclipse.mat.snapshot.acquire.VmInfo; +import org.eclipse.mat.snapshot.model.IClass; +import org.eclipse.mat.util.IProgressListener; +import org.eclipse.mat.util.VoidProgressListener; + +@SuppressWarnings("restriction") +public class MemoryAnalyzer { + + public static final IProgressListener progressListener = new VoidProgressListener(); + + public static class QueryResult { + public int nbElements; + public long memorySum; + } + + public ISnapshot snapshot; + + public MemoryAnalyzer(File dumpFile) { + try { + snapshot = SnapshotFactory.openSnapshot(dumpFile, new HashMap(), progressListener); + } catch (SnapshotException e) { + System.err.println("Error while parsing dump!"); + e.printStackTrace(); + throw new RuntimeException(e); + } + assert (snapshot != null); + } + + public QueryResult computeRetainedSizeWithOQLQuery(String queryWith, String queryWithout) throws Exception { + List queryWithList = Arrays.asList(queryWith); + List queryWithoutList = Arrays.asList(queryWith); + return computeRetainedSizeWithOQLQuery(queryWithList, queryWithoutList); + + } + + private Object executeQuery( String q) throws Exception { + IOQLQuery queryWithObj = SnapshotFactory.createQuery(q); + return queryWithObj.execute(snapshot, new VoidProgressListener()); + } + + private Set arrayToSet(int[] array) { + return Arrays.stream(array).boxed().collect(Collectors.toSet()); + } + + private int[] setToArray(Set set) { + return set.stream().mapToInt(Integer::intValue).toArray(); + } + + public QueryResult computeRetainedSizeWithOQLQuery(List queryWith, List queryWithout) + throws Exception { + QueryResult res = new QueryResult(); + + List resultsWith = new ArrayList(); + List resultsWithout = new ArrayList(); + + for (String q : queryWith) { + Object r = executeQuery(q); + if (r != null) { + resultsWith.add((int[]) r); + } + } + + for (String q : queryWithout) { + Object r = executeQuery(q); + if (r != null) { + resultsWithout.add((int[]) r); + } + } + + Set allResults_set = new HashSet(); + + // Note: could probably be replaced efficiently by: + // select * from union ( select * from ) + for (int[] resultWith : resultsWith) { + allResults_set.addAll(arrayToSet(resultWith)); + } + for (int[] resultWithout : resultsWithout) { + allResults_set.removeAll(arrayToSet(resultWithout)); + } + + int[] retainedSet = snapshot.getRetainedSet(setToArray(allResults_set), progressListener); + long heapSizeOfRetainedSet = snapshot.getHeapSize(retainedSet); + res.memorySum = heapSizeOfRetainedSet; + + return res; + } + + public QueryResult computeRetainedSizeWithOQLQuery(String query) throws Exception { + // We open the dump with Eclipse Memory Analyzer, and obtain a snapshot + // object + QueryResult res = new QueryResult(); + try { + IOQLQuery queryObj = SnapshotFactory.createQuery(query); + Object result = queryObj.execute(snapshot, new VoidProgressListener()); + + // System.out.println("OQL result: " + result); + // System.out.println("OQL class: " + + // result.getClass().getCanonicalName()); + + // Case list of amounts + if (result instanceof IOQLQuery.Result) { + IResultTable castResult2 = (IResultTable) result; + int sum = 0; + for (int i = 0; i < castResult2.getRowCount(); i++) { + sum += (long) castResult2.getColumnValue(i, 0); + } + res.memorySum = sum; + res.nbElements = castResult2.getRowCount(); + } + // Case list of objects + else if (result instanceof int[]) { + int[] castResult = (int[]) result; + res.nbElements = castResult.length; + int[] retainedSet = snapshot.getRetainedSet(castResult, progressListener); + long heapSizeOfRetainedSet = snapshot.getHeapSize(retainedSet); + res.memorySum = heapSizeOfRetainedSet; + } + + } catch (OQLParseException e) { + String message = "Error: parsing of the OQL query failed. " + e.getMessage() + "."; + throw new Exception(message, e); + } catch (SnapshotException e) { + String message = "Error while computing memory consumption! " + e.getMessage(); + throw new Exception(message, e); + } + return res; + } + + public int computeRetainedSizeOfClass(String className) { + + // We open the dump with Eclipse Memory Analyzer, and obtain a snapshot + // object + int sum = 0; + try { + // First we look for the class in the dump file + Collection foundClasses = snapshot.getClassesByName(className, false); + if (foundClasses == null) { + System.out.println("Warning: class " + className + " not found."); + } else { + // There can be multiple times the same class in weird + // situations + if (foundClasses.size() > 1) { + System.out.println("Warning: multiple classes with name " + className + "."); + } + // For each class occurrence with this name found + for (IClass foundClass : foundClasses) { + // This is where the calculation is done. + sum += foundClass.getRetainedHeapSizeOfObjects(true, false, null); + } + } + + } catch (SnapshotException e) { + System.err.println("Error while computing memory consumption!"); + e.printStackTrace(); + throw new RuntimeException(e); + } + return sum; + + } + + public void cleanUp() { + SnapshotFactory.dispose(snapshot); + } + + public static void dumpHeap(File dumpFile) throws SnapshotException { + + HeapDumpProviderRegistry registry = HeapDumpProviderRegistry.instance(); + IHeapDumpProvider dumpProvider = registry.getHeapDumpProvider("jmapheapdumpprovider").getHeapDumpProvider(); + List vms = dumpProvider.getAvailableVMs(progressListener); + VmInfo currentVm = null; + int pid = Integer.parseInt(ManagementFactory.getRuntimeMXBean().getName().split("@")[0]); + for (VmInfo vm : vms) { + if (vm.getPid() == pid) { + currentVm = vm; + break; + } + } + + dumpProvider.acquireDump(currentVm, dumpFile, progressListener); + + } + +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/runconf/BenchmarkRunConfiguration.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/runconf/BenchmarkRunConfiguration.xtend new file mode 100644 index 000000000..5d0bf2539 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/runconf/BenchmarkRunConfiguration.xtend @@ -0,0 +1,93 @@ +package org.eclipse.gemoc.trace.benchmark.runconf + +import org.eclipse.gemoc.trace.benchmark.languages.BenchmarkLanguage +import java.util.ArrayList +import java.util.List +import java.util.Set +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.EObject +import org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.NamedElement; +import org.eclipse.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtension +import org.eclipse.gemoc.xdsmlframework.api.extensions.engine_addon.EngineAddonSpecificationExtensionPoint + +class BenchmarkRunConfiguration implements IRunConfiguration { + + private val BenchmarkLanguage language + private val URI model + private val Set addonsToLoad + + new(URI model, BenchmarkLanguage language, Set addonsToLoad) { + this.language = language + this.model = model + this.addonsToLoad = addonsToLoad + } + + override getAnimationDelay() { + return 0; + } + + override getAnimatorURI() { + return null; + } + + override getDeadlockDetectionDepth() { + return 0; + } + + override getEngineAddonExtensions() { + val List result = new ArrayList(); + val loadedAddons = EngineAddonSpecificationExtensionPoint.getSpecifications() + for (ext : loadedAddons) { + if(addonsToLoad.contains(ext.name)) { + result.add(ext) + } + } + return result + } + + override getExecutedModelAsMelangeURI() { + getExecutedModelURI(); + } + + override getExecutedModelURI() { + model + } + + override getExecutionEntryPoint() { + language.entryPoint + } + + override getLanguageName() { + language.languageName + } + + override getMelangeQuery() { + "" + } + + override getBreakStart() { + false + } + + override getDebugModelID() { + "org.eclipse.gemoc.execution.sequential.javaengine.ui.debugModel" + } + + override getModelEntryPoint() { + val modelResource = PlainK3ExecutionEngine.loadModel(model) + modelResource.allContents + .filter(NamedElement) + .findFirst[true].name + } + + override getModelInitializationArguments() { + "" + } + + override getModelInitializationMethod() { + language.initializationMethod + } + +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/BenchmarkTracingCase.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/BenchmarkTracingCase.xtend new file mode 100644 index 000000000..f9d5e574c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/BenchmarkTracingCase.xtend @@ -0,0 +1,36 @@ +package org.eclipse.gemoc.trace.benchmark.tracingcases + +import org.eclipse.gemoc.trace.benchmark.languages.BenchmarkLanguage +import org.eclipse.gemoc.trace.benchmark.runconf.BenchmarkRunConfiguration +import org.eclipse.gemoc.trace.benchmark.utils.EngineHelper +import java.util.Set +import org.eclipse.emf.common.util.URI + +abstract class BenchmarkTracingCase { + + private val engineHelper = new EngineHelper + private val Set traceAddons + public val String traceFolder + + protected new(Set traceAddons, String traceFolder) { + this.traceAddons = traceAddons + this.traceFolder = traceFolder + } + + def long initialize(URI model, BenchmarkLanguage language) { + val runConf = new BenchmarkRunConfiguration(model, language, traceAddons) + engineHelper.removeStoppedEngines + val t = System.nanoTime + engineHelper.prepareEngine(runConf) + System.nanoTime - t + } + + def execute() { + engineHelper.execute + } + + def getSimpleName() { + "generated_traces" + } + +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/CloneBasedTracingCase.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/CloneBasedTracingCase.xtend new file mode 100644 index 000000000..a62c1b40b --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/CloneBasedTracingCase.xtend @@ -0,0 +1,8 @@ +package org.eclipse.gemoc.trace.benchmark.tracingcases + +class CloneBasedTracingCase extends BenchmarkTracingCase { + new() { + super(#{"MultiBranch Reflective Trace"}, + "/home/dorian/workspace/ModelDebugging/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/ExecutionTraceModelImpl") + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/GeneratedTracingCase.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/GeneratedTracingCase.xtend new file mode 100644 index 000000000..f145733e3 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/GeneratedTracingCase.xtend @@ -0,0 +1,9 @@ +package org.eclipse.gemoc.trace.benchmark.tracingcases + +class GeneratedTracingCase extends BenchmarkTracingCase { + new() { + super(#{"activitydiagram MultiDimensional Trace"}, + "/home/dorian/workspace/ModelDebugging/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/SpecificTraceImpl" + ) + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/GenericTracingCase.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/GenericTracingCase.xtend new file mode 100644 index 000000000..8dbc1f045 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/GenericTracingCase.xtend @@ -0,0 +1,9 @@ +package org.eclipse.gemoc.trace.benchmark.tracingcases + +class GenericTracingCase extends BenchmarkTracingCase { + new() { + super(#{"Generic MultiDimensional Trace"}, + "/home/dorian/workspace/ModelDebugging/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl" + ) + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/HybridTracingCase.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/HybridTracingCase.xtend new file mode 100644 index 000000000..b45e51848 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/HybridTracingCase.xtend @@ -0,0 +1,8 @@ +package org.eclipse.gemoc.trace.benchmark.tracingcases + +class HybridTracingCase extends BenchmarkTracingCase { + new() { + super(#{"Generic MultiDimensional Trace"}, + "/home/dorian/workspace/ModelDebugging/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/model_traces/GenericTraceImpl") + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/NoTracingCase.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/NoTracingCase.xtend new file mode 100644 index 000000000..243596344 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/tracingcases/NoTracingCase.xtend @@ -0,0 +1,7 @@ +package org.eclipse.gemoc.trace.benchmark.tracingcases + +class NoTracingCase extends BenchmarkTracingCase { + new() { + super(#{},"") + } +} \ No newline at end of file diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/BenchmarkExecutionModelContext.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/BenchmarkExecutionModelContext.xtend new file mode 100644 index 000000000..fff4ef2b2 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/BenchmarkExecutionModelContext.xtend @@ -0,0 +1,14 @@ +package org.eclipse.gemoc.trace.benchmark.utils + +import org.eclipse.gemoc.execution.sequential.javaengine.SequentialModelExecutionContext +import org.eclipse.gemoc.executionframework.engine.commons.EngineContextException +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode +import org.eclipse.gemoc.xdsmlframework.api.core.IRunConfiguration + +class BenchmarkExecutionModelContext extends SequentialModelExecutionContext { + + new(IRunConfiguration runConfiguration) throws EngineContextException { + super(runConfiguration, ExecutionMode.Run) + } + +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/BenchmarkHelpers.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/BenchmarkHelpers.xtend new file mode 100644 index 000000000..c3d44a0d7 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/BenchmarkHelpers.xtend @@ -0,0 +1,156 @@ +package org.eclipse.gemoc.trace.benchmark.utils + +import java.io.IOException +import java.io.PrintStream +import java.io.OutputStream +import java.util.Locale +import java.io.File +import java.io.FileInputStream +import org.eclipse.core.resources.IFolder +import org.eclipse.core.resources.IResource +import org.eclipse.core.resources.IProject +import org.eclipse.core.runtime.IProgressMonitor +import org.eclipse.emf.transaction.util.TransactionUtil +import org.eclipse.emf.transaction.RecordingCommand +import org.eclipse.emf.ecore.resource.ResourceSet +import java.util.HashMap +import java.util.Map +import java.util.Collection +import java.util.ArrayList +import java.util.List + +class BenchmarkHelpers { + + public static def void copyFileInWS(File file, IFolder destination, IProgressMonitor m) { + val fileInProject = destination.getFile(file.name) + if (!fileInProject.exists) + fileInProject.create(new FileInputStream(file), true, m); + } + + public static def IFolder copyFolderInWS(File folder, IResource destination, IProgressMonitor m) { + val folderCopy = if (destination instanceof IProject) { + destination.getFolder(folder.name) + } else if (destination instanceof IFolder) { + destination.getFolder(folder.name) + } else + null + + if (!folderCopy.exists) + folderCopy.create(true, true, m) + for (File f : folder.listFiles) { + if (f.isFile) { + copyFileInWS(f, folderCopy, m) + } else if (f.isDirectory) { + copyFolderInWS(f, folderCopy, m) + } + } + return folderCopy + } + + public static def createEmptyPrintStream() { + val emptyOutStream = new OutputStream() { + override write(int b) throws IOException {} + } + + val emptyPrintStream = new PrintStream(emptyOutStream) { + override flush() {} + + override close() {} + + override write(int b) {} + + override write(byte[] b) {} + + override write(byte[] buf, int off, int len) {} + + override print(boolean b) {} + + override print(char c) {} + + override print(int i) {} + + override print(long l) {} + + override print(float f) {} + + override print(double d) {} + + override print(char[] s) {} + + override print(String s) {} + + override print(Object obj) {} + + override println() {} + + override println(boolean x) {} + + override println(char x) {} + + override println(int x) {} + + override println(long x) {} + + override println(float x) {} + + override println(double x) {} + + override println(char[] x) {} + + override println(String x) {} + + override println(Object x) {} + + override printf(String format, Object... args) { return this; } + + override printf(Locale l, String format, Object... args) { return this; } + + override format(String format, Object... args) { return this; } + + override format(Locale l, String format, Object... args) { return this; } + + override append(CharSequence csq) { return this; } + + override append(CharSequence csq, int start, int end) { return this; } + + override append(char c) { return this; } + + } + return emptyPrintStream + } + + public static def void clearResourceSet(ResourceSet rs) { + val ed = TransactionUtil.getEditingDomain(rs) + // Clean resource + val command = new RecordingCommand(ed, "Clean resources") { + override protected doExecute() { + for (c : rs.allContents.toSet) + c.eAdapters.clear + for (r : rs.resources) { + r.eAdapters.clear + } + rs.eAdapters.clear + } + } + ed.commandStack.execute(command) + } + + public static def > Map mergeMaps(Map... maps) { + val result = new HashMap() + for (m : maps) { + for (k : m.keySet) { + if (result.containsKey(k)) { + val Collection value = result.get(k) + val Collection test = m.get(k) + value.addAll(test) + } else { + val List value = new ArrayList + value.addAll(m.get(k)) + result.put(k, value as V) + } + } + + } + return result + } +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/CSVHelper.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/CSVHelper.xtend new file mode 100644 index 000000000..8cb06503c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/CSVHelper.xtend @@ -0,0 +1,51 @@ +package org.eclipse.gemoc.trace.benchmark.utils + +import java.util.List +import java.util.ArrayList + +class CSVHelper { + + public List> addStateExecutionTimes = new ArrayList + public List> restoreStateExecutionTimes = new ArrayList + public List totalExecutionTimes = new ArrayList + public List initializationTimes = new ArrayList + public Long memoryFootprint = 0L + + public def exportAddStateExecutionTimes() { + val List result = new ArrayList + val maxSize = addStateExecutionTimes.maxBy[l|l.size].size + for (var i = 0; i < maxSize; i++) { + val List line = new ArrayList + for (List l : addStateExecutionTimes) { + line.add(if (i < l.size) l.get(i) else -1L) + } + result.add(line.map[t|if(t == -1L) "" else (t/1000000.0)].join(",")) + } + return result.join("\n") + } + + public def exportRestoreStateExecutionTimes() { + val List result = new ArrayList + val maxSize = restoreStateExecutionTimes.maxBy[l|l.size].size + for (var i = 0; i < maxSize; i++) { + val List line = new ArrayList + for (List l : restoreStateExecutionTimes) { + line.add(if (i < l.size) l.get(i) else -1L) + } + result.add(line.map[t|if(t == -1L) "" else (t/1000000.0)].join(",")) + } + return result.join("\n") + } + + public def exportExecutionTimes() { + totalExecutionTimes.map[t|t/1000000.0].join("\n") + } + + public def exportInitializationTimes() { + initializationTimes.map[t|t/1000000.0].join("\n") + } + + public def exportMemoryFootprint() { + memoryFootprint + } +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/CSVLine.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/CSVLine.xtend new file mode 100644 index 000000000..21fbe17e3 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/CSVLine.xtend @@ -0,0 +1,37 @@ +package org.eclipse.gemoc.trace.benchmark.utils + +import java.util.List +import java.util.ArrayList + +//model_size,nbMut,timeStep,traceSize,traceMemoryFootprint,meanJumpTime,allJumpTimes +class CSVLine { + + public String languageName = "" + public String traceMetamodel = "" + public String modelName = "" + public String inputName = "" + public Integer modelID = -1 + public Long timeExe = new Long(0) + public List timeWarms = new ArrayList() + public List timeExes = new ArrayList() + public Integer traceNbStates = 0 + public Long traceMemoryFootprint = new Long(0) + public Integer nbWarmups = -1 + public Integer nbMeasurements = -1 + + private static val separator = ";"; + + private static def getAllFields() { + CSVLine.declaredFields.filter[f|!f.name.contentEquals("separator")] + } + + def static String getColumnNames() { + val allNames = getAllFields.map[f|f.name] + return allNames.join(separator) + } + + def String customToString() { + return getAllFields.map[f|f.get(this)].join(separator) + } + +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/EngineHelper.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/EngineHelper.java new file mode 100644 index 000000000..bce1cae6a --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/EngineHelper.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * 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.trace.benchmark.utils; + +import java.util.Map.Entry; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.search.SearchMatch; +import org.eclipse.jdt.core.search.SearchRequestor; +import org.eclipse.gemoc.execution.sequential.javaengine.PlainK3ExecutionEngine; +import org.eclipse.gemoc.execution.sequential.javaengine.SequentialModelExecutionContext; +import org.eclipse.gemoc.executionframework.engine.Activator; +import org.eclipse.gemoc.executionframework.engine.commons.EngineContextException; +import org.eclipse.gemoc.xdsmlframework.api.core.ExecutionMode; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionContext; +import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; +import org.eclipse.gemoc.xdsmlframework.api.engine_addon.IEngineAddon; + +import org.eclipse.gemoc.trace.benchmark.runconf.BenchmarkRunConfiguration; +import org.eclipse.gemoc.trace.gemoc.api.IMultiDimensionalTraceAddon; + +public class EngineHelper { + + static class DefaultSearchRequestor extends SearchRequestor { + + public IType _binaryType; + + @Override + public void acceptSearchMatch(SearchMatch match) throws CoreException { + _binaryType = (IType) match.getElement(); + System.out.println(match.getElement()); + } + } + + private PlainK3ExecutionEngine _executionEngine; + + // Parameter to create execution engine + private IExecutionContext executionContext; + + public void prepareEngine(BenchmarkRunConfiguration runConf) throws CoreException, EngineContextException { + ExecutionMode executionMode = ExecutionMode.Run; + executionContext = new SequentialModelExecutionContext(runConf, executionMode); + executionContext.initializeResourceModel(); + _executionEngine = new PlainK3ExecutionEngine(); + _executionEngine.initialize(executionContext); + _executionEngine.stopOnAddonError = true; + } + + public void execute() { + _executionEngine.start(); + _executionEngine.joinThread(); + } + + public IMultiDimensionalTraceAddon getEngineAddon() { + return _executionEngine.getAddon(IMultiDimensionalTraceAddon.class); + } + + public Resource getModel() { + return _executionEngine.getExecutionContext().getResourceModel(); + } + + public void removeStoppedEngines() { + for (Entry engineEntry : Activator.getDefault().gemocRunningEngineRegistry.getRunningEngines().entrySet()) { + switch (engineEntry.getValue().getRunningStatus()) { + case Stopped: + Activator.getDefault().gemocRunningEngineRegistry.unregisterEngine(engineEntry.getKey()); + break; + default: + } + } + } + + public void clearCommandStackAndAdapters() { + TransactionUtil.getEditingDomain(executionContext.getResourceModel()).getCommandStack().flush(); + executionContext.getResourceModel().eAdapters().clear(); + executionContext.getResourceModel().unload(); + } +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/MemoryCSVHelper.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/MemoryCSVHelper.xtend new file mode 100644 index 000000000..21ad421d9 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/MemoryCSVHelper.xtend @@ -0,0 +1,36 @@ +package org.eclipse.gemoc.trace.benchmark.utils + +import java.util.HashMap +import java.util.List +import java.util.Map +import java.util.ArrayList + +class MemoryCSVHelper { + + public val Map> memoryFootprints = new HashMap + public val Map> numberOfStates = new HashMap + public val List traceTypes = new ArrayList + + public def exportLines() { + val List> mem = new ArrayList + val List> states = new ArrayList + val lines = new ArrayList + var header = "" + for (String traceType : traceTypes) { + mem.add(memoryFootprints.get(traceType)) + states.add(numberOfStates.get(traceType)) + header += traceType + "Memory," + traceType + "States," + } + header = header.substring(0,header.length-1) + lines.add(header) + for (var i = 0; i < mem.head.size; i++) { + var s = "" + for (var j = 0; j < traceTypes.size; j++) { + s += mem.get(j).get(i) + "," + states.get(j).get(i) + "," + } + s = s.substring(0,s.length-1) + lines.add(s) + } + return lines.join("\n") + } +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/PDETestListener.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/PDETestListener.java new file mode 100644 index 000000000..6fc745b59 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/PDETestListener.java @@ -0,0 +1,137 @@ +package org.eclipse.gemoc.trace.benchmark.utils; + +import java.io.File; + +import org.eclipse.jdt.internal.junit.model.ITestRunListener2; + +import junit.framework.TestCase; +import junit.framework.TestResult; + +@SuppressWarnings("restriction") +public class PDETestListener implements ITestRunListener2 { + private Object resultsCollector; + private int totalNumberOfTests; + private int testsRunCount; + private int numberOfTestsPassed; + private int numberOfTestsFailed; + private int numberOfTestsWithError; + private boolean testRunEnded = false; + private File outputFile; + private String suiteName; + + public PDETestListener(Object collector, String suite) { + resultsCollector = collector; + suiteName = suite; + } + + public void setOutputFile(String filename) { + outputFile = new File(filename); + } + + public File getOutputFile() { + if (outputFile == null) { + setOutputFile("TEST-" + suiteName + ".xml"); + } + return outputFile; + } + + public boolean failed() { + return ((numberOfTestsFailed + numberOfTestsWithError) > 0) || (testRunEnded && (testsRunCount == 0)); + } + + public int count() { + return testsRunCount; + } + + public synchronized void testRunStarted(int testCount) { + totalNumberOfTests = testCount; + testsRunCount = 0; + numberOfTestsPassed = 0; + numberOfTestsFailed = 0; + numberOfTestsWithError = 0; + testRunEnded = false; + System.out.println("PDE Test Run Started - running " + totalNumberOfTests + " tests ..."); + } + + public synchronized void testRunEnded(long elapsedTime) { + testRunEnded = true; + System.out.println("Test Run Ended - " + (failed() ? "FAILED" : "PASSED") + " - Total: " + totalNumberOfTests + + " (Errors: " + numberOfTestsWithError + ", Failed: " + numberOfTestsFailed + ", Passed: " + + numberOfTestsPassed + "), duration " + elapsedTime + "ms."); + + synchronized (resultsCollector) { + resultsCollector.notifyAll(); + } + } + + public synchronized void testRunStopped(long elapsedTime) { + System.out.println("Test Run Stopped"); + testRunEnded(elapsedTime); + } + + public synchronized void testRunTerminated() { + System.out.println("Test Run Terminated"); + testRunEnded(0); + } + + public synchronized void testStarted(String testId, String testName) { + testsRunCount++; + new WrapperTestCase(testName); + System.out.println(" Test Started - " + count() + " - " + testName); + } + + public synchronized void testEnded(String testId, String testName) { + numberOfTestsPassed = count() - (numberOfTestsFailed + numberOfTestsWithError); + System.out.println(" Test Ended - " + count() + " - " + testName); + } + + public synchronized void testFailed(int status, String testId, String testName, String trace, String expected, + String actual) { + String statusMessage = String.valueOf(status); + if (status == ITestRunListener2.STATUS_OK) { + numberOfTestsPassed++; + statusMessage = "OK"; + } else if (status == ITestRunListener2.STATUS_FAILURE) { + numberOfTestsFailed++; + statusMessage = "FAILED"; + } else if (status == ITestRunListener2.STATUS_ERROR) { + numberOfTestsWithError++; + statusMessage = "ERROR"; + } + System.out.println(" Test Failed - " + count() + " - " + testName + " - status: " + statusMessage + + ", trace: " + trace + ", expected: " + expected + ", actual: " + actual); + } + + public synchronized void testReran(String testId, String testClass, String testName, int status, String trace, + String expected, String actual) { + String statusMessage = String.valueOf(status); + if (status == ITestRunListener2.STATUS_OK) { + statusMessage = "OK"; + } else if (status == ITestRunListener2.STATUS_FAILURE) { + statusMessage = "FAILED"; + } else if (status == ITestRunListener2.STATUS_ERROR) { + statusMessage = "ERROR"; + } + + System.out.println(" Test ReRan - " + testName + " - test class: " + testClass + ", status: " + statusMessage + + ", trace: " + trace + ", expected: " + expected + ", actual: " + actual); + } + + public synchronized void testTreeEntry(String description) { + System.out.println("Test Tree Entry - Description: " + description); + } + + class WrapperTestCase extends TestCase { + + public WrapperTestCase(String name) { + super(name); + } + + public int countTestCases() { + return 1; + } + + public void run(TestResult result) { + } + } +} diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/PDETestResultsCollector.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/PDETestResultsCollector.java new file mode 100644 index 000000000..68ecec13a --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/src/org/eclipse/gemoc/trace/benchmark/utils/PDETestResultsCollector.java @@ -0,0 +1,41 @@ +package org.eclipse.gemoc.trace.benchmark.utils; + +import org.eclipse.jdt.internal.junit.model.ITestRunListener2; +import org.eclipse.jdt.internal.junit.model.RemoteTestRunnerClient; + +@SuppressWarnings("restriction") +public final class PDETestResultsCollector { + private static PDETestListener pdeTestListener; + + private String suiteName; + + public PDETestResultsCollector(String suite) { + suiteName = suite; + } + + public void run(int port) throws InterruptedException { + pdeTestListener = new PDETestListener(this, suiteName); + new RemoteTestRunnerClient().startListening(new ITestRunListener2[] { pdeTestListener }, port); + System.out.println("Listening on port " + port + " for test suite " + suiteName + " results ..."); + synchronized (this) { + wait(); + } + } + + public static void main(String[] args) { + if (args.length != 2) { + System.out.println("usage: PDETestResultsCollector "); + System.exit(0); + } + + try { + new PDETestResultsCollector(args[0]).run(Integer.parseInt(args[1])); + } catch (Throwable th) { + th.printStackTrace(); + } + + if (pdeTestListener != null && pdeTestListener.failed()) { + System.exit(1); + } + } +} diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/.classpath similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/.classpath rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/.classpath diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/.project similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/.project rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/.project diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/META-INF/MANIFEST.MF new file mode 100644 index 000000000..bda2f9706 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Moliz-models +Bundle-SymbolicName: moliz-models +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: moliz_models.Activator +Require-Bundle: org.eclipse.core.runtime, + org.modelexecution.operationalsemantics.gemoc.sequential.dynamic;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/about.html similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/about.html diff --git a/trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/build.properties similarity index 100% rename from trace/commons/plugins/fr.inria.diverse.trace.gemoc.api/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/build.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_1.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_1.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_1.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_1.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_2.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_2.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_2.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_2.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_3.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_3.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_3.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_3.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_4.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_4.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_4.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_4.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_5.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_5.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_5.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_5.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_6.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_6.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_6.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-1_6.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_1.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_1.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_1.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_1.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_2.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_2.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_2.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_2.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_3.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_3.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_3.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_3.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_4.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_4.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_4.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_4.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_5.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_5.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_5.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_5.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_6.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_6.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_6.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/2557-2_6.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_1.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_1.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_1.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_1.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_2.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_2.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_2.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_2.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_3.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_3.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_3.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-1_3.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_1.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_1.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_1.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_1.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_2.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_2.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_2.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_2.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_3.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_3.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_3.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/3561-2_3.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_false_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_false_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_false_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_false_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_false_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_false_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_false_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_false_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_true_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_true_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_true_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_true_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_true_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_true_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_true_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV1_true_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_false_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_false_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_false_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_false_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_false_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_false_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_false_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_false_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_true_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_true_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_true_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_true_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_true_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_true_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_true_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV2_true_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_false_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_false_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_false_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_false_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_false_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_false_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_false_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_false_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_true_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_true_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_true_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_true_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_true_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_true_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_true_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_false_true_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_false_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_false_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_false_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_false_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_false_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_false_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_false_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_false_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_true_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_true_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_true_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_true_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_true_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_true_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_true_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/ExampleBV3_true_true_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV1_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV1_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV1_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV1_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV1_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV1_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV1_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV1_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV2_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV2_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV2_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV2_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV2_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV2_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV2_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV2_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV3_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV3_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV3_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV3_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV3_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV3_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV3_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV3_true.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV4_false.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV4_false.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV4_false.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV4_false.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV4_true.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV4_true.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV4_true.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/hireV4_true.xmi diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-1.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-1.xmi new file mode 100644 index 000000000..b22d7d787 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-1.xmi @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-2.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-2.xmi similarity index 99% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-2.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-2.xmi index c1e6b773a..98b2d8c13 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-2.xmi +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/2557-2.xmi @@ -159,6 +159,6 @@ name="i equals 1"/> - diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/3561-1.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/3561-1.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/3561-1.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/3561-1.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/3561-2.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/3561-2.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/3561-2.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/3561-2.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV1.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV1.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV1.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV1.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV2.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV2.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV2.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV2.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV3.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV3.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV3.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/ExampleBV3.xmi diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV1.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV1.xmi new file mode 100644 index 000000000..d2a011b4c --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV1.xmi @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV2.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV2.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV2.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV2.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV3.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV3.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV3.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV3.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV4.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV4.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV4.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.benchmark/workspace-benchmark/benchmark-models/model/originals/hireV4.xmi diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/.classpath rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/.classpath diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/.gitignore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/.gitignore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/.gitignore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/.gitignore diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/.project new file mode 100644 index 000000000..61d7e841b --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.commons.testutil + + + + + + 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/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/META-INF/MANIFEST.MF new file mode 100644 index 000000000..fddbb4665 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.trace.commons.test +Bundle-SymbolicName: org.eclipse.gemoc.trace.commons.testutil +Bundle-Version: 2.3.0.qualifier +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.core.runtime;bundle-version="3.10.0", + org.eclipse.ui, + org.eclipse.emf.ecore;bundle-version="2.10.2" +Export-Package: org.eclipse.gemoc.trace.commons.testutil +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 + diff --git a/trace/generator/releng/org.gemoc.modeldebugging.trace.generator.updatesite/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/about.html similarity index 100% rename from trace/generator/releng/org.gemoc.modeldebugging.trace.generator.updatesite/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/about.html diff --git a/trace/generator/plugins/fr.inria.diverse.trace.gemoc/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/build.properties similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.gemoc/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/build.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/src/fr/inria/diverse/trace/commons/testutil/EclipseTestUtil.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/src/org/eclipse/gemoc/trace/commons/testutil/EclipseTestUtil.xtend similarity index 97% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/src/fr/inria/diverse/trace/commons/testutil/EclipseTestUtil.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/src/org/eclipse/gemoc/trace/commons/testutil/EclipseTestUtil.xtend index 016fa2c77..7a947407d 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/src/fr/inria/diverse/trace/commons/testutil/EclipseTestUtil.xtend +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/src/org/eclipse/gemoc/trace/commons/testutil/EclipseTestUtil.xtend @@ -1,4 +1,4 @@ -package fr.inria.diverse.trace.commons.testutil +package org.eclipse.gemoc.trace.commons.testutil import org.eclipse.core.runtime.jobs.Job import org.eclipse.swt.widgets.Display diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/src/fr/inria/diverse/trace/commons/testutil/Investigation.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/src/org/eclipse/gemoc/trace/commons/testutil/Investigation.xtend similarity index 99% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/src/fr/inria/diverse/trace/commons/testutil/Investigation.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/src/org/eclipse/gemoc/trace/commons/testutil/Investigation.xtend index 589bddd30..872b6106e 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/src/fr/inria/diverse/trace/commons/testutil/Investigation.xtend +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.commons.testutil/src/org/eclipse/gemoc/trace/commons/testutil/Investigation.xtend @@ -1,4 +1,4 @@ -package fr.inria.diverse.trace.commons.testutil +package org.eclipse.gemoc.trace.commons.testutil import java.util.Collection import java.util.HashSet diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.classpath similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/.classpath rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.classpath diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.gitignore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.gitignore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.gitignore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.gitignore diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.project new file mode 100644 index 000000000..ab55f23ab --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.gemoc.generator.test + + + + + + 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/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.settings/org.eclipse.core.resources.prefs b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.settings/org.eclipse.core.resources.prefs rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/.settings/org.eclipse.core.resources.prefs diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/META-INF/MANIFEST.MF new file mode 100644 index 000000000..ea7171b62 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.trace.gemoc.generator.test +Bundle-SymbolicName: org.eclipse.gemoc.trace.gemoc.generator.test +Bundle-Version: 2.3.0.qualifier +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.gemoc.trace.gemoc.generator;bundle-version="1.0.0", + org.junit;bundle-version="4.11.0", + org.eclipse.gemoc.trace.commons.testutil;bundle-version="1.0.0", + org.eclipse.emf.common;bundle-version="2.10.1", + org.eclipse.core.resources;bundle-version="3.9.1", + org.eclipse.emf.ecore, + fr.inria.diverse.ecorext;bundle-version="0.1.0", + org.eclipse.gemoc.trace.commons;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/about.html similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/about.html diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/build.properties similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plaink3.tracematerialextractor/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/build.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/src/fr/inria/diverse/trace/gemoc/generator/test/AddonGeneratorTest.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/src/org/eclipse/gemoc/trace/gemoc/generator/test/AddonGeneratorTest.xtend similarity index 83% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/src/fr/inria/diverse/trace/gemoc/generator/test/AddonGeneratorTest.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/src/org/eclipse/gemoc/trace/gemoc/generator/test/AddonGeneratorTest.xtend index 6fe8996dc..6c2f3efe3 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/src/fr/inria/diverse/trace/gemoc/generator/test/AddonGeneratorTest.xtend +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.gemoc.generator.test/src/org/eclipse/gemoc/trace/gemoc/generator/test/AddonGeneratorTest.xtend @@ -1,16 +1,15 @@ -package fr.inria.diverse.trace.gemoc.generator.test +package org.eclipse.gemoc.trace.gemoc.generator.test import org.junit.Test -import fr.inria.diverse.trace.commons.testutil.EclipseTestUtil -import fr.inria.diverse.trace.gemoc.generator.GenericEngineTraceAddonGenerator +import org.eclipse.gemoc.trace.commons.testutil.EclipseTestUtil +import org.eclipse.gemoc.trace.gemoc.generator.GenericEngineTraceAddonGenerator import org.eclipse.emf.common.util.URI import java.util.Random import org.junit.After import org.junit.AfterClass import org.eclipse.core.resources.IProject import org.eclipse.emf.ecore.EPackage -import ecorext.Ecorext -import fr.inria.diverse.trace.commons.EMFUtil +import org.eclipse.gemoc.trace.commons.EMFUtil import org.eclipse.emf.ecore.resource.ResourceSet import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl import org.eclipse.emf.ecore.resource.Resource @@ -18,7 +17,7 @@ import java.io.IOException class AddonGeneratorTest { - static val String root = "platform:/plugin/fr.inria.diverse.trace.plugin.generator.test/inputs/" + static val String root = "platform:/plugin/org.eclipse.gemoc.trace.plugin.generator.test/inputs/" @Test def void testPetrinet() throws IOException { @@ -33,7 +32,7 @@ class AddonGeneratorTest { var IProject currentProject def void genericTest(String name) throws IOException { - + /* val abstractSyntaxEcoreURI = URI.createURI(root + name + ".ecore") val executionEcorExtURI = URI.createURI(root + name + "ext.xmi") val eventsMetamodelURI = URI.createURI(root + name + "events.ecore") @@ -51,6 +50,7 @@ class AddonGeneratorTest { "awesomeProject" + new Random().nextInt(100)) gen.generateCompleteAddon currentProject = gen.project + */ } diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/.classpath similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/.classpath rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/.classpath diff --git a/trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/.gitignore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/.gitignore similarity index 100% rename from trace/manager/plugins/org.gemoc.sequential_addons.multidimensional.timeline/.gitignore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/.gitignore diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/.project new file mode 100644 index 000000000..4f38177a9 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.metamodel.generator.test + + + + + + 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/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/META-INF/MANIFEST.MF new file mode 100644 index 000000000..7857c8722 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Test +Bundle-SymbolicName: org.eclipse.gemoc.trace.metamodel.generator.test +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore;bundle-version="2.10.1", + org.junit;bundle-version="4.11.0", + org.eclipse.gemoc.trace.metamodel.generator;bundle-version="1.0.0", + org.eclipse.core.runtime;bundle-version="3.9.100", + org.eclipse.gemoc.trace.commons;bundle-version="1.0.0" + diff --git a/trace/manager/releng/org.gemoc.modeldebugging.trace.manager.feature/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/about.html similarity index 100% rename from trace/manager/releng/org.gemoc.modeldebugging.trace.manager.feature/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/about.html diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/build.properties similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/build.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/activitydiagram.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/activitydiagram.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/activitydiagram.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/activitydiagram.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/activitydiagramext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/activitydiagramext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/activitydiagramext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/activitydiagramext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/fumlext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/fumlext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/fumlext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/fumlext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/model1.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/model1.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/model1.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/model1.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/model1ext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/model1ext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/model1ext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/model1ext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/model2.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/model2.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/model2.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/model2.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/model2ext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/model2ext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/model2ext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/model2ext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/petrinet.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/petrinet.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/petrinet.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/petrinet.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/petrinetext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/petrinetext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs/petrinetext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs/petrinetext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/activitydiagram.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/activitydiagram.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/activitydiagram.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/activitydiagram.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/activitydiagram.xmof b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/activitydiagram.xmof similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/activitydiagram.xmof rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/activitydiagram.xmof diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/activitydiagramext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/activitydiagramext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/activitydiagramext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/activitydiagramext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/fumlext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/fumlext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/fumlext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/fumlext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model1.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model1.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model1.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model1.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model1.xmof b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model1.xmof similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model1.xmof rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model1.xmof diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model1ext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model1ext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model1ext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model1ext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model2.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model2.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model2.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model2.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model2.xmof b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model2.xmof similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model2.xmof rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model2.xmof diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model2ext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model2ext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/model2ext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/model2ext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/petrinet.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/petrinet.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/petrinet.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/petrinet.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/petrinet.xmof b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/petrinet.xmof similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/petrinet.xmof rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/petrinet.xmof diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/petrinetext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/petrinetext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/model_inputs_xmof/petrinetext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/model_inputs_xmof/petrinetext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/src/fr/inria/diverse/trace/metamodel/test/TraceMMGeneratorTest.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/src/org/eclipse/gemoc/trace/metamodel/test/TraceMMGeneratorTest.xtend similarity index 93% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/src/fr/inria/diverse/trace/metamodel/test/TraceMMGeneratorTest.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/src/org/eclipse/gemoc/trace/metamodel/test/TraceMMGeneratorTest.xtend index b656c54a3..b82157a6b 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.metamodel.generator.test/src/fr/inria/diverse/trace/metamodel/test/TraceMMGeneratorTest.xtend +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/src/org/eclipse/gemoc/trace/metamodel/test/TraceMMGeneratorTest.xtend @@ -1,8 +1,7 @@ -package fr.inria.diverse.trace.metamodel.test +package org.eclipse.gemoc.trace.metamodel.test -import ecorext.Ecorext -import fr.inria.diverse.trace.commons.EMFUtil -import fr.inria.diverse.trace.metamodel.generator.TraceMMGenerator +import org.eclipse.gemoc.trace.commons.EMFUtil +import org.eclipse.gemoc.trace.metamodel.generator.TraceMMGenerator import java.io.File import org.eclipse.emf.common.util.Diagnostic import org.eclipse.emf.ecore.EClass @@ -76,7 +75,7 @@ class TraceMMGeneratorTest { } def void genericTest(String name, String nsURI) { - + /* println("Testing with input: " + name) var EPackage ecore @@ -107,7 +106,7 @@ class TraceMMGeneratorTest { val results = Diagnostician.INSTANCE.validate(stuff.tracemmresult); val error = results.children.findFirst[r|r.severity == Diagnostic.ERROR] assertFalse("There is at least one error in the generated ecore model: " + error, error != null) - + */ } } diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/src/org/eclipse/gemoc/trace/metamodel/test/XMOFTraceMMGeneratorTest.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/src/org/eclipse/gemoc/trace/metamodel/test/XMOFTraceMMGeneratorTest.xtend new file mode 100644 index 000000000..dfb99fe31 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.metamodel.generator.test/src/org/eclipse/gemoc/trace/metamodel/test/XMOFTraceMMGeneratorTest.xtend @@ -0,0 +1,16 @@ +package org.eclipse.gemoc.trace.metamodel.test + +import org.eclipse.gemoc.trace.metamodel.test.TraceMMGeneratorTest +import java.io.File + +class XMOFTraceMMGeneratorTest extends TraceMMGeneratorTest { + + override protected getMMExtension() { + return "xmof" + } + + override protected getInputFolder() { + return new File("model_inputs_xmof") + } + +} \ No newline at end of file diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/.classpath similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/.classpath rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/.classpath diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/.gitignore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/.gitignore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/.gitignore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/.gitignore diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/.project new file mode 100644 index 000000000..51c5118eb --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test + + + + + + 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/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/META-INF/MANIFEST.MF new file mode 100644 index 000000000..421071ba3 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/META-INF/MANIFEST.MF @@ -0,0 +1,26 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test +Bundle-SymbolicName: org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test +Bundle-Version: 2.3.0.qualifier +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.junit;bundle-version="4.11.0", + org.eclipse.gemoc.trace.plaink3.tracematerialextractor;bundle-version="1.0.0", + org.eclipse.gemoc.trace.commons;bundle-version="1.0.0", + org.eclipse.core.runtime;bundle-version="3.10.0", + org.eclipse.core.resources;bundle-version="3.9.1", + org.eclipse.ui, + org.eclipse.gemoc.trace.commons.testutil;bundle-version="1.0.0", + org.eclipse.jdt.core;bundle-version="3.10.0", + org.eclipse.emf.ecore, + org.eclipse.emf.ecore.xmi, + org.apache.log4j, + org.eclipse.xtend.core, + com.google.inject;bundle-version="3.0.0", + fr.inria.diverse.k3.al.annotationprocessor.plugin, + org.eclipse.xtext +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/about.html similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/about.html diff --git a/trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/build.properties similarity index 100% rename from trace/generator/plugins/fr.inria.diverse.trace.plugin.generator/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/build.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/TfsmExtended.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/TfsmExtended.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/TfsmExtended.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/TfsmExtended.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.classpath similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.classpath rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.classpath diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.gitignore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.gitignore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.gitignore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.gitignore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.project similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.project rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/.project diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/META-INF/MANIFEST.MF new file mode 100644 index 000000000..de215e9f4 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/META-INF/MANIFEST.MF @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.gemoc.sample.tfsm.plaink3.dsa +Bundle-SymbolicName: org.gemoc.sample.tfsm.plaink3.dsa;singleton:=true +Bundle-Version: 2.3.0.qualifier +Require-Bundle: org.eclipse.xtend2.lib;bundle-version="2.4.3", + org.eclipse.emf.ecore;bundle-version="2.9.1";visibility:=reexport, + org.eclipse.core.runtime, + org.eclipse.core.resources, + fr.inria.diverse.commons.eclipse.messagingsystem.api;bundle-version="1.0.0", + org.eclipse.emf.transaction;bundle-version="1.8.0", + org.eclipse.emf.ecore.xmi;bundle-version="2.10.1", + org.eclipse.core.expressions;bundle-version="3.4.600", + org.eclipse.gemoc.commons.eclipse.pde;bundle-version="0.1.0", + org.eclipse.gemoc.commons.eclipse;bundle-version="0.1.0", + org.gemoc.execution.engine;bundle-version="0.1.0", + fr.inria.diverse.k3.al.annotationprocessor.plugin, + org.gemoc.sample.tfsm.plaink3.model;bundle-version="0.1.0" +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Export-Package: org.gemoc.sample.tfsm.plaink3.dsa +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/about.html similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/workspace-benchmark/benchmark-models/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/about.html diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/build.properties similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/build.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/plugin.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/plugin.properties similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/plugin.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/plugin.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/plugin.xml b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/plugin.xml similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/plugin.xml rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/plugin.xml diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/pom.xml b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/pom.xml new file mode 100644 index 000000000..e6499002e --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/pom.xml @@ -0,0 +1,20 @@ + + + + + 4.0.0 + + + org.gemoc.sample.robotml + org.gemoc.sample.robotml.root + 2.3.0-SNAPSHOT + ../../../RobotML/Language/org.gemoc.sample.robotml.root + + + org.gemoc.sample.tfsm.k3dsa + eclipse-plugin + 2.3.0-SNAPSHOT + + + diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/Main.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/Main.xtend similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/Main.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/Main.xtend diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/Visitor.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/Visitor.xtend similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/Visitor.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/Visitor.xtend diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/tfsm.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/tfsm.xtend similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/tfsm.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/inputs/org.gemoc.sample.tfsm.plaink3.dsa/src/org/gemoc/sample/tfsm/plaink3/dsa/tfsm.xtend diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/test/TestPlainK3Extractor.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/src/org/eclipse/gemoc/trace/plaink3/tracematerialextractor/test/TestPlainK3Extractor.xtend similarity index 84% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/test/TestPlainK3Extractor.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/src/org/eclipse/gemoc/trace/plaink3/tracematerialextractor/test/TestPlainK3Extractor.xtend index df259c616..5906364a6 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plaink3.tracematerialextractor.test/src/fr/inria/diverse/trace/plaink3/tracematerialextractor/test/TestPlainK3Extractor.xtend +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test/src/org/eclipse/gemoc/trace/plaink3/tracematerialextractor/test/TestPlainK3Extractor.xtend @@ -1,10 +1,10 @@ -package fr.inria.diverse.trace.plaink3.tracematerialextractor.test +package org.eclipse.gemoc.trace.plaink3.tracematerialextractor.test -import fr.inria.diverse.trace.commons.EMFUtil -import fr.inria.diverse.trace.commons.EclipseUtil -import fr.inria.diverse.trace.commons.testutil.EclipseTestUtil -import fr.inria.diverse.trace.plaink3.tracematerialextractor.EventsMetamodelGenerator -import fr.inria.diverse.trace.plaink3.tracematerialextractor.ExecutionExtensionGenerator +import org.eclipse.gemoc.trace.commons.EMFUtil +import org.eclipse.gemoc.trace.commons.EclipseUtil +import org.eclipse.gemoc.trace.commons.testutil.EclipseTestUtil +import org.eclipse.gemoc.trace.plaink3.tracematerialextractor.EventsMetamodelGenerator +import org.eclipse.gemoc.trace.plaink3.tracematerialextractor.ExecutionExtensionGenerator import java.io.File import java.io.IOException import java.lang.reflect.InvocationTargetException diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/.classpath similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/.classpath rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/.classpath diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/.gitignore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/.gitignore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/.gitignore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/.gitignore diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/.project new file mode 100644 index 000000000..9bd17db63 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/.project @@ -0,0 +1,34 @@ + + + org.eclipse.gemoc.trace.plugin.generator.test + + + + + + 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/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/META-INF/MANIFEST.MF new file mode 100644 index 000000000..9ff655cf8 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.gemoc.trace.plugin.generator.test +Bundle-SymbolicName: org.eclipse.gemoc.trace.plugin.generator.test +Bundle-Version: 2.3.0.qualifier +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.junit;bundle-version="4.11.0", + org.eclipse.gemoc.trace.gemoc.generator;bundle-version="1.0.0", + org.eclipse.core.resources;bundle-version="3.9.1", + org.eclipse.gemoc.trace.commons.testutil;bundle-version="1.0.0", + org.eclipse.emf.common;bundle-version="2.10.1", + org.eclipse.core.runtime;bundle-version="3.10.0", + org.eclipse.emf.ecore, + org.eclipse.gemoc.trace.commons;bundle-version="1.0.0", +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/about.html similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/about.html diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/build.properties similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.commons.testutil/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/build.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/petrinet.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/petrinet.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/petrinet.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/petrinet.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/petrinetevents.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/petrinetevents.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/petrinetevents.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/petrinetevents.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/petrinetext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/petrinetext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/petrinetext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/petrinetext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/tfsm.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/tfsm.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/tfsm.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/tfsm.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/tfsmevents.ecore b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/tfsmevents.ecore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/tfsmevents.ecore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/tfsmevents.ecore diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/tfsmext.xmi b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/tfsmext.xmi similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/inputs/tfsmext.xmi rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/inputs/tfsmext.xmi diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/src/fr/inria/diverse/trace/plugin/generator/test/TestTracePluginGenerator.xtend b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/src/org/eclipse/gemoc/trace/plugin/generator/test/TestTracePluginGenerator.xtend similarity index 83% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/src/fr/inria/diverse/trace/plugin/generator/test/TestTracePluginGenerator.xtend rename to trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/src/org/eclipse/gemoc/trace/plugin/generator/test/TestTracePluginGenerator.xtend index fd589790c..1514b4491 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.trace.plugin.generator.test/src/fr/inria/diverse/trace/plugin/generator/test/TestTracePluginGenerator.xtend +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.trace.plugin.generator.test/src/org/eclipse/gemoc/trace/plugin/generator/test/TestTracePluginGenerator.xtend @@ -1,10 +1,10 @@ -package fr.inria.diverse.trace.plugin.generator.test +package org.eclipse.gemoc.trace.plugin.generator.test -import fr.inria.diverse.trace.plugin.generator.GenericTracePluginGenerator +import org.eclipse.gemoc.trace.plugin.generator.GenericTracePluginGenerator import java.util.Random import org.eclipse.emf.common.util.URI import org.junit.Test -import fr.inria.diverse.trace.commons.testutil.EclipseTestUtil +import org.eclipse.gemoc.trace.commons.testutil.EclipseTestUtil import org.junit.After import org.eclipse.core.resources.IProject import org.junit.AfterClass @@ -12,15 +12,14 @@ import org.eclipse.emf.ecore.resource.ResourceSet import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl import org.eclipse.emf.ecore.resource.Resource import org.eclipse.emf.ecore.EPackage -import fr.inria.diverse.trace.commons.EMFUtil -import ecorext.Ecorext +import org.eclipse.gemoc.trace.commons.EMFUtil /** * Taken from http://www.informit.com/articles/article.aspx?p=1315271&seqNum=8 */ class TestTracePluginGenerator { - static val String root = "platform:/plugin/fr.inria.diverse.trace.plugin.generator.test/inputs/" + static val String root = "platform:/plugin/org.eclipse.gemoc.trace.plugin.generator.test/inputs/" @Test def void testPetrinet() { @@ -35,7 +34,7 @@ class TestTracePluginGenerator { var IProject currentProject def void genericTest(String name) { - + /* val abstractSyntaxEcoreURI = URI.createURI(root + name + ".ecore") val executionEcorExtURI = URI.createURI(root + name + "ext.xmi") val eventsMetamodelURI = URI.createURI(root + name + "events.ecore") @@ -53,6 +52,7 @@ class TestTracePluginGenerator { "awesomeProject" + new Random().nextInt(100)) gen.generate currentProject = gen.project + */ } diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/.classpath b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/.classpath new file mode 100644 index 000000000..eca7bdba8 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/.gitignore b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/.gitignore similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/.gitignore rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/.gitignore diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/.project b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/.project new file mode 100644 index 000000000..dfec0fea7 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/.project @@ -0,0 +1,28 @@ + + + org.eclipse.gemoc.tracemm.semdiff.eval + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/META-INF/MANIFEST.MF b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/META-INF/MANIFEST.MF new file mode 100644 index 000000000..ac02cca83 --- /dev/null +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/META-INF/MANIFEST.MF @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: TraceEvaluation +Bundle-SymbolicName: org.eclipse.gemoc.tracemm.semdiff.eval +Bundle-Version: 2.3.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.modelexecution.xmof;bundle-version="1.0.0", + org.modelexecution.xmof.vm;bundle-version="1.0.0", + org.eclipse.emf.transaction, + org.modelexecution.xmof.configuration, + org.modelexecution.xmof.states, + org.junit, + org.eclipse.emf.ecore.xmi, + org.eclipse.epsilon.ecl.engine, + org.eclipse.epsilon.common;bundle-version="1.2.0", + org.eclipse.epsilon.eol.engine;bundle-version="1.2.0", + org.eclipse.epsilon.emc.emf;bundle-version="1.2.0", + org.eclipse.uml2.uml;bundle-version="5.0.1", + org.modelexecution.xmof.diff, + org.eclipse.gemoc.tracemm.xmof.statesbuilder;bundle-version="1.0.0" diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/about.html b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/about.html similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.gemoc.generator.test/about.html rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/about.html diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/build.properties b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/build.properties similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.trace.benchmark/build.properties rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/build.properties diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/matchrules/trace_domainspecific/actionExecutionOrder.ecl b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/matchrules/trace_domainspecific/actionExecutionOrder.ecl similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/matchrules/trace_domainspecific/actionExecutionOrder.ecl rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/matchrules/trace_domainspecific/actionExecutionOrder.ecl diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/matchrules/trace_generic/actionExecutionOrder.ecl b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/matchrules/trace_generic/actionExecutionOrder.ecl similarity index 100% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/matchrules/trace_generic/actionExecutionOrder.ecl rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/matchrules/trace_generic/actionExecutionOrder.ecl diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/DomainSpecificTraceExtraction.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/DomainSpecificTraceExtraction.java similarity index 93% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/DomainSpecificTraceExtraction.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/DomainSpecificTraceExtraction.java index 43055d6e2..c170fbe8d 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/DomainSpecificTraceExtraction.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/DomainSpecificTraceExtraction.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval; +package org.eclipse.gemoc.tracemm.semdiff.eval; public class DomainSpecificTraceExtraction extends TraceExtraction { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/DomainSpecificTraceMatching.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/DomainSpecificTraceMatching.java similarity index 93% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/DomainSpecificTraceMatching.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/DomainSpecificTraceMatching.java index fc2a80d6e..d210f265a 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/DomainSpecificTraceMatching.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/DomainSpecificTraceMatching.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval; +package org.eclipse.gemoc.tracemm.semdiff.eval; public class DomainSpecificTraceMatching extends TraceMatching { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/Evaluation.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/Evaluation.java similarity index 97% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/Evaluation.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/Evaluation.java index 207cfef91..d1c24f08d 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/Evaluation.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/Evaluation.java @@ -8,14 +8,14 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval; +package org.eclipse.gemoc.tracemm.semdiff.eval; import org.junit.BeforeClass; public abstract class Evaluation { - private static final String FUML_DOMAINSPECIFIC_TRACEMETAMODEL_PATH = "platform:/plugin/fr.inria.diverse.tracemm.xmof.statesbuilder.test/model_inputs/fuml/fumltracemm.ecore"; + private static final String FUML_DOMAINSPECIFIC_TRACEMETAMODEL_PATH = "platform:/plugin/org.eclipse.gemoc.tracemm.xmof.statesbuilder.test/model_inputs/fuml/fumltracemm.ecore"; protected static final String FUML_CONFIGURATION_PATH = "platform:/plugin/org.modelexecution.xmof.examples/fuml/fuml.xmof"; protected static final String FUML_METMODEL_PATH = "http://www.eclipse.org/uml2/5.0.0/UML"; diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/GenericTraceExtraction.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/GenericTraceExtraction.java similarity index 93% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/GenericTraceExtraction.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/GenericTraceExtraction.java index 0ec0864b8..8fa70789b 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/GenericTraceExtraction.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/GenericTraceExtraction.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval; +package org.eclipse.gemoc.tracemm.semdiff.eval; public class GenericTraceExtraction extends TraceExtraction { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/GenericTraceMatching.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/GenericTraceMatching.java similarity index 93% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/GenericTraceMatching.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/GenericTraceMatching.java index 1c9ba3607..fc2ae28e8 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/GenericTraceMatching.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/GenericTraceMatching.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval; +package org.eclipse.gemoc.tracemm.semdiff.eval; public class GenericTraceMatching extends TraceMatching { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/TraceExtraction.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/TraceExtraction.java similarity index 96% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/TraceExtraction.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/TraceExtraction.java index 833f80507..a6b095c34 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/TraceExtraction.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/TraceExtraction.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval; +package org.eclipse.gemoc.tracemm.semdiff.eval; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; @@ -18,9 +18,9 @@ import org.junit.Test; import org.modelexecution.xmof.states.states.StateSystem; -import fr.inria.diverse.tracemm.semdiff.eval.internal.ModelExecutor; -import fr.inria.diverse.tracemm.semdiff.eval.internal.reporting.TraceReport; -import fr.inria.diverse.tracemm.semdiff.eval.internal.reporting.TraceReportEntry; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.ModelExecutor; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting.TraceReport; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting.TraceReportEntry; public abstract class TraceExtraction extends Evaluation { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/TraceMatching.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/TraceMatching.java similarity index 94% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/TraceMatching.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/TraceMatching.java index f63ed6e5a..502ea8286 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/TraceMatching.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/TraceMatching.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval; +package org.eclipse.gemoc.tracemm.semdiff.eval; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -17,13 +17,13 @@ import org.junit.BeforeClass; import org.junit.Test; -import fr.inria.diverse.tracemm.semdiff.eval.internal.MatchResult; -import fr.inria.diverse.tracemm.semdiff.eval.internal.TraceMatcher; -import fr.inria.diverse.tracemm.semdiff.eval.internal.TraceMatchingEvent; -import fr.inria.diverse.tracemm.semdiff.eval.internal.TraceMatchingEvent.EventType; -import fr.inria.diverse.tracemm.semdiff.eval.internal.reporting.MatchingReport; -import fr.inria.diverse.tracemm.semdiff.eval.internal.reporting.MatchingReportEntry; -import fr.inria.diverse.tracemm.semdiff.eval.internal.TraceMatchingListener; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.MatchResult; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.TraceMatcher; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.TraceMatchingEvent; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.TraceMatchingEvent.EventType; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting.MatchingReport; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting.MatchingReportEntry; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.TraceMatchingListener; public abstract class TraceMatching extends Evaluation implements TraceMatchingListener { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/CustomStatesBuilder.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/CustomStatesBuilder.java similarity index 96% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/CustomStatesBuilder.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/CustomStatesBuilder.java index e40f07212..6df060d84 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/CustomStatesBuilder.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/CustomStatesBuilder.java @@ -7,7 +7,7 @@ * Contributors: * Tanja Mayerhofer - initial API and implementation */ -package fr.inria.diverse.tracemm.semdiff.eval.internal; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal; import java.util.ArrayList; import java.util.List; diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/MatchResult.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/MatchResult.java similarity index 96% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/MatchResult.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/MatchResult.java index 05dd70a78..128496009 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/MatchResult.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/MatchResult.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal; public class MatchResult { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/ModelExecutor.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/ModelExecutor.java similarity index 97% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/ModelExecutor.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/ModelExecutor.java index eb165ec07..3de5c7e85 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/ModelExecutor.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/ModelExecutor.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal; import java.io.IOException; import java.util.ArrayList; @@ -33,8 +33,8 @@ import org.modelexecution.xmof.vm.util.EMFUtil; import org.modelexecution.xmof.vm.util.XMOFUtil; -import fr.inria.diverse.tracemm.common.ConfigurableStatesBuilder; -import fr.inria.diverse.tracemm.common.GenericStatesBuilderConfigurationDynamicEObj; +import org.eclipse.gemoc.tracemm.common.ConfigurableStatesBuilder; +import org.eclipse.gemoc.tracemm.common.GenericStatesBuilderConfigurationDynamicEObj; public class ModelExecutor { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatcher.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatcher.java similarity index 97% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatcher.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatcher.java index 00b6ab436..535d770fb 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatcher.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatcher.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal; import java.io.File; import java.io.IOException; @@ -32,7 +32,7 @@ import org.modelexecution.xmof.states.states.StatesPackage; import org.modelexecution.xmof.vm.util.EMFUtil; -import fr.inria.diverse.tracemm.semdiff.eval.internal.TraceMatchingEvent.EventType; +import org.eclipse.gemoc.tracemm.semdiff.eval.internal.TraceMatchingEvent.EventType; public class TraceMatcher { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatchingEvent.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatchingEvent.java similarity index 94% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatchingEvent.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatchingEvent.java index 8c7722437..4c233c8f8 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatchingEvent.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatchingEvent.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal; public class TraceMatchingEvent { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatchingListener.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatchingListener.java similarity index 91% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatchingListener.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatchingListener.java index 7a0136ee7..4b1550cf0 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/TraceMatchingListener.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/TraceMatchingListener.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal; public interface TraceMatchingListener { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/Util.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/Util.java similarity index 95% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/Util.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/Util.java index 3b8086f94..353c69758 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/Util.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/Util.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/MatchingReport.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/MatchingReport.java similarity index 95% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/MatchingReport.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/MatchingReport.java index ec665aa32..f8cbd02f6 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/MatchingReport.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/MatchingReport.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal.reporting; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting; public class MatchingReport extends Report { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/MatchingReportEntry.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/MatchingReportEntry.java similarity index 95% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/MatchingReportEntry.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/MatchingReportEntry.java index dfb4cab9d..8e7e53352 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/MatchingReportEntry.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/MatchingReportEntry.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal.reporting; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting; public class MatchingReportEntry extends ReportEntry { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/Report.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/Report.java similarity index 96% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/Report.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/Report.java index 40aa74d49..e3347d417 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/Report.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/Report.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal.reporting; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting; import java.io.BufferedWriter; import java.io.File; diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/ReportEntry.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/ReportEntry.java similarity index 89% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/ReportEntry.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/ReportEntry.java index 5a6812dc1..8af0c28bf 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/ReportEntry.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/ReportEntry.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal.reporting; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting; public abstract class ReportEntry { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/TraceReport.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/TraceReport.java similarity index 94% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/TraceReport.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/TraceReport.java index 46b6eb330..8174d03d8 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/TraceReport.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/TraceReport.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal.reporting; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting; public class TraceReport extends Report { diff --git a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/TraceReportEntry.java b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/TraceReportEntry.java similarity index 94% rename from trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/TraceReportEntry.java rename to trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/TraceReportEntry.java index f1e8f2024..7941386d4 100644 --- a/trace/tests_and_benchmarks/fr.inria.diverse.tracemm.semdiff.eval/src/fr/inria/diverse/tracemm/semdiff/eval/internal/reporting/TraceReportEntry.java +++ b/trace/tests_and_benchmarks/org.eclipse.gemoc.tracemm.semdiff.eval/src/org/eclipse/gemoc/tracemm/semdiff/eval/internal/reporting/TraceReportEntry.java @@ -8,7 +8,7 @@ * Contributors: * Inria - initial API and implementation *******************************************************************************/ -package fr.inria.diverse.tracemm.semdiff.eval.internal.reporting; +package org.eclipse.gemoc.tracemm.semdiff.eval.internal.reporting; public class TraceReportEntry extends ReportEntry {