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

Bug 315080

Summary: [MWE] Reader does not provide unexported elements
Product: [Modeling] TMF Reporter: Jan Koehnlein <jan>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.0Flags: jan: helios+
Target Milestone: RC3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
An alternative implementation of SlotEnty + tests jan: review+

Description Jan Koehnlein CLA 2010-05-31 09:59:56 EDT
The current implementation of the org.eclipse.xtext.mwe.Reader is based on the index. The SlotEntry traverses all exported objects of a resource and filters it by name and type. 

Elements which don't have a name are not exported by default. In some situations, the root element does not have a name, but should be the input to the code generator. 

We should provide a index independent version of the SlotEntry that is able to deliver unnamed/unexported objects.
Comment 1 Jan Koehnlein CLA 2010-05-31 10:01:19 EDT
Created attachment 170527 [details]
An alternative implementation of SlotEnty + tests

The attached patch introduces a new class ResourceSetBasedSlotEntry, that uses the resource set's contents instead of its indexing information.
Comment 2 Sebastian Zarnekow CLA 2010-05-31 10:58:27 EDT
The patch looks good to me.
Comment 3 Jan Koehnlein CLA 2010-05-31 11:26:21 EDT
Patch applied with two slight changes:
- removed TODO comment
- made logger static final
Comment 4 Karsten Thoms CLA 2017-09-19 16:13:19 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.