score:187

Accepted answer

the color in the bar is the same as the color the text is highlighted with in the editor. it is set by going to

window > preferences > general > editors > text editors > annotations

and changing the occurrences and write occurrences colors.

score:2

after changed the color of "occurances", restart your eclipse ide

score:3

go to windows/preferences/java/editor/mark occurrences and check the box "mark occurrences of the selected element in the current file."

score:5

you'll want to change the "occurrences" and "write occurrences" colors. this can be done in the annotations menu, which is located — as colin said — in the preferences menu under the path

window > preferences > general > editors > text editors > annotations

if you have an occurrence marked in the overview ruler (the column to the right of the scrollbar), you can open the annotations menu directly by right-clicking on the occurrence and selecting "preferences" from the context menu.

occurences have two color options:

  1. the color of "occurrences" is used for instances where the variable is being read, but not modified, in the code (e.g. k in if(k > 1)).
  2. the color of "write occurrences" is used where the variable gets modified/written to in the code (e.g. k in k = k + 1).

see also the official eclipse documentation, about halfway down the page, under the sections "locate variables and their read/write access" and "mark occurrences" (link is for eclipse "indigo" version, but should be good for other recent versions as well).

score:7

the bar is called the overview bar or overview ruler (in case you need to reference it) and, as has been mentioned, the color of occurences can be changed by navigating to:

window > preferences > general > editors > text editors > annotations

and changing the color for occurrences.

one difference to note in eclipse juno (most other responses seem to refer to indigo) is that the change won't take effect until you restart the program.

score:11

right click on the marker and select the only menu item "preferences", this opens the preferences dialog: general/editors/text editor/annotation.

  • the color of "occurances" is used for the matching items,

  • "write occurances" for item selected by you.

the updates do not apply immediatly after using the apply button, only after closing with ok and eventually reselect.


Related Query

More Query from same tag