Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316610 - Improved "Cannot find compatible feature" ... "in sealed EClass" diagnosis
Summary: Improved "Cannot find compatible feature" ... "in sealed EClass" diagnosis
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-11 09:54 EDT by Ed Willink CLA
Modified: 2017-09-19 17:59 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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