Search in sources :

Example 6 with XtextLinkingDiagnostic

use of org.eclipse.xtext.linking.impl.XtextLinkingDiagnostic in project xtext-core by eclipse.

the class Bug362902Test method testNoExceptionUncaught.

@Test
public void testNoExceptionUncaught() throws Exception {
    String modelAsString = "Hello max ! Hello peter! favourite peter";
    Model model = (Model) getModelAndExpect(modelAsString, 2);
    EList<Diagnostic> errors = model.eResource().getErrors();
    Diagnostic diagnosticSyntax = errors.get(0);
    Diagnostic diagnosticLinking = errors.get(1);
    assertTrue(diagnosticSyntax instanceof XtextSyntaxDiagnostic);
    assertTrue(diagnosticLinking instanceof XtextLinkingDiagnostic);
}
Also used : XtextLinkingDiagnostic(org.eclipse.xtext.linking.impl.XtextLinkingDiagnostic) XtextSyntaxDiagnostic(org.eclipse.xtext.resource.XtextSyntaxDiagnostic) Model(org.eclipse.xtext.linking.bug362902.Model) XtextSyntaxDiagnostic(org.eclipse.xtext.resource.XtextSyntaxDiagnostic) XtextLinkingDiagnostic(org.eclipse.xtext.linking.impl.XtextLinkingDiagnostic) Diagnostic(org.eclipse.emf.ecore.resource.Resource.Diagnostic) Test(org.junit.Test)

Aggregations

XtextLinkingDiagnostic (org.eclipse.xtext.linking.impl.XtextLinkingDiagnostic)6 Test (org.junit.Test)6 Diagnostic (org.eclipse.emf.ecore.resource.Resource.Diagnostic)5 XtendFile (org.eclipse.xtend.core.xtend.XtendFile)2 XtendFunction (org.eclipse.xtend.core.xtend.XtendFunction)2 XBlockExpression (org.eclipse.xtext.xbase.XBlockExpression)2 XFeatureCall (org.eclipse.xtext.xbase.XFeatureCall)2 Model (org.eclipse.xtext.linking.bug362902.Model)1 XtextSyntaxDiagnostic (org.eclipse.xtext.resource.XtextSyntaxDiagnostic)1