Skip to main content



      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 10:22 Go to next message
Eclipse UserFriend
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
Re: Generator problems when using cross references in xtext [message #1213322 is a reply to message #1211699] Wed, 27 November 2013 02:33 Go to previous message
Eclipse UserFriend
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: Tue Jul 08 01:59:34 EDT 2025

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

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

Back to the top