Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362979

Summary: Inconsistent JavaVMTypes URI resolution
Product: [Modeling] TMF Reporter: Ed Willink <ed>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: cvgaviao
Version: 2.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ed Willink CLA 2011-11-06 03:10:05 EST
If an Xtext file references

import "http://www.eclipse.org/xtext/common/JavaVMTypes" as types

and its manually generated model also references

http://www.eclipse.org/xtext/common/JavaVMTypes#//JvmType

then the Xtext editor reports an incompatible feature.

If however the manually generated model references 

../../org.eclipse.xtext.common.types/model/JavaVMTypes.ecore#//JvmType

the problem goes away.

I was working around this problem by importing org.eclipse.xtext.common.types till some new genmodel problem needed investigating.

Surely both

../../org.eclipse.xtext.common.types/model/JavaVMTypes.ecore

and 

http://www.eclipse.org/xtext/common/JavaVMTypes

should resolve URIs via

platform:/plugin/org.eclipse.xtext.common.types/model/JavaVMTypes.ecore

ensuring that both use the same normalized URI and so avoid the metamodel schizophrenia.