public abstract class AbstractValidationActionProvider extends BasicActionProvider
IAction
s.selectionProvider, viewer, viewerId, workbenchPart
Constructor and Description |
---|
AbstractValidationActionProvider() |
Modifier and Type | Method and Description |
---|---|
void |
fillSubMenu(org.eclipse.jface.action.IMenuManager subMenuManager)
Adds the applicable actions to the
sub menu of
the context menu resulting from previous invocation of BasicActionProvider.addSubMenu(IMenuManager) . |
protected boolean |
isEnabled(org.eclipse.jface.viewers.IStructuredSelection selection)
Computes the enable state of this action provider according to the given
selection . |
protected boolean |
isEnabled(java.lang.Object selectedObject)
Computes the enable state of this action provider according to the given
selectedObject . |
protected abstract void |
populateActions(org.eclipse.jface.action.IMenuManager menu,
org.eclipse.jface.viewers.IStructuredSelection selection,
boolean enabled)
Populates specified menu with the actions
provided by this
action provider implementation. |
addSubMenu, depopulateManager, depopulateManager, doInit, extractSubmenuActions, fillContextMenu, getEditingDomainFromSelection, init, isActivePropertySheet, isTransient, populateManager, populateManager
filterAction, getActionSite, restoreState, saveState
public void fillSubMenu(org.eclipse.jface.action.IMenuManager subMenuManager)
BasicActionProvider
sub menu
of
the context menu
resulting from previous invocation of BasicActionProvider.addSubMenu(IMenuManager)
.
The default implementation does nothing. Subclasses may override or extend this method.fillSubMenu
in class BasicActionProvider
BasicActionProvider.addSubMenu(IMenuManager)
protected abstract void populateActions(org.eclipse.jface.action.IMenuManager menu, org.eclipse.jface.viewers.IStructuredSelection selection, boolean enabled)
action provider
implementation. Initializes
actions with given selection and
enabled
status.menu
- The menu actions should be added to.selection
- The selection actions must act upon.enabled
- Enablement status indicating if actions should be enabled or not.protected final boolean isEnabled(org.eclipse.jface.viewers.IStructuredSelection selection)
selection
.
Note | This method is not supposed to be overridden by client applications for providing a custom enablement computation; in that purpose overriding isEnabled(Object) is preferable. |
selection
- The selection for which enablement must be computed.selection
;protected boolean isEnabled(java.lang.Object selectedObject)
selectedObject
.selectedObject
- The object currently selected; object from which enable state for this
action provider must be computed.true
if this provider is enabled for the given object
,
false
otherwise.