Package 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.ui.actions.BaseSelectionListenerAction
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 idICommonActionConstants.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 namedICommonMenuConstants.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
-
Constructor Details
-
OpenActionProvider
public OpenActionProvider()
-
-
Method Details
-
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 namedICommonMenuConstants.GROUP_OPEN
. If the currently selected element could be adapted to anIFile
, this implementation appends anOpenWithMenu
for the file to the group namedICommonMenuConstants.GROUP_OPEN_WITH
.- Overrides:
fillContextMenu
in classorg.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 idICommonActionConstants.OPEN
.- Overrides:
fillActionBars
in classorg.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
)