As you know, in eclipse, a variable or method name (or a word) is selected, and the same variable is highlighted in the current file, which is useful. It is convenient for us to find out where the variable is being used. A while ago, my eclipse's functionality suddenly failed. Really annoying, this let me pick up the code to be particularly awkward, for this situation absolutely can not be, must solve quickly, the problem is finally found, and it is easy to solve, there are many ways, the following we look at:
The first type: shortcut keys
This is the quickest way: Alt + Shift + O.
The second type: shortcut menu
This is also handy and intuitive , with a pen-style button (Toggle Mark occurrences) in the Eclipse toolbar, click to set it to the selected state, and the effect
Third: adjust in Eclipse settings
This way is more troublesome than the previous two, but it functions more, you can set more parameters, such as highlighting the color, such as the specific steps:window-> Preferences->java->editor->mark Occurences, then press the check box to:
Click on the top row of "Annotations" can set the color and other parameters, here is not elaborate, interested can try. constantly accumulate the use of software skills, so that our tools become more intelligent, more understanding of your heart.
Novice Tutorial Tools use (12)--eclipse highlight the same variable selected