Adapt the architecture to make moka possibly run headless
- Remove pointless dependency to UI and Papyrus in kernel
plugins
- Remplaced Preference with System Properties in kernel
- Added a console registration extensionpoint
- Restructured the engine hierarchy: differenciate debuggable engines
(that depends on profiling) and regular engines.
- Additional moka updates
Change-Id: If281a26f27fba29a53ac65465c0b8040e4cc2c63
Signed-off-by: Jeremie Tatibouet <jeremie.tatibouet@cea.fr>
Signed-off-by: Pauline DEVILLE <pauline.deville@cea.fr>
diff --git a/features/org.eclipse.papyrus.moka.feature/feature.xml b/features/org.eclipse.papyrus.moka.feature/feature.xml
index 4a4284a..eb96713 100644
--- a/features/org.eclipse.papyrus.moka.feature/feature.xml
+++ b/features/org.eclipse.papyrus.moka.feature/feature.xml
@@ -345,4 +345,32 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.papyrus.moka.engine.schedulable"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.moka.fuml.standardlibrary.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.moka.fuml.library"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.moka.engine.uml.debug.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.schedulable/.classpath b/plugins/org.eclipse.papyrus.moka.engine.schedulable/.classpath
new file mode 100644
index 0000000..c6fdc8f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.schedulable/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/.gitignore b/plugins/org.eclipse.papyrus.moka.engine.schedulable/.gitignore
similarity index 100%
copy from plugins/org.eclipse.papyrus.moka.engine.uml.debug/.gitignore
copy to plugins/org.eclipse.papyrus.moka.engine.schedulable/.gitignore
diff --git a/plugins/org.eclipse.papyrus.moka.engine.schedulable/.project b/plugins/org.eclipse.papyrus.moka.engine.schedulable/.project
new file mode 100644
index 0000000..f509ee3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.schedulable/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.moka.engine.schedulable</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.schedulable/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.schedulable/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8b8b755
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.schedulable/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.papyrus.moka.engine.schedulable
+Bundle-SymbolicName: org.eclipse.papyrus.moka.engine.schedulable;singleton:=true
+Bundle-Version: 4.1.0.qualifier
+Automatic-Module-Name: org.eclipse.papyrus.moka.engine.schedulable
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0]";visibility:=reexport,
+ org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0]";visibility:=reexport
+Export-Package: org.eclipse.papyrus.moka.engine.schedulable
+Bundle-Activator: org.eclipse.papyrus.moka.engine.schedulable.Activator
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.papyrus.moka.engine.schedulable/build.properties b/plugins/org.eclipse.papyrus.moka.engine.schedulable/build.properties
new file mode 100644
index 0000000..b107977
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.schedulable/build.properties
@@ -0,0 +1,3 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.papyrus.moka.engine.schedulable/pom.xml b/plugins/org.eclipse.papyrus.moka.engine.schedulable/pom.xml
new file mode 100644
index 0000000..0b35836
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.schedulable/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Engines -->
+ <parent>
+ <groupId>org.eclipse.papyrus.moka</groupId>
+ <artifactId>org.eclipse.papyrus.moka.plugins</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- POM Description -->
+ <artifactId>org.eclipse.papyrus.moka.engine.schedulable</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <name>org.eclipse.papyrus.moka.engine.schedulable</name>
+
+</project>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/AbstractScheduledExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/AbstractScheduledExecutionEngine.java
new file mode 100644
index 0000000..b75b870
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/AbstractScheduledExecutionEngine.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.schedulable;
+
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.moka.kernel.engine.AbstractExecutionEngine;
+import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
+import org.eclipse.papyrus.moka.kernel.scheduling.control.ExecutionController;
+import org.eclipse.papyrus.moka.kernel.scheduling.control.ExecutionLoop;
+import org.eclipse.papyrus.moka.kernel.scheduling.control.IExecutionController;
+
+public abstract class AbstractScheduledExecutionEngine extends AbstractExecutionEngine
+ implements IScheduledExecutionEngine {
+
+ /**
+ * Controller in charge of the execution task management
+ */
+ protected IExecutionController controller;
+
+ @Override
+ protected void init(EngineConfiguration<? extends EObject> configuration, SubMonitor monitor) {
+ super.init(configuration, monitor);
+ controller = createController();
+ }
+
+ /**
+ * @see {@link IDebuggableExecutionEngine#createController()}
+ */
+ public IExecutionController createController() {
+ IExecutionController controller = new ExecutionController();
+ controller.setExecutionLoop(new ExecutionLoop());
+ return controller;
+ }
+
+ @Override
+ public IExecutionController getController() {
+ return controller;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/Activator.java b/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/Activator.java
new file mode 100644
index 0000000..8fc27f6
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/Activator.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.schedulable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ /**
+ * Plugin instance
+ */
+ private static Activator plugin;
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ plugin = this;
+
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ }
+
+ public static Activator getInstance() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/IScheduledExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/IScheduledExecutionEngine.java
new file mode 100644
index 0000000..b0b1525
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.schedulable/src/org/eclipse/papyrus/moka/engine/schedulable/IScheduledExecutionEngine.java
@@ -0,0 +1,21 @@
+package org.eclipse.papyrus.moka.engine.schedulable;
+
+import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
+import org.eclipse.papyrus.moka.kernel.scheduling.control.IExecutionController;
+
+public interface IScheduledExecutionEngine extends IExecutionEngine {
+ /**
+ * Instantiate and configure the controller in charge of the the execution
+ * engine task scheduling
+ *
+ * @return the controller
+ */
+ IExecutionController createController();
+
+ /**
+ * get the controller in charge of the the execution engine task scheduling
+ *
+ * @return the controller
+ */
+ IExecutionController getController();
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/.classpath b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/.classpath
index 1d45a8a..aa0d560 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/.classpath
@@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
+ <attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/META-INF/MANIFEST.MF
index 0a7f661..de3568d 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/META-INF/MANIFEST.MF
@@ -6,14 +6,9 @@
Bundle-Vendor: Eclipse Modeling Project
Automatic-Module-Name: org.eclipse.papyrus.moka.engine.uml.animation
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Require-Bundle: org.eclipse.papyrus.moka.kernel.animation;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
+Require-Bundle: org.eclipse.papyrus.moka.kernel.animation;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
org.eclipse.gmf.runtime.notation.edit;bundle-version="[1.8.0,2.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)"
+ org.eclipse.papyrus.moka.pssm;bundle-version="[4.1.0,5.0.0)"
Export-Package: org.eclipse.papyrus.moka.engine.uml.animation.animators,
org.eclipse.papyrus.moka.engine.uml.animation.service
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/plugin.xml b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/plugin.xml
index 7ee9254..0ef1ca1 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/plugin.xml
@@ -7,7 +7,7 @@
class="org.eclipse.papyrus.moka.engine.uml.animation.service.UMLAnimationService"
description="UML Animation Service">
<context
- engineID="org.eclipse.papyrus.moka.engine.uml">
+ engineID="org.eclipse.papyrus.moka.engine.uml.debug">
</context>
<context
engineID="org.eclipse.papyrus.moka.engine.uml.time">
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/src/org/eclipse/papyrus/moka/engine/uml/animation/animators/UMLAnimator.java b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/src/org/eclipse/papyrus/moka/engine/uml/animation/animators/UMLAnimator.java
index 7775f2f..48ad7b2 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/src/org/eclipse/papyrus/moka/engine/uml/animation/animators/UMLAnimator.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/src/org/eclipse/papyrus/moka/engine/uml/animation/animators/UMLAnimator.java
@@ -17,15 +17,15 @@
import org.eclipse.papyrus.moka.animation.engine.animators.Animator;
import org.eclipse.papyrus.moka.animation.engine.animators.actions.DerivedAnimationAction;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLRTCStepListener;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLSemanticVisitorExecutionListener;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLValueLifecyleListener;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.IRTCStepListener;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.ISemanticVisitorExecutionListener;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.IValueLifecyleListener;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IReference;
import org.eclipse.papyrus.moka.kernel.assistant.Suspension;
-public abstract class UMLAnimator extends Animator implements UMLSemanticVisitorExecutionListener, UMLRTCStepListener, UMLValueLifecyleListener{
+public abstract class UMLAnimator extends Animator implements ISemanticVisitorExecutionListener, IRTCStepListener, IValueLifecyleListener{
@Override
public final void nodeVisited(ISemanticVisitor nodeVisitor) {
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/src/org/eclipse/papyrus/moka/engine/uml/animation/service/UMLAnimationService.java b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/src/org/eclipse/papyrus/moka/engine/uml/animation/service/UMLAnimationService.java
index d7d968a..f8e947d 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.animation/src/org/eclipse/papyrus/moka/engine/uml/animation/service/UMLAnimationService.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.animation/src/org/eclipse/papyrus/moka/engine/uml/animation/service/UMLAnimationService.java
@@ -23,10 +23,10 @@
import org.eclipse.papyrus.moka.animation.engine.rendering.AnimationKind;
import org.eclipse.papyrus.moka.animation.engine.rendering.DiagramHandler;
import org.eclipse.papyrus.moka.engine.uml.animation.animators.UMLAnimator;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLRTCStepListener;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLSemanticVisitorExecutionListener;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLValueLifecyleListener;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.IRTCStepListener;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.ISemanticVisitorExecutionListener;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.IValueLifecyleListener;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IReference;
@@ -34,7 +34,7 @@
import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
import org.eclipse.papyrus.moka.utils.constants.MokaConstants;
-public class UMLAnimationService extends AnimationService implements UMLSemanticVisitorExecutionListener, UMLRTCStepListener, UMLValueLifecyleListener{
+public class UMLAnimationService extends AnimationService implements ISemanticVisitorExecutionListener, IRTCStepListener, IValueLifecyleListener{
public UMLAnimationService() {
super();
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/.classpath b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/.classpath
new file mode 100644
index 0000000..c6fdc8f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/.gitignore b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/.gitignore
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/.gitignore
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/.gitignore
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/.project b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/.project
new file mode 100644
index 0000000..a18f63a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.moka.engine.uml.debug.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..d71ce62
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.papyrus.moka.engine.uml.debug.ui
+Bundle-SymbolicName: org.eclipse.papyrus.moka.engine.uml.debug.ui;singleton:=true
+Bundle-Version: 4.1.0.qualifier
+Automatic-Module-Name: org.eclipse.papyrus.moka.engine.uml.debug
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.debug.ui;bundle-version="[3.14.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.ui.workbench;bundle-version="[3.122.0,4.0.0)";visibility:=reexport,
+ org.eclipse.jface;bundle-version="[3.22.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.moka.engine.uml.time.interfaces;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.moka.engine.uml.debug;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
+Bundle-Activator: org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: Eclipse Modeling Project
+Export-Package: org.eclipse.papyrus.moka.engine.uml.debug.ui,
+ org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/build.properties b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/build.properties
new file mode 100644
index 0000000..e81640f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ resources/
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/plugin.xml b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/plugin.xml
new file mode 100644
index 0000000..3c1dc98
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.debug.ui.debugModelPresentations">
+ <debugModelPresentation
+ class="org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.UMLDebugModelPresentation"
+ id="org.eclipse.papyrus.moka.engine.uml.debug.model">
+ </debugModelPresentation>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/pom.xml b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/pom.xml
new file mode 100644
index 0000000..b8906a4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Engines -->
+ <parent>
+ <groupId>org.eclipse.papyrus.moka</groupId>
+ <artifactId>org.eclipse.papyrus.moka.plugins</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- POM Description -->
+ <artifactId>org.eclipse.papyrus.moka.engine.uml.debug.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <name>org.eclipse.papyrus.moka.engine.uml.debug.ui</name>
+
+</project>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/call.png b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/call.png
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/call.png
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/call.png
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/completion.png b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/completion.png
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/completion.png
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/completion.png
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/context.gif b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/context.gif
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/context.gif
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/context.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/event_pool.gif b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/event_pool.gif
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/event_pool.gif
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/event_pool.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/interaction-point.gif b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/interaction-point.gif
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/interaction-point.gif
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/interaction-point.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/item.gif b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/item.gif
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/item.gif
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/item.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/signal.png b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/signal.png
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/signal.png
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/signal.png
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/suspend.gif b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/suspend.gif
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/suspend.gif
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/suspend.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/time.png b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/time.png
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/time.png
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/time.png
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/tokens.gif b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/tokens.gif
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/resources/icons/tokens.gif
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/resources/icons/tokens.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugPlugin.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/UMLDebugPlugin.java
similarity index 73%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugPlugin.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/UMLDebugPlugin.java
index 578137c..a93b457 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugPlugin.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/UMLDebugPlugin.java
@@ -12,21 +12,21 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui;
import java.net.URL;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.CallEventOccurrenceVariableLabelProvider;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.CompletionEventOccurrenceVariableLabelProvider;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.EventPoolVariableLabelProvider;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.ExecutionContextVariableLabelProvider;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.ItemVariableLabelProvider;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.SignalEventOccurrenceVariableLabelProvider;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.SuspensionPointVariableLabelProvider;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.TimeEventOccurrenceVariableLabelProvider;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.TokensVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.CallEventOccurrenceVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.CompletionEventOccurrenceVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.EventPoolVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.ExecutionContextVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.ItemVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.SignalEventOccurrenceVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.SuspensionPointVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.TimeEventOccurrenceVariableLabelProvider;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation.TokensVariableLabelProvider;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CS_EventOccurrenceVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CS_EventOccurrenceVariableLabelProvider.java
similarity index 96%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CS_EventOccurrenceVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CS_EventOccurrenceVariableLabelProvider.java
index b8c138f..7fd9502 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CS_EventOccurrenceVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CS_EventOccurrenceVariableLabelProvider.java
@@ -12,7 +12,7 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
import org.eclipse.debug.core.DebugException;
import org.eclipse.jface.viewers.ILabelProvider;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CS_InteractionPointVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CS_InteractionPointVariableLabelProvider.java
similarity index 94%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CS_InteractionPointVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CS_InteractionPointVariableLabelProvider.java
index a7a435a..35e9e4e 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CS_InteractionPointVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CS_InteractionPointVariableLabelProvider.java
@@ -12,7 +12,7 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.moka.engine.uml.debug.data.variables.UMLVariableAdapter;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CallEventOccurrenceVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CallEventOccurrenceVariableLabelProvider.java
similarity index 88%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CallEventOccurrenceVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CallEventOccurrenceVariableLabelProvider.java
index edf33d7..70b88ca 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CallEventOccurrenceVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CallEventOccurrenceVariableLabelProvider.java
@@ -12,9 +12,9 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class CallEventOccurrenceVariableLabelProvider extends UMLDebugLabelProvider{
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CompletionEventOccurrenceVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CompletionEventOccurrenceVariableLabelProvider.java
similarity index 88%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CompletionEventOccurrenceVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CompletionEventOccurrenceVariableLabelProvider.java
index 821bc55..800b1e4 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/CompletionEventOccurrenceVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/CompletionEventOccurrenceVariableLabelProvider.java
@@ -12,9 +12,9 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class CompletionEventOccurrenceVariableLabelProvider extends UMLDebugLabelProvider{
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/EventPoolVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/EventPoolVariableLabelProvider.java
similarity index 86%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/EventPoolVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/EventPoolVariableLabelProvider.java
index d045dcd..7fb35d6 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/EventPoolVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/EventPoolVariableLabelProvider.java
@@ -12,9 +12,9 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class EventPoolVariableLabelProvider extends UMLDebugLabelProvider{
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ExecutionContextVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ExecutionContextVariableLabelProvider.java
similarity index 86%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ExecutionContextVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ExecutionContextVariableLabelProvider.java
index 6b2c51b..50d3a92 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ExecutionContextVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ExecutionContextVariableLabelProvider.java
@@ -12,9 +12,9 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class ExecutionContextVariableLabelProvider extends UMLDebugLabelProvider {
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/FeatureValueVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/FeatureValueVariableLabelProvider.java
similarity index 94%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/FeatureValueVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/FeatureValueVariableLabelProvider.java
index fdd6617..b58006d 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/FeatureValueVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/FeatureValueVariableLabelProvider.java
@@ -12,7 +12,7 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.moka.engine.uml.debug.data.variables.UMLVariableAdapter;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ItemVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ItemVariableLabelProvider.java
similarity index 86%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ItemVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ItemVariableLabelProvider.java
index 7d4a3c1..58dd256 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ItemVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ItemVariableLabelProvider.java
@@ -12,9 +12,9 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class ItemVariableLabelProvider extends UMLDebugLabelProvider {
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/MokaDebugLabelProviderFactory.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/MokaDebugLabelProviderFactory.java
similarity index 98%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/MokaDebugLabelProviderFactory.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/MokaDebugLabelProviderFactory.java
index 54ca34c..b99e552 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/MokaDebugLabelProviderFactory.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/MokaDebugLabelProviderFactory.java
@@ -11,7 +11,7 @@
* Contributors:
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
import org.eclipse.debug.core.DebugException;
import org.eclipse.jface.viewers.ILabelProvider;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ObjectNodeActivationVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ObjectNodeActivationVariableLabelProvider.java
similarity index 94%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ObjectNodeActivationVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ObjectNodeActivationVariableLabelProvider.java
index cbd38a1..e277e72 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ObjectNodeActivationVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ObjectNodeActivationVariableLabelProvider.java
@@ -12,7 +12,7 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.moka.engine.uml.debug.data.variables.UMLVariableAdapter;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ParameterValueVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ParameterValueVariableLabelProvider.java
similarity index 94%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ParameterValueVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ParameterValueVariableLabelProvider.java
index af648fa..a77a8ef 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/ParameterValueVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/ParameterValueVariableLabelProvider.java
@@ -12,7 +12,7 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.moka.engine.uml.debug.data.variables.UMLVariableAdapter;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/SignalEventOccurrenceVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/SignalEventOccurrenceVariableLabelProvider.java
similarity index 88%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/SignalEventOccurrenceVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/SignalEventOccurrenceVariableLabelProvider.java
index 25c5546..ea4d58c 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/SignalEventOccurrenceVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/SignalEventOccurrenceVariableLabelProvider.java
@@ -12,9 +12,9 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class SignalEventOccurrenceVariableLabelProvider extends UMLDebugLabelProvider{
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/SuspensionPointVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/SuspensionPointVariableLabelProvider.java
similarity index 86%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/SuspensionPointVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/SuspensionPointVariableLabelProvider.java
index 9baf169..58c6024 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/SuspensionPointVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/SuspensionPointVariableLabelProvider.java
@@ -11,9 +11,9 @@
* Contributors:
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class SuspensionPointVariableLabelProvider extends UMLDebugLabelProvider {
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/TimeEventOccurrenceVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/TimeEventOccurrenceVariableLabelProvider.java
similarity index 88%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/TimeEventOccurrenceVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/TimeEventOccurrenceVariableLabelProvider.java
index 09a43be..2dee038 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/TimeEventOccurrenceVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/TimeEventOccurrenceVariableLabelProvider.java
@@ -12,9 +12,9 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class TimeEventOccurrenceVariableLabelProvider extends UMLDebugLabelProvider{
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/TokensVariableLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/TokensVariableLabelProvider.java
similarity index 86%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/TokensVariableLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/TokensVariableLabelProvider.java
index d268446..80d07a0 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/TokensVariableLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/TokensVariableLabelProvider.java
@@ -12,9 +12,9 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
-import org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin;
+import org.eclipse.papyrus.moka.engine.uml.debug.ui.UMLDebugPlugin;
import org.eclipse.swt.graphics.Image;
public class TokensVariableLabelProvider extends UMLDebugLabelProvider{
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugLabelProvider.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/UMLDebugLabelProvider.java
similarity index 96%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugLabelProvider.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/UMLDebugLabelProvider.java
index eec86c8..9e529ec 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugLabelProvider.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/UMLDebugLabelProvider.java
@@ -11,7 +11,7 @@
* Contributors:
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
import org.eclipse.debug.core.DebugException;
import org.eclipse.jface.viewers.ILabelProvider;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugModelPresentation.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/UMLDebugModelPresentation.java
similarity index 92%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugModelPresentation.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/UMLDebugModelPresentation.java
index 334b24e..2ab7573 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugModelPresentation.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug.ui/src/org/eclipse/papyrus/moka/engine/uml/debug/ui/data/presentation/UMLDebugModelPresentation.java
@@ -12,7 +12,7 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.ui.data.presentation;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.debug.ui.IDebugModelPresentation;
@@ -24,11 +24,6 @@
import org.eclipse.ui.IEditorInput;
public class UMLDebugModelPresentation implements IDebugModelPresentation{
-
- /**
- * ID of the UML debug model
- */
- public static final String MODEL_ID = "org.eclipse.papyrus.moka.engine.uml.debug.presentation";
@Override
public Image getImage(Object element) {
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/.classpath b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/.classpath
index 1d45a8a..f27fe76 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/.classpath
@@ -8,4 +8,4 @@
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
-</classpath>
+</classpath>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/META-INF/MANIFEST.MF
index 8c3eeb2..41a81ec 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/META-INF/MANIFEST.MF
@@ -3,30 +3,14 @@
Bundle-Name: org.eclipse.papyrus.moka.engine.uml.debug
Bundle-SymbolicName: org.eclipse.papyrus.moka.engine.uml.debug;singleton:=true
Bundle-Version: 4.1.0.qualifier
+Bundle-Vendor: CEA List
Automatic-Module-Name: org.eclipse.papyrus.moka.engine.uml.debug
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Require-Bundle: org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.14.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
- org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.time.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.papyrus.infra.emf;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.osgi;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)"
-Export-Package: org.eclipse.papyrus.moka.engine.uml.debug.data.presentation,
+Require-Bundle: org.eclipse.papyrus.moka.engine.uml;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.moka.engine.uml.time.interfaces;bundle-version="[4.0.0,5.0.0)"
+Export-Package: org.eclipse.papyrus.moka.engine.uml.debug,
org.eclipse.papyrus.moka.engine.uml.debug.data.values,
org.eclipse.papyrus.moka.engine.uml.debug.data.variables,
- org.eclipse.papyrus.moka.engine.uml.debug.listeners,
org.eclipse.papyrus.moka.engine.uml.debug.service
-Bundle-Activator: org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugPlugin
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: Eclipse Modeling Project
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/build.properties b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/build.properties
index e81640f..cc91072 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/build.properties
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/build.properties
@@ -1,5 +1,4 @@
source.. = src/
bin.includes = META-INF/,\
.,\
- plugin.xml,\
- resources/
+ plugin.xml
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/plugin.xml b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/plugin.xml
index 995e8fa..caea0d0 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/plugin.xml
@@ -1,25 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
- <extension
- point="org.eclipse.papyrus.moka.kernel.service">
- <service
- class="org.eclipse.papyrus.moka.engine.uml.debug.service.UMLDebugService"
- description="UML Debug Service">
- <context
- engineID="org.eclipse.papyrus.moka.engine.uml">
- </context>
- <context
- engineID="org.eclipse.papyrus.moka.engine.uml.time">
- </context>
- </service>
- </extension>
- <extension
- point="org.eclipse.debug.ui.debugModelPresentations">
- <debugModelPresentation
- class="org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.UMLDebugModelPresentation"
- id="org.eclipse.papyrus.moka.engine.uml.debug.presentation">
- </debugModelPresentation>
- </extension>
-
+<extension
+ point="org.eclipse.papyrus.moka.kernel.engine">
+ <engine
+ class="org.eclipse.papyrus.moka.engine.uml.debug.UMLDebugExecutionEngine"
+ description="Debuggable Execution Engine for UML"
+ id="org.eclipse.papyrus.moka.engine.uml.debug">
+ </engine>
+</extension>
</plugin>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelPreferences.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/DebugModelConstants.java
similarity index 60%
copy from plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelPreferences.java
copy to plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/DebugModelConstants.java
index 5ef32e1..1e8f060 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelPreferences.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/DebugModelConstants.java
@@ -1,7 +1,6 @@
/*****************************************************************************
- * Copyright (c) 2019 CEA LIST.
- *
- *
+ * Copyright (c) 2020 CEA LIST.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,13 +9,17 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * CEA LIST - Initial API and implementation
- *
+ * CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.kernel;
-public interface IKernelPreferences {
+package org.eclipse.papyrus.moka.engine.uml.debug;
+
+public class DebugModelConstants {
+
+ public static String DEBUG_MODEL_ID = "org.eclipse.papyrus.moka.engine.uml.debug.model";
- final static String KERNEL_PREFERENCES_ID = "org.eclipse.papyrus.moka.kernel.preferences";
-
+ private DebugModelConstants() {
+
+ }
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugExecutionEngine.java
new file mode 100644
index 0000000..a8f8007
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugExecutionEngine.java
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ * Copyright (c) 2019, 2020 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.uml.debug;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.moka.debug.engine.AbstractDebuggableExecutionEngine;
+import org.eclipse.papyrus.moka.engine.uml.IUMLExecutionEngine;
+import org.eclipse.papyrus.moka.engine.uml.scheduling.UMLTaskExecutionFactory;
+import org.eclipse.papyrus.moka.fuml.actions.DefaultCreateObjectActionStrategy;
+import org.eclipse.papyrus.moka.fuml.actions.DefaultGetAssociationStrategy;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.FIFOGetNextEventStrategy;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.loci.FirstChoiceStrategy;
+import org.eclipse.papyrus.moka.fuml.loci.ILocus;
+import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
+import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
+import org.eclipse.papyrus.moka.fuml.tasks.IUMLRootTaskExecution;
+import org.eclipse.papyrus.moka.fuml.tasks.IUMLTaskExecutionFactory;
+import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
+import org.eclipse.papyrus.moka.kernel.engine.ExecutionEngineException;
+import org.eclipse.papyrus.moka.kernel.scheduling.control.Scheduler;
+import org.eclipse.papyrus.moka.pscs.actions.additions.CS_NotNormativeDefaultConstructStrategy;
+import org.eclipse.papyrus.moka.pscs.loci.CS_Executor;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_DefaultRequestPropagationStrategy;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_DispatchOperationOfInterfaceStrategy;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy;
+import org.eclipse.papyrus.moka.pssm.loci.SM_ExecutionFactory;
+import org.eclipse.papyrus.moka.pssm.loci.SM_Locus;
+import org.eclipse.uml2.uml.Element;
+
+public class UMLDebugExecutionEngine extends AbstractDebuggableExecutionEngine<IObject_, ISemanticVisitor>
+ implements IUMLExecutionEngine {
+
+ /**
+ * Virtual machine on which the execution takes place
+ */
+ protected ILocus locus;
+
+ /**
+ * Factory enabling the creation of the appropriate root task for this engine
+ */
+ protected IUMLTaskExecutionFactory rootTaskFactory;
+
+ /**
+ * Behave as the super class. In addition, instantiate the locus and
+ * parameterize it with the appropriate execution factory and executor. Finally,
+ * built in types, libraries and semantic strategies are installed at the locus
+ */
+ @Override
+ public void init(EngineConfiguration<? extends EObject> configuration, SubMonitor monitor) {
+ super.init(configuration, monitor);
+ locus = createLocus();
+ rootTaskFactory = createUMLTaskFactory();
+ locus.getFactory().setTaskFactory(rootTaskFactory);
+ installBuiltInTypes();
+ installLibraries();
+ installSemanticStrategies();
+ }
+
+ /**
+ * Create the UML task factory used by this engine
+ *
+ * @return the task factory
+ */
+ protected IUMLTaskExecutionFactory createUMLTaskFactory() {
+ return new UMLTaskExecutionFactory(controller.getExecutionLoop());
+ }
+
+ /**
+ * Start the execution. This is technically realized by adding the the root
+ * execution to the execution queue controlled by the execution controller
+ */
+ @Override
+ public void start(SubMonitor monitor) throws ExecutionEngineException {
+ EObject executionSource = configuration.getExecutionSource();
+ if (executionSource instanceof Element) {
+ Element source = (Element) executionSource;
+ if (locus != null && source != null) {
+ IUMLRootTaskExecution<?> rootExecution = rootTaskFactory.createRootExecution(source);
+ if (rootExecution != null) {
+ rootExecution.setLocus(locus);
+ rootExecution.setInputParameterValues(new ArrayList<IParameterValue>());
+ if (rootExecution.canExecute()) {
+ controller.getExecutionLoop().init(rootExecution, new Scheduler());
+ SubMonitor progress = monitor.split(1);
+ progress.subTask("Run model"); //$NON-NLS-1$
+ controller.start();
+ progress.worked(1);
+ } else {
+ throw new ExecutionEngineException(identifier, status,
+ "Could not start the execution from the specified model element"); //$NON-NLS-1$
+ }
+ } else {
+ throw new ExecutionEngineException(identifier, status,
+ "Could not instantiate an execution from the specified element"); //$NON-NLS-1$
+ }
+ }
+ } else {
+ throw new IllegalArgumentException("ExecutionSource in configuration must be instanceOf UML::Element");
+ }
+ }
+
+ /**
+ * Create and parameterize the locus
+ */
+ @Override
+ public ILocus createLocus() {
+ ILocus locus = new SM_Locus();
+ locus.setExecutor(new CS_Executor());
+ locus.setFactory(new SM_ExecutionFactory());
+ return locus;
+ }
+
+ /**
+ * Register UML primitive types
+ */
+ @Override
+ public void installBuiltInTypes() {
+ UMLDebugExecutionEngineHelper.installBuiltInTypes(configuration, locus);
+ }
+
+ /**
+ * Install all registered libraries (e.g., the FUML Library)
+ */
+ @Override
+ public void installLibraries() {
+ UMLDebugExecutionEngineHelper.installLibraries(configuration, locus);
+ }
+
+ /**
+ * Install semantic strategies used to realized the execution
+ */
+ @Override
+ public void installSemanticStrategies() {
+ if (locus != null) {
+ locus.getFactory().setStrategy(new FirstChoiceStrategy());
+ locus.getFactory().setStrategy(new FIFOGetNextEventStrategy());
+ locus.getFactory().setStrategy(new CS_DispatchOperationOfInterfaceStrategy());
+ locus.getFactory().setStrategy(new CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy());
+ locus.getFactory().setStrategy(new CS_DefaultRequestPropagationStrategy());
+ locus.getFactory().setStrategy(new CS_NotNormativeDefaultConstructStrategy());
+ locus.getFactory().setStrategy(new DefaultGetAssociationStrategy());
+ locus.getFactory().setStrategy(new DefaultCreateObjectActionStrategy());
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugExecutionEngineHelper.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugExecutionEngineHelper.java
new file mode 100644
index 0000000..153759e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/UMLDebugExecutionEngineHelper.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.uml.debug;
+
+import org.eclipse.papyrus.moka.engine.uml.UMLExecutionEngineHelper;
+import org.eclipse.papyrus.moka.fuml.loci.ILocus;
+import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
+
+public class UMLDebugExecutionEngineHelper {
+
+ public static void installBuiltInTypes(EngineConfiguration<?> configuration, ILocus locus) {
+ UMLExecutionEngineHelper.installBuiltInTypes(configuration, locus);
+ }
+
+ public static void installLibraries(EngineConfiguration<?> configuration, ILocus locus) {
+ UMLExecutionEngineHelper.installLibraries(configuration, locus);
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugElement.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/values/UMLDebugElement.java
similarity index 82%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugElement.java
rename to plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/values/UMLDebugElement.java
index 2eba1bf..6896ec5 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/presentation/UMLDebugElement.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/values/UMLDebugElement.java
@@ -12,10 +12,11 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.data.presentation;
+package org.eclipse.papyrus.moka.engine.uml.debug.data.values;
import org.eclipse.debug.core.model.DebugElement;
import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.engine.uml.debug.DebugModelConstants;
public class UMLDebugElement extends DebugElement{
@@ -25,7 +26,7 @@
@Override
public String getModelIdentifier() {
- return UMLDebugModelPresentation.MODEL_ID;
+ return DebugModelConstants.DEBUG_MODEL_ID;
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/values/UMLValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/values/UMLValueAdapter.java
index 443d091..1e5ae19 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/values/UMLValueAdapter.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/values/UMLValueAdapter.java
@@ -21,7 +21,6 @@
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.UMLDebugElement;
public abstract class UMLValueAdapter<ValueType> extends UMLDebugElement implements IValue {
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActionActivationValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActionActivationValueAdapter.java
new file mode 100644
index 0000000..3bed304
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActionActivationValueAdapter.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.actions.IActionActivation;
+import org.eclipse.papyrus.moka.fuml.actions.IPinActivation;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.InputPin;
+
+public class ActionActivationValueAdapter<T extends IActionActivation> extends ActivityNodeActivationValueAdapter<T>{
+
+ public ActionActivationValueAdapter(IDebugTarget debugTarget, T visitor) {
+ super(debugTarget, visitor);
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ // For each input pin create a variable. This variable provides access
+ // to the tokens held by the pin activations attached to adapted activation
+ // for an action.
+ if(this.variables.isEmpty()) {
+ Action action = (Action) value.getNode();
+ for(InputPin pin : action.getInputs()) {
+ IPinActivation pinActivation = value.getPinActivation(pin);
+ if(pinActivation != null) {
+ this.variables.add(new ObjectNodeActivationVariableAdapter(getDebugTarget(), pinActivation));
+ }
+ }
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActivityEdgeInstanceValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActivityEdgeInstanceValueAdapter.java
new file mode 100644
index 0000000..f709a0a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActivityEdgeInstanceValueAdapter.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import java.util.List;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.activities.IActivityEdgeInstance;
+import org.eclipse.papyrus.moka.fuml.activities.IForkedToken;
+import org.eclipse.papyrus.moka.fuml.activities.IObjectToken;
+import org.eclipse.papyrus.moka.fuml.activities.IToken;
+
+public class ActivityEdgeInstanceValueAdapter extends VisitorValueAdapter<IActivityEdgeInstance> {
+
+ public ActivityEdgeInstanceValueAdapter(IDebugTarget target, IActivityEdgeInstance visitor) {
+ super(target, visitor);
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if(this.variables.isEmpty()) {
+ List<IToken> tokens = value.getSource().getTokens();
+ if(tokens.size() == 1) {
+ IToken token = tokens.iterator().next();
+ if(token instanceof IObjectToken
+ || token instanceof IForkedToken) {
+ IObjectToken objectToken = null;
+ if(token instanceof IForkedToken) {
+ objectToken = (IObjectToken)((IForkedToken)token).getBaseToken();
+ }else {
+ objectToken = (IObjectToken) token;
+ }
+ this.variables.add(new ObjectTokenVariableValueAdapter(getDebugTarget(), objectToken.getValue()));
+ }
+ }else {
+ this.variables.add(new TokensVariableAdapter(getDebugTarget(), tokens));
+ }
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActivityNodeActivationValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActivityNodeActivationValueAdapter.java
new file mode 100644
index 0000000..aebc59d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ActivityNodeActivationValueAdapter.java
@@ -0,0 +1,24 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.fuml.activities.IActivityNodeActivation;
+
+public abstract class ActivityNodeActivationValueAdapter<T extends IActivityNodeActivation> extends VisitorValueAdapter<T>{
+
+ public ActivityNodeActivationValueAdapter(IDebugTarget debugTarget, T visitor) {
+ super(debugTarget, visitor);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CS_EventOccurrenceValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CS_EventOccurrenceValueAdapter.java
new file mode 100644
index 0000000..5813991
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CS_EventOccurrenceValueAdapter.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
+import org.eclipse.papyrus.moka.pscs.commonbehavior.ICS_EventOccurrence;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_InteractionPoint;
+
+public class CS_EventOccurrenceValueAdapter extends EventOccurrenceValueAdapter {
+
+ public CS_EventOccurrenceValueAdapter(IDebugTarget debugTarget, IEventOccurrence eventOccurrence) {
+ super(debugTarget, eventOccurrence);
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if (this.variables.isEmpty()) {
+ ICS_InteractionPoint interactionPoint= ((ICS_EventOccurrence) value).getInteractionPoint();
+ if(interactionPoint != null) {
+ this.variables.add(new CS_InteractionPointVariableAdapter(getDebugTarget(), interactionPoint));
+ }
+ UMLValueAdapter<?> valueAdapter = UMLValueAdapterFactory.getInstance()
+ .instantiate(((ICS_EventOccurrence) value).getWrappedEventOccurrence(), getDebugTarget());
+ IVariable[] delegatedVariables = valueAdapter.getVariables();
+ for(int i=0; i < delegatedVariables.length; i++) {
+ this.variables.add(delegatedVariables[i]);
+ }
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ // The string representation is the one specified by the value
+ // adapter of the wrapped event occurrence.
+ UMLValueAdapter<?> valueAdapter = UMLValueAdapterFactory.getInstance()
+ .instantiate(((ICS_EventOccurrence) value).getWrappedEventOccurrence(), getDebugTarget());
+ return valueAdapter.getValueString();
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CS_InteractionPointValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CS_InteractionPointValueAdapter.java
new file mode 100644
index 0000000..ca3e603
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CS_InteractionPointValueAdapter.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_InteractionPoint;
+
+public class CS_InteractionPointValueAdapter extends UMLValueAdapter<ICS_InteractionPoint>{
+
+ public CS_InteractionPointValueAdapter(IDebugTarget target, ICS_InteractionPoint adaptedObject) {
+ super(target, adaptedObject);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ // The string representation of an interaction point is given
+ // by the identifier of its referent (i.e., the object representing
+ // the port instance).
+ if(value.getReferent() != null) {
+ return value.getReferent().getIdentifier();
+ }
+ return "";
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CallEventOccurrenceValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CallEventOccurrenceValueAdapter.java
new file mode 100644
index 0000000..06d575a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CallEventOccurrenceValueAdapter.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import java.util.List;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.ICallEventOccurrence;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Parameter;
+
+public class CallEventOccurrenceValueAdapter extends EventOccurrenceValueAdapter {
+
+ public CallEventOccurrenceValueAdapter(IDebugTarget debugTarget, IEventOccurrence eventOccurrence) {
+ super(debugTarget, eventOccurrence);
+ this.representation = "Call Event";
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if (this.variables.isEmpty() && !value.getParameterValues().isEmpty()) {
+ Operation operation = ((ICallEventOccurrence) value).getOperation();
+ if (operation != null) {
+ List<Parameter> operationParameters = operation.getOwnedParameters();
+ List<IParameterValue> parameterValues = value.getParameterValues();
+ for (int i = 0; i < parameterValues.size(); i++) {
+ this.variables.add(new ParameterValueVariableAdapter(getDebugTarget(), parameterValues.get(i),
+ operationParameters.get(i).getName()));
+ }
+ }
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CompletionEventOccurrenceValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CompletionEventOccurrenceValueAdapter.java
new file mode 100644
index 0000000..2666e16
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/CompletionEventOccurrenceValueAdapter.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
+
+public class CompletionEventOccurrenceValueAdapter extends EventOccurrenceValueAdapter {
+
+ public CompletionEventOccurrenceValueAdapter(IDebugTarget target, IEventOccurrence eventOccurrence) {
+ super(target, eventOccurrence);
+ this.representation = "Completion Event";
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/DefaultValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/DefaultValueAdapter.java
new file mode 100644
index 0000000..2a659b4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/DefaultValueAdapter.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+
+public class DefaultValueAdapter extends UMLValueAdapter<Object> {
+
+ public DefaultValueAdapter(IDebugTarget debugTarget, Object object) {
+ super(debugTarget, object);
+ }
+
+ @Override
+ public String getReferenceTypeName() throws DebugException {
+ // No value adapter could handle the object to be adapted.
+ // Hence the default value adapter is used.
+ return "<no reference type>";
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ // No value adapter could handle the object to be adapted.
+ // Hence the default value adapter is used.
+ if(value != null) {
+ return value.toString();
+ }
+ return "<null or no representation>";
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/EventOccurrenceValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/EventOccurrenceValueAdapter.java
new file mode 100644
index 0000000..5eda118
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/EventOccurrenceValueAdapter.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
+
+public abstract class EventOccurrenceValueAdapter extends UMLValueAdapter<IEventOccurrence> {
+
+ // Representation of the event occurrence
+ protected String representation;
+
+ public EventOccurrenceValueAdapter(IDebugTarget target, IEventOccurrence eventOccurrence) {
+ super(target, eventOccurrence);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ // The string representation is the one specified in the representation
+ // attribute or the result of toString operation applied on the adapted
+ // object.
+ if(this.representation == null || this.representation.isEmpty()) {
+ return value.toString();
+ }
+ return this.representation;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/MokaValueAdapterList.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/MokaValueAdapterList.java
new file mode 100644
index 0000000..32901e4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/MokaValueAdapterList.java
@@ -0,0 +1,180 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+
+public class MokaValueAdapterList extends UMLValueAdapter<List<Object>> implements List<Object> {
+
+ public MokaValueAdapterList(IDebugTarget target) {
+ this(target, null);
+ }
+
+ public MokaValueAdapterList(IDebugTarget target, List<Object> adaptedObject) {
+ super(target, adaptedObject);
+ value = new ArrayList<Object>();
+ if(adaptedObject != null) {
+ value.addAll(adaptedObject);
+ }
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ return "(size = " + value.size() + ")";
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if (this.variables.isEmpty()) {
+ int index = 1;
+ Iterator<Object> tobeAdaptedIterator = value.iterator();
+ while (tobeAdaptedIterator.hasNext()) {
+ this.variables.add(new ItemVariableAdapter(getDebugTarget(), index, UMLValueAdapterFactory
+ .getInstance().instantiate(tobeAdaptedIterator.next(), getDebugTarget())));
+ index++;
+ }
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+ @Override
+ public boolean hasVariables() throws DebugException {
+ return this.getVariables().length > 0;
+ }
+
+ @Override
+ public int size() {
+ return value.size();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return value.isEmpty();
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ return value.contains(o);
+ }
+
+ @Override
+ public Iterator<Object> iterator() {
+ return value.iterator();
+ }
+
+ @Override
+ public Object[] toArray() {
+ return value.toArray();
+ }
+
+ @Override
+ public <T> T[] toArray(T[] a) {
+ return value.toArray(a);
+ }
+
+ @Override
+ public boolean add(Object e) {
+ return value.add(e);
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ return value.remove(o);
+ }
+
+ @Override
+ public boolean containsAll(Collection<?> c) {
+ return value.containsAll(c);
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends Object> c) {
+ return value.addAll(c);
+ }
+
+ @Override
+ public boolean addAll(int index, Collection<? extends Object> c) {
+ return value.addAll(index, c);
+ }
+
+ @Override
+ public boolean removeAll(Collection<?> c) {
+ return value.removeAll(c);
+ }
+
+ @Override
+ public boolean retainAll(Collection<?> c) {
+ return value.retainAll(c);
+ }
+
+ @Override
+ public void clear() {
+ value.clear();
+ }
+
+ @Override
+ public Object get(int index) {
+ return value.get(index);
+ }
+
+ @Override
+ public Object set(int index, Object element) {
+ return value.set(index, element);
+ }
+
+ @Override
+ public void add(int index, Object element) {
+ value.add(index, element);
+ }
+
+ @Override
+ public Object remove(int index) {
+ return value.remove(index);
+ }
+
+ @Override
+ public int indexOf(Object o) {
+ return value.indexOf(o);
+ }
+
+ @Override
+ public int lastIndexOf(Object o) {
+ return value.lastIndexOf(o);
+ }
+
+ @Override
+ public ListIterator<Object> listIterator() {
+ return value.listIterator();
+ }
+
+ @Override
+ public ListIterator<Object> listIterator(int index) {
+ return value.listIterator(index);
+ }
+
+ @Override
+ public List<Object> subList(int fromIndex, int toIndex) {
+ return value.subList(fromIndex, toIndex);
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectNodeActivationValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectNodeActivationValueAdapter.java
new file mode 100644
index 0000000..0fe6194
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectNodeActivationValueAdapter.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import java.util.List;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.activities.IForkedToken;
+import org.eclipse.papyrus.moka.fuml.activities.IObjectNodeActivation;
+import org.eclipse.papyrus.moka.fuml.activities.IObjectToken;
+import org.eclipse.papyrus.moka.fuml.activities.IToken;
+
+public class ObjectNodeActivationValueAdapter extends ActivityNodeActivationValueAdapter<IObjectNodeActivation>{
+
+ public ObjectNodeActivationValueAdapter(IDebugTarget target, IObjectNodeActivation value) {
+ super(target, value);
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if(this.variables.isEmpty()) {
+ List<IToken> tokens = this.getTokens();
+ if(tokens.size() == 1) {
+ IToken token = tokens.iterator().next();
+ IObjectToken objectToken = null;
+ if(token instanceof IForkedToken) {
+ objectToken = (IObjectToken)((IForkedToken)token).getBaseToken();
+ }else {
+ objectToken = (IObjectToken) token;
+ }
+ this.variables.add(new ObjectTokenVariableValueAdapter(getDebugTarget(), objectToken.getValue()));
+ }else {
+ this.variables.add(new TokensVariableAdapter(getDebugTarget(), tokens));
+ }
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+ public List<IToken> getTokens() {
+ // By default try to get tokens from the offer attached to the
+ // adapted activation
+ return value.getTokens();
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectTokenValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectTokenValueAdapter.java
new file mode 100644
index 0000000..ced0e31
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectTokenValueAdapter.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.activities.IObjectToken;
+import org.eclipse.papyrus.moka.fuml.activities.IToken;
+
+public class ObjectTokenValueAdapter extends TokenValueAdapter {
+
+ public ObjectTokenValueAdapter(IDebugTarget debugTarget, IToken token) {
+ super(debugTarget, token);
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if (this.variables.isEmpty()) {
+ this.variables.add(new ObjectTokenVariableValueAdapter(getDebugTarget(), ((IObjectToken)value).getValue()));
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ return "";
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectValueAdapter.java
new file mode 100644
index 0000000..65d1b7b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ObjectValueAdapter.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IObjectActivation;
+import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
+
+public class ObjectValueAdapter extends StructuredValueAdapter {
+
+ protected IVariable eventPoolVariable;
+
+ public ObjectValueAdapter(IDebugTarget debugTarget, IObject_ object) {
+ super(debugTarget, object);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ return ((IObject_)value).getIdentifier();
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ super.getVariables();
+ if (this.eventPoolVariable == null) {
+ IObjectActivation objectActivation = ((IObject_) value).getObjectActivation();
+ if (objectActivation != null) {
+ this.eventPoolVariable = new EventPoolVariableAdapter(getDebugTarget(), objectActivation);
+ this.variables.add(0, this.eventPoolVariable);
+ }
+ }
+
+ return this.variables.toArray(new IVariable[0]);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/PrimitiveValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/PrimitiveValueAdapter.java
new file mode 100644
index 0000000..e89a947
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/PrimitiveValueAdapter.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IPrimitiveValue;
+
+public class PrimitiveValueAdapter extends UMLValueAdapter<IPrimitiveValue> {
+
+ public PrimitiveValueAdapter(IDebugTarget debugTarget, IPrimitiveValue value) {
+ super(debugTarget, value);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ // The string is the value represented by this primitive value.
+ return value.toString();
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ReferenceValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ReferenceValueAdapter.java
new file mode 100644
index 0000000..bb6a177
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/ReferenceValueAdapter.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IReference;
+
+public class ReferenceValueAdapter extends UMLValueAdapter<IReference> {
+
+ public ReferenceValueAdapter(IDebugTarget debugTarget, IReference adaptedObject) {
+ super(debugTarget, adaptedObject);
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ // Create a value adapter for the referent object and return
+ // that variables that can be accessed through this latter.
+ UMLValueAdapter<?> adapter = UMLValueAdapterFactory.getInstance().instantiate(value.getReferent(), getDebugTarget());
+ return adapter.getVariables();
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ // The representation of the value as string is given by the identifier
+ // of the referent object.
+ if(value.getReferent() != null) {
+ return value.getReferent().getIdentifier();
+ }
+ return "";
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/SignalEventOccurrenceValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/SignalEventOccurrenceValueAdapter.java
new file mode 100644
index 0000000..3a1569b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/SignalEventOccurrenceValueAdapter.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import java.util.List;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.ISignalEventOccurrence;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IFeatureValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.ISignalInstance;
+
+public class SignalEventOccurrenceValueAdapter extends EventOccurrenceValueAdapter {
+
+ public SignalEventOccurrenceValueAdapter(IDebugTarget target, IEventOccurrence eventOccurrence) {
+ super(target, eventOccurrence);
+ this.representation = "Signal Event";
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if (this.variables.isEmpty() && !value.getParameterValues().isEmpty()) {
+ ISignalInstance signalInstance = ((ISignalEventOccurrence)value).getSignalInstance();
+ if(signalInstance != null) {
+ List<IParameterValue> parameterValues = value.getParameterValues();
+ List<IFeatureValue> featureValues = signalInstance.getMemberValues();
+ for(int i=0; i < parameterValues.size(); i++) {
+ this.variables.add(new ParameterValueVariableAdapter(getDebugTarget(), parameterValues.get(i), featureValues.get(i).getFeature().getName()));
+ }
+ }
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/StructuredValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/StructuredValueAdapter.java
new file mode 100644
index 0000000..6b36238
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/StructuredValueAdapter.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import java.util.Iterator;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IFeatureValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IStructuredValue;
+
+public class StructuredValueAdapter extends UMLValueAdapter<IStructuredValue> {
+
+ public StructuredValueAdapter(IDebugTarget target, IStructuredValue value) {
+ super(target, value);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ // By default the representation of a structured value
+ // as string is given by the toString operation applied
+ // on an executable UML value
+ if(value != null){
+ return value.toString();
+ }
+ return "";
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ // Variables available for a structured value are variable adapters
+ // built from features values owned by the structured value.
+ if (this.variables.isEmpty()) {
+ Iterator<IFeatureValue> featureValueIterator = value.getFeatureValues().iterator();
+ while (featureValueIterator.hasNext()) {
+ this.variables.add(new FeatureValueVariableAdapter(getDebugTarget(), value, featureValueIterator.next()));
+ }
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TimeEventOccurrenceValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TimeEventOccurrenceValueAdapter.java
new file mode 100644
index 0000000..a2ca2fc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TimeEventOccurrenceValueAdapter.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
+
+public class TimeEventOccurrenceValueAdapter extends EventOccurrenceValueAdapter {
+
+ protected static final String TIME = "time";
+
+ public TimeEventOccurrenceValueAdapter(IDebugTarget target, IEventOccurrence eventOccurrence) {
+ super(target, eventOccurrence);
+ this.representation = "Time Event";
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ // A time event occurrence always has a single variable.
+ // This variable contains the time at which the event occurrence
+ // is received by an object.
+ if (this.variables.isEmpty() && value.getParameterValues().size() == 1) {
+ this.variables.add(new ParameterValueVariableAdapter(getDebugTarget(),
+ value.getParameterValues().iterator().next(), TIME));
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TokenValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TokenValueAdapter.java
new file mode 100644
index 0000000..a4934d9
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TokenValueAdapter.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.fuml.activities.IToken;
+
+public class TokenValueAdapter extends UMLValueAdapter<IToken> {
+
+ public TokenValueAdapter(IDebugTarget target, IToken token) {
+ super(target, token);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ return "Control";
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TriggeredVisitorValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TriggeredVisitorValueAdapter.java
new file mode 100644
index 0000000..c196bf1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/TriggeredVisitorValueAdapter.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.loci.additions.ITriggeredVisitorWrapper;
+
+public class TriggeredVisitorValueAdapter extends VisitorValueAdapter<ITriggeredVisitorWrapper> {
+
+ public TriggeredVisitorValueAdapter(IDebugTarget target, ITriggeredVisitorWrapper visitor) {
+ super(target, visitor);
+ }
+
+ /**
+ * The only variable that is accessible from a triggered visitor is the
+ * event occurrence that triggered the visitor. This event occurrence may
+ * itself have event variables.
+ */
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if (this.variables.isEmpty()) {
+ this.variables.add(
+ new EventOccurrenceVariableAdapter(getDebugTarget(), value.getTriggeringEventOccurrence()));
+ }
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLValueAdapter.java
new file mode 100644
index 0000000..8c3ddff
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLValueAdapter.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.engine.uml.debug.data.values.UMLDebugElement;
+
+public abstract class UMLValueAdapter<ValueType> extends UMLDebugElement implements IValue {
+
+ /**
+ * UML Value that is adapted as an IValue
+ */
+ protected ValueType value;
+
+ /**
+ * Variables cache
+ */
+ protected List<IVariable> variables;
+
+ public UMLValueAdapter(IDebugTarget target, ValueType v) {
+ super(target);
+ value = v;
+ this.variables = new ArrayList<IVariable>();
+ }
+
+ @Override
+ public String getReferenceTypeName() throws DebugException {
+ // No value adapter could handle the object to be adapted.
+ // Hence the default value adapter is used.
+ return "<no reference type>";
+ }
+
+ @Override
+ public boolean isAllocated() throws DebugException {
+ // An adapted object is always considered as being allocated
+ return true;
+ }
+
+ @Override
+ public boolean hasVariables() throws DebugException {
+ // A value adapter has variables if the array returned
+ // by the getVariable method is not empty
+ return this.getVariables().length > 0;
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ // Return the list of variables as an array
+ return this.variables.toArray(new IVariable[0]);
+ }
+
+ public ValueType getAdapted() {
+ return value;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLValueAdapterFactory.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLValueAdapterFactory.java
new file mode 100644
index 0000000..840a9b1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLValueAdapterFactory.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.engine.uml.time.interfaces.ITimedEventOccurrence;
+import org.eclipse.papyrus.moka.fuml.actions.IAcceptEventActionActivation;
+import org.eclipse.papyrus.moka.fuml.actions.IActionActivation;
+import org.eclipse.papyrus.moka.fuml.activities.IActivityEdgeInstance;
+import org.eclipse.papyrus.moka.fuml.activities.IActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.activities.IForkedToken;
+import org.eclipse.papyrus.moka.fuml.activities.IObjectNodeActivation;
+import org.eclipse.papyrus.moka.fuml.activities.IObjectToken;
+import org.eclipse.papyrus.moka.fuml.activities.IToken;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.ICallEventOccurrence;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.ISignalEventOccurrence;
+import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
+import org.eclipse.papyrus.moka.fuml.loci.additions.ITriggeredVisitorWrapper;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IPrimitiveValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IStructuredValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
+import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IReference;
+import org.eclipse.papyrus.moka.pscs.commonbehavior.ICS_EventOccurrence;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_InteractionPoint;
+import org.eclipse.papyrus.moka.pssm.statemachines.ICompletionEventOccurrence;
+import org.eclipse.papyrus.moka.pssm.statemachines.ITransitionActivation;
+
+public class UMLValueAdapterFactory {
+
+ protected static UMLValueAdapterFactory factory;
+
+ private UMLValueAdapterFactory() {
+ }
+
+ public static UMLValueAdapterFactory getInstance() {
+ if (factory == null) {
+ factory = new UMLValueAdapterFactory();
+ }
+ return factory;
+ }
+
+ public UMLValueAdapter<?> instantiate(Object value, IDebugTarget target) {
+ UMLValueAdapter<?> adapter = null;
+ if (value != null) {
+ if (value instanceof IEventOccurrence) {
+ if(value instanceof ICS_EventOccurrence) {
+ adapter = new CS_EventOccurrenceValueAdapter(target, (ICS_EventOccurrence) value);
+ } else if(value instanceof ITimedEventOccurrence) {
+ adapter = new TimeEventOccurrenceValueAdapter(target, (ITimedEventOccurrence) value);
+ } else if(value instanceof ISignalEventOccurrence) {
+ adapter = new SignalEventOccurrenceValueAdapter(target, (ISignalEventOccurrence) value);
+ } else if(value instanceof ICallEventOccurrence) {
+ adapter = new CallEventOccurrenceValueAdapter(target, (ICallEventOccurrence) value);
+ } else if(value instanceof ICompletionEventOccurrence) {
+ adapter = new CompletionEventOccurrenceValueAdapter(target, (ICompletionEventOccurrence) value);
+ }
+ } else if (value instanceof IToken) {
+ if (value instanceof IObjectToken) {
+ adapter = new ObjectTokenValueAdapter(target, (IObjectToken) value);
+ } else if (value instanceof IForkedToken) {
+ adapter = this.instantiate(((IForkedToken) value).getBaseToken(), target);
+ } else {
+ adapter = new TokenValueAdapter(target, (IToken) value);
+ }
+ } else if (value instanceof IValue) {
+ if (value instanceof IReference) {
+ if(value instanceof ICS_InteractionPoint) {
+ adapter = new CS_InteractionPointValueAdapter(target, (ICS_InteractionPoint )value);
+ }else {
+ adapter = new ReferenceValueAdapter(target, (IReference) value);
+ }
+ } else if (value instanceof IObject_) {
+ adapter = new ObjectValueAdapter(target, (IObject_) value);
+ } else if (value instanceof IStructuredValue) {
+ adapter = new StructuredValueAdapter(target, (IStructuredValue) value);
+ } else if (value instanceof IPrimitiveValue) {
+ adapter = new PrimitiveValueAdapter(target, (IPrimitiveValue) value);
+ }
+ } else if (value instanceof ISemanticVisitor) {
+ if (value instanceof IActivityNodeActivation) {
+ if(value instanceof IAcceptEventActionActivation) {
+ adapter = new TriggeredVisitorValueAdapter(target, (ITriggeredVisitorWrapper) value);
+ }else if(value instanceof IActionActivation) {
+ adapter = new ActionActivationValueAdapter<IActionActivation>(target, (IActionActivation) value);
+ } else if(value instanceof IObjectNodeActivation) {
+ adapter = new ObjectNodeActivationValueAdapter(target, (IObjectNodeActivation)value);
+ }
+ }else if (value instanceof IActivityEdgeInstance){
+ adapter = new ActivityEdgeInstanceValueAdapter(target, (IActivityEdgeInstance)value);
+ } else if (value instanceof ITransitionActivation) {
+ adapter = new TriggeredVisitorValueAdapter(target, (ITriggeredVisitorWrapper)value);
+ }
+ }
+ }
+ if (adapter == null) {
+ adapter = new DefaultValueAdapter(target, value);
+ }
+ return adapter;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLVariableAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLVariableAdapter.java
index bac531d..cc6a706 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLVariableAdapter.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/UMLVariableAdapter.java
@@ -18,7 +18,7 @@
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.papyrus.moka.engine.uml.debug.data.presentation.UMLDebugElement;
+import org.eclipse.papyrus.moka.engine.uml.debug.data.values.UMLDebugElement;
import org.eclipse.papyrus.moka.engine.uml.debug.data.values.UMLValueAdapter;
import org.eclipse.papyrus.moka.engine.uml.debug.data.values.UMLValueAdapterFactory;
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/VisitorValueAdapter.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/VisitorValueAdapter.java
new file mode 100644
index 0000000..5382b81
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/data/variables/VisitorValueAdapter.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.uml.debug.data.variables;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
+
+public abstract class VisitorValueAdapter<T extends ISemanticVisitor> extends UMLValueAdapter<T> {
+
+ private final static String EMPTY_REPRESENTATION = "";
+
+ public VisitorValueAdapter(IDebugTarget target, T visitor) {
+ super(target, visitor);
+ }
+
+ @Override
+ public String getValueString() throws DebugException {
+ if (value != null) {
+ return value.toString();
+ }
+ return EMPTY_REPRESENTATION;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/service/DebugServiceUtils.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/service/DebugServiceUtils.java
index ef57bbf..5514993 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/service/DebugServiceUtils.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/service/DebugServiceUtils.java
@@ -16,55 +16,17 @@
import java.util.Iterator;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.moka.debug.breakpoint.MokaBreakpoint;
import org.eclipse.papyrus.moka.fuml.activities.IActivityEdgeInstance;
import org.eclipse.papyrus.moka.fuml.activities.IActivityNodeActivation;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.pssm.statemachines.IStateMachineSemanticVisitor;
-import org.eclipse.papyrus.moka.utils.constants.MokaConstants;
-import org.eclipse.papyrus.moka.utils.helper.semantics.SemanticHelper;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
public class DebugServiceUtils {
/**
- * Check if the node executed by this semantic visitor has a breakpoint.
- *
- * @param visitor a semantic visitor for a model element
- * @return true if the model element has a breakpoint and false otherwise
- */
- protected static boolean hasBreakpoint(final ISemanticVisitor visitor) {
- boolean breakpointExist = false;
- IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
- IBreakpoint[] breakpoints = breakpointManager.getBreakpoints(MokaConstants.MOKA_DEBUG_MODEL_ID);
- EObject visitedModelElement = SemanticHelper.getModelElement(visitor);
- if (visitedModelElement != null) {
- int i = 0;
- while (!breakpointExist && i < breakpoints.length) {
- MokaBreakpoint breakpoint = (MokaBreakpoint) breakpoints[i];
- boolean isEnabled = false;
- try {
- isEnabled = breakpoint.isEnabled();
- } catch (CoreException e) {
- e.printStackTrace();
- }
- if (isEnabled && visitedModelElement == breakpoint.getModelElement()) {
- breakpointExist = true;
- }
- i++;
- }
- }
- return breakpointExist;
- }
-
- /**
* Get the semantic visitor execution context
*
* @param visitor a semantic visitor for a model element
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/service/UMLDebugService.java b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/service/UMLDebugService.java
index e730b66..26c2cff 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/service/UMLDebugService.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/service/UMLDebugService.java
@@ -18,21 +18,22 @@
import java.util.HashSet;
import java.util.Set;
+import org.eclipse.papyrus.moka.debug.engine.DebugServiceHelper;
import org.eclipse.papyrus.moka.debug.engine.IDebuggableExecutionEngineThread;
import org.eclipse.papyrus.moka.debug.service.DebugService;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLSemanticVisitorExecutionListener;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLValueLifecyleListener;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.ISemanticVisitorExecutionListener;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.IValueLifecyleListener;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.kernel.SuspensionReasons;
import org.eclipse.papyrus.moka.kernel.assistant.Suspension;
public class UMLDebugService extends DebugService<IObject_, ISemanticVisitor>
- implements UMLSemanticVisitorExecutionListener, UMLValueLifecyleListener {
+ implements ISemanticVisitorExecutionListener, IValueLifecyleListener {
protected Set<String> debugAssistants = new HashSet<String>();
-
+
/**
* Called each time a model element is executed by the execution engine. It
* enables the execution engine to : (1) account for requests received from the
@@ -61,7 +62,7 @@
terminateEngine();
} else {
if (debuggableThread != null) {
- if (DebugServiceUtils.hasBreakpoint(visitor)) {
+ if (DebugServiceHelper.INSTANCE.hasBreakpoint(visitor)) {
// (3) Suspend the thread executing this model element
client.fireSuspendThreadEvent(context, visitor, SuspensionReasons.BREAKPOINT);
suspendThread(debuggableThread);
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/.classpath b/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/.classpath
index 1d45a8a..aa0d560 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/.classpath
@@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
+ <attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/META-INF/MANIFEST.MF
index 947e630..5a1ccec 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/META-INF/MANIFEST.MF
@@ -6,11 +6,5 @@
Bundle-Vendor: Eclipse Modeling Project
Automatic-Module-Name: org.eclipse.papyrus.moka.engine.uml.scheduling
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Require-Bundle: org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.animation;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)"
+Require-Bundle: org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.papyrus.moka.engine.uml.scheduling
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/src/org/eclipse/papyrus/moka/engine/uml/scheduling/UMLEventDispatchLoopTaskExecution.java b/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/src/org/eclipse/papyrus/moka/engine/uml/scheduling/UMLEventDispatchLoopTaskExecution.java
index 8046f8a..fe1621a 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/src/org/eclipse/papyrus/moka/engine/uml/scheduling/UMLEventDispatchLoopTaskExecution.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.scheduling/src/org/eclipse/papyrus/moka/engine/uml/scheduling/UMLEventDispatchLoopTaskExecution.java
@@ -16,29 +16,14 @@
package org.eclipse.papyrus.moka.engine.uml.scheduling;
-import java.util.Collection;
-import java.util.List;
import java.util.concurrent.locks.ReentrantLock;
-import org.eclipse.papyrus.moka.animation.engine.AnimationService;
-import org.eclipse.papyrus.moka.animation.engine.rendering.AnimationEngine;
-import org.eclipse.papyrus.moka.animation.engine.rendering.DiagramHandler;
-import org.eclipse.papyrus.moka.debug.assistant.DebugAssistantException;
-import org.eclipse.papyrus.moka.debug.service.IDebugService;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLSemanticVisitorExecutionListener;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IClassifierBehaviorInvocationEventAccepter;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IObjectActivation;
-import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.fuml.tasks.IUMLEventDispatchLoopExecution;
-import org.eclipse.papyrus.moka.kernel.SuspensionReasons;
-import org.eclipse.papyrus.moka.kernel.assistant.Suspension;
-import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
import org.eclipse.papyrus.moka.kernel.scheduling.control.IExecutionLoop;
-import org.eclipse.papyrus.moka.kernel.service.IExecutionEngineService;
-import org.eclipse.papyrus.moka.kernel.service.ServiceRegistry;
-import org.eclipse.uml2.uml.Element;
public class UMLEventDispatchLoopTaskExecution extends UMLTaskExecution implements IUMLEventDispatchLoopExecution {
@@ -110,15 +95,8 @@
}
try {
dispatchLoop.dispatchNextEvent();
- } catch (DebugAssistantException debugAssistantException) {
- List<IExecutionEngineService<IExecutionEngine>> debugServices = ServiceRegistry.getInstance()
- .getService(IDebugService.class);
- if (!debugServices.isEmpty()) {
- fireErrorDetectionError((IDebugService<?, ?>) debugServices.get(0), debugAssistantException);
- }
- // debugAssistantException.printStackTrace();
} catch (Exception e) {
- // e.printStackTrace();
+ e.printStackTrace();
} finally {
if (dispatchLoopLock.isHeldByCurrentThread()) {
dispatchLoopLock.unlock();
@@ -126,56 +104,6 @@
}
}
- protected void fireErrorDetectionError(IDebugService<?, ?> executionEngineService,
- DebugAssistantException debugAssistantException) {
- Suspension suspension = new Suspension(debugAssistantException.getDebugAssistant(),
- SuspensionReasons.ERROR_DETECTION);
- if (executionEngineService
- .shouldContinueInDebugAssistant(debugAssistantException.getDebugAssistant().getAssistantID())) {
- Element node = debugAssistantException.getVisitorNode();
- ISemanticVisitor visitor = debugAssistantException.getVisitor();
- if (node != null) {
- // Open diagrams
- DiagramHandler diagramManager = getDiagramHandler(debugAssistantException);
- if (diagramManager != null) {
- if (!diagramManager.hasOpenedDiagram(node)) {
- diagramManager.openDiagrams(node);
- } else {
- diagramManager.selectDiagrams(node);
- }
- }
-
- // Ask to every UMLSemanticVisitorExecution service to suspend
- Collection<IExecutionEngineService<IExecutionEngine>> allServices = ServiceRegistry.getInstance()
- .getAllServices();
- for (IExecutionEngineService<IExecutionEngine> service : allServices) {
- if (service instanceof UMLSemanticVisitorExecutionListener) {
- if (!(service instanceof IDebugService)) {
- ((UMLSemanticVisitorExecutionListener) service).nodeSuspended(visitor, suspension);
- }
- }
- }
- // The debug service suspend the thread so it should works in last
- if (executionEngineService instanceof UMLSemanticVisitorExecutionListener) {
- ((UMLSemanticVisitorExecutionListener) executionEngineService).nodeSuspended(visitor, suspension);
- }
- }
- }
- }
-
- private DiagramHandler getDiagramHandler(DebugAssistantException debugAssistantException) {
- List<IExecutionEngineService<IExecutionEngine>> animationServices = ServiceRegistry.getInstance()
- .getService(AnimationService.class);
- if (!animationServices.isEmpty()) {
- AnimationService animationService = (AnimationService) animationServices.get(0);
- AnimationEngine animationEngine = animationService.getEngine();
- if (animationEngine != null) {
- return animationEngine.getDiagramHandler();
- }
- }
- return null;
- }
-
/**
* Dispatch the next event. If events remain to be dispatched then include this
* execution to the loop
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time.interfaces/.classpath b/plugins/org.eclipse.papyrus.moka.engine.uml.time.interfaces/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time.interfaces/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time.interfaces/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time.interfaces/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.uml.time.interfaces/META-INF/MANIFEST.MF
index fb97122..a0823e7 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time.interfaces/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time.interfaces/META-INF/MANIFEST.MF
@@ -5,7 +5,6 @@
Bundle-Version: 4.1.0.qualifier
Bundle-Vendor: Eclipse Modeling Project
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Require-Bundle: org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)"
+Require-Bundle: org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.papyrus.moka.engine.uml.time.interfaces
Automatic-Module-Name: org.eclipse.papyrus.moka.timedfuml.interfaces
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/.classpath b/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/.classpath
index bc57d23..96d2680 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/.project b/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/.project
index 89574ef..698cd5a 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/.project
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/META-INF/MANIFEST.MF
index 0c89cf8..005e1ad 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/META-INF/MANIFEST.MF
@@ -4,8 +4,8 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.engine.uml.time.scheduling;singleton:=true
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.engine.uml.time.scheduling.de.Activator
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.moka.engine.uml.time.scheduling.control,
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/src/org/eclipse/papyrus/moka/engine/uml/time/scheduling/de/actions/DisplayCurrentTimeAction.java b/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/src/org/eclipse/papyrus/moka/engine/uml/time/scheduling/de/actions/DisplayCurrentTimeAction.java
index 1f44a63..8635ae9 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/src/org/eclipse/papyrus/moka/engine/uml/time/scheduling/de/actions/DisplayCurrentTimeAction.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time.scheduling/src/org/eclipse/papyrus/moka/engine/uml/time/scheduling/de/actions/DisplayCurrentTimeAction.java
@@ -19,7 +19,6 @@
import java.io.OutputStream;
import org.eclipse.papyrus.moka.engine.uml.time.scheduling.de.DEScheduler;
-import org.eclipse.papyrus.moka.engine.uml.time.scheduling.de.actions.CallbackAction;
/**
* @author ac221913
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time/.classpath b/plugins/org.eclipse.papyrus.moka.engine.uml.time/.classpath
index bc57d23..96d2680 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time/.project b/plugins/org.eclipse.papyrus.moka.engine.uml.time/.project
index 9e47f6d..d6699b7 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time/.project
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -36,6 +31,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.uml.time/META-INF/MANIFEST.MF
index af46023..6e54e0b 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time/META-INF/MANIFEST.MF
@@ -4,54 +4,41 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.engine.uml.time;singleton:=true
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.engine.uml.time.Activator
-Require-Bundle: org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.time.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pssm;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.time.interfaces;bundle-version="[4.0.0,5.0.0)",
+Require-Bundle: org.eclipse.papyrus.moka.engine.uml.time.scheduling;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.engine.uml.time.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)",
- org.eclipse.papyrus.moka.engine.uml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
+ org.eclipse.papyrus.moka.engine.uml.debug;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.moka.kernel.animation;bundle-version="[4.0.0,5.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.papyrus.moka.engine.uml.time;
- uses:="org.osgi.framework,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.moka.fuml.statemachines,
- org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1",
- org.eclipse.papyrus.moka.engine.uml.time.actions;
- uses:="org.eclipse.papyrus.moka.timedfuml.semantics,
- org.eclipse.papyrus.moka.discreteevent.actions,
- org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel,
- org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1",
- org.eclipse.papyrus.moka.engine.uml.time.semantics;uses:="org.eclipse.uml2.uml,org.eclipse.papyrus.moka.fuml.Semantics.impl.Actions.BasicActions,org.eclipse.papyrus.moka.composites.Semantics.impl.CompositeStructures.InvocationActions",
- org.eclipse.papyrus.moka.engine.uml.time.semantics.Actions.CompleteActions;uses:="org.eclipse.papyrus.moka.fuml.Semantics.impl.Actions.CompleteActions,org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications",
- org.eclipse.papyrus.moka.engine.uml.time.semantics.CommonBehaviors;
- uses:="org.eclipse.uml2.uml,
- org.eclipse.papyrus.moka.fuml.Semantics.impl.CommonBehaviors.Communications,
- org.eclipse.papyrus.moka.timedfuml.interfaces.semantics.CommonBehaviors,
- org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel,
- org.eclipse.papyrus.moka.fuml.statemachines.Semantics.CommonBehavior",
- org.eclipse.papyrus.moka.engine.uml.time.semantics.Loci;
- uses:="org.eclipse.papyrus.moka.fuml.statemachines.Semantics.Loci,
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel,
- org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1",
- org.eclipse.papyrus.moka.engine.uml.time.semantics.StateMachines;
- uses:="org.eclipse.papyrus.moka.fuml.statemachines.interfaces.Semantics.StateMachines,
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.moka.fuml.statemachines.Semantics.StateMachines,
- org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel",
- org.eclipse.papyrus.moka.engine.uml.time.semantics.StructuredClassifiers;uses:="org.eclipse.uml2.uml,org.eclipse.papyrus.moka.fuml.statemachines.Semantics.StructuredClassifiers"
+Export-Package: org.eclipse.papyrus.moka.engine.uml.time; uses:="org.osgi.framework,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.moka.fuml.statemachines,
+ org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1",
+ org.eclipse.papyrus.moka.engine.uml.time.actions; uses:="org.eclipse.papyrus.moka.timedfuml.semantics,
+ org.eclipse.papyrus.moka.discreteevent.actions,
+ org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel,
+ org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1",
+ org.eclipse.papyrus.moka.engine.uml.time.semantics;uses:="org.eclipse.uml2.uml,
+ org.eclipse.papyrus.moka.fuml.Semantics.impl.Actions.BasicActions,
+ org.eclipse.papyrus.moka.composites.Semantics.impl.CompositeStructures.InvocationActions",
+ org.eclipse.papyrus.moka.engine.uml.time.semantics.Actions.CompleteActions;uses:="org.eclipse.papyrus.moka.fuml.Semantics.impl.Actions.CompleteActions,
+ org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications",
+ org.eclipse.papyrus.moka.engine.uml.time.semantics.CommonBehaviors; uses:="org.eclipse.uml2.uml,
+ org.eclipse.papyrus.moka.fuml.Semantics.impl.CommonBehaviors.Communications,
+ org.eclipse.papyrus.moka.timedfuml.interfaces.semantics.CommonBehaviors,
+ org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel,
+ org.eclipse.papyrus.moka.fuml.statemachines.Semantics.CommonBehavior",
+ org.eclipse.papyrus.moka.engine.uml.time.semantics.Loci; uses:="org.eclipse.papyrus.moka.fuml.statemachines.Semantics.Loci,
+ org.eclipse.uml2.uml,
+ org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel,
+ org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1",
+ org.eclipse.papyrus.moka.engine.uml.time.semantics.StateMachines; uses:="org.eclipse.papyrus.moka.fuml.statemachines.interfaces.Semantics.StateMachines,
+ org.eclipse.uml2.uml,
+ org.eclipse.papyrus.moka.fuml.statemachines.Semantics.StateMachines,
+ org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel",
+ org.eclipse.papyrus.moka.engine.uml.time.semantics.StructuredClassifiers;uses:="org.eclipse.uml2.uml,
+ org.eclipse.papyrus.moka.fuml.statemachines.Semantics.StructuredClassifiers"
Bundle-Vendor: Eclipse Modeling Project
Automatic-Module-Name: org.eclipse.papyrus.moka.engine.uml.time
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time/plugin.xml b/plugins/org.eclipse.papyrus.moka.engine.uml.time/plugin.xml
index 989fac0..e20d20a 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time/plugin.xml
@@ -9,5 +9,17 @@
id="org.eclipse.papyrus.moka.engine.uml.time">
</engine>
</extension>
-
+ <extension
+ point="org.eclipse.papyrus.moka.kernel.service">
+ <service
+ class="org.eclipse.papyrus.moka.engine.uml.debug.service.UMLDebugService"
+ description="UML Debug Service">
+ <context
+ engineID="org.eclipse.papyrus.moka.engine.uml.debug">
+ </context>
+ <context
+ engineID="org.eclipse.papyrus.moka.engine.uml.time">
+ </context>
+ </service>
+ </extension>
</plugin>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time/src/org/eclipse/papyrus/moka/engine/uml/time/Activator.java b/plugins/org.eclipse.papyrus.moka.engine.uml.time/src/org/eclipse/papyrus/moka/engine/uml/time/Activator.java
index 0d09997..f9283c1 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time/src/org/eclipse/papyrus/moka/engine/uml/time/Activator.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time/src/org/eclipse/papyrus/moka/engine/uml/time/Activator.java
@@ -13,7 +13,8 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.engine.uml.time;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -22,28 +23,27 @@
/**
* Plugin instance
*/
- private static Activator PLUGIN;
-
+ private static Activator plugin;
+
/**
* Logger used within that plugin
*/
- public static LogHelper LOGGER;
-
+ public ILog logger;
+
@Override
public void start(BundleContext context) throws Exception {
- PLUGIN = this;
- LOGGER = new LogHelper(context.getBundle());
+ plugin = this;
+ logger = Platform.getLog(this.getClass());
}
@Override
public void stop(BundleContext context) throws Exception {
- LOGGER = null;
- PLUGIN = null;
+ logger = null;
+ plugin = null;
}
-
- public static Activator getInstance(){
- return PLUGIN;
+
+ public static Activator getInstance() {
+ return plugin;
}
}
-
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.time/src/org/eclipse/papyrus/moka/engine/uml/time/UMLTimedExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.engine.uml.time/src/org/eclipse/papyrus/moka/engine/uml/time/UMLTimedExecutionEngine.java
index 53ff712..5d825f2 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.time/src/org/eclipse/papyrus/moka/engine/uml/time/UMLTimedExecutionEngine.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml.time/src/org/eclipse/papyrus/moka/engine/uml/time/UMLTimedExecutionEngine.java
@@ -16,34 +16,28 @@
import java.util.ArrayList;
import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.moka.engine.uml.UMLExecutionEngine;
-import org.eclipse.papyrus.moka.engine.uml.time.scheduling.control.TimedExecutionLoop;
import org.eclipse.papyrus.moka.engine.uml.time.scheduling.de.DEScheduler;
import org.eclipse.papyrus.moka.engine.uml.time.scheduling.de.actions.DisplayCurrentTimeAction;
-import org.eclipse.papyrus.moka.engine.uml.time.semantics.Loci.TimedExecutionFactory;
-import org.eclipse.papyrus.moka.engine.uml.time.semantics.Loci.TimedLocus;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.loci.ILocus;
import org.eclipse.papyrus.moka.fuml.tasks.IUMLRootTaskExecution;
import org.eclipse.papyrus.moka.kernel.engine.ExecutionEngineException;
-import org.eclipse.papyrus.moka.kernel.scheduling.control.ExecutionController;
-import org.eclipse.papyrus.moka.kernel.scheduling.control.IExecutionController;
import org.eclipse.papyrus.moka.kernel.scheduling.control.Scheduler;
-import org.eclipse.papyrus.moka.pscs.loci.CS_Executor;
import org.eclipse.uml2.uml.Element;
-public class UMLTimedExecutionEngine extends UMLExecutionEngine{
+public class UMLTimedExecutionEngine extends UMLExecutionEngine {
protected double getStopTime() {
// Scheduler stop time
return -1.0;
}
-
- protected void initDEScheduler(){
+
+ protected void initDEScheduler() {
// Initialize the scheduler
DEScheduler.init(this.getStopTime());
}
-
+
protected void doPreRunActions() {
// This method can be overridden to perform pre-run initializations that can be
// needed for a given customization. Typically useful to register pre-step
@@ -55,43 +49,35 @@
// This method can be overridden to perform post-run finalization that can be
// needed for a given customization.
}
-
- @Override
- public IExecutionController createController() {
- ExecutionController controller = new ExecutionController();
- controller.setExecutionLoop(new TimedExecutionLoop());
- return controller;
- }
-
- @Override
- public ILocus createLocus() {
- this.locus = new TimedLocus();
- locus.setExecutor(new CS_Executor());
- locus.setFactory(new TimedExecutionFactory());
- return this.locus;
- }
-
+
@Override
public void start(SubMonitor monitor) throws ExecutionEngineException {
- // Starts the execution loop
- Element source = (Element) configuration.getExecutionSource();
- if(locus != null && source != null) {
- IUMLRootTaskExecution<?> rootExecution = rootTaskFactory.createRootExecution(source);
- if(rootExecution != null) {
- rootExecution.setLocus(locus);
- rootExecution.setInputParameterValues(new ArrayList<IParameterValue>());
- if(rootExecution.canExecute()) {
- initDEScheduler();
- doPreRunActions();
- controller.getExecutionLoop().init(rootExecution, new Scheduler());
- controller.start();
- doPostRunActions();
+ EObject executionSource = configuration.getExecutionSource();
+ if (executionSource instanceof Element) {
+ // Starts the execution loop
+ Element source = (Element) configuration.getExecutionSource();
+ if (locus != null && source != null) {
+ IUMLRootTaskExecution<?> rootExecution = rootTaskFactory.createRootExecution(source);
+ if (rootExecution != null) {
+ rootExecution.setLocus(locus);
+ rootExecution.setInputParameterValues(new ArrayList<IParameterValue>());
+ if (rootExecution.canExecute()) {
+ initDEScheduler();
+ doPreRunActions();
+ controller.getExecutionLoop().init(rootExecution, new Scheduler());
+ controller.start();
+ doPostRunActions();
+ } else {
+ throw new ExecutionEngineException(identifier, status,
+ "Could not start the execution from the specified model element"); //$NON-NLS-1$
+ }
} else {
- throw new ExecutionEngineException(identifier, status, "Could not start the execution from the specified model element"); //$NON-NLS-1$
+ throw new ExecutionEngineException(identifier, status,
+ "Could not instantiate an execution from the specified element"); //$NON-NLS-1$
}
- } else {
- throw new ExecutionEngineException(identifier, status, "Could not instantiate an execution from the specified element"); //$NON-NLS-1$
}
+ } else {
+ throw new IllegalArgumentException("ExecutionSource in configuration must be instanceOf UML::Element");
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/.classpath b/plugins/org.eclipse.papyrus.moka.engine.uml/.classpath
index 1d45a8a..aa0d560 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/.classpath
@@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
+ <attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.engine.uml/META-INF/MANIFEST.MF
index 22278cf..9a23a77 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/META-INF/MANIFEST.MF
@@ -5,25 +5,12 @@
Bundle-Version: 4.1.0.qualifier
Automatic-Module-Name: org.eclipse.papyrus.moka.engine.uml
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Require-Bundle: org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.equinox.registry;bundle-version="[3.8.0,4.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pssm;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.osgi;bundle-version="[3.15.300,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)"
-Export-Package: org.eclipse.papyrus.moka.engine.uml,
- org.eclipse.papyrus.moka.engine.uml.libraries
+Require-Bundle: org.eclipse.papyrus.moka.pssm;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.engine.uml.scheduling;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.moka.engine.schedulable;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.fuml.library;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.utils;bundle-version="[4.1.0,5.0.0)"
+Export-Package: org.eclipse.papyrus.moka.engine.uml
Bundle-Activator: org.eclipse.papyrus.moka.engine.uml.Activator
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/build.properties b/plugins/org.eclipse.papyrus.moka.engine.uml/build.properties
index a62c2d5..cc91072 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/build.properties
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/build.properties
@@ -1,6 +1,4 @@
source.. = src/
bin.includes = META-INF/,\
.,\
- plugin.xml,\
- schema/
-src.includes = schema/
+ plugin.xml
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/plugin.xml b/plugins/org.eclipse.papyrus.moka.engine.uml/plugin.xml
index 07babc3..c46c80e 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/plugin.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
-<extension-point id="org.eclipse.papyrus.moka.engine.uml.library" name="org.eclipse.papyrus.moka.engine.uml.library" schema="schema/org.eclipse.papyrus.moka.engine.uml.library.exsd"/>
<extension
point="org.eclipse.papyrus.moka.kernel.engine">
<engine
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/AbstractUMLExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/AbstractUMLExecutionEngine.java
new file mode 100644
index 0000000..bae5e9a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/AbstractUMLExecutionEngine.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2019, 2020 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.uml;
+
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.papyrus.moka.engine.schedulable.AbstractScheduledExecutionEngine;
+import org.eclipse.papyrus.moka.engine.uml.scheduling.UMLTaskExecutionFactory;
+import org.eclipse.papyrus.moka.fuml.loci.ILocus;
+import org.eclipse.papyrus.moka.fuml.tasks.IUMLTaskExecutionFactory;
+import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
+import org.eclipse.papyrus.moka.kernel.scheduling.control.ExecutionController;
+import org.eclipse.papyrus.moka.kernel.scheduling.control.ExecutionLoop;
+import org.eclipse.papyrus.moka.kernel.scheduling.control.IExecutionController;
+
+public abstract class AbstractUMLExecutionEngine extends AbstractScheduledExecutionEngine
+ implements IUMLExecutionEngine {
+
+ /**
+ * Virtual machine on which the execution takes place
+ */
+ protected ILocus locus;
+
+ /**
+ * Factory enabling the creation of the appropriate root task for this engine
+ */
+ protected IUMLTaskExecutionFactory rootTaskFactory;
+
+ @Override
+ protected void init(EngineConfiguration<?> configuration, SubMonitor monitor) {
+
+ super.init(configuration, monitor);
+ locus = createLocus();
+ rootTaskFactory = createUMLTaskFactory();
+ controller = createController();
+ locus.getFactory().setTaskFactory(rootTaskFactory);
+ installBuiltInTypes();
+ installLibraries();
+ installSemanticStrategies();
+ }
+
+ /**
+ * Create the UML task factory used by this engine
+ *
+ * @return the task factory
+ */
+ protected IUMLTaskExecutionFactory createUMLTaskFactory() {
+ return new UMLTaskExecutionFactory(controller.getExecutionLoop());
+ }
+
+ /**
+ * @see {@link IDebuggableExecutionEngine#createController()}
+ */
+ public IExecutionController createController() {
+ IExecutionController controller = new ExecutionController();
+ controller.setExecutionLoop(new ExecutionLoop());
+ return controller;
+ }
+
+ /**
+ * Create and parameterize the locus
+ */
+ @Override
+ public ILocus createLocus() {
+ return UMLExecutionEngineHelper.createLocus();
+ }
+
+ /**
+ * Register UML primitive types
+ */
+ @Override
+ public void installBuiltInTypes() {
+ UMLExecutionEngineHelper.installBuiltInTypes(configuration, locus);
+ }
+
+ /**
+ * Install all registered libraries (e.g., the FUML Library)
+ */
+ @Override
+ public void installLibraries() {
+
+ UMLExecutionEngineHelper.installLibraries(configuration, locus);
+ }
+
+ /**
+ * Install semantic strategies used to realized the execution
+ */
+ @Override
+ public void installSemanticStrategies() {
+ UMLExecutionEngineHelper.installSemanticStrategies(locus);
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/Activator.java b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/Activator.java
index ad3523f..ab33c7c 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/Activator.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/Activator.java
@@ -14,7 +14,8 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.engine.uml;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -23,27 +24,27 @@
/**
* Plugin instance
*/
- private static Activator PLUGIN;
-
+ private static Activator plugin;
+
/**
* Logger used within that plugin
*/
- public static LogHelper LOGGER;
-
+ public ILog logger;
+
@Override
public void start(BundleContext context) throws Exception {
- PLUGIN = this;
- LOGGER = new LogHelper(context.getBundle());
+ plugin = this;
+ logger = Platform.getLog(this.getClass());
}
@Override
public void stop(BundleContext context) throws Exception {
- LOGGER = null;
- PLUGIN = null;
+ logger = null;
+ plugin = null;
}
-
- public static Activator getInstance(){
- return PLUGIN;
+
+ public static Activator getInstance() {
+ return plugin;
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/IUMLExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/IUMLExecutionEngine.java
index d9f0c72..f30fc25 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/IUMLExecutionEngine.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/IUMLExecutionEngine.java
@@ -14,29 +14,31 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.engine.uml;
+import org.eclipse.papyrus.moka.engine.schedulable.IScheduledExecutionEngine;
import org.eclipse.papyrus.moka.fuml.loci.ILocus;
-public interface IUMLExecutionEngine {
+public interface IUMLExecutionEngine extends IScheduledExecutionEngine {
/**
* Instantiate the locus that hosts the execution
+ *
* @return
*/
ILocus createLocus();
-
+
/**
* Install built in types (e.g., primitive ones)
*/
void installBuiltInTypes();
-
+
/**
* Install Opaque Behavior Execution for behavior defined in model libraries
*/
void installLibraries();
-
+
/**
* Install Executable UML semantic strategies
*/
void installSemanticStrategies();
-
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/UMLExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/UMLExecutionEngine.java
index fec1e8b..0d5d433 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/UMLExecutionEngine.java
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/UMLExecutionEngine.java
@@ -17,83 +17,14 @@
import java.util.ArrayList;
import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.papyrus.moka.debug.engine.DebuggableExecutionEngine;
-import org.eclipse.papyrus.moka.debug.engine.IDebuggableExecutionEngine;
-import org.eclipse.papyrus.moka.debug.engine.IDebuggableExecutionEngineThread;
-import org.eclipse.papyrus.moka.engine.uml.libraries.LibraryRegistry;
-import org.eclipse.papyrus.moka.engine.uml.scheduling.IsTargetThreadCondition;
-import org.eclipse.papyrus.moka.engine.uml.scheduling.UMLTaskExecutionFactory;
-import org.eclipse.papyrus.moka.fuml.actions.DefaultCreateObjectActionStrategy;
-import org.eclipse.papyrus.moka.fuml.actions.DefaultGetAssociationStrategy;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.FIFOGetNextEventStrategy;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.loci.FirstChoiceStrategy;
-import org.eclipse.papyrus.moka.fuml.loci.ILocus;
-import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
-import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.fuml.tasks.IUMLRootTaskExecution;
-import org.eclipse.papyrus.moka.fuml.tasks.IUMLTaskExecutionFactory;
-import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
import org.eclipse.papyrus.moka.kernel.engine.ExecutionEngineException;
import org.eclipse.papyrus.moka.kernel.scheduling.control.Scheduler;
-import org.eclipse.papyrus.moka.pscs.actions.additions.CS_NotNormativeDefaultConstructStrategy;
-import org.eclipse.papyrus.moka.pscs.loci.CS_Executor;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_DefaultRequestPropagationStrategy;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_DispatchOperationOfInterfaceStrategy;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy;
-import org.eclipse.papyrus.moka.pssm.loci.SM_ExecutionFactory;
-import org.eclipse.papyrus.moka.pssm.loci.SM_Locus;
-import org.eclipse.papyrus.moka.utils.UMLPrimitiveTypesUtils;
import org.eclipse.uml2.uml.Element;
-public class UMLExecutionEngine extends DebuggableExecutionEngine<IObject_, ISemanticVisitor>
- implements IUMLExecutionEngine {
-
- /**
- * Virtual machine on which the execution takes place
- */
- protected ILocus locus;
-
- /**
- * Factory enabling the creation of the appropriate root task for this engine
- */
- protected IUMLTaskExecutionFactory rootTaskFactory;
-
- /**
- * Behave as the super class. In addition, instantiate the locus and
- * parameterize it with the appropriate execution factory and executor. Finally,
- * built in types, libraries and semantic strategies are installed at the locus
- */
- @Override
- public void init(EngineConfiguration<?> configuration, SubMonitor monitor) {
- super.init(configuration, monitor);
- locus = createLocus();
- rootTaskFactory = createUMLTaskFactory();
- locus.getFactory().setTaskFactory(rootTaskFactory);
- installBuiltInTypes();
- installLibraries();
- installSemanticStrategies();
- }
-
- /**
- * Create the UML task factory used by this engine
- *
- * @return the task factory
- */
- protected IUMLTaskExecutionFactory createUMLTaskFactory() {
- return new UMLTaskExecutionFactory(controller.getExecutionLoop());
- }
-
- /**
- * Create and parameterize the locus
- */
- @Override
- public ILocus createLocus() {
- ILocus locus = new SM_Locus();
- locus.setExecutor(new CS_Executor());
- locus.setFactory(new SM_ExecutionFactory());
- return locus;
- }
+public class UMLExecutionEngine extends AbstractUMLExecutionEngine {
/**
* Start the execution. This is technically realized by adding the the root
@@ -101,111 +32,32 @@
*/
@Override
public void start(SubMonitor monitor) throws ExecutionEngineException {
- Element source = (Element) configuration.getExecutionSource();
- if (locus != null && source != null) {
- IUMLRootTaskExecution<?> rootExecution = rootTaskFactory.createRootExecution(source);
- if(rootExecution != null) {
- rootExecution.setLocus(locus);
- rootExecution.setInputParameterValues(new ArrayList<IParameterValue>());
- if(rootExecution.canExecute()) {
- controller.getExecutionLoop().init(rootExecution, new Scheduler());
- SubMonitor progress = monitor.split(1);
- progress.subTask("Run model"); //$NON-NLS-1$
- controller.start();
- progress.worked(1);
+ EObject executionSource = configuration.getExecutionSource();
+ if (executionSource instanceof Element) {
+ Element source = (Element) configuration.getExecutionSource();
+ if (locus != null && source != null) {
+ IUMLRootTaskExecution<?> rootExecution = rootTaskFactory.createRootExecution(source);
+ if (rootExecution != null) {
+ rootExecution.setLocus(locus);
+ rootExecution.setInputParameterValues(new ArrayList<IParameterValue>());
+ if (rootExecution.canExecute()) {
+ controller.getExecutionLoop().init(rootExecution, new Scheduler());
+ SubMonitor progress = monitor.split(1);
+ progress.subTask("Run model"); //$NON-NLS-1$
+ controller.start();
+ progress.worked(1);
+ } else {
+ throw new ExecutionEngineException(identifier, status,
+ "Could not start the execution from the specified model element"); //$NON-NLS-1$
+ }
} else {
- throw new ExecutionEngineException(identifier, status, "Could not start the execution from the specified model element"); //$NON-NLS-1$
+ throw new ExecutionEngineException(identifier, status,
+ "Could not instantiate an execution from the specified element"); //$NON-NLS-1$
}
- } else {
- throw new ExecutionEngineException(identifier, status, "Could not instantiate an execution from the specified element"); //$NON-NLS-1$
}
+ } else {
+ throw new IllegalArgumentException("ExecutionSource in configuration must be instanceOf UML::Element");
}
}
- /**
- * Register UML primitive types
- */
- @Override
- public void installBuiltInTypes() {
- Element source = (Element) configuration.getExecutionSource();
- if (locus != null && source != null) {
- locus.getFactory().addBuiltInType(UMLPrimitiveTypesUtils.getReal(source));
- locus.getFactory().addBuiltInType(UMLPrimitiveTypesUtils.getInteger(source));
- locus.getFactory().addBuiltInType(UMLPrimitiveTypesUtils.getBoolean(source));
- locus.getFactory().addBuiltInType(UMLPrimitiveTypesUtils.getString(source));
- }
- }
-
- /**
- * Install all registered libraries (e.g., the FUML Library)
- */
- @Override
- public void installLibraries() {
- Element source = (Element) configuration.getExecutionSource();
- if (locus != null && source.eResource() != null && source.eResource().getResourceSet() != null) {
- LibraryRegistry.getInstance().loadLibraryFactories(source.eResource().getResourceSet());
- LibraryRegistry.getInstance().installLibraries(locus);
- }
- }
-
- /**
- * Install semantic strategies used to realized the execution
- */
- @Override
- public void installSemanticStrategies() {
- if (locus != null) {
- locus.getFactory().setStrategy(new FirstChoiceStrategy());
- locus.getFactory().setStrategy(new FIFOGetNextEventStrategy());
- locus.getFactory().setStrategy(new CS_DispatchOperationOfInterfaceStrategy());
- locus.getFactory().setStrategy(new CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy());
- locus.getFactory().setStrategy(new CS_DefaultRequestPropagationStrategy());
- locus.getFactory().setStrategy(new CS_NotNormativeDefaultConstructStrategy());
- locus.getFactory().setStrategy(new DefaultGetAssociationStrategy());
- locus.getFactory().setStrategy(new DefaultCreateObjectActionStrategy());
- }
- }
-
- /**
- * @see {@link IDebuggableExecutionEngine#suspendThread(Object)}
- */
- @Override
- public IDebuggableExecutionEngineThread<IObject_, ISemanticVisitor> getThread(String identifier) {
- IDebuggableExecutionEngineThread<IObject_, ISemanticVisitor> thread = null;
- if(!debuggableThreadLock.isHeldByCurrentThread()) {
- debuggableThreadLock.lock();
- }
- thread = debuggableThread.get(identifier);
- if(debuggableThreadLock.isHeldByCurrentThread()) {
- debuggableThreadLock.unlock();
- }
- return thread;
- }
-
- /**
- * @see {@link IDebuggableExecutionEngine#suspendThread(Object)}
- *
- * Execution of this active object is suspended
- */
- public void suspendThread(IDebuggableExecutionEngineThread<IObject_, ISemanticVisitor> debuggableThread) {
- controller.getExecutionLoop().suspend(new IsTargetThreadCondition(debuggableThread.getThread()));
- }
-
- /**
- * @see {@link IDebuggableExecutionEngine#resumeThread(Object)}
- *
- * Execution of this active object is resumed
- */
- public void resumeThread(IDebuggableExecutionEngineThread<IObject_, ISemanticVisitor> debuggableThread) {
- controller.getExecutionLoop().resume(new IsTargetThreadCondition(debuggableThread.getThread()));
- }
-
- /**
- * @see {@link IDebuggableExecutionEngine#terminateThread(Object)}
- *
- * Execution of this active object is terminated
- */
- public void terminateThread(IDebuggableExecutionEngineThread<IObject_, ISemanticVisitor> debuggableThread) {
- controller.getExecutionLoop().terminate(new IsTargetThreadCondition(debuggableThread.getThread()));
- }
-
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/UMLExecutionEngineHelper.java b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/UMLExecutionEngineHelper.java
new file mode 100644
index 0000000..9f02552
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/UMLExecutionEngineHelper.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.engine.uml;
+
+import org.eclipse.papyrus.moka.fuml.actions.DefaultCreateObjectActionStrategy;
+import org.eclipse.papyrus.moka.fuml.actions.DefaultGetAssociationStrategy;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.FIFOGetNextEventStrategy;
+import org.eclipse.papyrus.moka.fuml.library.LibraryRegistry;
+import org.eclipse.papyrus.moka.fuml.loci.FirstChoiceStrategy;
+import org.eclipse.papyrus.moka.fuml.loci.ILocus;
+import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
+import org.eclipse.papyrus.moka.pscs.actions.additions.CS_NotNormativeDefaultConstructStrategy;
+import org.eclipse.papyrus.moka.pscs.loci.CS_Executor;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_DefaultRequestPropagationStrategy;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_DispatchOperationOfInterfaceStrategy;
+import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy;
+import org.eclipse.papyrus.moka.pssm.loci.SM_ExecutionFactory;
+import org.eclipse.papyrus.moka.pssm.loci.SM_Locus;
+import org.eclipse.papyrus.moka.utils.UMLPrimitiveTypesUtils;
+import org.eclipse.uml2.uml.Element;
+
+public class UMLExecutionEngineHelper {
+
+ public static ILocus createLocus() {
+ ILocus locus = new SM_Locus();
+ locus.setExecutor(new CS_Executor());
+ locus.setFactory(new SM_ExecutionFactory());
+ return locus;
+ }
+
+ public static void installBuiltInTypes(EngineConfiguration<?> configuration, ILocus locus) {
+ Element source = (Element) configuration.getExecutionSource();
+ if (locus != null && source != null) {
+ locus.getFactory().addBuiltInType(UMLPrimitiveTypesUtils.getReal(source));
+ locus.getFactory().addBuiltInType(UMLPrimitiveTypesUtils.getInteger(source));
+ locus.getFactory().addBuiltInType(UMLPrimitiveTypesUtils.getBoolean(source));
+ locus.getFactory().addBuiltInType(UMLPrimitiveTypesUtils.getString(source));
+ }
+ }
+
+ public static void installLibraries(EngineConfiguration<?> configuration, ILocus locus) {
+ Element source = (Element) configuration.getExecutionSource();
+ if (locus != null && source.eResource() != null && source.eResource().getResourceSet() != null) {
+ LibraryRegistry.getInstance().loadLibraryFactories(source.eResource().getResourceSet());
+ LibraryRegistry.getInstance().installLibraries(locus);
+ }
+ }
+
+ public static void installSemanticStrategies(ILocus locus) {
+ if (locus != null) {
+ locus.getFactory().setStrategy(new FirstChoiceStrategy());
+ locus.getFactory().setStrategy(new FIFOGetNextEventStrategy());
+ locus.getFactory().setStrategy(new CS_DispatchOperationOfInterfaceStrategy());
+ locus.getFactory().setStrategy(new CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy());
+ locus.getFactory().setStrategy(new CS_DefaultRequestPropagationStrategy());
+ locus.getFactory().setStrategy(new CS_NotNormativeDefaultConstructStrategy());
+ locus.getFactory().setStrategy(new DefaultGetAssociationStrategy());
+ locus.getFactory().setStrategy(new DefaultCreateObjectActionStrategy());
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/.classpath b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/.project b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/.project
index 0d6ebe6..4635222 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/.project
+++ b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/META-INF/MANIFEST.MF
index 609934e..6b83654 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/META-INF/MANIFEST.MF
@@ -1,12 +1,6 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.3.0,3.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
- org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.papyrus.uml.alf;bundle-version="[3.0.0,5.0.0)"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
+ org.eclipse.papyrus.moka.fuml.library;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.papyrus.moka.fuml.assertionlibrary,
org.eclipse.papyrus.moka.fuml.assertionlibrary.basic,
org.eclipse.papyrus.moka.fuml.assertionlibrary.reporting,
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/plugin.xml b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/plugin.xml
index 590ca0e..8198fc0 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/plugin.xml
@@ -19,7 +19,7 @@
</library>
</extension>
<extension
- point="org.eclipse.papyrus.moka.engine.uml.library">
+ point="org.eclipse.papyrus.moka.fuml.library">
<library
libraryFactoryClass="org.eclipse.papyrus.moka.fuml.assertionlibrary.AssertionLibraryExecutionFactory"
libraryURI="pathmap://PAPYRUS_ASSERTION_LIBRARY/AssertionLibrary.uml">
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/Activator.java b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/Activator.java
index 0a6c80d..435780b 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/Activator.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/Activator.java
@@ -13,14 +13,19 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.fuml.assertionlibrary;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.osgi.framework.BundleContext;
public class Activator extends Plugin {
+
+ /**
+ * Plugin instance
+ */
+ private static Activator plugin;
- public static LogHelper log;
-
+ public ILog logger;
/*
* (non-Javadoc)
*
@@ -29,7 +34,8 @@
@Override
public void start(BundleContext bundleContext) throws Exception {
super.start(bundleContext);
- log = new LogHelper(this);
+ plugin = this;
+ logger = Platform.getLog(this.getClass());
}
/*
@@ -39,7 +45,13 @@
*/
@Override
public void stop(BundleContext bundleContext) throws Exception {
+ logger = null;
+ plugin = null;
super.stop(bundleContext);
}
+
+ public static Activator getInstance() {
+ return plugin;
+ }
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/AssertionLibraryExecutionFactory.java b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/AssertionLibraryExecutionFactory.java
index d851123..f86adef 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/AssertionLibraryExecutionFactory.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/AssertionLibraryExecutionFactory.java
@@ -15,13 +15,13 @@
import java.util.Map;
-import org.eclipse.papyrus.moka.engine.uml.libraries.LibraryExecutionFactory;
import org.eclipse.papyrus.moka.fuml.assertionlibrary.basic.AssertEquals;
import org.eclipse.papyrus.moka.fuml.assertionlibrary.basic.AssertFalse;
import org.eclipse.papyrus.moka.fuml.assertionlibrary.basic.AssertList;
import org.eclipse.papyrus.moka.fuml.assertionlibrary.basic.AssertTrue;
import org.eclipse.papyrus.moka.fuml.assertionlibrary.reporting.GenerateTestReport;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IOpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.library.LibraryExecutionFactory;
import org.eclipse.papyrus.moka.fuml.loci.ILocus;
import org.eclipse.uml2.uml.OpaqueBehavior;
@@ -29,19 +29,19 @@
@Override
public void installFunctions(ILocus locus) {
- // Instantiate
+ // Instantiate
if (locus != null) {
for (Map.Entry<String, OpaqueBehavior> entry : libraryOpaqueBehavior.entrySet()) {
IOpaqueBehaviorExecution execution = null;
- if(entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.ASSERT_EQUALS)) {
+ if (entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.ASSERT_EQUALS)) {
execution = new AssertEquals();
- } else if(entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.ASSERT_FALSE)) {
+ } else if (entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.ASSERT_FALSE)) {
execution = new AssertFalse();
- } else if(entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.ASSERT_TRUE)) {
+ } else if (entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.ASSERT_TRUE)) {
execution = new AssertTrue();
- } else if(entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.ASSERT_LIST)) {
+ } else if (entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.ASSERT_LIST)) {
execution = new AssertList();
- } else if(entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.GENERATE_TEST_REPORT)) {
+ } else if (entry.getKey().equals(IAssertionLibraryExecutionFactoryUtils.GENERATE_TEST_REPORT)) {
execution = new GenerateTestReport();
}
if (execution != null) {
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/GenerateTestReport.java b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/GenerateTestReport.java
index a6578a5..7cc8cb9 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/GenerateTestReport.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/GenerateTestReport.java
@@ -49,13 +49,13 @@
try {
report = Reporter.INSTANCE.getReport();
} catch (ParserConfigurationException e) {
- Activator.log.error(e);
+ Activator.getInstance().logger.error("Error occured while generating test report",e);
}
try {
transformer = factory.newTransformer();
} catch (TransformerConfigurationException e) {
- Activator.log.error(e);
+ Activator.getInstance().logger.error("Error occured while generating test report",e);
}
if (transformer != null) {
this.writeReport(transformer, report, Platform.getInstanceLocation().getURL(), reportName);
@@ -68,14 +68,14 @@
FileOutputStream out = null;
try {
out = new FileOutputStream(file, false);
- } catch (FileNotFoundException e1) {
- Activator.log.error(e1);
+ } catch (FileNotFoundException e) {
+ Activator.getInstance().logger.error("Error occured while generating test report",e);
return false;
}
try {
transformer.transform(new DOMSource(report), new StreamResult(out));
} catch (TransformerException e) {
- Activator.log.error(e);
+ Activator.getInstance().logger.error("Error occured while generating test report",e);
return false;
}
return true;
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.interfaces/.classpath b/plugins/org.eclipse.papyrus.moka.fuml.interfaces/.classpath
index bc57d23..96d2680 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.interfaces/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.fuml.interfaces/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.interfaces/.project b/plugins/org.eclipse.papyrus.moka.fuml.interfaces/.project
index 15b831f..9ead914 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.interfaces/.project
+++ b/plugins/org.eclipse.papyrus.moka.fuml.interfaces/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,7 +30,6 @@
<nature>org.eclipse.ajdt.ui.ajnature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.interfaces/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.fuml.interfaces/META-INF/MANIFEST.MF
index 7dd07ef..8af723d 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.interfaces/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.fuml.interfaces/META-INF/MANIFEST.MF
@@ -5,11 +5,10 @@
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.fuml.Activator
Bundle-Vendor: Eclipse Modeling Project
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)";visibility:=reexport,
org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)",
- org.eclipse.equinox.registry;bundle-version="[3.8.0,4.0.0)",
- org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)"
+ org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.moka.fuml,
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.library/.classpath b/plugins/org.eclipse.papyrus.moka.fuml.library/.classpath
new file mode 100644
index 0000000..c6fdc8f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/.gitignore b/plugins/org.eclipse.papyrus.moka.fuml.library/.gitignore
similarity index 100%
copy from plugins/org.eclipse.papyrus.moka.engine.uml.debug/.gitignore
copy to plugins/org.eclipse.papyrus.moka.fuml.library/.gitignore
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.library/.project b/plugins/org.eclipse.papyrus.moka.fuml.library/.project
new file mode 100644
index 0000000..d8d329c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.moka.fuml.library</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.library/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.fuml.library/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9c3b411
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.papyrus.moka.fuml.library
+Bundle-SymbolicName: org.eclipse.papyrus.moka.fuml.library;singleton:=true
+Bundle-Version: 4.1.0.qualifier
+Automatic-Module-Name: org.eclipse.papyrus.moka.fuml.library
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)"
+Export-Package: org.eclipse.papyrus.moka.fuml.library
+Bundle-Activator: org.eclipse.papyrus.moka.fuml.library.Activator
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.library/build.properties b/plugins/org.eclipse.papyrus.moka.fuml.library/build.properties
new file mode 100644
index 0000000..a62c2d5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ schema/
+src.includes = schema/
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.library/plugin.xml b/plugins/org.eclipse.papyrus.moka.fuml.library/plugin.xml
new file mode 100644
index 0000000..e85ac5a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/plugin.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+<extension-point id="org.eclipse.papyrus.moka.fuml.library" name="org.eclipse.papyrus.moka.fuml.library" schema="schema/org.eclipse.papyrus.moka.fuml.library.exsd"/>
+</plugin>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.library/pom.xml b/plugins/org.eclipse.papyrus.moka.fuml.library/pom.xml
new file mode 100644
index 0000000..82dcd48
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Engines -->
+ <parent>
+ <groupId>org.eclipse.papyrus.moka</groupId>
+ <artifactId>org.eclipse.papyrus.moka.plugins</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- POM Description -->
+ <artifactId>org.eclipse.papyrus.moka.fuml.library</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <name>org.eclipse.papyrus.moka.fuml.library</name>
+
+</project>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/schema/org.eclipse.papyrus.moka.engine.uml.library.exsd b/plugins/org.eclipse.papyrus.moka.fuml.library/schema/org.eclipse.papyrus.moka.fuml.library.exsd
similarity index 90%
rename from plugins/org.eclipse.papyrus.moka.engine.uml/schema/org.eclipse.papyrus.moka.engine.uml.library.exsd
rename to plugins/org.eclipse.papyrus.moka.fuml.library/schema/org.eclipse.papyrus.moka.fuml.library.exsd
index 2c922bd..d826e27 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/schema/org.eclipse.papyrus.moka.engine.uml.library.exsd
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/schema/org.eclipse.papyrus.moka.fuml.library.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.moka.engine.uml.library" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.papyrus.moka.fuml.library" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.papyrus.moka.engine.uml.library" id="org.eclipse.papyrus.moka.engine.uml.library" name="LibraryExecutionFactory"/>
+ <meta.schema plugin="org.eclipse.papyrus.moka.fuml.library" id="org.eclipse.papyrus.moka.fuml.library" name="LibraryExecutionFactory"/>
</appinfo>
<documentation>
[Enter description of this extension point.]
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/Activator.java b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/Activator.java
new file mode 100644
index 0000000..184751a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/Activator.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.library;
+
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ /**
+ * Plugin instance
+ */
+ private static Activator plugin;
+
+ /**
+ * Logger used within that plugin
+ */
+ public ILog logger;
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ plugin = this;
+ logger = Platform.getLog(this.getClass());
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ logger = null;
+ plugin = null;
+ }
+
+ public static Activator getInstance() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/ILibraryExecutionFactory.java b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/ILibraryExecutionFactory.java
similarity index 91%
rename from plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/ILibraryExecutionFactory.java
rename to plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/ILibraryExecutionFactory.java
index 73fc3a8..1700cd0 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/ILibraryExecutionFactory.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/ILibraryExecutionFactory.java
@@ -13,14 +13,14 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.libraries;
+package org.eclipse.papyrus.moka.fuml.library;
import org.eclipse.papyrus.moka.fuml.loci.ILocus;
public interface ILibraryExecutionFactory {
-
+
void installFunctions(ILocus locus);
-
+
void installServices(ILocus locus);
-
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/LibraryExecutionFactory.java b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/LibraryExecutionFactory.java
similarity index 76%
rename from plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/LibraryExecutionFactory.java
rename to plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/LibraryExecutionFactory.java
index bcfe773..a35d581 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/LibraryExecutionFactory.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/LibraryExecutionFactory.java
@@ -12,7 +12,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.libraries;
+package org.eclipse.papyrus.moka.fuml.library;
import java.util.HashMap;
import java.util.Iterator;
@@ -23,66 +23,65 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IOpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.loci.ILocus;
-import org.eclipse.uml2.uml.OpaqueBehavior;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.OpaqueBehavior;
-public abstract class LibraryExecutionFactory implements ILibraryExecutionFactory{
+public abstract class LibraryExecutionFactory implements ILibraryExecutionFactory {
/**
* Library path
*/
protected URI libraryURI;
-
+
/**
* Resource containing the library
*/
protected Resource libraryResource;
-
+
/**
* Map linking opaque behaviors to their qualified name
*/
protected Map<String, OpaqueBehavior> libraryOpaqueBehavior;
-
+
/**
* Map linking classes to their qualified names
*/
protected Map<String, Class> libraryService;
-
+
public LibraryExecutionFactory() {
libraryOpaqueBehavior = new HashMap<String, OpaqueBehavior>();
libraryService = new HashMap<String, Class>();
}
-
+
/**
* Find all opaque behaviors within the resource
*/
protected void parseLibrary(URI uri, Resource resource) {
libraryURI = uri;
libraryResource = resource;
- if(libraryResource != null) {
+ if (libraryResource != null) {
libraryOpaqueBehavior.clear();
Iterator<EObject> contentIterator = libraryResource.getAllContents();
- while(contentIterator.hasNext()) {
+ while (contentIterator.hasNext()) {
EObject current = contentIterator.next();
- if(!current.eIsProxy() && current instanceof OpaqueBehavior) {
- libraryOpaqueBehavior.put(((OpaqueBehavior)current).getQualifiedName(), (OpaqueBehavior)current);
- } else if(!current.eIsProxy() && !(current instanceof Behavior) && current instanceof Class) {
- libraryService.put(((Class)current).getQualifiedName(), (Class)current);
+ if (!current.eIsProxy() && current instanceof OpaqueBehavior) {
+ libraryOpaqueBehavior.put(((OpaqueBehavior) current).getQualifiedName(), (OpaqueBehavior) current);
+ } else if (!current.eIsProxy() && !(current instanceof Behavior) && current instanceof Class) {
+ libraryService.put(((Class) current).getQualifiedName(), (Class) current);
}
}
}
}
-
+
/**
* Add an opaque behavior execution to the locus
- * @param execution
- * the opaque behavior execution
- * @param locus
- * the locus at which the execution is registered
+ *
+ * @param execution the opaque behavior execution
+ * @param locus the locus at which the execution is registered
*/
protected void register(IOpaqueBehaviorExecution execution, ILocus locus) {
- if(locus != null && execution != null) {
+ if (locus != null && execution != null) {
locus.getFactory().addPrimitiveBehaviorPrototype(execution);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/LibraryRegistry.java b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/LibraryRegistry.java
similarity index 72%
rename from plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/LibraryRegistry.java
rename to plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/LibraryRegistry.java
index c8cc97c..f1999a1 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/LibraryRegistry.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/LibraryRegistry.java
@@ -12,7 +12,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.libraries;
+package org.eclipse.papyrus.moka.fuml.library;
import java.util.ArrayList;
import java.util.List;
@@ -32,48 +32,49 @@
* Factory class attribute name
*/
protected static final String LIBRARY_CLASS = "libraryFactoryClass";
-
+
/**
* URI attribute name
*/
protected static final String LIBRARY_URI = "libraryURI";
-
+
/**
* Library extension point ID
*/
- protected static final String MOKA_ENGINE_LIBRARY_EXTENSION_POINT_ID = "org.eclipse.papyrus.moka.engine.uml.library";
-
+ protected static final String MOKA_ENGINE_LIBRARY_EXTENSION_POINT_ID = "org.eclipse.papyrus.moka.fuml.library";
+
/**
* Library factories instantiated through the registry
*/
protected List<LibraryExecutionFactory> libraryFactory;
-
+
/**
* Library registry self reference
*/
private static LibraryRegistry INSTANCE;
-
+
private LibraryRegistry() {
libraryFactory = new ArrayList<LibraryExecutionFactory>();
}
-
+
public static LibraryRegistry getInstance() {
- if(INSTANCE == null) {
+ if (INSTANCE == null) {
INSTANCE = new LibraryRegistry();
}
return INSTANCE;
}
-
+
/**
* Instantiate all registered libraries
- * @param resourceSet
- * the resource set that should contain the libraries
+ *
+ * @param resourceSet the resource set that should contain the libraries
*/
public void loadLibraryFactories(ResourceSet resourceSet) {
// Instantiate registered libraries
- if(resourceSet != null) {
+ if (resourceSet != null) {
IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] configurations = registry.getConfigurationElementsFor(MOKA_ENGINE_LIBRARY_EXTENSION_POINT_ID);
+ IConfigurationElement[] configurations = registry
+ .getConfigurationElementsFor(MOKA_ENGINE_LIBRARY_EXTENSION_POINT_ID);
for (int i = 0; i < configurations.length; i++) {
URI libraryURI = null;
Object factory = null;
@@ -83,30 +84,30 @@
} catch (CoreException e) {
e.printStackTrace();
}
- if(factory != null && libraryURI != null && !libraryURI.isEmpty()) {
+ if (factory != null && libraryURI != null && !libraryURI.isEmpty()) {
Resource libraryResource = resourceSet.getResource(libraryURI, true);
- if(libraryResource != null) {
- ((LibraryExecutionFactory)factory).parseLibrary(libraryURI, libraryResource);
- libraryFactory.add(((LibraryExecutionFactory)factory));
+ if (libraryResource != null) {
+ ((LibraryExecutionFactory) factory).parseLibrary(libraryURI, libraryResource);
+ libraryFactory.add(((LibraryExecutionFactory) factory));
}
}
}
}
}
-
+
/**
- * Install opaque behavior execution / services provided
- * by the factories to the provided locus
- * @param locus
- * the locus at which the executions / services get installed
+ * Install opaque behavior execution / services provided by the factories to the
+ * provided locus
+ *
+ * @param locus the locus at which the executions / services get installed
*/
public void installLibraries(ILocus locus) {
- for(LibraryExecutionFactory factory : libraryFactory) {
+ for (LibraryExecutionFactory factory : libraryFactory) {
factory.installFunctions(locus);
}
- for(LibraryExecutionFactory factory : libraryFactory) {
+ for (LibraryExecutionFactory factory : libraryFactory) {
factory.installServices(locus);
}
}
-
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/ServiceObject.java b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/ServiceObject.java
similarity index 97%
rename from plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/ServiceObject.java
rename to plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/ServiceObject.java
index 804ce87..93319ce 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/libraries/ServiceObject.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.library/src/org/eclipse/papyrus/moka/fuml/library/ServiceObject.java
@@ -12,7 +12,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.libraries;
+package org.eclipse.papyrus.moka.fuml.library;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IExecution;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/.classpath b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/.classpath
new file mode 100644
index 0000000..685a699
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/.project b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/.project
new file mode 100644
index 0000000..42457f5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.moka.fuml.standardlibrary.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5222972
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.moka.fuml.standardlibrary;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.ui.console;bundle-version="[3.10.0,4.0.0)",
+ org.eclipse.jface;bundle-version="[3.22.0,4.0.0)"
+Export-Package: org.eclipse.papyrus.moka.fuml.standardlibrary.ui
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 4.1.0.qualifier
+Bundle-Name: org.eclipse.papyrus.moka.fuml.standardlibrary.ui
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.moka.fuml.standardlibrary.ui.Activator
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.moka.fuml.standardlibrary.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.eclipse.papyrus.moka.fuml.standardlibrary.ui
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/about.html b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/about.html
new file mode 100644
index 0000000..8d57930
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>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 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>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 <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/build.properties b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/build.properties
new file mode 100644
index 0000000..d41a608
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = target/classes/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ resources/,\
+ about.html,\
+ pom.xml
+src.includes = about.html
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/plugin.properties b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/plugin.properties
new file mode 100644
index 0000000..5d70d58
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# Copyright (c) 2015 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation
+##################################################################################)
+
+pluginDescription=OpaqueBehaviorExecutions for the standard fUML library
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/plugin.xml b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/plugin.xml
new file mode 100644
index 0000000..26762d8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/plugin.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.uml.extensionpoints.UMLLibrary">
+ <library
+ description="Standard fUML Library"
+ iconpath="resources/icons/moka_icon.png"
+ name="FoundationalModelLibrary"
+ path="pathmap://PAPYRUS_fUML_LIBRARY/fUML_Library.uml"
+ provider="CEA LIST">
+ </library>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.moka.fuml.standardlibrary.fumlioconsole">
+ <fumlioconsole
+ fumlioconsoleClass="org.eclipse.papyrus.moka.fuml.standardlibrary.ui.EclipseUIFUMLIOConsole">
+ </fumlioconsole>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/pom.xml b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/pom.xml
new file mode 100644
index 0000000..85808af
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent POM (i.e., Libraries) -->
+ <parent>
+ <groupId>org.eclipse.papyrus.moka</groupId>
+ <artifactId>org.eclipse.papyrus.moka.plugins</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- POM Description -->
+ <artifactId>org.eclipse.papyrus.moka.fuml.standardlibrary.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <name>org.eclipse.papyrus.moka.fuml.standardlibrary.ui</name>
+
+</project>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/resources/icons/moka_icon.png b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/resources/icons/moka_icon.png
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/resources/icons/moka_icon.png
rename to plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/resources/icons/moka_icon.png
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/src/org/eclipse/papyrus/moka/fuml/standardlibrary/ui/Activator.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/src/org/eclipse/papyrus/moka/fuml/standardlibrary/ui/Activator.java
new file mode 100644
index 0000000..a02a9fa
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/src/org/eclipse/papyrus/moka/fuml/standardlibrary/ui/Activator.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.ui;
+
+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.papyrus.moka.fuml.standardlibrary.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)
+ */
+ @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)
+ */
+ @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;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/src/org/eclipse/papyrus/moka/fuml/standardlibrary/ui/EclipseUIFUMLIOConsole.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/src/org/eclipse/papyrus/moka/fuml/standardlibrary/ui/EclipseUIFUMLIOConsole.java
new file mode 100644
index 0000000..a9bb161
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary.ui/src/org/eclipse/papyrus/moka/fuml/standardlibrary/ui/EclipseUIFUMLIOConsole.java
@@ -0,0 +1,35 @@
+package org.eclipse.papyrus.moka.fuml.standardlibrary.ui;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.eclipse.papyrus.moka.fuml.standardlibrary.library.io.IFUMLIOConsole;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.IOConsole;
+
+public class EclipseUIFUMLIOConsole implements IFUMLIOConsole {
+
+ private IOConsole console;
+
+ protected static final String CONSOLE_NAME = "fUML Console";
+
+ @Override
+ public void init() {
+ console = new IOConsole(CONSOLE_NAME, null);
+ IConsoleManager conMan = ConsolePlugin.getDefault().getConsoleManager();
+ conMan.addConsoles(new IConsole[] { console });
+ }
+
+ @Override
+ public InputStream getInputStream() {
+ return console.getInputStream();
+ }
+
+ @Override
+ public OutputStream getOutputStream() {
+ return console.newOutputStream();
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/.classpath b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/.project b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/.project
index 2f0ea9e..d40f2f2 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/.project
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/META-INF/MANIFEST.MF
index 1487941..63b08c3 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/META-INF/MANIFEST.MF
@@ -1,15 +1,6 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.3.0,3.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.ui.console;bundle-version="[3.9.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.moka.fuml.library;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.papyrus.moka.fuml.standardlibrary,
org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_,
org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer,
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.xml b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.xml
index a4303e1..6ea14c1 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.xml
@@ -1,16 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
- <extension
- point="org.eclipse.papyrus.uml.extensionpoints.UMLLibrary">
- <library
- description="Standard fUML Library"
- iconpath="resources/icons/moka_icon.png"
- name="FoundationalModelLibrary"
- path="pathmap://PAPYRUS_fUML_LIBRARY/fUML_Library.uml"
- provider="CEA LIST">
- </library>
- </extension>
+ <extension-point id="org.eclipse.papyrus.moka.fuml.standardlibrary.fumlioconsole" name="fumlioconsole" schema="schema/org.eclipse.papyrus.moka.fuml.standardlibrary.fumlioconsole.exsd"/>
<extension
point="org.eclipse.emf.ecore.uri_mapping">
<mapping
@@ -19,17 +10,10 @@
</mapping>
</extension>
<extension
- point="org.eclipse.papyrus.moka.fuml.services">
- <services
- class="org.eclipse.papyrus.moka.fuml.standardlibrary.StandardServicesRegistry">
- </services>
- </extension>
- <extension
- point="org.eclipse.papyrus.moka.engine.uml.library">
+ point="org.eclipse.papyrus.moka.fuml.library">
<library
libraryFactoryClass="org.eclipse.papyrus.moka.fuml.standardlibrary.FUMLLibraryExecutionFactory"
libraryURI="pathmap://PAPYRUS_fUML_LIBRARY/fUML_Library.uml">
</library>
</extension>
-
-</plugin>
+</plugin>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/schema/org.eclipse.papyrus.moka.engine.uml.library.exsd b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/schema/org.eclipse.papyrus.moka.fuml.standardlibrary.fumlioconsole.exsd
similarity index 72%
copy from plugins/org.eclipse.papyrus.moka.engine.uml/schema/org.eclipse.papyrus.moka.engine.uml.library.exsd
copy to plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/schema/org.eclipse.papyrus.moka.fuml.standardlibrary.fumlioconsole.exsd
index 2c922bd..dbc4ab1 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/schema/org.eclipse.papyrus.moka.engine.uml.library.exsd
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/schema/org.eclipse.papyrus.moka.fuml.standardlibrary.fumlioconsole.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.moka.engine.uml.library" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.papyrus.moka.fuml.standardlibrary" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.papyrus.moka.engine.uml.library" id="org.eclipse.papyrus.moka.engine.uml.library" name="LibraryExecutionFactory"/>
+ <meta.schema plugin="org.eclipse.papyrus.moka.fuml.standardlibrary" id="org.eclipse.papyrus.moka.fuml.standardlibrary.fumlioconsole" name="fumlioconsole"/>
</appinfo>
<documentation>
[Enter description of this extension point.]
@@ -17,9 +17,9 @@
</appinfo>
</annotation>
<complexType>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element ref="library"/>
- </choice>
+ <sequence>
+ <element ref="fumlioconsole"/>
+ </sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
@@ -47,25 +47,18 @@
</complexType>
</element>
- <element name="library">
+ <element name="fumlioconsole">
<complexType>
- <attribute name="libraryFactoryClass" type="string" use="required">
+ <attribute name="fumlioconsoleClass" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.papyrus.moka.engine.uml.libraries.LibraryExecutionFactory:"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.moka.fuml.standardlibrary.library.io.IFUMLIOConsole"/>
</appinfo>
</annotation>
</attribute>
- <attribute name="libraryURI" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
</complexType>
</element>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/Activator.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/Activator.java
index 1b5d00c..d74e3c7 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/Activator.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/Activator.java
@@ -15,6 +15,8 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.fuml.standardlibrary;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
@@ -29,6 +31,8 @@
// The shared instance
private static Activator plugin;
+ public ILog logger;
+
/**
* The constructor
*/
@@ -38,18 +42,21 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.
+ * BundleContext)
*/
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
+ logger = Platform.getLog(this.getClass());
plugin = this;
}
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(BundleContext context) throws Exception {
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/FUMLLibraryExecutionFactory.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/FUMLLibraryExecutionFactory.java
index edad318..9c7eace 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/FUMLLibraryExecutionFactory.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/FUMLLibraryExecutionFactory.java
@@ -17,14 +17,14 @@
import java.util.Map;
-import org.eclipse.papyrus.moka.engine.uml.libraries.LibraryExecutionFactory;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IOpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.library.LibraryExecutionFactory;
import org.eclipse.papyrus.moka.fuml.loci.ILocus;
import org.eclipse.papyrus.moka.fuml.standardlibrary.library.io.StandardInputChannelImpl;
import org.eclipse.papyrus.moka.fuml.standardlibrary.library.io.StandardOutputChannelImpl;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
-import org.eclipse.uml2.uml.OpaqueBehavior;
import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.OpaqueBehavior;
public class FUMLLibraryExecutionFactory extends LibraryExecutionFactory {
@@ -181,7 +181,7 @@
.equals(FUMLLibraryExecutionFactoryUtils.STANDARD_OUTPUT_CHANNEL_SERVICE_NAME)) {
service = new StandardOutputChannelImpl(entry.getValue());
}
- if(service != null) {
+ if (service != null) {
service.setLocus(locus);
locus.add(service);
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToBoolean.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToBoolean.java
index 4d728e7..30b7579 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToBoolean.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToBoolean.java
@@ -34,7 +34,7 @@
try {
String x = ((StringValue) inputParameters.get(0).getValues().get(0)).value;
BooleanValue result = new BooleanValue();
- result.value = new Boolean(x);
+ result.value = Boolean.valueOf(x);
result.type = (PrimitiveType) this.locus.getFactory().getBuiltInType("Boolean"); // ADDED
List<IValue> outputs = new ArrayList<IValue>();
outputs.add(result);
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Div_.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Div_.java
index acf1867..b93b7c8 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Div_.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Div_.java
@@ -18,32 +18,32 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IIntegerValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IRealValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Div_ extends OpaqueBehaviorExecution {
@Override
public void doBody(List<IParameterValue> inputParameters, List<IParameterValue> outputParameters) {
- try{
- int x = ((IIntegerValue)inputParameters.get(0).getValues().get(0)).getValue();
- int y = ((IIntegerValue)inputParameters.get(1).getValues().get(0)).getValue();
- if(y != 0) {
+ try {
+ int x = ((IIntegerValue) inputParameters.get(0).getValues().get(0)).getValue();
+ int y = ((IIntegerValue) inputParameters.get(1).getValues().get(0)).getValue();
+ if (y != 0) {
IRealValue result = new RealValue();
- result.setValue(new Double(x) / new Double(y));
- result.setType((PrimitiveType)this.locus.getFactory().getBuiltInType("Real"));
+ result.setValue(Double.valueOf(x) / Double.valueOf(y));
+ result.setType((PrimitiveType) this.locus.getFactory().getBuiltInType("Real"));
List<IValue> values = new ArrayList<IValue>();
values.add(result);
outputParameters.get(0).setValues(values);
}
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Div_ " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Div_ " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToInteger.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToInteger.java
index 02d8722..18c2a23 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToInteger.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToInteger.java
@@ -33,7 +33,7 @@
try {
String x = ((StringValue) inputParameters.get(0).getValues().get(0)).value;
IntegerValue result = new IntegerValue();
- result.value = new Integer(x);
+ result.value = Integer.valueOf(x);
result.type = (PrimitiveType) this.locus.getFactory().getBuiltInType("Integer"); // ADDED
List<IValue> outputs = new ArrayList<IValue>();
outputs.add(result);
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/DefaultFUMLIOConsole.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/DefaultFUMLIOConsole.java
new file mode 100644
index 0000000..5954233
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/DefaultFUMLIOConsole.java
@@ -0,0 +1,23 @@
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.io;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class DefaultFUMLIOConsole implements IFUMLIOConsole {
+
+ @Override
+ public void init() {
+
+ }
+
+ @Override
+ public InputStream getInputStream() {
+ return System.in;
+ }
+
+ @Override
+ public OutputStream getOutputStream() {
+ return System.out;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/FUMLIOConsole.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/FUMLIOConsole.java
new file mode 100644
index 0000000..a0a9bd6
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/FUMLIOConsole.java
@@ -0,0 +1,68 @@
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.io;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
+
+public class FUMLIOConsole {
+
+ private static volatile FUMLIOConsole instance = null;
+
+ private FUMLIOConsole() {
+
+ super();
+ }
+
+ public final static FUMLIOConsole getInstance() {
+ if (FUMLIOConsole.instance == null) {
+ synchronized (FUMLIOConsole.class) {
+ if (FUMLIOConsole.instance == null) {
+ FUMLIOConsole.instance = new FUMLIOConsole();
+ }
+ }
+ }
+ return FUMLIOConsole.instance;
+ }
+
+ private IFUMLIOConsole console = null;
+
+ public IFUMLIOConsole getConsole() {
+ if (console == null) {
+ loadFUMLIOConsole();
+
+ console.init();
+ }
+ return console;
+ }
+
+ private void loadFUMLIOConsole() {
+
+ String id = IFUMLIOConsoleExtensionPoint.EXTENSION_POINT_ID;
+ IExtensionRegistry registry = RegistryFactory.getRegistry();
+
+ IConfigurationElement[] elements = registry.getConfigurationElementsFor(id);
+
+ if (elements.length == 0) {
+ console = new DefaultFUMLIOConsole();
+ } else {
+ if (elements.length > 1) {
+ Activator.getDefault().logger.warn("Only one FUMLIOConsole can be used. First found will be load");//$NON-NLS-1$
+ }
+
+ IConfigurationElement configurationElement = elements[0];
+
+ try {
+ Object fumlioconsoleclass = configurationElement
+ .createExecutableExtension(IFUMLIOConsoleExtensionPoint.FUMLIOCONSOLECLASS);
+ if (fumlioconsoleclass instanceof IFUMLIOConsole) {
+ console = (IFUMLIOConsole) fumlioconsoleclass;
+ }
+ } catch (CoreException e) {
+ Activator.getDefault().logger.error("Failed to create class for " + configurationElement, e);//$NON-NLS-1$
+ console = new DefaultFUMLIOConsole();
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/IFUMLIOConsole.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/IFUMLIOConsole.java
new file mode 100644
index 0000000..1d48081
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/IFUMLIOConsole.java
@@ -0,0 +1,12 @@
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.io;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public interface IFUMLIOConsole {
+ void init();
+
+ InputStream getInputStream();
+
+ OutputStream getOutputStream();
+}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/IFUMLIOConsoleExtensionPoint.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/IFUMLIOConsoleExtensionPoint.java
new file mode 100644
index 0000000..6ab557b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/IFUMLIOConsoleExtensionPoint.java
@@ -0,0 +1,9 @@
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.io;
+
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
+
+public interface IFUMLIOConsoleExtensionPoint {
+ public static final String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".fumlioconsole"; //$NON-NLS-1$
+
+ public static final String FUMLIOCONSOLECLASS = "fumlioconsoleClass"; //$NON-NLS-1$
+}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardInputChannelImpl.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardInputChannelImpl.java
index e0d8291..6ac3896 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardInputChannelImpl.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardInputChannelImpl.java
@@ -22,10 +22,10 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.moka.engine.uml.libraries.ServiceObject;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IExecution;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.library.ServiceObject;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.StringValue;
import org.eclipse.papyrus.moka.fuml.values.Value;
@@ -37,25 +37,25 @@
protected static BufferedReader bufferedReader;
protected InputStream in = null;
-
+
private static final String READLINE_OPERATION = "readLine";
public StandardInputChannelImpl(Class service) {
super(service);
- this.in = StandardOutputChannelImpl.getConsole().getInputStream();
+ this.in = FUMLIOConsole.getInstance().getConsole().getInputStream();
}
@Override
public IExecution dispatch(Operation operation) {
IExecution execution = null;
- if(operation != null) {
- if(operation.getName().equals(READLINE_OPERATION)) {
+ if (operation != null) {
+ if (operation.getName().equals(READLINE_OPERATION)) {
execution = new ReadLineExecution(operation);
}
}
return execution;
}
-
+
protected class ReadLineExecution extends ServiceObject.ServiceOperationExecution {
public ReadLineExecution(Operation operation) {
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardOutputChannelImpl.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardOutputChannelImpl.java
index 075f94d..fcedef5 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardOutputChannelImpl.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardOutputChannelImpl.java
@@ -16,61 +16,44 @@
package org.eclipse.papyrus.moka.fuml.standardlibrary.library.io;
+import java.io.OutputStream;
import java.util.List;
-import org.eclipse.papyrus.moka.engine.uml.libraries.ServiceObject;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IExecution;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.library.ServiceObject;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.StringValue;
import org.eclipse.papyrus.moka.fuml.values.Value;
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsoleManager;
-import org.eclipse.ui.console.IOConsole;
-import org.eclipse.ui.console.IOConsoleOutputStream;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Operation;
public final class StandardOutputChannelImpl extends ServiceObject {
- protected static final String CONSOLE_NAME = "fUML Console";
+ protected OutputStream out = null;
- protected static IOConsole console = null;
-
- protected IOConsoleOutputStream out = null;
-
private static final String WRITE_OPERATION = "write";
-
- private static final String WRITELINE_OPERATION = "writeLine";
- public static IOConsole getConsole() {
- if (console == null) {
- console = new IOConsole(CONSOLE_NAME, null);
- IConsoleManager conMan = ConsolePlugin.getDefault().getConsoleManager();
- conMan.addConsoles(new IConsole[] { console });
- }
- return console;
- }
+ private static final String WRITELINE_OPERATION = "writeLine";
public StandardOutputChannelImpl(Class service) {
super(service);
- this.out = getConsole().newOutputStream();
+ this.out = FUMLIOConsole.getInstance().getConsole().getOutputStream();
}
@Override
public IExecution dispatch(Operation operation) {
IExecution execution = null;
- if(operation != null) {
- if(operation.getName().equals(WRITE_OPERATION)) {
+ if (operation != null) {
+ if (operation.getName().equals(WRITE_OPERATION)) {
execution = new Write(operation);
- } else if(operation.getName().equals(WRITELINE_OPERATION)) {
+ } else if (operation.getName().equals(WRITELINE_OPERATION)) {
execution = new WriteLine(operation);
}
}
return execution;
}
-
+
protected class WriteLine extends ServiceObject.ServiceOperationExecution {
public WriteLine(Operation operation) {
@@ -88,7 +71,7 @@
try {
String message = "";
message = ((StringValue) inputParameters.get(0).getValues().get(0)).value;
- out.write(message + "\n");
+ out.write((message + "\n").getBytes());
out.flush();
// This implementation does not produce errorStatus information.
} catch (Exception e) {
@@ -113,7 +96,7 @@
// Supposed to have only one input argument, corresponding to parameter 'value'
try {
String message = inputParameters.get(0).getValues().get(0).toString();
- out.write(message);
+ out.write(message.getBytes());
out.flush();
// This implementation does not produce errorStatus information.
} catch (Exception e) {
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Abs.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Abs.java
index 5adcd08..7f482ba 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Abs.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Abs.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Abs extends OpaqueBehaviorExecution {
@@ -36,7 +36,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Abs " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Abs " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Add.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Add.java
index 622eaf2..9b1e7d5 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Add.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Add.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Add extends OpaqueBehaviorExecution {
@@ -37,7 +37,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of + " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of + " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Div.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Div.java
index 47ab733..ee44f99 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Div.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Div.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Div extends OpaqueBehaviorExecution {
@@ -30,7 +30,7 @@
try {
Double x = ((RealValue) inputParameters.get(0).getValues().get(0)).value;
Double y = ((RealValue) inputParameters.get(1).getValues().get(0)).value;
- if(y != 0) {
+ if (y != 0) {
RealValue result = new RealValue();
result.value = x / y;
result.type = (PrimitiveType) this.locus.getFactory().getBuiltInType("Real");
@@ -39,7 +39,7 @@
outputParameters.get(0).setValues(outputs);
}
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Div " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Div " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Floor.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Floor.java
index 0b4b17d..806ccfa 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Floor.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Floor.java
@@ -16,13 +16,13 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IIntegerValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IntegerValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Floor extends OpaqueBehaviorExecution {
@@ -32,13 +32,13 @@
try {
Double x = ((RealValue) inputParameters.get(0).getValues().get(0)).value;
IIntegerValue result = new IntegerValue();
- result.setValue((int)Math.floor(x));
+ result.setValue((int) Math.floor(x));
result.setType((PrimitiveType) this.locus.getFactory().getBuiltInType("Integer"));
List<IValue> outputs = new ArrayList<IValue>();
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Floor " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Floor " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Greater.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Greater.java
index b8f5d4c..eaba3e1 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Greater.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Greater.java
@@ -16,12 +16,12 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.BooleanValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Greater extends OpaqueBehaviorExecution {
@@ -38,7 +38,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of > " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of > " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/GreaterOrEqual.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/GreaterOrEqual.java
index ceb01a8..11c5134 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/GreaterOrEqual.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/GreaterOrEqual.java
@@ -16,12 +16,12 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.BooleanValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class GreaterOrEqual extends OpaqueBehaviorExecution {
@@ -38,7 +38,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of >= " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of >= " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Inv.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Inv.java
index 29f4963..ac4a8c2 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Inv.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Inv.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Inv extends OpaqueBehaviorExecution {
@@ -42,7 +42,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (ArithmeticException a) {
- Activator.log.error("An error occured during the execution of Inv " + a.getMessage(), a);
+ Activator.getDefault().logger.error("An error occured during the execution of Inv " + a.getMessage(), a);
RealValue result = new RealValue();
result.value = 0.0;
result.type = (PrimitiveType) this.locus.getFactory().getBuiltInType("Real");
@@ -50,7 +50,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Inv " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Inv " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Lower.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Lower.java
index ce94873..5a4e570 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Lower.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Lower.java
@@ -16,12 +16,12 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.BooleanValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Lower extends OpaqueBehaviorExecution {
@@ -38,7 +38,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of < " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of < " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/LowerOrEqual.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/LowerOrEqual.java
index 5066d41..7f47ddb 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/LowerOrEqual.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/LowerOrEqual.java
@@ -16,12 +16,12 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.BooleanValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class LowerOrEqual extends OpaqueBehaviorExecution {
@@ -38,7 +38,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of <= " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of <= " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Max.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Max.java
index 77aba9f..b9acaf2 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Max.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Max.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Max extends OpaqueBehaviorExecution {
@@ -37,7 +37,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Max " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Max " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Min.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Min.java
index 116aefb..cd9f948 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Min.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Min.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Min extends OpaqueBehaviorExecution {
@@ -37,7 +37,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Min " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Min " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Minus.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Minus.java
index 10eb409..c9de942 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Minus.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Minus.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Minus extends OpaqueBehaviorExecution {
@@ -37,7 +37,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of - " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of - " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Neg.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Neg.java
index 33dc15e..20aa4fb 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Neg.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Neg.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Neg extends OpaqueBehaviorExecution {
@@ -36,7 +36,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Neg " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Neg " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Round.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Round.java
index edbff7e..d5b07cf 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Round.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Round.java
@@ -16,14 +16,14 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IIntegerValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IntegerValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.papyrus.moka.fuml.values.Value;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.uml2.uml.PrimitiveType;
public class Round extends OpaqueBehaviorExecution {
@@ -33,13 +33,13 @@
try {
Double x = ((RealValue) inputParameters.get(0).getValues().get(0)).value;
IIntegerValue result = new IntegerValue();
- result.setValue((int)Math.round(x));
+ result.setValue((int) Math.round(x));
result.setType((PrimitiveType) this.locus.getFactory().getBuiltInType("Integer"));
List<IValue> outputs = new ArrayList<IValue>();
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of Abs " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of Abs " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Times.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Times.java
index 1dc3662..17f250f 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Times.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/Times.java
@@ -16,11 +16,11 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class Times extends OpaqueBehaviorExecution {
@@ -37,7 +37,7 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of * " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of * " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToInteger.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToInteger.java
index 7750f61..33a5686 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToInteger.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToInteger.java
@@ -16,13 +16,13 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IIntegerValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IntegerValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class ToInteger extends OpaqueBehaviorExecution {
@@ -38,7 +38,8 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of ToInteger " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of ToInteger " + e.getMessage(),
+ e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToReal.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToReal.java
index bce2701..d538e77 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToReal.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToReal.java
@@ -16,12 +16,12 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.StringValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class ToReal extends OpaqueBehaviorExecution {
@@ -31,13 +31,13 @@
try {
String x = ((StringValue) inputParameters.get(0).getValues().get(0)).value;
RealValue result = new RealValue();
- result.value = new Double(x);
+ result.value = Double.valueOf(x);
result.type = (PrimitiveType) this.locus.getFactory().getBuiltInType("Real");
List<IValue> outputs = new ArrayList<IValue>();
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of ToReal " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of ToReal " + e.getMessage(), e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToString.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToString.java
index 14199d1..ad658b0 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToString.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/real/ToString.java
@@ -16,12 +16,12 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
+import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.RealValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.StringValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.Activator;
import org.eclipse.uml2.uml.PrimitiveType;
public class ToString extends OpaqueBehaviorExecution {
@@ -37,7 +37,8 @@
outputs.add(result);
outputParameters.get(0).setValues(outputs);
} catch (Exception e) {
- Activator.log.error("An error occured during the execution of ToString " + e.getMessage(), e);
+ Activator.getDefault().logger.error("An error occured during the execution of ToString " + e.getMessage(),
+ e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToInteger.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToInteger.java
index b503280..cb27f91 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToInteger.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToInteger.java
@@ -34,7 +34,7 @@
Integer x = ((UnlimitedNaturalValue) inputParameters.get(0).getValues().get(0)).value;
IntegerValue result = new IntegerValue();
if (x != 1) {
- result.value = new Integer(x);
+ result.value = Integer.valueOf(x);
}
result.type = (PrimitiveType) this.locus.getFactory().getBuiltInType("Integer");
List<IValue> outputs = new ArrayList<IValue>();
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToUnlimitedNatural.java b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToUnlimitedNatural.java
index 05b1a1a..41df21e 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToUnlimitedNatural.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToUnlimitedNatural.java
@@ -38,7 +38,7 @@
result.value = -1;
} else {
try {
- value = new Integer(x);
+ value = Integer.valueOf(x);
} catch (NumberFormatException badFormat) {
}
if (value != null && value >= 0) {
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.validation/.classpath b/plugins/org.eclipse.papyrus.moka.fuml.validation/.classpath
index bc57d23..96d2680 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.validation/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.fuml.validation/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.validation/.project b/plugins/org.eclipse.papyrus.moka.fuml.validation/.project
index 3d44c40..9a7b0ab 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.validation/.project
+++ b/plugins/org.eclipse.papyrus.moka.fuml.validation/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml.validation/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.fuml.validation/META-INF/MANIFEST.MF
index 5ee9de8..32d3d0d 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml.validation/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.fuml.validation/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.ui;bundle-version="[3.117.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.emf.validation;bundle-version="[1.8.0,2.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.validation;bundle-version="[1.8.0,2.0.0)";visibility:=reexport,
org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/.classpath b/plugins/org.eclipse.papyrus.moka.fuml/.classpath
index c941c51..6e21f92 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.fuml/.classpath
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="aspects/"/>
+ <classpathentry kind="src" path="aspects"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/.project b/plugins/org.eclipse.papyrus.moka.fuml/.project
index 68849e3..33718c1 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/.project
+++ b/plugins/org.eclipse.papyrus.moka.fuml/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -36,6 +31,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.fuml/META-INF/MANIFEST.MF
index dd402ab..0dcc91b 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.fuml/META-INF/MANIFEST.MF
@@ -1,19 +1,8 @@
Manifest-Version: 1.0
-Require-Bundle: org.apache.commons.lang;bundle-version="[2.6.0,3.0.0)",
- org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)",
- org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.animation;bundle-version="[4.0.0,5.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.animation;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.uml2.uml.profile.standard;bundle-version="[1.5.0,2.0.0)"
+ org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.1.0,5.0.0)";visibility:=reexport,
+ org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
@@ -26,10 +15,8 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.fuml;singleton:=true
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.eclipse.papyrus.moka.fuml
-Export-Package: org.eclipse.papyrus.moka.fuml,
- org.eclipse.papyrus.moka.fuml.actions,
+Export-Package: org.eclipse.papyrus.moka.fuml.actions,
org.eclipse.papyrus.moka.fuml.activities,
- org.eclipse.papyrus.moka.fuml.classification,
org.eclipse.papyrus.moka.fuml.commonbehavior,
org.eclipse.papyrus.moka.fuml.commonbehavior.additions,
org.eclipse.papyrus.moka.fuml.debug,
@@ -39,6 +26,7 @@
org.eclipse.papyrus.moka.fuml.profiling.activities,
org.eclipse.papyrus.moka.fuml.profiling.commonbehavior,
org.eclipse.papyrus.moka.fuml.profiling.debug,
+ org.eclipse.papyrus.moka.fuml.profiling.listeners,
org.eclipse.papyrus.moka.fuml.profiling.loci,
org.eclipse.papyrus.moka.fuml.profiling.simpleclassifiers,
org.eclipse.papyrus.moka.fuml.simpleclassifiers,
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/commonbehavior/ObjectActivationProfiler.aj b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/commonbehavior/ObjectActivationProfiler.aj
index 95cab19..c7ea0ee 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/commonbehavior/ObjectActivationProfiler.aj
+++ b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/commonbehavior/ObjectActivationProfiler.aj
@@ -13,9 +13,9 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.fuml.profiling.commonbehavior;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLRTCStepListener;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IObjectActivation;
import org.eclipse.papyrus.moka.fuml.profiling.MokaObservable;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.IRTCStepListener;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IReference;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.Reference;
import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
@@ -37,20 +37,20 @@
protected void notifyStepStart(IObjectActivation objectActivation) {
for(IExecutionEngineService<IExecutionEngine> service : getListeners()) {
- if(service instanceof UMLRTCStepListener) {
+ if(service instanceof IRTCStepListener) {
IReference reference = new Reference();
reference.setReferent(objectActivation.getObject());
- ((UMLRTCStepListener)service).rtcStepBegin(reference);
+ ((IRTCStepListener)service).rtcStepBegin(reference);
}
}
}
protected void notifyStepEnd(IObjectActivation objectActivation) {
for(IExecutionEngineService<IExecutionEngine> service : getListeners()) {
- if(service instanceof UMLRTCStepListener) {
+ if(service instanceof IRTCStepListener) {
IReference reference = new Reference();
reference.setReferent(objectActivation.getObject());
- ((UMLRTCStepListener)service).rtcStepEnd(reference);
+ ((IRTCStepListener)service).rtcStepEnd(reference);
}
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLRTCStepListener.java b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/IRTCStepListener.java
similarity index 87%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLRTCStepListener.java
rename to plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/IRTCStepListener.java
index be1ca0a..5553a8d 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLRTCStepListener.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/IRTCStepListener.java
@@ -12,11 +12,11 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.listeners;
+package org.eclipse.papyrus.moka.fuml.profiling.listeners;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IReference;
-public interface UMLRTCStepListener {
+public interface IRTCStepListener {
public void rtcStepBegin(IReference context);
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLSemanticVisitorExecutionListener.java b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/ISemanticVisitorExecutionListener.java
similarity index 88%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLSemanticVisitorExecutionListener.java
rename to plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/ISemanticVisitorExecutionListener.java
index 45648cd..ecde80f 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLSemanticVisitorExecutionListener.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/ISemanticVisitorExecutionListener.java
@@ -14,12 +14,12 @@
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.listeners;
+package org.eclipse.papyrus.moka.fuml.profiling.listeners;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
import org.eclipse.papyrus.moka.kernel.assistant.Suspension;
-public interface UMLSemanticVisitorExecutionListener {
+public interface ISemanticVisitorExecutionListener {
public void nodeVisited(ISemanticVisitor visitor);
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLValueLifecyleListener.java b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/IValueLifecyleListener.java
similarity index 86%
rename from plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLValueLifecyleListener.java
rename to plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/IValueLifecyleListener.java
index 83466d9..bfb1578 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml.debug/src/org/eclipse/papyrus/moka/engine/uml/debug/listeners/UMLValueLifecyleListener.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/listeners/IValueLifecyleListener.java
@@ -12,11 +12,11 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.debug.listeners;
+package org.eclipse.papyrus.moka.fuml.profiling.listeners;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-public interface UMLValueLifecyleListener {
+public interface IValueLifecyleListener {
public void valueCreated(IValue value);
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/loci/SemanticVisitorProfiler.aj b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/loci/SemanticVisitorProfiler.aj
index b65762f..a0d6c99 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/loci/SemanticVisitorProfiler.aj
+++ b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/loci/SemanticVisitorProfiler.aj
@@ -13,9 +13,9 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.fuml.profiling.loci;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLSemanticVisitorExecutionListener;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
import org.eclipse.papyrus.moka.fuml.profiling.MokaObservable;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.ISemanticVisitorExecutionListener;
import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
import org.eclipse.papyrus.moka.kernel.service.IExecutionEngineService;
@@ -45,16 +45,16 @@
protected void fireNodeVisited(ISemanticVisitor visitor) {
for (IExecutionEngineService<IExecutionEngine> service : getListeners()) {
- if (service instanceof UMLSemanticVisitorExecutionListener) {
- ((UMLSemanticVisitorExecutionListener) service).nodeVisited(visitor);
+ if (service instanceof ISemanticVisitorExecutionListener) {
+ ((ISemanticVisitorExecutionListener) service).nodeVisited(visitor);
}
}
}
protected void fireNodeLeft(ISemanticVisitor visitor) {
for (IExecutionEngineService<IExecutionEngine> service : getListeners()) {
- if (service instanceof UMLSemanticVisitorExecutionListener) {
- ((UMLSemanticVisitorExecutionListener) service).nodeLeft(visitor);
+ if (service instanceof ISemanticVisitorExecutionListener) {
+ ((ISemanticVisitorExecutionListener) service).nodeLeft(visitor);
}
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/loci/ValueLifecycleObservable.java b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/loci/ValueLifecycleObservable.java
index 883e638..11e303a 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/loci/ValueLifecycleObservable.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/aspects/org/eclipse/papyrus/moka/fuml/profiling/loci/ValueLifecycleObservable.java
@@ -15,8 +15,8 @@
package org.eclipse.papyrus.moka.fuml.profiling.loci;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLValueLifecyleListener;
import org.eclipse.papyrus.moka.fuml.profiling.MokaObservable;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.IValueLifecyleListener;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
import org.eclipse.papyrus.moka.kernel.service.IExecutionEngineService;
@@ -25,16 +25,16 @@
public void fireValueCreated(final IValue value){
for(IExecutionEngineService<IExecutionEngine> service : getListeners()){
- if(service instanceof UMLValueLifecyleListener) {
- ((UMLValueLifecyleListener)service).valueCreated(value);
+ if(service instanceof IValueLifecyleListener) {
+ ((IValueLifecyleListener)service).valueCreated(value);
}
}
}
public void fireValueDestroyed(final IValue value){
for(IExecutionEngineService<IExecutionEngine> service : getListeners()){
- if(service instanceof UMLValueLifecyleListener) {
- ((UMLValueLifecyleListener)service).valueDestroyed(value);
+ if(service instanceof IValueLifecyleListener) {
+ ((IValueLifecyleListener)service).valueDestroyed(value);
}
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/build.properties b/plugins/org.eclipse.papyrus.moka.fuml/build.properties
index 26f2448..50ff7af 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/build.properties
+++ b/plugins/org.eclipse.papyrus.moka.fuml/build.properties
@@ -1,4 +1,5 @@
-source.. = src/, aspects/
+source.. = src/,\
+ aspects/
output.. = target/classes/
bin.includes = META-INF/,\
.,\
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/pom.xml b/plugins/org.eclipse.papyrus.moka.fuml/pom.xml
index 488b7f0..53185f4 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/pom.xml
+++ b/plugins/org.eclipse.papyrus.moka.fuml/pom.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -17,14 +18,6 @@
<description>Execution engine implementing fUML (Semantics of a Foundational Subset for. Executable UML Models)</description>
- <dependencies>
- <dependency>
- <groupId>com.nickwongdev</groupId>
- <artifactId>aspectj-maven-plugin</artifactId>
- <version>1.12.1</version>
- </dependency>
- </dependencies>
-
<!-- Build specificities -->
<build>
<plugins>
@@ -53,5 +46,4 @@
</plugin>
</plugins>
</build>
-
</project>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/ExpansionActivationGroup.java b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/ExpansionActivationGroup.java
index 054b180..063dee8 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/ExpansionActivationGroup.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/ExpansionActivationGroup.java
@@ -18,7 +18,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.moka.fuml.actions.IOutputPinActivation;
import org.eclipse.papyrus.moka.fuml.activities.ActivityNodeActivationGroup;
import org.eclipse.papyrus.moka.fuml.activities.IActivityExecution;
import org.eclipse.papyrus.moka.fuml.activities.IActivityNodeActivation;
@@ -34,8 +33,8 @@
public List<IOutputPinActivation> regionInputs = new ArrayList<IOutputPinActivation>();
/*
- * Output pin activations corresponding, in order, to the input expansion
- * nodes of the expansion region of this activation group.
+ * Output pin activations corresponding, in order, to the input expansion nodes
+ * of the expansion region of this activation group.
*/
public List<IOutputPinActivation> groupInputs = new ArrayList<IOutputPinActivation>();
@@ -45,14 +44,14 @@
public IExpansionRegionActivation regionActivation;
/*
- * Output pin activations corresponding, in order, to the output expansion
- * nodes of the expansion region of this activation group.
+ * Output pin activations corresponding, in order, to the output expansion nodes
+ * of the expansion region of this activation group.
*/
public List<IOutputPinActivation> groupOutputs = new ArrayList<IOutputPinActivation>();
/*
- * The index (starting at 1) of this activation group in the list held by
- * the expansion region activation.
+ * The index (starting at 1) of this activation group in the list held by the
+ * expansion region activation.
*/
public Integer index;
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/ExpansionRegionActivation.java b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/ExpansionRegionActivation.java
index 360b4ea..e4e5bfa 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/ExpansionRegionActivation.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/ExpansionRegionActivation.java
@@ -19,7 +19,6 @@
import java.util.Iterator;
import java.util.List;
-import org.eclipse.papyrus.moka.fuml.actions.IOutputPinActivation;
import org.eclipse.papyrus.moka.fuml.activities.IActivityNodeActivationGroup;
import org.eclipse.papyrus.moka.fuml.activities.IToken;
import org.eclipse.papyrus.moka.fuml.debug.Debug;
@@ -32,24 +31,23 @@
public class ExpansionRegionActivation extends ActionActivation implements IExpansionRegionActivation {
/*
- * The set of expansion activation groups for this expansion region
- * activation. One activation group is created corresponding to each token
- * held by the first input expansion node activation for the expansion
- * region.
+ * The set of expansion activation groups for this expansion region activation.
+ * One activation group is created corresponding to each token held by the first
+ * input expansion node activation for the expansion region.
*/
public List<IExpansionActivationGroup> activationGroups = new ArrayList<IExpansionActivationGroup>();
/*
- * The tokens taken from each of the input pin activations for this
- * expansion region activation. These are preserved for initializing the
- * region inputs of each of the activation groups.
+ * The tokens taken from each of the input pin activations for this expansion
+ * region activation. These are preserved for initializing the region inputs of
+ * each of the activation groups.
*/
public List<TokenSet> inputTokens = new ArrayList<TokenSet>();
/*
- * The tokens taken from each of the input expansion node activations for
- * this expansion region activation. These are preserved for initializing
- * the group input of each of the activation groups.
+ * The tokens taken from each of the input expansion node activations for this
+ * expansion region activation. These are preserved for initializing the group
+ * input of each of the activation groups.
*/
public List<TokenSet> inputExpansionTokens = new ArrayList<TokenSet>();
@@ -139,7 +137,8 @@
while (j <= outputElements.size()) {
OutputPinActivation groupOutput = new OutputPinActivation();
groupOutput.run();
- activationGroup.getGroupOutputs().add(groupOutput); // fUML12-10 certain boolean flags are not properly initialized in come cases
+ activationGroup.getGroupOutputs().add(groupOutput); // fUML12-10 certain boolean flags are not properly
+ // initialized in come cases
j = j + 1;
}
activationGroup.createNodeActivations(region.getNodes());
@@ -185,7 +184,8 @@
// Place tokens on the output expansion nodes.
ExpansionRegion region = (ExpansionRegion) this.node;
List<ExpansionNode> outputElements = region.getOutputElements();
- Debug.println("[doOutput] Expansion region " + region.getName() + " is " + (this.isSuspended() ? "suspended." : "completed."));
+ Debug.println("[doOutput] Expansion region " + region.getName() + " is "
+ + (this.isSuspended() ? "suspended." : "completed."));
if (!this.isSuspended()) {
for (int i = 0; i < activationGroups.size(); i++) {
IExpansionActivationGroup activationGroup = activationGroups.get(i);
@@ -237,7 +237,8 @@
// Set up the inputs for the group with the given index, run the group
// and then fire the group outputs.
if (this.isRunning()) {
- Debug.println("[runGroup] groupInput[0] = " + this.inputExpansionTokens.get(0).tokens.get(activationGroup.getIndex() - 1).getValue());
+ Debug.println("[runGroup] groupInput[0] = "
+ + this.inputExpansionTokens.get(0).tokens.get(activationGroup.getIndex() - 1).getValue());
List<TokenSet> inputTokens = this.inputTokens;
for (int j = 0; j < inputTokens.size(); j++) {
TokenSet tokenSet = inputTokens.get(j);
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/StructuredActivityNodeActivation.java b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/StructuredActivityNodeActivation.java
index 182a7e2..31e614e 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/StructuredActivityNodeActivation.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/actions/StructuredActivityNodeActivation.java
@@ -19,7 +19,6 @@
import java.util.Iterator;
import java.util.List;
-import org.eclipse.papyrus.moka.fuml.actions.IPinActivation;
import org.eclipse.papyrus.moka.fuml.activities.ActivityNodeActivationGroup;
import org.eclipse.papyrus.moka.fuml.activities.IActivityEdgeInstance;
import org.eclipse.papyrus.moka.fuml.activities.IActivityNodeActivation;
@@ -37,8 +36,8 @@
public class StructuredActivityNodeActivation extends ActionActivation implements IStructuredActivityNodeActivation {
/*
- * The group of activations of the activity nodes contained in the
- * structured activity node.
+ * The group of activations of the activity nodes contained in the structured
+ * activity node.
*/
public ActivityNodeActivationGroup activationGroup;
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/commonbehavior/CallEventBehavior.java b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/commonbehavior/CallEventBehavior.java
index 2afcfe4..9e491ad 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/commonbehavior/CallEventBehavior.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/commonbehavior/CallEventBehavior.java
@@ -21,15 +21,15 @@
import org.eclipse.uml2.uml.internal.impl.BehaviorImpl;
@SuppressWarnings("restriction")
-public class CallEventBehavior extends BehaviorImpl implements ICallEventBehavior{
+public class CallEventBehavior extends BehaviorImpl implements ICallEventBehavior {
public Operation operation;
-
- public void setOperation(Operation operation){
+
+ public void setOperation(Operation operation) {
// Set the operation for this call event behavior and construct
// the behavior signature based on the operation signature.
this.operation = operation;
- for(int i = 0; i < operation.getOwnedParameters().size(); i++){
+ for (int i = 0; i < operation.getOwnedParameters().size(); i++) {
Parameter operationParameter = operation.getOwnedParameters().get(i);
Parameter parameter = UMLFactory.eINSTANCE.createParameter();
parameter.setName(operationParameter.getName());
@@ -46,5 +46,5 @@
public Operation getOperation() {
return this.operation;
}
-
+
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/commonbehavior/GetNextEventStrategy.java b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/commonbehavior/GetNextEventStrategy.java
index 08c8f34..4818e09 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/commonbehavior/GetNextEventStrategy.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/commonbehavior/GetNextEventStrategy.java
@@ -15,7 +15,6 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.fuml.commonbehavior;
-import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
import org.eclipse.papyrus.moka.fuml.loci.SemanticStrategy;
public abstract class GetNextEventStrategy extends SemanticStrategy {
@@ -26,5 +25,7 @@
return "getNextEvent";
}
- public abstract IEventOccurrence getNextEvent(ObjectActivation objectActivation); // fUML12-35 Initial execution of an activity is not run to completion
+ public abstract IEventOccurrence getNextEvent(ObjectActivation objectActivation); // fUML12-35 Initial execution of
+ // an activity is not run to
+ // completion
}
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/simpleclassifiers/PrimitiveValue.java b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/simpleclassifiers/PrimitiveValue.java
index 419c1c4..29fa4c9 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/simpleclassifiers/PrimitiveValue.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/simpleclassifiers/PrimitiveValue.java
@@ -18,8 +18,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IPrimitiveValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.values.Value;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.PrimitiveType;
diff --git a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/simpleclassifiers/StructuredValue.java b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/simpleclassifiers/StructuredValue.java
index 0efb388..69bb5f3 100644
--- a/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/simpleclassifiers/StructuredValue.java
+++ b/plugins/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/simpleclassifiers/StructuredValue.java
@@ -19,9 +19,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IFeatureValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IStructuredValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.values.Value;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.InstanceSpecification;
@@ -63,7 +60,8 @@
}
public void addFeatureValues(List<IFeatureValue> oldFeatureValues) {
- // Issue FUML12-20 Feature values need to be created for private structural features of parent classifiers
+ // Issue FUML12-20 Feature values need to be created for private structural
+ // features of parent classifiers
// Add feature values for all structural features of the types
// of this structured value and all its supertypes (including private
@@ -79,7 +77,8 @@
}
public void addFeatureValuesForType(Classifier type, List<IFeatureValue> oldFeatureValues) {
- // Issue FUML12-20 Feature values need to be created for private structural features of parent classifiers
+ // Issue FUML12-20 Feature values need to be created for private structural
+ // features of parent classifiers
// Add feature values for all structural features of the given type and
// all of its supertypes (including private features that are not
@@ -108,7 +107,8 @@
}
public void createFeatureValues() {
- // Issue FUML12-20 Feature values need to be created for private structural features of parent classifiers
+ // Issue FUML12-20 Feature values need to be created for private structural
+ // features of parent classifiers
// Create empty feature values for all structural features of the types
// of this structured value and all its supertypes (including private
@@ -117,7 +117,8 @@
}
public List<IFeatureValue> getMemberValues() {
- // Issue FUML12-20 Feature values need to be created for private structural features of parent classifiers
+ // Issue FUML12-20 Feature values need to be created for private structural
+ // features of parent classifiers
// Return the feature values for this structured value that are for structural
// features that are members of one of the types of the structured value.
@@ -149,7 +150,8 @@
}
public List<IValue> getValues(NamedElement feature, List<IFeatureValue> featureValues) {
- // Issue FUML12-20 Feature values need to be created for private structural features of parent classifiers
+ // Issue FUML12-20 Feature values need to be created for private structural
+ // features of parent classifiers
// Return the values from the feature value in the given list for the
// given feature. If there is no such feature value, return an empty
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.animation/.classpath b/plugins/org.eclipse.papyrus.moka.kernel.animation/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.animation/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.kernel.animation/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.animation/.project b/plugins/org.eclipse.papyrus.moka.kernel.animation/.project
index c0d8455..8a2691c 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.animation/.project
+++ b/plugins/org.eclipse.papyrus.moka.kernel.animation/.project
@@ -35,6 +35,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.animation/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.kernel.animation/META-INF/MANIFEST.MF
index 44ddb8f..caa4d46 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.animation/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.kernel.animation/META-INF/MANIFEST.MF
@@ -4,34 +4,23 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.kernel.animation;singleton:=true
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.animation.AnimationPlugin
-Require-Bundle: org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.e4.ui.css.core;bundle-version="[0.12.0,1.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.4.0,4.0.0)",
+Require-Bundle: org.eclipse.e4.ui.css.core;bundle-version="[0.12.0,1.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.4.0,4.0.0)";visibility:=reexport,
org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.moka.utils.ui;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.architecture.representation;bundle-version="[2.1.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.gmf.runtime.notation;bundle-version="[1.10.0,2.0.0)",
org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="[1.3.0,3.0.0)",
- org.eclipse.gef;bundle-version="[3.11.0,4.0.0)",
org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.4.0,5.0.0)",
org.eclipse.papyrus.infra.services.markerlistener;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)",
org.eclipse.papyrus.infra.ui;bundle-version="[2.1.0,4.0.0)",
org.eclipse.core.databinding.observable;bundle-version="[1.9.0,2.0.0)",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.1.0,5.0.0)",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
org.eclipse.papyrus.infra.tools;bundle-version="[3.2.0,5.0.0)",
org.w3c.css.sac;bundle-version="[1.3.1,2.0.0)",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.4.0,3.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.17.0,4.0.0)"
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.4.0,3.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.moka.animation,
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.animation/src/org/eclipse/papyrus/moka/animation/engine/AnimationServiceHelper.java b/plugins/org.eclipse.papyrus.moka.kernel.animation/src/org/eclipse/papyrus/moka/animation/engine/AnimationServiceHelper.java
new file mode 100644
index 0000000..0db0764
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.kernel.animation/src/org/eclipse/papyrus/moka/animation/engine/AnimationServiceHelper.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.animation.engine;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.animation.engine.rendering.IAnimation;
+import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
+import org.eclipse.papyrus.moka.kernel.service.IExecutionEngineService;
+import org.eclipse.papyrus.moka.kernel.service.ServiceRegistry;
+
+public class AnimationServiceHelper {
+
+ private AnimationServiceHelper() {
+ }
+
+ public static AnimationServiceHelper INSTANCE = new AnimationServiceHelper();
+
+ public IAnimation getAnimationService() {
+ IAnimation animationService = null;
+ List<IExecutionEngineService<IExecutionEngine>> services = ServiceRegistry.getInstance()
+ .getService(IAnimation.class);
+ if (!services.isEmpty()) {
+ if (services.size() == 1) {
+ animationService = (IAnimation) services.iterator().next();
+ } else {
+ // TODO: handle via a strategy (e.g., the animation service with the highest
+ // priority)
+ }
+ }
+ return animationService;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/.classpath b/plugins/org.eclipse.papyrus.moka.kernel.debug/.classpath
index 64d7e24..f5735d3 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="src" path="src-gen/"/>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/.project b/plugins/org.eclipse.papyrus.moka.kernel.debug/.project
index a9fcad3..5ca7bb1 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/.project
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.kernel.debug/META-INF/MANIFEST.MF
index bc305e8..bff2373 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/META-INF/MANIFEST.MF
@@ -5,29 +5,11 @@
Bundle-Version: 4.1.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.papyrus.moka.debug.MokaDebugPlugin
-Require-Bundle: org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.14.0,4.0.0)",
- org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel.animation;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.utils.ui;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.infra.emf;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.time.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.paho.client.mqttv3;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.json;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)",
- org.eclipse.papyrus.moka.kernel.scheduling;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.gmf.runtime.notation;bundle-version="[1.10.0,2.0.0)"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.moka.engine.schedulable;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.json;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
@@ -41,5 +23,5 @@
org.eclipse.papyrus.moka.debug.messages.impl,
org.eclipse.papyrus.moka.debug.messages.util,
org.eclipse.papyrus.moka.debug.service,
- org.eclipse.papyrus.moka.debugtarget
+ org.eclipse.papyrus.moka.debug.target
Automatic-Module-Name: org.eclipse.papyrus.moka.debug
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/plugin.xml b/plugins/org.eclipse.papyrus.moka.kernel.debug/plugin.xml
index b1d15a6..9ee2d61 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/plugin.xml
@@ -16,13 +16,6 @@
type="org.eclipse.debug.core.breakpointMarker">
</super>
</extension>
- <extension
- point="org.eclipse.debug.ui.debugModelPresentations">
- <debugModelPresentation
- class="org.eclipse.papyrus.moka.debugtarget.ExecutionEngineThreadModelPresentation"
- id="org.eclipse.papyrus.moka.kernel.debug.model.presentation">
- </debugModelPresentation>
- </extension>
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated Debug -->
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/MokaDebugPlugin.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/MokaDebugPlugin.java
index 15d4812..019cf0f 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/MokaDebugPlugin.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/MokaDebugPlugin.java
@@ -13,13 +13,15 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.debug;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
-public class MokaDebugPlugin extends AbstractUIPlugin {
+public class MokaDebugPlugin extends Plugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.papyrus.moka.debug"; //$NON-NLS-1$
@@ -27,16 +29,20 @@
// The shared instance
private static MokaDebugPlugin plugin;
+ public ILog logger;
+
/**
* The constructor
*/
public MokaDebugPlugin() {
+ logger = Platform.getLog(this.getClass());
}
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.
+ * BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -46,7 +52,8 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
@@ -61,5 +68,5 @@
public static MokaDebugPlugin getDefault() {
return plugin;
}
-
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/breakpoint/MokaBreakpoint.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/breakpoint/MokaBreakpoint.java
index 6ae4414..67ef137 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/breakpoint/MokaBreakpoint.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/breakpoint/MokaBreakpoint.java
@@ -15,8 +15,6 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.debug.breakpoint;
-import java.util.MissingResourceException;
-
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -29,35 +27,30 @@
import org.eclipse.emf.ecore.EValidator;
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.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.moka.debug.MokaDebugPlugin;
import org.eclipse.papyrus.moka.utils.constants.MokaConstants;
-import org.eclipse.papyrus.moka.utils.helper.EditorUtils;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.uml2.uml.NamedElement;
/**
- * Implementation of IBreakpoint provided by Moka.
- * MokaBreakpoint relies on markers of type MokaConstants.MOKA_BREAKPOINT_MARKER_ID,
- * which extend both papyrus model marker and eclipse breakpoint marker.
+ * Implementation of IBreakpoint provided by Moka. MokaBreakpoint relies on
+ * markers of type MokaConstants.MOKA_BREAKPOINT_MARKER_ID, which extend both
+ * papyrus model marker and eclipse breakpoint marker.
*
*/
public class MokaBreakpoint extends Breakpoint {
/**
- * The model element to which this breakpoint is attached
+ * The uri of the element to which this breakpoint is attached
*/
- protected EObject modelElement;
+ protected URI uriOfElement;
+
+ private String label;
/**
* A default resource set which should, ideally, never be used
*/
protected static ResourceSet defaultResourceSet;
-
/*
* (non-Javadoc)
*
@@ -72,21 +65,25 @@
*
* @return The model element to which this breakpoint is attached
*/
- public EObject getModelElement() {
- return this.modelElement;
+ public URI getModelElementURI() {
+ return this.uriOfElement;
}
/**
* Toggles a breakpoint on the given model element
*
- * @param modelElement
- * The model element to which a breakpoint has to be attached
+ * @param modelElement The model element to which a breakpoint has to be
+ * attached
*/
- public void toggleBreakpoint(EObject modelElement) {
+ public void toggleBreakpoint(EObject modelElement, String label) {
String uri = modelElement.eResource().getURI().toString();
String fragment = modelElement.eResource().getURIFragment(modelElement);
IResource iresource = getIResource(modelElement.eResource());
- this.modelElement = modelElement;
+
+ this.uriOfElement = EcoreUtil.getURI(modelElement);
+
+ this.label = label;
+
try {
if (iresource != null) {
IMarker marker = iresource.createMarker(MokaConstants.MOKA_BREAKPOINT_MARKER_ID);
@@ -97,15 +94,15 @@
this.setPersisted(true);
}
} catch (CoreException ce) {
- Activator.log.error(ce);
+ MokaDebugPlugin.getDefault().logger.error("Problem while toggleBreakpointing " + uriOfElement, ce); //$NON-NLS-1$
}
}
/**
* Convenience method returning the IResource corresponding to a Resource
*
- * @param resource
- * The Resource from which the corresponding IResource has to be retrieved
+ * @param resource The Resource from which the corresponding IResource has to be
+ * retrieved
* @return the IResource corresponding to the Resource
*/
public static IResource getIResource(Resource resource) {
@@ -131,73 +128,33 @@
* @return A label for this breakpoint
*/
public String getLabel() {
- String label = "";
- if (this.modelElement instanceof NamedElement) {
- return ((NamedElement) this.modelElement).getQualifiedName();
- }
+
return label;
}
-
/*
* (non-Javadoc)
*
- * @see org.eclipse.debug.core.model.Breakpoint#setMarker(org.eclipse.core.resources.IMarker)
+ * @see
+ * org.eclipse.debug.core.model.Breakpoint#setMarker(org.eclipse.core.resources.
+ * IMarker)
*/
@Override
public void setMarker(IMarker marker) throws CoreException {
- if (this.modelElement == null) {
- this.modelElement = getEObjectOfMarker(marker);
+ if (this.uriOfElement == null) {
+ this.uriOfElement = getURI(marker);
}
super.setMarker(marker);
}
/**
- * Convenience method returning the EObject of a given marker (provided that it is a marker with a URI)
+ * Convenience method returning the URI corresponding to the value of the
+ * EValidator.URI_ATTRIBUTE of a marker
*
- * @param marker
- * The marker from which eObject has to be retrieved
- * @return The EObject associated with the given marker
- */
- public static EObject getEObjectOfMarker(IMarker marker) {
- URI uriOfMarker = getURI(marker);
- if (uriOfMarker != null) {
- try {
- EObject modelElement = null;
- IEditorPart part = EditorUtils.getEditorPart(uriOfMarker.trimFragment().toString());
- if (part != null) {
- ServicesRegistry servicesRegistry = (ServicesRegistry) part.getAdapter(ServicesRegistry.class);
- if (servicesRegistry != null) {
- try {
- ResourceSet resourceSet = servicesRegistry.getService(ModelSet.class);
- modelElement = resourceSet.getEObject(uriOfMarker, true);
- if (modelElement != null) {
- return modelElement;
- }
- } catch (ServiceException e) {
- Activator.log.error(e);
- }
- }
- }
-
- if (defaultResourceSet == null) {
- defaultResourceSet = new ResourceSetImpl();
- }
- defaultResourceSet.getResource(uriOfMarker.trimFragment(), true);
- return defaultResourceSet.getEObject(uriOfMarker, true);
- } catch (MissingResourceException e) {
- Activator.log.error(e);
- }
- }
- return null;
- }
-
- /**
- * Convenience method returning the URI corresponding to the value of the EValidator.URI_ATTRIBUTE of a marker
- *
- * @param marker
- * The marker from which the URI corresponding to the value its EValidator.URI_ATTRIBUTE has to be constructed
- * @return The URI corresponding to the value of the EValidator.URI_ATTRIBUTE of the given marker
+ * @param marker The marker from which the URI corresponding to the value its
+ * EValidator.URI_ATTRIBUTE has to be constructed
+ * @return The URI corresponding to the value of the EValidator.URI_ATTRIBUTE of
+ * the given marker
*/
public static URI getURI(IMarker marker) {
String uriOfMarkerStr = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/breakpoint/MokaTracepoint.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/breakpoint/MokaTracepoint.java
deleted file mode 100644
index fff7fc2..0000000
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/breakpoint/MokaTracepoint.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.moka.debug.breakpoint;
-
-import java.util.MissingResourceException;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.model.Breakpoint;
-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.EValidator;
-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.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.moka.utils.constants.MokaConstants;
-import org.eclipse.papyrus.moka.utils.helper.EditorUtils;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * Implementation of IBreakpoint provided by Moka.
- * MokaBreakpoint relies on markers of type MokaConstants.MOKA_BREAKPOINT_MARKER_ID,
- * which extend both papyrus model marker and eclipse breakpoint marker.
- *
- */
-public class MokaTracepoint extends Breakpoint {
-
- public MokaTracepoint(IMarker marker) throws CoreException {
- setMarker(marker);
- }
-
- /**
- * The model element to which this breakpoint is attached
- */
- protected EObject modelElement;
-
- /**
- * A default resource set which should, ideally, never be used
- */
- protected static ResourceSet defaultResourceSet;
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
- */
- public String getModelIdentifier() {
- return MokaConstants.MOKA_DEBUG_MODEL_ID;
- }
-
- /**
- * Return the model element to which this breakpoint is attached
- *
- * @return The model element to which this breakpoint is attached
- */
- public EObject getModelElement() {
- return this.modelElement;
- }
-
- /**
- * Toggles a breakpoint on the given model element
- *
- * @param modelElement
- * The model element to which a breakpoint has to be attached
- */
- public void toggleBreakpoint(EObject modelElement) {
- String uri = modelElement.eResource().getURI().toString();
- String fragment = modelElement.eResource().getURIFragment(modelElement);
- IResource iresource = getIResource(modelElement.eResource());
- this.modelElement = modelElement;
- try {
- if (iresource != null) {
- IMarker marker = iresource.createMarker(MokaConstants.MOKA_TRACEPOINT_MARKER_ID);
- marker.setAttribute(EValidator.URI_ATTRIBUTE, uri + "#" + fragment);
- marker.setAttribute(IBreakpoint.ID, this.getModelIdentifier());
- this.setMarker(marker);
- this.setEnabled(true);
- this.setPersisted(true);
- }
- } catch (CoreException ce) {
- Activator.log.error(ce);
- }
- }
-
- /**
- * Convenience method returning the IResource corresponding to a Resource
- *
- * @param resource
- * The Resource from which the corresponding IResource has to be retrieved
- * @return the IResource corresponding to the Resource
- */
- public static IResource getIResource(Resource resource) {
- if (resource == null) {
- return null;
- }
- String uriPath = resource.getURI().toPlatformString(true);
- if (uriPath == null) {
- return null;
- }
- IResource iresource = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uriPath));
- if (iresource != null) {
- if (iresource.exists()) {
- return iresource;
- }
- }
- return null;
- }
-
- /**
- * Computes a label for this breakpoint
- *
- * @return A label for this breakpoint
- */
- public String getLabel() {
- String label = "";
- if (this.modelElement instanceof NamedElement) {
- return ((NamedElement) this.modelElement).getQualifiedName();
- }
- return label;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.Breakpoint#setMarker(org.eclipse.core.resources.IMarker)
- */
- @Override
- public void setMarker(IMarker marker) throws CoreException {
- if (this.modelElement == null) {
- this.modelElement = getEObjectOfMarker(marker);
- }
- super.setMarker(marker);
- }
-
- /**
- * Convenience method returning the EObject of a given marker (provided that it is a marker with a URI)
- *
- * @param marker
- * The marker from which eObject has to be retrieved
- * @return The EObject associated with the given marker
- */
- public static EObject getEObjectOfMarker(IMarker marker) {
- URI uriOfMarker = getURI(marker);
- if (uriOfMarker != null) {
- try {
- EObject modelElement = null;
- IEditorPart part = EditorUtils.getEditorPart(uriOfMarker.trimFragment().toString());
- if (part != null) {
- ServicesRegistry servicesRegistry = (ServicesRegistry) part.getAdapter(ServicesRegistry.class);
- if (servicesRegistry != null) {
- try {
- ResourceSet resourceSet = servicesRegistry.getService(ModelSet.class);
- modelElement = resourceSet.getEObject(uriOfMarker, true);
- if (modelElement != null) {
- return modelElement;
- }
- } catch (ServiceException e) {
- Activator.log.error(e);
- }
- }
- }
-
- if (defaultResourceSet == null) {
- defaultResourceSet = new ResourceSetImpl();
- }
- defaultResourceSet.getResource(uriOfMarker.trimFragment(), true);
- return defaultResourceSet.getEObject(uriOfMarker, true);
- } catch (MissingResourceException e) {
- Activator.log.error(e);
- }
- }
- return null;
- }
-
- /**
- * Convenience method returning the URI corresponding to the value of the EValidator.URI_ATTRIBUTE of a marker
- *
- * @param marker
- * The marker from which the URI corresponding to the value its EValidator.URI_ATTRIBUTE has to be constructed
- * @return The URI corresponding to the value of the EValidator.URI_ATTRIBUTE of the given marker
- */
- public static URI getURI(IMarker marker) {
- String uriOfMarkerStr = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
- if (uriOfMarkerStr != null) {
- return URI.createURI(uriOfMarkerStr);
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/DebuggableExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/AbstractDebuggableExecutionEngine.java
similarity index 63%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/DebuggableExecutionEngine.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/AbstractDebuggableExecutionEngine.java
index 64c34ab..4fe5a85 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/DebuggableExecutionEngine.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/AbstractDebuggableExecutionEngine.java
@@ -23,47 +23,33 @@
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.debug.core.DebugException;
import org.eclipse.papyrus.moka.debug.service.IDebugService;
+import org.eclipse.papyrus.moka.engine.schedulable.AbstractScheduledExecutionEngine;
import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
-import org.eclipse.papyrus.moka.kernel.engine.ExecutionEngine;
import org.eclipse.papyrus.moka.kernel.engine.ExecutionEngineException;
import org.eclipse.papyrus.moka.kernel.engine.ExecutionEngineStatus;
import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
-import org.eclipse.papyrus.moka.kernel.scheduling.control.ExecutionController;
-import org.eclipse.papyrus.moka.kernel.scheduling.control.ExecutionLoop;
-import org.eclipse.papyrus.moka.kernel.scheduling.control.IExecutionController;
import org.eclipse.papyrus.moka.kernel.service.IExecutionEngineService;
import org.eclipse.papyrus.moka.kernel.service.ServiceRegistry;
-public abstract class DebuggableExecutionEngine<TThreadType, ContextType>extends ExecutionEngine
- implements IDebuggableExecutionEngine<TThreadType, ContextType> {
-
- /**
- * Controller in charge of the execution task management
- */
- protected IExecutionController controller;
+public abstract class AbstractDebuggableExecutionEngine<ThreadType, ContextType>
+ extends AbstractScheduledExecutionEngine implements IDebuggableExecutionEngine<ThreadType, ContextType> {
/**
* Map of thread for which debugging is enabled;
*/
- protected Map<String, IDebuggableExecutionEngineThread<TThreadType, ContextType>> debuggableThread;
+ protected Map<String, IDebuggableExecutionEngineThread<ThreadType, ContextType>> debuggableThread;
/**
* Enable safe access and modification of the thread map.
*/
protected ReentrantLock debuggableThreadLock;
- public DebuggableExecutionEngine() {
+ public AbstractDebuggableExecutionEngine() {
super();
- debuggableThread = new HashMap<String, IDebuggableExecutionEngineThread<TThreadType, ContextType>>();
+ debuggableThread = new HashMap<String, IDebuggableExecutionEngineThread<ThreadType, ContextType>>();
debuggableThreadLock = new ReentrantLock(true);
}
- @Override
- public void init(EngineConfiguration<?> configuration, SubMonitor monitor) {
- super.init(configuration, monitor);
- controller = createController();
- }
-
public void run(final EngineConfiguration<?> configuration, SubMonitor monitor) throws ExecutionEngineException {
setStatus(ExecutionEngineStatus.INITIALIZING);
init(configuration, monitor);
@@ -79,50 +65,40 @@
}
/**
- * @see {@link IDebuggableExecutionEngine#createController()}
+ * @see {@link IDebuggableExecutionEngine#addDebugThread(IDebuggableExecutionEngineThread)}
*/
- @Override
- public IExecutionController createController() {
- IExecutionController controller = new ExecutionController();
- controller.setExecutionLoop(new ExecutionLoop());
- return controller;
- }
-
- /**
- * @see {@link IDebuggableExecutionEngine#addDebugThread(IDebuggableExecutionEngineThread)}
- */
- public boolean addDebugThread(IDebuggableExecutionEngineThread<TThreadType, ContextType> t) {
+ public boolean addDebugThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> t) {
boolean added = false;
- if(t != null) {
- if(!debuggableThreadLock.isHeldByCurrentThread()) {
+ if (t != null) {
+ if (!debuggableThreadLock.isHeldByCurrentThread()) {
debuggableThreadLock.lock();
}
debuggableThread.put(t.getID(), t);
added = debuggableThread.containsKey(t.getID());
- if(debuggableThreadLock.isHeldByCurrentThread()) {
+ if (debuggableThreadLock.isHeldByCurrentThread()) {
debuggableThreadLock.unlock();
}
}
return added;
}
-
+
/**
- * @see {@link IDebuggableExecutionEngine#removeDebugThread(IDebuggableExecutionEngineThread)}
+ * @see {@link IDebuggableExecutionEngine#removeDebugThread(IDebuggableExecutionEngineThread)}
*/
- public boolean removeDebugThread(IDebuggableExecutionEngineThread<TThreadType, ContextType> t) {
+ public boolean removeDebugThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> t) {
boolean removed = false;
- if(t != null) {
- if(!debuggableThreadLock.isHeldByCurrentThread()) {
+ if (t != null) {
+ if (!debuggableThreadLock.isHeldByCurrentThread()) {
debuggableThreadLock.lock();
}
removed = debuggableThread.remove(t.getID()) != null;
- if(debuggableThreadLock.isHeldByCurrentThread()) {
+ if (debuggableThreadLock.isHeldByCurrentThread()) {
debuggableThreadLock.unlock();
}
}
return removed;
}
-
+
/**
* Check if the execution engine is in the suspended state. The check is thread
* safe. True is returned if the engine is suspended and false otherwise
@@ -146,7 +122,7 @@
*/
@Override
public void suspend() throws DebugException {
- controller.getExecutionLoop().suspend();
+ getController().getExecutionLoop().suspend();
setStatus(ExecutionEngineStatus.SUSPENDED);
}
@@ -164,7 +140,7 @@
*/
@Override
public void resume() throws DebugException {
- controller.getExecutionLoop().resume();
+ getController().getExecutionLoop().resume();
setStatus(ExecutionEngineStatus.RUNNING);
}
@@ -184,13 +160,13 @@
public boolean isTerminated() {
return getStatus().equals(ExecutionEngineStatus.TERMINATED);
}
-
+
/**
* Terminate controller execution loop and assign the terminated status
*/
@Override
public void terminate() throws DebugException {
- controller.getExecutionLoop().terminate();
+ getController().getExecutionLoop().terminate();
if (!debuggableThreadLock.isHeldByCurrentThread()) {
debuggableThreadLock.lock();
}
@@ -202,22 +178,65 @@
}
private void fireTerminateExecutionEvent() {
- IDebugService<TThreadType, ContextType> service = getDebugService();
+ IDebugService<ThreadType, ContextType> service = getDebugService();
if (service != null) {
service.fireTerminateEngineEvent();
}
}
@SuppressWarnings("unchecked")
- public final IDebugService<TThreadType, ContextType> getDebugService() {
+ public final IDebugService<ThreadType, ContextType> getDebugService() {
// Note: an execution engine has at most a single debug service
- IDebugService<TThreadType, ContextType> debugService = null;
+ IDebugService<ThreadType, ContextType> debugService = null;
Iterator<IExecutionEngineService<IExecutionEngine>> it = ServiceRegistry.getInstance()
.getService(IDebugService.class).iterator();
if (it.hasNext()) {
- debugService = (IDebugService<TThreadType, ContextType>) it.next();
+ debugService = (IDebugService<ThreadType, ContextType>) it.next();
}
return debugService;
}
+ /**
+ * @see {@link IDebuggableExecutionEngine#suspendThread(Object)}
+ */
+ @Override
+ public IDebuggableExecutionEngineThread<ThreadType, ContextType> getThread(String identifier) {
+ IDebuggableExecutionEngineThread<ThreadType, ContextType> thread = null;
+ if (!debuggableThreadLock.isHeldByCurrentThread()) {
+ debuggableThreadLock.lock();
+ }
+ thread = debuggableThread.get(identifier);
+ if (debuggableThreadLock.isHeldByCurrentThread()) {
+ debuggableThreadLock.unlock();
+ }
+ return thread;
+ }
+
+ /**
+ * @see {@link IDebuggableExecutionEngine#suspendThread(Object)}
+ *
+ * Execution of this active object is suspended
+ */
+ public void suspendThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> debuggableThread) {
+ controller.getExecutionLoop().suspend(new IsTargetThreadCondition<ThreadType>(debuggableThread.getThread()));
+ }
+
+ /**
+ * @see {@link IDebuggableExecutionEngine#resumeThread(Object)}
+ *
+ * Execution of this active object is resumed
+ */
+ public void resumeThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> debuggableThread) {
+ controller.getExecutionLoop().resume(new IsTargetThreadCondition<ThreadType>(debuggableThread.getThread()));
+ }
+
+ /**
+ * @see {@link IDebuggableExecutionEngine#terminateThread(Object)}
+ *
+ * Execution of this active object is terminated
+ */
+ public void terminateThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> debuggableThread) {
+ controller.getExecutionLoop().terminate(new IsTargetThreadCondition<ThreadType>(debuggableThread.getThread()));
+ }
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/DebugServiceHelper.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/DebugServiceHelper.java
index 44e0913..28a478b 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/DebugServiceHelper.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/DebugServiceHelper.java
@@ -14,20 +14,16 @@
package org.eclipse.papyrus.moka.debug.engine;
import java.util.Iterator;
-import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.moka.animation.engine.rendering.IAnimation;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.papyrus.moka.debug.breakpoint.MokaBreakpoint;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
-import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
-import org.eclipse.papyrus.moka.kernel.service.IExecutionEngineService;
-import org.eclipse.papyrus.moka.kernel.service.ServiceRegistry;
import org.eclipse.papyrus.moka.utils.constants.MokaConstants;
import org.eclipse.papyrus.moka.utils.helper.semantics.SemanticHelper;
import org.eclipse.uml2.uml.Class;
@@ -67,7 +63,8 @@
} catch (CoreException e) {
e.printStackTrace();
}
- if (isEnabled && visitedModelElement == breakpoint.getModelElement()) {
+
+ if (isEnabled && EcoreUtil.getURI(visitedModelElement).equals(breakpoint.getModelElementURI())) {
breakpointExist = true;
}
i++;
@@ -76,18 +73,4 @@
return breakpointExist;
}
-
- public IAnimation getAnimationService() {
- IAnimation animationService = null;
- List<IExecutionEngineService<IExecutionEngine>> services = ServiceRegistry.getInstance().getService(IAnimation.class);
- if (!services.isEmpty()) {
- if (services.size() == 1) {
- animationService = (IAnimation) services.iterator().next();
- } else {
- // TODO: handle via a strategy (e.g., the animation service with the highest priority)
- }
- }
- return animationService;
- }
-
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IDebuggableExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IDebuggableExecutionEngine.java
index 7211555..b1c9901 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IDebuggableExecutionEngine.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IDebuggableExecutionEngine.java
@@ -17,20 +17,12 @@
import org.eclipse.debug.core.model.ISuspendResume;
import org.eclipse.papyrus.moka.debug.service.IDebugService;
-import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
-import org.eclipse.papyrus.moka.kernel.scheduling.control.IExecutionController;
+import org.eclipse.papyrus.moka.engine.schedulable.IScheduledExecutionEngine;
-public interface IDebuggableExecutionEngine<ThreadType, ContextType> extends ISuspendResume, IExecutionEngine{
+public interface IDebuggableExecutionEngine<ThreadType, ContextType>
+ extends ISuspendResume, IScheduledExecutionEngine {
/**
- * Instantiate and configure the controller in charge of the
- * the execution engine task scheduling
- *
- * @return the controller
- */
- IExecutionController createController();
-
- /**
* Get the thread corresponding to the specified identifier
*
* @param identifier the thread identifier
@@ -38,17 +30,16 @@
* @return the corresponding thread if any
*/
IDebuggableExecutionEngineThread<ThreadType, ContextType> getThread(final String identifier);
-
-
+
/**
* Add the debuggable thread to the execution engine
- *
+ *
* @param t the thread to be added
*
* @return true if it was added and false otherwise
*/
boolean addDebugThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> t);
-
+
/**
* Remove the debuggable thread from the execution engine
*
@@ -57,34 +48,33 @@
* @return if it was added and false otherwise
*/
boolean removeDebugThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> t);
-
+
/**
* Suspend the specified thread
*
* @param thread to be suspended
*/
void suspendThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> thread);
-
+
/**
* Resume the specified thread
*
* @param thread to be resumed
*/
void resumeThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> thread);
-
-
+
/**
* Terminate the specified thread
*
* @param thread to be terminated
*/
void terminateThread(IDebuggableExecutionEngineThread<ThreadType, ContextType> thread);
-
+
/**
* Return the debug service associated with this engine
*
* @return the debug service
*/
IDebugService<ThreadType, ContextType> getDebugService();
-
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IDebuggableExecutionEngineThread.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IDebuggableExecutionEngineThread.java
index e5192dd..d079b5f 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IDebuggableExecutionEngineThread.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IDebuggableExecutionEngineThread.java
@@ -22,19 +22,19 @@
import org.eclipse.debug.core.model.IVariable;
public interface IDebuggableExecutionEngineThread<ThreadType, SuspensionContextType> extends IAdaptable {
-
+
String getID();
-
+
void setID(final String identifier);
-
+
ThreadType getThread();
-
+
void setThread(final ThreadType t);
-
+
SuspensionContextType getSuspensionContext();
-
+
void setSuspensionContext(final SuspensionContextType c);
-
+
List<IVariable> getVariables(final IDebugTarget target);
-
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/scheduling/IsTargetThreadCondition.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IsTargetThreadCondition.java
similarity index 65%
rename from plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/scheduling/IsTargetThreadCondition.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IsTargetThreadCondition.java
index e227507..29915a3 100644
--- a/plugins/org.eclipse.papyrus.moka.engine.uml/src/org/eclipse/papyrus/moka/engine/uml/scheduling/IsTargetThreadCondition.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/engine/IsTargetThreadCondition.java
@@ -12,29 +12,27 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.engine.uml.scheduling;
+package org.eclipse.papyrus.moka.debug.engine;
-import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.fuml.tasks.IUMLTaskExecution;
-import org.eclipse.papyrus.moka.kernel.scheduling.execution.ITaskExecution;
import org.eclipse.papyrus.moka.kernel.scheduling.execution.ITaskExecutionCondition;
-public class IsTargetThreadCondition implements ITaskExecutionCondition{
+public class IsTargetThreadCondition<ThreadType> implements ITaskExecutionCondition<ThreadType> {
/**
* The target thread
*/
- protected IObject_ thread;
-
- public IsTargetThreadCondition(IObject_ t) {
+ protected ThreadType thread;
+
+ public IsTargetThreadCondition(ThreadType t) {
thread = t;
}
-
+
@Override
- public boolean evaluate(ITaskExecution task) {
+ public boolean evaluate(ThreadType task) {
boolean result = false;
- if(task instanceof IUMLTaskExecution) {
- result = thread != null && thread.equals(((IUMLTaskExecution)task).getContext());
+ if (task instanceof IUMLTaskExecution) {
+ result = thread != null && thread.equals(((IUMLTaskExecution) task).getContext());
}
return result;
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/service/DebugService.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/service/DebugService.java
index 944defe..15c3927 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/service/DebugService.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/service/DebugService.java
@@ -15,8 +15,6 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.debug.service;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PORT;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -25,11 +23,10 @@
import java.util.concurrent.locks.ReentrantLock;
import org.eclipse.debug.core.DebugException;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.papyrus.moka.debug.engine.IDebuggableExecutionEngine;
import org.eclipse.papyrus.moka.debug.engine.IDebuggableExecutionEngineThread;
-import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;
+import org.eclipse.papyrus.moka.kernel.process.MQTTServerConfig;
import org.eclipse.papyrus.moka.kernel.service.ExecutionEngineService;
public abstract class DebugService<T, C> extends ExecutionEngineService<IDebuggableExecutionEngine<T, C>>
@@ -103,8 +100,7 @@
}
private void initClient() {
- IPreferenceStore store = MokaKernelActivator.getDefault().getPreferenceStore();
- String port = store.getString(MQTT_SERVER_PORT);
+ String port = MQTTServerConfig.getMQTTServerPort();
client = new DebugServiceClient("tcp://localhost:" + port, "Debug Service Client", this);
client.run();
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/DebugElementStatus.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/DebugElementStatus.java
similarity index 92%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/DebugElementStatus.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/DebugElementStatus.java
index 26813ff..471afe3 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/DebugElementStatus.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/DebugElementStatus.java
@@ -13,7 +13,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
public enum DebugElementStatus {
NONE,
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugElement.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugElement.java
similarity index 96%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugElement.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugElement.java
index 43f2945..f99b315 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugElement.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugElement.java
@@ -13,7 +13,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
import java.util.concurrent.locks.ReentrantLock;
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTarget.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTarget.java
similarity index 96%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTarget.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTarget.java
index 21bff7b..6cf60db 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTarget.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTarget.java
@@ -13,9 +13,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
-
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PORT;
+package org.eclipse.papyrus.moka.debug.target;
import java.util.ArrayList;
import java.util.HashMap;
@@ -33,11 +31,10 @@
import org.eclipse.debug.core.model.IMemoryBlock;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.core.model.IThread;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.moka.debug.engine.IDebuggableExecutionEngine;
import org.eclipse.papyrus.moka.debug.messages.ThreadRequest;
-import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;
import org.eclipse.papyrus.moka.kernel.process.ExecutionEngineProcess;
+import org.eclipse.papyrus.moka.kernel.process.MQTTServerConfig;
public class ExecutionEngineDebugTarget extends ExecutionEngineDebugElement implements IExecutionEngineDebugTarget {
@@ -86,8 +83,8 @@
}
private void initClient() {
- IPreferenceStore store = MokaKernelActivator.getDefault().getPreferenceStore();
- String port = store.getString(MQTT_SERVER_PORT);
+
+ String port = MQTTServerConfig.getMQTTServerPort();
client = new ExecutionEngineDebugTargetClient("tcp://localhost:" + port, "Debug Target", this);
client.run();
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTargetClient.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTargetClient.java
similarity index 99%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTargetClient.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTargetClient.java
index bf626b4..4487513 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTargetClient.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTargetClient.java
@@ -14,7 +14,7 @@
* CEA LIST - Bug 551906
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
import static org.eclipse.papyrus.moka.debug.communication.DebugTopics.DEBUG_SERVICE_ENGINE_TOPIC;
import static org.eclipse.papyrus.moka.debug.communication.DebugTopics.DEBUG_SERVICE_THREAD_TOPIC;
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTargetClientListener.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTargetClientListener.java
similarity index 98%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTargetClientListener.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTargetClientListener.java
index 6dd6bbe..7a310d1 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineDebugTargetClientListener.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineDebugTargetClientListener.java
@@ -14,7 +14,7 @@
* CEA LIST - Bug 551906
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
import org.eclipse.paho.client.mqttv3.IMqttMessageListener;
import org.eclipse.paho.client.mqttv3.MqttMessage;
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineStackFrame.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineStackFrame.java
similarity index 98%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineStackFrame.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineStackFrame.java
index 72d3959..d17d1dc 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineStackFrame.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineStackFrame.java
@@ -13,7 +13,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IRegisterGroup;
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineThread.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineThread.java
similarity index 96%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineThread.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineThread.java
index 94c4fba..5505766 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineThread.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/ExecutionEngineThread.java
@@ -14,7 +14,7 @@
* CEA LIST - Bug 551906
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
import java.util.concurrent.locks.ReentrantLock;
@@ -28,15 +28,20 @@
public class ExecutionEngineThread extends ExecutionEngineDebugElement implements IExecutionEngineThread {
/**
+ * ID of the UML debug model
+ */
+ public static final String MODEL_ID = "org.eclipse.papyrus.moka.kernel.debug.model";
+
+ /**
* ID of the thread running the active object
*/
private String id;
-
+
/**
* The suspension reason
*/
private SuspensionReasons suspensionReason;
-
+
/**
* The stack frame of the thread
*/
@@ -210,10 +215,10 @@
public void stepReturn() throws DebugException {
}
-
+
@Override
public String getModelIdentifier() {
- return ExecutionEngineThreadModelPresentation.MODEL_ID;
+ return MODEL_ID;
}
/**
@@ -222,7 +227,7 @@
@Override
public IStackFrame[] getStackFrames() throws DebugException {
if (isSuspended()) {
- return new IStackFrame[]{stackFrame};
+ return new IStackFrame[] { stackFrame };
}
return new IStackFrame[0];
}
@@ -270,7 +275,7 @@
public String getID() {
return id;
}
-
+
public void setID(String id) {
this.id = id;
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugElement.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugElement.java
similarity index 94%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugElement.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugElement.java
index eec0cf0..3a52522 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugElement.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugElement.java
@@ -13,7 +13,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
public interface IExecutionEngineDebugElement{
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugTarget.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugTarget.java
similarity index 97%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugTarget.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugTarget.java
index fa03050..931e70c 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugTarget.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugTarget.java
@@ -13,7 +13,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.papyrus.moka.debug.engine.IDebuggableExecutionEngine;
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugTargetClient.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugTargetClient.java
similarity index 97%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugTargetClient.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugTargetClient.java
index 38a2d5b..f122901 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineDebugTargetClient.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineDebugTargetClient.java
@@ -13,7 +13,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
public interface IExecutionEngineDebugTargetClient {
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineThread.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineThread.java
similarity index 96%
rename from plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineThread.java
rename to plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineThread.java
index 2376824..1c67734 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/IExecutionEngineThread.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debug/target/IExecutionEngineThread.java
@@ -14,7 +14,7 @@
* CEA LIST - Bug 551906
*
*****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
+package org.eclipse.papyrus.moka.debug.target;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IThread;
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineThreadModelPresentation.java b/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineThreadModelPresentation.java
deleted file mode 100644
index 5ea838b..0000000
--- a/plugins/org.eclipse.papyrus.moka.kernel.debug/src/org/eclipse/papyrus/moka/debugtarget/ExecutionEngineThreadModelPresentation.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.moka.debugtarget;
-
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IValueDetailListener;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.papyrus.moka.kernel.SuspensionReasons;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorInput;
-
-public class ExecutionEngineThreadModelPresentation implements IDebugModelPresentation {
-
- /**
- * ID of the UML debug model
- */
- public static final String MODEL_ID = "org.eclipse.papyrus.moka.kernel.debug.model.presentation";
-
- @Override
- public String getText(Object element) {
- if (element instanceof IExecutionEngineThread) {
- IExecutionEngineThread executionThread = (IExecutionEngineThread) element;
- if (executionThread.isSuspended()) {
- StringBuilder label = new StringBuilder();
- label.append(((IExecutionEngineThread) element).getID());
- if (executionThread.getSuspensionReason() == SuspensionReasons.ERROR_DETECTION) {
- label.append(" (suspended due to missing expected tokens)");
- } else if (executionThread.getSuspensionReason() == SuspensionReasons.BREAKPOINT) {
- label.append(" (suspend on breakpoint)");
- }
- return label.toString();
- }
- }
- return null;
- }
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- // do nothing
- }
-
- @Override
- public void dispose() {
- // do nothing
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- // do nothing
- }
-
- @Override
- public IEditorInput getEditorInput(Object element) {
- return null;
- }
-
- @Override
- public String getEditorId(IEditorInput input, Object element) {
- return null;
- }
-
- @Override
- public void setAttribute(String attribute, Object value) {
- // do nothing
- }
-
- @Override
- public Image getImage(Object element) {
- return null;
- }
-
- @Override
- public void computeDetail(IValue value, IValueDetailListener listener) {
- // do nothing
- }
-
-}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.scheduling/.classpath b/plugins/org.eclipse.papyrus.moka.kernel.scheduling/.classpath
index 1d45a8a..aa0d560 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.scheduling/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.kernel.scheduling/.classpath
@@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
+ <attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel.scheduling/src/org/eclipse/papyrus/moka/kernel/scheduling/execution/ITaskExecutionCondition.java b/plugins/org.eclipse.papyrus.moka.kernel.scheduling/src/org/eclipse/papyrus/moka/kernel/scheduling/execution/ITaskExecutionCondition.java
index 046641c..14d2df0 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel.scheduling/src/org/eclipse/papyrus/moka/kernel/scheduling/execution/ITaskExecutionCondition.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel.scheduling/src/org/eclipse/papyrus/moka/kernel/scheduling/execution/ITaskExecutionCondition.java
@@ -14,16 +14,15 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.kernel.scheduling.execution;
-public interface ITaskExecutionCondition {
+public interface ITaskExecutionCondition<ThreadType> {
/**
* Evaluate the condition
*
- * @param task
- * the task used a parameter for the evaluation
+ * @param task the task used a parameter for the evaluation
*
* @return true if the condition is verified, false otherwise
*/
- boolean evaluate(ITaskExecution task);
-
+ boolean evaluate(ThreadType task);
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/.classpath b/plugins/org.eclipse.papyrus.moka.kernel/.classpath
index 6723d21..d271eec 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.kernel/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/.project b/plugins/org.eclipse.papyrus.moka.kernel/.project
index be8babe..d138852 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/.project
+++ b/plugins/org.eclipse.papyrus.moka.kernel/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.kernel/META-INF/MANIFEST.MF
index 8e4efd7..de51ed9 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.kernel/META-INF/MANIFEST.MF
@@ -1,15 +1,8 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui;bundle-version="[3.117.0,4.0.0)",
- org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.papyrus.uml.diagram.wizards;bundle-version="[3.2.0,5.0.0)",
- org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
+Require-Bundle: org.eclipse.debug.core;bundle-version="[3.17.0,4.0.0)";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.paho.client.mqttv3;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.paho.client.mqttv3;bundle-version="[1.2.0,2.0.0)";visibility:=reexport
Export-Package: org.eclipse.papyrus.moka.kernel,
org.eclipse.papyrus.moka.kernel.assistant,
org.eclipse.papyrus.moka.kernel.engine,
@@ -17,7 +10,7 @@
org.eclipse.papyrus.moka.kernel.process,
org.eclipse.papyrus.moka.kernel.service,
org.eclipse.papyrus.moka.kernel.validation
-Bundle-Vendor: %providerName
+Bundle-Vendor: org.eclipse.papyrus.moka.kernel
Bundle-Localization: plugin
Bundle-Version: 4.1.0.qualifier
Bundle-Name: org.eclipse.papyrus.moka.kernel
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/plugin.xml b/plugins/org.eclipse.papyrus.moka.kernel/plugin.xml
index deffd42..c8b3d00 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.kernel/plugin.xml
@@ -1,21 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
- <extension-point id="engine" name="ExecutionEngine" schema="schema/engine.exsd"/>
- <extension-point id="service" name="service" schema="schema/service.exsd"/>
- <extension-point id="validation" name="Validation" schema="schema/validation.exsd"/>
- <extension
- point="org.eclipse.ui.startup">
- <startup
- class="org.eclipse.papyrus.moka.kernel.MokaKernelStartup">
- </startup>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.papyrus.moka.kernel.preferences.PapyrusSimulationPreferencePageInitializer">
- </initializer>
- </extension>
+ <extension-point id="org.eclipse.papyrus.moka.kernel.engine" name="Execution engine extension point" schema="schema/org.eclipse.papyrus.moka.kernel.engine.exsd"/>
+ <extension-point id="org.eclipse.papyrus.moka.kernel.service" name="Execution engine service extension point" schema="schema/org.eclipse.papyrus.moka.kernel.service.exsd"/>
+ <extension-point id="org.eclipse.papyrus.moka.kernel.validation" name="Validation" schema="schema/org.eclipse.papyrus.moka.kernel.validation.exsd"/>
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated Kernel -->
<package
@@ -23,18 +11,5 @@
class="org.eclipse.papyrus.moka.kernel.KernelPackage"
genModel="resources/models/Kernel.genmodel"/>
</extension>
- <extension
- point="org.eclipse.ui.newWizards">
- <wizard
- category="org.eclipse.ui.Examples/org.eclipse.papyrus.examples"
- class="org.eclipse.papyrus.uml.diagram.wizards.wizards.PapyrusExampleInstallerWizard"
- finalPerspective="org.eclipse.papyrus.infra.core.perspective"
- icon="resources/icons/moka_icon.png"
- id="org.eclipse.papyrus.moka.kernel.wizard.examples"
- name="Papyrus Moka Examples"
- preferredPerspectives="org.eclipse.papyrus.infra.core.perspective,org.eclipse.papyrus.moka.ui.debug.perspectives.moka.debug"
- project="true">
- </wizard>
- </extension>
</plugin>
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/schema/engine.exsd b/plugins/org.eclipse.papyrus.moka.kernel/schema/org.eclipse.papyrus.moka.kernel.engine.exsd
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.kernel/schema/engine.exsd
rename to plugins/org.eclipse.papyrus.moka.kernel/schema/org.eclipse.papyrus.moka.kernel.engine.exsd
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/schema/service.exsd b/plugins/org.eclipse.papyrus.moka.kernel/schema/org.eclipse.papyrus.moka.kernel.service.exsd
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.kernel/schema/service.exsd
rename to plugins/org.eclipse.papyrus.moka.kernel/schema/org.eclipse.papyrus.moka.kernel.service.exsd
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/schema/validation.exsd b/plugins/org.eclipse.papyrus.moka.kernel/schema/org.eclipse.papyrus.moka.kernel.validation.exsd
similarity index 100%
rename from plugins/org.eclipse.papyrus.moka.kernel/schema/validation.exsd
rename to plugins/org.eclipse.papyrus.moka.kernel/schema/org.eclipse.papyrus.moka.kernel.validation.exsd
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelPreferences.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelProperties.java
similarity index 71%
rename from plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelPreferences.java
rename to plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelProperties.java
index 5ef32e1..7e6d886 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelPreferences.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/IKernelProperties.java
@@ -15,8 +15,12 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.kernel;
-public interface IKernelPreferences {
-
- final static String KERNEL_PREFERENCES_ID = "org.eclipse.papyrus.moka.kernel.preferences";
+public interface IKernelProperties {
+
+ public final static String MQTT_SERVER_PATH = "MQTT_SERVER_PATH";
+
+ public final static String MQTT_SERVER_PORT = "MQTT_SERVER_PORT";
+
+ public final static String DEFAULT_MQTT_SERVER_PORT = "1885";
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/MokaKernelActivator.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/MokaKernelActivator.java
index 8174df8..9bbf8dd 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/MokaKernelActivator.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/MokaKernelActivator.java
@@ -15,13 +15,15 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.kernel;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle.
*/
-public class MokaKernelActivator extends AbstractUIPlugin {
+public class MokaKernelActivator extends Plugin {
// The plug-in ID
/** The Constant PLUGIN_ID. */
@@ -31,10 +33,13 @@
/** The plugin. */
private static MokaKernelActivator plugin;
+ public ILog logger;
+
/**
* The constructor.
*/
public MokaKernelActivator() {
+ logger = Platform.getLog(this.getClass());
}
/*
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/MokaKernelStartup.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/MokaKernelStartup.java
deleted file mode 100644
index 55bdd32..0000000
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/MokaKernelStartup.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.moka.kernel;
-
-import org.eclipse.ui.IStartup;
-
-/**
- * This class is only used to be sure that this plugin will be activate on
- * startup otherwise the preference initialization can not works correctly
- */
-public class MokaKernelStartup implements IStartup {
-
- @Override
- public void earlyStartup() {
-
- }
-
-}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/ExecutionEngine.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/AbstractExecutionEngine.java
similarity index 95%
rename from plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/ExecutionEngine.java
rename to plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/AbstractExecutionEngine.java
index 2e5dd01..6bf414e 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/ExecutionEngine.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/AbstractExecutionEngine.java
@@ -21,11 +21,12 @@
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.ITerminate;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.moka.kernel.service.IExecutionEngineService;
import org.eclipse.papyrus.moka.kernel.service.ServiceOperatingMode;
import org.eclipse.papyrus.moka.kernel.service.ServiceRegistry;
-public abstract class ExecutionEngine implements IExecutionEngine {
+public abstract class AbstractExecutionEngine implements IExecutionEngine {
/**
* Initialization task message
@@ -57,7 +58,7 @@
*/
protected ReentrantLock statusLock;
- public ExecutionEngine() {
+ public AbstractExecutionEngine() {
status = ExecutionEngineStatus.NONE;
statusLock = new ReentrantLock(true);
}
@@ -115,7 +116,7 @@
*
* @param monitor to report progress
*/
- protected void init(final EngineConfiguration<?> configuration, SubMonitor monitor) {
+ protected void init(final EngineConfiguration<? extends EObject> configuration, SubMonitor monitor) {
this.configuration = configuration;
if (configuration.getMode().equals(ServiceOperatingMode.NORMAL)) {
ServiceRegistry registry = ServiceRegistry.getInstance();
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/EngineConfiguration.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/EngineConfiguration.java
index b012606..a814c17 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/EngineConfiguration.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/EngineConfiguration.java
@@ -27,13 +27,13 @@
// The project containing the model to be executed
protected IProject project;
-
+
// Determine if services should run or not
protected ServiceOperatingMode mode;
// The URI of the executed model
protected URI modelURI;
-
+
// The model element that is used as a starting point for the execution
protected SourceElementType source;
@@ -41,11 +41,11 @@
protected Map<String, String> parameters;
protected String traceFilePath;
-
+
protected String formatterID;
-
+
protected boolean traceEnabled;
-
+
protected boolean tracepointMode;
public EngineConfiguration() {
@@ -58,12 +58,12 @@
mode = m;
parameters = new HashMap<String, String>();
}
-
+
public EngineConfiguration(EngineConfiguration<SourceElementType> ec) {
source = ec.getExecutionSource();
mode = ec.getMode();
parameters = new HashMap<String, String>();
- for(Map.Entry<String, String> p : ec.getParameters().entrySet()) {
+ for (Map.Entry<String, String> p : ec.getParameters().entrySet()) {
parameters.put(p.getKey(), p.getValue());
}
project = ec.getProject();
@@ -108,7 +108,7 @@
public Map<String, String> getParameters() {
return parameters;
}
-
+
public IProject getProject() {
return project;
}
@@ -124,7 +124,7 @@
public void setModelURI(URI modelURI) {
this.modelURI = modelURI;
}
-
+
public String getTraceFilePath() {
return traceFilePath;
}
@@ -132,8 +132,7 @@
public void setTraceFilePath(String traceFilePath) {
this.traceFilePath = traceFilePath;
}
-
-
+
public String getFormatterID() {
return formatterID;
}
@@ -153,7 +152,7 @@
public void setTracepointMode(boolean mode) {
tracepointMode = mode;
}
-
+
public boolean isTracepointMode() {
return this.tracepointMode;
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/EngineRegistry.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/EngineRegistry.java
index 579c64d..14dcad8 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/EngineRegistry.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/engine/EngineRegistry.java
@@ -46,6 +46,11 @@
protected HashMap<String, IExecutionEngine> registry;
/**
+ * Status of the registry
+ */
+ private boolean loaded = false;
+
+ /**
* Singleton instance of the registry
*/
private static EngineRegistry INSTANCE;
@@ -62,38 +67,43 @@
}
public void loadEngines() {
- // Find all engines contributed through extension point.
- // Engines are not instantiated but their ID get registered.
- IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
- IConfigurationElement[] configurations = extensionRegistry
- .getConfigurationElementsFor(MOKA_ENGINE_EXTENSION_POINT_ID);
- for (int i = 0; i < configurations.length; i++) {
- String identifier = configurations[i].getAttribute(ENGINE_ID_ATTRIBUTE);
- if (!registry.containsKey(identifier)) {
- Object instance = null;
- try {
- instance = configurations[i].createExecutableExtension(ENGINE_CLASS_ATTRIBUTE);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- if (instance != null && instance instanceof IExecutionEngine) {
- ((IExecutionEngine) instance).setID(identifier);
- registry.put(identifier, (IExecutionEngine) instance);
+ if (!loaded) {
+ // Find all engines contributed through extension point.
+ // Engines are not instantiated but their ID get registered.
+ IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
+ IConfigurationElement[] configurations = extensionRegistry
+ .getConfigurationElementsFor(MOKA_ENGINE_EXTENSION_POINT_ID);
+ for (int i = 0; i < configurations.length; i++) {
+ String identifier = configurations[i].getAttribute(ENGINE_ID_ATTRIBUTE);
+ if (!registry.containsKey(identifier)) {
+ Object instance = null;
+ try {
+ instance = configurations[i].createExecutableExtension(ENGINE_CLASS_ATTRIBUTE);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ if (instance != null && instance instanceof IExecutionEngine) {
+ ((IExecutionEngine) instance).setID(identifier);
+ registry.put(identifier, (IExecutionEngine) instance);
+ }
}
}
+ loaded = true;
}
}
public IExecutionEngine getEngine(final String engineID) {
+ loadEngines();
// Return an instance of the specified engine
return registry.get(engineID);
}
public Collection<IExecutionEngine> getAllEngines() {
+ loadEngines();
// Return an instance of all engines contributed through the extension point
return registry.values();
}
-
+
public void clear() {
registry.clear();
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/preferences/PapyrusSimulationPreferencePageInitializer.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/preferences/PapyrusSimulationPreferencePageInitializer.java
deleted file mode 100644
index 401ebf9..0000000
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/preferences/PapyrusSimulationPreferencePageInitializer.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.moka.kernel.preferences;
-
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MODEL_VALIDATION_ON_LAUNCH;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PORT;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;;
-
-public class PapyrusSimulationPreferencePageInitializer extends AbstractPreferenceInitializer {
-
- public PapyrusSimulationPreferencePageInitializer() {
- super();
- }
-
- @Override
- public void initializeDefaultPreferences() {
- IPreferenceStore store = MokaKernelActivator.getDefault().getPreferenceStore();
- store.setDefault(MQTT_SERVER_PORT, 1885);
- store.setDefault(MODEL_VALIDATION_ON_LAUNCH, true);
- }
-
-}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ExecutionEngineJob.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ExecutionEngineJob.java
index 7ac6f61..414043d 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ExecutionEngineJob.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ExecutionEngineJob.java
@@ -21,11 +21,10 @@
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugException;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;
import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
import org.eclipse.papyrus.moka.kernel.engine.ExecutionEngineException;
import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
-import org.eclipse.swt.widgets.Display;
public class ExecutionEngineJob extends Job implements IExecutionEngineContainer {
@@ -82,17 +81,15 @@
return engine;
}
- private static void handleEngineException(final ExecutionEngineException exception) {
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- String message = exception.getMessage();
- message += "\n\n Engine information ---"; //$NON-NLS-1$
- message += "\n - Status: " + exception.getEngineStatus().toString(); //$NON-NLS-1$
- message += "\n - ID: " + exception.getEngineID(); //$NON-NLS-1$
- MessageDialog.openWarning(Display.getDefault().getActiveShell(), "Error", message); //$NON-NLS-1$
- }
- });
+ private void handleEngineException(final ExecutionEngineException exception) {
+
+ String message = exception.getMessage();
+ message += "\n\n Engine information ---"; //$NON-NLS-1$
+ message += "\n - Status: " + exception.getEngineStatus().toString(); //$NON-NLS-1$
+ message += "\n - ID: " + exception.getEngineID(); //$NON-NLS-1$
+
+ MokaKernelActivator.getDefault().logger.error(message, exception);
+
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ExecutionEngineProcess.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ExecutionEngineProcess.java
index a002adc..f79caf1 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ExecutionEngineProcess.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ExecutionEngineProcess.java
@@ -25,13 +25,15 @@
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.core.model.IStreamsProxy;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
public class ExecutionEngineProcess extends BaseProcess<ExecutionEngineJob>
implements IJobChangeListener, IExecutionEngineContainer {
- public ExecutionEngineProcess(ILaunch launch, IExecutionEngine engine, EngineConfiguration config) {
+ public ExecutionEngineProcess(ILaunch launch, IExecutionEngine engine,
+ EngineConfiguration<? extends EObject> config) {
super(launch);
process = new ExecutionEngineJob(engine, config);
process.addJobChangeListener(this);
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/IServerMqttPreferences.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/IServerMqttPreferences.java
deleted file mode 100644
index 4ea89d7..0000000
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/IServerMqttPreferences.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.moka.kernel.process;
-
-public interface IServerMqttPreferences {
-
- final String MQTT_SERVER_PATH = "MQTT_SERVER_PATH";
-
- final String MQTT_SERVER_PORT = "MQTT_SERVER_PORT";
-
- final String MODEL_VALIDATION_ON_LAUNCH = "MODEL_VALIDATION_ON_LAUNCH";
-
-}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/MQTTServerConfig.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/MQTTServerConfig.java
new file mode 100644
index 0000000..23372c4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/MQTTServerConfig.java
@@ -0,0 +1,68 @@
+package org.eclipse.papyrus.moka.kernel.process;
+
+import org.eclipse.papyrus.moka.kernel.IKernelProperties;
+import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;
+
+public class MQTTServerConfig {
+
+ private static String mqttServerPath;
+
+ private static String mqttServerPort;
+
+ static public String getMQTTServerPort() {
+ if (mqttServerPort != null) {
+ return mqttServerPort;
+ }
+
+ // Try to get from System property
+ mqttServerPort = System.getProperty(IKernelProperties.MQTT_SERVER_PORT);
+ if (mqttServerPort == null) {
+ // Get the default value
+ mqttServerPort = IKernelProperties.DEFAULT_MQTT_SERVER_PORT;
+ }
+
+ return mqttServerPort;
+ }
+
+ static public String getMQTTServerPath() {
+ if (mqttServerPath != null) {
+ return mqttServerPath;
+ }
+
+ // Try to get from System property
+ mqttServerPath = System.getProperty(IKernelProperties.MQTT_SERVER_PATH);
+
+ if (mqttServerPath == null) {
+ MokaKernelActivator.getDefault().logger
+ .error("Invlaid value for property " + IKernelProperties.MQTT_SERVER_PATH); //$NON-NLS-1$
+ }
+
+ return mqttServerPath;
+ }
+
+ static public boolean isSetServerPortSystemProperty() {
+ return System.getProperty(IKernelProperties.MQTT_SERVER_PORT) != null;
+ }
+
+ static public boolean isSetServerPathSystemProperty() {
+ return System.getProperty(IKernelProperties.MQTT_SERVER_PATH) != null;
+ }
+
+ public static void setMQTTServerPort(String newServerPort) {
+ if (isSetServerPortSystemProperty()) {
+ MokaKernelActivator.getDefault().logger.warn(
+ "New value for " + IKernelProperties.MQTT_SERVER_PATH + " may conflict with set System Property"); //$NON-NLS-1$
+ }
+ mqttServerPort = newServerPort;
+
+ }
+
+ public static void setMQTTServerPath(String newServerPath) {
+ if (isSetServerPathSystemProperty()) {
+ MokaKernelActivator.getDefault().logger.warn(
+ "New value for " + IKernelProperties.MQTT_SERVER_PATH + " may conflict with set System Property"); //$NON-NLS-1$
+ }
+ mqttServerPath = newServerPath;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ServerMqttProcess.java b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ServerMqttProcess.java
index d044ee4..fa7ac47 100644
--- a/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ServerMqttProcess.java
+++ b/plugins/org.eclipse.papyrus.moka.kernel/src/org/eclipse/papyrus/moka/kernel/process/ServerMqttProcess.java
@@ -15,9 +15,6 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.kernel.process;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PATH;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PORT;
-
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
@@ -30,8 +27,6 @@
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchesListener2;
import org.eclipse.debug.core.model.IStreamsProxy;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;
public class ServerMqttProcess extends BaseProcess<Process> implements ILaunchesListener2 {
@@ -96,15 +91,15 @@
@Override
public void run() {
- IPreferenceStore store = MokaKernelActivator.getDefault().getPreferenceStore();
- File serverExecutable = new File(store.getString(MQTT_SERVER_PATH));
+
+ File serverExecutable = new File(MQTTServerConfig.getMQTTServerPath());
if (serverExecutable.exists() && serverExecutable.isFile()) {
ProcessBuilder builder = new ProcessBuilder().inheritIO();
List<String> commands = new ArrayList<String>();
commands.add(serverExecutable.getAbsolutePath());
commands.add("-v");
commands.add("-p");
- commands.add(String.valueOf(store.getInt(MQTT_SERVER_PORT)));
+ commands.add(MQTTServerConfig.getMQTTServerPort());
builder.command(commands);
try {
process = builder.start();
diff --git a/plugins/org.eclipse.papyrus.moka.modeling.utils/.classpath b/plugins/org.eclipse.papyrus.moka.modeling.utils/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.modeling.utils/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.modeling.utils/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.modeling.utils/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.modeling.utils/META-INF/MANIFEST.MF
index 1abdb9b..20d249e 100644
--- a/plugins/org.eclipse.papyrus.moka.modeling.utils/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.modeling.utils/META-INF/MANIFEST.MF
@@ -4,9 +4,7 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.modeling.utils
Bundle-Version: 4.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Require-Bundle: org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.4.0,5.0.0)",
- org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.3.0,3.0.0)"
+Require-Bundle: org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)";visibility:=reexport
Bundle-Vendor: Eclipse Modeling Project
Export-Package: org.eclipse.papyrus.moka.modeling.utils
Automatic-Module-Name: org.eclipse.papyrus.moka.modeling.utils
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.interfaces/.classpath b/plugins/org.eclipse.papyrus.moka.pscs.interfaces/.classpath
index bc57d23..96d2680 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.interfaces/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.pscs.interfaces/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.interfaces/.project b/plugins/org.eclipse.papyrus.moka.pscs.interfaces/.project
index a844587..86e17fe 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.interfaces/.project
+++ b/plugins/org.eclipse.papyrus.moka.pscs.interfaces/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.interfaces/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.pscs.interfaces/META-INF/MANIFEST.MF
index 92c43bb..64159c2 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.interfaces/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.pscs.interfaces/META-INF/MANIFEST.MF
@@ -4,9 +4,8 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.pscs.interfaces
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.pscs.Activator
-Require-Bundle: org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)"
+Require-Bundle: org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Eclipse Modeling Project
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.utils/.classpath b/plugins/org.eclipse.papyrus.moka.pscs.utils/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.utils/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.pscs.utils/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.utils/.project b/plugins/org.eclipse.papyrus.moka.pscs.utils/.project
index 9b6968c..1e0f4f3 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.utils/.project
+++ b/plugins/org.eclipse.papyrus.moka.pscs.utils/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.utils/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.pscs.utils/META-INF/MANIFEST.MF
index fea1ba4..0dfef7b 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.utils/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.pscs.utils/META-INF/MANIFEST.MF
@@ -1,12 +1,10 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.4.0,5.0.0)",
- org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.3.0,3.0.0)",
- org.eclipse.papyrus.infra.emf;bundle-version="[3.1.0,5.0.0)",
+Require-Bundle: org.eclipse.papyrus.uml.tools.utils;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[4.0.0,5.0.0)",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
- org.eclipse.papyrus.editor;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.papyrus.moka.pscs;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.utils.ui;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)"
+ org.eclipse.papyrus.moka.utils.ui;bundle-version="[4.1.0,5.0.0)";visibility:=reexport,
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="[2.0.0,3.0.0)"
Export-Package: org.eclipse.papyrus.moka.pscs.utils,
org.eclipse.papyrus.moka.pscs.utils.handlers,
org.eclipse.papyrus.moka.pscs.utils.ui
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.utils/src/org/eclipse/papyrus/moka/pscs/utils/handlers/GenerateMethodHandler.java b/plugins/org.eclipse.papyrus.moka.pscs.utils/src/org/eclipse/papyrus/moka/pscs/utils/handlers/GenerateMethodHandler.java
index 0f9d859..3d3c102 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.utils/src/org/eclipse/papyrus/moka/pscs/utils/handlers/GenerateMethodHandler.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs.utils/src/org/eclipse/papyrus/moka/pscs/utils/handlers/GenerateMethodHandler.java
@@ -22,17 +22,15 @@
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Operation;
-
public class GenerateMethodHandler extends AbstractCompositeUtilsHandler {
- protected Operation contextOperation ;
-
+ protected Operation contextOperation;
+
@Override
public RecordingCommand getUpdateCommand(Class context, TransactionalEditingDomain domain) {
return new GenerateMethodCommand(context, domain);
@@ -42,11 +40,11 @@
public boolean isEnabled() {
Element selectedElement = Utils.getSelection();
if (selectedElement != null) {
- return selectedElement instanceof Operation ;
+ return selectedElement instanceof Operation;
}
return false;
}
-
+
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
Class context = null;
@@ -55,7 +53,7 @@
if (contextOperation != null) {
Element cddClass = contextOperation.getOwner();
if (cddClass instanceof Class) {
- context = (Class)cddClass ;
+ context = (Class) cddClass;
}
}
if (context != null) {
@@ -65,7 +63,7 @@
}
/**
- * Return the Operation associated with the selection object or null
+ * Return the Operation associated with the selection object or null
*
* @param selected
* @return Class
@@ -82,7 +80,7 @@
return nElem instanceof Operation ? (Operation) nElem : null;
}
}
-
+
/**
* Command that generate factory for a given class.
*
@@ -100,9 +98,9 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor
- * , org.eclipse.core.runtime.IAdaptable)
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.
+ * AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.
+ * IProgressMonitor , org.eclipse.core.runtime.IAdaptable)
*/
@Override
protected void doExecute() {
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.validation/.classpath b/plugins/org.eclipse.papyrus.moka.pscs.validation/.classpath
index e801ebf..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.validation/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.pscs.validation/.classpath
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.validation/.project b/plugins/org.eclipse.papyrus.moka.pscs.validation/.project
index 679eb15..2c0e97c 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.validation/.project
+++ b/plugins/org.eclipse.papyrus.moka.pscs.validation/.project
@@ -20,8 +20,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.validation/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.pscs.validation/META-INF/MANIFEST.MF
index c05a4cc..2b33000 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.validation/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.pscs.validation/META-INF/MANIFEST.MF
@@ -5,9 +5,9 @@
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.pscs.validation.Activator
Bundle-Vendor: Eclipse Modeling Project
-Require-Bundle: org.eclipse.ui;bundle-version="[3.117.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.emf.validation;bundle-version="[1.8.0,2.0.0)",
+Require-Bundle: org.eclipse.ui;bundle-version="[3.118.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.emf.validation;bundle-version="[1.8.0,2.0.0)";visibility:=reexport,
org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.eclipse.papyrus.moka.pscs.validation
diff --git a/plugins/org.eclipse.papyrus.moka.pscs.validation/build.properties b/plugins/org.eclipse.papyrus.moka.pscs.validation/build.properties
index e9863e2..cc91072 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs.validation/build.properties
+++ b/plugins/org.eclipse.papyrus.moka.pscs.validation/build.properties
@@ -1,5 +1,4 @@
source.. = src/
-output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/.classpath b/plugins/org.eclipse.papyrus.moka.pscs/.classpath
index c941c51..74c6a3e 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.pscs/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="src" path="aspects/"/>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/.project b/plugins/org.eclipse.papyrus.moka.pscs/.project
index fa997b0..33832dc 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/.project
+++ b/plugins/org.eclipse.papyrus.moka.pscs/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,7 +30,6 @@
<nature>org.eclipse.ajdt.ui.ajnature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.pscs/META-INF/MANIFEST.MF
index d67f953..dbbdeb9 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.pscs/META-INF/MANIFEST.MF
@@ -1,13 +1,9 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
+Require-Bundle: org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)",
- org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)"
+ org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-Version: 4.1.0.qualifier
@@ -23,8 +19,10 @@
org.eclipse.papyrus.moka.pscs.classification,
org.eclipse.papyrus.moka.pscs.commonbehavior,
org.eclipse.papyrus.moka.pscs.loci,
+ org.eclipse.papyrus.moka.pscs.profiling,
+ org.eclipse.papyrus.moka.pscs.profiling.actions,
+ org.eclipse.papyrus.moka.pscs.profiling.debug,
org.eclipse.papyrus.moka.pscs.profiling.structuredclassifiers,
org.eclipse.papyrus.moka.pscs.structuredclassifiers,
org.eclipse.papyrus.moka.pscs.structuredclassifiers.additions,
- org.eclipse.papyrus.moka.pscs.values,
- org.eclipse.papyrus.moka.pscs.profiling.actions
+ org.eclipse.papyrus.moka.pscs.values
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/aspects/org/eclipse/papyrus/moka/pscs/profiling/Activator.java b/plugins/org.eclipse.papyrus.moka.pscs/aspects/org/eclipse/papyrus/moka/pscs/profiling/Activator.java
new file mode 100644
index 0000000..6f0f933
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.pscs/aspects/org/eclipse/papyrus/moka/pscs/profiling/Activator.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.pscs.profiling;
+
+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.papyrus.moka.pscs.profiling"; //$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)
+ */
+ @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)
+ */
+ @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;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/build.properties b/plugins/org.eclipse.papyrus.moka.pscs/build.properties
index 9717494..cde548f 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/build.properties
+++ b/plugins/org.eclipse.papyrus.moka.pscs/build.properties
@@ -3,7 +3,6 @@
output.. = target/classes/
bin.includes = META-INF/,\
.,\
- plugin.xml,\
about.html,\
pom.xml
src.includes = about.html
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/plugin.xml b/plugins/org.eclipse.papyrus.moka.pscs/plugin.xml
deleted file mode 100644
index 5535690..0000000
--- a/plugins/org.eclipse.papyrus.moka.pscs/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-</plugin>
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/pom.xml b/plugins/org.eclipse.papyrus.moka.pscs/pom.xml
index 0084571..07d28f9 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/pom.xml
+++ b/plugins/org.eclipse.papyrus.moka.pscs/pom.xml
@@ -15,20 +15,8 @@
<packaging>eclipse-plugin</packaging>
<name>org.eclipse.papyrus.moka.pscs</name>
<description>Execution engine implementing Precise Semantics for Composite Structures (PSCS)</description>
-
- <!-- Properties -->
- <properties>
- <fuml-aspects>${project.basedir}/../org.eclipse.papyrus.moka.fuml/aspects</fuml-aspects>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.nickwongdev</groupId>
- <artifactId>aspectj-maven-plugin</artifactId>
- <version>1.12.1</version>
- </dependency>
- </dependencies>
-
+
+
<!-- Build specificities -->
<build>
<plugins>
@@ -48,7 +36,6 @@
<configuration>
<verbose>true</verbose>
<showWeaveInfo>true</showWeaveInfo>
- <aspectDirectory>${fuml-aspects}</aspectDirectory>
<aspectDirectory>${project.basedir}/aspects</aspectDirectory>
<source>11</source>
<target>11</target>
@@ -58,5 +45,4 @@
</plugin>
</plugins>
</build>
-
</project>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/actions/CS_CallOperationActionActivation.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/actions/CS_CallOperationActionActivation.java
index 09998aa..335b816 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/actions/CS_CallOperationActionActivation.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/actions/CS_CallOperationActionActivation.java
@@ -24,7 +24,6 @@
import org.eclipse.papyrus.moka.fuml.loci.ILocus;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
-import org.eclipse.papyrus.moka.pscs.actions.ICS_CallOperationActionActivation;
import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_Reference;
import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Reference;
import org.eclipse.uml2.uml.CallOperationAction;
@@ -37,7 +36,8 @@
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.Stereotype;
-public class CS_CallOperationActionActivation extends CallOperationActionActivation implements ICS_CallOperationActionActivation {
+public class CS_CallOperationActionActivation extends CallOperationActionActivation
+ implements ICS_CallOperationActionActivation {
@Override
public void doAction() {
@@ -49,9 +49,11 @@
// The default construction strategy is used if no method is associated with the
// <<Create>> operation.
// Otherwise, behaves as in fUML.
- if (action.getOnPort() == null && this.isCreate(action.getOperation()) && action.getOperation().getMethods().size() == 0) {
+ if (action.getOnPort() == null && this.isCreate(action.getOperation())
+ && action.getOperation().getMethods().size() == 0) {
ILocus locus = this.getExecutionLocus();
- CS_ConstructStrategy strategy = ((CS_ConstructStrategy) locus.getFactory().getStrategy("constructStrategy"));
+ CS_ConstructStrategy strategy = ((CS_ConstructStrategy) locus.getFactory()
+ .getStrategy("constructStrategy"));
IValue target = this.takeTokens(action.getTarget()).get(0);
if (target instanceof CS_Reference) {
strategy.construct(action.getOperation(), ((CS_Reference) target).compositeReferent);
@@ -82,16 +84,23 @@
// to it and return the resulting execution object.
// As compared to fUML, instead of dispatching directly to target reference
// by calling operation dispatch:
- // - If the invoked BehavioralFeature is on a provided Interface but not on any required Interface,
- // then, when the InvocationAction is executed, the invocation is made into the object given on
+ // - If the invoked BehavioralFeature is on a provided Interface but not on any
+ // required Interface,
+ // then, when the InvocationAction is executed, the invocation is made into the
+ // object given on
// the target InputPin through the given Port
- // - If the invoked BehavioralFeature is on a required Interface but not on any provided Interface,
- // then, if the InvocationAction is being executed inside the object given on the target InputPin,
+ // - If the invoked BehavioralFeature is on a required Interface but not on any
+ // provided Interface,
+ // then, if the InvocationAction is being executed inside the object given on
+ // the target InputPin,
// the invocation is forwarded out of the target object through the given Port.
- // - If the invoked BehavioralFeature is on both a provided and a required Interface,
- // then, if the InvocationAction is being executed inside the object given on the target InputPin,
+ // - If the invoked BehavioralFeature is on both a provided and a required
+ // Interface,
+ // then, if the InvocationAction is being executed inside the object given on
+ // the target InputPin,
// the invocation is made out of the target object through the given Port.
- // Otherwise the invocation is made into the target object through the given Port.
+ // Otherwise the invocation is made into the target object through the given
+ // Port.
CallOperationAction action = (CallOperationAction) (this.node);
IExecution execution = null;
@@ -105,8 +114,10 @@
// target, through onPort
ICS_Reference targetReference = (CS_Reference) target;
IObject_ executionContext = this.group.getActivityExecution().getContext();
- boolean operationIsOnProvidedInterface = this.isOperationProvided(action.getOnPort(), action.getOperation());
- boolean operationIsOnRequiredInterface = this.isOperationRequired(action.getOnPort(), action.getOperation());
+ boolean operationIsOnProvidedInterface = this.isOperationProvided(action.getOnPort(),
+ action.getOperation());
+ boolean operationIsOnRequiredInterface = this.isOperationRequired(action.getOnPort(),
+ action.getOperation());
// Operation on a provided interface only
if (operationIsOnProvidedInterface && !operationIsOnRequiredInterface) {
execution = targetReference.dispatchIn(action.getOperation(), action.getOnPort());
@@ -116,13 +127,15 @@
// If not executing in the context of the target,
// Semantics are undefined.
// Otherwise, dispatch outside.
- if (executionContext == targetReference.getReferent() || targetReference.getCompositeReferent().contains(executionContext)) {
+ if (executionContext == targetReference.getReferent()
+ || targetReference.getCompositeReferent().contains(executionContext)) {
execution = targetReference.dispatchOut(action.getOperation(), action.getOnPort());
}
}
// Operation is both on a provided and a required interface
else if (operationIsOnProvidedInterface && operationIsOnRequiredInterface) {
- if (executionContext == targetReference.getReferent() || targetReference.getCompositeReferent().contains(executionContext)) {
+ if (executionContext == targetReference.getReferent()
+ || targetReference.getCompositeReferent().contains(executionContext)) {
execution = targetReference.dispatchOut(action.getOperation(), action.getOnPort());
} else {
execution = targetReference.dispatchIn(action.getOperation(), action.getOnPort());
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/actions/CS_ClearStructuralFeatureValueActionActivation.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/actions/CS_ClearStructuralFeatureValueActionActivation.java
index c6a0b9c..cdeaac5 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/actions/CS_ClearStructuralFeatureValueActionActivation.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/actions/CS_ClearStructuralFeatureValueActionActivation.java
@@ -25,7 +25,6 @@
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IExtensionalValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.ILink;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IReference;
-import org.eclipse.papyrus.moka.pscs.actions.ICS_ClearStructuralFeatureValueActionActivation;
import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_Link;
import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_Reference;
import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_InteractionPoint;
@@ -36,7 +35,8 @@
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.StructuralFeature;
-public class CS_ClearStructuralFeatureValueActionActivation extends ClearStructuralFeatureActionActivation implements ICS_ClearStructuralFeatureValueActionActivation {
+public class CS_ClearStructuralFeatureValueActionActivation extends ClearStructuralFeatureActionActivation
+ implements ICS_ClearStructuralFeatureValueActionActivation {
@Override
public void doAction() {
@@ -79,7 +79,8 @@
List<ICS_Link> linksToDestroy = new ArrayList<ICS_Link>();
if (value instanceof CS_Reference) {
ICS_Reference context = (CS_Reference) value;
- // Retrieves the feature values for the structural feature associated with this action,
+ // Retrieves the feature values for the structural feature associated with this
+ // action,
// in the context of this reference
IFeatureValue featureValue = context.getFeatureValue(feature);
if (feature instanceof Port) {
@@ -135,7 +136,8 @@
for (int k = 0; k < link.getFeatureValues().size() && !linkHasToBeDestroyed; k++) {
IFeatureValue otherFeatureValue = link.getFeatureValues().get(k);
if (otherFeatureValue.getFeature() != featureForV) {
- for (int l = 0; l < otherFeatureValue.getValues().size() && !linkHasToBeDestroyed; l++) {
+ for (int l = 0; l < otherFeatureValue.getValues().size()
+ && !linkHasToBeDestroyed; l++) {
for (int m = 0; m < allOtherValues.size() && !linkHasToBeDestroyed; m++) {
if (otherFeatureValue.getValues().get(l) == allOtherValues.get(m)) {
linkHasToBeDestroyed = true;
@@ -167,7 +169,8 @@
// add all interaction points associated with v
for (int j = 0; j < ((CS_Reference) v).getReferent().getFeatureValues().size(); j++) {
if (((ICS_Reference) v).getReferent().getFeatureValues().get(j).getFeature() instanceof Port) {
- List<IValue> interactionPoints = (((ICS_Reference) v).getReferent().getFeatureValues().get(j)).getValues();
+ List<IValue> interactionPoints = (((ICS_Reference) v).getReferent().getFeatureValues().get(j))
+ .getValues();
for (int k = 0; k < interactionPoints.size(); k++) {
potentialLinkEnds.add(interactionPoints.get(k));
}
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/commonbehavior/CS_CallEventExecution.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/commonbehavior/CS_CallEventExecution.java
index 920263f..da5aef2 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/commonbehavior/CS_CallEventExecution.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/commonbehavior/CS_CallEventExecution.java
@@ -18,14 +18,13 @@
import org.eclipse.papyrus.moka.fuml.commonbehavior.CallEventExecution;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.pscs.commonbehavior.ICS_CallEventExecution;
import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_InteractionPoint;
-public class CS_CallEventExecution extends CallEventExecution implements ICS_CallEventExecution{
+public class CS_CallEventExecution extends CallEventExecution implements ICS_CallEventExecution {
// The port manifestation at which the operation call arrived.
public ICS_InteractionPoint interactionPoint;
-
+
@Override
public IEventOccurrence createEventOccurrence() {
// Wrap the created event occurrence within a CS_EventOccurrence which
@@ -35,12 +34,12 @@
wrappingEventOccurrence.setWrappedEventOccurrence(super.createEventOccurrence());
return wrappingEventOccurrence;
}
-
+
public IValue new_() {
// Create a new call event execution.
return new CS_CallEventExecution();
}
-
+
public IValue copy() {
// Create a new call event execution that is a copy of this execution, no
// referenced interaction point.
@@ -58,5 +57,5 @@
public ICS_InteractionPoint getInteractionPoint() {
return this.interactionPoint;
}
-
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_InteractionPoint.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_InteractionPoint.java
index 2192141..697de4b 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_InteractionPoint.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_InteractionPoint.java
@@ -25,20 +25,19 @@
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.Reference;
import org.eclipse.papyrus.moka.pscs.commonbehavior.CS_EventOccurrence;
import org.eclipse.papyrus.moka.pscs.commonbehavior.ICS_EventOccurrence;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_InteractionPoint;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Reference;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Port;
-
public class CS_InteractionPoint extends Reference implements ICS_InteractionPoint {
/*
- * Represents the Reference to the CompositeObject owning this InteractionPort. NOTE: This is introduced to address requirement R3 (It represents
- * the "link from that instance to the instance of the owning classifier [...] through which communication is forwarded to the instance of the
- * owning classifier or through which the owning classifier communicates)
+ * Represents the Reference to the CompositeObject owning this InteractionPort.
+ * NOTE: This is introduced to address requirement R3 (It represents the "link
+ * from that instance to the instance of the owning classifier [...] through
+ * which communication is forwarded to the instance of the owning classifier or
+ * through which the owning classifier communicates)
*/
public ICS_Reference owner;
@@ -62,11 +61,11 @@
public void send(IEventOccurrence eventOccurrence) {
// An event occurrence that passes through a CS_InteractionPoint is
// (if necessary) wrapped in a CS_EventOccurrence. This event occurrence
- // is then sent to the owning object.
+ // is then sent to the owning object.
ICS_EventOccurrence wrappingEventOccurrence = null;
- if(eventOccurrence instanceof ICS_EventOccurrence){
- wrappingEventOccurrence = (ICS_EventOccurrence) eventOccurrence;
- }else{
+ if (eventOccurrence instanceof ICS_EventOccurrence) {
+ wrappingEventOccurrence = (ICS_EventOccurrence) eventOccurrence;
+ } else {
wrappingEventOccurrence = new CS_EventOccurrence();
wrappingEventOccurrence.setWrappedEventOccurrence(eventOccurrence);
}
@@ -76,7 +75,8 @@
@Override
public IValue copy() {
- // Create a new interaction point with the same referent as this interaction point.
+ // Create a new interaction point with the same referent as this interaction
+ // point.
ICS_InteractionPoint newValue = (ICS_InteractionPoint) (super.copy());
newValue.setReferent(this.referent);
return newValue;
@@ -104,7 +104,7 @@
public void setDefiningPort(Port definingPort) {
this.definingPort = definingPort;
}
-
+
@Override
public boolean checkAllParents(Classifier type, Classifier classifier) {
// Delegates the type checking to the reference
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Link.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Link.java
index be564c0..d8417dc 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Link.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Link.java
@@ -21,14 +21,13 @@
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IFeatureValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.Link;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Link;
import org.eclipse.uml2.uml.StructuralFeature;
-
public class CS_Link extends Link implements ICS_Link {
public Boolean hasValueForAFeature(IValue value) {
- // Returns true if the given value object is used as a value for a FeatureValue of this link
+ // Returns true if the given value object is used as a value for a FeatureValue
+ // of this link
return this.getFeature(value) != null;
}
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy.java
index 985f357..87a78cf 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy.java
@@ -22,14 +22,15 @@
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.FeatureValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IFeatureValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Object;
import org.eclipse.uml2.uml.StructuralFeature;
-public class CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy extends CS_StructuralFeatureOfInterfaceAccessStrategy {
+public class CS_NameBased_StructuralFeatureOfInterfaceAccessStrategy
+ extends CS_StructuralFeatureOfInterfaceAccessStrategy {
@Override
public IFeatureValue read(ICS_Object cs_Object, StructuralFeature feature) {
- // returns the a copy of the first feature value of cs_Object where the name of the corresponding feature
+ // returns the a copy of the first feature value of cs_Object where the name of
+ // the corresponding feature
// matches the name of the feature given as a parameter
// Otherwise, returns an empty feature value
List<IFeatureValue> featureValues = cs_Object.getFeatureValues();
@@ -55,7 +56,8 @@
@Override
public void write(ICS_Object cs_Object, StructuralFeature feature, List<IValue> values, Integer position) {
- // Retrieves the first feature value of cs_Object where the name of the corresponding feature
+ // Retrieves the first feature value of cs_Object where the name of the
+ // corresponding feature
// matches the name of the feature given as a parameter
// Then updates the values for this feature value
List<IFeatureValue> featureValues = cs_Object.getFeatureValues();
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Object.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Object.java
index 1b76282..afb667d 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Object.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Object.java
@@ -19,24 +19,19 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.moka.fuml.loci.ChoiceStrategy;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IFeatureValue;
-import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.actions.CallOperationActionActivation;
import org.eclipse.papyrus.moka.fuml.actions.SendSignalActionActivation;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IExecution;
+import org.eclipse.papyrus.moka.fuml.loci.ChoiceStrategy;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IFeatureValue;
+import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IExtensionalValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IReference;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.Object_;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.Reference;
import org.eclipse.papyrus.moka.pscs.commonbehavior.ICS_CallEventExecution;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_LinkKind;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_InteractionPoint;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Link;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Object;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Reference;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.ConnectorKind;
@@ -47,14 +42,17 @@
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.StructuralFeature;
-
public class CS_Object extends Object_ implements ICS_Object {
public IExecution dispatchIn(Operation operation, ICS_InteractionPoint interactionPoint) {
- // If the interaction point refers to a behavior port, the operation call is dispatched
- // to the object owning the behavior port. This may result in the method being handled
- // by the method defined for the operation at the object or through a call event handled
- // by the classifier behavior of the owning object. The latter case only occurs if the
+ // If the interaction point refers to a behavior port, the operation call is
+ // dispatched
+ // to the object owning the behavior port. This may result in the method being
+ // handled
+ // by the method defined for the operation at the object or through a call event
+ // handled
+ // by the classifier behavior of the owning object. The latter case only occurs
+ // if the
// dispatched operation has no implementation
// If it does not refer to a behavior port, select appropriate delegation links
// from interactionPoint, and propagates the operation call through
@@ -62,8 +60,8 @@
IExecution execution = null;
if (interactionPoint.getDefiningPort().isBehavior()) {
execution = this.dispatch(operation);
- if(execution instanceof ICS_CallEventExecution){
- ((ICS_CallEventExecution)execution).setInteractionPoint(interactionPoint);
+ if (execution instanceof ICS_CallEventExecution) {
+ ((ICS_CallEventExecution) execution).setInteractionPoint(interactionPoint);
}
} else {
boolean operationIsProvided = true;
@@ -71,7 +69,8 @@
List<ICS_Link> cddLinks = this.getLinks(interactionPoint);
Integer linkIndex = 1;
while (linkIndex <= cddLinks.size()) {
- List<IReference> validTargets = this.selectTargetsForDispatching(cddLinks.get(linkIndex - 1), interactionPoint, ConnectorKind.DELEGATION_LITERAL, operation, operationIsProvided);
+ List<IReference> validTargets = this.selectTargetsForDispatching(cddLinks.get(linkIndex - 1),
+ interactionPoint, ConnectorKind.DELEGATION_LITERAL, operation, operationIsProvided);
Integer targetIndex = 1;
while (targetIndex <= validTargets.size()) {
potentialTargets.add(validTargets.get(targetIndex - 1));
@@ -82,7 +81,8 @@
// If potentialTargets is empty, no delegation target have been found,
// and the operation call will be lost
if (!(potentialTargets.size() == 0)) {
- CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory().getStrategy("requestPropagation");
+ CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory()
+ .getStrategy("requestPropagation");
// Choose one target non-deterministically
List<IReference> targets = strategy.select(potentialTargets, new CallOperationActionActivation());
IReference target = targets.get(0);
@@ -92,11 +92,12 @@
return execution;
}
-
public void sendIn(IEventOccurrence eventOccurrence, ICS_InteractionPoint interactionPoint) {
- // 1] If the interaction is a behavior port then sends the event occurrence to the target
+ // 1] If the interaction is a behavior port then sends the event occurrence to
+ // the target
// object using operation send.
- // 2] If this is not a behavior port, select appropriate delegation targets from interactionPoint,
+ // 2] If this is not a behavior port, select appropriate delegation targets from
+ // interactionPoint,
// and propagates the event occurrence to these targets
if (interactionPoint.getDefiningPort().isBehavior()) {
this.send(eventOccurrence);
@@ -106,7 +107,8 @@
List<ICS_Link> cddLinks = this.getLinks(interactionPoint);
Integer linkIndex = 1;
while (linkIndex <= cddLinks.size()) {
- List<IReference> validTargets = this.selectTargetsForSending(cddLinks.get(linkIndex - 1), interactionPoint, ConnectorKind.DELEGATION_LITERAL, toInternal);
+ List<IReference> validTargets = this.selectTargetsForSending(cddLinks.get(linkIndex - 1),
+ interactionPoint, ConnectorKind.DELEGATION_LITERAL, toInternal);
Integer targetIndex = 1;
while (targetIndex <= validTargets.size()) {
potentialTargets.add(validTargets.get(targetIndex - 1));
@@ -124,13 +126,17 @@
}
}
-
- public List<IReference> selectTargetsForSending(ICS_Link link, ICS_InteractionPoint interactionPoint, ConnectorKind connectorKind, Boolean toInternal) {
- // From the given link, signal and interaction point, retrieves potential targets (i.e. end values of link)
+ public List<IReference> selectTargetsForSending(ICS_Link link, ICS_InteractionPoint interactionPoint,
+ ConnectorKind connectorKind, Boolean toInternal) {
+ // From the given link, signal and interaction point, retrieves potential
+ // targets (i.e. end values of link)
// through which request can be propagated
- // These targets are attached to interaction point through the given link, and respect the following rules:
- // - if toInternal is true, connectorKind must be Delegation, the given link has to target the internals of this CS_Object
- // - if toInternal is false, the given link has to target the environment of this CS_Object.
+ // These targets are attached to interaction point through the given link, and
+ // respect the following rules:
+ // - if toInternal is true, connectorKind must be Delegation, the given link has
+ // to target the internals of this CS_Object
+ // - if toInternal is false, the given link has to target the environment of
+ // this CS_Object.
List<IReference> potentialTargets = new ArrayList<IReference>();
if (toInternal && connectorKind == ConnectorKind.DELEGATION_LITERAL) {
if (this.getLinkKind(link, interactionPoint) == CS_LinkKind.ToInternal) {
@@ -208,13 +214,18 @@
return potentialTargets;
}
- public List<IReference> selectTargetsForDispatching(ICS_Link link, ICS_InteractionPoint interactionPoint, ConnectorKind connectorKind, Operation operation, Boolean toInternal) {
- // From the given link, operation and interaction point, retrieves potential targets (i.e. end values of link)
+ public List<IReference> selectTargetsForDispatching(ICS_Link link, ICS_InteractionPoint interactionPoint,
+ ConnectorKind connectorKind, Operation operation, Boolean toInternal) {
+ // From the given link, operation and interaction point, retrieves potential
+ // targets (i.e. end values of link)
// through which request can be propagated
- // These targets are attached to interaction point through the given link, and respect the following rules:
- // - if isProvided is true, connectorKind must be Delegation, the given link has to target the internals of this CS_Object,
+ // These targets are attached to interaction point through the given link, and
+ // respect the following rules:
+ // - if isProvided is true, connectorKind must be Delegation, the given link has
+ // to target the internals of this CS_Object,
// and a valid target must provide the Operation
- // - if isProvided is false, the given link has to target the environment of this CS_Object.
+ // - if isProvided is false, the given link has to target the environment of
+ // this CS_Object.
// - if connectorKind is assembly, a valid target has to provide the operation
// - if connectorKind is delegation, a valid target has to require the operation
List<IReference> potentialTargets = new ArrayList<IReference>();
@@ -302,7 +313,8 @@
// Appropriate links are links which target elements
// in the environment of this CS_Object.
// These can be delegation links (i.e, the targeted elements must
- // require a reception for the signal) or assembly links (i.e., the target elements
+ // require a reception for the signal) or assembly links (i.e., the target
+ // elements
// must provide a reception for the signal)
boolean notToInternal = false; // i.e. to environment
List<IReference> allPotentialTargets = new ArrayList<IReference>();
@@ -312,14 +324,16 @@
List<ICS_Link> cddLinks = this.getLinks(interactionPoint);
Integer linkIndex = 1;
while (linkIndex <= cddLinks.size()) {
- List<IReference> validAssemblyTargets = this.selectTargetsForSending(cddLinks.get(linkIndex - 1), interactionPoint, ConnectorKind.ASSEMBLY_LITERAL, notToInternal);
+ List<IReference> validAssemblyTargets = this.selectTargetsForSending(cddLinks.get(linkIndex - 1),
+ interactionPoint, ConnectorKind.ASSEMBLY_LITERAL, notToInternal);
Integer targetIndex = 1;
while (targetIndex <= validAssemblyTargets.size()) {
allPotentialTargets.add(validAssemblyTargets.get(targetIndex - 1));
targetsForSendingIn.add(validAssemblyTargets.get(targetIndex - 1));
targetIndex = targetIndex + 1;
}
- List<IReference> validDelegationTargets = this.selectTargetsForSending(cddLinks.get(linkIndex - 1), interactionPoint, ConnectorKind.DELEGATION_LITERAL, notToInternal);
+ List<IReference> validDelegationTargets = this.selectTargetsForSending(cddLinks.get(linkIndex - 1),
+ interactionPoint, ConnectorKind.DELEGATION_LITERAL, notToInternal);
targetIndex = 1;
while (targetIndex <= validDelegationTargets.size()) {
allPotentialTargets.add(validDelegationTargets.get(targetIndex - 1));
@@ -329,7 +343,8 @@
linkIndex = linkIndex + 1;
}
- CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory().getStrategy("requestPropagation");
+ CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory()
+ .getStrategy("requestPropagation");
List<IReference> selectedTargets = strategy.select(allPotentialTargets, new SendSignalActionActivation());
for (int j = 0; j < selectedTargets.size(); j++) {
@@ -361,7 +376,6 @@
// require the operation) or assembly links (i.e., the target elements
// must provide the operation)
-
IExecution execution = null;
boolean notToInternal = false; // i.e. to environment
@@ -372,14 +386,16 @@
List<ICS_Link> cddLinks = this.getLinks(interactionPoint);
Integer linkIndex = 1;
while (linkIndex <= cddLinks.size()) {
- List<IReference> validAssemblyTargets = this.selectTargetsForDispatching(cddLinks.get(linkIndex - 1), interactionPoint, ConnectorKind.ASSEMBLY_LITERAL, operation, notToInternal);
+ List<IReference> validAssemblyTargets = this.selectTargetsForDispatching(cddLinks.get(linkIndex - 1),
+ interactionPoint, ConnectorKind.ASSEMBLY_LITERAL, operation, notToInternal);
Integer targetIndex = 1;
while (targetIndex <= validAssemblyTargets.size()) {
allPotentialTargets.add(validAssemblyTargets.get(targetIndex - 1));
targetsForDispatchingIn.add(validAssemblyTargets.get(targetIndex - 1));
targetIndex = targetIndex + 1;
}
- List<IReference> validDelegationTargets = this.selectTargetsForDispatching(cddLinks.get(linkIndex - 1), interactionPoint, ConnectorKind.DELEGATION_LITERAL, operation, notToInternal);
+ List<IReference> validDelegationTargets = this.selectTargetsForDispatching(cddLinks.get(linkIndex - 1),
+ interactionPoint, ConnectorKind.DELEGATION_LITERAL, operation, notToInternal);
targetIndex = 1;
while (targetIndex <= validDelegationTargets.size()) {
allPotentialTargets.add(validDelegationTargets.get(targetIndex - 1));
@@ -389,7 +405,8 @@
linkIndex = linkIndex + 1;
}
- CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory().getStrategy("requestPropagation");
+ CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory()
+ .getStrategy("requestPropagation");
List<IReference> selectedTargets = strategy.select(allPotentialTargets, new SendSignalActionActivation());
for (int j = 0; j < selectedTargets.size(); j++) {
@@ -419,7 +436,8 @@
// fUML semantics is extended in the sense that reading is
// delegated to a CS_StructuralFeatureOfInterfaceAccessStrategy
if (feature.getNamespace() instanceof Interface) {
- CS_StructuralFeatureOfInterfaceAccessStrategy readStrategy = (CS_StructuralFeatureOfInterfaceAccessStrategy) this.locus.getFactory().getStrategy("structuralFeature");
+ CS_StructuralFeatureOfInterfaceAccessStrategy readStrategy = (CS_StructuralFeatureOfInterfaceAccessStrategy) this.locus
+ .getFactory().getStrategy("structuralFeature");
return readStrategy.read(this, feature);
} else {
return super.getFeatureValue(feature);
@@ -432,7 +450,8 @@
// fUML semantics is extended in the sense that writing is
// delegated to a CS_StructuralFeatureOfInterfaceAccessStrategy
if (feature.getNamespace() instanceof Interface) {
- CS_StructuralFeatureOfInterfaceAccessStrategy writeStrategy = (CS_StructuralFeatureOfInterfaceAccessStrategy) this.locus.getFactory().getStrategy("structuralFeature");
+ CS_StructuralFeatureOfInterfaceAccessStrategy writeStrategy = (CS_StructuralFeatureOfInterfaceAccessStrategy) this.locus
+ .getFactory().getStrategy("structuralFeature");
writeStrategy.write(this, feature, values, position);
} else {
super.setFeatureValue(feature, values, position);
@@ -485,7 +504,8 @@
// containers for this CS_Object
// An extensional value is a direct container for an object if:
// - it is a CS_Object
- // - it directly contains this object (i.e. CS_Object.directlyContains(Object)==true)
+ // - it directly contains this object (i.e.
+ // CS_Object.directlyContains(Object)==true)
List<ICS_Object> containers = new ArrayList<ICS_Object>();
for (int i = 0; i < this.locus.getExtensionalValues().size(); i++) {
IExtensionalValue extensionalValue = this.locus.getExtensionalValues().get(i);
@@ -501,10 +521,13 @@
public Boolean isOperationProvided(IReference reference, Operation operation) {
// Determines if the given reference provides the operation
- // If the reference is an interaction point, it provides the operation if this operation
+ // If the reference is an interaction point, it provides the operation if this
+ // operation
// is a member of one of its provided interfaces
- // If the reference is NOT an interactionPoint, it provides this operation if this operation is
- // an operation of one of its type, or one of its type provides a realization for this operation (in the case
+ // If the reference is NOT an interactionPoint, it provides this operation if
+ // this operation is
+ // an operation of one of its type, or one of its type provides a realization
+ // for this operation (in the case
// where the namespace of this Operation is an interface)
boolean isProvided = false;
if (reference instanceof ICS_InteractionPoint) {
@@ -513,7 +536,8 @@
// they define directly or indirectly the Operation
Integer interfaceIndex = 1;
// Iterates on provided interfaces of the port
- List<Interface> providedInterfaces = ((ICS_InteractionPoint) reference).getDefiningPort().getProvideds();
+ List<Interface> providedInterfaces = ((ICS_InteractionPoint) reference).getDefiningPort()
+ .getProvideds();
while (interfaceIndex <= providedInterfaces.size() && !isProvided) {
Interface interface_ = providedInterfaces.get(interfaceIndex - 1);
// Iterates on members of the current Interface
@@ -554,7 +578,8 @@
public Boolean isOperationRequired(IReference reference, Operation operation) {
// Determines if the given reference requires the operation
- // If the reference is an interaction point, it requires the operation if this operation
+ // If the reference is an interaction point, it requires the operation if this
+ // operation
// is a member of one of its required interfaces
// If the reference is not a interaction point, it cannot require an operation
boolean matches = false;
@@ -580,12 +605,18 @@
}
public CS_LinkKind getLinkKind(ICS_Link link, ICS_InteractionPoint interactionPoint) {
- // If the given interaction point belongs to this object, and if the given interaction point is used as an end of the link,
- // then the links targets the environment of the object (enumeration literal ToEnvironment) if all the feature values of the link
- // (but one for the interaction point) refer to values which are not themselves values for features of this object.
- // If all the feature values of the link refer to values which are themselves values for features of this object,
- // the link targets the internals of the object (enumeration literal ToInternal). Otherwise, the link has no particular meaning
- // in the context defined by the object and the interaction point (enumeration literal None).
+ // If the given interaction point belongs to this object, and if the given
+ // interaction point is used as an end of the link,
+ // then the links targets the environment of the object (enumeration literal
+ // ToEnvironment) if all the feature values of the link
+ // (but one for the interaction point) refer to values which are not themselves
+ // values for features of this object.
+ // If all the feature values of the link refer to values which are themselves
+ // values for features of this object,
+ // the link targets the internals of the object (enumeration literal
+ // ToInternal). Otherwise, the link has no particular meaning
+ // in the context defined by the object and the interaction point (enumeration
+ // literal None).
if (!link.hasValueForAFeature(interactionPoint)) {
return CS_LinkKind.None;
}
@@ -617,7 +648,8 @@
}
public List<ICS_Link> getLinks(ICS_InteractionPoint interactionPoint) {
- // Get all links (available at the locus of this object) where the given interaction point is used as a feature value
+ // Get all links (available at the locus of this object) where the given
+ // interaction point is used as a feature value
// (i.e. the interaction is an end such links)
List<IExtensionalValue> extensionalValues = this.locus.getExtensionalValues();
Integer i = 1;
@@ -636,7 +668,8 @@
}
public Boolean hasValueForAFeature(IValue value) {
- // Returns true if the given value object is used as a value for a feature value of this object
+ // Returns true if the given value object is used as a value for a feature value
+ // of this object
List<IFeatureValue> allFeatureValues = this.getFeatureValues();
Integer i = 1;
boolean isAValue = false;
@@ -664,7 +697,8 @@
for (int i = 0; i < values.size(); i++) {
potentialTargets.add((IReference) values.get(i));
}
- CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory().getStrategy("requestPropagation");
+ CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory()
+ .getStrategy("requestPropagation");
List<IReference> targets = strategy.select(potentialTargets, new SendSignalActionActivation());
for (int i = 0; i < targets.size(); i++) {
CS_InteractionPoint target = (CS_InteractionPoint) targets.get(i);
@@ -682,7 +716,8 @@
for (int i = 0; i < values.size(); i++) {
potentialTargets.add((Reference) values.get(i));
}
- CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory().getStrategy("requestPropagation");
+ CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory()
+ .getStrategy("requestPropagation");
List<IReference> targets = strategy.select(potentialTargets, new CallOperationActionActivation());
// if targets is empty, no dispatch target has been found,
// and the operation call is lost
@@ -699,7 +734,8 @@
// and dispatches the operation call to this interaction point
IFeatureValue featureValue = this.getFeatureValue(onPort);
List<IValue> values = featureValue.getValues();
- Integer choice = ((ChoiceStrategy) this.locus.getFactory().getStrategy("choice")).choose(featureValue.getValues().size()) - 1;
+ Integer choice = ((ChoiceStrategy) this.locus.getFactory().getStrategy("choice"))
+ .choose(featureValue.getValues().size()) - 1;
CS_InteractionPoint interactionPoint = (CS_InteractionPoint) values.get(choice);
return interactionPoint.dispatch(operation);
}
@@ -713,7 +749,8 @@
for (int i = 0; i < values.size(); i++) {
potentialTargets.add((Reference) values.get(i));
}
- CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory().getStrategy("requestPropagation");
+ CS_RequestPropagationStrategy strategy = (CS_RequestPropagationStrategy) this.locus.getFactory()
+ .getStrategy("requestPropagation");
List<IReference> targets = strategy.select(potentialTargets, new SendSignalActionActivation());
for (int i = 0; i < targets.size(); i++) {
IReference target = targets.get(i);
@@ -723,7 +760,8 @@
public boolean checkAllParents(Classifier type, Classifier classifier) {
// If the given classifier is not an Interface, behaves like in fUML.
- // Otherwise, check if the given type (or one of its direct or indirect ancestors)
+ // Otherwise, check if the given type (or one of its direct or indirect
+ // ancestors)
// has an InterfaceRealization relationships with the given classifier.
boolean matched = false;
if (!(classifier instanceof Interface)) {
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Reference.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Reference.java
index f9cd492..21737bb 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Reference.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_Reference.java
@@ -19,17 +19,14 @@
import org.eclipse.papyrus.moka.fuml.commonbehavior.IExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.Reference;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_InteractionPoint;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Object;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Reference;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Port;
-
public class CS_Reference extends Reference implements ICS_Reference {
/*
- * The composite object referenced by this ReferenceToCompositeStructure. This property subsets Reference::referent.
+ * The composite object referenced by this ReferenceToCompositeStructure. This
+ * property subsets Reference::referent.
*/
public ICS_Object compositeReferent;
@@ -77,7 +74,8 @@
@Override
public IValue copy() {
- // Create a new reference with the same referent and composite referent as this reference.
+ // Create a new reference with the same referent and composite referent as this
+ // reference.
ICS_Reference newValue = new CS_Reference();
newValue.setReferent(this.getReferent());
newValue.setCompositeReferent(this.compositeReferent);
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_StructuralFeatureOfInterfaceAccessStrategy.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_StructuralFeatureOfInterfaceAccessStrategy.java
index ecefc91..e48ec56 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_StructuralFeatureOfInterfaceAccessStrategy.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/CS_StructuralFeatureOfInterfaceAccessStrategy.java
@@ -21,7 +21,6 @@
import org.eclipse.papyrus.moka.fuml.loci.SemanticStrategy;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IFeatureValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.ICS_Object;
import org.eclipse.uml2.uml.StructuralFeature;
public abstract class CS_StructuralFeatureOfInterfaceAccessStrategy extends SemanticStrategy {
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/additions/CS_ConnectorLink.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/additions/CS_ConnectorLink.java
index ffc44f3..3690ca4 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/additions/CS_ConnectorLink.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/structuredclassifiers/additions/CS_ConnectorLink.java
@@ -16,17 +16,16 @@
package org.eclipse.papyrus.moka.pscs.structuredclassifiers.additions;
import org.eclipse.papyrus.moka.pscs.structuredclassifiers.CS_Link;
-import org.eclipse.papyrus.moka.pscs.structuredclassifiers.additions.ICS_ConnectorLink;
import org.eclipse.uml2.uml.Connector;
-public class CS_ConnectorLink extends CS_Link implements ICS_ConnectorLink{
-
+public class CS_ConnectorLink extends CS_Link implements ICS_ConnectorLink {
+
protected Connector connector;
-
+
public void setConnector(Connector connector) {
this.connector = connector;
}
-
+
public Connector getConnector() {
return this.connector;
}
diff --git a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/values/CS_OpaqueExpressionEvaluation.java b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/values/CS_OpaqueExpressionEvaluation.java
index 14f21c7..f63cc37 100644
--- a/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/values/CS_OpaqueExpressionEvaluation.java
+++ b/plugins/org.eclipse.papyrus.moka.pscs/src/org/eclipse/papyrus/moka/pscs/values/CS_OpaqueExpressionEvaluation.java
@@ -21,7 +21,6 @@
import org.eclipse.papyrus.moka.fuml.commonbehavior.IParameterValue;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.fuml.values.Evaluation;
-import org.eclipse.papyrus.moka.pscs.values.ICS_OpaqueExpressionEvaluation;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.OpaqueExpression;
diff --git a/plugins/org.eclipse.papyrus.moka.pssm.interfaces/.classpath b/plugins/org.eclipse.papyrus.moka.pssm.interfaces/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm.interfaces/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.pssm.interfaces/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.pssm.interfaces/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.pssm.interfaces/META-INF/MANIFEST.MF
index 7a554ab..4560c79 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm.interfaces/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.pssm.interfaces/META-INF/MANIFEST.MF
@@ -5,10 +5,8 @@
Bundle-Version: 4.1.0.qualifier
Bundle-Vendor: Eclipse Modeling Project
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Require-Bundle: org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)"
+Require-Bundle: org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)"
Export-Package: org.eclipse.papyrus.moka.pssm.commonbehavior,
org.eclipse.papyrus.moka.pssm.statemachines,
org.eclipse.papyrus.moka.pssm.values
diff --git a/plugins/org.eclipse.papyrus.moka.pssm.validation/.classpath b/plugins/org.eclipse.papyrus.moka.pssm.validation/.classpath
index e801ebf..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm.validation/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.pssm.validation/.classpath
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.pssm.validation/.project b/plugins/org.eclipse.papyrus.moka.pssm.validation/.project
index 2ec16f6..49dcb58 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm.validation/.project
+++ b/plugins/org.eclipse.papyrus.moka.pssm.validation/.project
@@ -20,8 +20,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
diff --git a/plugins/org.eclipse.papyrus.moka.pssm.validation/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.pssm.validation/META-INF/MANIFEST.MF
index 340274b..b53ce1a 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm.validation/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.pssm.validation/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@
Automatic-Module-Name: org.eclipse.papyrus.moka.pssm.validation
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.ui;bundle-version="[3.117.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.emf.validation;bundle-version="[1.8.0,2.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.validation;bundle-version="[1.8.0,2.0.0)";visibility:=reexport,
org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)"
Bundle-Activator: org.eclipse.papyrus.moka.pssm.validation.Activator
diff --git a/plugins/org.eclipse.papyrus.moka.pssm.validation/build.properties b/plugins/org.eclipse.papyrus.moka.pssm.validation/build.properties
index e9863e2..cc91072 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm.validation/build.properties
+++ b/plugins/org.eclipse.papyrus.moka.pssm.validation/build.properties
@@ -1,5 +1,4 @@
source.. = src/
-output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/.classpath b/plugins/org.eclipse.papyrus.moka.pssm/.classpath
index c941c51..6e21f92 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.pssm/.classpath
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="aspects/"/>
+ <classpathentry kind="src" path="aspects"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/.project b/plugins/org.eclipse.papyrus.moka.pssm/.project
index 78bbb42..0032098 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/.project
+++ b/plugins/org.eclipse.papyrus.moka.pssm/.project
@@ -27,8 +27,8 @@
</buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.ajdt.ui.ajnature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.pssm/META-INF/MANIFEST.MF
index 76da4cb..dac029f 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.pssm/META-INF/MANIFEST.MF
@@ -4,21 +4,11 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.pssm;singleton:=true
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.pssm.Activator
-Require-Bundle: org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.emf.common.ui;bundle-version="[2.18.0,3.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
- org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.3.0,3.0.0)",
- org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pscs.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="[1.3.0,3.0.0)",
- org.eclipse.uml2.uml.profile.standard;bundle-version="[1.5.0,2.0.0)"
+Require-Bundle: org.eclipse.papyrus.moka.pscs;bundle-version="[4.1.0,5.0.0)";visibility:=reexport,
+ org.eclipse.uml2.uml.profile.standard;bundle-version="[1.5.0,2.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.1.0,5.0.0)";visibility:=reexport,
+ org.aspectj.runtime;bundle-version="[1.9.6,2.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Eclipse Modeling Project
@@ -27,8 +17,8 @@
org.eclipse.papyrus.moka.pssm.actions,
org.eclipse.papyrus.moka.pssm.commonbehavior,
org.eclipse.papyrus.moka.pssm.loci,
+ org.eclipse.papyrus.moka.pssm.profiling,
+ org.eclipse.papyrus.moka.pssm.profiling.addition,
org.eclipse.papyrus.moka.pssm.statemachines,
- org.eclipse.papyrus.moka.pssm.statemachines.addition,
org.eclipse.papyrus.moka.pssm.structuredclassifiers,
- org.eclipse.papyrus.moka.pssm.values,
- org.eclipse.papyrus.moka.pssm.statemachines
+ org.eclipse.papyrus.moka.pssm.values
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/Activator.java b/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/Activator.java
new file mode 100644
index 0000000..c788225
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/Activator.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Jeremie Tatibouet (CEA LIST)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.pssm.profiling;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends Plugin {
+
+ 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;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/TransitionActivationProfiler.aj b/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/TransitionActivationProfiler.aj
similarity index 94%
rename from plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/TransitionActivationProfiler.aj
rename to plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/TransitionActivationProfiler.aj
index be65782..f9a37a4 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/TransitionActivationProfiler.aj
+++ b/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/TransitionActivationProfiler.aj
@@ -11,12 +11,12 @@
* Contributors:
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.pssm.statemachines;
+package org.eclipse.papyrus.moka.pssm.profiling;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
import org.eclipse.papyrus.moka.fuml.profiling.loci.SemanticVisitorProfiler;
import org.eclipse.papyrus.moka.pssm.statemachines.ITransitionActivation;
-import org.eclipse.papyrus.moka.pssm.statemachines.addition.TransitionActivationWrapper;
+import org.eclipse.papyrus.moka.pssm.profiling.addition.TransitionActivationWrapper;
public aspect TransitionActivationProfiler extends SemanticVisitorProfiler{
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/VertexActivationProfiler.aj b/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/VertexActivationProfiler.aj
similarity index 98%
rename from plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/VertexActivationProfiler.aj
rename to plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/VertexActivationProfiler.aj
index d1751c5..8ce57a9 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/VertexActivationProfiler.aj
+++ b/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/VertexActivationProfiler.aj
@@ -11,7 +11,7 @@
* Contributors:
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.pssm.statemachines;
+package org.eclipse.papyrus.moka.pssm.profiling;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
import org.eclipse.papyrus.moka.fuml.profiling.loci.SemanticVisitorProfiler;
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/addition/TransitionActivationWrapper.java b/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/addition/TransitionActivationWrapper.java
similarity index 98%
rename from plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/addition/TransitionActivationWrapper.java
rename to plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/addition/TransitionActivationWrapper.java
index 335436a..216b76c 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/statemachines/addition/TransitionActivationWrapper.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/aspects/org/eclipse/papyrus/moka/pssm/profiling/addition/TransitionActivationWrapper.java
@@ -12,7 +12,7 @@
* CEA LIST Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.moka.pssm.statemachines.addition;
+package org.eclipse.papyrus.moka.pssm.profiling.addition;
import java.util.List;
@@ -213,7 +213,7 @@
public void _beginIsolation() {
this.transitionActivation._beginIsolation();
}
-
+
@Override
public String toString() {
return this.transitionActivation.toString();
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/pom.xml b/plugins/org.eclipse.papyrus.moka.pssm/pom.xml
index bf56502..fbaae66 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/pom.xml
+++ b/plugins/org.eclipse.papyrus.moka.pssm/pom.xml
@@ -1,7 +1,9 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
+
<!-- Parent POM (i.e., Engines) -->
<parent>
<groupId>org.eclipse.papyrus.moka</groupId>
@@ -15,19 +17,6 @@
<name>org.eclipse.papyrus.moka.pssm</name>
<description>Execution engine implementing PSSM (Precise Semantics for UML State Machines)</description>
- <!-- Properties -->
- <properties>
- <fuml-aspects>${project.basedir}/../org.eclipse.papyrus.moka.fuml/aspects</fuml-aspects>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.nickwongdev</groupId>
- <artifactId>aspectj-maven-plugin</artifactId>
- <version>1.12.1</version>
- </dependency>
- </dependencies>
-
<!-- Build specificities -->
<build>
<plugins>
@@ -47,16 +36,14 @@
<configuration>
<verbose>true</verbose>
<showWeaveInfo>true</showWeaveInfo>
- <aspectDirectory>${fuml-aspects}</aspectDirectory>
<aspectDirectory>${project.basedir}/aspects</aspectDirectory>
<source>11</source>
<target>11</target>
</configuration>
</execution>
</executions>
-
</plugin>
</plugins>
</build>
-
+
</project>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/Activator.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/Activator.java
index ef0501d..e5ce22a 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/Activator.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/Activator.java
@@ -15,32 +15,32 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.pssm;
-import org.osgi.framework.BundleContext;
import org.eclipse.core.runtime.Plugin;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.osgi.framework.BundleContext;
public class Activator extends Plugin {
private static BundleContext context;
- public static LogHelper logger;
-
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ *
+ * @see
+ * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
- logger = new LogHelper(this);
}
/*
* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ *
+ * @see
+ * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/commonbehavior/EventTriggeredExecution.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/commonbehavior/EventTriggeredExecution.java
index 856d164..5ab7e2e 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/commonbehavior/EventTriggeredExecution.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/commonbehavior/EventTriggeredExecution.java
@@ -27,7 +27,6 @@
import org.eclipse.papyrus.moka.fuml.commonbehavior.SignalEventOccurrence;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IValue;
import org.eclipse.papyrus.moka.pscs.commonbehavior.ICS_EventOccurrence;
-import org.eclipse.papyrus.moka.pssm.commonbehavior.IEventTriggeredExecution;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Parameter;
@@ -35,35 +34,36 @@
// Original execution
public IExecution wrappedExecution;
-
+
// Event occurrence whose dispatching implied the
// the execution of the behavior
public IEventOccurrence triggeringEventOccurrence;
-
- public void initialize(){
+
+ public void initialize() {
// Transfer input parameter values of the call event execution
// to the wrapped execution if possible. Two situations are considered
// 1. If the triggering EventOccurrence is for a SignalEvent, then all
- // executed behavior will have either one parameter or no parameters.
- // If a behavior has a Parameter, the SignalInstance corresponding to
- // the SignalEventOccurrence is passed into the behavior Execution as
- // the value of its parameter.
+ // executed behavior will have either one parameter or no parameters.
+ // If a behavior has a Parameter, the SignalInstance corresponding to
+ // the SignalEventOccurrence is passed into the behavior Execution as
+ // the value of its parameter.
// 2. If the triggering EventOccurrence is for a CallEvent, then all executed
- // behaviors will have either no Parameters or signatures that conform or
- // input conform to the operation being called.
- // If a Behavior has Parameters, then the values of the input Parameters
- // of for the call are passed into the Behavior Execution as the values
- // of the corresponding input Parameters of the Behavior.
+ // behaviors will have either no Parameters or signatures that conform or
+ // input conform to the operation being called.
+ // If a Behavior has Parameters, then the values of the input Parameters
+ // of for the call are passed into the Behavior Execution as the values
+ // of the corresponding input Parameters of the Behavior.
this._beginIsolation();
- if(this.wrappedExecution.getBehavior().getOwnedParameters().size() > 0){
+ if (this.wrappedExecution.getBehavior().getOwnedParameters().size() > 0) {
Behavior behavior = this.wrappedExecution.getBehavior();
- IEventOccurrence currentEventOccurrence = this.triggeringEventOccurrence;
- if(this.triggeringEventOccurrence instanceof ICS_EventOccurrence){
- currentEventOccurrence = ((ICS_EventOccurrence)this.triggeringEventOccurrence).getWrappedEventOccurrence();
+ IEventOccurrence currentEventOccurrence = this.triggeringEventOccurrence;
+ if (this.triggeringEventOccurrence instanceof ICS_EventOccurrence) {
+ currentEventOccurrence = ((ICS_EventOccurrence) this.triggeringEventOccurrence)
+ .getWrappedEventOccurrence();
}
- if(currentEventOccurrence instanceof SignalEventOccurrence){
+ if (currentEventOccurrence instanceof SignalEventOccurrence) {
SignalEventOccurrence signalEventOccurrence = (SignalEventOccurrence) currentEventOccurrence;
- if(behavior.inputParameters().size() == 1){
+ if (behavior.inputParameters().size() == 1) {
Parameter parameter = behavior.inputParameters().get(0);
IParameterValue parameterValue = new ParameterValue();
parameterValue.setParameter(parameter);
@@ -72,13 +72,14 @@
parameterValue.setValues(values);
this.wrappedExecution.setParameterValue(parameterValue);
}
- }else if(currentEventOccurrence instanceof ICallEventOccurrence){
+ } else if (currentEventOccurrence instanceof ICallEventOccurrence) {
ICallEventOccurrence callEventOccurrence = (ICallEventOccurrence) currentEventOccurrence;
List<Parameter> behaviorInputParameters = behavior.inputParameters();
- List<IParameterValue> inputParameterValues = callEventOccurrence.getCallEventExecution().getInputParameterValues();
- if(behaviorInputParameters.size() == inputParameterValues.size()){
+ List<IParameterValue> inputParameterValues = callEventOccurrence.getCallEventExecution()
+ .getInputParameterValues();
+ if (behaviorInputParameters.size() == inputParameterValues.size()) {
int i = 1;
- while(i <= behaviorInputParameters.size()){
+ while (i <= behaviorInputParameters.size()) {
IParameterValue parameterValue = new ParameterValue();
parameterValue.setParameter(behaviorInputParameters.get(i - 1));
parameterValue.setValues(inputParameterValues.get(i - 1).getValues());
@@ -90,7 +91,7 @@
}
this._endIsolation();
}
-
+
@Override
public void execute() {
// First the behavior handled by the wrapped execution is parameterized
@@ -98,43 +99,47 @@
// The behavior handled by the wrapped Execution is executed and finally outputs
// are passed out to the triggering event occurrence (only occurs in the case of
// a call event occurrence).
- if(this.wrappedExecution != null && this.triggeringEventOccurrence != null){
+ if (this.wrappedExecution != null && this.triggeringEventOccurrence != null) {
this.initialize();
this.wrappedExecution.execute();
this.finalize_();
}
}
-
- public void finalize_(){
+
+ public void finalize_() {
// Transfer output parameter values (produced by the wrapped execution) back to
// the execution associated t the call event.
// If an effect, entry or exit Behavior is not just input-conforming, then the
// values of its output Parameters are passed out of its Behavior Execution on
- // its completion as potential values for the output Parameters of the called
+ // its completion as potential values for the output Parameters of the called
// Operation.
- //
- // Notes:
- // If the CallEvent is for a synchronous call, then the call ends at the end
- // of the triggered run-to-completion (RTC) step. If the called Operation has
- // output Parameters, then the values returned for those parameters are those
- // produced by the last effect, entry or exit Behavior to complete its execution
- // during the RTC step. Since some or all of those Behaviors may execute concurrently,
- // which one completes last may be only partially determined by the specified semantics.
- // The values returned may legally be those produced any Behavior that produces potential
- // output values and is the last to complete in any execution trace for the RTC
- // step consistent with the specified StateMachine semantics.
- IEventOccurrence currentEventOccurrence = this.triggeringEventOccurrence;
- if(this.triggeringEventOccurrence instanceof ICS_EventOccurrence){
- currentEventOccurrence = ((ICS_EventOccurrence)this.triggeringEventOccurrence).getWrappedEventOccurrence();
+ //
+ // Notes:
+ // If the CallEvent is for a synchronous call, then the call ends at the end
+ // of the triggered run-to-completion (RTC) step. If the called Operation has
+ // output Parameters, then the values returned for those parameters are those
+ // produced by the last effect, entry or exit Behavior to complete its execution
+ // during the RTC step. Since some or all of those Behaviors may execute
+ // concurrently,
+ // which one completes last may be only partially determined by the specified
+ // semantics.
+ // The values returned may legally be those produced any Behavior that produces
+ // potential
+ // output values and is the last to complete in any execution trace for the RTC
+ // step consistent with the specified StateMachine semantics.
+ IEventOccurrence currentEventOccurrence = this.triggeringEventOccurrence;
+ if (this.triggeringEventOccurrence instanceof ICS_EventOccurrence) {
+ currentEventOccurrence = ((ICS_EventOccurrence) this.triggeringEventOccurrence).getWrappedEventOccurrence();
}
- if(currentEventOccurrence instanceof ICallEventOccurrence){
+ if (currentEventOccurrence instanceof ICallEventOccurrence) {
ICallEventOccurrence callEventOccurrence = (ICallEventOccurrence) currentEventOccurrence;
Behavior behavior = this.wrappedExecution.getBehavior();
List<IParameterValue> outputParameterValues = this.wrappedExecution.getOutputParameterValues();
- if(behavior.outputParameters().size() == outputParameterValues.size()){
+ if (behavior.outputParameters().size() == outputParameterValues.size()) {
int i = 1;
- List<Parameter> behaviorOutputParameters = callEventOccurrence.getCallEventExecution().getBehavior().outputParameters();
- while(i <= behaviorOutputParameters.size()){
+ List<Parameter> behaviorOutputParameters = callEventOccurrence.getCallEventExecution().getBehavior()
+ .outputParameters();
+ while (i <= behaviorOutputParameters.size()) {
IParameterValue parameterValue = new ParameterValue();
parameterValue.setParameter(behaviorOutputParameters.get(i - 1));
parameterValue.setValues(outputParameterValues.get(i - 1).getValues());
@@ -145,7 +150,7 @@
}
this._endIsolation();
}
-
+
@Override
public IValue new_() {
return new EventTriggeredExecution();
@@ -155,7 +160,7 @@
public IValue copy() {
IEventTriggeredExecution copy = (EventTriggeredExecution) super.copy();
copy.setTriggerringEventOccurrence(this.triggeringEventOccurrence);
- copy.setConcreteExecution((IExecution)this.wrappedExecution.copy());
+ copy.setConcreteExecution((IExecution) this.wrappedExecution.copy());
return copy;
}
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/commonbehavior/SM_ObjectActivation.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/commonbehavior/SM_ObjectActivation.java
index 67d7293..b0d5b92 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/commonbehavior/SM_ObjectActivation.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/commonbehavior/SM_ObjectActivation.java
@@ -20,7 +20,6 @@
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
import org.eclipse.papyrus.moka.fuml.commonbehavior.ObjectActivation;
-import org.eclipse.papyrus.moka.pssm.commonbehavior.ISM_ObjectActivation;
import org.eclipse.papyrus.moka.pssm.statemachines.CompletionEventOccurrence;
import org.eclipse.papyrus.moka.pssm.statemachines.DeferredEventOccurrence;
import org.eclipse.papyrus.moka.pssm.statemachines.ICompletionEventOccurrence;
@@ -32,21 +31,22 @@
// Events that have been dispatched but that are actually deferred are placed
// in this particular event pool. When the state that constrained them to be
// placed in this pool leaves the state-machine configuration then the deferred
- // events leave this pool and are placed in the regular event pool (to be dispatched
+ // events leave this pool and are placed in the regular event pool (to be
+ // dispatched
// again) that is handled by the object activation.
public List<IDeferredEventOccurrence> deferredEventPool;
-
- public SM_ObjectActivation(){
+
+ public SM_ObjectActivation() {
super();
this.deferredEventPool = new ArrayList<IDeferredEventOccurrence>();
}
-
- public ICompletionEventOccurrence getNextCompletionEvent(){
+
+ public ICompletionEventOccurrence getNextCompletionEvent() {
// Return the next completion event available at the pool.
int i = 0;
ICompletionEventOccurrence completionEvent = null;
- while(completionEvent == null && i < this.eventPool.size()){
- if(this.eventPool.get(i) instanceof ICompletionEventOccurrence){
+ while (completionEvent == null && i < this.eventPool.size()) {
+ if (this.eventPool.get(i) instanceof ICompletionEventOccurrence) {
completionEvent = (ICompletionEventOccurrence) this.eventPool.get(i);
this.eventPool.remove(i);
}
@@ -54,77 +54,85 @@
}
return completionEvent;
}
-
- public int getDeferredEventInsertionIndex(){
+
+ public int getDeferredEventInsertionIndex() {
// Deferred events are always registered after completion events if any.
// Return the insertion point for deferred events.
int index = 0;
int i = 0;
- while(i < this.eventPool.size()){
- if(this.eventPool.get(i) instanceof CompletionEventOccurrence){
+ while (i < this.eventPool.size()) {
+ if (this.eventPool.get(i) instanceof CompletionEventOccurrence) {
index++;
}
i++;
}
return index;
}
-
+
public IEventOccurrence getNextEvent() {
// Completion events are always dispatched first. They are dispatched according
- // to their order of arrival in the pool. While completion event are available at
- // the pool no other event is dispatched. If not there is no more completion event
- // to dispatch then regular events are dispatched according to the currently used
- // dispatching policy. Note that if the currently dispatched event occurrence was
- // previously deferred the it is unwrapped and it encapsulated 'deferredEventOccurrence'
+ // to their order of arrival in the pool. While completion event are available
+ // at
+ // the pool no other event is dispatched. If not there is no more completion
+ // event
+ // to dispatch then regular events are dispatched according to the currently
+ // used
+ // dispatching policy. Note that if the currently dispatched event occurrence
+ // was
+ // previously deferred the it is unwrapped and it encapsulated
+ // 'deferredEventOccurrence'
// is actually dispatched.
- IEventOccurrence nextEvent = this.getNextCompletionEvent();
- if(nextEvent==null){
+ IEventOccurrence nextEvent = this.getNextCompletionEvent();
+ if (nextEvent == null) {
nextEvent = super.getNextEvent();
- if(nextEvent instanceof DeferredEventOccurrence){
- nextEvent = ((IDeferredEventOccurrence)nextEvent).getDeferredEventOccurrence();
+ if (nextEvent instanceof DeferredEventOccurrence) {
+ nextEvent = ((IDeferredEventOccurrence) nextEvent).getDeferredEventOccurrence();
}
}
return nextEvent;
}
-
- public void register(ICompletionEventOccurrence completionEventOccurrence){
+
+ public void register(ICompletionEventOccurrence completionEventOccurrence) {
// A completion event is registered in the completion event pool.
// Completion events are always registered at the head of the event pool.
// Its final position in the pool depends on the existence of other completion
// events already registered in the pool.
int insertionIndex = 0;
boolean insertionPointFound = false;
- while(!insertionPointFound && insertionIndex < this.eventPool.size()){
+ while (!insertionPointFound && insertionIndex < this.eventPool.size()) {
insertionPointFound = !(this.eventPool.get(insertionIndex) instanceof CompletionEventOccurrence);
- if(!insertionPointFound){
+ if (!insertionPointFound) {
insertionIndex++;
}
}
this.eventPool.add(insertionIndex, completionEventOccurrence);
this.notifyEventArrival();
}
-
- public void register(IDeferredEventOccurrence deferredEventOccurrence){
+
+ public void register(IDeferredEventOccurrence deferredEventOccurrence) {
// Add the deferred event occurrence in deferred event occurrence
this.deferredEventPool.add(deferredEventOccurrence);
}
-
- public void releaseDeferredEvents(IStateActivation deferringState){
- // The release of event occurrence(s) deferred by the deferring state includes the following step:
- // 1. Deferred events are removed from the deferred event pool
- // 2. Deferred events return to the regular event pool. They are inserted in the pool
- // after any existing completion event occurrence but before any other events that
- // arrived later.
+
+ public void releaseDeferredEvents(IStateActivation deferringState) {
+ // The release of event occurrence(s) deferred by the deferring state includes
+ // the following step:
+ // 1. Deferred events are removed from the deferred event pool
+ // 2. Deferred events return to the regular event pool. They are inserted in the
+ // pool
+ // after any existing completion event occurrence but before any other events
+ // that
+ // arrived later.
List<IDeferredEventOccurrence> releasedEvents = new ArrayList<IDeferredEventOccurrence>();
- for(int i=0; i < this.deferredEventPool.size(); i++){
+ for (int i = 0; i < this.deferredEventPool.size(); i++) {
IDeferredEventOccurrence eventOccurrence = this.deferredEventPool.get(i);
- if(eventOccurrence.getConstrainingStateActivation() == deferringState){
+ if (eventOccurrence.getConstrainingStateActivation() == deferringState) {
releasedEvents.add(eventOccurrence);
}
}
int insertionPoint = this.getDeferredEventInsertionIndex();
int i = 0;
- while(i < releasedEvents.size()){
+ while (i < releasedEvents.size()) {
this.eventPool.add(insertionPoint, releasedEvents.get(i));
this.notifyEventArrival();
insertionPoint++;
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/DoActivityExecutionEventAccepter.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/DoActivityExecutionEventAccepter.java
index a1db666..427a2a2 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/DoActivityExecutionEventAccepter.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/DoActivityExecutionEventAccepter.java
@@ -18,16 +18,16 @@
import org.eclipse.papyrus.moka.fuml.commonbehavior.EventAccepter;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventAccepter;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
-import org.eclipse.papyrus.moka.pssm.statemachines.IDoActivityContextObject;
public class DoActivityExecutionEventAccepter extends EventAccepter {
// The doActivity context object in which this accepter is registered
public IDoActivityContextObject context;
-
- // The actual event accepter (i.e., the one registered by the doActivity execution)
+
+ // The actual event accepter (i.e., the one registered by the doActivity
+ // execution)
public IEventAccepter encapsulatedAccepter;
-
+
@Override
public void accept(IEventOccurrence eventOccurrence) {
// The event accepted through the state-machine event pool leads
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/PseudostateActivation.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/PseudostateActivation.java
index e8f03b0..90b5e84 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/PseudostateActivation.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/PseudostateActivation.java
@@ -19,20 +19,18 @@
import java.util.List;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
-import org.eclipse.papyrus.moka.pssm.statemachines.IPseudostateActivation;
-import org.eclipse.papyrus.moka.pssm.statemachines.IRegionActivation;
-import org.eclipse.papyrus.moka.pssm.statemachines.ITransitionActivation;
-public abstract class PseudostateActivation extends VertexActivation implements IPseudostateActivation{
-
- // Transitions that were fireable at the time which the pseudo-state was evaluated.
+public abstract class PseudostateActivation extends VertexActivation implements IPseudostateActivation {
+
+ // Transitions that were fireable at the time which the pseudo-state was
+ // evaluated.
protected List<ITransitionActivation> fireableTransitions;
-
- public PseudostateActivation(){
+
+ public PseudostateActivation() {
this.fireableTransitions = new ArrayList<ITransitionActivation>();
}
-
- public void evaluateAllGuards(IEventOccurrence eventOccurrence){
+
+ public void evaluateAllGuards(IEventOccurrence eventOccurrence) {
// Evaluate all guards of outgoing transitions of the pseudo-state.
// Guard evaluation populate the set of fireable transitions with
// transitions whith guard evaluating to true. Not that this evaluation
@@ -40,28 +38,31 @@
// it is done statically when the compound transition leading to this
// pseudo-state is evaluated.
this.fireableTransitions.clear();
- for(int i=0; i < this.outgoingTransitionActivations.size(); i++){
+ for (int i = 0; i < this.outgoingTransitionActivations.size(); i++) {
ITransitionActivation transitionActivation = this.outgoingTransitionActivations.get(i);
- if(transitionActivation.evaluateGuard(eventOccurrence)){
+ if (transitionActivation.evaluateGuard(eventOccurrence)) {
this.fireableTransitions.add(transitionActivation);
}
}
}
-
-
- public boolean canPropagateExecution(ITransitionActivation enteringTransition, IEventOccurrence eventOccurrence, IRegionActivation leastCommonAncestor) {
- // Static analysis is propagated to the parent vertex. If the parent accepts the propagation and the
- // pseudo-state can be entered then it must be possible to propagate the execution through at least
- // one of the outgoing transitions of the pseudo-state. If it is not possible false is returned. Not that
+
+ public boolean canPropagateExecution(ITransitionActivation enteringTransition, IEventOccurrence eventOccurrence,
+ IRegionActivation leastCommonAncestor) {
+ // Static analysis is propagated to the parent vertex. If the parent accepts the
+ // propagation and the
+ // pseudo-state can be entered then it must be possible to propagate the
+ // execution through at least
+ // one of the outgoing transitions of the pseudo-state. If it is not possible
+ // false is returned. Not that
// in case where the pseudo-state cannot be entered true is returned.
boolean propagate = super.canPropagateExecution(enteringTransition, eventOccurrence, leastCommonAncestor);
- if(propagate && this.isEnterable(enteringTransition, true)){
- if(this.outgoingTransitionActivations.size() > 0){
+ if (propagate && this.isEnterable(enteringTransition, true)) {
+ if (this.outgoingTransitionActivations.size() > 0) {
this.evaluateAllGuards(eventOccurrence);
propagate = false;
- if(this.fireableTransitions.size() > 0){
+ if (this.fireableTransitions.size() > 0) {
int i = 0;
- while(!propagate && i < this.fireableTransitions.size()){
+ while (!propagate && i < this.fireableTransitions.size()) {
propagate = this.fireableTransitions.get(i).canPropagateExecution(eventOccurrence);
i++;
}
@@ -70,5 +71,5 @@
}
return propagate;
}
-
+
}
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/StateMachineSemanticVisitor.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/StateMachineSemanticVisitor.java
index 9710317..5559d0d 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/StateMachineSemanticVisitor.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/StateMachineSemanticVisitor.java
@@ -26,18 +26,17 @@
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.pssm.commonbehavior.EventTriggeredExecution;
import org.eclipse.papyrus.moka.pssm.commonbehavior.IEventTriggeredExecution;
-import org.eclipse.papyrus.moka.pssm.statemachines.IStateMachineSemanticVisitor;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.NamedElement;
-public abstract class StateMachineSemanticVisitor extends SemanticVisitor implements IStateMachineSemanticVisitor{
+public abstract class StateMachineSemanticVisitor extends SemanticVisitor implements IStateMachineSemanticVisitor {
- // Each semantic visitor for a state-machine know its parent visitor
+ // Each semantic visitor for a state-machine know its parent visitor
protected ISemanticVisitor parent;
// Each semantic visitor traverse a particular node of a state-machine
protected NamedElement node;
-
+
public NamedElement getNode() {
return node;
}
@@ -54,88 +53,99 @@
this.parent = parent;
}
- public StateMachineSemanticVisitor(){
+ public StateMachineSemanticVisitor() {
this.parent = null;
}
-
- public List<ISemanticVisitor> getContextChain(){
+
+ public List<ISemanticVisitor> getContextChain() {
// Return the hierarchy of visitors that need to be traversed to access
// the visitor that called context chain. The caller is part of the returned
// context chain.
List<ISemanticVisitor> contextChain = new ArrayList<ISemanticVisitor>();
- if(!(this instanceof ExitPointPseudostateActivation) && !(this instanceof EntryPointPseudostateActivation)){
+ if (!(this instanceof ExitPointPseudostateActivation) && !(this instanceof EntryPointPseudostateActivation)) {
contextChain.add(this);
}
- if(this.parent!=null){
- if(this.parent instanceof StateMachineExecution){
+ if (this.parent != null) {
+ if (this.parent instanceof StateMachineExecution) {
contextChain.add(this.parent);
- }else{
- contextChain.addAll(((StateMachineSemanticVisitor)this.parent).getContextChain());
+ } else {
+ contextChain.addAll(((StateMachineSemanticVisitor) this.parent).getContextChain());
}
}
return contextChain;
}
-
- public IExecution getStateMachineExecution(){
- // Return the state-machine execution from which the caller of this operation belongs
- if(this.parent!=null && this.parent instanceof StateMachineExecution){
- return (IExecution)this.parent;
- }else{
- return ((StateMachineSemanticVisitor)this.parent).getStateMachineExecution();
+
+ public IExecution getStateMachineExecution() {
+ // Return the state-machine execution from which the caller of this operation
+ // belongs
+ if (this.parent != null && this.parent instanceof StateMachineExecution) {
+ return (IExecution) this.parent;
+ } else {
+ return ((StateMachineSemanticVisitor) this.parent).getStateMachineExecution();
}
}
-
- public ILocus getExecutionLocus(){
+
+ public ILocus getExecutionLocus() {
return this.getStateMachineExecution().getLocus();
}
-
- public IObject_ getExecutionContext(){
+
+ public IObject_ getExecutionContext() {
return this.getStateMachineExecution().getContext();
}
-
- public boolean isVisitorFor(NamedElement node){
- // A visitor is the interpreter for a model if the node given as parameter is the
+
+ public boolean isVisitorFor(NamedElement node) {
+ // A visitor is the interpreter for a model if the node given as parameter is
+ // the
// this model element.
return this.node == node;
}
-
- public void activate(){
- // This operation is intended to be overridden by sub-classes. For required sub-classes
- // (e.g., RegionActivation, StateActivation) it will initiate the instantiation phase of
+
+ public void activate() {
+ // This operation is intended to be overridden by sub-classes. For required
+ // sub-classes
+ // (e.g., RegionActivation, StateActivation) it will initiate the instantiation
+ // phase of
// child semantic visitors. By default activate does nothing.
return;
}
-
- public void activateTransitions(){
- // ActivateTransition is intended to be overridden by sub-classes. It will capture the instantiation
- // of transitions visitors as well as the linking between these visitors and the required vertices
+
+ public void activateTransitions() {
+ // ActivateTransition is intended to be overridden by sub-classes. It will
+ // capture the instantiation
+ // of transitions visitors as well as the linking between these visitors and the
+ // required vertices
// activation. By default activate does nothing.
return;
}
-
- public IExecution getExecutionFor(Behavior behavior, IEventOccurrence eventOccurrence){
- // Create an Execution for the specified behavior. In addition to the creation of this
- // Execution, if the behavior execution is triggered by the dispatching of an event (i.e.
- // a CallEvent or a SignalEvent) then an EventTriggeredExecution is provided. This
- // execution wraps the original execution and ensures passing of event data to the
+
+ public IExecution getExecutionFor(Behavior behavior, IEventOccurrence eventOccurrence) {
+ // Create an Execution for the specified behavior. In addition to the creation
+ // of this
+ // Execution, if the behavior execution is triggered by the dispatching of an
+ // event (i.e.
+ // a CallEvent or a SignalEvent) then an EventTriggeredExecution is provided.
+ // This
+ // execution wraps the original execution and ensures passing of event data to
+ // the
// wrapped execution.
IExecution execution = null;
- if(behavior != null){
- IExecution originalExecution = this.getExecutionLocus().getFactory().createExecution(behavior, this.getExecutionContext());
- if(eventOccurrence != null){
+ if (behavior != null) {
+ IExecution originalExecution = this.getExecutionLocus().getFactory().createExecution(behavior,
+ this.getExecutionContext());
+ if (eventOccurrence != null) {
IEventTriggeredExecution containerExecution = new EventTriggeredExecution();
containerExecution.setTriggerringEventOccurrence(eventOccurrence);
containerExecution.setConcreteExecution(originalExecution);
containerExecution.setContext(originalExecution.getContext());
execution = containerExecution;
- }else{
+ } else {
execution = originalExecution;
}
}
return execution;
}
-
- public String toString(){
+
+ public String toString() {
return this.node.getName();
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/TransitionActivation.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/TransitionActivation.java
index 7ecb7d8..07ea0b3 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/TransitionActivation.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/TransitionActivation.java
@@ -15,9 +15,6 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.pssm.statemachines;
-
-import static org.eclipse.papyrus.moka.pssm.Activator.logger;
-
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IExecution;
import org.eclipse.papyrus.moka.fuml.simpleclassifiers.IBooleanValue;
@@ -31,30 +28,31 @@
import org.eclipse.uml2.uml.ValueSpecification;
public abstract class TransitionActivation extends StateMachineSemanticVisitor implements ITransitionActivation {
-
+
// The source activation of this transition activation
protected IVertexActivation vertexSourceActivation;
-
+
// The target activation of this transition activation
protected IVertexActivation vertexTargetActivation;
-
+
// The runtime status (NONE, REACHED, TRAVERSED) of the transition
protected TransitionMetadata status;
-
+
// Least common ancestor of the source and the target. This is materialized
- // by the region activation that is the common ancestor of the source and the target.
+ // by the region activation that is the common ancestor of the source and the
+ // target.
private IRegionActivation leastCommonAncestor;
-
+
// The static status (NONE, REACHED, TRAVERSED) of the transition
protected TransitionMetadata analyticalStatus;
-
+
// The last event occurrence used during static analysis.
private IEventOccurrence lastTriggeringEventOccurrence;
-
+
// The last verdict when the execution was propagated over this transition.
private boolean lastPropagation;
-
- public TransitionActivation(){
+
+ public TransitionActivation() {
super();
this.status = TransitionMetadata.NONE;
this.analyticalStatus = TransitionMetadata.NONE;
@@ -62,7 +60,7 @@
this.lastTriggeringEventOccurrence = null;
this.lastPropagation = false;
}
-
+
public TransitionMetadata getStatus() {
return status;
}
@@ -70,15 +68,15 @@
public void setStatus(TransitionMetadata state) {
this.status = state;
}
-
- public void setAnalyticalStatus(TransitionMetadata status){
+
+ public void setAnalyticalStatus(TransitionMetadata status) {
this.analyticalStatus = status;
}
-
- public TransitionMetadata getAnalyticalStatus(){
+
+ public TransitionMetadata getAnalyticalStatus() {
return this.analyticalStatus;
}
-
+
public IVertexActivation getSourceActivation() {
return vertexSourceActivation;
}
@@ -95,30 +93,30 @@
this.vertexTargetActivation = vertexTargetActivation;
}
- public boolean isReached(boolean staticCheck){
+ public boolean isReached(boolean staticCheck) {
/// Convenience operation which returns true if the status of this transition
// is REACHED; false otherwise.
boolean reached = true;
- if(staticCheck){
+ if (staticCheck) {
reached = this.analyticalStatus.equals(TransitionMetadata.REACHED);
- }else{
+ } else {
reached = this.status.equals(TransitionMetadata.REACHED);
}
return reached;
}
-
- public boolean isTraversed(boolean staticCheck){
+
+ public boolean isTraversed(boolean staticCheck) {
// Convenience operation which returns true if the status of this transition
// is TRAVERSED; false otherwise.
boolean traversed = true;
- if(staticCheck){
+ if (staticCheck) {
traversed = this.analyticalStatus.equals(TransitionMetadata.TRAVERSED);
- }else{
+ } else {
traversed = this.status.equals(TransitionMetadata.TRAVERSED);
}
return traversed;
}
-
+
@Override
public boolean isVisitorFor(NamedElement node) {
// Determine if this visitor is a semantic visitor for the node
@@ -127,188 +125,200 @@
// if the node matches a transition that is redefined (directly or
// indirectly) by the transition attached to this semantic visitor.
boolean isVisitor = super.isVisitorFor(node);
- if(!isVisitor){
- Transition transition = ((Transition)this.node).getRedefinedTransition();
- while(!isVisitor && transition != null){
- if(transition == node){
+ if (!isVisitor) {
+ Transition transition = ((Transition) this.node).getRedefinedTransition();
+ while (!isVisitor && transition != null) {
+ if (transition == node) {
isVisitor = true;
- }else{
+ } else {
transition = transition.getRedefinedTransition();
}
}
}
return isVisitor;
}
-
- public boolean isTriggered(){
+
+ public boolean isTriggered() {
// Check if the transition is triggered. A transition is triggered
// if it declares triggers or if it redefines a transition that itself
// declares triggers. This check applies recursively on the redefinition
// hierarchy.
Transition transition = (Transition) this.node;
boolean isTriggered = false;
- if(!transition.getTriggers().isEmpty()){
+ if (!transition.getTriggers().isEmpty()) {
isTriggered = true;
}
- while(!isTriggered && transition.getRedefinedTransition() != null){
+ while (!isTriggered && transition.getRedefinedTransition() != null) {
transition = transition.getRedefinedTransition();
- if(!transition.getTriggers().isEmpty()){
+ if (!transition.getTriggers().isEmpty()) {
isTriggered = true;
}
}
return isTriggered;
}
-
- public boolean isGuarded(){
+
+ public boolean isGuarded() {
// Check if the transition is guarded. A transition is guarded if it declares
// a guard or if a redefine transition that itself declares a guar. This check
// applies recursively on the redefinition hierarchy
Transition transition = (Transition) this.node;
boolean isGuarded = false;
- if(transition.getGuard() != null){
+ if (transition.getGuard() != null) {
isGuarded = true;
}
- while(!isGuarded && transition.getRedefinedTransition() != null){
+ while (!isGuarded && transition.getRedefinedTransition() != null) {
transition = transition.getRedefinedTransition();
- if(transition.getGuard() != null){
+ if (transition.getGuard() != null) {
isGuarded = true;
}
}
return isGuarded;
}
-
- public boolean evaluateGuard(IEventOccurrence eventOccurrence){
+
+ public boolean evaluateGuard(IEventOccurrence eventOccurrence) {
// Evaluate the guard specification thanks to an evaluation.
// The evaluation does not presume of the type of the guard specification.
- boolean result = true;
+ boolean result = true;
Transition transition = (Transition) this.node;
Constraint guard = transition.getGuard();
- while(guard == null && transition.getRedefinedTransition() != null){
+ while (guard == null && transition.getRedefinedTransition() != null) {
transition = transition.getRedefinedTransition();
guard = transition.getGuard();
}
if (guard != null) {
- ValueSpecification specification = guard.getSpecification() ;
- if(specification!=null){
+ ValueSpecification specification = guard.getSpecification();
+ if (specification != null) {
IEvaluation evaluation = this.getExecutionLocus().getFactory().createEvaluation(specification);
if (specification instanceof OpaqueExpression) {
- ((ISM_OpaqueExpressionEvaluation)evaluation).setContext(this.getExecutionContext()) ;
- ((ISM_OpaqueExpressionEvaluation)evaluation).initialize(eventOccurrence);
+ ((ISM_OpaqueExpressionEvaluation) evaluation).setContext(this.getExecutionContext());
+ ((ISM_OpaqueExpressionEvaluation) evaluation).initialize(eventOccurrence);
}
- if(evaluation!=null){
- IBooleanValue evaluationResult = (IBooleanValue)evaluation.evaluate() ;
- result = evaluationResult.getValue() ;
+ if (evaluation != null) {
+ IBooleanValue evaluationResult = (IBooleanValue) evaluation.evaluate();
+ result = evaluationResult.getValue();
}
}
-
+
}
return result;
}
-
- public boolean hasTrigger(IEventOccurrence eventOccurrence){
+
+ public boolean hasTrigger(IEventOccurrence eventOccurrence) {
// Return true if the event occurrence matches a trigger of this transition.
// false otherwise. If the transition declares no trigger but redefines another
- // transition then if that transition has a trigger that matches the event occurrence
- // the redefining transition is considered has being able to react to the event occurrence.
+ // transition then if that transition has a trigger that matches the event
+ // occurrence
+ // the redefining transition is considered has being able to react to the event
+ // occurrence.
// The rule applies recursively.
Transition transition = (Transition) this.node;
boolean match = eventOccurrence.matchAny(transition.getTriggers());
- while(!match && transition.getRedefinedTransition() != null){
+ while (!match && transition.getRedefinedTransition() != null) {
transition = transition.getRedefinedTransition();
match = eventOccurrence.matchAny(transition.getTriggers());
}
return match;
}
-
- public boolean canFireOn(IEventOccurrence eventOccurrence){
+
+ public boolean canFireOn(IEventOccurrence eventOccurrence) {
// A transition is can fire when:
// 1. It has a trigger that matches the dispatched event occurrence.
// 2. Its guard evaluates to true.
// 3. A valid path can found to the next state machine configuration.
- // Note: If the dispatched event is a completion event, the transition matches this latter
- // if it has no trigger and the transition leaves the state from which the completion event
+ // Note: If the dispatched event is a completion event, the transition matches
+ // this latter
+ // if it has no trigger and the transition leaves the state from which the
+ // completion event
// was generated.
- boolean reactive = this.hasTrigger(eventOccurrence) &&
- this.evaluateGuard(eventOccurrence) &&
- this.canPropagateExecution(eventOccurrence);
- if(reactive && eventOccurrence instanceof ICompletionEventOccurrence){
- reactive = this.getSourceActivation()==((ICompletionEventOccurrence)eventOccurrence).getScope();
+ boolean reactive = this.hasTrigger(eventOccurrence) && this.evaluateGuard(eventOccurrence)
+ && this.canPropagateExecution(eventOccurrence);
+ if (reactive && eventOccurrence instanceof ICompletionEventOccurrence) {
+ reactive = this.getSourceActivation() == ((ICompletionEventOccurrence) eventOccurrence).getScope();
}
return reactive;
}
-
- public boolean canPropagateExecution(IEventOccurrence eventOccurrence){
- // Evaluate the possibility to propagate the static analysis through this transition activation.
+
+ public boolean canPropagateExecution(IEventOccurrence eventOccurrence) {
+ // Evaluate the possibility to propagate the static analysis through this
+ // transition activation.
// Two situations can occur:
- // 1. The transition has already been "traversed" with using the same event occurrence. This means
- // we already know the execution can be propagated through the transiton activation. Hence true
- // is returned and the propagation stops.
- // 2. The transition has not already been "traversed" using this event occurrence. The consequence
- // is that the analysis is propagated through the target vertex activation.
+ // 1. The transition has already been "traversed" with using the same event
+ // occurrence. This means
+ // we already know the execution can be propagated through the transiton
+ // activation. Hence true
+ // is returned and the propagation stops.
+ // 2. The transition has not already been "traversed" using this event
+ // occurrence. The consequence
+ // is that the analysis is propagated through the target vertex activation.
boolean propagate = true;
- if(this.lastTriggeringEventOccurrence != eventOccurrence){
- propagate = this.vertexTargetActivation.canPropagateExecution(this, eventOccurrence, this.getLeastCommonAncestor());
+ if (this.lastTriggeringEventOccurrence != eventOccurrence) {
+ propagate = this.vertexTargetActivation.canPropagateExecution(this, eventOccurrence,
+ this.getLeastCommonAncestor());
this.lastTriggeringEventOccurrence = eventOccurrence;
this.lastPropagation = propagate;
- }else{
+ } else {
propagate = this.lastPropagation;
}
return propagate;
}
-
- public void tryExecuteEffect(IEventOccurrence eventOccurrence){
+
+ public void tryExecuteEffect(IEventOccurrence eventOccurrence) {
// Execute the effect owned by the transition (if any). If there
// is no effect but the transition redefines another transition, then
// the effect of this transition is executed instead. This rule
// applies recursively.
Transition transition = (Transition) this.getNode();
Behavior effect = transition.getEffect();
- while(effect == null && transition.getRedefinedTransition() != null){
+ while (effect == null && transition.getRedefinedTransition() != null) {
transition = transition.getRedefinedTransition();
effect = transition.getEffect();
}
- if(effect != null){
+ if (effect != null) {
IExecution execution = this.getExecutionFor(transition.getEffect(), eventOccurrence);
- if(execution!=null){
+ if (execution != null) {
execution.execute();
}
}
}
-
- public void fire(IEventOccurrence eventOccurrence){
+
+ public void fire(IEventOccurrence eventOccurrence) {
// The fire sequence is broken into the following set of actions
- // 1 - Exit the source (depends on the kind of transition that is currently used)
+ // 1 - Exit the source (depends on the kind of transition that is currently
+ // used)
// 2 - Execute the effect (if one exists for that transition)
- // 3 - Enter the target (depends on the kind of transition that is currently used)
+ // 3 - Enter the target (depends on the kind of transition that is currently
+ // used)
this.exitSource(eventOccurrence);
this.tryExecuteEffect(eventOccurrence);
this.setStatus(TransitionMetadata.TRAVERSED);
- logger.info(this.getNode().getName()+" => TRAVERSED");
+
this.enterTarget(eventOccurrence);
}
-
- public IRegionActivation getLeastCommonAncestor(){
- // Return the common ancestor of the source and the target. This common ancestor is
+ public IRegionActivation getLeastCommonAncestor() {
+ // Return the common ancestor of the source and the target. This common ancestor
+ // is
// a region activation
- if(this.vertexSourceActivation.getParentVertexActivation()!=this.vertexTargetActivation.getParentVertexActivation()){
- if(this.leastCommonAncestor==null){
- this.leastCommonAncestor = this.vertexSourceActivation.getLeastCommonAncestor(this.vertexTargetActivation, ((Transition)this.getNode()).getKind());
+ if (this.vertexSourceActivation.getParentVertexActivation() != this.vertexTargetActivation
+ .getParentVertexActivation()) {
+ if (this.leastCommonAncestor == null) {
+ this.leastCommonAncestor = this.vertexSourceActivation
+ .getLeastCommonAncestor(this.vertexTargetActivation, ((Transition) this.getNode()).getKind());
}
}
return this.leastCommonAncestor;
}
-
- public String toString(){
- String representation = "["+this.getSourceActivation()+"] -> ["+this.getTargetActivation()+"] (";
- if(this.isReached(false)){
+
+ public String toString() {
+ String representation = "[" + this.getSourceActivation() + "] -> [" + this.getTargetActivation() + "] (";
+ if (this.isReached(false)) {
representation += "REACHED";
- }else if(this.isTraversed(false)){
+ } else if (this.isTraversed(false)) {
representation += "TRAVERSED";
- }else{
+ } else {
representation += "NONE";
}
- return representation +")";
+ return representation + ")";
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/VertexActivation.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/VertexActivation.java
index a7d80c5..a03512a 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/VertexActivation.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/statemachines/VertexActivation.java
@@ -15,173 +15,183 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.pssm.statemachines;
-import static org.eclipse.papyrus.moka.pssm.Activator.logger;
-
import java.util.ArrayList;
import java.util.List;
import org.eclipse.papyrus.moka.fuml.commonbehavior.IEventOccurrence;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
-import org.eclipse.papyrus.moka.pssm.statemachines.IRegionActivation;
-import org.eclipse.papyrus.moka.pssm.statemachines.ITransitionActivation;
-import org.eclipse.papyrus.moka.pssm.statemachines.IVertexActivation;
-import org.eclipse.papyrus.moka.pssm.statemachines.StateMetadata;
-import org.eclipse.papyrus.moka.pssm.statemachines.TransitionMetadata;
import org.eclipse.uml2.uml.TransitionKind;
import org.eclipse.uml2.uml.Vertex;
public abstract class VertexActivation extends StateMachineSemanticVisitor implements IVertexActivation {
-
+
// Status of the current vertex
protected StateMetadata status;
-
+
// Incoming transitions of that vertex
protected List<ITransitionActivation> incomingTransitionActivations;
-
+
// Outgoing transitions of that vertex
protected List<ITransitionActivation> outgoingTransitionActivations;
-
- public VertexActivation(){
+
+ public VertexActivation() {
super();
this.setStatus(StateMetadata.IDLE);
this.incomingTransitionActivations = new ArrayList<ITransitionActivation>();
this.outgoingTransitionActivations = new ArrayList<ITransitionActivation>();
}
-
- public VertexActivation getParentVertexActivation(){
- // The parent state of a vertex is either a StateMachineExecution or a StateActivation
- IRegionActivation regionActivation = (IRegionActivation)this.getParent();
- if(regionActivation!=null){
- if(regionActivation.getParent() instanceof StateMachineExecution){
+
+ public VertexActivation getParentVertexActivation() {
+ // The parent state of a vertex is either a StateMachineExecution or a
+ // StateActivation
+ IRegionActivation regionActivation = (IRegionActivation) this.getParent();
+ if (regionActivation != null) {
+ if (regionActivation.getParent() instanceof StateMachineExecution) {
return null;
- }else{
+ } else {
return (VertexActivation) regionActivation.getParent();
}
}
return null;
}
-
- public IRegionActivation getOwningRegionActivation(){
+
+ public IRegionActivation getOwningRegionActivation() {
// In general for a vertex activation its owning region activation
// is its direct parent. Not that is not true for the exit point
// activation as well as the entry point activation. This operation
// is therefore overridden in these two context
return (IRegionActivation) this.parent;
}
-
- public void setStatus(StateMetadata state){
+
+ public void setStatus(StateMetadata state) {
this.status = state;
}
-
- public StateMetadata getStatus(){
+
+ public StateMetadata getStatus() {
return this.status;
}
-
- public void addIncomingTransition(ITransitionActivation activation){
+
+ public void addIncomingTransition(ITransitionActivation activation) {
this.incomingTransitionActivations.add(activation);
}
-
- public void addOutgoingTransition(ITransitionActivation activation){
+
+ public void addOutgoingTransition(ITransitionActivation activation) {
this.outgoingTransitionActivations.add(activation);
}
-
- public List<ITransitionActivation> getOutgoingTransitions(){
+
+ public List<ITransitionActivation> getOutgoingTransitions() {
return this.outgoingTransitionActivations;
}
-
- public List<ITransitionActivation> getIncomingTransitions(){
+
+ public List<ITransitionActivation> getIncomingTransitions() {
return this.incomingTransitionActivations;
}
- public IVertexActivation getVertexActivation(Vertex vertex){
+ public IVertexActivation getVertexActivation(Vertex vertex) {
// By default return nothing. Must be overridden by state activation;
return null;
}
-
- public final void tagOutgoingTransitions(TransitionMetadata status, boolean staticCheck){
- // Assign the given status (runtime or analysis) to all outgoing transitions of this vertex
- for(ITransitionActivation transitionActivation: this.outgoingTransitionActivations){
- if(staticCheck){
+
+ public final void tagOutgoingTransitions(TransitionMetadata status, boolean staticCheck) {
+ // Assign the given status (runtime or analysis) to all outgoing transitions of
+ // this vertex
+ for (ITransitionActivation transitionActivation : this.outgoingTransitionActivations) {
+ if (staticCheck) {
transitionActivation.setAnalyticalStatus(status);
- }else{
+ } else {
transitionActivation.setStatus(status);
}
}
}
-
- public final void tagIncomingTransitions(TransitionMetadata status, boolean staticCheck){
- // Assign the given status (runtime or analysis) to all incoming transitions of this vertex
- for(ITransitionActivation transitionActivation: this.incomingTransitionActivations){
- if(staticCheck){
+
+ public final void tagIncomingTransitions(TransitionMetadata status, boolean staticCheck) {
+ // Assign the given status (runtime or analysis) to all incoming transitions of
+ // this vertex
+ for (ITransitionActivation transitionActivation : this.incomingTransitionActivations) {
+ if (staticCheck) {
transitionActivation.setAnalyticalStatus(status);
- }else{
+ } else {
transitionActivation.setStatus(status);
}
}
}
-
- public List<IVertexActivation> getAscendingHierarchy(){
+
+ public List<IVertexActivation> getAscendingHierarchy() {
// Provides the hierarchy of state activations starting from the current
- // element. This list is ordered from the innermost element to the outermost element
+ // element. This list is ordered from the innermost element to the outermost
+ // element
List<IVertexActivation> hierarchy = new ArrayList<IVertexActivation>();
List<ISemanticVisitor> contextChain = this.getContextChain();
- for(ISemanticVisitor element : contextChain){
- if(element instanceof StateActivation){
- hierarchy.add((StateActivation)element);
+ for (ISemanticVisitor element : contextChain) {
+ if (element instanceof StateActivation) {
+ hierarchy.add((StateActivation) element);
}
}
return hierarchy;
}
-
- public void enter(ITransitionActivation enteringTransition, IEventOccurrence eventOccurrence, IRegionActivation leastCommonAncestor){
- // When a vertex is entered its parent may need to be entered as well. Such situation
- // occurs when the parent is not active while there is an attempt to enter the current
- // vertex activation. What is important here is that entry rule is applied recursively
+
+ public void enter(ITransitionActivation enteringTransition, IEventOccurrence eventOccurrence,
+ IRegionActivation leastCommonAncestor) {
+ // When a vertex is entered its parent may need to be entered as well. Such
+ // situation
+ // occurs when the parent is not active while there is an attempt to enter the
+ // current
+ // vertex activation. What is important here is that entry rule is applied
+ // recursively
// until the least common ancestor is reached.
IRegionActivation owningRegionActivation = this.getOwningRegionActivation();
- if(leastCommonAncestor != null && owningRegionActivation != null && leastCommonAncestor != owningRegionActivation){
+ if (leastCommonAncestor != null && owningRegionActivation != null
+ && leastCommonAncestor != owningRegionActivation) {
IVertexActivation vertexActivation = (IVertexActivation) owningRegionActivation.getParent();
- if(vertexActivation != null){
+ if (vertexActivation != null) {
vertexActivation.enter(enteringTransition, eventOccurrence, leastCommonAncestor);
}
}
- logger.info(this.getNode().getName()+" => ACTIVE");
+
this.setStatus(StateMetadata.ACTIVE);
this.tagOutgoingTransitions(TransitionMetadata.REACHED, false);
}
-
- public void exit(ITransitionActivation exitingTransition, IEventOccurrence eventOccurrence, IRegionActivation leastCommonAncestor){
- // When a vertex is exited its parent may need to be exited too. Such situation typically
- // occurs when the current vertex is exited through a transition that cross boundaries of
- // the parent state (and maybe also border its own parent). This implies that from the current
- // vertex and until the least common ancestor is reached all states are exited recursively.
+
+ public void exit(ITransitionActivation exitingTransition, IEventOccurrence eventOccurrence,
+ IRegionActivation leastCommonAncestor) {
+ // When a vertex is exited its parent may need to be exited too. Such situation
+ // typically
+ // occurs when the current vertex is exited through a transition that cross
+ // boundaries of
+ // the parent state (and maybe also border its own parent). This implies that
+ // from the current
+ // vertex and until the least common ancestor is reached all states are exited
+ // recursively.
this.tagIncomingTransitions(TransitionMetadata.NONE, false);
this.setStatus(StateMetadata.IDLE);
- logger.info(this.getNode().getName()+" => IDLE");
+
IRegionActivation owningRegionActivation = this.getOwningRegionActivation();
- if(leastCommonAncestor != null && owningRegionActivation != null && leastCommonAncestor != owningRegionActivation){
+ if (leastCommonAncestor != null && owningRegionActivation != null
+ && leastCommonAncestor != owningRegionActivation) {
IVertexActivation vertexActivation = (VertexActivation) owningRegionActivation.getParent();
- if(vertexActivation != null){
+ if (vertexActivation != null) {
vertexActivation.exit(exitingTransition, eventOccurrence, leastCommonAncestor);
}
}
}
-
- public boolean isActive(){
+
+ public boolean isActive() {
// By default is is possible to assess if a vertex is active by checking
// if its status is ACTIVE. Note this operation is overriden in the context
// of state activations which require a presence within the state-machine
// configuration.
return this.status.equals(StateMetadata.ACTIVE);
}
-
- public IRegionActivation getLeastCommonAncestor(IVertexActivation targetVertexActivation, TransitionKind transitionKind){
+
+ public IRegionActivation getLeastCommonAncestor(IVertexActivation targetVertexActivation,
+ TransitionKind transitionKind) {
// Determine the semantic visitor being the least common ancestor between
// the current vertex activation and the target vertex activation (provided as
- // a parameter). The analysis is based on a comparative analysis vertices (source and
+ // a parameter). The analysis is based on a comparative analysis vertices
+ // (source and
// target) hierarchies.
IRegionActivation leastCommonAncestor = null;
- ISemanticVisitor sourceHierachyNode = null;
+ ISemanticVisitor sourceHierachyNode = null;
ISemanticVisitor targetHierarchyNode = null;
List<ISemanticVisitor> sourceHierarchy = this.getContextChain();
List<ISemanticVisitor> targetHierarchy = targetVertexActivation.getContextChain();
@@ -190,12 +200,12 @@
// Check if a difference can be found in between the two subsets
// delimited by the common index. Iterate until the least common
// ancestor is found or the two subsets have been reviewed
- while(leastCommonAncestor == null && sourceHierarchyIndex > 0 && targetHierarchyIndex > 0){
+ while (leastCommonAncestor == null && sourceHierarchyIndex > 0 && targetHierarchyIndex > 0) {
sourceHierachyNode = sourceHierarchy.get(sourceHierarchyIndex - 1);
targetHierarchyNode = targetHierarchy.get(targetHierarchyIndex - 1);
- if(sourceHierachyNode != targetHierarchyNode){
+ if (sourceHierachyNode != targetHierarchyNode) {
leastCommonAncestor = this.getRegionActivation(sourceHierachyNode);
- }else{
+ } else {
sourceHierarchyIndex = sourceHierarchyIndex - 1;
targetHierarchyIndex = targetHierarchyIndex - 1;
}
@@ -204,70 +214,77 @@
// previously reviewed. This indicate two possible situations:
// 1. The source and the target are the same.
// 2. There is containing / container relationship existing between
- // the source and the target.
- if(leastCommonAncestor == null){
- if(sourceHierarchyIndex == 0 && targetHierarchyIndex == 0){
+ // the source and the target.
+ if (leastCommonAncestor == null) {
+ if (sourceHierarchyIndex == 0 && targetHierarchyIndex == 0) {
leastCommonAncestor = this.getRegionActivation(sourceHierarchy.get(sourceHierarchyIndex + 1));
- }else{
- if(this.getVertexActivation((Vertex)targetVertexActivation.getNode()) != null){
- if(transitionKind == TransitionKind.EXTERNAL_LITERAL){
+ } else {
+ if (this.getVertexActivation((Vertex) targetVertexActivation.getNode()) != null) {
+ if (transitionKind == TransitionKind.EXTERNAL_LITERAL) {
leastCommonAncestor = this.getRegionActivation(sourceHierarchy.get(sourceHierarchyIndex));
- }else{
+ } else {
leastCommonAncestor = this.getRegionActivation(targetHierarchy.get(targetHierarchyIndex - 1));
}
- }else{
+ } else {
leastCommonAncestor = this.getRegionActivation(sourceHierarchy.get(sourceHierarchyIndex - 1));
}
}
}
return leastCommonAncestor;
}
-
- private IRegionActivation getRegionActivation(ISemanticVisitor semanticVisitor){
+
+ private IRegionActivation getRegionActivation(ISemanticVisitor semanticVisitor) {
// If the given semantic visitor is a region activation then this activation
- // is returned. Otherwise if the visitor is a vertex activation then its
+ // is returned. Otherwise if the visitor is a vertex activation then its
// parent region activation is returned.
- IRegionActivation regionActivation = null;
- if(semanticVisitor instanceof IRegionActivation){
+ IRegionActivation regionActivation = null;
+ if (semanticVisitor instanceof IRegionActivation) {
regionActivation = (IRegionActivation) semanticVisitor;
- }else if(semanticVisitor instanceof VertexActivation){
- regionActivation = (IRegionActivation)((IVertexActivation)semanticVisitor).getParent();
+ } else if (semanticVisitor instanceof VertexActivation) {
+ regionActivation = (IRegionActivation) ((IVertexActivation) semanticVisitor).getParent();
}
return regionActivation;
}
-
- public boolean isEnterable(ITransitionActivation enteringTransition, boolean staticCheck){
+
+ public boolean isEnterable(ITransitionActivation enteringTransition, boolean staticCheck) {
// By default a vertex has no prerequisites that need to be full-filled
// to be entered. Nevertheless some vertex (e.g., join or exit) have such
// prerequisites. Therefore this method is intended to be overridden in vertex
- // activation sub-classes.
+ // activation sub-classes.
return true;
}
-
- public boolean isExitable(ITransitionActivation exitingTransition, boolean staticCheck){
- // By default a vertex has no prerequisites that need to be full-filled to be entered
- // Nevertheless some vertex (e.g., Fork) have such prerequisite. Therefore this method
+
+ public boolean isExitable(ITransitionActivation exitingTransition, boolean staticCheck) {
+ // By default a vertex has no prerequisites that need to be full-filled to be
+ // entered
+ // Nevertheless some vertex (e.g., Fork) have such prerequisite. Therefore this
+ // method
// is intended to be overridden in vertex activation sub-classes.
return true;
}
-
- public void terminate(){
- // Terminate applied by a vertex activation does nothing by default. However it is intended
- // to be overridden by sub-classe(s)
+
+ public void terminate() {
+ // Terminate applied by a vertex activation does nothing by default. However it
+ // is intended
+ // to be overridden by sub-classe(s)
return;
}
-
- public boolean canPropagateExecution(ITransitionActivation enteringTransition, IEventOccurrence eventOccurrence , IRegionActivation leastCommonAncestor) {
- // The common behavior of all kind of vertices is that when the propagation analysis is done
- // if a the target is a vertex that is nested within a hierarchy then the analysis
+
+ public boolean canPropagateExecution(ITransitionActivation enteringTransition, IEventOccurrence eventOccurrence,
+ IRegionActivation leastCommonAncestor) {
+ // The common behavior of all kind of vertices is that when the propagation
+ // analysis is done
+ // if a the target is a vertex that is nested within a hierarchy then the
+ // analysis
// must be recursively propagated to the parent vertices.
boolean propagate = true;
- if(leastCommonAncestor != null){
+ if (leastCommonAncestor != null) {
IRegionActivation parentRegionActivation = this.getOwningRegionActivation();
- if(leastCommonAncestor!=parentRegionActivation){
+ if (leastCommonAncestor != parentRegionActivation) {
IVertexActivation vertexActivation = (IVertexActivation) parentRegionActivation.getParent();
- if(vertexActivation != null){
- propagate = vertexActivation.canPropagateExecution(enteringTransition, eventOccurrence, leastCommonAncestor);
+ if (vertexActivation != null) {
+ propagate = vertexActivation.canPropagateExecution(enteringTransition, eventOccurrence,
+ leastCommonAncestor);
}
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/values/SM_OpaqueExpressionEvaluation.java b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/values/SM_OpaqueExpressionEvaluation.java
index 5406036..9cf7b6c 100644
--- a/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/values/SM_OpaqueExpressionEvaluation.java
+++ b/plugins/org.eclipse.papyrus.moka.pssm/src/org/eclipse/papyrus/moka/pssm/values/SM_OpaqueExpressionEvaluation.java
@@ -28,12 +28,12 @@
import org.eclipse.papyrus.moka.fuml.structuredclassifiers.IObject_;
import org.eclipse.papyrus.moka.pscs.commonbehavior.ICS_EventOccurrence;
import org.eclipse.papyrus.moka.pscs.values.CS_OpaqueExpressionEvaluation;
-import org.eclipse.papyrus.moka.pssm.values.ISM_OpaqueExpressionEvaluation;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.OpaqueExpression;
import org.eclipse.uml2.uml.Parameter;
-public class SM_OpaqueExpressionEvaluation extends CS_OpaqueExpressionEvaluation implements ISM_OpaqueExpressionEvaluation {
+public class SM_OpaqueExpressionEvaluation extends CS_OpaqueExpressionEvaluation
+ implements ISM_OpaqueExpressionEvaluation {
// The context is basically the execution context of the state-machine.
// This provides the possibility for the behavior associated to the evaluated
@@ -42,13 +42,13 @@
// Input parameters for the execution of the behavior
protected List<IParameterValue> parameterValues;
-
+
public SM_OpaqueExpressionEvaluation() {
this.context = null;
this.parameterValues = new ArrayList<IParameterValue>();
}
-
- public void initialize(IEventOccurrence eventOccurrence){
+
+ public void initialize(IEventOccurrence eventOccurrence) {
// The event occurrence that is about or is currently dispatched can
// have data. In such situation if the behavior that is associated
// to the OpaqueExpression input conforms with the proposed signal
@@ -56,16 +56,16 @@
// then event occurrence data are passed to this behavior and used
// to produce the guard verdict.
this.parameterValues.clear();
- OpaqueExpression expression = (OpaqueExpression)this.specification;
+ OpaqueExpression expression = (OpaqueExpression) this.specification;
IEventOccurrence currentEventOccurrence = eventOccurrence;
- if(currentEventOccurrence instanceof ICS_EventOccurrence) {
- currentEventOccurrence = ((ICS_EventOccurrence)currentEventOccurrence).getWrappedEventOccurrence();
+ if (currentEventOccurrence instanceof ICS_EventOccurrence) {
+ currentEventOccurrence = ((ICS_EventOccurrence) currentEventOccurrence).getWrappedEventOccurrence();
}
- if(expression.getBehavior().getOwnedParameters().size() > 0){
+ if (expression.getBehavior().getOwnedParameters().size() > 0) {
Behavior behavior = expression.getBehavior();
- if(currentEventOccurrence instanceof SignalEventOccurrence){
+ if (currentEventOccurrence instanceof SignalEventOccurrence) {
SignalEventOccurrence signalEventOccurrence = (SignalEventOccurrence) currentEventOccurrence;
- if(behavior.inputParameters().size() == 1){
+ if (behavior.inputParameters().size() == 1) {
Parameter parameter = behavior.inputParameters().get(0);
IParameterValue parameterValue = new ParameterValue();
parameterValue.setParameter(parameter);
@@ -74,13 +74,14 @@
parameterValue.setValues(values);
this.setParameterValue(parameterValue);
}
- }else if(currentEventOccurrence instanceof ICallEventOccurrence){
+ } else if (currentEventOccurrence instanceof ICallEventOccurrence) {
ICallEventOccurrence callEventOccurrence = (ICallEventOccurrence) currentEventOccurrence;
List<Parameter> behaviorInputParameters = behavior.inputParameters();
- List<IParameterValue> inputParameterValues = callEventOccurrence.getCallEventExecution().getInputParameterValues();
- if(behaviorInputParameters.size() == inputParameterValues.size()){
+ List<IParameterValue> inputParameterValues = callEventOccurrence.getCallEventExecution()
+ .getInputParameterValues();
+ if (behaviorInputParameters.size() == inputParameterValues.size()) {
int i = 1;
- while(i <= behaviorInputParameters.size()){
+ while (i <= behaviorInputParameters.size()) {
IParameterValue parameterValue = new ParameterValue();
parameterValue.setParameter(behaviorInputParameters.get(i - 1));
parameterValue.setValues(inputParameterValues.get(i - 1).getValues());
@@ -91,44 +92,44 @@
}
}
}
-
+
@Override
public List<IValue> executeExpressionBehavior() {
// An opaque expression can have an associated behavior. If this is the case
// this behavior is executed. Values produced by the execution of the behavior
- // are the result of the evaluation of the opaque expression
+ // are the result of the evaluation of the opaque expression
List<IValue> evaluation = new ArrayList<IValue>();
- OpaqueExpression expression = (OpaqueExpression)this.specification;
+ OpaqueExpression expression = (OpaqueExpression) this.specification;
Behavior behavior = expression.getBehavior();
- if(behavior != null) {
+ if (behavior != null) {
List<IParameterValue> results = this.locus.getExecutor().execute(behavior, context, this.parameterValues);
- for(int i = 0; i < results.size(); i++) { // results.size should be 1
+ for (int i = 0; i < results.size(); i++) { // results.size should be 1
IParameterValue parameterValue = results.get(i);
List<IValue> values = parameterValue.getValues();
- for(int j = 0; j < values.size(); j++) {
+ for (int j = 0; j < values.size(); j++) {
evaluation.add(values.get(j));
}
}
}
return evaluation;
}
-
- public void setParameterValue(IParameterValue parameterValue){
+
+ public void setParameterValue(IParameterValue parameterValue) {
// If this parameter value does not exist then it is added
// to the list parameter values
- if(this.getParameterValue(parameterValue.getParameter()) == null){
+ if (this.getParameterValue(parameterValue.getParameter()) == null) {
this.parameterValues.add(parameterValue);
}
}
-
- public IParameterValue getParameterValue(Parameter parameter){
+
+ public IParameterValue getParameterValue(Parameter parameter) {
// Return the parameter value corresponding to the given parameter.
// Null is returned if no parameter value associated with the parameter
// is found.
int i = 0;
IParameterValue parameterValue = null;
- while(parameterValue == null && i < this.parameterValues.size()){
- if(this.parameterValues.get(i).getParameter() == parameter){
+ while (parameterValue == null && i < this.parameterValues.size()) {
+ if (this.parameterValues.get(i).getParameter() == parameter) {
parameterValue = this.parameterValues.get(i);
}
i++;
diff --git a/plugins/org.eclipse.papyrus.moka.trace.interfaces/.classpath b/plugins/org.eclipse.papyrus.moka.trace.interfaces/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.trace.interfaces/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.trace.interfaces/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.trace.interfaces/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.trace.interfaces/META-INF/MANIFEST.MF
index 53fc738..bae1f42 100644
--- a/plugins/org.eclipse.papyrus.moka.trace.interfaces/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.trace.interfaces/META-INF/MANIFEST.MF
@@ -4,10 +4,9 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.trace.interfaces;singleton:=true
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.trace.interfaces.Activator
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.trace.model;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.trace.model;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.eclipse.papyrus.moka.trace
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.papyrus.moka.trace.model/.classpath b/plugins/org.eclipse.papyrus.moka.trace.model/.classpath
index 79ba2e8..35ba386 100644
--- a/plugins/org.eclipse.papyrus.moka.trace.model/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.trace.model/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src-gen/"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.trace.model/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.trace.model/META-INF/MANIFEST.MF
index 9ea373b..5745363 100644
--- a/plugins/org.eclipse.papyrus.moka.trace.model/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.trace.model/META-INF/MANIFEST.MF
@@ -7,12 +7,6 @@
Bundle-ClassPath: .
Bundle-Vendor: Eclipse Modeling Project
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.papyrus.moka.trace.model.mokatraceservice,
- org.eclipse.papyrus.moka.trace.model.mokatraceservice.impl,
- org.eclipse.papyrus.moka.trace.model.mokatraceservice.util
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)",
- org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.3.0,3.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.uml2.uml.resources;bundle-version="[5.5.0,6.0.0)"
+Export-Package: org.eclipse.papyrus.moka.trace.model.mokatraceservice
+Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)";visibility:=reexport
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.papyrus.moka.trace.model/plugin.xml b/plugins/org.eclipse.papyrus.moka.trace.model/plugin.xml
index 22dd921..a8053a1 100644
--- a/plugins/org.eclipse.papyrus.moka.trace.model/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.trace.model/plugin.xml
@@ -12,7 +12,7 @@
<package
uri="http://www.eclipse.org/papyrus/moka/trace"
class="org.eclipse.papyrus.moka.trace.model.mokatraceservice.MokaTraceServicePackage"
- genModel="resources/model/fumltracemodel.genmodel"/>
+ genModel="resources/model/mokatraceservice.genmodel"/>
</extension>
<extension
point="org.eclipse.emf.ecore.uri_mapping">
diff --git a/plugins/org.eclipse.papyrus.moka.trace/.classpath b/plugins/org.eclipse.papyrus.moka.trace/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.trace/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.trace/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.trace/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.trace/META-INF/MANIFEST.MF
index c86eb07..aa3ebaa 100644
--- a/plugins/org.eclipse.papyrus.moka.trace/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.trace/META-INF/MANIFEST.MF
@@ -4,20 +4,11 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.trace;singleton:=true
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.trace.Activator
-Require-Bundle: org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
- org.eclipse.papyrus.infra.widgets;bundle-version="[3.6.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.trace.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.trace.model;bundle-version="[4.0.0,5.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
+ org.eclipse.papyrus.moka.trace.interfaces;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.fuml;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.moka.tracepoint.service;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.engine.uml.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)"
+ org.eclipse.papyrus.moka.engine.uml.debug;bundle-version="[4.0.0,5.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.eclipse.papyrus.moka.trace
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.papyrus.moka.trace/plugin.xml b/plugins/org.eclipse.papyrus.moka.trace/plugin.xml
index e7adbf1..39a9702 100644
--- a/plugins/org.eclipse.papyrus.moka.trace/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.trace/plugin.xml
@@ -9,7 +9,7 @@
class="org.eclipse.papyrus.moka.trace.service.TraceGenerationService"
description="Moka Trace Generation Service">
<context
- engineID="org.eclipse.papyrus.moka.engine.uml">
+ engineID="org.eclipse.papyrus.moka.engine.uml.debug">
</context>
<context
engineID="org.eclipse.papyrus.moka.engine.uml.time">
diff --git a/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/Activator.java b/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/Activator.java
index b0720d2..7f74af4 100644
--- a/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/Activator.java
+++ b/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/Activator.java
@@ -14,7 +14,8 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.trace;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -27,7 +28,7 @@
private static Activator plugin;
/** The log service. */
- public static LogHelper log;
+ public ILog logger;
/**
* The constructor.
@@ -51,7 +52,7 @@
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- log = new LogHelper(plugin);
+ logger = Platform.getLog(this.getClass());
}
/*
@@ -69,7 +70,7 @@
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
- log = null;
+ logger = null;
super.stop(context);
}
diff --git a/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/capture/CaptureServiceRegistry.java b/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/capture/CaptureServiceRegistry.java
index 8f44718..54b272f 100644
--- a/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/capture/CaptureServiceRegistry.java
+++ b/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/capture/CaptureServiceRegistry.java
@@ -66,7 +66,7 @@
engine.setId(engineId);
captures.put(engineId, engine);
} catch (CoreException e) {
- Activator.log.error(e);
+ Activator.getDefault().logger.error("Could not create class for "+config[i].getAttribute(CLASS_PROPERTY_NAME),e);
}
}
return captures;
diff --git a/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/formater/TraceFileFormaterRegistry.java b/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/formater/TraceFileFormaterRegistry.java
index 04977a8..37ab815 100644
--- a/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/formater/TraceFileFormaterRegistry.java
+++ b/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/formater/TraceFileFormaterRegistry.java
@@ -23,7 +23,6 @@
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.papyrus.moka.trace.Activator;
-import org.eclipse.papyrus.moka.trace.capture.MokaCaptureServiceFactory;
import org.eclipse.papyrus.moka.trace.interfaces.format.ITraceFileFormater;
public class TraceFileFormaterRegistry {
@@ -58,7 +57,8 @@
Map<String, ITraceFileFormater> formaters = new HashMap<>();
for (int i = 0; i < config.length; i++) {
try {
- ITraceFileFormater traceformater = (ITraceFileFormater) config[i].createExecutableExtension(CLASS_PROPERTY_NAME);
+ ITraceFileFormater traceformater = (ITraceFileFormater) config[i]
+ .createExecutableExtension(CLASS_PROPERTY_NAME);
String formaterName = config[i].getAttribute(NAME_PROPERTY_NAME);
traceformater.setName(formaterName);
String formaterId = config[i].getAttribute(ID_PROPERTY_NAME);
@@ -69,7 +69,7 @@
traceformater.setFileExtension(fileExtension);
formaters.put(formaterId, traceformater);
} catch (CoreException e) {
- Activator.log.error(e);
+ Activator.getDefault().logger.error("Could not create class for "+config[i].getAttribute(CLASS_PROPERTY_NAME),e);
}
}
return formaters;
diff --git a/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/service/TraceGenerationService.java b/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/service/TraceGenerationService.java
index 2f109a8..dffcc0f 100644
--- a/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/service/TraceGenerationService.java
+++ b/plugins/org.eclipse.papyrus.moka.trace/src/org/eclipse/papyrus/moka/trace/service/TraceGenerationService.java
@@ -30,8 +30,8 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.moka.engine.uml.debug.listeners.UMLSemanticVisitorExecutionListener;
import org.eclipse.papyrus.moka.fuml.loci.ISemanticVisitor;
+import org.eclipse.papyrus.moka.fuml.profiling.listeners.ISemanticVisitorExecutionListener;
import org.eclipse.papyrus.moka.kernel.assistant.Suspension;
import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
import org.eclipse.papyrus.moka.kernel.engine.IExecutionEngine;
@@ -47,7 +47,7 @@
import org.eclipse.papyrus.moka.tracepoint.service.TracepointConstants;
public class TraceGenerationService extends ExecutionEngineService<IExecutionEngine>
- implements UMLSemanticVisitorExecutionListener {
+ implements ISemanticVisitorExecutionListener {
public static final String FILE_NAME = "trace";
@@ -69,7 +69,7 @@
@Override
public void init(IExecutionEngine engine) {
super.init(engine);
- EngineConfiguration configuration = engine.getConfiguration();
+ EngineConfiguration<? extends EObject> configuration = engine.getConfiguration();
if (configuration != null && configuration.isTraceEnabled()) {
this.isTraceServiceActivate = configuration.isTraceEnabled();
this.formaters = Collections.singletonList(
@@ -102,7 +102,7 @@
}
}
} catch (CoreException e) {
- Activator.log.error(e);
+ Activator.getDefault().logger.error("Error occured while finding markers for "+root,e);
}
}
@@ -122,17 +122,17 @@
IWorkspaceRoot workspace = ResourcesPlugin.getWorkspace().getRoot();
String workspacePath = workspace.getLocation().toFile().getPath().toString();
IFile currentFile = null;
-
+
// Search a file in the workspace
try {
currentFile = workspace.getFileForLocation(new Path(workspacePath + traceDirectory));
} catch (IllegalArgumentException ex) {
// Ignore
}
- if(currentFile != null) {
+ if (currentFile != null) {
return workspacePath + traceDirectory;
}
-
+
// Search a folder in the workspace
IContainer currentFolder = null;
try {
diff --git a/plugins/org.eclipse.papyrus.moka.tracepoint.service/.classpath b/plugins/org.eclipse.papyrus.moka.tracepoint.service/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.tracepoint.service/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.tracepoint.service/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.tracepoint.service/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.tracepoint.service/META-INF/MANIFEST.MF
index 9e95610..dea7a68 100644
--- a/plugins/org.eclipse.papyrus.moka.tracepoint.service/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.tracepoint.service/META-INF/MANIFEST.MF
@@ -4,22 +4,16 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.tracepoint.service;singleton:=true
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.tracepoint.service.Activator
-Require-Bundle: org.eclipse.debug.core;bundle-version="[3.15.0,4.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.papyrus.infra.services.decoration;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
- org.eclipse.papyrus.infra.emf;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,6.0.0)",
- org.eclipse.papyrus.infra.services.markerlistener;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.papyrus.infra.ui;bundle-version="[2.1.0,4.0.0)",
- org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
+Require-Bundle: org.eclipse.papyrus.infra.services.decoration;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="[2.0.0,4.0.0)";visibility:=reexport,
org.eclipse.papyrus.moka.tracepoint.service;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)",
org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.jface;bundle-version="[3.20.0,4.0.0)";visibility:=reexport,
+ org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.papyrus.infra.widgets;bundle-version="[3.6.0,5.0.0)"
+ org.eclipse.papyrus.infra.widgets;bundle-version="[3.6.0,5.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)";visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.eclipse.papyrus.moka.tracepoint.service
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.papyrus.moka.tracepoint.service/src/org/eclipse/papyrus/moka/tracepoint/service/Activator.java b/plugins/org.eclipse.papyrus.moka.tracepoint.service/src/org/eclipse/papyrus/moka/tracepoint/service/Activator.java
index 2c4546a..7559007 100644
--- a/plugins/org.eclipse.papyrus.moka.tracepoint.service/src/org/eclipse/papyrus/moka/tracepoint/service/Activator.java
+++ b/plugins/org.eclipse.papyrus.moka.tracepoint.service/src/org/eclipse/papyrus/moka/tracepoint/service/Activator.java
@@ -15,7 +15,6 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.tracepoint.service;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -31,8 +30,6 @@
/** The plugin. */
private static Activator plugin;
- public static LogHelper log;
-
/**
* The constructor.
*/
@@ -50,7 +47,6 @@
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- log = new LogHelper(plugin);
}
/*
diff --git a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/.classpath b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/.classpath
index e801ebf..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/.classpath
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/.project b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/.project
index f88e98b..ca75d27 100644
--- a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/.project
+++ b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/.project
@@ -20,8 +20,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
diff --git a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/META-INF/MANIFEST.MF
index b5c0d8e..e2cb231 100644
--- a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/META-INF/MANIFEST.MF
@@ -8,21 +8,13 @@
Automatic-Module-Name: org.eclipse.papyrus.moka.ui.tracepoint.view
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Eclipse Modeling Project
-Require-Bundle: org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)",
+Require-Bundle: org.eclipse.gmf.runtime.common.ui;bundle-version="[1.8.0,2.0.0)",
+ org.eclipse.papyrus.infra.widgets;bundle-version="[4.0.0,5.0.0)",
org.eclipse.gef;bundle-version="[3.11.0,4.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.papyrus.infra.widgets;bundle-version="[3.6.0,5.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.17.0,4.0.0)",
- org.eclipse.papyrus.infra.services.decoration;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.papyrus.moka.tracepoint.service;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.gmf.runtime.common.ui;bundle-version="[1.8.0,2.0.0)",
- org.eclipse.debug.core;bundle-version="3.0.0",
- org.eclipse.debug.ui;bundle-version="3.0.0",
- org.eclipse.papyrus.moka.utils;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)"
+ org.eclipse.papyrus.moka.tracepoint.service;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.ui.ide;bundle-version="[3.18.0,4.0.0)";visibility:=reexport,
+ org.eclipse.debug.ui;bundle-version="[3.14.700,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.moka.utils;bundle-version="[4.1.0,5.0.0)"
Export-Package: org.eclipse.papyrus.moka.ui.tracepoint.view,
org.eclipse.papyrus.moka.ui.tracepoint.view.internal.utils;x-internal:=true
diff --git a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/build.properties b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/build.properties
index 4ba0a0c..7ed890b 100644
--- a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/build.properties
+++ b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/build.properties
@@ -1,5 +1,4 @@
source.. = src/
-output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
diff --git a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/Activator.java b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/Activator.java
index e634570..9211638 100644
--- a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/Activator.java
+++ b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/Activator.java
@@ -15,8 +15,9 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.ui.tracepoint.view;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.osgi.framework.BundleContext;
/**
@@ -32,7 +33,7 @@
/** The plugin. */
private static Activator plugin;
- public static LogHelper log;
+ public ILog logger;
/**
* The constructor.
@@ -51,7 +52,7 @@
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- log = new LogHelper(plugin);
+ logger = Platform.getLog(this.getClass());
}
/*
@@ -64,6 +65,7 @@
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
+ logger = null;
super.stop(context);
}
diff --git a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/ImportExportTPs.java b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/ImportExportTPs.java
index 975d7e7..9535813 100644
--- a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/ImportExportTPs.java
+++ b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/ImportExportTPs.java
@@ -78,9 +78,9 @@
importAction.run(new NullProgressMonitor());
}
} catch (InvocationTargetException e) {
- Activator.log.error(e);
+ Activator.getDefault().logger.error("Error occured while running import action",e);
} catch (IOException e) {
- Activator.log.error(e);
+ Activator.getDefault().logger.error("Error occured while resolving file to import",e);
}
}
@@ -116,9 +116,9 @@
exportAction.run(new NullProgressMonitor());
}
} catch (InvocationTargetException e) {
- Activator.log.error(e);
+ Activator.getDefault().logger.error("Error occured while running export action",e);
} catch (IOException e) {
- Activator.log.error(e);
+ Activator.getDefault().logger.error("Error occured while resolving file to export",e);
}
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/ImportTracepointsOperation.java b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/ImportTracepointsOperation.java
index b6757c0..65a5d22 100644
--- a/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/ImportTracepointsOperation.java
+++ b/plugins/org.eclipse.papyrus.moka.ui.tracepoint.view/src/org/eclipse/papyrus/moka/ui/tracepoint/view/ImportTracepointsOperation.java
@@ -43,7 +43,7 @@
markers = root.findMarkers(TracepointConstants.tracepointMarker, true, IResource.DEPTH_INFINITE);
}
} catch (CoreException e) {
- Activator.log.error(e);
+ Activator.getDefault().logger.error("Error occured while finding markers for "+root,e);
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.ui/.classpath b/plugins/org.eclipse.papyrus.moka.ui/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.ui/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.ui/.project b/plugins/org.eclipse.papyrus.moka.ui/.project
index 5720fc6..f01650b 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/.project
+++ b/plugins/org.eclipse.papyrus.moka.ui/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.ui/META-INF/MANIFEST.MF
index c1f6f42..b5f0fba 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.ui/META-INF/MANIFEST.MF
@@ -1,29 +1,11 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.moka.kernel;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.14.0,4.0.0)",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.4.0,5.0.0)",
- org.eclipse.papyrus.editor;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.papyrus.infra.services.validation;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.4.0,4.0.0)",
- org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.3.0,3.0.0)",
- org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
+Require-Bundle: org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.moka.kernel.debug;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.utils.ui;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.moka.kernel.animation;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
org.eclipse.papyrus.moka.ui.tracepoint.view;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.trace.interfaces;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.moka.trace;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.tracepoint.service;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.e4.ui.css.core;bundle-version="[0.12.1200,1.14.0)",
- org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)",
org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
- org.eclipse.emf.workspace;bundle-version="[1.5.0,2.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
org.eclipse.gmf.runtime.emf.commands.core;bundle-version="[1.7.0,2.0.0)",
org.eclipse.papyrus.infra.services.decoration;bundle-version="[2.0.0,4.0.0)",
org.eclipse.papyrus.infra.services.markerlistener;bundle-version="[2.0.0,4.0.0)",
@@ -32,12 +14,19 @@
org.eclipse.papyrus.infra.emf;bundle-version="[3.1.0,5.0.0)",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="[2.0.0,4.0.0)",
org.eclipse.ui.views.properties.tabbed;bundle-version="[3.8.900,4.0.0)",
- org.eclipse.core.databinding;bundle-version="[1.9.0,2.0.0)",
org.eclipse.ui.console;bundle-version="[3.9.200,4.0.0)",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.1.0,5.0.0)",
org.eclipse.papyrus.infra.emf.gmf;bundle-version="[1.3.0,3.0.0)",
org.eclipse.emf.edit.ui;bundle-version="[2.18.0,3.0.0)",
- org.eclipse.gmf.runtime.notation;bundle-version="[1.10.0,2.0.0)"
+ org.eclipse.gmf.runtime.notation;bundle-version="[1.10.0,2.0.0)",
+ org.eclipse.papyrus.moka.utils.ui;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.services.validation;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.e4.ui.css.core;bundle-version="[0.13.0,0.14.0)",
+ org.eclipse.core.databinding;bundle-version="[1.10.0,2.0.0)",
+ org.eclipse.debug.ui;bundle-version="[3.14.0,4.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.eclipse.papyrus.moka.tracepoint.service;bundle-version="[4.0.0,5.0.0)"
Export-Package: org.eclipse.papyrus.moka.launch,
org.eclipse.papyrus.moka.ui,
org.eclipse.papyrus.moka.ui.breakpoint.decoration,
diff --git a/plugins/org.eclipse.papyrus.moka.ui/plugin.xml b/plugins/org.eclipse.papyrus.moka.ui/plugin.xml
index 82290ee..e3d5e22 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/plugin.xml
+++ b/plugins/org.eclipse.papyrus.moka.ui/plugin.xml
@@ -266,8 +266,8 @@
<page
category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
class="org.eclipse.papyrus.moka.ui.preferences.PapyrusSimulationPreferencePage"
- id="org.eclipse.papyrus.moka.kernel.preferences"
- name="Simulation">
+ id="org.eclipse.papyrus.moka.ui.preferences"
+ name="Simulation (Moka)">
</page>
</extension>
<extension
@@ -345,7 +345,7 @@
point="org.eclipse.papyrus.moka.kernel.validation">
<validation>
<context
- engineID="org.eclipse.papyrus.moka.engine.uml">
+ engineID="org.eclipse.papyrus.moka.engine.uml.debug">
</context>
<context
engineID="org.eclipse.papyrus.moka.engine.uml.time">
diff --git a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/launch/ExecutionEngineLaunchDelegate.java b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/launch/ExecutionEngineLaunchDelegate.java
index e73f094..676caae 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/launch/ExecutionEngineLaunchDelegate.java
+++ b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/launch/ExecutionEngineLaunchDelegate.java
@@ -15,10 +15,6 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.launch;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MODEL_VALIDATION_ON_LAUNCH;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PATH;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PORT;
-
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -38,13 +34,14 @@
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
import org.eclipse.papyrus.moka.animation.css.MokaCSSDiagram;
-import org.eclipse.papyrus.moka.debugtarget.ExecutionEngineDebugTarget;
-import org.eclipse.papyrus.moka.kernel.IKernelPreferences;
-import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;
+import org.eclipse.papyrus.moka.debug.target.ExecutionEngineDebugTarget;
+import org.eclipse.papyrus.moka.kernel.IKernelProperties;
import org.eclipse.papyrus.moka.kernel.engine.EngineConfiguration;
import org.eclipse.papyrus.moka.kernel.engine.EngineRegistry;
import org.eclipse.papyrus.moka.kernel.process.ExecutionEngineProcess;
+import org.eclipse.papyrus.moka.kernel.process.MQTTServerConfig;
import org.eclipse.papyrus.moka.kernel.process.ServerMqttProcess;
+import org.eclipse.papyrus.moka.ui.IUIPreferences;
import org.eclipse.papyrus.moka.ui.Messages;
import org.eclipse.papyrus.moka.ui.MokaUIActivator;
import org.eclipse.papyrus.moka.ui.validation.ValidationUtil;
@@ -56,16 +53,20 @@
public class ExecutionEngineLaunchDelegate extends LaunchConfigurationDelegate implements ILaunchConfigurationDelegate {
+ public ExecutionEngineLaunchDelegate() {
+ super();
+ }
+
/**
* The project containing the model from which the execution is started
*/
protected IProject project;
-
+
/**
* The user defined engine configuration
*/
private EngineConfiguration<?> engineConfiguration;
-
+
/**
* The model set containing the model that is executed
*/
@@ -92,20 +93,19 @@
private boolean canRunServer() {
boolean canRunServer = false;
- IPreferenceStore store = MokaKernelActivator.getDefault().getPreferenceStore();
- if (store != null) {
- canRunServer = !store.getString(MQTT_SERVER_PATH).isEmpty() && store.getInt(MQTT_SERVER_PORT) > 0;
- }
+ canRunServer = !MQTTServerConfig.getMQTTServerPath().isEmpty()
+ && Integer.parseInt(MQTTServerConfig.getMQTTServerPort()) > 0;
return canRunServer;
}
- private boolean isValidationOk(EngineConfiguration<?> engineConfiguration, IProgressMonitor monitor, String engineID) {
+ private boolean isValidationOk(EngineConfiguration<?> engineConfiguration, IProgressMonitor monitor,
+ String engineID) {
// If the preference allow to run model validation before the launch, the
// validation is run. If there are errors, the system ask the user if he/she
// still wants to run the simulation.
// Return true if the simulation must continue, false otherwise
- IPreferenceStore store = MokaKernelActivator.getDefault().getPreferenceStore();
- boolean mustValidate = store.getBoolean(MODEL_VALIDATION_ON_LAUNCH);
+ IPreferenceStore store = MokaUIActivator.getDefault().getPreferenceStore();
+ boolean mustValidate = store.getBoolean(IUIPreferences.MODEL_VALIDATION_ON_LAUNCH);
boolean continueSimulation = true;
if (mustValidate) {
continueSimulation = ValidationUtil.validateModel(engineConfiguration, monitor, engineID);
@@ -131,6 +131,7 @@
if (canOpenProject(reader)) {
project = reader.getProject();
if (canInstantiateEngine(reader)) {
+ initMQTTServerConfig();
if (canRunServer()) {
SubMonitor progressMonitor = SubMonitor.convert(monitor);
IExecutionEngineLaunchConfigurationReader cr = createReader(configuration);
@@ -163,8 +164,9 @@
MokaErrorDialog dialog = new MokaErrorDialog(shell, Messages.MokaDialogError_Title,
Messages.ServerError_Title, status, Status.ERROR);
dialog.open();
- PreferencesUtil.createPreferenceDialogOn(shell, IKernelPreferences.KERNEL_PREFERENCES_ID,
- null, null).open();
+ PreferencesUtil
+ .createPreferenceDialogOn(shell, IUIPreferences.UI_PREFERENCES_ID, null, null)
+ .open();
}
});
}
@@ -197,6 +199,13 @@
return prechecks;
}
+ protected void initMQTTServerConfig() {
+ MQTTServerConfig.setMQTTServerPath(
+ MokaUIActivator.getDefault().getPreferenceStore().getString(IKernelProperties.MQTT_SERVER_PATH));
+ MQTTServerConfig.setMQTTServerPort(
+ MokaUIActivator.getDefault().getPreferenceStore().getString(IKernelProperties.MQTT_SERVER_PORT));
+ }
+
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
throws CoreException {
SubMonitor progressMonitor = SubMonitor.convert(monitor);
@@ -276,7 +285,7 @@
}
protected final ExecutionEngineProcess initializeExecutionProcess(ILaunch l,
- IExecutionEngineLaunchConfigurationReader cr, EngineConfiguration<?> ec) {
+ IExecutionEngineLaunchConfigurationReader cr, EngineConfiguration<? extends EObject> ec) {
ExecutionEngineProcess process = new ExecutionEngineProcess(l, cr.getEngine(), ec);
ExecutionEngineDebugTarget debugTarget = new ExecutionEngineDebugTarget(l, process);
l.addProcess(process);
diff --git a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/IUIPreferences.java b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/IUIPreferences.java
new file mode 100644
index 0000000..08973a4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/IUIPreferences.java
@@ -0,0 +1,9 @@
+package org.eclipse.papyrus.moka.ui;
+
+public interface IUIPreferences {
+
+ final static String UI_PREFERENCES_ID = "org.eclipse.papyrus.moka.ui.preferences";
+
+ final static String MODEL_VALIDATION_ON_LAUNCH = "MODEL_VALIDATION_ON_LAUNCH";
+
+}
diff --git a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/breakpoint/commands/ToggleBreakpointActivationCommand.java b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/breakpoint/commands/ToggleBreakpointActivationCommand.java
index 5b85e5b..5daf677 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/breakpoint/commands/ToggleBreakpointActivationCommand.java
+++ b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/breakpoint/commands/ToggleBreakpointActivationCommand.java
@@ -24,6 +24,7 @@
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
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.emf.transaction.util.TransactionUtil;
@@ -53,8 +54,9 @@
IBreakpoint alreadyDefinedBreakpoint = null;
for (int i = 0; i < breakpoints.length && alreadyDefinedBreakpoint == null; i++) {
MokaBreakpoint breakpoint = (MokaBreakpoint) breakpoints[i];
- EObject eObjectOfBreakpoint = breakpoint.getModelElement();
- if (eObjectOfBreakpoint != null && EcoreUtil.getURI(eObjectOfBreakpoint).toString().equals(selectedElementURI)) {
+ URI uriOfEObjectOfBreakpoint = breakpoint.getModelElementURI();
+ if (uriOfEObjectOfBreakpoint != null
+ && uriOfEObjectOfBreakpoint.toString().equals(selectedElementURI)) {
alreadyDefinedBreakpoint = breakpoint;
}
}
diff --git a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/breakpoint/commands/ToggleBreakpointCommand.java b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/breakpoint/commands/ToggleBreakpointCommand.java
index ada7b97..407cf1c 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/breakpoint/commands/ToggleBreakpointCommand.java
+++ b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/breakpoint/commands/ToggleBreakpointCommand.java
@@ -31,6 +31,7 @@
import org.eclipse.papyrus.infra.core.Activator;
import org.eclipse.papyrus.moka.debug.breakpoint.MokaBreakpoint;
import org.eclipse.papyrus.moka.utils.constants.MokaConstants;
+import org.eclipse.uml2.uml.NamedElement;
/**
* Command to toggle a breakpoint
@@ -67,8 +68,12 @@
if (alreadyDefinedBreakpoint != null) {
breakpointManager.removeBreakpoint(alreadyDefinedBreakpoint, true);
} else {
+ String label = "";
+ if (this.selectedElement instanceof NamedElement) {
+ label = ((NamedElement) selectedElement).getQualifiedName();
+ }
MokaBreakpoint breakpoint = new MokaBreakpoint();
- breakpoint.toggleBreakpoint(selectedElement);
+ breakpoint.toggleBreakpoint(selectedElement, label);
breakpointManager.addBreakpoint(breakpoint);
}
} catch (CoreException e) {
diff --git a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/launch/MokaProjectSelection.java b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/launch/MokaProjectSelection.java
index bf8e326..55cea81 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/launch/MokaProjectSelection.java
+++ b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/launch/MokaProjectSelection.java
@@ -57,7 +57,7 @@
dialog.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
if (this.currentSelection != null && this.currentSelection.exists()) {
- dialog.setInitialSelections(new IFile[] { this.currentSelection });
+ dialog.setInitialSelections(new Object[] { this.currentSelection });
}
dialog.open();
diff --git a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/preferences/PapyrusSimulationPreferencePage.java b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/preferences/PapyrusSimulationPreferencePage.java
index b5077a5..d3d5931 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/preferences/PapyrusSimulationPreferencePage.java
+++ b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/preferences/PapyrusSimulationPreferencePage.java
@@ -15,16 +15,14 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.ui.preferences;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MODEL_VALIDATION_ON_LAUNCH;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PATH;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MQTT_SERVER_PORT;
-
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.FileFieldEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;
+import org.eclipse.papyrus.moka.kernel.IKernelProperties;
+import org.eclipse.papyrus.moka.ui.IUIPreferences;
+import org.eclipse.papyrus.moka.ui.MokaUIActivator;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
@@ -43,26 +41,27 @@
}
public void init(IWorkbench workbench) {
- IPreferenceStore store = MokaKernelActivator.getDefault().getPreferenceStore();
+ IPreferenceStore store = MokaUIActivator.getDefault().getPreferenceStore();
setPreferenceStore(store);
setDescription(DESCRIPTION);
}
@Override
protected void createFieldEditors() {
- FileFieldEditor serverPathEditor = new FileFieldEditor(MQTT_SERVER_PATH, SERVER_PATH_LABEL,
+ FileFieldEditor serverPathEditor = new FileFieldEditor(IKernelProperties.MQTT_SERVER_PATH, SERVER_PATH_LABEL,
getFieldEditorParent());
serverPathEditor.setEmptyStringAllowed(false);
serverPathEditor.setErrorMessage("Invalid path to the server");
+
addField(serverPathEditor);
- IntegerFieldEditor portFieldEditor = new IntegerFieldEditor(MQTT_SERVER_PORT, SERVER_PORT_LABEL,
- getFieldEditorParent());
+ IntegerFieldEditor portFieldEditor = new IntegerFieldEditor(IKernelProperties.MQTT_SERVER_PORT,
+ SERVER_PORT_LABEL, getFieldEditorParent());
portFieldEditor.setValidRange(0, 65536);
portFieldEditor.setErrorMessage("Invalid port");
+
addField(portFieldEditor);
- BooleanFieldEditor validationOnLaunch = new BooleanFieldEditor(MODEL_VALIDATION_ON_LAUNCH,
+ BooleanFieldEditor validationOnLaunch = new BooleanFieldEditor(IUIPreferences.MODEL_VALIDATION_ON_LAUNCH,
MODEL_VALIDATION_ON_LAUNCH_LABEL, getFieldEditorParent());
addField(validationOnLaunch);
}
-
}
diff --git a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/validation/ValidationDiagnosticDialog.java b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/validation/ValidationDiagnosticDialog.java
index 7c138c0..b2d61e4 100644
--- a/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/validation/ValidationDiagnosticDialog.java
+++ b/plugins/org.eclipse.papyrus.moka.ui/src/org/eclipse/papyrus/moka/ui/validation/ValidationDiagnosticDialog.java
@@ -15,13 +15,12 @@
*****************************************************************************/
package org.eclipse.papyrus.moka.ui.validation;
-import static org.eclipse.papyrus.moka.kernel.process.IServerMqttPreferences.MODEL_VALIDATION_ON_LAUNCH;
-
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.services.markerlistener.dialogs.DiagnosticDialog;
-import org.eclipse.papyrus.moka.kernel.MokaKernelActivator;
+import org.eclipse.papyrus.moka.ui.IUIPreferences;
+import org.eclipse.papyrus.moka.ui.MokaUIActivator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@ -71,7 +70,7 @@
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
-
+
});
}
return control;
@@ -80,8 +79,8 @@
@Override
protected void buttonPressed(int id) {
if (id == IDialogConstants.OK_ID || id == IDialogConstants.CANCEL_ID) {
- IPreferenceStore store = MokaKernelActivator.getDefault().getPreferenceStore();
- store.setValue(MODEL_VALIDATION_ON_LAUNCH, !dontValidateAnymoreBeforeLaunchButton);
+ IPreferenceStore store = MokaUIActivator.getDefault().getPreferenceStore();
+ store.setValue(IUIPreferences.MODEL_VALIDATION_ON_LAUNCH, !dontValidateAnymoreBeforeLaunchButton);
try {
((ScopedPreferenceStore) store).save();
} catch (Exception e) {
diff --git a/plugins/org.eclipse.papyrus.moka.utils.ui/.classpath b/plugins/org.eclipse.papyrus.moka.utils.ui/.classpath
index 1db08c6..685a699 100644
--- a/plugins/org.eclipse.papyrus.moka.utils.ui/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.utils.ui/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.utils.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.utils.ui/META-INF/MANIFEST.MF
index 52be022..1ee79f4 100644
--- a/plugins/org.eclipse.papyrus.moka.utils.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.utils.ui/META-INF/MANIFEST.MF
@@ -4,18 +4,17 @@
Bundle-SymbolicName: org.eclipse.papyrus.moka.utils.ui
Bundle-Version: 4.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Require-Bundle: org.eclipse.papyrus.infra.ui;bundle-version="[2.1.0,4.0.0)",
- org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.swt;bundle-version="[3.114.100,4.0.0)",
+Require-Bundle: org.eclipse.papyrus.infra.ui;bundle-version="[3.0.0,4.0.0)",
org.eclipse.ui.workbench;bundle-version="[3.119.0,4.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.17.0,4.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[3.1.0,5.0.0)";visibility:=reexport,
+ org.eclipse.ui.ide;bundle-version="[3.17.0,4.0.0)";visibility:=reexport,
org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)",
- org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.20.0,4.0.0)",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="[2.0.0,4.0.0)"
+ org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)";visibility:=reexport,
+ org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)";visibility:=reexport,
+ org.eclipse.jface;bundle-version="[3.20.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="[2.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.moka.utils;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)"
Export-Package: org.eclipse.papyrus.moka.utils.helper,
org.eclipse.papyrus.moka.utils.helper.presentation
Automatic-Module-Name: org.eclipse.papyrus.moka.utils.ui
diff --git a/plugins/org.eclipse.papyrus.moka.utils/.classpath b/plugins/org.eclipse.papyrus.moka.utils/.classpath
index bc57d23..96d2680 100644
--- a/plugins/org.eclipse.papyrus.moka.utils/.classpath
+++ b/plugins/org.eclipse.papyrus.moka.utils/.classpath
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.papyrus.moka.utils/.project b/plugins/org.eclipse.papyrus.moka.utils/.project
index fdcde65..aff54a1 100644
--- a/plugins/org.eclipse.papyrus.moka.utils/.project
+++ b/plugins/org.eclipse.papyrus.moka.utils/.project
@@ -21,11 +21,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -35,6 +30,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.moka.utils/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.moka.utils/META-INF/MANIFEST.MF
index 5802994..934d473 100644
--- a/plugins/org.eclipse.papyrus.moka.utils/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.papyrus.moka.utils/META-INF/MANIFEST.MF
@@ -5,10 +5,8 @@
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.moka.utils.Activator
Bundle-Vendor: Eclipse Modeling Project
-Require-Bundle: org.eclipse.papyrus.moka.fuml.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)"
+Require-Bundle: org.eclipse.papyrus.moka.pssm.interfaces;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.moka.utils,
diff --git a/plugins/pom.xml b/plugins/pom.xml
index db5b2e1..bc90540 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -1,25 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
+
<!-- Parent POM (i.e., root POM of Moka project) -->
<parent>
<groupId>org.eclipse.papyrus.moka</groupId>
<artifactId>org.eclipse.papyrus.moka.root</artifactId>
<version>4.1.0-SNAPSHOT</version>
</parent>
-
+
<!-- POM Description -->
<artifactId>org.eclipse.papyrus.moka.plugins</artifactId>
<packaging>pom</packaging>
<name>Moka Plugins</name>
-
+
<!-- Modules to build -->
<modules>
+ <module>org.eclipse.papyrus.moka.engine.schedulable</module>
<module>org.eclipse.papyrus.moka.engine.uml</module>
<module>org.eclipse.papyrus.moka.engine.uml.animation</module>
<module>org.eclipse.papyrus.moka.engine.uml.debug</module>
+ <module>org.eclipse.papyrus.moka.engine.uml.debug.ui</module>
<module>org.eclipse.papyrus.moka.engine.uml.scheduling</module>
<module>org.eclipse.papyrus.moka.engine.uml.time</module>
<module>org.eclipse.papyrus.moka.engine.uml.time.interfaces</module>
@@ -27,7 +30,9 @@
<module>org.eclipse.papyrus.moka.fuml</module>
<module>org.eclipse.papyrus.moka.fuml.assertionlibrary</module>
<module>org.eclipse.papyrus.moka.fuml.interfaces</module>
+ <module>org.eclipse.papyrus.moka.fuml.library</module>
<module>org.eclipse.papyrus.moka.fuml.standardlibrary</module>
+ <module>org.eclipse.papyrus.moka.fuml.standardlibrary.ui</module>
<module>org.eclipse.papyrus.moka.fuml.validation</module>
<module>org.eclipse.papyrus.moka.kernel</module>
<module>org.eclipse.papyrus.moka.kernel.animation</module>
@@ -49,6 +54,7 @@
<module>org.eclipse.papyrus.moka.ui.tracepoint.view</module>
<module>org.eclipse.papyrus.moka.utils</module>
<module>org.eclipse.papyrus.moka.utils.ui</module>
+
</modules>
-
+
</project>
diff --git a/releng/org.eclipse.papyrus.moka.targetplatform/org.eclipse.papyrus.moka.targetplatform.target b/releng/org.eclipse.papyrus.moka.targetplatform/org.eclipse.papyrus.moka.targetplatform.target
index dad2fc1..f29adc7 100644
--- a/releng/org.eclipse.papyrus.moka.targetplatform/org.eclipse.papyrus.moka.targetplatform.target
+++ b/releng/org.eclipse.papyrus.moka.targetplatform/org.eclipse.papyrus.moka.targetplatform.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="Moka Target Platform" sequenceNumber="1604930062">
+<target name="Moka Target Platform" sequenceNumber="1605541058">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>