如何在Eclipse的上下文智能“Java搜索”中获取行预览(与上下文无关'文件搜索') [英] How do I get line previews in Eclipse's context intelligent 'Java Search' (vs. context unaware 'File Search')

查看:393
本文介绍了如何在Eclipse的上下文智能“Java搜索”中获取行预览(与上下文无关'文件搜索')的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse中使用搜索功能时,尤其是Java方法或字段,即工作区中的引用。 (控制+ Shift + G)当光标在某个方法上时,比方说。



如何让搜索结果显示单行预览。 (想想 - 就像我用过的所有其他搜索工具一样,从grep到Visual Studio?)



如果我搜索'bit of text'(没有引用搜索提供的范围解析的好处,它提供了它,但似乎无法弄清楚在搜索引用时如何。



(例如,对于某些类变量,例如 public double x ,这绝对是非常有用的。在虚假列表的海洋上搜索x之类的东西。



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



通过示例澄清我的问题:



在附加的屏幕截图1中,有111个引用方法 getHeight() 。但是,如果没有pop-pop-pop,从入门到入口跳入,就没有办法看到它们?






截图A:

(由于某些奇怪,有点让我直接包含愚蠢烦人,账户限制的东西...)






然而,如果我在(在工作区中)搜索 getHeight()使用文件搜索作为原始文本(案例过滤,并过滤 * .java )注意立即查看相对于我真正感兴趣的范围,有560个匹配,或449个误报。但是,请查看搜索对话框现在至少如何查看! (耶)。为我提供每个条目的快速线预览。







和屏幕截图B:






我如何获得截屏B中提供的线预览,但是对于那些111匹配(我在此示例中关注的那些) 范围过滤搜索搜索对话框中的Java搜索选项卡?



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



我看了看,尝试了扩展,挖掘了偏好设置,似乎无法弄清楚如何'启用'该搜索的行预览,其中限制为'参考'

解决方案

据我所知,Eclipse Java开发工具(JDT)仍然(2017年!)提供这样的一行或一个表达式预览。但是,有一个第三方插件具有此功能:



请注意,这是一个商业插件(我是其开发人员之一)。但它有一个免费试用版。


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.

这篇关于如何在Eclipse的上下文智能“Java搜索”中获取行预览(与上下文无关'文件搜索')的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆