Eclipse Platform
2.0

org.eclipse.compare.contentmergeviewer
Interface IMergeViewerContentProvider

All Superinterfaces:
IContentProvider

public interface IMergeViewerContentProvider
extends IContentProvider

A content provider that mediates between a ContentMergeViewer's model and the viewer itself.

Clients may implement this interface.

See Also:
ContentMergeViewer

Method Summary
 Object getAncestorContent(Object input)
          Returns the contents for the ancestor side of a ContentMergeViewer.
 Image getAncestorImage(Object input)
          Returns an optional image for the ancestor side of a ContentMergeViewer.
 String getAncestorLabel(Object input)
          Returns the label for the ancestor side of a ContentMergeViewer.
 Object getLeftContent(Object input)
          Returns the contents for the left side of a ContentMergeViewer.
 Image getLeftImage(Object input)
          Returns an optional image for the left side of a ContentMergeViewer.
 String getLeftLabel(Object input)
          Returns the label for the left side of a ContentMergeViewer.
 Object getRightContent(Object input)
          Returns the contents for the right side of a ContentMergeViewer.
 Image getRightImage(Object input)
          Returns an optional image for the right side of a ContentMergeViewer.
 String getRightLabel(Object input)
          Returns the label for the right side of a ContentMergeViewer.
 boolean isLeftEditable(Object input)
          Returns whether the left side is editable.
 boolean isRightEditable(Object input)
          Returns whether the right side is editable.
 void saveLeftContent(Object input, byte[] bytes)
          Saves new contents for the left side of the ContentMergeViewer.
 void saveRightContent(Object input, byte[] bytes)
          Saves new contents for the right side of the ContentMergeViewer.
 boolean showAncestor(Object input)
          Returns whether the ancestor side of the given input element should be shown.
 
Methods inherited from interface org.eclipse.jface.viewers.IContentProvider
dispose, inputChanged
 

Method Detail

getAncestorLabel

public String getAncestorLabel(Object input)
Returns the label for the ancestor side of a ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the label for the ancestor side of a ContentMergeViewer

getAncestorImage

public Image getAncestorImage(Object input)
Returns an optional image for the ancestor side of a ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the image for the ancestor side of a ContentMergeViewer, or null if none

getAncestorContent

public Object getAncestorContent(Object input)
Returns the contents for the ancestor side of a ContentMergeViewer. The interpretation of the returned object depends on the concrete ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the content for the ancestor side of a ContentMergeViewer, or null if none

showAncestor

public boolean showAncestor(Object input)
Returns whether the ancestor side of the given input element should be shown.

Returns:
true if the ancestor side of the given input element should be shown

getLeftLabel

public String getLeftLabel(Object input)
Returns the label for the left side of a ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the label for the left side of a ContentMergeViewer

getLeftImage

public Image getLeftImage(Object input)
Returns an optional image for the left side of a ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the image for the left side of a ContentMergeViewer, or null if none

getLeftContent

public Object getLeftContent(Object input)
Returns the contents for the left side of a ContentMergeViewer. The interpretation of the returned object depends on the concrete ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the content for the left side of a ContentMergeViewer, or null if none

isLeftEditable

public boolean isLeftEditable(Object input)
Returns whether the left side is editable.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
true if the left side of a ContentMergeViewer is editable

saveLeftContent

public void saveLeftContent(Object input,
                            byte[] bytes)
Saves new contents for the left side of the ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
bytes - the new contents to save for the left side

getRightLabel

public String getRightLabel(Object input)
Returns the label for the right side of a ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the label for the right side of a ContentMergeViewer

getRightImage

public Image getRightImage(Object input)
Returns an optional image for the right side of a ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the image for the right side of a ContentMergeViewer, or null if none

getRightContent

public Object getRightContent(Object input)
Returns the contents for the right side of a ContentMergeViewer. The interpretation of the returned object depends on the concrete ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
the content for the right side of a ContentMergeViewer, or null if none

isRightEditable

public boolean isRightEditable(Object input)
Returns whether the right side is editable.

Parameters:
input - the input object of the ContentMergeViewer
Returns:
true if the right side of a ContentMergeViewer is editable

saveRightContent

public void saveRightContent(Object input,
                             byte[] bytes)
Saves new contents for the right side of the ContentMergeViewer.

Parameters:
input - the input object of the ContentMergeViewer
bytes - the new contents to save for the right side

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.