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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getAncestorContent​(java.lang.Object input)
      Returns the contents for the ancestor side of a ContentMergeViewer.
      Image getAncestorImage​(java.lang.Object input)
      Returns an optional image for the ancestor side of a ContentMergeViewer.
      java.lang.String getAncestorLabel​(java.lang.Object input)
      Returns the label for the ancestor side of a ContentMergeViewer.
      java.lang.Object getLeftContent​(java.lang.Object input)
      Returns the contents for the left side of a ContentMergeViewer.
      Image getLeftImage​(java.lang.Object input)
      Returns an optional image for the left side of a ContentMergeViewer.
      java.lang.String getLeftLabel​(java.lang.Object input)
      Returns the label for the left side of a ContentMergeViewer.
      java.lang.Object getRightContent​(java.lang.Object input)
      Returns the contents for the right side of a ContentMergeViewer.
      Image getRightImage​(java.lang.Object input)
      Returns an optional image for the right side of a ContentMergeViewer.
      java.lang.String getRightLabel​(java.lang.Object input)
      Returns the label for the right side of a ContentMergeViewer.
      boolean isLeftEditable​(java.lang.Object input)
      Returns whether the left side is editable.
      boolean isRightEditable​(java.lang.Object input)
      Returns whether the right side is editable.
      void saveLeftContent​(java.lang.Object input, byte[] bytes)
      Saves new contents for the left side of the ContentMergeViewer.
      void saveRightContent​(java.lang.Object input, byte[] bytes)
      Saves new contents for the right side of the ContentMergeViewer.
      boolean showAncestor​(java.lang.Object input)
      Returns whether the ancestor side of the given input element should be shown.
    • Method Detail

      • getAncestorLabel

        java.lang.String getAncestorLabel​(java.lang.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

        Image getAncestorImage​(java.lang.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

        java.lang.Object getAncestorContent​(java.lang.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

        boolean showAncestor​(java.lang.Object input)
        Returns whether the ancestor side of the given input element should be shown.
        Parameters:
        input - the merge viewer's input
        Returns:
        true if the ancestor side of the given input element should be shown
      • getLeftLabel

        java.lang.String getLeftLabel​(java.lang.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

        Image getLeftImage​(java.lang.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

        java.lang.Object getLeftContent​(java.lang.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

        boolean isLeftEditable​(java.lang.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

        void saveLeftContent​(java.lang.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

        java.lang.String getRightLabel​(java.lang.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

        Image getRightImage​(java.lang.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

        java.lang.Object getRightContent​(java.lang.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

        boolean isRightEditable​(java.lang.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

        void saveRightContent​(java.lang.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