|Conflict between xtend and xtext language, model inferrer and dependencies? [message #1181445]
||Mon, 11 November 2013 16:03
| Victor Noël
Registered: June 2010
I am witnessing a strange behaviour but I'm not exactly sure where it is coming from because it happens in a bit complicated setting.
I have a Java project with a models of my language, xtend files and java files.
This project has dependencies (with maven), and some of them contains models of my language as well as the generated Java classes from it.
So, my language generate java classes using the JvmModelInferrer, and some of the validation rules of my language relies on the associations made by this inferrer.
The setting where the problem arises is:
1) I have a maven dependency containing a model of my language declaring an element A with an inferred associated class A.
2) I have in my project a model referring to the class A (not the element of the model but using a JVmTypeReference) and a validation rule accessing the associated element A through the reference to the class A (calling primarySourceElement on the JvmType).
3) an xtend file that has nothing to do with all of that
The problem arises when I change something in the xtend file that triggers xtend generation.
The problem manifests itself by having no element associated to the class A (primarySourceElement returns null).
I guess it is maybe a bug? Is there anyone with an idea of how to avoid that?
Powered by FUDForum
. Page generated in 0.02059 seconds