|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.compare.CompareEditorInput
org.eclipse.team.ui.PageCompareEditorInput
org.eclipse.team.ui.history.HistoryPageCompareEditorInput
Displays a history page combined with the compare/merge infrastructure. This only works properly if the
history page adapts to an IHistoryCompareAdapter.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.compare.CompareEditorInput |
|---|
DIRTY_STATE, PROP_SELECTED_EDITION, PROP_TITLE, PROP_TITLE_IMAGE |
| Constructor Summary | |
|---|---|
HistoryPageCompareEditorInput(CompareConfiguration configuration,
IHistoryPageSource pageSource,
Object object)
Create a history page compare editor input for the given page and object. |
|
| Method Summary | |
|---|---|
protected ICompareInput |
asCompareInput(ISelection selection)
Return a compare input that represents the selection. |
protected IPage |
createPage(CompareViewerPane parent,
IToolBarManager toolBarManager)
Create the page for this part and return the top level control for the page. |
IHistoryPage |
getHistoryPage()
Return the history page for this input or null if the
page hasn't been created yet. |
String |
getOKButtonLabel()
Return the label to be used for the OK
button when this input is displayed in a dialog.
|
protected 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 |
handlePropertyChange(PropertyChangeEvent event)
Handle a property change event from the history page. |
boolean |
isEditionSelectionDialog()
Return whether this input is intended to be used to select a particular edition of an element in a dialog. |
protected boolean |
isReplaceDialog()
Return whether this compare editor input is being used in a replace dialog. |
boolean |
okPressed()
The OK button was pressed in a dialog. |
protected void |
performReplace(Object selectedObject)
A replace has been requested. |
protected void |
prepareInput(ICompareInput input,
CompareConfiguration configuration,
IProgressMonitor monitor)
Prepare the compare input for display in a content viewer. |
protected Object |
prepareInput(IProgressMonitor monitor)
Runs the compare operation and returns the compare result. |
void |
setReplace(boolean isReplace)
Set whether this compare editor input is being used in a replace dialog. |
| Methods inherited from class org.eclipse.team.ui.PageCompareEditorInput |
|---|
canRunAsJob, contentChanged, createStructureInputPane, prepareCompareInput, setPageDescription |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HistoryPageCompareEditorInput(CompareConfiguration configuration,
IHistoryPageSource pageSource,
Object object)
configuration - the compare configurationpageSource - the page sourceobject - the object whose history is to be displayed| Method Detail |
protected Object prepareInput(IProgressMonitor monitor)
throws InvocationTargetException,
InterruptedException
CompareEditorInputnull is returned no differences were found and no compare editor needs to be opened.
Progress should be reported to the given progress monitor.
A request to cancel the operation should be honored and acknowledged
by throwing InterruptedException.
Note: this method is typically called in a modal context thread which doesn't have a Display assigned. Implementors of this method shouldn't therefore allocated any SWT resources in this method.
prepareInput in class CompareEditorInputmonitor - the progress monitor to use to display progress and receive
requests for cancelation
null if there are no differences
InterruptedException - if the operation detects a request to cancel,
using IProgressMonitor.isCanceled(), it should exit by throwing
InterruptedException
InvocationTargetException - if the prepareInput method must propagate a checked exception,
it should wrap it inside an InvocationTargetException; runtime exceptions are automatically
wrapped in an InvocationTargetException by the calling contextprotected void handleDispose()
CompareEditorInputCompareEditorInput.createContents(Composite).
Subclasses can extend this method but ensure that the overridden method
is invoked.
handleDispose in class PageCompareEditorInput
protected IPage createPage(CompareViewerPane parent,
IToolBarManager toolBarManager)
PageCompareEditorInput
createPage in class PageCompareEditorInputparent - the parent compositetoolBarManager - the toolbar manager for the page
protected ICompareInput asCompareInput(ISelection selection)
PageCompareEditorInputICompareInput.
Subclasses may override.
asCompareInput in class PageCompareEditorInputselection - the selection
protected ISelectionProvider getSelectionProvider()
PageCompareEditorInput
getSelectionProvider in class PageCompareEditorInput
protected void prepareInput(ICompareInput input,
CompareConfiguration configuration,
IProgressMonitor monitor)
throws InvocationTargetException
PageCompareEditorInputPageCompareEditorInput.prepareCompareInput(ICompareInput) and may be called
from a non-UI thread. This method should not be called by others.
prepareInput in class PageCompareEditorInputinput - the inputconfiguration - the compare configurationmonitor - a progress monitor
InvocationTargetExceptionpublic final IHistoryPage getHistoryPage()
null if the
page hasn't been created yet.
protected void handlePropertyChange(PropertyChangeEvent event)
event - the change eventpublic boolean isEditionSelectionDialog()
CompareEditorInputfalse is returned.
isEditionSelectionDialog in class CompareEditorInputCompareEditorInput.getOKButtonLabel(),
CompareEditorInput.okPressed(),
CompareEditorInput.getSelectedEdition()protected boolean isReplaceDialog()
public void setReplace(boolean isReplace)
isReplace - whether this compare editor input is being used in a replace
dialogpublic String getOKButtonLabel()
CompareEditorInputOK
button when this input is displayed in a dialog.
By default, different labels are used depending on
whether the input is editable or is for edition selection
(see CompareEditorInput.isEditionSelectionDialog().
getOKButtonLabel in class CompareEditorInputOK
button when this input is displayed in a dialogpublic boolean okPressed()
CompareEditorInputOK button was pressed in a dialog. If one or both of
the sides of the input is editable then any changes will be saved. If the
input is for edition selection (see CompareEditorInput.isEditionSelectionDialog()),
it is up to subclasses to override this method in order to perform the
appropriate operation on the selected edition.
okPressed in class CompareEditorInput
protected void performReplace(Object selectedObject)
throws CoreException
isReplaceDialog() is true
and the user has clicked the "Replace" button.
By default, this method does nothing.
Subclasses may override.
selectedObject - the selected object
CoreException - if an error occurs performing the replace
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.