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

Bug 316610

Summary: Improved "Cannot find compatible feature" ... "in sealed EClass" diagnosis
Product: [Modeling] TMF Reporter: Ed Willink <ed>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
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-06-11 09:54:12 EDT
I have spent quite some time on many occasions trying to fathom "Cannot find compatible feature" ... "in sealed EClass", and after blaming the tool, I have eventually found a meta-model issue.

Each of the following could be distinctly diagnosed:

feature has incompatible containment
feature has incompatible multiplicity
??feature has incompatible transient
??feature has incompatible volatile
??feature has incompatible abstract
??feature has incompatible interface

With the above clues, I could have solved my problems much more rapidly.

[Further to Bug 286053, it might be also be kind to run a validation on the source meta-models as part of the diagnosis of an incompatible feature.]
Comment 1 Ed Willink CLA 2010-07-10 11:31:05 EDT
Another nice obscure problem:

Ecore model includes e.g.

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

but Xtext imports

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

or

http://www.eclipse.org/xtext/common/JavaVMTypes
Comment 2 Ed Willink CLA 2010-07-10 14:30:39 EDT
And another:

A1 extends B, C
A2 extends B, C

then aB=(A1,A2)

gives the same message if aB requires a B, but does not allow a C, seemingly because the last superType C, is checked fpr comaptibility with B rather than any.
Comment 3 Ed Willink CLA 2010-08-26 01:43:08 EDT
(In reply to comment #1)
See Bug 323674 for a similar problem between platform:/resource/... and ../../... access.
Comment 4 Ed Willink CLA 2010-08-26 02:25:00 EDT
And another obscure one:

If grammar B extends grammar A and both grammar A and grammar B have a reference to feature N of type X.

Then the meta-model is changed so the feature N is of type Y.

Editing grammar B shows the error but once corrected it is still shown as an error until the same error in the base grammar is also corrected.

In this scenario surely the base grammar should have a red squiggle similar to JDT's 'type hierarchy is inconsistent' diagnosis.
Comment 5 Sebastian Zarnekow CLA 2011-01-10 10:19:47 EST
Scheduled for M5 as grammar mixin and Ecore import will become more popular with Xbase.
Comment 6 Sebastian Zarnekow CLA 2011-02-08 11:38:02 EST
Improved error messages.
Comment 7 Karsten Thoms CLA 2017-09-19 17:49:04 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 8 Karsten Thoms CLA 2017-09-19 17:59:55 EDT
Closing all bugs that were set to RESOLVED before Neon.0