Class DiffElement
java.lang.Object
org.eclipse.compare.structuremergeviewer.DiffElement
- All Implemented Interfaces:
- ITypedElement,- IDiffElement
- Direct Known Subclasses:
- DiffContainer
An abstract base implementation of the 
IDiffElement interface.
 
 Subclasses may add behavior and state, and may override getImage
 and getType to suit.
 
- 
Field SummaryFields inherited from interface org.eclipse.compare.ITypedElementFOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE
- 
Constructor SummaryConstructorsConstructorDescriptionDiffElement(IDiffContainer parent, int kind) Creates a newDiffElementas a child of the given parent.
- 
Method SummaryModifier and TypeMethodDescriptiongetImage()TheDiffElementimplementation of thisITypedInputmethod returnsnull.intgetKind()Returns the kind of difference as defined inDifferencer.Returns the parent of this element.getType()TheDiffElementimplementation of thisITypedElementmethod returnsITypedElement.UNKNOWN_TYPE.voidsetKind(int kind) Sets the kind of difference for this element.voidsetParent(IDiffContainer parent) Sets the parent of this element.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.compare.ITypedElementgetName
- 
Constructor Details- 
DiffElementCreates a newDiffElementas a child of the given parent. If parent is notnullthe new element is added to the parent.- Parameters:
- parent- the parent of this child; if not- nullthis element is automatically added as a child
- kind- the kind of change
 
 
- 
- 
Method Details- 
getImageTheDiffElementimplementation of thisITypedInputmethod returnsnull. Subclasses may re-implement to provide an image for this element.- Specified by:
- getImagein interface- ITypedElement
- Returns:
- null.
 
- 
getTypeTheDiffElementimplementation of thisITypedElementmethod returnsITypedElement.UNKNOWN_TYPE. Subclasses may re-implement to provide a type for this element.- Specified by:
- getTypein interface- ITypedElement
- Returns:
- ITypedElement.UNKNOWN_TYPE.
 
- 
setKindpublic void setKind(int kind) Sets the kind of difference for this element.- Parameters:
- kind- set the kind of difference this element represents
- See Also:
 
- 
getKindpublic int getKind()Description copied from interface:IDiffElementReturns the kind of difference as defined inDifferencer.- Specified by:
- getKindin interface- IDiffElement
- Returns:
- the kind of difference as defined in Differencer
 
- 
getParentDescription copied from interface:IDiffElementReturns the parent of this element. If the object is the root of a hierarchynullis returned.- Specified by:
- getParentin interface- IDiffElement
- Returns:
- the parent of this element, or nullif the element has no parent
 
- 
setParentDescription copied from interface:IDiffElementSets the parent of this element.- Specified by:
- setParentin interface- IDiffElement
- Parameters:
- parent- the new parent of this element, or- nullif this element is to have no parent
 
 
-