Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » multiple output models conform to the same metamodel?
multiple output models conform to the same metamodel? [message #1023918] Mon, 25 March 2013 09:08 Go to next message
Fi Fi is currently offline Fi Fi
Messages: 133
Registered: March 2010
Senior Member
Dear All,
I have a question about whether it is possible to define an ATL module
which generates 2 models conform to the same metamodel
for example:
create OutModel1 : OutMetaModel, OutModel2 : OutMetaModel 
from InModel : InMetaModel;

If it is possible, how can I identify the appropriate element in the outPattern in such rule????

from example

rule In2Out {
 from
  i : InMetaModel!InElement
 to
  -- insert in the OutModel1
  Out1Element : OutMetaModel!OutElement (
  ------
  ),
  -- insert in the OutModel2
  Out2Element : OutMetaModel!OutElement (
  ------
  )
Re: multiple output models conform to the same metamodel? [message #1023993 is a reply to message #1023918] Mon, 25 March 2013 11:53 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 600
Registered: July 2009
Senior Member
Hello,

You can do this by simply adding the name of the concerned output model in the target pattern of your matched rule:
Out2Element : OutMetaModel!OutElement in OutModel2

Best regards,

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: multiple output models conform to the same metamodel? [message #1023994 is a reply to message #1023993] Mon, 25 March 2013 11:55 Go to previous message
Fi Fi is currently offline Fi Fi
Messages: 133
Registered: March 2010
Senior Member
Thank you very much Hugo Smile
I have already found http://www.eclipse.org/forums/index.php/m/539980/
Previous Topic:Package with URI was not found in ATL plugin
Next Topic:Microsoft Office Excel Injector does not produce output
Goto Forum:
  


Current Time: Fri Aug 01 01:54:27 EDT 2014

Powered by FUDForum. Page generated in 0.09715 seconds