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 specificICompareAccessorforMatchobjects.- 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 ComparisongetComparison()Returns the comparison object used by this accessor.org.eclipse.swt.graphics.ImagegetImage()Returns an image for this object.IMergeViewerItemgetInitialItem()Returns the initial item of this accessor.com.google.common.collect.ImmutableList<? extends IMergeViewerItem>getItems()Returns the list of items known by this accessor.StringgetName()Returns the name of this object.protected IMergeViewer.MergeViewerSidegetSide()Returns the side of this accessor.StringgetType()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:
getNamein 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:
getImagein interfaceITypedElement- Returns:
- the image of this object or
nullif 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:
getTypein 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:
getComparisonin 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:
getInitialItemin 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:
getItemsin interfaceICompareAccessor- Returns:
- the list of items known by this accessor.
- See Also:
ICompareAccessor.getItems()
-
-