Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Java Validator - determine if "no errors"
Xtext Java Validator - determine if "no errors" [message #649061] Mon, 17 January 2011 13:27 Go to next message
Flowqi is currently offline FlowqiFriend
Messages: 14
Registered: March 2010
Junior Member
Hi all!

I have a question concerning validation and dependent actions.
So i have a grammar which basically defines a state machine. Also, when i start the editor, i would like to start a simulator for this state machine. The problem is, the internal structure of the simulator can only be set up correctly if there were no errors in the editor.

So i would need to follow one of the following 2 possibilities, which each raise a question:

* Is is possible to do something like "if there were no errors after validation is finished, start the simulator"? How can i determine if there were no errors in a natural way without some complicated workaround?

* Is it possible to start the simulator from somewhere else in the Xtext project? So to say - to add a piece of code somewhere that gets executed (most desirably after a correct validation) somehow Smile. Is it possible to inject some custom components (besides the provided things in the abstract runtime module) into an Xtext project?

thanks in advance for your efforts!

flowqi
Re: Xtext Java Validator - determine if "no errors" [message #649076 is a reply to message #649061] Mon, 17 January 2011 14:37 Go to previous messageGo to next message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
I think an Xtext builder participant is the best way to go about this. For examples: see the Domain Model example shipped with Xtext or the Elysium IDE for Lilypond.

Re: Xtext Java Validator - determine if "no errors" [message #649265 is a reply to message #649076] Tue, 18 January 2011 13:45 Go to previous message
Flowqi is currently offline FlowqiFriend
Messages: 14
Registered: March 2010
Junior Member
thanks for your answer!

i will look into it - and hopefully understand it Smile
Previous Topic:Reporting errors on load
Next Topic:Grammar without Xtext
Goto Forum:
  


Current Time: Thu Apr 25 20:25:00 GMT 2024

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

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

Back to the top