Eclipse 选中变量高亮
选择:windows-> preferences->java->Editor->Mark Occurences
选择最上的复选框,下面的就有很多了。
其中的 Local variables 就是变量的高亮显示。
改变选中变量的颜色:
选择:windows-> preferences->java->Editor->Mark Occurences->第一行有个“Annotations”点击进入,显示出列表,找到 Occurrence annotation 右边选择 Color 。