[ATL] how to navigate in 2 source models of the same metamodel? [message #108776] |
Mon, 27 July 2009 14:59 |
Eclipse User |
|
|
|
Originally posted by: mhe09002.student.mdh.se
Hi,
I want to merge two models of the same metamodel. So my header would lool
like this:
module MM_MM2mergedMM; -- Module Template
create OUT : MM from IN1 : MM, IN2 : MM;
Now I want to build rules, which check, if an Element, which exists in
model "IN1" does also exist in model "IN2" or is even changed there. But
since a can only have a single source element, it is quite hard to
reference to an comparing elemnt in the other model.
Maybe someone has an idea or - what would be great - an information source
different then the Eclipse-Wiki-ATL-Documentation (I read through this
one),
regards,
mats
|
|
|
Re: [ATL] how to navigate in 2 source models of the same metamodel? [message #350235 is a reply to message #108776] |
Tue, 28 July 2009 09:15 |
William Piers Messages: 303 Registered: July 2009 |
Senior Member |
|
|
Hello,
mats a écrit :
> Hi,
> I want to merge two models of the same metamodel. So my header would
> lool like this:
>
> module MM_MM2mergedMM; -- Module Template
> create OUT : MM from IN1 : MM, IN2 : MM;
>
> Now I want to build rules, which check, if an Element, which exists in
> model "IN1" does also exist in model "IN2" or is even changed there. But
> since a can only have a single source element, it is quite hard to
> reference to an comparing elemnt in the other model.
You can write a rule like that (if I understand well):
rule sample {
from
a : MM!Element in IN1,
b : MM!Element in IN2 (
--write here a condition to compare a and b,
-- e.g.: a.name = b.name
)
...
> Maybe someone has an idea or - what would be great - an information
> source different then the Eclipse-Wiki-ATL-Documentation (I read through
> this one),
It seems that there is no section about the "in" keyword", I will try to
update the doc asap.
Best Regards,
William
> regards,
> mats
>
|
|
|
Powered by
FUDForum. Page generated in 0.02973 seconds