I am working on an eclipse plugin that implements a new editor. I would like to implement "Mark Occurences" wherein when the cursor is on one variable, all its occurances in the open editor are highlighted. Is there a way to implement this? Thanks!
Asked
Active
Viewed 1,036 times
3 Answers
3
You need to implement your own Annotations
and display them using your SourceViewer
.
Maybe start reading about this here: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/editors_annotations.htm

Arne Deutsch
- 14,629
- 5
- 53
- 72
0
I don't know if this is what wou want to implement, but there is already an Eclipse plugin that highlights all occurrences for a given text (not only at editor view but in the currently focused view (search results, console, Navigator, outline, etc.), and does incremental text search too. That includes, but is not limited to, variables.
I'm talking about Eclipse Glance.

robinst
- 30,027
- 10
- 102
- 108

Francisco Alvarado
- 2,815
- 2
- 26
- 51