Class ResourceContentsAccessorImpl
java.lang.Object
org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.impl.AbstractTypedElementAdapter
org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.accessor.impl.ResourceContentsAccessorImpl
- All Implemented Interfaces:
ICompareAccessor,IResourceContentsAccessor,ITypedElement
public class ResourceContentsAccessorImpl
extends AbstractTypedElementAdapter
implements IResourceContentsAccessor
A specific
IResourceContentsAccessor for ResourceAttachmentChange 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
ConstructorsConstructorDescriptionResourceContentsAccessorImpl(AdapterFactory adapterFactory, Diff diff, IMergeViewer.MergeViewerSide side) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the comparison object used by this accessor.org.eclipse.swt.graphics.ImagegetImage()Returns an image for this object.Returns the initial item of this accessor.com.google.common.collect.ImmutableList<? extends IMergeViewerItem>getItems()Returns the list of items known by this accessor.getName()Returns the name of this object.Returns the resource of the model involved with the accessor given the side of the content merge viewer for which we want to know the resource.protected final IMergeViewer.MergeViewerSidegetSide()Returns the side of the content merge viewer on which the difference is performed.getType()Returns the type of this object.Methods inherited from class org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.impl.AbstractTypedElementAdapter
getAdapterFactory, getItemDelegator, getRootAdapterFactory
-
Constructor Details
-
ResourceContentsAccessorImpl
public ResourceContentsAccessorImpl(AdapterFactory adapterFactory, Diff diff, IMergeViewer.MergeViewerSide side) Default constructor.- Parameters:
adapterFactory- the adapter factory used to create the accessor.diff- The difference performed.side- The side on which the difference is located.
-
-
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:
-
getItems
Returns the list of items known by this accessor.- Specified by:
getItemsin interfaceICompareAccessor- Returns:
- the list of items known by this accessor.
- See Also:
-
getResource
Returns the resource of the model involved with the accessor given the side of the content merge viewer for which we want to know the resource.- Specified by:
getResourcein interfaceIResourceContentsAccessor- Parameters:
side- the side of the content merge viewer for which we want the resource.- Returns:
- the resource of the model involved with the accessor.
- See Also:
-
getSide
Returns the side of the content merge viewer on which the difference is performed.- Returns:
- The side of the content merge viewer on which the difference is performed.
-
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:
-