| xtend: How to import resources of resource [message #932944] |
Thu, 04 October 2012 11:40  |
Li K. Messages: 9 Registered: September 2012 |
Junior Member |
|
|
Hi all,
I've got a modelA, which is an instance of mm1.ecore.
I've got a modelB written in mydsl, which is defined with xtext using another metamodel mm2. This modelB imports modelA. Till here everything works perfectly.
Now I'm trying to generate code for modelB using xtend. But when I hit 'run as MWE2 workflow' on my mwe2 file in order to generate code I'm getting the error 'Imported resource could not be found.'
So I am wondering whether I can import the resources that are used in my modelB? Or is there a better way to solve this problem?
Thanks heaps in advance!!
|
|
|
|
| Re: xtend: How to import resources of resource [message #933799 is a reply to message #933197] |
Fri, 05 October 2012 06:58   |
Li K. Messages: 9 Registered: September 2012 |
Junior Member |
|
|
My modelB looks like this:
import modelA
testcase SingleLeafDoor {
[...]
}
Whereas modelA is an model for an ecore model and consists of different kind of doors (SingleLeafDoor, DoubleLeafDoor,...)
And the error messages when hitting the xtend workflow say:
243 ERROR Mwe2Launcher - Problems running workflow de.android.workflow.GenerateAndroidTests: Validation problems:
2 errors:
modelB.test - C:\workspace\de.android\.\..\de.models\model\modelB.test
1: Imported resource could not be found.
3: Couldn't resolve reference to Door 'SingleLeafDoor'.
I hope this helped to understand the problem.
Thank you once again!!
edit: 'modelA' in the import statement 'import modelA' is an URI
[Updated on: Fri, 05 October 2012 07:00] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
| Re: xtend: How to import resources of resource [message #937057 is a reply to message #935915] |
Mon, 08 October 2012 12:11  |
Li K. Messages: 9 Registered: September 2012 |
Junior Member |
|
|
Hi,
I've noticed that I'm using the approach 'xtend 2 code generators with non xtext models' for the dsl.
Now I see where was the problem to understand my explanation. I am sorry for that!! Nevertheless I am grateful for your help.
I try to use the approach of the statemachine example with the integrated xtend. I hope this will work.
Regards
|
|
|
Powered by
FUDForum. Page generated in 0.01825 seconds