Display markers in the Eclipse file comparison view

I added some functionality to the standard Eclipse “compare view” using a handler that is activated in the “Compare” context menu. One of the things this handler does is add a marker to the place of choice. However, markers are not displayed as a comparison. How can I improve the comparison view to show markers? Do I need to create my own view?

+3
source share
1 answer

The comparison editor is really different from the standard editors, each functionality must be redefined for it. You should encode it yourself (as far as I know), but you can look at the implementation of the original editor for tips.

In the case of Eclipse, AbstractDecoratedTextEditor implements marker display functionality (that is, a descendant of the TextEditor class). What makes this functionality difficult to implement in the case of Compare editors is that the comparison editor opens two resources at once, so it’s more difficult to put each marker in the right place (I think why it is not implemented as a whole).

+2
source

Source: https://habr.com/ru/post/1755556/


All Articles