| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList |
rootElements
A collection of the top level elements
that have been added to the region
|
| Constructor and Description |
|---|
Region()
Creates an empty region.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(IJavaElement element)
Adds the given element and all of its descendents to this region.
|
boolean |
contains(IJavaElement element)
Returns whether the given element is contained in this region.
|
IJavaElement[] |
getElements()
Returns the top level elements in this region.
|
boolean |
remove(IJavaElement element)
Removes the specified element from the region and returns
true if successful, false if the remove
fails. |
protected void |
removeAllChildren(IJavaElement element)
Removes any children of this element that are contained within this
region as this parent is about to be added to the region.
|
java.lang.String |
toString()
Returns a printable representation of this region.
|
protected java.util.ArrayList rootElements
public Region()
IRegionpublic void add(IJavaElement element)
IRegionadd in interface IRegionelement - the given elementIRegion.add(IJavaElement)public boolean contains(IJavaElement element)
IRegionpublic IJavaElement[] getElements()
IRegiongetElements in interface IRegionIRegionpublic boolean remove(IJavaElement element)
IRegiontrue if successful, false if the remove
fails. If an ancestor of the given element is included, the
remove fails (in other words, it is not possible to selectively
exclude descendants of included ancestors).remove in interface IRegionelement - the given elementtrue if successful, false if the remove failsIRegion.remove(IJavaElement)protected void removeAllChildren(IJavaElement element)
Children are all children, not just direct children.
public java.lang.String toString()
toString in class java.lang.Object