views:

67

answers:

1

I've added some functionality to the standard Eclipse "compare view" via a handler which is activated on the Compare view's popup (context) menu. One of the things that this handler does is add a marker at the selection location. However, markers are not shown in the compare view. How can I enhance the compare view to show markers? Do I have to build my own view?

+1  A: 

The compare editor is really different from the standard editors, every functionality has to be reimplemented for it. You have to code it yourself (as far as I know), but you can look at the implementation of the original editor for hints.

In case of Eclipse, AbstractDecoratedTextEditor implements the marker display functionality (that is a descendant of the TextEditor class). What makes this functionality hard to implement in case of Compare editors is the fact, that the compare editor opens two resources at once, so it is harder to put every marker into its correct place (I think that's why it is not implemented generically).

Zoltán Ujhelyi
Even worse, the ruler (CompositeRuler) that is created by the MergeSourceViewer, that is created by the TextMergeViewer, is not accessible. The TextMergeViewer itself is barely accessible, and there seem to be multiple places where a TextMergeViewer is created (TextViewerCreator interface). So I'm basically screwed.
dplass