Class CallHierarchyViewPart
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.ui.IPersistable
,org.eclipse.ui.IViewPart
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IWorkbenchPartOrientation
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Represents an entry of the call hierarchy view history list. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
Pop-up menu: name of group for focus actions (value"group.focus"
).Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
Constructor Summary
ConstructorDescriptionConstructs a call hierarchy view that supports all of the call hierarchy kinds.CallHierarchyViewPart
(EnumSet<CallHierarchyKind> supportedHierarchyKinds) Constructs a call hierarchy view that supports the given call hierarchy kinds. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addHistoryDropDownAction
(org.eclipse.jface.action.IAction action) Contributes the 'show history list' action to this view.protected void
addPinAction
(org.eclipse.jface.action.IAction action) Contributes the 'pin' action to this view.protected void
addRefreshAction
(org.eclipse.jface.action.IAction action) Contributes the 'refresh' action to this view.protected void
addSetHierarchyKindAction
(org.eclipse.jface.action.IAction action, CallHierarchyKind kind) Contributes a 'set hierarchy kind' action to this view.protected void
addSetOrientationAction
(org.eclipse.jface.action.IAction action, int orientation) Contributes a 'set orientation' action to this view.final boolean
arePossibleInputElements
(Object[] elements) Returns whether the given elements are possible input elements for this view.protected abstract String
Computes the content description for this view.protected void
configureHierarchyViewer
(org.eclipse.jface.viewers.TreeViewer viewer) Configures the newly created hierarchy viewer.protected void
configureLocationViewer
(org.eclipse.jface.viewers.TableViewer viewer) Configures the newly created location viewer.protected EditorOpener
Creates and returns an editor opener for this view.protected abstract ICallHierarchyNode[]
createHierarchyRoots
(Object[] inputElements) Creates and returns the root nodes for a call hierarchy based on the given input elements and the current hierarchy kind.protected org.eclipse.jface.viewers.TreeViewer
createHierarchyViewer
(org.eclipse.swt.widgets.Composite parent) Creates and returns a tree viewer control that will be used for displaying the call hierarchy.protected void
createHierarchyViewerMenuGroups
(org.eclipse.jface.action.IMenuManager manager) Creates the menu groups for the hierarchy viewer's pop-up menu.createHistoryDropDownAction
(HistoryDropDownAction.History<CallHierarchyViewPart.HistoryEntry> history) Creates and returns a 'show history list' action for this view.protected abstract CallHierarchyViewPart.HistoryEntry
createHistoryEntry
(Object[] inputElements) Creates and returns a history entry for the given input elements.protected void
createLocationColumns
(org.eclipse.swt.widgets.Table table) Creates the table columns in the location viewer.protected org.eclipse.jface.viewers.TableViewer
createLocationViewer
(org.eclipse.swt.widgets.Composite parent) Creates and returns a table viewer control that will be used for displaying the call locations.protected void
createLocationViewerMenuGroups
(org.eclipse.jface.action.IMenuManager manager) Creates the menu groups for the location viewer's pop-up menu.protected org.eclipse.swt.widgets.Control
createNoHierarchyPage
(org.eclipse.swt.widgets.Composite parent) Creates and returns a control for the 'no hierarchy' page.void
createPartControl
(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.custom.SashForm
createSashForm
(org.eclipse.swt.widgets.Composite parent) Creates and returns aSashForm
that will be used as the parent control for the hierarchy and location viewers.void
dispose()
protected void
Refreshes the content of this view according to options specified in the given context.protected void
fillHierarchyViewerMenu
(org.eclipse.jface.action.IMenuManager manager) Fills the pop-menu for the hierarchy viewer using the menu groups created bycreateHierarchyViewerMenuGroups(IMenuManager)
.protected void
fillLocationViewerMenu
(org.eclipse.jface.action.IMenuManager manager) Fills the pop-menu for the location viewer using the menu groups created bycreateLocationViewerMenuGroups(IMenuManager)
.protected final EditorOpener
Returns the editor opener used by this view.protected final org.eclipse.jface.action.IAction
Returns the 'focus on selection' action used by this view.protected org.eclipse.jface.viewers.ViewerComparator
Returns a comparator for the hierarchy viewer.final CallHierarchyKind
Returns the current hierarchy kind for this view.protected ICallHierarchyNode[]
Returns the root nodes for the current call hierarchy.protected final org.eclipse.jface.viewers.TreeViewer
Returns the hierarchy tree viewer.protected List<CallHierarchyViewPart.HistoryEntry>
Returns the history used by this view; the history is represented by a "live" list of history entries.final Object[]
Returns the current input elements for this view.protected ColumnDescription[]
Returns the column descriptions for the call location table.protected final org.eclipse.jface.viewers.TableViewer
Returns the location table viewer.protected final org.eclipse.jface.action.IAction
Returns the 'refresh element' action used by this view.protected final org.eclipse.jface.action.IAction
Returns the 'remove from view' action used by this view.protected final org.eclipse.swt.custom.SashForm
Returns the parentSashForm
for the hierarchy and location viewers.protected abstract CallHierarchyViewManager
Returns aCallHierarchyViewManager
for this view.protected void
handleCannotRevealCallLocation
(org.eclipse.ui.IEditorPart editor, ICallLocation callLocation, IContext context) Handles the case when a call location cannot be revealed in the editor.protected void
hierarchySelectionChanged
(org.eclipse.jface.viewers.ISelection selection) This method is called on each selection change in the hierarchy viewer.protected void
A callback that is invoked when the history has been updated.void
init
(org.eclipse.ui.IViewSite site, org.eclipse.ui.IMemento memento) final boolean
isPinned()
Returns whether this view is pinned.protected abstract boolean
isPossibleInputElement
(Object element) Returns whether the given element is a possible input element for this view.protected void
locationSelectionChanged
(org.eclipse.jface.viewers.ISelection selection) This method is called on each selection change in the location viewer.protected void
Notifies that the history has been updated by this view.final void
refresh()
Performs a full refresh of the content of this view.protected final void
Performs a refresh of the content of this view according to options specified in the given context.protected void
revealCallLocation
(org.eclipse.ui.IEditorPart editor, ICallLocation callLocation, IContext context) Attempts to reveal the given call location in the given editor.protected void
revealInEditor
(Object element, boolean activate, boolean mayOpenNewEditor) Reveals the given element in an appropriate editor on a best effort basis.void
saveState
(org.eclipse.ui.IMemento memento) void
setFocus()
void
Sets the current hierarchy kind for this view.void
setInputElements
(Object[] elements) Sets the current input elements for this view.void
setOrientation
(int orientation) Sets the orientation of this view, which may be one of the constantsSWT.HORIZONTAL
orSWT.VERTICAL
; this method may also be called withSWT.HORIZONTAL|SWT.VERTICAL
for automatic orientation.void
setPinned
(boolean pinned) Marks this view as pinned.final boolean
Returns whether this view supports the given hierarchy kind.protected void
updateStatusLine
(org.eclipse.jface.action.IStatusLineManager manager, org.eclipse.jface.viewers.IStructuredSelection selection) Updates the status line based on the given selection in this view.Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, setContentDescription, setInitializationData, setPartName
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Field Details
-
GROUP_FOCUS
Pop-up menu: name of group for focus actions (value"group.focus"
).- See Also:
-
-
Constructor Details
-
CallHierarchyViewPart
public CallHierarchyViewPart()Constructs a call hierarchy view that supports all of the call hierarchy kinds. -
CallHierarchyViewPart
Constructs a call hierarchy view that supports the given call hierarchy kinds.- Parameters:
supportedHierarchyKinds
- notnull
and not empty
-
-
Method Details
-
arePossibleInputElements
Returns whether the given elements are possible input elements for this view. This method invokesisPossibleInputElement(Object)
for each of the given elements untilfalse
is returned for an element (in which case this method will returnfalse
) or all elements have been checked (in which case it will returntrue
).- Parameters:
elements
- may benull
or may contain null elements, in which casefalse
will be returned; may be empty, in which casetrue
will be returned- Returns:
true
if the given elements are possible input elements for this view, andfalse
otherwise
-
isPossibleInputElement
Returns whether the given element is a possible input element for this view.- Parameters:
element
- may benull
, in which casefalse
will be returned- Returns:
true
if the given element is a possible input element for this view, andfalse
otherwise- See Also:
-
setInputElements
Sets the current input elements for this view. Clients must not modify the given array afterwards.Default implementation invokes
refresh()
after the input elements have been set.- Parameters:
elements
- notnull
, must not contain null elements; may be empty- Throws:
IllegalArgumentException
- ifarePossibleInputElements(Object[])
returnsfalse
for the given elements
-
getInputElements
Returns the current input elements for this view.- Returns:
- the current input elements (never
null
, may be empty). Clients must not modify the returned array.
-
getHierarchyKind
Returns the current hierarchy kind for this view. If the hierarchy kind has not been explicitly set, returns the first of the supported hierarchy kinds.- Returns:
- the current hierarchy kind (never
null
) - See Also:
-
setHierarchyKind
Sets the current hierarchy kind for this view.Default implementation invokes
refresh()
if the view hierarchy kind has changed; it also adjusts the checked state of the 'set hierarchy kind' actions accordingly.- Parameters:
kind
- notnull
- Throws:
IllegalArgumentException
- if the given kind is notsupported
by this view
-
supportsHierarchyKind
Returns whether this view supports the given hierarchy kind.- Parameters:
kind
- may benull
, in which casefalse
will be returned- Returns:
true
if this view supports the given kind, andfalse
otherwise
-
setOrientation
public void setOrientation(int orientation) Sets the orientation of this view, which may be one of the constantsSWT.HORIZONTAL
orSWT.VERTICAL
; this method may also be called withSWT.HORIZONTAL|SWT.VERTICAL
for automatic orientation.- Parameters:
orientation
- new orientation- Throws:
IllegalArgumentException
- if the value of orientation is invalid
-
setPinned
public void setPinned(boolean pinned) Marks this view as pinned.- Parameters:
pinned
- whether the view is pinned
-
isPinned
public final boolean isPinned()Returns whether this view is pinned.- Returns:
true
if the view is pinned, andfalse
otherwise
-
refresh
public final void refresh()Performs a full refresh of the content of this view. This method invokesrefresh(IContext)
with an empty context. -
refresh
Performs a refresh of the content of this view according to options specified in the given context. This method does nothing if the SWT controls for this view have not been created or have been disposed. Otherwise, it invokesdoRefresh(IContext)
.- Parameters:
context
- the operation context (nevernull
)
-
init
public void init(org.eclipse.ui.IViewSite site, org.eclipse.ui.IMemento memento) throws org.eclipse.ui.PartInitException - Specified by:
init
in interfaceorg.eclipse.ui.IViewPart
- Overrides:
init
in classorg.eclipse.ui.part.ViewPart
- Throws:
org.eclipse.ui.PartInitException
-
saveState
public void saveState(org.eclipse.ui.IMemento memento) - Specified by:
saveState
in interfaceorg.eclipse.ui.IPersistable
- Specified by:
saveState
in interfaceorg.eclipse.ui.IViewPart
- Overrides:
saveState
in classorg.eclipse.ui.part.ViewPart
-
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent) - Specified by:
createPartControl
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
createPartControl
in classorg.eclipse.ui.part.WorkbenchPart
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in classorg.eclipse.ui.part.WorkbenchPart
-
setFocus
public void setFocus()- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in classorg.eclipse.ui.part.WorkbenchPart
-
getViewManager
Returns aCallHierarchyViewManager
for this view. The same manager instance is returned for each call.- Returns:
- the view manager (never
null
)
-
getHierarchyRoots
Returns the root nodes for the current call hierarchy.Default implementation invokes
createHierarchyRoots(Object[])
with the current input elements.- Returns:
- the root nodes for the current call hierarchy
(never
null
, may be empty)
-
createHierarchyRoots
Creates and returns the root nodes for a call hierarchy based on the given input elements and the current hierarchy kind.- Parameters:
inputElements
- nevernull
, may be empty- Returns:
- the created nodes (not
null
, may be empty)
-
getHierarchyComparator
protected org.eclipse.jface.viewers.ViewerComparator getHierarchyComparator()Returns a comparator for the hierarchy viewer.Default implementation returns a
LabelComparator
if the current hierarchy kind isCallHierarchyKind.CALLER
, andnull
otherwise.- Returns:
- a
ViewerComparator
, ornull
for no sorting
-
computeContentDescription
Computes the content description for this view.- Returns:
- the computed content description (not
null
) - See Also:
-
WorkbenchPart.getContentDescription()
-
updateStatusLine
protected void updateStatusLine(org.eclipse.jface.action.IStatusLineManager manager, org.eclipse.jface.viewers.IStructuredSelection selection) Updates the status line based on the given selection in this view.Default implementation clears the status line message if the selection is empty or if exactly one element is selected; sets a generic message of the form "(x) items selected" otherwise. It always clears the error message.
- Parameters:
manager
- the status line manager (nevernull
)selection
- the current selection (nevernull
)
-
doRefresh
Refreshes the content of this view according to options specified in the given context. This method may only be called after the SWT controls for this view have been created and before they have been disposed.- Parameters:
context
- the operation context (nevernull
)
-
createNoHierarchyPage
protected org.eclipse.swt.widgets.Control createNoHierarchyPage(org.eclipse.swt.widgets.Composite parent) Creates and returns a control for the 'no hierarchy' page. This method is called once, when the part's control is created.Default implementation returns a
Label
telling, in general terms, that there is no call hierarchy to display. Subclasses may override this method (e.g., to give details on what the user needs to do to display a call hierarchy).- Parameters:
parent
- the parent composite (nevernull
)- Returns:
- the created control (not
null
)
-
getSashForm
protected final org.eclipse.swt.custom.SashForm getSashForm()Returns the parentSashForm
for the hierarchy and location viewers.- Returns:
- the
SashForm
, ornull
if it has yet to be created - See Also:
-
createSashForm
protected org.eclipse.swt.custom.SashForm createSashForm(org.eclipse.swt.widgets.Composite parent) Creates and returns aSashForm
that will be used as the parent control for the hierarchy and location viewers. This method only creates the control; it does not configure it. This method is called once, when the part's control is created.- Parameters:
parent
- the parent composite (nevernull
)- Returns:
- the created control (not
null
)
-
getHierarchyViewer
protected final org.eclipse.jface.viewers.TreeViewer getHierarchyViewer()Returns the hierarchy tree viewer.- Returns:
- the hierarchy tree viewer,
or
null
if it has yet to be created - See Also:
-
createHierarchyViewer
protected org.eclipse.jface.viewers.TreeViewer createHierarchyViewer(org.eclipse.swt.widgets.Composite parent) Creates and returns a tree viewer control that will be used for displaying the call hierarchy. This method only creates the control; it does not configure it. This method is called once, when the part's control is created.- Parameters:
parent
- the parent composite (nevernull
)- Returns:
- the created control (not
null
) - See Also:
-
configureHierarchyViewer
protected void configureHierarchyViewer(org.eclipse.jface.viewers.TreeViewer viewer) Configures the newly created hierarchy viewer. This method has to set as least a content provider and a label provider. This method is called once, just after the viewer is created.Default implementation sets a
CallHierarchyContentProvider
as the content provider, and aCallHierarchyLabelProvider
backed by aWorkbenchLabelProvider
as the label provider. Subclasses usually need to extend this method and replace the default label provider; they may also override this method completely, but there is usually no need to.- Parameters:
viewer
- the viewer to configure (nevernull
)
-
createHierarchyViewerMenuGroups
protected void createHierarchyViewerMenuGroups(org.eclipse.jface.action.IMenuManager manager) Creates the menu groups for the hierarchy viewer's pop-up menu. This method is called each time the pop-up menu is about to show, just beforefillHierarchyViewerMenu(IMenuManager)
is called.Default implementation adds groups named
GROUP_FOCUS
andIWorkbenchActionConstants.MB_ADDITIONS
. Subclasses may extend or override this method, but should usually keep the default groups.- Parameters:
manager
- the menu manager (nevernull
)
-
fillHierarchyViewerMenu
protected void fillHierarchyViewerMenu(org.eclipse.jface.action.IMenuManager manager) Fills the pop-menu for the hierarchy viewer using the menu groups created bycreateHierarchyViewerMenuGroups(IMenuManager)
. This method is called each time the pop-up menu is about to show.Default implementation adds generic actions such as 'focus on selection', 'refresh element', and 'remove from view'. Subclasses may extend or override this method.
- Parameters:
manager
- the menu manager (nevernull
)
-
hierarchySelectionChanged
protected void hierarchySelectionChanged(org.eclipse.jface.viewers.ISelection selection) This method is called on each selection change in the hierarchy viewer.Default implementation changes the input of the location viewer accordingly and tries to reveal the selected hierarchy node in an open editor with
revealInEditor
. Subclasses may extend or even override this method, but there is usually no need to.- Parameters:
selection
- the new selection (nevernull
)
-
getLocationViewer
protected final org.eclipse.jface.viewers.TableViewer getLocationViewer()Returns the location table viewer.- Returns:
- the location table viewer,
or
null
if it has yet to be created - See Also:
-
createLocationViewer
protected org.eclipse.jface.viewers.TableViewer createLocationViewer(org.eclipse.swt.widgets.Composite parent) Creates and returns a table viewer control that will be used for displaying the call locations. This method only creates the control; it does not configure it. This method is called once, when the part's control is created.- Parameters:
parent
- the parent composite (nevernull
)- Returns:
- the created control (not
null
) - See Also:
-
configureLocationViewer
protected void configureLocationViewer(org.eclipse.jface.viewers.TableViewer viewer) Configures the newly created location viewer. This method has to set as least a content provider and a label provider. This method is called once, just after the viewer is created.Default implementation sets an
ArrayContentProvider
as the content provider, and aLocationTableLabelProvider
as the label provider. Also, it invokescreateLocationColumns(Table)
. Subclasses may extend or even override this method, but there is usually no need to.- Parameters:
viewer
- the viewer to configure (nevernull
)
-
createLocationColumns
protected void createLocationColumns(org.eclipse.swt.widgets.Table table) Creates the table columns in the location viewer.Default implementation creates the columns based on descriptions returned by
getLocationColumnDescriptions()
. Subclasses may override this method, but there is usually no need to.- Parameters:
table
- the table to create columns in (nevernull
)
-
getLocationColumnDescriptions
Returns the column descriptions for the call location table.Default implementation returns descriptions for the 'icon' column, the 'line number' column, and the 'call info' column. Subclasses may override this method, but there is usually no need to.
- Returns:
- the column descriptions (not
null
)
-
createLocationViewerMenuGroups
protected void createLocationViewerMenuGroups(org.eclipse.jface.action.IMenuManager manager) Creates the menu groups for the location viewer's pop-up menu. This method is called each time the pop-up menu is about to show, just beforefillLocationViewerMenu(IMenuManager)
is called.Default implementation adds a group named
IWorkbenchActionConstants.MB_ADDITIONS
. Subclasses may extend or override this method.- Parameters:
manager
- the menu manager (nevernull
)
-
fillLocationViewerMenu
protected void fillLocationViewerMenu(org.eclipse.jface.action.IMenuManager manager) Fills the pop-menu for the location viewer using the menu groups created bycreateLocationViewerMenuGroups(IMenuManager)
. This method is called each time the pop-up menu is about to show.Default implementation does nothing. Subclasses may extend or override this method.
- Parameters:
manager
- the menu manager (nevernull
)
-
locationSelectionChanged
protected void locationSelectionChanged(org.eclipse.jface.viewers.ISelection selection) This method is called on each selection change in the location viewer.Default implementation tries to reveal the selected call location in an open editor with
revealInEditor
. Subclasses may extend or even override this method, but there is usually no need to.- Parameters:
selection
- the new selection (nevernull
)
-
revealInEditor
protected void revealInEditor(Object element, boolean activate, boolean mayOpenNewEditor) throws org.eclipse.ui.PartInitException Reveals the given element in an appropriate editor on a best effort basis.Default implementation uses the
editor opener
and specifically supports revealing anICallLocation
and anICallHierarchyNode
(other elements are handled generically). To reveal a call location in an open editor, it invokesrevealCallLocation
.- Parameters:
element
- notnull
activate
- whether to activate the editormayOpenNewEditor
- whether a new editor may be opened when the element cannot be revealed in an existing editor- Throws:
org.eclipse.ui.PartInitException
- if a new editor could not be created or initialized
-
revealCallLocation
protected void revealCallLocation(org.eclipse.ui.IEditorPart editor, ICallLocation callLocation, IContext context) Attempts to reveal the given call location in the given editor.Default implementation uses the
editor utility
of theeditor opener
for revealing the call range in the given editor and invokeshandleCannotRevealCallLocation
if the call location cannot be revealed for whatever reason.- Parameters:
editor
- nevernull
callLocation
- nevernull
context
- nevernull
-
handleCannotRevealCallLocation
protected void handleCannotRevealCallLocation(org.eclipse.ui.IEditorPart editor, ICallLocation callLocation, IContext context) Handles the case when a call location cannot be revealed in the editor.Default implementation displays a generic error message on the status line and attempts to reveal the caller element in the given editor.
- Parameters:
editor
- nevernull
callLocation
- nevernull
context
- nevernull
-
getEditorOpener
Returns the editor opener used by this view.- Returns:
- the editor opener,
or
null
if it has yet to be created - See Also:
-
createEditorOpener
Creates and returns an editor opener for this view. This method is called once, when the part's control is created.Subclasses may override this method if they require a specific editor opener.
- Returns:
- the created editor opener (not
null
)
-
getFocusOnSelectionAction
protected final org.eclipse.jface.action.IAction getFocusOnSelectionAction()Returns the 'focus on selection' action used by this view.- Returns:
- the 'focus on selection' action
-
getRefreshElementAction
protected final org.eclipse.jface.action.IAction getRefreshElementAction()Returns the 'refresh element' action used by this view.- Returns:
- the 'refresh element' action
-
getRemoveFromViewAction
protected final org.eclipse.jface.action.IAction getRemoveFromViewAction()Returns the 'remove from view' action used by this view.- Returns:
- the 'remove from view' action
-
addRefreshAction
protected void addRefreshAction(org.eclipse.jface.action.IAction action) Contributes the 'refresh' action to this view. This method is called once, when the part's control is created.Default implementation adds the given action to the view tool bar. Subclasses may extend or override this method.
- Parameters:
action
- the 'refresh' action (nevernull
)
-
addSetHierarchyKindAction
protected void addSetHierarchyKindAction(org.eclipse.jface.action.IAction action, CallHierarchyKind kind) Contributes a 'set hierarchy kind' action to this view. This method is called once for each of the 'set hierarchy kind' actions, when the part's control is created. If this view supports only one hierarchy kind, no 'set hierarchy kind' action is created and this method is not called.Default implementation adds the given action to the view tool bar as well as to the view menu. Subclasses may extend or override this method.
- Parameters:
action
- a 'set hierarchy kind' action (nevernull
)kind
- the hierarchy kind set by the given action (nevernull
)
-
addSetOrientationAction
protected void addSetOrientationAction(org.eclipse.jface.action.IAction action, int orientation) Contributes a 'set orientation' action to this view. This method is called once for each of the 'set orientation' actions, when the part's control is created.Default implementation adds the given action to the 'Layout' sub-menu of the view menu. The sub-menu is created if necessary. Subclasses may extend or override this method.
- Parameters:
action
- a 'set orientation' action (nevernull
)orientation
- the orientation set by the given action
-
createHistoryDropDownAction
protected HistoryDropDownAction<CallHierarchyViewPart.HistoryEntry> createHistoryDropDownAction(HistoryDropDownAction.History<CallHierarchyViewPart.HistoryEntry> history) Creates and returns a 'show history list' action for this view. This method is called once, when the part's control is created.Subclasses need to override this method if they extend
HistoryDropDownAction
.- Parameters:
history
- nevernull
- Returns:
- the created action (not
null
)
-
addHistoryDropDownAction
protected void addHistoryDropDownAction(org.eclipse.jface.action.IAction action) Contributes the 'show history list' action to this view. This method is called once, when the part's control is created.Default implementation adds the given action to the view tool bar. Subclasses may extend or override this method.
- Parameters:
action
- the 'show history list' action (nevernull
)
-
addPinAction
protected void addPinAction(org.eclipse.jface.action.IAction action) Contributes the 'pin' action to this view. This method is called once, when the part's control is created.Default implementation adds the given action to the view tool bar. Subclasses may extend or override this method.
- Parameters:
action
- the 'pin' action (nevernull
)
-
getHistory
Returns the history used by this view; the history is represented by a "live" list of history entries.Default implementation returns a history that is shared between all views managed by the same
view manager
.- Returns:
- the view history (never
null
)
-
createHistoryEntry
Creates and returns a history entry for the given input elements.- Parameters:
inputElements
- nevernull
; never empty- Returns:
- the created history entry (not
null
)
-
notifyHistoryUpdated
protected void notifyHistoryUpdated()Notifies that the history has been updated by this view.Default implementation calls
historyUpdated()
for each view managed by the sameview manager
.- See Also:
-
historyUpdated
protected void historyUpdated()A callback that is invoked when the history has been updated.Default implementation sets the enabled state of the 'show history list' action according to whether the history is empty and, if the history is empty, clears the view input.
- See Also:
-