Class PageCompareEditorInput

    • Constructor Detail

      • PageCompareEditorInput

        protected PageCompareEditorInput​(CompareConfiguration configuration)
        Create a page compare editor input.
        Parameters:
        configuration - the compare configuration
    • Method Detail

      • createPage

        protected abstract IPage createPage​(CompareViewerPane parent,
                                            IToolBarManager toolBarManager)
        Create the page for this part and return the top level control for the page.
        Parameters:
        parent - the parent composite
        toolBarManager - the toolbar manager for the page
        Returns:
        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.
        Returns:
        the selection provider for the page
      • setPageDescription

        protected void setPageDescription​(java.lang.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.
        Parameters:
        title - the page's title
      • 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.
        Parameters:
        selection - the selection
        Returns:
        a compare input representing the selection
      • prepareInput

        protected abstract void prepareInput​(ICompareInput input,
                                             CompareConfiguration configuration,
                                             IProgressMonitor monitor)
                                      throws java.lang.reflect.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.
        Parameters:
        input - the input
        configuration - the compare configuration
        monitor - a progress monitor
        Throws:
        java.lang.reflect.InvocationTargetException - if an error occurs