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

Bug 366476

Summary: Incorrect package import warning
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.2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ed Willink CLA 2011-12-12 22:06:34 EST
Xtext 2.2 reports "Packages should be imported by their namespace URI." warnings for platform/resource imports. This is wrong.

When a meta-model is under development,
the http: form should refer to the Java package 
the platform:/resource or platform:/plugin to the Ecore model
in each case falling back from open project to installed plugin.

Only the Ecore model should be subject to live update, therefore the platform:/resource forms should be preferred.

[And prior to Xtext 2.2 http: forms just didn't work.]
Comment 1 Ed Willink CLA 2011-12-12 22:22:06 EST
And, if an http: is resolved to a development resource you either require that

class path references the project 
target genmodel is correct

or have to scan every file to try to locate the file that may be lurking under some proprietary text to ecore encoding such as oclinecore or xcore.

The first goes hopelessly wrong when cutting and pasting debug test examples, the second burns up my computer cycles with pointless indexing.