|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.compare.structuremergeviewer.DiffElement
org.eclipse.compare.structuremergeviewer.DiffContainer
org.eclipse.compare.structuremergeviewer.DiffNode
Diff node are used as the compare result of the differencing engine. Since it implements the ITypedElement and ICompareInput interfaces it can be used directly to display the compare result in a DiffTreeViewer and as the input to any other compare/merge viewer.
DiffNodes are typically created as the result of performing a compare with the Differencer.
Clients typically use this class as is, but may subclass if required.
Field Summary |
Fields inherited from interface org.eclipse.compare.ITypedElement |
FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE |
Constructor Summary | |
DiffNode(IDiffContainer parent,
int kind)
Creates a new DiffNode and initializes with the given values. | |
DiffNode(IDiffContainer parent,
int kind,
ITypedElement ancestor,
ITypedElement left,
ITypedElement right)
Creates a new DiffNode and initializes with the given values. | |
DiffNode(int kind)
Creates a new DiffNode with the given diff kind. | |
DiffNode(int kind,
ITypedElement ancestor,
ITypedElement left,
ITypedElement right)
Creates a new DiffNode and initializes with the given values. | |
DiffNode(ITypedElement left,
ITypedElement right)
Creates a new DiffNode with diff kind Differencer.CHANGE and initializes with the given values. |
Method Summary | |
void | addCompareInputChangeListener(ICompareInputChangeListener listener)
Registers a listener for changes of this ICompareInput. |
void | copy(boolean leftToRight)
Copy one side (source) to the other side (destination) depending on the value of leftToRight. |
boolean | dontExpand()
Returns true if this node shouldn't automatically be expanded in a DiffTreeViewer. |
boolean | equals(Object other)
|
protected void | fireChange()
Sends out notification that a change has occured on the ICompareInput. |
ITypedElement | getAncestor()
Returns the ancestor side of this input. |
ITypedElement | getId()
Returns the first not-null input of this node. |
Image | getImage()
Returns an image for this object. |
ITypedElement | getLeft()
Returns the left side of this input. |
String | getName()
Returns the (non-null) name of the left or right side if they are identical. |
ITypedElement | getRight()
Returns the right side of this input. |
String | getType()
Returns the type of this object. |
int | hashCode()
|
void | removeCompareInputChangeListener(ICompareInputChangeListener listener)
Unregisters a ICompareInput listener. |
void | setAncestor(ITypedElement ancestor)
Sets the ancestor input to the given value. |
void | setDontExpand(boolean dontExpand)
Controls whether this node is not automatically expanded when displayed in a DiffTreeViewer. |
void | setLeft(ITypedElement left)
Sets the left input to the given value. |
void | setRight(ITypedElement right)
Sets the right input to the given value. |
Methods inherited from class org.eclipse.compare.structuremergeviewer.DiffContainer |
add, findChild, getChildren, hasChildren, remove, removeToRoot |
Methods inherited from class org.eclipse.compare.structuremergeviewer.DiffElement |
getKind, getParent, setKind, setParent |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.compare.structuremergeviewer.ICompareInput |
getKind |
Methods inherited from interface org.eclipse.compare.structuremergeviewer.IDiffElement |
getKind, getParent, setParent |
Constructor Detail |
public DiffNode(IDiffContainer parent, int kind, ITypedElement ancestor, ITypedElement left, ITypedElement right)
public DiffNode(ITypedElement left, ITypedElement right)
public DiffNode(int kind, ITypedElement ancestor, ITypedElement left, ITypedElement right)
public DiffNode(int kind)
public DiffNode(IDiffContainer parent, int kind)
Method Detail |
public void addCompareInputChangeListener(ICompareInputChangeListener listener)
public void removeCompareInputChangeListener(ICompareInputChangeListener listener)
protected void fireChange()
public boolean dontExpand()
public void setDontExpand(boolean dontExpand)
public ITypedElement getId()
public String getName()
Subclasses may re-implement to provide a different name for this node.
public Image getImage()
public String getType()
public void setAncestor(ITypedElement ancestor)
public ITypedElement getAncestor()
public void setLeft(ITypedElement left)
public ITypedElement getLeft()
public void setRight(ITypedElement right)
public ITypedElement getRight()
public void copy(boolean leftToRight)
The implementation should handle the following cases:
public int hashCode()
public boolean equals(Object other)
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.