Community
Participate
Working Groups
This is one of the issues mentioned on bug 259411. It looks serious enough to make a separate bug out of it and not mix it with the others. GOALS/BENEFITS: org.eclipse.compare.contentmergeviewer.TextMergeViewer.createSourceViewer(Composite, int) should return concrete SourceViewer instead of ISourceViewer interface. The ISourceViewer type is not enough for the MergeSourceViewer to work properly, the MergeSourceViewer requires methods which are not part of the ISourceViewer interface. The concrete class of SourceViewer is the optimal return type. ASSOCIATED BUGS: https://bugs.eclipse.org/bugs/show_bug.cgi?id=259411 RISKS: The bad news is that the method is part API, the good news is that is has been introduced in 3.5. So I guess the risk is low, especially given the fact that the API is marked as "experimental" and using it should be consulted with the Workspace team. Impact is limited to JDT which is the only client of the new API so far. Required changes are in the patch. PERFORMANCE IMPACT: None.
Created attachment 131390 [details] Patch v01
The solution suggested here could still be a no go to Dani who recommended to use ISourceViewer interface[1]. Before I ask Mike for a PMC approval I would be very happy to hear Dani's opinion about it. [1] bug 169386, comment 27
Tomasz I agree. Given that we introduced this in 3.5 and given that it must be at least a SourceViewer we should change this before we ship 3.5. It is very unlikely that someone outside JDT is overriding this method.
Setting the PMC flag.
Tomasz is off today, so to speed it up I sent the request for approval to pmc list too.
Tomasz, let me know when you're ready to make this change.
Compare part committed.
JDT part committed but only changed the code which is related to this bug i.e. discarded all the changes made to the call chain.
Both parts in HEAD, fix available in builds >N20090414-2200. Thanks Dani!