Community
Participate
Working Groups
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