[Xpand] Can Xpand process two input models together? [message #521438] |
Wed, 17 March 2010 11:33  |
Eclipse User |
|
|
|
Hi everyone,
I currently have a Xpand template to generate code for one model, and it works.
However, I want to have another input model (different domain) to generate something else in the same file (aspect-oriented might not work well at this point), therefore, I have another import statement:
import Metamodel1;
import Metamodel2;
...
However, I do not know how to access and trigger the elements in the 2nd metamodel. For example:
<<DEFINE d1 FOR Metamodel1::Element1>>
void function1()
{
somestatement;
somestatement;
<<EXPAND d2 FOR ???>> // The problem is I do not know how to put the target here. How can I access the second model?
}
<<ENDDEFINE>>
<<DEFINE d2 FOR Metamodel2::Element1>>
... ...
<<ENDDEFINE>>
Any idea? Is it doable?
Also, a related question is: is there any statement in Xpand or Xpand extension that can get all instances of a certain type of elements directly without using a container?
Thanks a lot.
Yu
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04347 seconds