Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Inter model references
[ATL] Inter model references [message #754534] Thu, 03 November 2011 03:43 Go to next message
Yasser Khan is currently offline Yasser KhanFriend
Messages: 23
Registered: October 2011
Junior Member
I am writing a transformation to make a UML diagram graphically visible.
The input metamodel in UML.ecore
The output metamodel is GMF.ecore

This is my transformation.

rule UMLPackage_2_GMFDiagram {
from p : UML!Package
to d: GMF!Diagram (
type <- 'UMLActivity',
measurementUnit <- 'Pixel',
element <- p
)
}

I have set inter model references to true, but this does not seem to work.
I expect the following output

<notation:Diagram xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
xsi:schemaLocation="http://www.eclipse.org/gmf/runtime/1.0.1/notation platform:/resource/UCM_2_AD_05/Metamodels/GMF/notation.ecore"
xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
xmi:id="_8yOOUAXHEeGtCIs10OZ33g"
type="UMLActivity"
measurementUnit="Pixel">
<element xmi:type="uml:Package" href="default.uml#_8xdZUAXHEeGtCIs10OZ33g"/>
</notation:Diagram>


But I get the following output

<notation:Diagram xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
xsi:schemaLocation="http://www.eclipse.org/gmf/runtime/1.0.1/notation platform:/resource/UCM_2_AD_05/Metamodels/GMF/notation.ecore"
xmi:id="_-3o-gAXOEeGtCIs10OZ33g"
type="UMLActivity"
element="_-3o-gAXOEeGtCIs10OZ33g"
measurementUnit="Pixel" />

Please advise? Am I missing something to make inter model references work?



[Updated on: Thu, 03 November 2011 03:56]

Report message to a moderator

Re: [ATL] Inter model references [message #754548 is a reply to message #754534] Thu, 03 November 2011 08:14 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
p is transformed to d so the reference in the end will be to d explaining
xmi:id="_-3o-gAXOEeGtCIs10OZ33g"
element="_-3o-gAXOEeGtCIs10OZ33g"
Re: [ATL] Inter model references [message #754584 is a reply to message #754548] Thu, 03 November 2011 11:57 Go to previous message
Yasser Khan is currently offline Yasser KhanFriend
Messages: 23
Registered: October 2011
Junior Member
p refers to the root element of my input model. I cannot avoid this transformation.
Is there any other way to create d and assign p to d.element?
Thank you.
Previous Topic:[ATL] recover the value of a "multivalued" property in a stereotype
Next Topic:[ATL] EMFInjector and Resource
Goto Forum:
  


Current Time: Wed Dec 04 15:03:47 GMT 2024

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

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

Back to the top