public abstract class AbstractEMFCompareEditorInput extends CompareEditorInput
CompareEditorInput to be use to open CompareEditor with results of EMF
Compare.DIRTY_STATE, PROP_SELECTED_EDITION, PROP_TITLE, PROP_TITLE_IMAGE| Constructor and Description |
|---|
AbstractEMFCompareEditorInput(EMFCompareConfiguration configuration,
ICompareEditingDomain editingDomain,
AdapterFactory adapterFactory)
Constructor that call super with an unmodified
CompareConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelPressed()
It will undo all operations executed on the command stack until
no more can be undone. |
protected abstract Object |
doPrepareInput(IProgressMonitor monitor)
Runs the compare operation and returns the compare result.
|
protected AdapterFactory |
getAdapterFactory()
Returns the adapter factory as given to the constructor.
|
EMFCompareConfiguration |
getCompareConfiguration() |
protected ICompareEditingDomain |
getEditingDomain()
Returns the editing domain as given to the constructor.
|
protected Object |
prepareInput(IProgressMonitor monitor) |
addCompareInputChangeListener, addPropertyChangeListener, belongsTo, canRunAsJob, contentsCreated, contributeToToolBar, createContents, createContentViewerSwitchingPane, createDiffViewer, createOutlineContents, createStructureInputPane, exists, findContentViewer, findStructureViewer, firePropertyChange, flushLeftViewers, flushRightViewers, flushViewers, getActionBars, getAdapter, getCancelButtonLabel, getCompareResult, getContainer, getContentViewerDescriptor, getImageDescriptor, getMessage, getName, getNavigator, getOKButtonLabel, getPersistable, getSelectedEdition, getServiceLocator, getStructureViewerDescriptor, getTitle, getTitleImage, getToolTipText, getWorkbenchPart, handleDispose, isDirty, isEditionSelectionDialog, isLeftSaveNeeded, isRightSaveNeeded, isSaveNeeded, okPressed, registerContextMenu, removeCompareInputChangeListener, removePropertyChangeListener, run, run, runAsynchronously, save, saveChanges, setContainer, setContentViewerDescriptor, setDirty, setFocus, setFocus2, setHelpContextId, setLeftDirty, setMessage, setRightDirty, setStatusMessage, setStructureViewerDescriptor, setTitlepublic AbstractEMFCompareEditorInput(EMFCompareConfiguration configuration, ICompareEditingDomain editingDomain, AdapterFactory adapterFactory)
CompareConfiguration.configuration - the compare configuration as required by
CompareEditorInput.CompareEditorInput(CompareConfiguration).editingDomain - the editing domain required to execute merge command. It must not be null.adapterFactory - the adapter factory that will be used to adapt EObject to displayable elements. It must not
be null.NullPointerException - if editingDomain or adapterFactory is null.protected AdapterFactory getAdapterFactory()
protected ICompareEditingDomain getEditingDomain()
public void cancelPressed()
It will undo all operations executed on the command stack until no more can be undone.
cancelPressed in class CompareEditorInputCompareEditorInput.cancelPressed()protected final Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
prepareInput in class CompareEditorInputInvocationTargetExceptionInterruptedExceptionCompareEditorInput.prepareInput(org.eclipse.core.runtime.IProgressMonitor)public EMFCompareConfiguration getCompareConfiguration()
getCompareConfiguration in class CompareEditorInputCompareEditorInput.getCompareConfiguration()protected abstract Object doPrepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
null 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.
monitor - the progress monitor to use to display progress and receive requests for cancellationnull if there are no differencesInvocationTargetException - 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
contextInterruptedException - if the operation detects a request to cancel, using
IProgressMonitor.isCanceled(), it should exit by throwing
InterruptedException
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.