public abstract class PageCompareEditorInput extends CompareEditorInput implements IContentChangeListener
This class is not intended to be subclassed by clients outside of the Team framework.
DIRTY_STATE, PROP_SELECTED_EDITION, PROP_TITLE, PROP_TITLE_IMAGE
Modifier | Constructor and Description |
---|---|
protected |
PageCompareEditorInput(CompareConfiguration configuration)
Create a page compare editor input.
|
Modifier and Type | Method and Description |
---|---|
protected ICompareInput |
asCompareInput(ISelection selection)
Return a compare input that represents the selection.
|
boolean |
canRunAsJob()
Return whether this compare editor input can be run as a job.
|
void |
contentChanged(IContentChangeNotifier source)
Called whenever the content of the given source has changed.
|
protected abstract IPage |
createPage(CompareViewerPane parent,
IToolBarManager toolBarManager)
Create the page for this part and return the top level control
for the page.
|
protected CompareViewerPane |
createStructureInputPane(Composite parent)
Create the pane that will contain the structure input pane (upper left).
|
protected abstract ISelectionProvider |
getSelectionProvider()
Return the selection provider for the page.
|
protected void |
handleDispose()
Callback that occurs when the UI associated with this compare editor
input is disposed.
|
protected void |
prepareCompareInput(ICompareInput input)
Convenience method that calls
prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)
with a progress monitor. |
protected abstract void |
prepareInput(ICompareInput input,
CompareConfiguration configuration,
IProgressMonitor monitor)
Prepare the compare input for display in a content viewer.
|
protected void |
setPageDescription(String title)
Set the title of the page's page to the given text.
|
addCompareInputChangeListener, addPropertyChangeListener, belongsTo, cancelPressed, contentsCreated, contributeToToolBar, createContents, createContentViewerSwitchingPane, createDiffViewer, createOutlineContents, exists, findContentViewer, findStructureViewer, firePropertyChange, flushLeftViewers, flushRightViewers, flushViewers, getActionBars, getAdapter, getCancelButtonLabel, getCompareConfiguration, getCompareResult, getContainer, getContentViewerDescriptor, getImageDescriptor, getMessage, getName, getNavigator, getOKButtonLabel, getPersistable, getSelectedEdition, getServiceLocator, getStructureViewerDescriptor, getTitle, getTitleImage, getToolTipText, getWorkbenchPart, isDirty, isEditionSelectionDialog, isLeftSaveNeeded, isRightSaveNeeded, isSaveNeeded, okPressed, prepareInput, registerContextMenu, removeCompareInputChangeListener, removePropertyChangeListener, run, run, runAsynchronously, save, saveChanges, setContainer, setContentViewerDescriptor, setDirty, setFocus, setFocus2, setHelpContextId, setLeftDirty, setMessage, setRightDirty, setStatusMessage, setStructureViewerDescriptor, setTitle
protected PageCompareEditorInput(CompareConfiguration configuration)
configuration
- the compare configurationprotected CompareViewerPane createStructureInputPane(Composite parent)
CompareEditorInput
CompareViewerSwitchingPane
is returned. Subclasses
may override to provide an alternate pane.createStructureInputPane
in class CompareEditorInput
parent
- the parent compositeprotected abstract IPage createPage(CompareViewerPane parent, IToolBarManager toolBarManager)
parent
- the parent compositetoolBarManager
- the toolbar manager for the pageprotected abstract ISelectionProvider getSelectionProvider()
protected void setPageDescription(String title)
title
- the page's titleprotected void handleDispose()
CompareEditorInput
CompareEditorInput.createContents(Composite)
.
Subclasses can extend this method but ensure that the overridden method
is invoked.handleDispose
in class CompareEditorInput
protected ICompareInput asCompareInput(ISelection selection)
ICompareInput
.
Subclasses may override.selection
- the selectionprotected final void prepareCompareInput(ICompareInput input)
prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)
with a progress monitor.input
- the compare input to be preparedpublic void contentChanged(IContentChangeNotifier source)
IContentChangeListener
contentChanged
in interface IContentChangeListener
source
- the source whose contents has changedpublic boolean canRunAsJob()
CompareEditorInput
false
is returned since traditionally inputs
were prepared in the foreground (i.e the UI was blocked when the
CompareEditorInput.run(IProgressMonitor)
method (and indirectly the
CompareEditorInput.prepareInput(IProgressMonitor)
method) was invoked. Subclasses
may override.canRunAsJob
in class CompareEditorInput
protected 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
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.