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

Bug 323674

Summary: "Cannot find compatible feature" in synonym URIs
Product: [Modeling] TMF Reporter: Ed Willink <ed>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: 1.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: M6   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ed Willink CLA 2010-08-26 01:41:51 EDT
A grammar segment such as

import "platform:/resource/org.eclipse.ocl.examples.xtext.base/model/BaseCST.ecore" as base
import "platform:/resource/org.eclipse.ocl.examples.pivot/model/pivot.ecore" as pivot
generate myDsl "http://www.xtext.org/example/mydsl1/MyDsl"

...

Greeting  returns base::QualifiedTypeRefCS:
	'Hello' namespace=[pivot::Namespace|ID] '!';

fails with a "Cannot find compatible feature" in "in sealed EClass"

when the relevant 'namespace' declaration in BaseCST.ecore is:

    <eStructuralFeatures xsi:type="ecore:EReference" name="namespace" eType="ecore:EClass ../../org.eclipse.ocl.examples.pivot/model/pivot.ecore#//Namespace"/>

which is the default EMF usage. The problem is cured by changing to:

    <eStructuralFeatures xsi:type="ecore:EReference" name="namespace" eType="ecore:EClass platform:/resource/org.eclipse.ocl.examples.pivot/model/pivot.ecore#//Namespace"/>

It seems the models are being compared by unresolved URI rather than resolved physical location.
Comment 1 Sebastian Zarnekow CLA 2011-01-10 10:22:27 EST
Scheduled for M5 as grammar mixin and Ecore import will become more popular
with Xbase.
Comment 2 Sebastian Zarnekow CLA 2011-02-07 11:11:09 EST
Cannot reproduce this one. Please reopen if the problem persists in Xtext 2.0
Comment 3 Ed Willink CLA 2011-02-07 11:51:31 EST
These URI problems are evil; confusing, poorly diagnosed and unstable.

I think that my Xtext build problems have gone away with M5. Now that I always build with MWE scripts, maybe the Eclipse running/not-running hazards are not provoked.
Comment 4 Sebastian Zarnekow CLA 2011-02-07 12:38:19 EST
(In reply to comment #2)
> Cannot reproduce this one. 

Tested in editor context, builder context and in mwe2 workflow.
Comment 5 Karsten Thoms CLA 2017-09-19 17:23:06 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:34:27 EDT
Closing all bugs that were set to RESOLVED before Neon.0