public class ManyStructuralFeatureAccessorImpl extends AbstractStructuralFeatureAccessor
AbstractStructuralFeatureAccessor
for multi-valued structural feature objects.FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE
Constructor and Description |
---|
ManyStructuralFeatureAccessorImpl(AdapterFactory adapterFactory,
Diff diff,
IMergeViewer.MergeViewerSide side)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
findInsertionIndex(Diff diff,
boolean rightToLeft)
Find the insertion index for the given diff.
|
protected Object |
getDiffValue(Diff diff)
Returns either
ReferenceChange.getValue() , AttributeChange.getValue() or a
FeatureMapChange.getValue() depending on the runtime type of the give, diff or null
otherwise. |
protected List<?> |
getFeatureValues(IMergeViewer.MergeViewerSide side)
Returns the values of the current feature on the given side.
|
com.google.common.collect.ImmutableList<? extends IMergeViewerItem> |
getItems()
Returns the list of items known by this accessor.
|
protected Object |
getValueFromDiff(Diff diff,
IMergeViewer.MergeViewerSide side)
Get the value of the given side associated to the given Diff.
|
computeDifferences, getAffectedFeature, getComparison, getDifferences, getEObject, getImage, getInitialDiff, getInitialItem, getName, getSide, getStructuralFeature, getType
getAdapterFactory, getItemDelegator, getRootAdapterFactory
public ManyStructuralFeatureAccessorImpl(AdapterFactory adapterFactory, Diff diff, IMergeViewer.MergeViewerSide side)
adapterFactory
- the adapater factory used to create the accessor.diff
- the diff associated with this accessor.side
- the side of the accessor.public com.google.common.collect.ImmutableList<? extends IMergeViewerItem> getItems()
ICompareAccessor.getItems()
protected int findInsertionIndex(Diff diff, boolean rightToLeft)
diff
- the given diff.rightToLeft
- the way of merge.protected Object getValueFromDiff(Diff diff, IMergeViewer.MergeViewerSide side)
diff
- the given Diff.side
- the side of the Diff.protected List<?> getFeatureValues(IMergeViewer.MergeViewerSide side)
side
- the given side.protected Object getDiffValue(Diff diff)
ReferenceChange.getValue()
, AttributeChange.getValue()
or a
FeatureMapChange.getValue()
depending on the runtime type of the give, diff
or null
otherwise.diff
- the given Diff.
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.