Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332557 - IQualifiedNameProvider for Ecore exports simple names
Summary: IQualifiedNameProvider for Ecore exports simple names
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: M7   Edit
Assignee: Jan Koehnlein CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 13:38 EST by Michael Zeising CLA
Modified: 2017-09-19 17:47 EDT (History)
4 users (show)

See Also:
sven.efftinge: indigo+


Attachments

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