public class TreeSelection extends StructuredSelection implements ITreeSelection
ITreeSelection interface,
suitable for instantiating.
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
static TreeSelection |
EMPTY
The canonical empty selection.
|
| Constructor and Description |
|---|
TreeSelection()
Creates a new empty selection.
|
TreeSelection(TreePath treePath)
Constructs a selection based on the elements identified by the given tree
path.
|
TreeSelection(TreePath[] paths)
Constructs a selection based on the elements identified by the given tree
paths.
|
TreeSelection(TreePath[] paths,
IElementComparer comparer)
Constructs a selection based on the elements identified by the given tree
paths.
|
TreeSelection(TreePath treePath,
IElementComparer comparer)
Constructs a selection based on the elements identified by the given tree
path.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Returns whether this structured selection is equal to the given object.
|
IElementComparer |
getElementComparer()
Returns the element comparer passed in when the tree selection
has been created or
null if no comparer has been
provided. |
TreePath[] |
getPaths()
Returns the paths in this selection
|
TreePath[] |
getPathsFor(Object element)
Returns the paths in this selection whose last segment is equal
to the given element
|
int |
hashCode() |
getFirstElement, isEmpty, iterator, size, toArray, toList, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetFirstElement, iterator, size, toArray, toListisEmptypublic static final TreeSelection EMPTY
null.public TreeSelection(TreePath[] paths)
paths - tree pathspublic TreeSelection(TreePath[] paths, IElementComparer comparer)
paths - tree pathscomparer - the comparer, or null if default equals is to be usedpublic TreeSelection(TreePath treePath)
treePath - tree path, or null for an empty selectionpublic TreeSelection(TreePath treePath, IElementComparer comparer)
treePath - tree path, or null for an empty selectioncomparer - the comparer, or null if default equals is to be usedpublic TreeSelection()
EMPTY which contains an empty selection singleton.
Note that TreeSelection.EMPTY is not equals() to StructuredViewer.EMPTY.
EMPTYpublic IElementComparer getElementComparer()
null if no comparer has been
provided.nullpublic boolean equals(Object obj)
StructuredSelectionequals in class StructuredSelectionobj - the other objecttrue if they are equal, and false otherwisepublic TreePath[] getPaths()
ITreeSelectiongetPaths in interface ITreeSelectionpublic TreePath[] getPathsFor(Object element)
ITreeSelectiongetPathsFor in interface ITreeSelectionelement - the element to get the tree paths forGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.