TPTP 4.6.0 Platform Project
Public API Specification

org.eclipse.hyades.ui.extension
Interface INavigatorItem

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable

public interface INavigatorItem
extends org.eclipse.core.runtime.IAdaptable

An item that can be displayed in the Hyades navigators (Profiling Monitor, Log Navigator), but is not a built- in type. Any client wishing to add an item to the navigator(s) must implement this.

See Also:
INavigatorContribution

Method Summary
 void delete(boolean referentialIntegrity, boolean deleteContents)
          Deletes this item from the navigator.
 java.util.List getChildren()
          Returns this item's children.
 java.lang.Object getData()
          Returns the content of this item.
 org.eclipse.swt.graphics.Image getImage()
          Returns the item's image icon.
 java.lang.Object getParent()
          Returns this item's parent.
 java.lang.String getText()
          Returns the text to display in this item's label in the navigator.
 java.lang.String getType()
          Returns the item's type.
 boolean hasChildren()
          Returns true if this item has children, otherwise false.
 boolean isDeleteEnabled()
          Returns true if the delete action should be enabled on this item, otherwise false.
 boolean isSaveEnabled()
          Returns true if the save action should be enabled for this item, otherwise false.
 boolean isUnloadEnabled()
          Returns true if the unload action should be enabled for this item, otherwise false.
 void save(boolean referentialIntegrity)
          Saves the contents of this item to disk.
 void unload(boolean referentialIntegrity)
          Unloads the contents of this item from memory.
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

delete

void delete(boolean referentialIntegrity,
            boolean deleteContents)
Deletes this item from the navigator. The associated INavigatorContribution should no longer contribute this item.

Parameters:
referentialIntegrity - if true, referential integrity should be enforced (e.g., remove parent if it no longer has any children).
deleteContents - if true, the contents on the filesystem should also be removed.

getChildren

java.util.List getChildren()
Returns this item's children.

Returns:
this item's children.

getData

java.lang.Object getData()
Returns the content of this item. This could be, for example, an EMF object containing trace data.

Returns:
the content of this item.

getImage

org.eclipse.swt.graphics.Image getImage()
Returns the item's image icon. This is the icon displayed to the left of the item in the navigator.

Returns:
the item's icon.

getParent

java.lang.Object getParent()
Returns this item's parent. If this is a top-level element, an IWorkspaceRoot should be returned.

Returns:
this item's parent.

getText

java.lang.String getText()
Returns the text to display in this item's label in the navigator.

Returns:
the text to display in this item's label.

getType

java.lang.String getType()
Returns the item's type. This is used to determine which views this item can be viewed with. You may use an existing type with views, or invent your own and contribute views via the org.eclipse.hyades.ui.analyzeExtension extension point.

Returns:
the item's type.

hasChildren

boolean hasChildren()
Returns true if this item has children, otherwise false. This is equivalent to (getChildren().size() > 0), but should be more efficient.

Returns:
whether or not this item has children.

isDeleteEnabled

boolean isDeleteEnabled()
Returns true if the delete action should be enabled on this item, otherwise false.

Returns:
whether or not the delete action should be enabled on this item.

isSaveEnabled

boolean isSaveEnabled()
Returns true if the save action should be enabled for this item, otherwise false.

Returns:
whether or not the save action should be enabled for this item.

isUnloadEnabled

boolean isUnloadEnabled()
Returns true if the unload action should be enabled for this item, otherwise false.

Returns:
whether or not the unload action should be enabled for this item.

save

void save(boolean referentialIntegrity)
Saves the contents of this item to disk. These contents will be re-loaded on next startup.

Parameters:
referentialIntegrity - if true, referential integrity should be enforced.

unload

void unload(boolean referentialIntegrity)
Unloads the contents of this item from memory. The next time the user opens this item, the contents should be re-loaded from disk.

Parameters:
referentialIntegrity - if true, referential integrity should be enforced (e.g., unload parent if it no longer has any children).

TPTP 4.6.0 Platform Project
Public API Specification