Bug 490756 - [findrefs] Consider use Boolean as a return type for org.eclipse.xtext.findReferences.IReferenceFinder.Acceptor.accept
Summary: [findrefs] Consider use Boolean as a return type for org.eclipse.xtext.findRe...
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.9.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: v2.11
Keywords:
Depends on:
Blocks: 490758
  Show dependency tree
 
Reported: 2016-03-31 04:31 EDT by Anton Kosyakov CLA
Modified: 2016-05-17 08:31 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Kosyakov CLA 2016-03-31 04:31:22 EDT
If it returns true then search should be continued; otherwise stopped.

A client is not necessary interested in all references, e.g. he can be just interested in an existence of references of some kind or want to check whether target elements are referenced.
Comment 1 Sven Efftinge CLA 2016-03-31 06:01:18 EDT
+1 Although I'd prefer an exception, as the call hierarchy is relatively deep and you want to stop the whole thing if there are "EnoughReferences". Also it doesn't break existing clients.