Class AbstractViewer

java.lang.Object
org.eclipse.jface.viewers.Viewer
org.eclipse.compare.internal.AbstractViewer
All Implemented Interfaces:
IInputProvider, IInputSelectionProvider, ISelectionProvider
Direct Known Subclasses:
BinaryCompareViewer, NullViewer, SimpleTextViewer

public abstract class AbstractViewer extends Viewer
  • Constructor Details

    • AbstractViewer

      public AbstractViewer()
  • Method Details

    • setInput

      public void setInput(Object input)
      Description copied from class: Viewer
      Sets or clears the input for this viewer.
      Specified by:
      setInput in class Viewer
      Parameters:
      input - the input of this viewer, or null if none
    • getInput

      public Object getInput()
      Description copied from interface: IInputProvider
      Returns the input.
      Specified by:
      getInput in interface IInputProvider
      Specified by:
      getInput in class Viewer
      Returns:
      the input object
    • getSelection

      public ISelection getSelection()
      Description copied from interface: ISelectionProvider
      Returns the current selection for this provider.
      Specified by:
      getSelection in interface ISelectionProvider
      Specified by:
      getSelection in class Viewer
      Returns:
      the current selection
    • setSelection

      public void setSelection(ISelection s, boolean reveal)
      Description copied from class: Viewer
      Sets a new selection for this viewer and optionally makes it visible.

      Subclasses must implement this method.

      Specified by:
      setSelection in class Viewer
      Parameters:
      s - the new selection
      reveal - true if the selection is to be made visible, and false otherwise
    • refresh

      public void refresh()
      Description copied from class: Viewer
      Refreshes this viewer completely with information freshly obtained from this viewer's model.
      Specified by:
      refresh in class Viewer