Class AbstractStructuralFeatureAccessor
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
- All Implemented Interfaces:
ICompareAccessor,IStructuralFeatureAccessor,ITypedElement
- Direct Known Subclasses:
ContainmentReferenceChangeAccessorImpl,FeatureMapKeyChangeAccessorImpl,ManyStructuralFeatureAccessorImpl,SingleStructuralFeatureAccessorImpl
public abstract class AbstractStructuralFeatureAccessor
extends AbstractTypedElementAdapter
implements IStructuralFeatureAccessor
An abstract implementation of
IStructuralFeatureAccessor.- 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
ConstructorsConstructorDescriptionAbstractStructuralFeatureAccessor(AdapterFactory adapterFactory, Diff diff, IMergeViewer.MergeViewerSide side) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.common.collect.ImmutableList<Diff>Compute the differences that apply on the structural feature.protected EStructuralFeaturegetAffectedFeature(Diff diff) Returns the structural feature affected by the given diff, if any.Returns the comparison object used by this accessor.protected final com.google.common.collect.ImmutableList<Diff>Returns the list of diff that apply on the structural feature.Returns the EObject associated with the structural feature.org.eclipse.swt.graphics.ImagegetImage()Returns an image for this object.protected final DiffReturns the initial diff associated with this accessor.Returns the initial item of this accessor.getName()Returns the name of this object.protected final IMergeViewer.MergeViewerSidegetSide()Returns the side of the accessor.Returns the structural feature for which an accessor is needed.getType()Returns the type of this object.Methods inherited from class org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.impl.AbstractTypedElementAdapter
getAdapterFactory, getItemDelegator, getRootAdapterFactoryMethods 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.contentmergeviewer.accessor.ICompareAccessor
getItems
-
Constructor Details
-
AbstractStructuralFeatureAccessor
public AbstractStructuralFeatureAccessor(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
-
getComparison
Returns the comparison object used by this accessor.- Specified by:
getComparisonin interfaceICompareAccessor- Returns:
- the comparison object used by this accessor.
- See Also:
-
getInitialItem
Returns the initial item of this accessor.- Specified by:
getInitialItemin interfaceICompareAccessor- Returns:
- the initial item of this accessor.
- See Also:
-
getEObject
Returns the EObject associated with the structural feature.- Specified by:
getEObjectin interfaceIStructuralFeatureAccessor- Parameters:
side- the side of the content merge viewer for which we want the EObject associated with the structural feature.- Returns:
- the EObject associated with the structural feature.
- See Also:
-
getStructuralFeature
Returns the structural feature for which an accessor is needed.- Specified by:
getStructuralFeaturein interfaceIStructuralFeatureAccessor- Returns:
- the structural feature for which an accessor is needed.
- See Also:
-
getSide
Returns the side of the accessor.- Returns:
- the side of the accessor.
-
getDifferences
Returns the list of diff that apply on the structural feature.- Returns:
- the list of diff that apply on the structural feature.
-
computeDifferences
Compute the differences that apply on the structural feature.- Returns:
- the list of diff that apply on the structural feature.
-
getAffectedFeature
Returns the structural feature affected by the given diff, if any.- Parameters:
diff- The diff from which we need to retrieve a feature.- Returns:
- The feature affected by this
diff, if any.nullif none.
-
getInitialDiff
Returns the initial diff associated with this accessor.- Returns:
- the initial diff.
-
getName
Returns the name of this object. The name is used when displaying this object in the UI.- Specified by:
getNamein interfaceITypedElement- Returns:
- the name of this object
- See Also:
-
getImage
public org.eclipse.swt.graphics.Image getImage()Returns an image for this object. This image is used when displaying this object in the UI.- Specified by:
getImagein interfaceITypedElement- Returns:
- the image of this object or
nullif this type of input has no image - See Also:
-
getType
Returns the type of this object. For objects with a file name this is typically the file extension. For folders its the constantFOLDER_TYPE. The type is used for determining a suitable viewer for this object.- Specified by:
getTypein interfaceITypedElement- Returns:
- the type of this object
- See Also:
-