Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Using ValidationTestHelper to detect "missing EOF at 'MyElement'" error
Using ValidationTestHelper to detect "missing EOF at 'MyElement'" error [message #1711235] Wed, 14 October 2015 04:57 Go to next message
Eclipse UserFriend
Hi,

I followed a tutorial on using the validation helper. However, it only showed me how to uses it for custom error classes with the MyDslValidator class.

How do I write an .parse.assertError(... Statement for such generic (system) errors?

Thank you!
Re: Using ValidationTestHelper to detect "missing EOF at 'MyElement'" error [message #1711239 is a reply to message #1711235] Wed, 14 October 2015 05:12 Go to previous messageGo to next message
Eclipse UserFriend
You can just start with assertNoErrors and then you will see the actual errors in the Junit view. Then you know what to assert.

org.eclipse.xtext.diagnostics.Diagnostic has the error codes for syntax/linking validation
org.eclipse.xtext.xbase.validation.IssueCodes has the error codes for Xbase validations
Re: Using ValidationTestHelper to detect "missing EOF at 'MyElement'" error [message #1711240 is a reply to message #1711235] Wed, 14 October 2015 05:13 Go to previous messageGo to next message
Eclipse UserFriend
Ok,

debugging further resolved the mytery: mycode.parse.assertError(MyPackage.eINSTANCE.myrule, org.eclipse.xtext.diagnostics.Diagnostic.SYNTAX_DIAGNOSTIC, "missing EOF at 'FOO'")
Re: Using ValidationTestHelper to detect "missing EOF at 'MyElement'" error [message #1711241 is a reply to message #1711239] Wed, 14 October 2015 05:13 Go to previous message
Eclipse UserFriend
THANKS!
Previous Topic:How to create installable plugin
Next Topic:Automatic serialisation to XMI
Goto Forum:
  


Current Time: Thu Jul 17 12:43:35 EDT 2025

Powered by FUDForum. Page generated in 0.26751 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top