Class PageCompareEditorInput

All Implemented Interfaces:
ICompareContainer, IContentChangeListener, IPropertyChangeNotifier, IAdaptable, IRunnableContext, IRunnableWithProgress, IEditorInput
Direct Known Subclasses:
HistoryPageCompareEditorInput, ParticipantPageCompareEditorInput

public abstract class PageCompareEditorInput extends CompareEditorInput implements IContentChangeListener
Abstract class for hosting a page based structure input view for the purposes of feeding compare viewers.

This class is not intended to be subclassed by clients outside of the Team framework.

  • Constructor Details

    • PageCompareEditorInput

      protected PageCompareEditorInput(CompareConfiguration configuration)
      Create a page compare editor input.
      configuration - the compare configuration
  • Method Details

    • createStructureInputPane

      protected CompareViewerPane createStructureInputPane(Composite parent)
      Description copied from class: CompareEditorInput
      Create the pane that will contain the structure input pane (upper left). By default, a CompareViewerSwitchingPane is returned. Subclasses may override to provide an alternate pane.
      createStructureInputPane in class CompareEditorInput
      parent - the parent composite
      the structure input pane
    • createPage

      protected abstract IPage createPage(CompareViewerPane parent, IToolBarManager toolBarManager)
      Create the page for this part and return the top level control for the page.
      parent - the parent composite
      toolBarManager - the toolbar manager for the page
      the top-level control for the page
    • getSelectionProvider

      protected abstract ISelectionProvider getSelectionProvider()
      Return the selection provider for the page. This method is called after the page is created in order to register a selection listener on the page.
      the selection provider for the page
    • setPageDescription

      protected void setPageDescription(String title)
      Set the title of the page's page to the given text. The title will appear in the header of the pane containing the page.
      title - the page's title
    • handleDispose

      protected void handleDispose()
      Description copied from class: CompareEditorInput
      Callback that occurs when the UI associated with this compare editor input is disposed. This method will only be invoked if the UI has been created (i.e. after the call to CompareEditorInput.createContents(Composite). Subclasses can extend this method but ensure that the overridden method is invoked.
      handleDispose in class CompareEditorInput
    • asCompareInput

      protected ICompareInput asCompareInput(ISelection selection)
      Return a compare input that represents the selection. This input is used to feed the structure and content viewers. By default, a compare input is returned if the selection is of size 1 and the selected element implements ICompareInput. Subclasses may override.
      selection - the selection
      a compare input representing the selection
    • prepareCompareInput

      protected final void prepareCompareInput(ICompareInput input)
      Convenience method that calls prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor) with a progress monitor.
      input - the compare input to be prepared
    • contentChanged

      public void contentChanged(IContentChangeNotifier source)
      Description copied from interface: IContentChangeListener
      Called whenever the content of the given source has changed.
      Specified by:
      contentChanged in interface IContentChangeListener
      source - the source whose contents has changed
    • canRunAsJob

      public boolean canRunAsJob()
      Description copied from class: CompareEditorInput
      Returns whether this compare editor input can be run as a job. By default, false is returned since traditionally inputs were prepared in the foreground (i.e the UI was blocked when the method (and indirectly the CompareEditorInput.prepareInput(IProgressMonitor) method) was invoked. Subclasses may override.
      canRunAsJob in class CompareEditorInput
      whether this compare editor input can be run in the background
    • prepareInput

      protected abstract void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException
      Prepare the compare input for display in a content viewer. This method is called from prepareCompareInput(ICompareInput) and may be called from a non-UI thread. This method should not be called by others.
      input - the input
      configuration - the compare configuration
      monitor - a progress monitor
      InvocationTargetException - if an error occurs