您的位置:首页 > 编程语言 > Java开发

Eclipse 中双击变量不高亮 切换变量不高亮 解决

2016-06-08 08:45 351 查看
在eclipse/myeclipse中如果不小心把变量的高亮显示弄丢了。可真是件愁人的事,不过看到这你就不用愁了

windows->   preferences->
Java-> Editor-> Mark   Occurences 

最上边的大标题的复选框勾上,下面的就都可以高亮显示了,Local   variables是变量的高亮显示

还有其他的一些高亮的

alt+shift+o 也可以打开关闭这个

======================== 以上是设置

 下面的是切换变量的时候不高亮 ---测试可以

http://blog.csdn.net/ritterliu/article/details/19087431


参考自 stackoverflow

Two "solutions" that at least get the highlight stuck on a new item (!!):

As @Subas Raj mentioned, defocus and refocus the window - when you come back, your current position is occurrence-highlighted. Either hit AltTab twice, or use your mouse to click/focus some other window, then back.

As @Leo and @Gorky mentions, hit AltShiftO twice. This is the shortcut for toggling highlight occurrences, and when you turn it back on, your current position is occurrence-highlighted.

And finally, a third ACTUAL solution: Replace one specific jar with a patched one:https://bugs.eclipse.org/bugs/show_bug.cgi?id=398509#c60

说是双击变量后,不高亮, 但是当窗口的focus变化了,就会高亮了,这是Eclipse的一个Bug, 解决方法就是将eclipse/plugins/ 目录下的 org.eclipse.e4.ui.workbench_0.11.0.v20130125-100758.jar 替换下。 

亲测可行, 就是反应略卡。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息