Xpand: Resolving cross-references [message #635646] |
Wed, 27 October 2010 15:31 |
Tobias R Messages: 6 Registered: March 2010 |
Junior Member |
|
|
Hi all,
I am using Eclipse 3.6 and have developed two meta models, MM1 and MM2, that have been generated from concrete syntax by Xtext.
MM2 has cross-references to MM1 which is specified in the grammar by 'import importURI=STRING;'
The workflow of MM2 has been adapted accordingly.
fragment = ecore.EcoreGeneratorFragment {
referencedGenModels = "platform:/projectMM1/MM1.genmodel"
}
I would like to generate code from MM2 model entities. Unfortunately, Xpand does not resolve cross-references to MM1 model elements when
executing the transformation. The generated editors, however, work as expected.
The following snippet illustrates my problem. Files that end with *.jpm relate to textual models of MM2.
While the first model "Article.jpm" has no cross-references parsing succeeds. But parsing the second model "Addons.jpm" fails due to
cross-references to MM1. How can I resolve references to other models using mwe2 workflow? Do I need to load the textual model of MM1 explcitly?
Do I have to customize 'org.eclipse.xtext.mwe.Reader'?
I thankful for any answer pointing me in the right direction.
=========================================================
0 [main] DEBUG org.eclipse.xtext.mwe.Reader - Resource Pathes : [src/model]
115 [main] DEBUG xt.validation.ResourceValidatorImpl - Syntax check FAIL! Resource: file:/D:/Article.jpm
191 [main] DEBUG xt.validation.ResourceValidatorImpl - Syntax check OK! Resource: file:/D:/Addons.jpm
196 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher - Problems running workflow workflow.JavaPlatformModelGenerator: Validation problems:
1 error:
Article.jpm - D:\Article.jpm
13: Couldn't resolve reference to NodeType 'mdsd-core-nt:article'.
java.lang.RuntimeException: Problems running workflow workflow.JavaPlatformModelGenerator: Validation problems:
1 error:
Article.jpm - D:\Article.jpm
13: Couldn't resolve reference to NodeType 'mdsd-core-nt:article'.
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runne r.java:82)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runne r.java:52)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Lau ncher.java:74)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2La uncher.java:35)
Caused by: org.eclipse.emf.mwe.core.WorkflowInterruptedException: Validation problems:
============================================================ =================================
|
|
|
Powered by
FUDForum. Page generated in 0.03690 seconds