Java Reference
In-Depth Information
ActionFilterProvider Extension-Point
Identifier: org.eclipse.gmf.runtime.common.ui.services.
action.actionFilterProviders
Description: This extension-point configures providers for the Action
FilterService ( org.eclipse.gmf.runtime.common.ui.services.
action.filter.ActionFilterService ).
This service allows ActionFilterProvider attributes to be added to existing
types, as long as they adapt to IActionFilterProvider by returning the
ActionFilterService . These ActionFilterProvider attributes can then be used
inside the objectState element for enablement or visibility of static action contri-
butions (see org.eclipse.ui.popupMenus extension-point). It also permits
the entire workbench selection to be considered so that an action can be enabled
if it is supported on one or more elements in the selection.
The ActionFilterService selects a provider using one of the following criteria:
By provider descriptor —This uses static XML to determine whether a
provider provides the attribute test operation. A given provider can
declare, in XML, that it supports zero or more name/value pairs (attribute
elements); if the name/value of a given action expression matches any of
these, it is assumed to provide the operation.
By provider policy —If no name/value pairs are specified in XML for a
given provider, the service tries to load a policy for the provider (using the
standard mechanism), if one is specified, and asks the policy whether it
provides the operation.
By the provider itself —If no name/value pairs and no policy have been
specified, the service loads the provider itself and asks whether it provides
the operation. Typically, it is preferred to use one of the first two criteria
for providers.
Note that the value attribute is optional. When available in the provider's
XML, the value is used in conjunction with the name attribute to determine
whether that provider should be considered. When not available, only the name
is used to make the decision. For example, the value attribute for objectState ele-
ments of action expressions is sometimes set to either enablement or visibil-
ity . Some ActionFilterProviders use this information to determine whether the
criteria are being tested to determine enablement or visibility for a contribution.
Search WWH ::




Custom Search