org.eclipse.wst.jsdt.ui
Interface ITypeHierarchyViewPart


public interface ITypeHierarchyViewPart

The standard type hierarchy view presents a type hierarchy for a given input class or interface. Visually, this view consists of a pair of viewers, one showing the type hierarchy, the other showing the members of the type selected in the first.

This interface is not intended to be implemented by clients.

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

See Also:
JavaScriptUI.ID_TYPE_HIERARCHY

Field Summary
static int HIERARCHY_MODE_CLASSIC
          Constant used for the 'classic' type hierarchy mode.
static int HIERARCHY_MODE_SUBTYPES
          Constant used for the sub types hierarchy mode.
static int HIERARCHY_MODE_SUPERTYPES
          Constant used for the super types hierarchy mode.
static int VIEW_LAYOUT_AUTOMATIC
          Constant used for the automatic view layout.
static int VIEW_LAYOUT_HORIZONTAL
          Constant used for the horizontal view layout.
static int VIEW_LAYOUT_SINGLE
          Constant used for the single view layout (no members view)
static int VIEW_LAYOUT_VERTICAL
          Constant used for the vertical view layout.
 
Method Summary
 int getHierarchyMode()
          Returns the currently configured hierarchy mode.
 IJavaScriptElement getInputElement()
          Returns the input element of this type hierarchy view.
 int getViewLayout()
          Returns the currently configured view layout.
 boolean isLinkingEnabled()
          Returns whether this type hierarchy view's selection automatically tracks the active editor.
 boolean isQualifiedTypeNamesEnabled()
          If set, type names are shown with the parent container's name.
 boolean isShowMembersInHierarchy()
          If set, the lock mode is enabled.
 void setHierarchyMode(int mode)
          Sets the hierarchy mode.
 void setInput(IType type)
          Deprecated. use setInputElement instead
 void setInputElement(IJavaScriptElement element)
          Sets the input element of this type hierarchy view.
 void setLinkingEnabled(boolean enabled)
          Sets whether this type hierarchy view's selection automatically tracks the active editor.
 void setViewLayout(int layout)
          Sets the view layout.
 void showMembersInHierarchy(boolean enabled)
          Locks the the members view and shows the selected members in the hierarchy.
 void showQualifiedTypeNames(boolean enabled)
          Specifies if type names are shown with the parent container's name.
 

Field Detail

VIEW_LAYOUT_VERTICAL

static final int VIEW_LAYOUT_VERTICAL
Constant used for the vertical view layout.

See Also:
Constant Field Values

VIEW_LAYOUT_HORIZONTAL

static final int VIEW_LAYOUT_HORIZONTAL
Constant used for the horizontal view layout.

See Also:
Constant Field Values

VIEW_LAYOUT_SINGLE

static final int VIEW_LAYOUT_SINGLE
Constant used for the single view layout (no members view)

See Also:
Constant Field Values

VIEW_LAYOUT_AUTOMATIC

static final int VIEW_LAYOUT_AUTOMATIC
Constant used for the automatic view layout.

See Also:
Constant Field Values

HIERARCHY_MODE_CLASSIC

static final int HIERARCHY_MODE_CLASSIC
Constant used for the 'classic' type hierarchy mode.

See Also:
Constant Field Values

HIERARCHY_MODE_SUPERTYPES

static final int HIERARCHY_MODE_SUPERTYPES
Constant used for the super types hierarchy mode.

See Also:
Constant Field Values

HIERARCHY_MODE_SUBTYPES

static final int HIERARCHY_MODE_SUBTYPES
Constant used for the sub types hierarchy mode.

See Also:
Constant Field Values
Method Detail

setInput

void setInput(IType type)
Deprecated. use setInputElement instead

Sets the input element of this type hierarchy view to a type.

Parameters:
type - the input element of this type hierarchy view, or null to clear any input element

setInputElement

void setInputElement(IJavaScriptElement element)
Sets the input element of this type hierarchy view. The following input types are possible IMember (types, methods, fields..), IPackageFragment, IPackageFragmentRoot and IJavaScriptProject.

Parameters:
element - the input element of this type hierarchy view, or null to clear any input

getInputElement

IJavaScriptElement getInputElement()
Returns the input element of this type hierarchy view.

Returns:
the input element, or null if no input element is set
See Also:
setInputElement(IJavaScriptElement)

showMembersInHierarchy

void showMembersInHierarchy(boolean enabled)
Locks the the members view and shows the selected members in the hierarchy.

Parameters:
enabled - If set, the members view will be locked and the selected members are shown in the hierarchy.

isShowMembersInHierarchy

boolean isShowMembersInHierarchy()
If set, the lock mode is enabled.

Returns:
returns if the lock mode is enabled.

showQualifiedTypeNames

void showQualifiedTypeNames(boolean enabled)
Specifies if type names are shown with the parent container's name.

Parameters:
enabled - if enabled, the hierarchy will also show the type container names

isQualifiedTypeNamesEnabled

boolean isQualifiedTypeNamesEnabled()
If set, type names are shown with the parent container's name.

Returns:
returns if type names are shown with the parent container's name.

isLinkingEnabled

boolean isLinkingEnabled()
Returns whether this type hierarchy view's selection automatically tracks the active editor.

Returns:
true if linking is enabled, false if not

setLinkingEnabled

void setLinkingEnabled(boolean enabled)
Sets whether this type hierarchy view's selection automatically tracks the active editor.

Parameters:
enabled - true to enable, false to disable

setViewLayout

void setViewLayout(int layout)
Sets the view layout. Valid inputs are VIEW_LAYOUT_VERTICAL, VIEW_LAYOUT_HORIZONTAL VIEW_LAYOUT_SINGLE and VIEW_LAYOUT_AUTOMATIC.

Parameters:
layout - The layout to set

getViewLayout

int getViewLayout()
Returns the currently configured view layout. Possible layouts are VIEW_LAYOUT_VERTICAL, VIEW_LAYOUT_HORIZONTAL VIEW_LAYOUT_SINGLE and VIEW_LAYOUT_AUTOMATIC but clients should also be able to handle yet unknown layout.

Returns:
The layout currently set

setHierarchyMode

void setHierarchyMode(int mode)
Sets the hierarchy mode. Valid modes are HIERARCHY_MODE_SUBTYPES, HIERARCHY_MODE_SUPERTYPES and HIERARCHY_MODE_CLASSIC.

Parameters:
mode - The hierarchy mode to set

getHierarchyMode

int getHierarchyMode()
Returns the currently configured hierarchy mode. Possible modes are HIERARCHY_MODE_SUBTYPES, HIERARCHY_MODE_SUPERTYPES and HIERARCHY_MODE_CLASSIC but clients should also be able to handle yet unknown modes.

Returns:
The hierarchy mode currently set