Skip to main content



      Home
Home » Modeling » TMF (Xtext) » How to override Error Messages
How to override Error Messages [message #1738963] Tue, 26 July 2016 06:59 Go to next message
Eclipse UserFriend
Hi,

i want to change the automatically generated error messages but I don't really get how it works. I've just read that there's the way over the ISyntaxErrorMessageProvider but I am not sure how to implement it.
Can someone maybe please give me an example for the following rule?
How do I get the right context, when e.g. name starts with a Capital?

Dcl_var:
   'var' type=Type name=ID_VAR ;
terminal ID_VAR: 
   (('a'..'z') ('a'..'z' | 'A'..'Z' | '0'..'9' | '_')*) | '_' ;


Thanks in advance!
Re: How to override Error Messages [message #1739075 is a reply to message #1738963] Wed, 27 July 2016 08:02 Go to previous messageGo to next message
Eclipse UserFriend
Or maybe someone can give me a hint where I can find an implementation where I can look at? I haven't found one on the example projects..
Re: How to override Error Messages [message #1739094 is a reply to message #1739075] Wed, 27 July 2016 09:45 Go to previous messageGo to next message
Eclipse UserFriend
this this depends highly on the grammar. in your case i would loosen the grammar and do the checkin inside a valueconverter.
if you insist on implement ISyntaxErrorMessageProvider you shoudl have a look at the context and see if you can find out if you are in this situation
Re: How to override Error Messages [message #1769958 is a reply to message #1739094] Mon, 07 August 2017 02:09 Go to previous message
Eclipse UserFriend
No Message Body

[Updated on: Mon, 07 August 2017 02:16] by Moderator

Previous Topic:DSL with a free text
Next Topic:Implicit reference to an EObject
Goto Forum:
  


Current Time: Mon Jul 07 16:15:58 EDT 2025

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

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

Back to the top