Class PageSaveablePart

java.lang.Object
org.eclipse.team.ui.SaveablePartAdapter
org.eclipse.team.ui.PageSaveablePart
All Implemented Interfaces:
IContentChangeListener, IAdaptable, ISaveableWorkbenchPart, ISaveablePart, IWorkbenchPart
Direct Known Subclasses:
HistoryPageSaveablePart, ParticipantPageSaveablePart

@Deprecated public abstract class PageSaveablePart extends SaveablePartAdapter implements IContentChangeListener
Abstract class for hosting a page based structure input view for the purposes of feeding compare viewers.
Since:
3.2
Restriction:
This class is not intended to be subclassed by clients outside of the Team framework.
  • Constructor Details

    • PageSaveablePart

      protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguration)
      Deprecated.
      Create a saveable part.
      Parameters:
      shell - the shell for the part
      compareConfiguration - the compare configuration
  • Method Details

    • isDirty

      public boolean isDirty()
      Deprecated.
      Description copied from interface: ISaveablePart
      Returns whether the contents of this part have changed since the last save operation. If this value changes the part must fire a property listener event with PROP_DIRTY.

      Note: this method is called often on a part open or part activation switch, for example by actions to determine their enabled status.

      Specified by:
      isDirty in interface ISaveablePart
      Returns:
      true if the contents have been modified and need saving, and false if they have not changed since the last save
    • createPartControl

      public void createPartControl(Composite parent)
      Deprecated.
      Description copied from interface: IWorkbenchPart
      Creates the SWT controls for this workbench part.

      Clients should not call this method (the workbench calls this method when it needs to, which may be never).

      For implementors this is a multi-step process:

      1. Create one or more controls within the parent.
      2. Set the parent layout as needed.
      3. Register any global actions with the site's IActionBars.
      4. Register any context menus with the site.
      5. Register a selection provider with the site, to make it available to the workbench's ISelectionService (optional).
      Specified by:
      createPartControl in interface IWorkbenchPart
      Parameters:
      parent - the parent control
    • getSelectionProvider

      protected abstract ISelectionProvider getSelectionProvider()
      Deprecated.
      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
    • createPage

      protected abstract Control createPage(Composite parent, ToolBarManager toolBarManager)
      Deprecated.
      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
    • setPageDescription

      protected void setPageDescription(String title)
      Deprecated.
      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
    • setDirty

      protected void setDirty(boolean dirty)
      Deprecated.
      Set the saveable part's dirty state to the given state.
      Parameters:
      dirty - the dirty state
    • prepareCompareInput

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

      protected abstract void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException
      Deprecated.
      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:
      InvocationTargetException - if an error occurs
    • getShell

      protected Shell getShell()
      Deprecated.
      Return the parent shell of this part.
      Returns:
      the parent shell of this part
    • setNavigator

      protected void setNavigator(ISynchronizePageConfiguration configuration)
      Deprecated.
      This method is internal to the framework and should not be called by clients outside of the framework.
    • getCompareInput

      protected ICompareInput getCompareInput(ISelection selection)
      Deprecated.
      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
    • setShowContentPanes

      public void setShowContentPanes(boolean showContentPanes)
      Deprecated.
      Set whether the file contents panes should be shown. If they are not, only the page will be shown.
      Parameters:
      showContentPanes - whether to show contents pane
    • getControl

      public Control getControl()
      Deprecated.
      Returns the primary control for this part.
      Returns:
      the primary control for this part.
    • doSave

      public void doSave(IProgressMonitor monitor)
      Deprecated.
      This method flushes the content in any viewers. Subclasses should override if they need to perform additional processing when a save is performed.
      Specified by:
      doSave in interface ISaveablePart
      Parameters:
      monitor - a progress monitor