Interface ICCTreeItem
- All Superinterfaces:
ICCBase
- All Known Subinterfaces:
ICCBranchPoint,ICCFile,ICCFlowPoint,ICCImportBranchPoint,ICCImportFile,ICCImportFlowPoint,ICCImportFlowPointParent,ICCImportModule,ICCImportPart,ICCImportResult,ICCModule,ICCPart,ICCResult
- All Known Implementing Classes:
CCAbstractTreeItem,CCEmptyResult
Represents an item that has a hierarchy. i.e. has a parent and or children
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddChild(ICCTreeItem child) Add a single child to this item The added child will have this item as its parentvoidaddChildren(ICCTreeItem[] children) Add array of children to this item The added children will have this item as their parent if it is important to know if an item already exists then useaddChild(ICCTreeItem)Given a name return the matching child The current implementation only supports unique namesReturns an array (could be an empty array) of children New in v9 calls to this method will return child items in an order as determined by the items themselvesintReturns the number of childrenReturns the parent or null if it is a root itemReturns a qualified name can be used to uniquely identify an object.The following API is added for backwards compatibility.getUUID()Returns a globally unique id (UUID) If one does not exist in the result, a call togetUniqueID()will be done to produce a unique reproducible stringbooleanisRoot()Returns true if this is a root item with no parentvoidrefresh()Refreshes the children to ensure the sort order is correctvoidsetParent(ICCTreeItem parent) Sets the parent of this item This item will become a child of the parentvoidSets the unique id for this tree item When possible this should be a UUID format.booleanReturn true if this artifact supports a UUIDMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCBase
addEncodedMessage, addMessage, addMessage, getDecodedMessages, getDecodedMessages, getID, getMessages, getName, getProperties, getProperty, getProperty, isMessage, isProperty, setName, setProperty, updateProperty
-
Method Details
-
getParent
ICCTreeItem getParent()Returns the parent or null if it is a root item- Returns:
- parent or null
-
isRoot
boolean isRoot()Returns true if this is a root item with no parent- Returns:
- true if it has no parent and therefore is a root item
-
getChildren
ICCTreeItem[] getChildren()Returns an array (could be an empty array) of children New in v9 calls to this method will return child items in an order as determined by the items themselves- Returns:
- array of children or an empty array
-
addChild
Add a single child to this item The added child will have this item as its parent- Parameters:
child- child to be added- Returns:
- true if added
-
addChildren
Add array of children to this item The added children will have this item as their parent if it is important to know if an item already exists then useaddChild(ICCTreeItem)- Parameters:
children- array of children to be added
-
setParent
Sets the parent of this item This item will become a child of the parent- Parameters:
parent- this artifact's parent
-
getChild
Given a name return the matching child The current implementation only supports unique names- Parameters:
name- child's name to retrieve- Returns:
- null or the child
-
getNumChildren
int getNumChildren()Returns the number of children- Returns:
- number of children
- Since:
- 6.1
-
getQualifiedName
String getQualifiedName()Returns a qualified name can be used to uniquely identify an object.- Returns:
- qualified name
- Since:
- 9.0
-
refresh
void refresh()Refreshes the children to ensure the sort order is correct- Since:
- 9.0
-
getUUID
String getUUID()Returns a globally unique id (UUID) If one does not exist in the result, a call togetUniqueID()will be done to produce a unique reproducible string- Returns:
- UUID or null
- Since:
- 10.0
-
setUUID
Sets the unique id for this tree item When possible this should be a UUID format.- Parameters:
uuid- UUID or a globally unique identifier- Since:
- 10.0
-
getUniqueID
String getUniqueID()The following API is added for backwards compatibility. When a UUID is not available in the result this call will be used to generate a temporary UUID (does not have to have a true UUID format) The returned value should- be the same for the same result.
- be unique from any other artifact in the result
- can be any string that uniquely represents this artifact
- Returns:
- globally unique string
- Since:
- 10.0
-
supportsUUID
boolean supportsUUID()Return true if this artifact supports a UUID- Returns:
- true if UUID is supported
- Since:
- 10.0
-