Eclipse Platform
Release 3.2

org.eclipse.team.ui.history
Class HistoryPageSaveablePart

java.lang.Object
  extended byorg.eclipse.team.ui.SaveablePartAdapter
      extended byorg.eclipse.team.ui.PageSaveablePart
          extended byorg.eclipse.team.ui.history.HistoryPageSaveablePart
All Implemented Interfaces:
IAdaptable, IContentChangeListener, ISaveablePart, ISaveableWorkbenchPart, IWorkbenchPart

public class HistoryPageSaveablePart
extends PageSaveablePart


Field Summary
 
Fields inherited from interface org.eclipse.team.ui.ISaveableWorkbenchPart
PROP_DIRTY
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
HistoryPageSaveablePart(Shell shell, CompareConfiguration cc, IHistoryPage pageSource)
           
 
Method Summary
 void contentChanged(IContentChangeNotifier source)
          Called whenever the content of the given source has changed.
 void createPartControl(Composite parent2)
          Creates the SWT controls for this workbench part.
 void doSave(IProgressMonitor monitor)
          Saves the contents of this part.
 String getTitle()
          Returns the title of this workbench part.
 Image getTitleImage()
          Returns the title image of this workbench part.
protected  void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor)
           
 
Methods inherited from class org.eclipse.team.ui.PageSaveablePart
getCompareConfiguration, getCompareInput, getContentPane, getControl, getDirtyViewers, getEditionPane, getShell, getStructuredComparePane, hookContentChangeListener, isDirty, prepareCompareInput, setDirty, setInput, setShowContentPanes
 
Methods inherited from class org.eclipse.team.ui.SaveablePartAdapter
addPropertyListener, dispose, doSaveAs, getAdapter, getSite, getTitleToolTip, isSaveAsAllowed, isSaveOnCloseNeeded, removePropertyListener, setFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryPageSaveablePart

public HistoryPageSaveablePart(Shell shell,
                               CompareConfiguration cc,
                               IHistoryPage pageSource)
Method Detail

getTitle

public String getTitle()
Description copied from interface: IWorkbenchPart
Returns the title of this workbench part. If this value changes the part must fire a property listener event with PROP_TITLE.

The title is used to populate the title bar of this part's visual container.

Specified by:
getTitle in interface IWorkbenchPart
Specified by:
getTitle in class PageSaveablePart

getTitleImage

public Image getTitleImage()
Description copied from interface: IWorkbenchPart
Returns the title image of this workbench part. If this value changes the part must fire a property listener event with PROP_TITLE.

The title image is usually used to populate the title bar of this part's visual container. Since this image is managed by the part itself, callers must not dispose the returned image.

Specified by:
getTitleImage in interface IWorkbenchPart
Specified by:
getTitleImage in class PageSaveablePart

contentChanged

public void contentChanged(IContentChangeNotifier source)
Description copied from interface: IContentChangeListener
Called whenever the content of the given source has changed.

Parameters:
source - the source whose contents has changed

createPartControl

public void createPartControl(Composite parent2)
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
Overrides:
createPartControl in class PageSaveablePart

prepareInput

protected void prepareInput(ICompareInput input,
                            CompareConfiguration configuration,
                            IProgressMonitor monitor)
                     throws InvocationTargetException
Specified by:
prepareInput in class PageSaveablePart
Throws:
InvocationTargetException

doSave

public void doSave(IProgressMonitor monitor)
Description copied from interface: ISaveablePart
Saves the contents of this part.

If the save is successful, the part should fire a property changed event reflecting the new dirty state (PROP_DIRTY property).

If the save is cancelled through user action, or for any other reason, the part should invoke setCancelled on the IProgressMonitor to inform the caller.

This method is long-running; progress and cancellation are provided by the given progress monitor.

Parameters:
monitor - the progress monitor

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.