Bug 477708 - [resolve] not working when using [inout] models
Summary: [resolve] not working when using [inout] models
Status: UNCONFIRMED
Alias: None
Product: QVTo
Classification: Modeling
Component: Engine (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-17 08:54 EDT by Henning Groenda CLA
Modified: 2015-09-17 13:08 EDT (History)
2 users (show)

See Also:


Attachments
Eclipse Project Demonstrating the [resolve] [inout] model Bug (7.43 KB, application/x-zip-compressed)
2015-09-17 08:54 EDT, Henning Groenda CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Groenda CLA 2015-09-17 08:54:12 EDT
Created attachment 256637 [details]
Eclipse Project Demonstrating the [resolve] [inout] model Bug

The [resolve] function is not working if there are references in a model and the referencing model is an [inout] model. It does work if the only change is to make it an [in] model. 

This prevents using the [resolve]-mechanism completely if one of the models is an [inout] model. There is also no warning or error displayed to notify a user that resolve cannot be used.

Steps to reproduce (Example Eclipse Project including demonstrating model files is attached).
0) Unzip
1) run launch configuration testResolve
2) run launch configuration testResolve (not working)
3) compare packages2.ecore and packages2NotWorking.ecore . The latter one is missing a reference to the super class for ReferencingClass.

Potential cause: The model elemens in the [inout] model have different memory addresses. My guess is that a different ResourceSet it used.

Version info: QVT Operational SDK, 3.5.0.v20150603-1058; Eclipse Mars
Comment 1 Christopher Gerking CLA 2015-09-17 10:31:06 EDT
The "QVTO Application Launch Delegate" seems to use distinct ResourceSets to load the input resources. Therefore your base ecore models is actually loaded twice. Clearly a bug.

Nevertheless, why do you use two distinct model extents for your input model? One extent should be enough even if an input model spans multiple files.

Moreover, why do you use the "QVTO Application Launch Delegate" configuration? The "Operational QVT Interpreter" configuration doesn't seems to suffer from that bug and works just fine with your example.
Comment 2 Henning Groenda CLA 2015-09-17 13:08:00 EDT
(In reply to Christopher Gerking from comment #1)
> Nevertheless, why do you use two distinct model extents for your input
> model? One extent should be enough even if an input model spans multiple
> files.
Its different repositories files with different meta models in real life.

> Moreover, why do you use the "QVTO Application Launch Delegate"
> configuration? The "Operational QVT Interpreter" configuration doesn't seems
> to suffer from that bug and works just fine with your example.
Hadn't tried it. Good to know that one works.