public class EMFCompareConfiguration extends ForwardingCompareConfiguration implements IEMFCompareConfiguration
ForwardingCompareConfiguration.MirroredPropertyChangeListener| Modifier and Type | Field and Description |
|---|---|
static String |
DISPLAY_FILTERS |
static String |
DISPLAY_GROUP_PROVIDERS |
static String |
DISPLAY_SAVE_ACTION |
static String |
DISPLAY_SELECT_UNRESOLVED_DIFF_ACTIONS |
static String |
MIRRORED
This property name is equivalent to
CompareConfiguration.MIRRORED however we redefine it for
backwards compatibility. |
| Constructor and Description |
|---|
EMFCompareConfiguration(org.eclipse.compare.CompareConfiguration compareConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.compare.CompareConfiguration |
delegate() |
void |
dispose()
.
|
void |
disposeComparison()
dispose() is only called when the comparison editor is closed, whereas EMFCompareConfiguration
follows its own separate lifecycle. |
void |
disposeListeners()
dispose() is only called when the comparison editor is closed, whereas EMFCompareConfiguration
are created and discarded on each change of the ContentMergeViewer input. |
AdapterFactory |
getAdapterFactory() |
org.eclipse.swt.graphics.Image |
getAncestorImage(Object element) |
String |
getAncestorLabel(Object element) |
boolean |
getBooleanProperty(String key,
boolean dflt) |
Comparison |
getComparison() |
IComparisonScope |
getComparisonScope() |
IDiffRelationshipComputer |
getDiffRelationshipComputer() |
ICompareEditingDomain |
getEditingDomain() |
EMFCompare |
getEMFComparator() |
com.google.common.eventbus.EventBus |
getEventBus() |
org.eclipse.swt.graphics.Image |
getLeftImage(Object element) |
String |
getLeftLabel(Object element) |
MergeMode |
getMergePreviewMode() |
org.eclipse.swt.graphics.Image |
getRightImage(Object element) |
String |
getRightLabel(Object element) |
StructureMergeViewerFilter |
getStructureMergeViewerFilter() |
StructureMergeViewerGrouper |
getStructureMergeViewerGrouper() |
protected void |
initStructureMergeViewerFilter(Comparison comparison,
IComparisonScope comparisonScope) |
protected void |
initStructureMergeViewerGroupProvider(Comparison comparison,
IComparisonScope comparisonScope) |
void |
setAdapterFactory(AdapterFactory adapterFactory) |
void |
setComparisonAndScope(Comparison newComparison,
IComparisonScope newComparisonScope) |
void |
setDiffRelationshipComputer(IDiffRelationshipComputer diffRelationshipComputer) |
void |
setEditingDomain(ICompareEditingDomain newValue) |
void |
setEMFComparator(EMFCompare newComparator) |
void |
setLabelProvider(Class<? extends org.eclipse.compare.structuremergeviewer.ICompareInput> inputType,
org.eclipse.compare.ICompareInputLabelProvider labelProvider) |
void |
setMergePreviewMode(MergeMode previewMergeMode) |
addPropertyChangeListener, fireChange, getContainer, getImage, getImage, getLabelProvider, getPreferenceStore, getProperty, isChangeIgnored, isEditable, isLeftEditable, isMirrored, isRightEditable, removePropertyChangeListener, setAncestorImage, setAncestorLabel, setChangeIgnored, setContainer, setDefaultLabelProvider, setLabelProvider, setLeftEditable, setLeftImage, setLeftLabel, setProperty, setRightEditable, setRightImage, setRightLabelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLeftEditable, isMirrored, isRightEditablepublic static final String DISPLAY_GROUP_PROVIDERS
public static final String DISPLAY_FILTERS
public static final String DISPLAY_SAVE_ACTION
public static final String DISPLAY_SELECT_UNRESOLVED_DIFF_ACTIONS
public static final String MIRRORED
CompareConfiguration.MIRRORED however we redefine it for
backwards compatibility.public EMFCompareConfiguration(org.eclipse.compare.CompareConfiguration compareConfiguration)
public com.google.common.eventbus.EventBus getEventBus()
getEventBus in interface IEMFCompareConfigurationIEMFCompareConfiguration.getEventBus()protected org.eclipse.compare.CompareConfiguration delegate()
delegate in class ForwardingCompareConfigurationForwardingCompareConfiguration.delegate()public void dispose()
The lifecycle of the EMFCompareConfiguration (ECC) does not follow the lifecycle of its delegate CompareConfiguration (CC). CC are created once per comparison editor instance. The comparison editor lives from the moment the user starts a comparison to the moment the user closes the editor. In-between, the user will be able to switch from one content merge viewer (CMV) to another by changing his selection in the structure merge viewer (SMW). For example, selecting an EObject in the SMV will show tree representations of these EObject in the CMV, whilst selecting a text attribute in the SMW will switch the CMV representation to textual viewers. When switching CMV, the ECC needs a partial dispose in order to change its installed listeners (this will also happen when mirroring the comparison). Furthermore, the user will be able to switch the whole comparison from one file to another if he has selected multiple files for comparison (for example, by comparing in a compare dialog). When switching from one file to another, the whole EMF Compare comparison needs to change, and thus we need to dispose of the ECC, but the CC cannot be disposed at that time since its own lifecycle hasn't come to an end.
Because of this, there are three separate 'dispose' methods on an ECC. First is the inherited
dispose() which will dispose of this whole ECC after disposing its delegate CC. Second is
disposeListeners() which will only undertake a partial clean up of this ECC : listeners of the
ECC are disposed, but not the Comparison itself, nor the delegate CC. Finally,
disposeComparison() will discard both the listeners and Comparison, but not the delegate CC.
dispose in class ForwardingCompareConfigurationorg.eclipse.emf.compare.rcp.ui.internal.configuration.IEMFCompareConfiguration#dispose()public void disposeListeners()
dispose() is only called when the comparison editor is closed, whereas EMFCompareConfiguration
are created and discarded on each change of the ContentMergeViewer input. This will be called to
dispose of the specific setup that was made by the EMFCompareConfiguration wrapper to its underlying
CompareConfiguration. See documentation of dispose().dispose()public void disposeComparison()
dispose() is only called when the comparison editor is closed, whereas EMFCompareConfiguration
follows its own separate lifecycle. See documentation of dispose().dispose()public boolean getBooleanProperty(String key, boolean dflt)
getBooleanProperty in interface IEMFCompareConfigurationpublic Comparison getComparison()
getComparison in interface IEMFCompareConfigurationpublic EMFCompare getEMFComparator()
getEMFComparator in interface IEMFCompareConfigurationpublic ICompareEditingDomain getEditingDomain()
getEditingDomain in interface IEMFCompareConfigurationpublic MergeMode getMergePreviewMode()
getMergePreviewMode in interface IEMFCompareConfigurationpublic AdapterFactory getAdapterFactory()
getAdapterFactory in interface IEMFCompareConfigurationpublic IDiffRelationshipComputer getDiffRelationshipComputer()
getDiffRelationshipComputer in interface IEMFCompareConfigurationpublic IComparisonScope getComparisonScope()
getComparisonScope in interface IEMFCompareConfigurationIEMFCompareConfiguration.getComparisonScope()public void setEMFComparator(EMFCompare newComparator)
setEMFComparator in interface IEMFCompareConfigurationpublic void setEditingDomain(ICompareEditingDomain newValue)
setEditingDomain in interface IEMFCompareConfigurationpublic void setComparisonAndScope(Comparison newComparison, IComparisonScope newComparisonScope)
setComparisonAndScope in interface IEMFCompareConfigurationorg.eclipse.emf.compare.rcp.ui.internal.configuration.IEMFCompareConfiguration#setComparisonAndScope(org.eclipse.emf.compare.scope.IComparisonScope,
org.eclipse.emf.compare.Comparison)protected void initStructureMergeViewerGroupProvider(Comparison comparison, IComparisonScope comparisonScope)
protected void initStructureMergeViewerFilter(Comparison comparison, IComparisonScope comparisonScope)
public void setMergePreviewMode(MergeMode previewMergeMode)
setMergePreviewMode in interface IEMFCompareConfigurationpublic void setAdapterFactory(AdapterFactory adapterFactory)
setAdapterFactory in interface IEMFCompareConfigurationpublic void setDiffRelationshipComputer(IDiffRelationshipComputer diffRelationshipComputer)
setDiffRelationshipComputer in interface IEMFCompareConfigurationpublic StructureMergeViewerGrouper getStructureMergeViewerGrouper()
getStructureMergeViewerGrouper in interface IEMFCompareConfigurationIEMFCompareConfiguration.getStructureMergeViewerGrouper()public StructureMergeViewerFilter getStructureMergeViewerFilter()
getStructureMergeViewerFilter in interface IEMFCompareConfigurationIEMFCompareConfiguration.getStructureMergeViewerFilter()public void setLabelProvider(Class<? extends org.eclipse.compare.structuremergeviewer.ICompareInput> inputType, org.eclipse.compare.ICompareInputLabelProvider labelProvider)
public String getLeftLabel(Object element)
getLeftLabel in class ForwardingCompareConfigurationpublic org.eclipse.swt.graphics.Image getLeftImage(Object element)
getLeftImage in class ForwardingCompareConfigurationpublic String getRightLabel(Object element)
getRightLabel in class ForwardingCompareConfigurationpublic org.eclipse.swt.graphics.Image getRightImage(Object element)
getRightImage in class ForwardingCompareConfigurationpublic String getAncestorLabel(Object element)
getAncestorLabel in class ForwardingCompareConfigurationpublic org.eclipse.swt.graphics.Image getAncestorImage(Object element)
getAncestorImage in class ForwardingCompareConfiguration
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.