Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » How to add a GMF diagram to the output model
icon6.gif  How to add a GMF diagram to the output model [message #1732820] Fri, 20 May 2016 05:53 Go to next message
behnaz changizi is currently offline behnaz changiziFriend
Messages: 11
Registered: January 2014
Junior Member
I am writing an ATL translation from BPMN2 to another model. The target model editor requires a GMF diagram to open the output of ATL transformation. In the following rule, I create the diagram the problem is that the diagram and the model are not written in the same file. If I choose the same file for their output one overrides the other.


rule def2mod {
from
b: BPMN20!Definitions
to
m: reo!Module,
m : GMF!Diagram(
type<-'Reo',
name<-'test',
measurementUnit<-#Pixel
)
}


I have posted the atl code and my input here at: https://github.com/behnaaz/BPMN2ATL.git

Merging the content of these file in one file is also not helping.
The output are generated as:
File 1:

<?xml version="1.0" encoding="ISO-8859-1"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_zHQiAB6HEeaECbYRnMkrCw" type="Reo" name="test" measurementUnit="Pixel"/>


File 2:

<?xml version="1.0" encoding="ISO-8859-1"?>
<reo:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:channels="http://www.cwi.nl/reo/channels" xmlns:components="http://www.cwi.nl/reo/components" xmlns:reo="http://www.cwi.nl/reo" xsi:schemaLocation="http://www.cwi.nl/reo/channels Reo/reo.ecore#//channels http://www.cwi.nl/reo/components Reo/reo.ecore#//components http://www.cwi.nl/reo Reo/reo.ecore" xmi:id="_zHOFwB6HEeaECbYRnMkrCw" name="d">
<connectors xmi:type="reo:Connector" xmi:id="_zHOFwR6HEeaECbYRnMkrCw" name="p">
<nodes xmi:type="reo:Node" xmi:id="_zHOFwh6HEeaECbYRnMkrCw" sourceEnds="_zHOF0x6HEeaECbYRnMkrCw" sinkEnds="_zHOF2B6HEeaECbYRnMkrCw"/>
<nodes xmi:type="reo:Node" xmi:id="_zHOFwx6HEeaECbYRnMkrCw" sourceEnds="_zHOF1h6HEeaECbYRnMkrCw" sinkEnds="_zHOF0R6HEeaECbYRnMkrCw"/>
<nodes xmi:type="reo:Node" xmi:id="_zHOFxB6HEeaECbYRnMkrCw" name="in" sourceEnds="_zHOF0B6HEeaECbYRnMkrCw"/>
<nodes xmi:type="reo:Node" xmi:id="_zHOFxR6HEeaECbYRnMkrCw" name="int" sinkEnds="_zHOF1B6HEeaECbYRnMkrCw"/>
<primitives xmi:type="channels:Sync" xmi:id="_zHOFxh6HEeaECbYRnMkrCw">
<sourceEnds xmi:type="reo:SourceEnd" xmi:id="_zHOFxx6HEeaECbYRnMkrCw"/>
<sinkEnds xmi:type="reo:SinkEnd" xmi:id="_zHOFyB6HEeaECbYRnMkrCw"/>
</primitives>
<primitives xmi:type="channels:Sync" xmi:id="_zHOFyR6HEeaECbYRnMkrCw">
<sourceEnds xmi:type="reo:SourceEnd" xmi:id="_zHOFyh6HEeaECbYRnMkrCw"/>
<sinkEnds xmi:type="reo:SinkEnd" xmi:id="_zHOFyx6HEeaECbYRnMkrCw"/>
</primitives>
<primitives xmi:type="channels:Sync" xmi:id="_zHOFzB6HEeaECbYRnMkrCw">
<sourceEnds xmi:type="reo:SourceEnd" xmi:id="_zHOFzR6HEeaECbYRnMkrCw"/>
<sinkEnds xmi:type="reo:SinkEnd" xmi:id="_zHOFzh6HEeaECbYRnMkrCw"/>
</primitives>
<primitives xmi:type="channels:Sync" xmi:id="_zHOFzx6HEeaECbYRnMkrCw">
<sourceEnds xmi:type="reo:SourceEnd" xmi:id="_zHOF0B6HEeaECbYRnMkrCw" node="_zHOFxB6HEeaECbYRnMkrCw"/>
<sinkEnds xmi:type="reo:SinkEnd" xmi:id="_zHOF0R6HEeaECbYRnMkrCw" node="_zHOFwx6HEeaECbYRnMkrCw"/>
</primitives>
<primitives xmi:type="channels:Sync" xmi:id="_zHOF0h6HEeaECbYRnMkrCw">
<sourceEnds xmi:type="reo:SourceEnd" xmi:id="_zHOF0x6HEeaECbYRnMkrCw" node="_zHOFwh6HEeaECbYRnMkrCw"/>
<sinkEnds xmi:type="reo:SinkEnd" xmi:id="_zHOF1B6HEeaECbYRnMkrCw" node="_zHOFxR6HEeaECbYRnMkrCw"/>
</primitives>
</connectors>
<components xmi:type="components:Reader" xmi:id="_zHOF1R6HEeaECbYRnMkrCw">
<sourceEnds xmi:type="reo:SourceEnd" xmi:id="_zHOF1h6HEeaECbYRnMkrCw" node="_zHOFwx6HEeaECbYRnMkrCw"/>
</components>
<components xmi:type="components:Writer" xmi:id="_zHOF1x6HEeaECbYRnMkrCw">
<sinkEnds xmi:type="reo:SinkEnd" xmi:id="_zHOF2B6HEeaECbYRnMkrCw" node="_zHOFwh6HEeaECbYRnMkrCw"/>
</components>
</reo:Module>

Many thanks in advance,
Behnaz
P.S. For stackoverflowers I posted my question here too
http://stackoverflow.com/questions/37347002/atl-adding-diagram-to-the-model

[Updated on: Fri, 20 May 2016 05:58]

Report message to a moderator

Re: How to add a GMF diagram to the output model [message #1732894 is a reply to message #1732820] Sun, 22 May 2016 10:09 Go to previous message
behnaz changizi is currently offline behnaz changiziFriend
Messages: 11
Registered: January 2014
Junior Member
Any idea?
Previous Topic:Issue with an ATL transformation
Next Topic:Problem with simple ATL transformation
Goto Forum:
  


Current Time: Mon Nov 20 15:35:35 GMT 2017

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

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