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

Bug 311560

Summary: [ResourceDescription] Allow easy customization of what is indexed
Product: [Modeling] TMF Reporter: Jan Koehnlein <jan>
Component: XtextAssignee: Jan Koehnlein <jan>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: sebastian.zarnekow, tmf.xtext-inbox
Version: 1.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: M5   
Hardware: All   
OS: All   
Whiteboard:

Description Jan Koehnlein CLA 2010-05-04 10:25:07 EDT
IMHO, deciding what is exported should be an easily accessible hook as it is a key for scalability.

If I got it right, to specify what elements are indexed (belong to the exported eobjects of a resource) one currently has to override 
  DefaultResourceDescription.computeExportedObjects()
and return instances of the overriding class in 
  DefaultResourceDescriptionManager.getResourceDescription(Resource)
This could be much easier if we injected the provider in the latter method instead of creating it with new. 

Am I missing something?
Comment 1 Sebastian Zarnekow CLA 2010-05-06 09:12:16 EDT
As the default implementation of the resource description has a constructor parameter (for good reasons) there is no easy way to use injection for that. I remove the Helios flag and target milestone as this one is no show stopper for clients.
Comment 2 Sebastian Zarnekow CLA 2010-12-15 11:41:46 EST
Scheduled for M5.
Comment 3 Jan Koehnlein CLA 2010-12-27 12:29:33 EST
We should harmonize EmfResourceDescription and DefaultResourceDescription when fixing this bug. 

Also note that as the find references mechanism has been redesigned, we should no longer have to create IReferenceDescriptions for local cross-references.
Comment 4 Jan Koehnlein CLA 2011-01-04 08:01:36 EST
Pushed to master.

Users can now bind an IDefaultResourceDescriptionStrategy to customize the indexing process.
Comment 5 Karsten Thoms CLA 2017-09-19 17:47:43 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:58:53 EDT
Closing all bugs that were set to RESOLVED before Neon.0