TPTP 4.6.0 Platform Project
Public API Specification

org.eclipse.hyades.ui.extension
Interface INavigatorContribution


public interface INavigatorContribution

An extension of the base Hyades navigator that provides additional content. This is implemented by clients who wish to contribute item(s) to the Hyades navigator views (e.g. Profiling Monitor, Log Navigator). The built-in Hyades types (e.g., TRCAgentProxy) are all EMF objects, but any new types contributed by extensions are not. Instead, they are simply UI representatives (that will probably contain EMF objects). External objects must implement INavigatorItem.

See Also:
INavigatorItem

Field Summary
static java.lang.String GROUP_ADDITIONS
          The context menu group for additional items.
static java.lang.String GROUP_DELETE
          The context menu group for delete action(s).
static java.lang.String GROUP_IMPORT
          The context menu group for importing and exporting.
static java.lang.String GROUP_NEW
          The context menu group for creating new items ("New >")
static java.lang.String GROUP_OPEN
          The context menu group for opening items ("Open", "Open With >").
static java.lang.String GROUP_PROPERTIES
          The context menu group for the open properties action.
static java.lang.String GROUP_REFRESH
          The context menu group for refreshing actions.
static java.lang.String GROUP_SAVE
          The context menu group for save action(s).
static java.lang.String GROUP_SUB_NEW
          The context menu group for new wizard shortcut and more generaly for acces the content of the 'New' menu
 
Method Summary
 void dispose()
          Disposes any resources associated with this extension (e.g. image icons).
 void fillContextMenu(org.eclipse.jface.action.IMenuManager menu, org.eclipse.jface.viewers.IStructuredSelection selection)
          Fills the context menu for the given item.
 java.util.List getChildren(java.lang.Object item)
          Returns the given Object's children known by this extension.
 java.util.Collection getModifiedItems()
          Returns all INavigatorItems known by this extension that require saving.
 boolean hasChildren(java.lang.Object item)
          Returns true if the item has children, otherwise false.
 

Field Detail

GROUP_ADDITIONS

static final java.lang.String GROUP_ADDITIONS
The context menu group for additional items.

See Also:
Constant Field Values

GROUP_NEW

static final java.lang.String GROUP_NEW
The context menu group for creating new items ("New >")

See Also:
Constant Field Values

GROUP_SUB_NEW

static final java.lang.String GROUP_SUB_NEW
The context menu group for new wizard shortcut and more generaly for acces the content of the 'New' menu

See Also:
Constant Field Values

GROUP_OPEN

static final java.lang.String GROUP_OPEN
The context menu group for opening items ("Open", "Open With >").

See Also:
Constant Field Values

GROUP_DELETE

static final java.lang.String GROUP_DELETE
The context menu group for delete action(s).

See Also:
Constant Field Values

GROUP_SAVE

static final java.lang.String GROUP_SAVE
The context menu group for save action(s).

See Also:
Constant Field Values

GROUP_IMPORT

static final java.lang.String GROUP_IMPORT
The context menu group for importing and exporting.

See Also:
Constant Field Values

GROUP_REFRESH

static final java.lang.String GROUP_REFRESH
The context menu group for refreshing actions.

See Also:
Constant Field Values

GROUP_PROPERTIES

static final java.lang.String GROUP_PROPERTIES
The context menu group for the open properties action.

See Also:
Constant Field Values
Method Detail

dispose

void dispose()
Disposes any resources associated with this extension (e.g. image icons).


fillContextMenu

void fillContextMenu(org.eclipse.jface.action.IMenuManager menu,
                     org.eclipse.jface.viewers.IStructuredSelection selection)
Fills the context menu for the given item. Note that this is for additions only. The navigator will automatically add its default items.

Parameters:
menu - the context menu to add actions to.
selection - the selected items.

getChildren

java.util.List getChildren(java.lang.Object item)
Returns the given Object's children known by this extension. These items are appended to the Hyades built-in types (e.g., TRCMonitor). Extensions are responsible for maintaining all references to external (non built-in) items. If the given item is of type IWorkspaceRoot, these are the top-level items. The children's types must be the designated external type, INavigatorItem.

Parameters:
item - the item whose children we wish to get.
Returns:
the children of the given item.

getModifiedItems

java.util.Collection getModifiedItems()
Returns all INavigatorItems known by this extension that require saving. This is used to determine which items will be saved on exit when the workbench shuts down, if the user wishes to save his/her resources.

Returns:
all items that need to be saved.

hasChildren

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

Returns:
whether or not this item has children.

TPTP 4.6.0 Platform Project
Public API Specification