public abstract class AbstractDifferenceGroupProvider extends AdapterImpl implements IDifferenceGroupProvider2
IDifferenceGroupProvider
.IDifferenceGroupProvider.ComparisonType, IDifferenceGroupProvider.Descriptor
Adapter.Internal
Modifier and Type | Field and Description |
---|---|
protected boolean |
activeByDefault
The initial activation state of the group provider.
|
protected String |
label
A human-readable label for this group provider.
|
target
Constructor and Description |
---|
AbstractDifferenceGroupProvider()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Collection<? extends IDifferenceGroup> |
buildGroups(Comparison aComparison)
Builds the groups for this comparison.
|
boolean |
defaultSelected() |
void |
dispose()
Dispose this difference group provider.
|
protected Comparison |
getComparison() |
protected ECrossReferenceAdapter |
getCrossReferenceAdapter()
Returns the cross reference adapter used by this difference group provider.
|
Collection<? extends IDifferenceGroup> |
getGroups(Comparison aComparison)
This will be called internally by the grouping actions in order to determine how the differences should
be grouped in the structural view.
|
String |
getLabel() |
List<TreeNode> |
getTreeNodes(EObject eObject)
Returns all
TreeNode s that are wrapping the given eObject . |
boolean |
groupsAreBuilt()
Tells if the groups of this provider have been already built for a comparison.
|
boolean |
isAdapterForType(Object type) |
boolean |
isEnabled(IComparisonScope scope,
Comparison comparison)
Returns the activation condition based on the scope and comparison objects.
|
void |
setDefaultSelected(boolean active) |
void |
setLabel(String label) |
getTarget, notifyChanged, setTarget, unsetTarget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTarget, notifyChanged, setTarget
protected String label
protected boolean activeByDefault
public AbstractDifferenceGroupProvider()
public String getLabel()
org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#getLabel()
public void setLabel(String label)
org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#setLabel(java.lang.String)
public boolean defaultSelected()
org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#defaultSelected()
public void setDefaultSelected(boolean active)
org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#setDefaultSelected(boolean)
public boolean isEnabled(IComparisonScope scope, Comparison comparison)
isEnabled
in interface IDifferenceGroupProvider
scope
- The scope on which the group provider will be applied.comparison
- The comparison which is to be displayed in the structural view.org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#isEnabled(org
.eclipse.emf.compare.scope.IComparisonScope, org.eclipse.emf.compare.Comparison)
protected final ECrossReferenceAdapter getCrossReferenceAdapter()
public List<TreeNode> getTreeNodes(EObject eObject)
TreeNode
s that are wrapping the given eObject
. It internally use a cross
reference adapter.getTreeNodes
in interface IDifferenceGroupProvider
eObject
- the object from which we want inverse reference.TreeNode
s targeting the given eObject
through
TreePackage.Literals.TREE_NODE__DATA
.org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#getTreeNodes(java.lang.Object)
public boolean isAdapterForType(Object type)
isAdapterForType
in interface Adapter
isAdapterForType
in class AdapterImpl
AdapterImpl.isAdapterForType(java.lang.Object)
public Collection<? extends IDifferenceGroup> getGroups(Comparison aComparison)
getGroups
in interface IDifferenceGroupProvider
aComparison
- The comparison which is to be displayed in the structural view. By default, its containment
tree will be displayed.null
, we'll fall back to the default behavior.IDifferenceGroupProvider.getGroups(org.eclipse.emf.compare.Comparison)
protected Collection<? extends IDifferenceGroup> buildGroups(Comparison aComparison)
IDifferenceGroupProvider2
needs to override this
method to provid groups.aComparison
- comparison against which the groups will be built.IDifferenceGroup
.public boolean groupsAreBuilt()
groupsAreBuilt
in interface IDifferenceGroupProvider2
true
if the groups has been built for this comparison or false
otherwise.IDifferenceGroupProvider2.groupsAreBuilt()
protected Comparison getComparison()
public void dispose()
dispose
in interface IDifferenceGroupProvider
IDifferenceGroupProvider.dispose()
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.