Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327656 - [Scoping] Allow to pass a filter predicate to Scopes (as well as to IContainers and IResourceDescriptions)
Summary: [Scoping] Allow to pass a filter predicate to Scopes (as well as to IContaine...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-13 08:28 EDT by Sven Efftinge CLA
Modified: 2017-09-19 17:03 EDT (History)
1 user (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 Sven Efftinge CLA 2010-10-13 08:28:11 EDT
In order to query and filter the contents of each scope taking the shadowing into account, we should allow to pass a filter predicate when asking for IEObjectDescription.
Comment 1 Jan Koehnlein CLA 2010-10-14 05:44:29 EDT
Summarizing our discussion results:
The methods of the IScope interface are a cross product of filtering aspects (by EObject, by name, by predicate) and result type (list or single element). We should simplify that by extracting the filtering aspect into a separate interface, something like

interface IScope {
  Iterable<IEObjectDescriptor> getElements(IScopeFilter filter);
  IEObjectDescriptor getFirstElement(IScopeFilter filter);
}

interface IScopeFilter {
  static class ByName implements IScopeFilter {..} 
  static class ByEObject implements IScopeFilter {..}
  static class ByPredicate implements IScopeFilter {..}
}

For backward compatibility with existing clients, we should consider introducing a compatibility layer.
Comment 2 Sven Efftinge CLA 2010-11-22 07:38:20 EST
I also changed IResourceDescription and IContainer accordingly.

pushed to master
Comment 3 Karsten Thoms CLA 2017-09-19 16:52:09 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:03:27 EDT
Closing all bugs that were set to RESOLVED before Neon.0