Eclipse的变量标记开关

例如有如下代码:

int var_a = 0; int var_b = var_a + 2;

当光标在var_a变量上时,Eclipse会将代码进行如下标记: int var_a = 0;

int var_b = var_a + 2;

这一特性在编写和分析代码时很有用,当这一功能关闭时,用如下方法打开此功能:

Eclipse菜单->Window->Preferences->Java->Editor->Mark Occurences,勾选“Mark occurences of the selected element in the current file”以及下面的所有选项。

posted on 2014-03-18 08:15  leechau  阅读(355)  评论(0编辑  收藏  举报

导航