Package org.eclipse.team.ui
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
Deprecated.
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.
-
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
ModifierConstructorDescriptionprotected
PageSaveablePart
(Shell shell, CompareConfiguration compareConfiguration) Deprecated.Create a saveable part. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Control
createPage
(Composite parent, ToolBarManager toolBarManager) Deprecated.Create the page for this part and return the top level control for the page.void
createPartControl
(Composite parent) Deprecated.Creates the SWT controls for this workbench part.void
doSave
(IProgressMonitor monitor) Deprecated.This method flushes the content in any viewers.protected ICompareInput
getCompareInput
(ISelection selection) Deprecated.Return a compare input that represents the selection.Deprecated.Returns the primary control for this part.protected abstract ISelectionProvider
Deprecated.Return the selection provider for the page.protected Shell
getShell()
Deprecated.Return the parent shell of this part.boolean
isDirty()
Deprecated.Returns whether the contents of this part have changed since the last save operation.protected void
prepareCompareInput
(ICompareInput input) Deprecated.Convenience method that callsprepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)
with a progress monitor.protected abstract void
prepareInput
(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) Deprecated.Prepare the compare input for display in a content viewer.protected void
setDirty
(boolean dirty) Deprecated.Set the saveable part's dirty state to the given state.protected void
setNavigator
(ISynchronizePageConfiguration configuration) Deprecated.This method is internal to the framework and should not be called by clients outside of the framework.protected void
setPageDescription
(String title) Deprecated.Set the title of the page's page to the given text.void
setShowContentPanes
(boolean showContentPanes) Deprecated.Set whether the file contents panes should be shown.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
Methods inherited from interface org.eclipse.compare.IContentChangeListener
contentChanged
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
getTitle, getTitleImage
-
Constructor Details
-
PageSaveablePart
Deprecated.Create a saveable part.- Parameters:
shell
- the shell for the partcompareConfiguration
- 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 withPROP_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 interfaceISaveablePart
- Returns:
true
if the contents have been modified and need saving, andfalse
if they have not changed since the last save
-
createPartControl
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:
- Create one or more controls within the parent.
- Set the parent layout as needed.
- Register any global actions with the site's
IActionBars
. - Register any context menus with the site.
- Register a selection provider with the site, to make it available to the
workbench's
ISelectionService
(optional).
- Specified by:
createPartControl
in interfaceIWorkbenchPart
- Parameters:
parent
- the parent control
-
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
Deprecated.Create the page for this part and return the top level control for the page.- Parameters:
parent
- the parent compositetoolBarManager
- the toolbar manager for the page- Returns:
- the top-level control for the page
-
setPageDescription
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
Deprecated.Convenience method that callsprepareInput(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 fromprepareCompareInput(ICompareInput)
and may be called from a non-UI thread. This method should not be called by others.- Parameters:
input
- the inputconfiguration
- the compare configurationmonitor
- a progress monitor- Throws:
InvocationTargetException
- if an error occurs
-
getShell
Deprecated.Return the parent shell of this part.- Returns:
- the parent shell of this part
-
getCompareInput
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 implementsICompareInput
. 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
Deprecated.Returns the primary control for this part.- Returns:
- the primary control for this part.
-
doSave
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 interfaceISaveablePart
- Parameters:
monitor
- a progress monitor
-
CompareEditorInput
andCompareUI.openCompareDialog(org.eclipse.compare.CompareEditorInput)