Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Multiple metamodel for the model "OUT"
[ATL] Multiple metamodel for the model "OUT" [message #73478] Sun, 27 January 2008 10:40 Go to next message
Eclipse UserFriend
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 #73535 is a reply to message #73478] Mon, 28 January 2008 11:03 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 297
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070200090905080202080709
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

Neveux a
Re: [ATL] Multiple metamodel for the model "OUT" [message #73859 is a reply to message #73535] Wed, 30 January 2008 11:08 Go to previous messageGo to next message
Eclipse UserFriend
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 #73965 is a reply to message #73859] Wed, 30 January 2008 17:22 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 297
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030004020208020202020704
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

In fact I ever did this kind of transformation and the emf model handler
of ATL automatically loads metamodels extensions.
You simply need, in the launch configuration, to refer to the metamodel
which needs the other one, for the "bluage" naming. In your case,
"dynamicBehaviour.ecore".

If you still have errors you also could try to specify the namespace of
the element in the type declaration, like :
UML"uml::Package" instead of UML!Package

Best regards,

William

Neveux Jean a
Re: [ATL] Multiple metamodel for the model "OUT" [message #74076 is a reply to message #73965] Thu, 31 January 2008 12:03 Go to previous message
Eclipse UserFriend
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
Previous Topic:[ATL] atl transf. from Java code
Next Topic:[ATL]Rule Transformation
Goto Forum:
  


Current Time: Sun Apr 11 22:53:51 GMT 2021

Powered by FUDForum. Page generated in 0.01616 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top