Skip to content

Commit 3cf218c

Browse files
committed
Added trace explorer generation and disabled trace manager generation
1 parent f67278b commit 3cf218c

File tree

24 files changed

+1630
-464
lines changed

24 files changed

+1630
-464
lines changed

framework/execution_framework/plugins/org.gemoc.executionframework.engine.ui/src/org/gemoc/executionframework/engine/ui/debug/AbstractGemocDebugger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ public void updateData(String threadName, EObject instruction) {
401401
}
402402

403403
protected void scheduleSelectLastStackframe(long delay) {
404-
executorService.schedule(() -> selectLastStackframe(), 500, TimeUnit.MILLISECONDS);
404+
executorService.schedule(() -> selectLastStackframe(), delay, TimeUnit.MILLISECONDS);
405405
}
406406

407407
private <T> List<T> flatten(List<T> ts, Function<T, List<T>> provider) {

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

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.gemoc.executionframework.engine.mse.Step;
4040
import org.gemoc.xdsmlframework.api.core.IExecutionContext;
4141
import org.gemoc.xdsmlframework.api.core.ISequentialExecutionEngine;
42+
4243
import fr.inria.diverse.trace.gemoc.api.IMultiDimensionalTraceAddon;
4344

4445
public abstract class AbstractSequentialExecutionEngine extends AbstractExecutionEngine implements ISequentialExecutionEngine {
@@ -53,9 +54,9 @@ public abstract class AbstractSequentialExecutionEngine extends AbstractExecutio
5354
abstract protected void executeEntryPoint();
5455

5556
abstract protected void initializeModel();
56-
57+
5758
abstract protected void prepareEntryPoint(IExecutionContext executionContext);
58-
59+
5960
abstract protected void prepareInitializeModel(IExecutionContext executionContext);
6061

6162
@Override
@@ -65,10 +66,10 @@ public final void initialize(IExecutionContext executionContext) {
6566
Set<IMultiDimensionalTraceAddon> traceManagers = this.getAddonsTypedBy(IMultiDimensionalTraceAddon.class);
6667
if (!traceManagers.isEmpty())
6768
this.traceAddon = traceManagers.iterator().next();
68-
69+
6970
prepareEntryPoint(executionContext);
7071
prepareInitializeModel(executionContext);
71-
72+
7273
_runnable = new Runnable() {
7374
@Override
7475
public void run() {
@@ -82,12 +83,13 @@ public void run() {
8283
}
8384
}
8485
};
85-
86+
8687
}
8788

8889
private void cleanCurrentTransactionCommand() {
89-
if (this.currentTransaction.getCommand() != null)
90-
this.currentTransaction.getCommand().dispose();
90+
assert currentTransaction != null;
91+
if (currentTransaction.getCommand() != null)
92+
currentTransaction.getCommand().dispose();
9193
}
9294

9395
@Override
@@ -120,32 +122,6 @@ protected final Runnable getRunnable() {
120122
return _runnable;
121123
}
122124

123-
// private void notifyMSEOccurenceExecuted(MSEOccurrence occurrence) {
124-
// for (IEngineAddon addon : getExecutionContext().getExecutionPlatform().getEngineAddons()) {
125-
// try {
126-
// addon.mseOccurrenceExecuted(this, occurrence);
127-
// } catch (EngineStoppedException ese) {
128-
// Activator.getDefault().info("Addon has received stop command (" + addon + "), " + ese.getMessage(), ese);
129-
// stop();
130-
// } catch (Exception e) {
131-
// Activator.getDefault().error("Exception in Addon (" + addon + "), " + e.getMessage(), e);
132-
// }
133-
// }
134-
// }
135-
136-
// private void notifyMSEOccurrenceAboutToStart(MSEOccurrence occurrence) {
137-
// for (IEngineAddon addon : getExecutionContext().getExecutionPlatform().getEngineAddons()) {
138-
// try {
139-
// addon.aboutToExecuteMSEOccurrence(this, occurrence);
140-
// } catch (EngineStoppedException ese) {
141-
// Activator.getDefault().info("Addon has received stop command (" + addon + "), " + ese.getMessage(), ese);
142-
// stop();
143-
// } catch (Exception e) {
144-
// Activator.getDefault().error("Exception in Addon (" + addon + "), " + e.getMessage(), e);
145-
// }
146-
// }
147-
// }
148-
149125
private EMFCommandTransaction createTransaction(InternalTransactionalEditingDomain editingDomain, RecordingCommand command) {
150126
return new EMFCommandTransaction(command, editingDomain, null);
151127
}
@@ -182,7 +158,7 @@ private void startNewTransaction(InternalTransactionalEditingDomain editingDomai
182158
throw enclosingException;
183159
}
184160
}
185-
161+
186162
private Step createStep(EObject caller, String className, String methodName) {
187163
MSE mse = findOrCreateMSE(caller, className, methodName);
188164
Step result;

framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionAuthority.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public class DebugPermissionAuthority extends AbstractPermissionAuthority
2525
implements IExecutionCheckpoint {
2626

2727
/**
28-
* Strictly positive if allowed.
29-
* FIXME we use a map here because of https://support.jira.obeo.fr/browse/VP-2710
28+
* Strictly positive if allowed. FIXME we use a map here because of
29+
* https://support.jira.obeo.fr/browse/VP-2710
3030
*/
3131
private static final Map<ResourceSet, Integer> allow = new HashMap<ResourceSet, Integer>();
3232

framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugPermissionProvider.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ public class DebugPermissionProvider implements IPermissionProvider {
2424
@Override
2525
public boolean provides(ResourceSet set) {
2626
final boolean res;
27-
28-
if (set !=null
29-
&& set.getURIConverter() != null) {
27+
28+
if (set != null && set.getURIConverter() != null) {
3029
URIConverter converter = set.getURIConverter();
3130
if (converter.getURIHandlers().size() > 0) {
3231
res = converter.getURIHandlers().get(0) instanceof DebugURIHandler;
@@ -36,15 +35,16 @@ public boolean provides(ResourceSet set) {
3635
} else {
3736
res = false;
3837
}
39-
38+
4039
return res;
4140
}
4241

4342
@Override
4443
public IPermissionAuthority getAuthority(final ResourceSet set) {
4544
final DebugPermissionAuthority res;
4645

47-
final DebugPermissionAuthority existing = (DebugPermissionAuthority) IExecutionCheckpoint.CHECKPOINTS.get(set);
46+
final DebugPermissionAuthority existing = (DebugPermissionAuthority) IExecutionCheckpoint.CHECKPOINTS
47+
.get(set);
4848

4949
if (existing != null) {
5050
res = existing;
@@ -56,7 +56,6 @@ public IPermissionAuthority getAuthority(final ResourceSet set) {
5656
.getResources().get(0));
5757
if (session != null) {
5858
session.addListener(new SessionListener() {
59-
6059
@Override
6160
public void notify(int changeKind) {
6261
if (changeKind == SessionListener.CLOSED) {

framework/execution_framework/plugins/org.gemoc.executionframework.extensions.sirius/src/org/gemoc/executionframework/extensions/sirius/modelloader/DebugURIHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public boolean canHandle(URI uri) {
3434
}
3535

3636
@Override
37-
public OutputStream createOutputStream(URI uri, Map<?, ?> options) throws IOException {
37+
public OutputStream createOutputStream(URI uri, Map<?, ?> options)
38+
throws IOException {
3839
final OutputStream res = new OutputStream() {
3940

4041
@Override

0 commit comments

Comments
 (0)