Interface IDiffElement
-
- All Superinterfaces:
ITypedElement
- All Known Subinterfaces:
IDiffContainer,ISynchronizeModelElement
- All Known Implementing Classes:
DiffContainer,DiffElement,DiffNode
public interface IDiffElement extends ITypedElement
AnIDiffElementis used in theDiffTreeViewerto display the kind of change detected as the result of a two-way or three-way compare.The base interface
ITypedElementprovides a name, a type, and an image.IDiffElementadds API for maintaining a parent relationship.DiffTreeViewerworks on a tree ofIDiffElements. Leaf elements must implement theIDiffElementinterface, inner nodes theIDiffContainerinterface.IDiffElements are typically created as the result of performing a compare with theDifferencer.Clients may implement this interface, or use one of the standard implementations,
DiffElement,DiffContainer, orDiffNode.- See Also:
DiffTreeViewer,DiffElement,DiffContainer,DiffNode
-
-
Field Summary
-
Fields inherited from interface org.eclipse.compare.ITypedElement
FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetKind()Returns the kind of difference as defined inDifferencer.IDiffContainergetParent()Returns the parent of this element.voidsetParent(IDiffContainer parent)Sets the parent of this element.-
Methods inherited from interface org.eclipse.compare.ITypedElement
getImage, getName, getType
-
-
-
-
Method Detail
-
getKind
int getKind()
Returns the kind of difference as defined inDifferencer.- Returns:
- the kind of difference as defined in
Differencer
-
getParent
IDiffContainer getParent()
Returns the parent of this element. If the object is the root of a hierarchynullis returned.- Returns:
- the parent of this element, or
nullif the element has no parent
-
setParent
void setParent(IDiffContainer parent)
Sets the parent of this element.- Parameters:
parent- the new parent of this element, ornullif this element is to have no parent
-
-