Class MatchAccessor
- java.lang.Object
-
- org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.impl.AbstractTypedElementAdapter
-
- org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.accessor.impl.MatchAccessor
-
- All Implemented Interfaces:
ICompareAccessor
,ITypedElement
public class MatchAccessor extends AbstractTypedElementAdapter implements ICompareAccessor
A specificICompareAccessor
forMatch
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
Constructors Constructor Description MatchAccessor(AdapterFactory adapterFactory, Match match, Diff diff, IMergeViewer.MergeViewerSide side)
Creates a new object wrapping the giveneObject
.MatchAccessor(AdapterFactory adapterFactory, Match match, IMergeViewer.MergeViewerSide side)
Creates a new object wrapping the giveneObject
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Comparison
getComparison()
Returns the comparison object used by this accessor.org.eclipse.swt.graphics.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.protected IMergeViewer.MergeViewerSide
getSide()
Returns the side of this accessor.String
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 Detail
-
MatchAccessor
public MatchAccessor(AdapterFactory adapterFactory, Match match, IMergeViewer.MergeViewerSide side)
Creates a new object wrapping the giveneObject
.- Parameters:
adapterFactory
- the adapter factory used to create the accessor.match
- the match to associate with this accessor.side
- the side of this accessor.
-
MatchAccessor
public MatchAccessor(AdapterFactory adapterFactory, Match match, Diff diff, IMergeViewer.MergeViewerSide side)
Creates a new object wrapping the giveneObject
.- Parameters:
adapterFactory
- the adapter factory used to create the accessor.match
- the match to associate with this accessor.diff
- the diff associated with this accessor.side
- the side of this accessor.
-
-
Method Detail
-
getSide
protected final IMergeViewer.MergeViewerSide getSide()
Returns the side of this accessor.- Returns:
- the side of this accessor.
-
getName
public String getName()
Returns the name of this object. The name is used when displaying this object in the UI.- Specified by:
getName
in interfaceITypedElement
- Returns:
- the name of this object
- See Also:
ITypedElement.getName()
-
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:
getImage
in interfaceITypedElement
- Returns:
- the image of this object or
null
if this type of input has no image - See Also:
ITypedElement.getImage()
-
getType
public String 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:
getType
in interfaceITypedElement
- Returns:
- the type of this object
- See Also:
ITypedElement.getType()
-
getComparison
public Comparison getComparison()
Returns the comparison object used by this accessor.- Specified by:
getComparison
in interfaceICompareAccessor
- Returns:
- the comparison object used by this accessor.
- See Also:
ICompareAccessor.getComparison()
-
getInitialItem
public IMergeViewerItem getInitialItem()
Returns the initial item of this accessor.- Specified by:
getInitialItem
in interfaceICompareAccessor
- Returns:
- the initial item of this accessor.
- See Also:
ICompareAccessor.getInitialItem()
-
getItems
public com.google.common.collect.ImmutableList<? extends IMergeViewerItem> getItems()
Returns the list of items known by this accessor.- Specified by:
getItems
in interfaceICompareAccessor
- Returns:
- the list of items known by this accessor.
- See Also:
ICompareAccessor.getItems()
-
-