Class EMFCompareConfiguration
- All Implemented Interfaces:
IEMFCompareConfiguration
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.emf.compare.ide.ui.internal.configuration.ForwardingCompareConfiguration
ForwardingCompareConfiguration.MirroredPropertyChangeListener -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringThis property name is equivalent toCompareConfiguration.MIRROREDhowever we redefine it for backwards compatibility.Fields inherited from class org.eclipse.compare.CompareConfiguration
IGNORE_WHITESPACE, SHOW_PSEUDO_CONFLICTS, USE_OUTLINE_VIEW -
Constructor Summary
ConstructorsConstructorDescriptionEMFCompareConfiguration(org.eclipse.compare.CompareConfiguration compareConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.compare.CompareConfigurationdelegate()voiddispose().voiddispose()is only called when the comparison editor is closed, whereas EMFCompareConfiguration follows its own separate lifecycle.voiddispose()is only called when the comparison editor is closed, whereas EMFCompareConfiguration are created and discarded on each change of the ContentMergeViewer input.org.eclipse.swt.graphics.ImagegetAncestorImage(Object element) getAncestorLabel(Object element) booleangetBooleanProperty(String key, boolean dflt) com.google.common.eventbus.EventBusorg.eclipse.swt.graphics.ImagegetLeftImage(Object element) getLeftLabel(Object element) org.eclipse.swt.graphics.ImagegetRightImage(Object element) getRightLabel(Object element) protected voidinitStructureMergeViewerFilter(Comparison comparison, IComparisonScope comparisonScope) protected voidinitStructureMergeViewerGroupProvider(Comparison comparison, IComparisonScope comparisonScope) voidsetAdapterFactory(AdapterFactory adapterFactory) voidsetComparisonAndScope(Comparison newComparison, IComparisonScope newComparisonScope) voidsetDiffRelationshipComputer(IDiffRelationshipComputer diffRelationshipComputer) voidsetEditingDomain(ICompareEditingDomain newValue) voidsetEMFComparator(EMFCompare newComparator) voidsetLabelProvider(Class<? extends org.eclipse.compare.structuremergeviewer.ICompareInput> inputType, org.eclipse.compare.ICompareInputLabelProvider labelProvider) voidsetMergePreviewMode(MergeMode previewMergeMode) Methods inherited from class org.eclipse.emf.compare.ide.ui.internal.configuration.ForwardingCompareConfiguration
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, setRightLabelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.emf.compare.rcp.ui.internal.configuration.IEMFCompareConfiguration
isLeftEditable, isMirrored, isRightEditable
-
Field Details
-
DISPLAY_GROUP_PROVIDERS
- See Also:
-
DISPLAY_FILTERS
- See Also:
-
DISPLAY_SAVE_ACTION
- See Also:
-
DISPLAY_SELECT_UNRESOLVED_DIFF_ACTIONS
- See Also:
-
MIRRORED
This property name is equivalent toCompareConfiguration.MIRROREDhowever we redefine it for backwards compatibility.- See Also:
-
-
Constructor Details
-
EMFCompareConfiguration
public EMFCompareConfiguration(org.eclipse.compare.CompareConfiguration compareConfiguration)
-
-
Method Details
-
getEventBus
public com.google.common.eventbus.EventBus getEventBus()- Specified by:
getEventBusin interfaceIEMFCompareConfiguration- See Also:
-
delegate
protected org.eclipse.compare.CompareConfiguration delegate()- Specified by:
delegatein classForwardingCompareConfiguration- See Also:
-
dispose
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 isdisposeListeners()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.- Overrides:
disposein classForwardingCompareConfiguration- See Also:
-
org.eclipse.emf.compare.rcp.ui.internal.configuration.IEMFCompareConfiguration#dispose()
-
disposeListeners
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 ofdispose().- See Also:
-
disposeComparison
public void disposeComparison()dispose()is only called when the comparison editor is closed, whereas EMFCompareConfiguration follows its own separate lifecycle. See documentation ofdispose().- See Also:
-
getBooleanProperty
- Specified by:
getBooleanPropertyin interfaceIEMFCompareConfiguration
-
getComparison
- Specified by:
getComparisonin interfaceIEMFCompareConfiguration
-
getEMFComparator
- Specified by:
getEMFComparatorin interfaceIEMFCompareConfiguration
-
getEditingDomain
- Specified by:
getEditingDomainin interfaceIEMFCompareConfiguration
-
getMergePreviewMode
- Specified by:
getMergePreviewModein interfaceIEMFCompareConfiguration
-
getAdapterFactory
- Specified by:
getAdapterFactoryin interfaceIEMFCompareConfiguration
-
getDiffRelationshipComputer
- Specified by:
getDiffRelationshipComputerin interfaceIEMFCompareConfiguration
-
getComparisonScope
- Specified by:
getComparisonScopein interfaceIEMFCompareConfiguration- See Also:
-
setEMFComparator
- Specified by:
setEMFComparatorin interfaceIEMFCompareConfiguration
-
setEditingDomain
- Specified by:
setEditingDomainin interfaceIEMFCompareConfiguration
-
setComparisonAndScope
- Specified by:
setComparisonAndScopein interfaceIEMFCompareConfiguration- See Also:
-
org.eclipse.emf.compare.rcp.ui.internal.configuration.IEMFCompareConfiguration#setComparisonAndScope(org.eclipse.emf.compare.scope.IComparisonScope, org.eclipse.emf.compare.Comparison)
-
initStructureMergeViewerGroupProvider
protected void initStructureMergeViewerGroupProvider(Comparison comparison, IComparisonScope comparisonScope) -
initStructureMergeViewerFilter
protected void initStructureMergeViewerFilter(Comparison comparison, IComparisonScope comparisonScope) -
setMergePreviewMode
- Specified by:
setMergePreviewModein interfaceIEMFCompareConfiguration
-
setAdapterFactory
- Specified by:
setAdapterFactoryin interfaceIEMFCompareConfiguration
-
setDiffRelationshipComputer
- Specified by:
setDiffRelationshipComputerin interfaceIEMFCompareConfiguration
-
getStructureMergeViewerGrouper
- Specified by:
getStructureMergeViewerGrouperin interfaceIEMFCompareConfiguration- See Also:
-
getStructureMergeViewerFilter
- Specified by:
getStructureMergeViewerFilterin interfaceIEMFCompareConfiguration- See Also:
-
setLabelProvider
public void setLabelProvider(Class<? extends org.eclipse.compare.structuremergeviewer.ICompareInput> inputType, org.eclipse.compare.ICompareInputLabelProvider labelProvider) -
getLeftLabel
- Overrides:
getLeftLabelin classForwardingCompareConfiguration
-
getLeftImage
- Overrides:
getLeftImagein classForwardingCompareConfiguration
-
getRightLabel
- Overrides:
getRightLabelin classForwardingCompareConfiguration
-
getRightImage
- Overrides:
getRightImagein classForwardingCompareConfiguration
-
getAncestorLabel
- Overrides:
getAncestorLabelin classForwardingCompareConfiguration
-
getAncestorImage
- Overrides:
getAncestorImagein classForwardingCompareConfiguration
-