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, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFirstElement, iterator, size, toArray, toList
isEmpty
public 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.EMPTY
public IElementComparer getElementComparer()
null
if no comparer has been
provided.null
public boolean equals(Object obj)
StructuredSelection
equals
in class StructuredSelection
obj
- the other objecttrue
if they are equal, and false
otherwisepublic TreePath[] getPaths()
ITreeSelection
getPaths
in interface ITreeSelection
public TreePath[] getPathsFor(Object element)
ITreeSelection
getPathsFor
in interface ITreeSelection
element
- the element to get the tree paths for
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.