When using the search functionality in Eclipse, especially, for example, a Java method or field, the 'reference in workspace'. (Control+Shift+G) when the the cursor is on some method, say.
How do you have the search results show you the one line preview. (Think -- like every other search tool I've used can offer, from grep to Visual Studio?)
If I search on 'bit of text' (without the benefit of the scope parsing provided by the 'references' search, it offers it), but can't seem to figure out how when search for references.?
(Which, for, say, some class variables like public double x
, is just absolutely critically useful vs. the sea of false listing that come up searching on something like 'x ')
Clarifying my question by example:
In the screen shot1 attached, there are 111 references to the method getHeight()
. But, without pop-pop-pop, jumping from entry to entry to entry, there's no way to see them?
Screenshot A:
( not letting me include directly due to some weird, kinda dumb annoying, account restriction thing...)
Whereas, if I search ( in the workspace) for getHeight()
using "File Search" as 'raw text' (case filtered, and filtering for *.java
) note seeing now 560 matches, or 449 "false positives" relative to the scope I'm actually interested in. Yet, see how the Search dialog view now at least! (yeah). Offers me the quick "line preview" of each entry.
.
And screenshot B here:
.
How do I get the line preview offered in screenshot B, but for those 111 matches (the ones I care about in this example) in the 'scope filtering' search 'Java Search' tab in the 'Search' dialog box?
/////////////////////////////////////////////
I've looked and looked, tried extensions, dug through preferences settings, and can't seem to figure out how to 'enable' that line preview for searches where it's "Limited To" 'References'
As far as I know, the Eclipse Java Development Tools (JDT) still (2017!) do not offer such a “one line” or “one expression” preview. There is a third-party plug-in, however, that has this feature: Ctrlflow Code Search Professional.
This screenshot from its manual shows you how the results would look like:
Note that this is a commercial plug-in (and I am one of its developers). It has a free trial, however.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With