Runtime

## Package org.eclipse.gmf.runtime.common.ui.services.action.filter

Provides a set of classes to help in evaluating expressions for Eclipse plug-in action enablement and visibility.

See:
Description

Class Summary
AbstractActionFilterProvider: The parent of all action filter providers.
ActionFilterService: A service that provides action filters that can be used in evaluating action expressions.
ActionFilterService.ProviderDescriptor: A descriptor for action filter providers defined by a configuration element.
TestAttributeOperation: An operation that performs attribute tests by determining whether a specific attribute matches the state of a target object.

## Package org.eclipse.gmf.runtime.common.ui.services.action.filter Description

Provides a set of classes to help in evaluating expressions for Eclipse plug-in action enablement and visibility. The `ActionFilterService` allows clients to extend the action filters supported by objects selected in workbench. 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.

To add a new attribute to an object for action filtering, the object must implement the `IAdaptable` interface and an adapter factory must be registered that returns the `ActionFilterService` when the object is adapted to `IActionFilter`. An `org.eclipse.gmf.runtime.common.ui.services.action.filter.IActionFilterProvider` can then be registered to provide the test for the attribute using the `org.eclipse.gmf.runtime.common.ui.services.action.actionFilterProviders` extension point.

Such attributes are named in `objectState` elements which evaluate the attribute state of each object in the current selection for enablement or visibility criteria (see the org.eclipse.ui.popupMenus extension point for details). Eclipse documentation states that if each object in the selection has the specified attribute state, the expression is evaluated as true. However, this is not necessarily the case for attributes defined by an action filter provider, which can optionally evaluate the expression to true if one or more of the objects in the selection has the specified attribute state. The meaning of the value of the attribute (the `objectState` value) is defined by the action filter provider.

Action filter providers should be implemented by extending the `AbstractActionFilterProvider` class in this package.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.