Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » containment references cannot span across models
containment references cannot span across models [message #1738709] Fri, 22 July 2016 12:58 Go to next message
François Irhy is currently offline François IrhyFriend
Messages: 2
Registered: March 2016
Junior Member
Hi, I am facing troubles when trying to copy contained references.

To make the situation clear I created an example of project.
There are two ecore models ( for input and output).

The outputed model must copy contained references from the first model.

Here is the ATL code :

-- @path input=/models/model/models.ecore
-- @path output=/sortie/model/sortie.ecore

module transform;

create OUT: output from IN: input;

rule transform{
		t:output!ClasseSortie(name <-,common <- s.classecommune)

As you can see, classecommune is a sequence of contained references : Sequence(input!classeCommune).
I want to copy that sequence into common.

But here is the ATL message:
Cannot set feature common to value [org.eclipse.emf.ecore.impl.DynamicEObjectImpl@4ccaa556 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@2be5f92f (name: classeCommune) (instanceClassName: null) (abstract: false, interface: false)), org.eclipse.emf.ecore.impl.DynamicEObjectImpl@3a74480c (eClass: org.eclipse.emf.ecore.impl.EClassImpl@2be5f92f (name: classeCommune) (instanceClassName: null) (abstract: false, interface: false))], containment references cannot span across models.

The ouput model is built with an empty common.
I have checked inter-model references in the run conf and enabled Containment Proxies in the genmodel.

Any idea ?
Re: containment references cannot span across models [message #1738743 is a reply to message #1738709] Fri, 22 July 2016 19:48 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 383
Registered: September 2012
Location: Belgium
Senior Member

1) The genmodel file only affects the generated code for your ecore model, not the ecore model itself. Your transformation uses only the ecore model, as indicated in the error message (DynamicEObjectImpl)
2) ATL does not support Containment Proxies. Adding support would require reworking the containment management code in the ATL VMs, which make sure that every model element has exactly one container (either a resource, or a model element, never both). Containment Proxies break the "same resource" assumption that ATL currently makes according to Steinberg et al.

Previous Topic:Refining Mode: Clone Element and add it to same parent
Next Topic:No generate "xsi:schemaLocation" at target model
Goto Forum:

Current Time: Mon Nov 19 17:18:47 GMT 2018

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

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

Back to the top