Community
Participate
Working Groups
The current IResourceDescriptions interface (or ISelectable) does not offer any operations to perform a find references query. As a result clients must manually use IResourceDescriptions#getAllResourceDescriptions() and then IResourceDescription#getReferenceDescriptions() to find the desired references. This makes it difficult to provide a custom *efficient* index implementation (i.e. IResourceDescriptions or IBuilderState implementation) which doesn't keep the entire index contents in memory. Instead the index should be allowed to implement this query, so it can efficiently execute it against its internal data structure (e.g. an RDBMS). In Xtext I see two use cases for a find references operation (with different requirements): * IReferenceFinder#findIndexedReferences() - Here we want to find all IReferenceDescriptions with a target URI contained in a given Set<URI>. Thus something like: Iterable<IReferenceDescription> findReferencesTo(Set<URI>). * IResourceDescription$Manager#isAffected() (through ClusteringBuilderState#queueAffectedResources()) - For all resources which the builder determines as changed (using IResourceDescription$Delta#haveEObjectDescriptionsChanged()) all affected resources are determined and queued. This is partly based on finding all resources with outgoing references to objects within the changed resources and would thus benefit from an operation like: Iterable<IResourceDescription> findReferencingResources(Set<URI>).