Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generator problems when using cross references in xtext(Generator problems when using cross references in xtext)
icon5.gif  Generator problems when using cross references in xtext [message #1211699] Tue, 26 November 2013 15:22 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hello all,
I have 2 grammars say Grammar1 and Grammar2.

My Grammar2 is referencing some objects (Not all) in Grammar1.

Now a scenario,
Say DSL of my Grammar1 has some error, no doubt its generator will not be called that's fine.

But, DSL of my Grammar2 doesn't have even a single error and hence generator will be called, but as it is referencing to DSL of Grammar1, the generator of Grammar1 results in some errors.

So what I basically need is, if the cross referenced DSL doesn't have any error then proceed with generation or abort it.

How can I achieve it?

Thanks in advance Smile


Arshad
Re: Generator problems when using cross references in xtext [message #1213322 is a reply to message #1211699] Wed, 27 November 2013 07:33 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
You should validate your Grammar2 language to have everything the generator needs. So if you are referencing elements from Grammar1 and need to retrieve some information from them during code generation. You should add a validation rule that checks whether this information is available and if not tell the user by adding an issue.
Previous Topic:Resolving proxies for Java types fails when model is loaded externally
Next Topic:Showing validation error at the right eStructural feature
Goto Forum:
  


Current Time: Fri Apr 26 17:03:38 GMT 2024

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

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

Back to the top