public class ResourceContentsAccessorImpl extends AbstractTypedElementAdapter implements IResourceContentsAccessor
IResourceContentsAccessor
for ResourceAttachmentChange
objects.FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE
Constructor and Description |
---|
ResourceContentsAccessorImpl(AdapterFactory adapterFactory,
Diff diff,
IMergeViewer.MergeViewerSide side)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Comparison |
getComparison()
Returns the comparison object used by this accessor.
|
Image |
getImage()
Returns an image for this object.
|
IMergeViewerItem |
getInitialItem()
Returns the initial item of this accessor.
|
com.google.common.collect.ImmutableList<? extends IMergeViewerItem> |
getItems()
Returns the list of items known by this accessor.
|
String |
getName()
Returns the name of this object.
|
Resource |
getResource(IMergeViewer.MergeViewerSide side)
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 IMergeViewer.MergeViewerSide |
getSide()
Returns the side of the content merge viewer on which the difference is performed.
|
String |
getType()
Returns the type of this object.
|
getAdapterFactory, getItemDelegator, getRootAdapterFactory
public ResourceContentsAccessorImpl(AdapterFactory adapterFactory, Diff diff, IMergeViewer.MergeViewerSide side)
adapterFactory
- the adapter factory used to create the accessor.diff
- The difference performed.side
- The side on which the difference is located.public Comparison getComparison()
getComparison
in interface ICompareAccessor
ICompareAccessor.getComparison()
public IMergeViewerItem getInitialItem()
getInitialItem
in interface ICompareAccessor
ICompareAccessor.getInitialItem()
public com.google.common.collect.ImmutableList<? extends IMergeViewerItem> getItems()
getItems
in interface ICompareAccessor
ICompareAccessor.getItems()
public Resource getResource(IMergeViewer.MergeViewerSide side)
getResource
in interface IResourceContentsAccessor
side
- the side of the content merge viewer for which we want the resource.IResourceContentsAccessor.getResource(org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide)
protected final IMergeViewer.MergeViewerSide getSide()
public String getName()
getName
in interface ITypedElement
ITypedElement.getName()
public Image getImage()
getImage
in interface ITypedElement
null
if this type of input has no imageITypedElement.getImage()
public String getType()
FOLDER_TYPE
. The type is used for determining a suitable viewer
for this object.getType
in interface ITypedElement
ITypedElement.getType()
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.