Class ThreeWayComparisonGroupProvider.ConflictsGroupImpl
- java.lang.Object
-
- org.eclipse.emf.common.notify.impl.AdapterImpl
-
- org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.BasicDifferenceGroupImpl
-
- org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.ThreeWayComparisonGroupProvider.ConflictsGroupImpl
-
- All Implemented Interfaces:
Adapter
,Adapter.Internal
,IDifferenceGroup
- Enclosing class:
- ThreeWayComparisonGroupProvider
public static class ThreeWayComparisonGroupProvider.ConflictsGroupImpl extends BasicDifferenceGroupImpl
SpecializedBasicDifferenceGroupImpl
for Conflicts.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
Adapter.Internal
-
-
Field Summary
-
Fields inherited from class org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.BasicDifferenceGroupImpl
children, E_ALL_CONTENTS, filter, image, name
-
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
-
Fields inherited from interface org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroup
TREE_NODE_DATA
-
-
Constructor Summary
Constructors Constructor Description ConflictsGroupImpl(Comparison comparison, com.google.common.base.Predicate<? super Diff> filter, String name, ECrossReferenceAdapter crossReferenceAdapter)
.ConflictsGroupImpl(Comparison comparison, String name, ECrossReferenceAdapter crossReferenceAdapter)
Instantiates this group given the comparison.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDiffNode(MatchNode matchNode, Diff diff)
In the conflicts group, we want to be able to see the ResourceAttachmentChanges.protected void
doBuildSubTrees()
Perform the creation of the sub-trees of the group.IStyledString.IComposedStyledString
getStyledName()
The styled label for the this group.protected boolean
mustDisplayAsDirectChildOfMatch(Diff diff)
In conflicts, a special case must be handled for refining diffs: If they are not part of the same conflict then they should not be in the same group as the refined diff.-
Methods inherited from class org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.BasicDifferenceGroupImpl
buildMatchResourceTrees, buildMatchTrees, buildSubTree, buildSubTree, buildTree, createChildren, createConflictNode, createDiffNode, createMatchNode, createMatchResourceNode, customize, customize, dispose, getChildren, getComparison, getImage, getName, getTargetMatch, handleRefiningDiffs, isAdapterForType, isContainmentRefChange, populateMatchNode, registerCrossReferenceAdapter, unregisterCrossReferenceAdapter
-
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget, notifyChanged, setTarget, unsetTarget
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.emf.common.notify.Adapter
getTarget, notifyChanged, setTarget
-
-
-
-
Constructor Detail
-
ConflictsGroupImpl
public ConflictsGroupImpl(Comparison comparison, com.google.common.base.Predicate<? super Diff> filter, String name, ECrossReferenceAdapter crossReferenceAdapter)
.- See Also:
org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.BasicDifferenceGroupImpl#BasicDifferenceGroupImpl(org.eclipse.emf.compare.Comparison, java.lang.Iterable, com.google.common.base.Predicate, java.lang.String)
-
ConflictsGroupImpl
public ConflictsGroupImpl(Comparison comparison, String name, ECrossReferenceAdapter crossReferenceAdapter)
Instantiates this group given the comparison. It will use the default filter to determine its list of differences. It will be displayed in the UI with the default icon and the given name.- Parameters:
comparison
- The comparison that is the parent of this group.name
- The name that the EMF Compare UI will display for this group.crossReferenceAdapter
- The cross reference adapter that will be added to this group's children.
-
-
Method Detail
-
mustDisplayAsDirectChildOfMatch
protected boolean mustDisplayAsDirectChildOfMatch(Diff diff)
In conflicts, a special case must be handled for refining diffs: If they are not part of the same conflict then they should not be in the same group as the refined diff.- Overrides:
mustDisplayAsDirectChildOfMatch
in classBasicDifferenceGroupImpl
- Parameters:
diff
- The difference- Returns:
true
if the diff refines nothing or if its conflict does not contain all the diffs it refines.
-
doBuildSubTrees
protected void doBuildSubTrees()
Description copied from class:BasicDifferenceGroupImpl
Perform the creation of the sub-trees of the group.- Overrides:
doBuildSubTrees
in classBasicDifferenceGroupImpl
-
getStyledName
public IStyledString.IComposedStyledString getStyledName()
The styled label for the this group. This will be displayed in the EMF Compare UI.- Specified by:
getStyledName
in interfaceIDifferenceGroup
- Overrides:
getStyledName
in classBasicDifferenceGroupImpl
- Returns:
- A human-readable styled label for this group that can be displayed to the user.
- See Also:
BasicDifferenceGroupImpl.getStyledName()
-
addDiffNode
protected void addDiffNode(MatchNode matchNode, Diff diff)
In the conflicts group, we want to be able to see the ResourceAttachmentChanges.- Overrides:
addDiffNode
in classBasicDifferenceGroupImpl
- Parameters:
matchNode
- The given match nodediff
- The diff to add
-
-