use of org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor in project statecharts by Yakindu.
the class AbstractTypeInferrerTest method expectNoErrors.
protected void expectNoErrors(String expression, String scope) {
ListBasedValidationIssueAcceptor diagnostics = validate(expression, scope);
assertNoErrors(diagnostics);
}
use of org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor in project statecharts by Yakindu.
the class AbstractExecutionFlowSimulationEngine method init.
@Override
public void init() {
try {
ListBasedValidationIssueAcceptor acceptor = new ListBasedValidationIssueAcceptor();
ExecutionFlow flow = sequencer.transform(statechart, acceptor);
if (acceptor.getTraces(Severity.ERROR).size() > 0) {
Status errorStatus = new Status(Status.ERROR, SimulationCoreActivator.PLUGIN_ID, ERROR_DURING_SIMULATION, acceptor.getTraces(Severity.ERROR).iterator().next().toString(), null);
IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(errorStatus);
try {
statusHandler.handleStatus(errorStatus, getDebugTarget());
} catch (CoreException e) {
e.printStackTrace();
}
}
if (!context.isSnapshot()) {
contextInitializer.initialize(context, flow);
}
interpreter.initialize(flow, context, useInternalEventQueue());
} catch (Exception ex) {
handleException(ex);
throw new InitializationException(ex.getMessage());
}
}
Aggregations