Class ManyStructuralFeatureAccessorImpl
java.lang.Object
org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.impl.AbstractTypedElementAdapter
org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.accessor.impl.AbstractStructuralFeatureAccessor
org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.accessor.impl.ManyStructuralFeatureAccessorImpl
- All Implemented Interfaces:
ICompareAccessor,IStructuralFeatureAccessor,ITypedElement
A specific
AbstractStructuralFeatureAccessor for multi-valued structural feature objects.- Since:
- 4.0
-
Field Summary
Fields inherited from interface org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.ITypedElement
FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionManyStructuralFeatureAccessorImpl(AdapterFactory adapterFactory, Diff diff, IMergeViewer.MergeViewerSide side) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected intfindInsertionIndex(Diff diff, boolean rightToLeft) Find the insertion index for the given diff.protected ObjectgetDiffValue(Diff diff) Returns eitherReferenceChange.getValue(),AttributeChange.getValue()or aFeatureMapChange.getValue()depending on the runtime type of the give,diffor null otherwise.protected List<?>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 ObjectgetValueFromDiff(Diff diff, IMergeViewer.MergeViewerSide side) Get the value of the given side associated to the given Diff.Methods inherited from class org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.accessor.impl.AbstractStructuralFeatureAccessor
computeDifferences, getAffectedFeature, getComparison, getDifferences, getEObject, getImage, getInitialDiff, getInitialItem, getName, getSide, getStructuralFeature, getTypeMethods inherited from class org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.impl.AbstractTypedElementAdapter
getAdapterFactory, getItemDelegator, getRootAdapterFactory
-
Constructor Details
-
ManyStructuralFeatureAccessorImpl
public ManyStructuralFeatureAccessorImpl(AdapterFactory adapterFactory, Diff diff, IMergeViewer.MergeViewerSide side) Default constructor.- Parameters:
adapterFactory- the adapater factory used to create the accessor.diff- the diff associated with this accessor.side- the side of the accessor.
-
-
Method Details
-
getItems
Returns the list of items known by this accessor.- Returns:
- the list of items known by this accessor.
- See Also:
-
findInsertionIndex
Find the insertion index for the given diff.- Parameters:
diff- the given diff.rightToLeft- the way of merge.- Returns:
- the insertion index.
-
getValueFromDiff
Get the value of the given side associated to the given Diff.- Parameters:
diff- the given Diff.side- the side of the Diff.- Returns:
- the value associated to the given Diff.
-
getFeatureValues
Returns the values of the current feature on the given side.- Parameters:
side- the given side.- Returns:
- the values of the current feature on the given side.
-
getDiffValue
Returns eitherReferenceChange.getValue(),AttributeChange.getValue()or aFeatureMapChange.getValue()depending on the runtime type of the give,diffor null otherwise.- Parameters:
diff- the given Diff.- Returns:
- the value of the given Diff.
-