org.eclipse.emf.compare.ui.editor
Class ModelCompareEditorInput

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.compare.CompareEditorInput
          extended by org.eclipse.emf.compare.ui.editor.ModelCompareEditorInput
All Implemented Interfaces:
org.eclipse.compare.ICompareContainer, org.eclipse.compare.IPropertyChangeNotifier, org.eclipse.core.runtime.IAdaptable, org.eclipse.jface.operation.IRunnableContext, org.eclipse.jface.operation.IRunnableWithProgress, org.eclipse.ui.IEditorInput

public class ModelCompareEditorInput
extends org.eclipse.compare.CompareEditorInput

This will be used as input for the CompareEditor used for the edition of emfdiff files.


Field Summary
protected  ModelContentMergeViewer contentMergeViewer
          Content merge viewer of this CompareViewerPane.
protected  ComparisonSnapshot inputSnapshot
          ComparisonSnapshot result of the underlying comparison.
protected  ModelCompareInput preparedInput
          This is the input that will be used throughout.
protected  ModelStructureMergeViewer structureMergeViewer
          Structure merge viewer of this CompareViewerPane.
 
Fields inherited from class org.eclipse.compare.CompareEditorInput
DIRTY_STATE, PROP_SELECTED_EDITION, PROP_TITLE, PROP_TITLE_IMAGE
 
Constructor Summary
ModelCompareEditorInput(ComparisonSnapshot snapshot)
          This constructor takes a ComparisonSnapshot as input.
 
Method Summary
 org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
          
protected  ModelContentMergeViewer createMergeViewer(org.eclipse.compare.CompareViewerPane pane, org.eclipse.compare.CompareConfiguration config)
          Creates and returns the merge viewer constituting the content of this compare editor input.
protected  ModelCompareInput createModelCompareInput(ComparisonSnapshot snap)
          Creates the ModelCompareInput for this editor input.
 org.eclipse.swt.widgets.Control createOutlineContents(org.eclipse.swt.widgets.Composite parent, int direction)
          
protected  java.lang.Object prepareInput(org.eclipse.core.runtime.IProgressMonitor monitor)
          
 void saveChanges(org.eclipse.core.runtime.IProgressMonitor monitor)
          
 
Methods inherited from class org.eclipse.compare.CompareEditorInput
addCompareInputChangeListener, addPropertyChangeListener, belongsTo, cancelPressed, canRunAsJob, contentsCreated, contributeToToolBar, createContentViewerSwitchingPane, createDiffViewer, createStructureInputPane, exists, findContentViewer, findStructureViewer, firePropertyChange, flushViewers, getActionBars, getAdapter, getCancelButtonLabel, getCompareConfiguration, getCompareResult, getContainer, getContentViewerDescriptor, getImageDescriptor, getMessage, getName, getNavigator, getOKButtonLabel, getPersistable, getSelectedEdition, getServiceLocator, getStructureViewerDescriptor, getTitle, getTitleImage, getToolTipText, getWorkbenchPart, handleDispose, isDirty, isEditionSelectionDialog, isSaveNeeded, okPressed, registerContextMenu, removeCompareInputChangeListener, removePropertyChangeListener, run, run, runAsynchronously, save, setContainer, setContentViewerDescriptor, setDirty, setFocus, setFocus2, setHelpContextId, setMessage, setStatusMessage, setStructureViewerDescriptor, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contentMergeViewer

protected ModelContentMergeViewer contentMergeViewer
Content merge viewer of this CompareViewerPane. It represents the bottom splitted part of the view.


inputSnapshot

protected final ComparisonSnapshot inputSnapshot
ComparisonSnapshot result of the underlying comparison.


preparedInput

protected ModelCompareInput preparedInput
This is the input that will be used throughout.


structureMergeViewer

protected ModelStructureMergeViewer structureMergeViewer
Structure merge viewer of this CompareViewerPane. It represents the top TreeViewer of the view.

Constructor Detail

ModelCompareEditorInput

public ModelCompareEditorInput(ComparisonSnapshot snapshot)
This constructor takes a ComparisonSnapshot as input.

Parameters:
snapshot - The ComparisonSnapshot loaded from an emfdiff.
Method Detail

saveChanges

public void saveChanges(org.eclipse.core.runtime.IProgressMonitor monitor)

Overrides:
saveChanges in class org.eclipse.compare.CompareEditorInput
See Also:
CompareEditorInput.saveChanges(org.eclipse.core.runtime.IProgressMonitor)

createContents

public org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)

Overrides:
createContents in class org.eclipse.compare.CompareEditorInput
See Also:
CompareEditorInput.createContents(Composite)

createMergeViewer

protected ModelContentMergeViewer createMergeViewer(org.eclipse.compare.CompareViewerPane pane,
                                                    org.eclipse.compare.CompareConfiguration config)
Creates and returns the merge viewer constituting the content of this compare editor input. Clients may override this method in order to create their own merge viewer.

Parameters:
pane - The compare viewer pane to use as a parent composite for the viewer to create.
config - The compare configuration to consider.
Returns:
The merge viewer constituting the content of this compare editor input.
Since:
1.1

createOutlineContents

public org.eclipse.swt.widgets.Control createOutlineContents(org.eclipse.swt.widgets.Composite parent,
                                                             int direction)

Overrides:
createOutlineContents in class org.eclipse.compare.CompareEditorInput
See Also:
CompareEditorInput.createOutlineContents(Composite, int)

prepareInput

protected java.lang.Object prepareInput(org.eclipse.core.runtime.IProgressMonitor monitor)

Specified by:
prepareInput in class org.eclipse.compare.CompareEditorInput
See Also:
CompareEditorInput.prepareInput(IProgressMonitor)

createModelCompareInput

protected ModelCompareInput createModelCompareInput(ComparisonSnapshot snap)
Creates the ModelCompareInput for this editor input.

Parameters:
snap - Snapshot of the current comparison.
Returns:
The prepared ModelCompareInput for this editor input.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.