Home » Modeling » TMF (Xtext) » Got imported model problem after transition from Xtext 2.7.3 to Xtext 2.8.0(Need your help, folks)
|Got imported model problem after transition from Xtext 2.7.3 to Xtext 2.8.0 [message #1689307]
||Mon, 23 March 2015 09:15
| Alexei Adamovich
Registered: May 2013
I use imported EMF model in my project. The model is produced from a grammar by ordinary process of Xtext artifacts generation using mwe2 workflow. Then I used a "switching from an inferred Ecore model to an imported one" procedure, described by Lorenzo Bettini in his blog.|
After transition from Xtext 2.7.3 to Xtext 2.8.0 I found that the technique doesn't works anymore for me. So I started repeating step-by-step the Lorenzo's tutorial. The point when it becomes broken is in the middle of the process described by Lorenzo: we just
got the generated model;
created the "emf-gen" folder for placing code generated by EMF generator, and tweaked the build.properties to add emf-gen to the list of sources;
renamed generated model folder to the "custom" one;
changed the GenModel file, so that the EMF model classes are generated into emf-gen instead of src-gen;
changed the MWE2 file: enabled the "emf-gen" directory cleaner and the EcoreGenerator component (?called "fragment" in Lorenzo's text?), commented the DirectoryCleaner element for the model directory, added the loading of our custom Ecore file in the "language" section of the Generator component; disabled EMFGeneratorFragment (we need no ecore model inference anymore).
added the dependency (ecore class) in the MANIFEST;
in the Xtext grammar replaced the generate statement with an import statement.
So at this point we read in Lorenzo's text: Quote:
"Now we're ready to run the MWE2 workflow, and you should get no error (if you followed all the above instructions); you can see that now the EMF model classes are generated into the emf-gen folder (the corresponding packages in the src-gen folders are now empty and you can remove them)"
Definitely, when I run the ".mwe2" workflow in the Xtext2.7.3 environment all goes smooth (see the LBX2EM_x273.output attached).
In contrast, when I run the workflow in Xtext 2.8.0, I get a bunch of errors (see the LBX2EM_x280.output attached). As you can see, there is no info output on registering of the imported model in the 2.8.0 output. And, as far as I understand, all following errors are caused by this non-importing. Am I right? What is the source of the problem?
Or does the Lorenzo's technique completely not work anymore in 2.8.0? If so, how can I switch from generated model to the imported one?
Thanks in advance!
P.S. Since I have less then 5 messages, forum engine forbids me to post any references (including the full class names). So I've uploaded Lorenzo's grammar, mwe2 workflow (adapted for 2.7.3), mwe2 console outputs and Lorenzo's post URL.
Current Time: Tue Apr 20 01:11:44 GMT 2021
Powered by FUDForum
. Page generated in 0.01694 seconds