Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I highlight multiple variables in Eclipse?

Tags:

java

eclipse

ide

In Eclipse, if you rest your cursor on a variable it will highlight that variable everywhere in the code. I was wondering how you could highlight more than one variable at a time?

like image 739
Buttons840 Avatar asked Oct 10 '22 02:10

Buttons840


1 Answers

Not exactly what you want, but using the find dialog you can look for two variables in the same search.

  1. Mark the Regular Expressions Checkbox in the Options.
  2. Use a regular expression in the Find textbox. For example if you are looking both for the index and count variables use (index)|(count).
  3. The Find button will cycle through all instances of both index and count.

This can be expanded to even more tricky searches.

like image 121
Marcelo Avatar answered Oct 14 '22 05:10

Marcelo