Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362787 - [Grammar][Editor] Cannot find compatible type for features although everything should be clear
Summary: [Grammar][Editor] Cannot find compatible type for features although everythin...
Status: VERIFIED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 08:45 EDT by Christian Dietrich CLA
Modified: 2011-11-11 08:12 EST (History)
2 users (show)

See Also:
sebastian.zarnekow: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dietrich CLA 2011-11-03 08:45:36 EDT
Build Identifier: 2.1.0

We have a base grammar like this one

grammar org.xtext.example.otherdsl.OtherDsl with org.eclipse.xtext.common.Terminals

generate otherDsl "http://www.xtext.org/example/otherdsl/OtherDsl"

NamedElement:
	name=ID
;


and a grammar like

grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals

import "platform:/resource/org.xtext.example.otherdsl/src-gen/org/xtext/example/otherdsl/OtherDsl.ecore" as OTHER

generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"

Model:
	A | B | C;
	
A:
	"a" name=ID
;

B:
	"b" name=ID
;

C:
	"c" name=ID
;

Dummy returns OTHER::NamedElement:
	A | B | C
;

This worked without any problems in 2.0.0
In 2.1.0 the Editor shows error markers for the three names
with the error message Cannot find compatible type for features

The workflow runs anyway. the content assist suggests name as a feature too.
The generated ecore is how i want int to be

Reproducible: Always
Comment 1 Sebastian Zarnekow CLA 2011-11-03 11:08:31 EDT
Does it work if you use the nsURI to import the EPackage?
Comment 2 Christian Dietrich CLA 2011-11-03 11:29:54 EDT
Same problem using the nsURI
Comment 3 Sebastian Zarnekow CLA 2011-11-10 15:36:50 EST
Fixed in master and maintenance.