edu.uky.rch.ept.projectexplorer.model
Interface IProjectItem

All Known Implementing Classes:
ProjectItem

public interface IProjectItem

A Project Item is used to interact with the various sub-components of a project. Interaction includes launching tools/actions by double-clicking on the item or choosing actions from the context menu of the item.

This interface may be implemented directly. For convenience, a base implementation is defined in ProjectItem.

A Project Item can be added to the project in the following ways:

  1. A ProjectItemsContributor extension is contributed to the workbench registry. This extension defines the extension id and extension class.
  2. Actions can be associated with the projectitems using the org.eclipse.ui.popupMenus extension point or through the DoubleClickActionContribution extension point.

Author:
Sandeep Bodapati

Method Summary
 Object[] getChildren()
          Returns the children of this item.
 String getEditorId()
          Returns the ID of the editor to launch if this item is editable, null otherwise.
 org.eclipse.ui.IEditorInput getEditorInput()
          Returns the EditorInput object for this item, if supported; null otherwise.
 org.eclipse.jface.resource.ImageDescriptor getLabelImage()
          Returns an ImageDescriptor specifying the icon to be used for this item in the UI.
 String getLabelText()
          Returns the label to be used for this item in the UI.
 Object getParent()
          Returns the parent of this item.
 Project getProject()
          Returns the project to which this item belongs.
 boolean hasChildren()
          Checks if the item has any children.
 

Method Detail

getLabelText

public String getLabelText()
Returns the label to be used for this item in the UI.

Returns:
labeltext

getLabelImage

public org.eclipse.jface.resource.ImageDescriptor getLabelImage()
Returns an ImageDescriptor specifying the icon to be used for this item in the UI.

Returns:
imagedescriptor of an icon

getParent

public Object getParent()
Returns the parent of this item.

Returns:
parent

hasChildren

public boolean hasChildren()
Checks if the item has any children.

Returns:
true if the item has children, false otherwise

getChildren

public Object[] getChildren()
Returns the children of this item.

Returns:
an array of children

getProject

public Project getProject()
Returns the project to which this item belongs.

Returns:
project

getEditorId

public String getEditorId()
Returns the ID of the editor to launch if this item is editable, null otherwise.

Returns:
editor_id

getEditorInput

public org.eclipse.ui.IEditorInput getEditorInput()
Returns the EditorInput object for this item, if supported; null otherwise.

Returns:
EditorInput