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
Nested ClassesModifier and TypeClassDescriptionprotected static classRepresents an entry of the call hierarchy view history list. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringPop-up menu: name of group for focus actions (value"group.focus").Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE -
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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 voidaddHistoryDropDownAction(org.eclipse.jface.action.IAction action) Contributes the 'show history list' action to this view.protected voidaddPinAction(org.eclipse.jface.action.IAction action) Contributes the 'pin' action to this view.protected voidaddRefreshAction(org.eclipse.jface.action.IAction action) Contributes the 'refresh' action to this view.protected voidaddSetHierarchyKindAction(org.eclipse.jface.action.IAction action, CallHierarchyKind kind) Contributes a 'set hierarchy kind' action to this view.protected voidaddSetOrientationAction(org.eclipse.jface.action.IAction action, int orientation) Contributes a 'set orientation' action to this view.final booleanarePossibleInputElements(Object[] elements) Returns whether the given elements are possible input elements for this view.protected abstract StringComputes the content description for this view.protected voidconfigureHierarchyViewer(org.eclipse.jface.viewers.TreeViewer viewer) Configures the newly created hierarchy viewer.protected voidconfigureLocationViewer(org.eclipse.jface.viewers.TableViewer viewer) Configures the newly created location viewer.protected EditorOpenerCreates 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.TreeViewercreateHierarchyViewer(org.eclipse.swt.widgets.Composite parent) Creates and returns a tree viewer control that will be used for displaying the call hierarchy.protected voidcreateHierarchyViewerMenuGroups(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.HistoryEntrycreateHistoryEntry(Object[] inputElements) Creates and returns a history entry for the given input elements.protected voidcreateLocationColumns(org.eclipse.swt.widgets.Table table) Creates the table columns in the location viewer.protected org.eclipse.jface.viewers.TableViewercreateLocationViewer(org.eclipse.swt.widgets.Composite parent) Creates and returns a table viewer control that will be used for displaying the call locations.protected voidcreateLocationViewerMenuGroups(org.eclipse.jface.action.IMenuManager manager) Creates the menu groups for the location viewer's pop-up menu.protected org.eclipse.swt.widgets.ControlcreateNoHierarchyPage(org.eclipse.swt.widgets.Composite parent) Creates and returns a control for the 'no hierarchy' page.voidcreatePartControl(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.custom.SashFormcreateSashForm(org.eclipse.swt.widgets.Composite parent) Creates and returns aSashFormthat will be used as the parent control for the hierarchy and location viewers.voiddispose()protected voidRefreshes the content of this view according to options specified in the given context.protected voidfillHierarchyViewerMenu(org.eclipse.jface.action.IMenuManager manager) Fills the pop-menu for the hierarchy viewer using the menu groups created bycreateHierarchyViewerMenuGroups(IMenuManager).protected voidfillLocationViewerMenu(org.eclipse.jface.action.IMenuManager manager) Fills the pop-menu for the location viewer using the menu groups created bycreateLocationViewerMenuGroups(IMenuManager).protected final EditorOpenerReturns the editor opener used by this view.protected final org.eclipse.jface.action.IActionReturns the 'focus on selection' action used by this view.protected org.eclipse.jface.viewers.ViewerComparatorReturns a comparator for the hierarchy viewer.final CallHierarchyKindReturns the current hierarchy kind for this view.protected ICallHierarchyNode[]Returns the root nodes for the current call hierarchy.protected final org.eclipse.jface.viewers.TreeViewerReturns 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.TableViewerReturns the location table viewer.protected final org.eclipse.jface.action.IActionReturns the 'refresh element' action used by this view.protected final org.eclipse.jface.action.IActionReturns the 'remove from view' action used by this view.protected final org.eclipse.swt.custom.SashFormReturns the parentSashFormfor the hierarchy and location viewers.protected abstract CallHierarchyViewManagerReturns aCallHierarchyViewManagerfor this view.protected voidhandleCannotRevealCallLocation(org.eclipse.ui.IEditorPart editor, ICallLocation callLocation, IContext context) Handles the case when a call location cannot be revealed in the editor.protected voidhierarchySelectionChanged(org.eclipse.jface.viewers.ISelection selection) This method is called on each selection change in the hierarchy viewer.protected voidA callback that is invoked when the history has been updated.voidinit(org.eclipse.ui.IViewSite site, org.eclipse.ui.IMemento memento) final booleanisPinned()Returns whether this view is pinned.protected abstract booleanisPossibleInputElement(Object element) Returns whether the given element is a possible input element for this view.protected voidlocationSelectionChanged(org.eclipse.jface.viewers.ISelection selection) This method is called on each selection change in the location viewer.protected voidNotifies that the history has been updated by this view.final voidrefresh()Performs a full refresh of the content of this view.protected final voidPerforms a refresh of the content of this view according to options specified in the given context.protected voidrevealCallLocation(org.eclipse.ui.IEditorPart editor, ICallLocation callLocation, IContext context) Attempts to reveal the given call location in the given editor.protected voidrevealInEditor(Object element, boolean activate, boolean mayOpenNewEditor) Reveals the given element in an appropriate editor on a best effort basis.voidsaveState(org.eclipse.ui.IMemento memento) voidsetFocus()voidSets the current hierarchy kind for this view.voidsetInputElements(Object[] elements) Sets the current input elements for this view.voidsetOrientation(int orientation) Sets the orientation of this view, which may be one of the constantsSWT.HORIZONTALorSWT.VERTICAL; this method may also be called withSWT.HORIZONTAL|SWT.VERTICALfor automatic orientation.voidsetPinned(boolean pinned) Marks this view as pinned.final booleanReturns whether this view supports the given hierarchy kind.protected voidupdateStatusLine(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, setPartNameMethods 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, showBusyMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods 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.- See Also:
-
CallHierarchyViewPart
Constructs a call hierarchy view that supports the given call hierarchy kinds.- Parameters:
supportedHierarchyKinds- notnulland 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 untilfalseis 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 benullor may contain null elements, in which casefalsewill be returned; may be empty, in which casetruewill be returned- Returns:
trueif the given elements are possible input elements for this view, andfalseotherwise
-
isPossibleInputElement
Returns whether the given element is a possible input element for this view.- Parameters:
element- may benull, in which casefalsewill be returned- Returns:
trueif the given element is a possible input element for this view, andfalseotherwise- 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[])returnsfalsefor 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 notsupportedby this view
-
supportsHierarchyKind
Returns whether this view supports the given hierarchy kind.- Parameters:
kind- may benull, in which casefalsewill be returned- Returns:
trueif this view supports the given kind, andfalseotherwise
-
setOrientation
public void setOrientation(int orientation) Sets the orientation of this view, which may be one of the constantsSWT.HORIZONTALorSWT.VERTICAL; this method may also be called withSWT.HORIZONTAL|SWT.VERTICALfor 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:
trueif the view is pinned, andfalseotherwise
-
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:
initin interfaceorg.eclipse.ui.IViewPart- Overrides:
initin classorg.eclipse.ui.part.ViewPart- Throws:
org.eclipse.ui.PartInitException
-
saveState
public void saveState(org.eclipse.ui.IMemento memento) - Specified by:
saveStatein interfaceorg.eclipse.ui.IPersistable- Specified by:
saveStatein interfaceorg.eclipse.ui.IViewPart- Overrides:
saveStatein classorg.eclipse.ui.part.ViewPart
-
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent) - Specified by:
createPartControlin interfaceorg.eclipse.ui.IWorkbenchPart- Specified by:
createPartControlin classorg.eclipse.ui.part.WorkbenchPart
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.ui.IWorkbenchPart- Overrides:
disposein classorg.eclipse.ui.part.WorkbenchPart
-
setFocus
public void setFocus()- Specified by:
setFocusin interfaceorg.eclipse.ui.IWorkbenchPart- Specified by:
setFocusin classorg.eclipse.ui.part.WorkbenchPart
-
getViewManager
Returns aCallHierarchyViewManagerfor 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
LabelComparatorif the current hierarchy kind isCallHierarchyKind.CALLER, andnullotherwise.- Returns:
- a
ViewerComparator, ornullfor no sorting
-
computeContentDescription
Computes the content description for this view.- Returns:
- the computed content description (not
null) - See Also:
-
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
Labeltelling, 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 parentSashFormfor the hierarchy and location viewers.- Returns:
- the
SashForm, ornullif 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 aSashFormthat 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
nullif 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
CallHierarchyContentProvideras the content provider, and aCallHierarchyLabelProviderbacked by aWorkbenchLabelProvideras 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_FOCUSandIWorkbenchActionConstants.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
nullif 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
ArrayContentProvideras the content provider, and aLocationTableLabelProvideras 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 openerand specifically supports revealing anICallLocationand anICallHierarchyNode(other elements are handled generically). To reveal a call location in an open editor, it invokesrevealCallLocation.- Parameters:
element- notnullactivate- 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 utilityof theeditor openerfor revealing the call range in the given editor and invokeshandleCannotRevealCallLocationif the call location cannot be revealed for whatever reason.- Parameters:
editor- nevernullcallLocation- nevernullcontext- 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- nevernullcallLocation- nevernullcontext- nevernull
-
getEditorOpener
Returns the editor opener used by this view.- Returns:
- the editor opener,
or
nullif 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:
-