Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Display Exception while generating Model-Output to User
Display Exception while generating Model-Output to User [message #985222] Thu, 15 November 2012 03:47 Go to next message
Thomas Hergenröder is currently offline Thomas Hergenröder
Messages: 21
Registered: February 2012
Junior Member
If an Exception is thrown during the generation of the DSL output by my org.eclipse.xtext.generator.IGenerator
I would like to present it - or an appropriate message - to the user.

Is there an build in way to do that?
Re: Display Exception while generating Model-Output to User [message #985737 is a reply to message #985222] Thu, 15 November 2012 16:35 Go to previous message
Jan Koehnlein is currently offline Jan Koehnlein
Messages: 655
Registered: July 2009
Senior Member
No, you'd have to override the BuilderParticipant of your language for
that purpose. Note that this is not very eclipsish as the builder runs
in a background job and a dialog would appear as out of nowhere.

The usual best practice is to cover all such conditions during
validation, thus given early feedback on invalid models already during
editing and prevent the generator from running in these cases.

Am 15.11.12 09:47, schrieb Thomas Hergenröder:
> If an Exception is thrown during the generation of the DSL output by my
> org.eclipse.xtext.generator.IGenerator
> I would like to present it - or an appropriate message - to the user.
>
> Is there an build in way to do that?


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Previous Topic:Name validation for imported files
Next Topic:Chain 2 parsers/generators
Goto Forum:
  


Current Time: Wed Apr 16 12:01:26 EDT 2014

Powered by FUDForum. Page generated in 0.01502 seconds