Bug 397063 - For QVT-O EObject is not known to be supertype of EModelElement and EGenericType
Summary: For QVT-O EObject is not known to be supertype of EModelElement and EGenericType
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: SBVR (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-21 04:55 EST by Dietrich Travkin CLA
Modified: 2013-07-11 15:14 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dietrich Travkin CLA 2012-12-21 04:55:38 EST
When working with QVT-O code, the compiler does not know that EObject is the supertype of all objects.

The reason seems to be the missing inheritance relation in the Ecore meta-model in EMF between EObject and EModelElement and EGenericType. According to the Bug 316894 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=316894), this inheritance relation will remain missing in the meta-model. Consequently, all tools based on the EMF meta-model have to consider this implicit inheritance relation.

As a consequence, code like the following one does not compile due to (assumed) incompliance of mapping operation signatures:


modeltype Ecore uses ecore('http://www.eclipse.org/emf/2002/Ecore');

mapping MyElement::myElementToEcoreElement() : EObject
disjuncts MySpecialElementA::elementA2EClass,
          MySpecialElementB::elementB2EOperation {}

mapping MySpecialElementA::elementA2EClass() : EClass {...}

mapping MySpecialElementB::elementB2EOperation () : EOperation {...}

Steps to reproduce:

1) view the registered Ecore meta-model (http://www.eclipse.org/emf/2002/Ecore) with the Metamodel Explorer of the QVT plug-ins. There is no inheritance relation in EModelElement to EObject.

2) Use the above code or similar to reveal the compilation errors.

Actual behavior:

The above code does not compile. The signatures are told to be not compliant.

Expected behavior:

The above QVT-O code should compile, since EClass and EOperation are subtypes of EObject and, thus, the mapping operation signatures are compliant to the myElementToEcoreElement mapping operation.

Platform:
Eclipse 3.7.2, Build ID: M20120208-0800, QVT Operational plug-ins 3.1.0

Additional information:
More details can be found in the QVT-O forum:
http://www.eclipse.org/forums/index.php/m/992285/#msg_992285