Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -313,42 +313,47 @@ public final void start() {

@Override
public void run() {
try {
notifyEngineAboutToStart();
Activator.getDefault().gemocRunningEngineRegistry.registerEngine(getName(), AbstractExecutionEngine.this);
setEngineStatus(EngineStatus.RunStatus.Running);
beforeStart();
notifyEngineStarted();
try {
performStart();
} finally {
// We always try to commit the last remaining
// transaction
commitCurrentTransaction();
}

} catch (EngineStoppedException stopException) {
// not really an error, simply print the stop exception
// message
Activator.getDefault().info("Engine stopped by the user : " + stopException.getMessage());

} catch (Throwable e) {
error = e;
e.printStackTrace();
Activator.getDefault().error("Exception received " + e.getMessage() + ", stopping engine.", e);
} finally {
// make sure to notify the stop if this wasn't an
// external call to stop() that lead us here.
// ie. normal end of the mode execution
stop();
Activator.getDefault().info("*** " + AbstractExecutionEngine.this.getName() + " stopped ***");
}
startSynchronous();
}
};
thread = new Thread(r, engineKindName() + " " + _executionContext.getRunConfiguration().getExecutedModelURI());
thread.start();
}
}

@Override
public final void startSynchronous() {
try {
notifyEngineAboutToStart();
Activator.getDefault().gemocRunningEngineRegistry.registerEngine(getName(), AbstractExecutionEngine.this);
setEngineStatus(EngineStatus.RunStatus.Running);
beforeStart();
notifyEngineStarted();
try {
performStart();
} finally {
// We always try to commit the last remaining
// transaction
commitCurrentTransaction();
}

} catch (EngineStoppedException stopException) {
// not really an error, simply print the stop exception
// message
Activator.getDefault().info("Engine stopped by the user : " + stopException.getMessage());

} catch (Throwable e) {
error = e;
e.printStackTrace();
Activator.getDefault().error("Exception received " + e.getMessage() + ", stopping engine.", e);
} finally {
// make sure to notify the stop if this wasn't an
// external call to stop() that lead us here.
// ie. normal end of the mode execution
stop();
Activator.getDefault().info("*** " + AbstractExecutionEngine.this.getName() + " stopped ***");
}
}

@Override
public final void stop() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,6 @@ default LaunchConfiguration extractLaunchConfiguration() {
* @return a display name to identify this engine
*/
String getName();

void startSynchronous();
}