[ATL] Multiple metamodel for the model "OUT" [message #73478] |
Sun, 27 January 2008 10:40 |
Eclipse User |
|
|
|
Originally posted by: Jean.jnapps.com
Hi,
We're trying to use multiple Metamodel for the Model "OUT", which all are
registered in Eclipse. In a rule, we try to access a refenrenced meta
element from another meatamodel. When running the module it doesn't
recognize that meta element.
Is it a limitation? Is there a way to reference multiple metamodel for the
model "OUT" in one module?
Regards,
Jean
|
|
|
|
Re: [ATL] Multiple metamodel for the model "OUT" [message #73859 is a reply to message #73535] |
Wed, 30 January 2008 11:08 |
Eclipse User |
|
|
|
Originally posted by: J.Neveux.netfective.com
Hi William,
Here's more precision : we're planning to use refences between meta models;
a meta model could reference objects from another meta model.
For example, we have the following set up of meta models :
staticClass.ecore & dynamicBehaviour.ecore. In dynamicBehaviour.ecore (which
opens fine within Eclipse's ecore viewer) there's a link pointing an element
in staticClass.ecore :
<eClassifiers xsi:type="ecore:EClass" name="CallOperationAction"
eSuperTypes="#//ActivityNode">
<eStructuralFeatures xsi:type="ecore:EReference" name="behavior"
lowerBound="1"
eType="ecore:EClass
http://com.netfective.bluage/sc.ecore#//Operation"/>
</eClassifiers>
The reference is done using the nsURI of staticClass.ecore : ecore:EClass
http://com.netfective.bluage/sc.ecore#//Operation.
Here's the faulty rule:
create OUT : bluage from IN : UML2;
-->CallOperationAction
rule UMLCallOperationAction2BluageCallOperationAction{
from s : UML2!CallOperationAction (s.oclIsTypeOf(UML2!CallOperationAction))
to out : bluage!CallOperationAction (
name <- s.name
,inPartition <- s.inPartition->first()--.debug('test sur
inPartition' + s.operation.toString())
,operation<-s.operation
)
}
rule UMLOperation2BluageOperation {
from o : UML2!Operation (o.oclIsTypeOf(UML2!Operation))
to out : bluage!Operation (
name <- o.name
,parameters <- o.ownedParameter
,stereotype <- o.getStereotype()
)
}
The error: "GRAVE: no type named 'Operation' in metamodel 'bluage'", which I
understand, but I have no clue on specifying a second meta model for the a
single model out.
Best regards,
Jean
PS: I think our problem relates to
http://www.eclipse.org/newsportal/article.php?id=1732&gr oup=eclipse.modeling.m2m#1732
"William Piers" <william.piers@obeo.fr> a
|
|
|
|
Re: [ATL] Multiple metamodel for the model "OUT" [message #74076 is a reply to message #73965] |
Thu, 31 January 2008 12:03 |
Eclipse User |
|
|
|
Originally posted by: J.Neveux.netfective.com
William,
I've looked into that solution and it appears to be an EMF problem rather
than ATL. We've also looked into setting up multiple model "OUT" and that
worked well. The links are recreated between transformed model. So finally,
we're going to merge our meta models and keep one big meta model.
Thanks for your time,
Jean
"William Piers" <william.piers@obeo.fr> a
|
|
|
Powered by
FUDForum. Page generated in 0.03478 seconds