Search in sources :

Example 1 with ListBasedValidationIssueAcceptor

use of org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor in project statecharts by Yakindu.

the class AbstractTypeInferrerTest method expectWarning.

protected void expectWarning(String expression, String scope, String code) {
    ListBasedValidationIssueAcceptor diagnostics = validate(expression, scope);
    assertWarning(diagnostics, code);
}
Also used : ListBasedValidationIssueAcceptor(org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor)

Example 2 with ListBasedValidationIssueAcceptor

use of org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor in project statecharts by Yakindu.

the class AbstractTypeInferrerTest method inferTypeResult.

protected InferenceResult inferTypeResult(String expression, String parserRule, String scopes) {
    EObject parseResult = super.parseExpression(expression, parserRule, scopes);
    assertNotNull(parseResult);
    acceptor = new ListBasedValidationIssueAcceptor();
    return typeInferrer.infer(parseResult, acceptor);
}
Also used : ListBasedValidationIssueAcceptor(org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor) EObject(org.eclipse.emf.ecore.EObject)

Example 3 with ListBasedValidationIssueAcceptor

use of org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor in project statecharts by Yakindu.

the class AbstractTypeInferrerTest method expectErrors.

protected void expectErrors(EObject element, String code, int noOfErrors) {
    ListBasedValidationIssueAcceptor diagnostics = validate(element);
    assertErrors(diagnostics, code, noOfErrors);
}
Also used : ListBasedValidationIssueAcceptor(org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor)

Example 4 with ListBasedValidationIssueAcceptor

use of org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor in project statecharts by Yakindu.

the class AbstractTypeInferrerTest method validate.

protected ListBasedValidationIssueAcceptor validate(EObject element) {
    ListBasedValidationIssueAcceptor diagnostics = new ListBasedValidationIssueAcceptor();
    typeInferrer.infer(element, diagnostics);
    return diagnostics;
}
Also used : ListBasedValidationIssueAcceptor(org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor)

Example 5 with ListBasedValidationIssueAcceptor

use of org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor in project statecharts by Yakindu.

the class AbstractTypeSystemInferrer method infer.

@Override
public final InferenceResult infer(EObject object, IValidationIssueAcceptor acceptor) {
    initTypeCache();
    this.acceptor = (acceptor != null ? acceptor : new ListBasedValidationIssueAcceptor());
    InferenceResult result = inferTypeDispatch(object);
    typeCache.invalidateAll();
    return result;
}
Also used : ListBasedValidationIssueAcceptor(org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor)

Aggregations

ListBasedValidationIssueAcceptor (org.yakindu.base.types.validation.IValidationIssueAcceptor.ListBasedValidationIssueAcceptor)12 CoreException (org.eclipse.core.runtime.CoreException)1 Status (org.eclipse.core.runtime.Status)1 IStatusHandler (org.eclipse.debug.core.IStatusHandler)1 EObject (org.eclipse.emf.ecore.EObject)1 ExecutionFlow (org.yakindu.sct.model.sexec.ExecutionFlow)1 InitializationException (org.yakindu.sct.simulation.core.launch.AbstractSCTLaunchConfigurationDelegate.InitializationException)1