Skip to content

Commit f9a5b79

Browse files
committed
Reworked metamodel and continued the tooling implementation
1 parent 04909c2 commit f9a5b79

File tree

129 files changed

+4416
-1633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+4416
-1633
lines changed

framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,20 @@
3636

3737
import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.EventManagerRegistry;
3838
import fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IEventManager;
39+
import fr.inria.diverse.trace.commons.model.trace.BigStep;
3940
import fr.inria.diverse.trace.commons.model.trace.GenericMSE;
41+
import fr.inria.diverse.trace.commons.model.trace.GenericSequentialStep;
4042
import fr.inria.diverse.trace.commons.model.trace.MSE;
4143
import fr.inria.diverse.trace.commons.model.trace.MSEModel;
4244
import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence;
43-
import fr.inria.diverse.trace.commons.model.trace.SequentialStep;
4445
import fr.inria.diverse.trace.commons.model.trace.Step;
4546
import fr.inria.diverse.trace.commons.model.trace.TraceFactory;
4647
import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon;
4748

4849
public abstract class AbstractSequentialExecutionEngine extends AbstractExecutionEngine implements IExecutionEngine {
4950

5051
private MSEModel _actionModel;
51-
private IMultiDimensionalTraceAddon traceAddon;
52+
private IMultiDimensionalTraceAddon<?,?,?,?,?> traceAddon;
5253

5354
abstract protected void executeEntryPoint();
5455

@@ -60,6 +61,7 @@ public abstract class AbstractSequentialExecutionEngine extends AbstractExecutio
6061

6162
@Override
6263
public final void performInitialize(IExecutionContext executionContext) {
64+
@SuppressWarnings("rawtypes")
6365
Set<IMultiDimensionalTraceAddon> traceManagers = this.getAddonsTypedBy(IMultiDimensionalTraceAddon.class);
6466
if (!traceManagers.isEmpty())
6567
this.traceAddon = traceManagers.iterator().next();
@@ -79,7 +81,7 @@ private void manageEvents() {
7981
MSEOccurrence mse = getCurrentMSEOccurrence();
8082
if (mse != null) {
8183
EObject container = mse.eContainer();
82-
if (container instanceof SequentialStep<?>) {
84+
if (container instanceof BigStep<?,?>) {
8385
IEventManager eventManager = EventManagerRegistry.getInstance().findEventManager();
8486
if (eventManager != null) {
8587
eventManager.manageEvents();
@@ -118,21 +120,21 @@ protected void doExecute() {
118120
protected final void beforeExecutionStep(Object caller, String className, String operationName, RecordingCommand rc) {
119121
if (caller != null && caller instanceof EObject && editingDomain != null) {
120122
// Call expected to be done from an EMF model, hence EObjects
121-
EObject caller_cast = (EObject) caller;
123+
EObject callerCast = (EObject) caller;
122124
// We create a step
123-
Step step = createStep(caller_cast, className, operationName);
125+
Step<?> step = createStep(callerCast, className, operationName);
124126

125127
manageEvents();
126128

127129
beforeExecutionStep(step, rc);
128130
}
129131
}
130132

131-
private Step createStep(EObject caller, String className, String methodName) {
133+
private Step<?> createStep(EObject caller, String className, String methodName) {
132134
MSE mse = findOrCreateMSE(caller, className, methodName);
133-
Step result;
135+
Step<?> result;
134136
if (traceAddon == null) {
135-
SequentialStep<Step> step = TraceFactory.eINSTANCE.createGenericSequentialStep();
137+
GenericSequentialStep step = TraceFactory.eINSTANCE.createGenericSequentialStep();
136138
MSEOccurrence occurrence = null;
137139
occurrence = TraceFactory.eINSTANCE.createMSEOccurrence();
138140
step.setMseoccurrence(occurrence);

framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/DefaultEngineAddon.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ public void aboutToSelectStep(IExecutionEngine engine, Collection<Step> steps) {
3434
}
3535

3636
@Override
37-
public void stepSelected(IExecutionEngine engine, Step selectedStep) {
37+
public void stepSelected(IExecutionEngine engine, Step<?> selectedStep) {
3838
}
3939

4040
@Override
4141
public void engineStopped(IExecutionEngine engine) {
4242
}
4343

4444
@Override
45-
public void aboutToExecuteStep(IExecutionEngine executionEngine, Step stepToApply) {
45+
public void aboutToExecuteStep(IExecutionEngine executionEngine, Step<?> stepToApply) {
4646
}
4747

4848
@Override
@@ -54,7 +54,7 @@ public void engineAboutToStop(IExecutionEngine engine) {
5454
}
5555

5656
@Override
57-
public void stepExecuted(IExecutionEngine engine, Step stepExecuted) {
57+
public void stepExecuted(IExecutionEngine engine, Step<?> stepExecuted) {
5858
}
5959

6060
@Override

framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/IEngineAddon.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ default public void engineInitialized(IExecutionEngine executionEngine) {
5959
* Operation called after the Step has been chosen It also returns the
6060
* chosen Step
6161
*/
62-
public void stepSelected(IExecutionEngine engine, Step selectedStep);
62+
public void stepSelected(IExecutionEngine engine, Step<?> selectedStep);
6363

64-
public void aboutToExecuteStep(IExecutionEngine engine, Step stepToExecute);
64+
public void aboutToExecuteStep(IExecutionEngine engine, Step<?> stepToExecute);
6565

66-
public void stepExecuted(IExecutionEngine engine, Step stepExecuted);
66+
public void stepExecuted(IExecutionEngine engine, Step<?> stepExecuted);
6767

6868
public void engineStatusChanged(IExecutionEngine engine, RunStatus newStatus);
6969

framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/BatchModelChangeListener.xtend

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2016 Inria and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* Inria - initial API and implementation
10+
*******************************************************************************/
111
package org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener;
212

313
import java.util.ArrayList

framework/framework_commons/plugins/org.gemoc.xdsmlframework.api/src/org/gemoc/xdsmlframework/api/engine_addon/modelchangelistener/ModelChange.xtend

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2016 Inria and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* Inria - initial API and implementation
10+
*******************************************************************************/
111
package org.gemoc.xdsmlframework.api.engine_addon.modelchangelistener
212

313
import org.eclipse.emf.ecore.EObject

java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/.project

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,10 @@
2525
<arguments>
2626
</arguments>
2727
</buildCommand>
28-
<buildCommand>
29-
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
30-
<arguments>
31-
</arguments>
32-
</buildCommand>
3328
</buildSpec>
3429
<natures>
3530
<nature>org.eclipse.jdt.core.javanature</nature>
3631
<nature>org.eclipse.pde.PluginNature</nature>
3732
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
38-
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
3933
</natures>
4034
</projectDescription>

java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/GenericSequentialModelDebugger.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,9 @@ public void updateData(String threadName, EObject instruction) {
206206
return;
207207
}
208208

209-
// We don't want to deal with logical steps since we are in sequential
210-
// mode
211-
if (instruction instanceof Step) {
212-
instruction = ((Step) instruction).getMseoccurrence().getMse().getCaller();
209+
// We don't want to deal with logical steps since we are in sequential mode
210+
if (instruction instanceof Step<?>) {
211+
instruction = ((Step<?>) instruction).getMseoccurrence().getMse().getCaller();
213212
} else if (instruction instanceof MSEOccurrence) {
214213
instruction = ((MSEOccurrence) instruction).getMse().getCaller();
215214
}
@@ -293,7 +292,7 @@ public void engineStopped(IExecutionEngine engine) {
293292
}
294293

295294
@Override
296-
public void aboutToExecuteStep(IExecutionEngine executionEngine, Step step) {
295+
public void aboutToExecuteStep(IExecutionEngine executionEngine, Step<?> step) {
297296
MSEOccurrence mseOccurrence = step.getMseoccurrence();
298297
if (mseOccurrence != null) {
299298
ToPushPop stackModification = new ToPushPop(mseOccurrence, true);
@@ -305,7 +304,7 @@ public void aboutToExecuteStep(IExecutionEngine executionEngine, Step step) {
305304
}
306305

307306
@Override
308-
public void stepExecuted(IExecutionEngine engine, Step step) {
307+
public void stepExecuted(IExecutionEngine engine, Step<?> step) {
309308
MSEOccurrence mseOccurrence = step.getMseoccurrence();
310309
if (mseOccurrence != null) {
311310
ToPushPop stackModification = new ToPushPop(mseOccurrence, false);

java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/OmniscientGenericSequentialModelDebugger.xtend

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@
1010
*******************************************************************************/
1111
package org.gemoc.execution.sequential.javaengine.ui.debug;
1212

13+
import fr.inria.diverse.trace.commons.model.trace.Dimension
1314
import fr.inria.diverse.trace.commons.model.trace.MSE
1415
import fr.inria.diverse.trace.commons.model.trace.MSEOccurrence
16+
import fr.inria.diverse.trace.commons.model.trace.State
1517
import fr.inria.diverse.trace.commons.model.trace.Step
18+
import fr.inria.diverse.trace.commons.model.trace.TracedObject
19+
import fr.inria.diverse.trace.commons.model.trace.Value
1620
import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon
1721
import fr.inria.diverse.trace.gemoc.api.ITraceExplorer
22+
import fr.inria.diverse.trace.gemoc.api.ITraceViewListener
1823
import fr.obeo.dsl.debug.ide.event.IDSLDebugEventProcessor
1924
import java.util.ArrayList
2025
import java.util.List
@@ -27,30 +32,29 @@ import org.eclipse.xtext.naming.QualifiedName
2732
import org.gemoc.execution.sequential.javaengine.ui.Activator
2833
import org.gemoc.executionframework.engine.core.EngineStoppedException
2934
import org.gemoc.xdsmlframework.api.core.IExecutionEngine
30-
import fr.inria.diverse.trace.gemoc.api.ITraceViewListener
3135

3236
public class OmniscientGenericSequentialModelDebugger extends GenericSequentialModelDebugger implements ITraceViewListener {
3337

34-
private var ITraceExplorer traceExplorer
38+
private var ITraceExplorer<Step<?>, State<?,?>, TracedObject<?>, Dimension<?>, Value<?>> traceExplorer
3539

3640
private var steppingOverStackFrameIndex = -1
3741

3842
private var steppingReturnStackFrameIndex = -1
3943

4044
private val List<EObject> callerStack = new ArrayList
4145

42-
private val List<Step> previousCallStack = new ArrayList
46+
private val List<Step<?>> previousCallStack = new ArrayList
4347

4448
new(IDSLDebugEventProcessor target, IExecutionEngine engine) {
4549
super(target, engine)
4650
}
4751

48-
def private MSE getMSEFromStep(Step step) {
52+
def private MSE getMSEFromStep(Step<?> step) {
4953
val mseOccurrence = step.mseoccurrence
5054
if (mseOccurrence == null) {
5155
val container = step.eContainer
52-
if (container instanceof Step) {
53-
val parentStep = container as Step
56+
if (container instanceof Step<?>) {
57+
val parentStep = container as Step<?>
5458
val parentMseOccurrence = parentStep.mseoccurrence
5559
if (parentMseOccurrence == null) {
5660
throw new IllegalStateException("A step without MSEOccurrence cannot be contained in a step without MSEOccurrence")
@@ -65,7 +69,7 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM
6569
}
6670
}
6771

68-
def private void pushStackFrame(String threadName, Step step) {
72+
def private void pushStackFrame(String threadName, Step<?> step) {
6973
var MSE mse = getMSEFromStep(step)
7074
var EObject caller = mse.caller
7175
val QualifiedName qname = nameprovider.getFullyQualifiedName(caller)
@@ -82,7 +86,7 @@ public class OmniscientGenericSequentialModelDebugger extends GenericSequentialM
8286
callerStack.remove(0)
8387
}
8488

85-
override void aboutToExecuteStep(IExecutionEngine executionEngine, Step step) {
89+
override void aboutToExecuteStep(IExecutionEngine executionEngine, Step<?> step) {
8690
val mseOccurrence = step.mseoccurrence
8791
if (mseOccurrence != null) {
8892
if (!control(threadName, mseOccurrence)) {

0 commit comments

Comments
 (0)