开发者

Implement "Mark Occurrences" in new Eclipse editor [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist

Closed 9 years ago.

开发者_JAVA百科 Improve this question

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!


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


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.


I know it's been long but if you still want answers, you can refer this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜