CompareEditorInput
and CompareUI.openCompareDialog(org.eclipse.compare.CompareEditorInput)
public abstract class PageSaveablePart extends SaveablePartAdapter implements IContentChangeListener
PROP_DIRTY
PROP_TITLE
Modifier | Constructor and Description |
---|---|
protected |
PageSaveablePart(Shell shell,
CompareConfiguration compareConfiguration)
Deprecated.
Create a saveable part.
|
Modifier and Type | Method and Description |
---|---|
protected 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.
|
Control |
getControl()
Deprecated.
Returns the primary control for this part.
|
protected abstract ISelectionProvider |
getSelectionProvider()
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 calls
prepareInput(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.
|
addPropertyListener, dispose, doSaveAs, getAdapter, getSite, getTitleToolTip, isSaveAsAllowed, isSaveOnCloseNeeded, removePropertyListener, setFocus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contentChanged
getTitle, getTitleImage
protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguration)
shell
- the shell for the partcompareConfiguration
- the compare configurationpublic boolean isDirty()
ISaveablePart
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.
isDirty
in interface ISaveablePart
true
if the contents have been modified and need
saving, and false
if they have not changed since the last
savepublic void createPartControl(Composite parent)
IWorkbenchPart
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:
IActionBars
.ISelectionService
(optional). createPartControl
in interface IWorkbenchPart
parent
- the parent controlprotected abstract ISelectionProvider getSelectionProvider()
protected abstract Control createPage(Composite parent, ToolBarManager toolBarManager)
parent
- the parent compositetoolBarManager
- the toolbar manager for the pageprotected void setPageDescription(String title)
title
- the page's titleprotected void setDirty(boolean dirty)
dirty
- the dirty stateprotected void prepareCompareInput(ICompareInput input)
prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)
with a progress monitor.input
- the compare input to be preparedprotected abstract void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException
prepareCompareInput(ICompareInput)
and may be called
from a non-UI thread. This method should not be called by others.input
- the inputconfiguration
- the compare configurationmonitor
- a progress monitorInvocationTargetException
protected Shell getShell()
protected void setNavigator(ISynchronizePageConfiguration configuration)
protected ICompareInput getCompareInput(ISelection selection)
ICompareInput
.
Subclasses may override.selection
- the selectionpublic void setShowContentPanes(boolean showContentPanes)
showContentPanes
- whether to show contents panepublic Control getControl()
public void doSave(IProgressMonitor monitor)
doSave
in interface ISaveablePart
monitor
- a progress monitor
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.