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

来源:互联网 发布:软件开发就业形势 编辑:程序博客网 时间:2024/06/06 14:03

在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 (!!):

  1. 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.
  2. 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 替换下。 

亲测可行, 就是反应略卡。


1 0
原创粉丝点击