Bug 24597

Summary: Compare UI API issues
Product: [Eclipse Project] Platform Reporter: Michael Valenta <Michael.Valenta>
Component: CompareAssignee: Platform-Compare-Inbox <platform-compare-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Michael Valenta CLA 2002-10-09 16:30:48 EDT
I am in the process of implementing a "Restore from Repository" for the CVS 
provider that is similar to the restore from local history 
(AddFromHistoryDialog). I noticed that there are several class that may be of 
use to me (CompareViewerPane and CompareViewerSwitchingPane). These classes 
appear to be API (they are in the org.eclipse.compare package) but they seem to 
require the use of a Splitter class which appears not to be API (it is found in 
an internal package). It seems to me that either Splitter should be API or the 
other classes shouldn't be.
Comment 1 Michael Valenta CLA 2002-10-09 16:36:41 EDT
As an aside, I noticed that the AddFromHistoryDialog makes the top two 
CompareViewerPanes children of a composite instead of the direct children of 
the Splitter which disables the double-click maximize behavior. This may have 
been intended but I thought I would mention it.
Comment 2 Michael Valenta CLA 2002-10-15 09:43:42 EDT
Also, CompareUIPlugin#findContentViewer seems to provide a generally useful 
mechanism for viewing the contents of a file with syntax highlighting. This 
method is internal to Compare and I could not find means to do this that was 
API. Perhaps this should be made part of the compare or platform UI API.
Comment 3 Andre Weinand CLA 2002-12-02 05:02:45 EST
Duplicated internal class Splitter as public API to org.eclipse.compare (and deprecated 
internal Splitter). Please adapt your code.

Method CompareUIPlugin#findContentViewer is already available as CompareUI
#findContentViewer.
Comment 4 Michael Valenta CLA 2002-12-11 11:24:21 EST
I have changed my code to use the new Splitter class but I can't use the 
CompareUI#findContentViewer because it needs an ICompareInput and I have an 
IStreamContentAccessor. Could you add an additional method to CompareUI?
Comment 5 Andre Weinand CLA 2003-01-27 06:22:16 EST
for I20030128:
Removed deprecated internal class Splitter.
Added new method CompareUI#findContentViewer(..., Object input, ...)
Please note, that the input must implement both interfaces IStreamContentAccessor and 
ITypedElement, because the IStreamContentAccessor doesn't provide a type  (I've 
updated the comment).
Comment 6 Michael Valenta CLA 2003-01-27 16:03:08 EST
I've ipdated the CVS code to use the new API