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

Bug 332557

Summary: IQualifiedNameProvider for Ecore exports simple names
Product: [Modeling] TMF Reporter: Michael Zeising <michael>
Component: XtextAssignee: Jan Koehnlein <jan>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: jan, sebastian.zarnekow, sven.efftinge, tmf.xtext-inbox
Version: 0.7.0Flags: sven.efftinge: indigo+
Target Milestone: M7   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Zeising CLA 2010-12-14 13:38:55 EST
Build Identifier: 20100917-0705

Hi there,

I'm using Xtext 1.0.1 and I've noticed the following issue:

The built-in exporting services for Ecore (org.eclipse.xtext.ecore) export simple instead of qualified names - which is bad.

Imagine you have an EPackage "model" containing an EEnum "Direction" containing an EEnumLiteral "left". The name exported for the literal is "left" but it should be "model.Direction.left" to reflect the hierarchy and to avoid name clashes.

The error is critical because the scoping of Xtext removes duplicate names (all occurences) so that some attribute or reference named "left" leads to a model with elements that may not be referenced from outside.

Reproducible: Always

Steps to Reproduce:
1. Create two ENamedElements with the same name
2. Simple name export leads to duplicate names
3. Scoping removes duplicates completely
4. Elements may not be referenced
Comment 1 Sebastian Zarnekow CLA 2011-04-04 11:28:33 EDT
We want to export all ENamedElements twice:
http://nsURI | EClassName | EStructuralFEatureName -> userData nsURI=true
EPackageName | EClassName | EStructuralFeatureName -> userData nsURI=false
Comment 2 Jan Koehnlein CLA 2011-04-08 05:53:47 EDT
Pushed to MASTER. 

EOperations are indexed with their name, too.
Comment 3 Karsten Thoms CLA 2017-09-19 17:36:47 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:47:43 EDT
Closing all bugs that were set to RESOLVED before Neon.0