Eclipse不会为我突出显示匹配的变量:

我已经试着通过

Window -> Preferences -> Java -> Editor -> Mark Occurrences

但这并没有起作用。我不知道为什么这个不行,而其他的 我们已经解决了这个问题。

有人能告诉我如何设置高亮匹配变量吗?

用我的眼睛寻找相同的变量真的很困扰我。


当前回答

唯一对我有用的是:

Java > Editor > Mark Occurrences:
Check "Mark occurrences of te selected element in the current file."
... and maybe all the ones below.

其他回答

Try:

window > preferences > java > editor > mark occurrences 

选择所有可用的选项。

也可以去:

Preferences > General > Editors > Text Editors > Annotations

比较' occurrence '和'Write Occurrences'的设置

确保你没有选中其中一个“文本高亮显示”选项。

这应该能解决问题。

.

Java -编辑器-标记事件

面向Web开发人员的Eclipse Java EE IDE。 版本:Photon Release (4.8.0)

也许是因为它不支持脚本中的代码高亮显示。不过我不确定。

你可以尝试使用一个eclipse插件,比如“glance search”,它的工作效果很好。 这里有一个链接 http://code.google.com/p/eclipse-glance/

我遇到了同样的问题,上面的“制造事件”和“注释”解决方案没有帮助。如果您正在使用Maven,那么我必须将项目转换为Maven项目(在Package Explorer中右键单击它并向下单击配置),然后构建项目。然后,语法上色和高亮显示正常工作。

唯一对我有用的是:

Java > Editor > Mark Occurrences:
Check "Mark occurrences of te selected element in the current file."
... and maybe all the ones below.