eclipse 双击高亮

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3469921/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:59:23  来源:igfitidea点击:

Double Clicking Highlighting

eclipsehighlighting

提问by bobber205

In Notepad++ if you double click a word to highlight it, all the occurrences of the word in the file are also highlighted, a feature that is quite handy for finding where variables are declared/used.

在 Notepad++ 中,如果您双击一个单词以突出显示它,文件中出现的所有单词也会突出显示,这一功能对于查找声明/使用变量的位置非常方便。

Does the eclipse editor have this functionality? :) If so, how can I turn it on?

eclipse 编辑器有这个功能吗?:) 如果是这样,我该如何打开它?

回答by Tom Tresansky

For the Eclipse Java editor, you can go to Window->Preferences in the menu, then Java->Editor->Mark Occurrences in the options tree and check off anything you want highlighted in this way.

对于 Eclipse Java 编辑器,您可以转到菜单中的 Window->Preferences,然后在选项树中的 Java->Editor->Mark Occurrences 并选中您想要以这种方式突出显示的任何内容。

Note that the editor understands Java scoping rules, so if you have 2 local variables with the same name in two different functions, it will only highlight within the current function.

请注意,编辑器了解 Java 范围规则,因此如果您在两个不同的函数中有 2 个同名的局部变量,它只会在当前函数中突出显示。

回答by bwknight877

I found a plugin called eclipse-glance that searches like notepad++ but without double-clicking

我找到了一个名为 eclipse-glance 的插件,它可以像记事本++一样搜索但没有双击

http://code.google.com/p/eclipse-glance/

http://code.google.com/p/eclipse-glance/

回答by Augustas

Closest to original what I have found is alt-shift-O

我发现的最接近原始的是alt- shift-O

回答by Dani

For activate double click hightlighting in Eclipse:

在 Eclipse 中激活双击突出显示:

activate double click hightlighting in Eclipse

在 Eclipse 中激活双击突出显示

For change color of double click hightlighting in Eclipse:

在 Eclipse 中更改双击突出显示的颜色:

change color of double click hightlighting in Eclipse

在 Eclipse 中更改双击突出显示的颜色