How to get a preview of the strings in the Eclipse contextual context “Java Search” (as opposed to a context that does not know “File Search”)

When using the search function in Eclipse, especially, for example, a Java method or field, a link in the workspace. (Control + Shift + G) when the cursor is on a method, say.

As you have your search results, you display a single-line view. (Think like any other search tool I've used can offer from grep to Visual Studio?)

If I search for a “bit of text” (without using the area syntax analysis provided by the search for “links”, it suggests it), but it may not seem like when searching for links.

(Which, for example, for some class variables, such as public double x , is simply absolutely critically useful against a sea of ​​false listings that appear in search of something like "x")

//////////////////////////////////////////////////// ////

Refining my question with an example:

The attached screenshot1 contains 111 references to the getHeight() method. But, not pop pop pop, jumping from entrance to entrance, is there no way to see them?


Screenshot A: Screenshothot a
(not allowing me to turn it on directly due to some weird, curious dumb annoying thing about the account ...)


Whereas if I search (in the workspace) for getHeight() using File Search as raw text (filtered and filtered for *.java ), pay attention to 560 matches or 449 “false positives”, compared to the area in which I am really interested. However, look at least what the search dialog looks like! (Yes). Offers me a quick "line preview" of each entry.


. And screenshot B here:
screenshot B .


How can I get a preview of the string shown in screenshot B, but for those 111 matches (the ones that interest me in this example) on the Search by Search for Scope tab on the Search in Java dialog box in the Search dialog box?

/////////////////////////////////////////////

I looked and looked, tried extensions, dug settings settings and couldn’t understand how to “enable” this preview of strings for search, where it is “limited” “Links”

+6
source share
2 answers

As far as I know, Eclipse Java Development Tools (JDT) still (2017!) Does not offer such a view as a "single line" or "single expression". However, there is a third-party plug-in that has this feature: "Ctrl + Code Search Tool . "

This screenshot from his guide shows what the results look like:

Different levels of detail when submitting search results

Please note that this is a commercial plugin (and I am one of its developers). However, it does have a free trial.

+1
source

Try eclipse -clean from the command line.

-2
source

All Articles