|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.compare.structuremergeviewer.DiffElement | +--org.eclipse.compare.structuremergeviewer.DiffContainer
The standard implementation of a diff container element.
This class may be instantiated, or further subclassed.
Field Summary |
Fields inherited from interface org.eclipse.compare.ITypedElement |
FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE |
Constructor Summary | |
DiffContainer(IDiffContainer parent,
int kind)
Creates a new container with the specified kind under the given parent. |
Method Summary | |
void |
add(IDiffElement diff)
Adds the given child to this container. |
IDiffElement |
findChild(String name)
Tries to find the child with the given name. |
IDiffElement[] |
getChildren()
Returns the children of this container. |
boolean |
hasChildren()
Returns whether this container has at least one child. |
void |
remove(IDiffElement child)
Removes the given child (non-recursively) from this container. |
void |
removeToRoot(IDiffElement child)
Removes the given child from this container. |
Methods inherited from class org.eclipse.compare.structuremergeviewer.DiffElement |
getImage, getKind, getParent, getType, setKind, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.compare.structuremergeviewer.IDiffElement |
getKind, getParent, setParent |
Methods inherited from interface org.eclipse.compare.ITypedElement |
getImage, getName, getType |
Constructor Detail |
public DiffContainer(IDiffContainer parent, int kind)
parent
- under which the new container is added as a child or null
.kind
- of difference (defined in Differencer
).Method Detail |
public IDiffElement findChild(String name)
null
if no such child exists.
name
- of the child to find
public void add(IDiffElement diff)
IDiffContainer
add
in interface IDiffContainer
diff
- the child to be added to this containerpublic void removeToRoot(IDiffElement child)
removeToRoot
in interface IDiffContainer
child
- the child to be removed from this containerpublic void remove(IDiffElement child)
child
- to removepublic boolean hasChildren()
IDiffContainer
getChildren
method.
hasChildren
in interface IDiffContainer
true
if this container has at least one childpublic IDiffElement[] getChildren()
IDiffContainer
null
).
getChildren
in interface IDiffContainer
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |