public class ResourceMgmtOverrideActionProvider
extends org.eclipse.ui.navigator.CommonActionProvider
original one
from Eclipse. It is used for overriding CloseResourceAction
and discarding
CloseUnrelatedProjectsAction
.
Unfortunately, there was no other choice than copying the whole code from ResourceMgmtActionProvider
for that
purpose because most of the relevant methods and fields of the latter are private or package private.
Constructor and Description |
---|
ResourceMgmtOverrideActionProvider() |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.ui.actions.BuildAction |
createBuildAction(org.eclipse.jface.window.IShellProvider provider)
Creates the
build action to be used by this action provider. |
protected org.eclipse.ui.actions.CloseResourceAction |
createCloseResourceAction(org.eclipse.jface.window.IShellProvider provider)
Creates the
close resource action to be used by this action provider. |
protected org.eclipse.ui.actions.OpenResourceAction |
createOpenResourceAction(org.eclipse.jface.window.IShellProvider provider)
Creates the
open resource action to be used by this action provider. |
protected org.eclipse.ui.actions.RefreshAction |
createRefreshAction(org.eclipse.jface.window.IShellProvider provider)
Creates the
refresh action to be used by this action provider. |
void |
fillActionBars(org.eclipse.ui.IActionBars actionBars) |
void |
fillContextMenu(org.eclipse.jface.action.IMenuManager menu)
Adds the build, open project, close project and refresh resource actions to the context menu.
|
protected org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(java.lang.String relativePath)
Returns the image descriptor with the given relative path.
|
void |
init(org.eclipse.ui.navigator.ICommonActionExtensionSite site) |
protected void |
makeActions() |
void |
updateActionBars() |
public void init(org.eclipse.ui.navigator.ICommonActionExtensionSite site)
init
in class org.eclipse.ui.navigator.CommonActionProvider
public void fillActionBars(org.eclipse.ui.IActionBars actionBars)
fillActionBars
in class org.eclipse.ui.actions.ActionGroup
public void fillContextMenu(org.eclipse.jface.action.IMenuManager menu)
The following conditions apply: build-only projects selected, auto build disabled, at least one builder present open project-only projects selected, at least one closed project close project-only projects selected, at least one open project refresh-no closed project selected
Both the open project and close project action may be on the menu at the same time.
No disabled action should be on the context menu.
fillContextMenu
in class org.eclipse.ui.actions.ActionGroup
menu
- context menu to add actions toprotected void makeActions()
protected org.eclipse.ui.actions.OpenResourceAction createOpenResourceAction(org.eclipse.jface.window.IShellProvider provider)
open resource action
to be used by this action provider.
Clients may override this method if they need to use a custom implementation of OpenResourceAction
.
provider
- The shell provider
for any dialogs that could be opened by the action.protected org.eclipse.ui.actions.CloseResourceAction createCloseResourceAction(org.eclipse.jface.window.IShellProvider provider)
close resource action
to be used by this action provider.
Clients may override this method if they need to use a custom implementation of CloseResourceAction
.
provider
- The shell provider
for any dialogs that could be opened by the action.protected org.eclipse.ui.actions.RefreshAction createRefreshAction(org.eclipse.jface.window.IShellProvider provider)
refresh action
to be used by this action provider.
Clients may override this method if they need to use a custom implementation of RefreshAction
.
provider
- The shell provider
for any dialogs that could be opened by the action.protected org.eclipse.ui.actions.BuildAction createBuildAction(org.eclipse.jface.window.IShellProvider provider)
build action
to be used by this action provider.
Clients may override this method if they need to use a custom implementation of BuildAction
.
provider
- The shell provider
for any dialogs that could be opened by the action.protected org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String relativePath)
public void updateActionBars()
updateActionBars
in class org.eclipse.ui.actions.ActionGroup