use of org.yakindu.sct.simulation.core.engine.ISimulationEngine in project statecharts by Yakindu.
the class SCTSourceDisplayDispatcher method displaySource.
public void displaySource(Object element, IWorkbenchPage page, boolean forceSourceLookup) {
SCTDebugTarget newTarget = unwrapTarget(element);
if (!newTarget.getModelIdentifier().equals(IDebugConstants.ID_DEBUG_MODEL) || newTarget.getDebugTarget().isTerminated())
return;
if (newTarget != null && activeDebugTarget != newTarget) {
if (activeSourceDisplay != null)
activeSourceDisplay.terminate(false);
activeSourceDisplay = new SCTSourceDisplay((ISimulationEngine) newTarget.getAdapter(ISimulationEngine.class));
}
activeSourceDisplay.displaySource(newTarget, page, forceSourceLookup);
activeDebugTarget = newTarget;
}
use of org.yakindu.sct.simulation.core.engine.ISimulationEngine in project statecharts by Yakindu.
the class DefaultSimulationEngineFactory method createExecutionContainer.
public ISimulationEngine createExecutionContainer(Statechart statechart, ILaunch launch) throws CoreException {
ISimulationEngine controller = createController(statechart);
injector.injectMembers(controller);
// For restoring execution context
String attribute = launch.getLaunchConfiguration().getAttribute(ISCTLaunchParameters.EXECUTION_CONTEXT, "");
if (attribute != null && attribute.trim().length() > 0) {
ExecutionContext context = restore(attribute, statechart);
controller.setExecutionContext(context);
}
return controller;
}
use of org.yakindu.sct.simulation.core.engine.ISimulationEngine in project statecharts by Yakindu.
the class SimulationView method activeTargetChanged.
protected void activeTargetChanged(final IDebugTarget debugTarget) {
openEditorForTarget(debugTarget);
updateTypeSystem(debugTarget);
ISimulationEngine engine = (ISimulationEngine) debugTarget.getAdapter(ISimulationEngine.class);
timeScheduler = (DefaultTimeTaskScheduler) engine.getTimeTaskScheduler();
setViewerInput(engine.getExecutionContext());
updateActions();
updateSessionDropdownInput(debugTarget);
}
Aggregations