Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:57 Go to next message
Steffen Schuette is currently offline Steffen SchuetteFriend
Messages: 13
Registered: August 2015
Junior Member
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 09:12 Go to previous messageGo to next message
Stefan Oehme is currently offline Stefan OehmeFriend
Messages: 159
Registered: April 2010
Location: Kiel
Senior Member

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 09:13 Go to previous messageGo to next message
Steffen Schuette is currently offline Steffen SchuetteFriend
Messages: 13
Registered: August 2015
Junior Member
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 09:13 Go to previous message
Steffen Schuette is currently offline Steffen SchuetteFriend
Messages: 13
Registered: August 2015
Junior Member
THANKS!
Previous Topic:How to create installable plugin
Next Topic:Automatic serialisation to XMI
Goto Forum:
  


Current Time: Fri May 10 13:55:33 GMT 2024

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

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

Back to the top