Package org.eclipse.handly.ui.callhierarchy

# Class CallHierarchyViewOpener

java.lang.Object
org.eclipse.handly.ui.callhierarchy.CallHierarchyViewOpener

public final class CallHierarchyViewOpener extends Object
A helper class for opening a call hierarchy view.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CallHierarchyViewOpener(String viewId, CallHierarchyViewManager viewManager)`
  Constructs an opener for a call hierarchy view with the given id and the given view manager.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.eclipse.ui.IViewPart`
  `openView(org.eclipse.ui.IWorkbenchPage page, Object[] inputElements)`
  Shows a call hierarchy view in the given workbench page, gives it focus, and sets its input to the given elements.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CallHierarchyViewOpener

    public CallHierarchyViewOpener(String viewId, CallHierarchyViewManager viewManager)
    Constructs an opener for a call hierarchy view with the given id and the given view manager.
    Parameters:
      `viewId` - not `null`
      `viewManager` - not `null`

- ## Method Details

  - ### openView

    public org.eclipse.ui.IViewPart openView(org.eclipse.ui.IWorkbenchPage page, Object[] inputElements) throws org.eclipse.ui.PartInitException
    Shows a call hierarchy view in the given workbench page, gives it focus, and sets its input to the given elements. If there is no 'unpinned' call hierarchy view in the given page, a new instance of the view is created; otherwise, the most recently activated 'unpinned' view is reused.

    Note that in some error cases this method may return a view that is not an instance of `CallHierarchyViewPart` (e.g., an `ErrorViewPart` may be returned).

    Parameters:
      `page` - not `null`
      `inputElements` - not `null`, must not contain nulls; may be empty
    Returns:
      the opened view (never `null`)
    Throws:
      `org.eclipse.ui.PartInitException` - if the view could not be initialized
      `IllegalArgumentException` - if the given elements are not valid input elements for the view