Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315080 - [MWE] Reader does not provide unexported elements
Summary: [MWE] Reader does not provide unexported elements
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: RC3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 09:59 EDT by Jan Koehnlein CLA
Modified: 2017-09-19 16:13 EDT (History)
1 user (show)

See Also:
jan: helios+


Attachments
An alternative implementation of SlotEnty + tests (27.07 KB, patch)
2010-05-31 10:01 EDT, Jan Koehnlein CLA
jan: review+
Details | Diff

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