Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to provide a different error message for 'Couldn't resolve reference to..' error
How to provide a different error message for 'Couldn't resolve reference to..' error [message #957897] Thu, 25 October 2012 15:30 Go to next message
Latha Shankara is currently offline Latha ShankaraFriend
Messages: 33
Registered: June 2012
Member
Hello,

I have a grammar that specifies how a Statemachine should be defined. It should contain only one start state.

In the dsl generated, if a start state is given a value 'dummy' which is not the name of any of the states within the statemachine, an error 'Couldn't resolve reference to start state dummy' is displayed.

I want to change this error message generated by Xtext in the dsl and provide custom error message. How do I do that?

Please help..

Thanks in Advance,
Latha
Re: How to provide a different error message for 'Couldn't resolve reference to..' error [message #957925 is a reply to message #957897] Thu, 25 October 2012 15:59 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Latha,

subclass org.eclipse.xtext.linking.impl.LinkingDiagnosticMessageProvider and bind it by overriding bindILinkingDiagnosticMessageProvider() of your runtime module.

Kind regards,
~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Previous Topic:Keyword as ID (context sensitive)
Next Topic:Xtext crashing
Goto Forum:
  


Current Time: Fri Apr 19 22:22:18 GMT 2024

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

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

Back to the top