org.eclipse.handly.ui.navigator

## Class OpenActionProvider

- java.lang.Object
- - org.eclipse.ui.actions.ActionGroup
  - - org.eclipse.ui.navigator.CommonActionProvider
    - - org.eclipse.handly.ui.navigator.OpenActionProvider

- All Implemented Interfaces:
    org.eclipse.ui.navigator.IMementoAware

      public class OpenActionProvider
      extends org.eclipse.ui.navigator.CommonActionProvider

  Provides 'Open' action and 'Open With' submenu.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OpenActionProvider()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected org.eclipse.ui.actions.BaseSelectionListenerAction` | `createOpenAction()` Returns a new open action for this provider.
    `void` | `fillActionBars(org.eclipse.ui.IActionBars actionBars)` If the 'Open' action is enabled for the current selection, this implementation sets the global action handler for the action with the id `ICommonActionConstants.OPEN`.
    `void` | `fillContextMenu(org.eclipse.jface.action.IMenuManager menu)` If the 'Open' action is enabled for the current selection, this implementation inserts a contribution item for the action after the item named `ICommonMenuConstants.GROUP_OPEN`.
    `void` | `init(org.eclipse.ui.navigator.ICommonActionExtensionSite actionSite)`

    - ### Methods inherited from class org.eclipse.ui.navigator.CommonActionProvider

      `filterAction, getActionSite, restoreState, saveState`

    - ### Methods inherited from class org.eclipse.ui.actions.ActionGroup

      `dispose, getContext, setContext, updateActionBars`

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

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

- - ### Constructor Detail

    - #### OpenActionProvider

          public OpenActionProvider()

  - ### Method Detail

    - #### init

          public void init(org.eclipse.ui.navigator.ICommonActionExtensionSite actionSite)

      After calling the superclass implementation, this implementation `creates` a new open action for this provider.

      Overrides:
        `init` in class `org.eclipse.ui.navigator.CommonActionProvider`

    - #### fillContextMenu

          public void fillContextMenu(org.eclipse.jface.action.IMenuManager menu)

      If the 'Open' action is enabled for the current selection, this implementation inserts a contribution item for the action after the item named `ICommonMenuConstants.GROUP_OPEN`. If the currently selected element could be adapted to an `IFile`, this implementation appends an `OpenWithMenu` for the file to the group named `ICommonMenuConstants.GROUP_OPEN_WITH`.
      Overrides:
        `fillContextMenu` in class `org.eclipse.ui.actions.ActionGroup`

    - #### fillActionBars

          public void fillActionBars(org.eclipse.ui.IActionBars actionBars)

      If the 'Open' action is enabled for the current selection, this implementation sets the global action handler for the action with the id `ICommonActionConstants.OPEN`.
      Overrides:
        `fillActionBars` in class `org.eclipse.ui.actions.ActionGroup`

    - #### createOpenAction

          protected org.eclipse.ui.actions.BaseSelectionListenerAction createOpenAction()

      Returns a new open action for this provider.

      Default implementation returns a new `OpenAction`. Subclasses may override.

      Returns:
        the created open action (never `null`)

Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0