Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.activities
Class WorkbenchActivityHelper

    java.lang.Object
      org.eclipse.ui.activities.WorkbenchActivityHelper

public final class WorkbenchActivityHelper
extends Object

A utility class that contains helpful methods for interacting with the activities API.

Since:
  3.0

Method Summary
`static boolean` | `allowUseOf(Object object)` Answers whether a given contribution is allowed to be used based on activity enablement.
`static String` | `createUnifiedId(IPluginContribution contribution)` Utility method to create a `String` containing the plugin and extension ids of a contribution.
`static boolean` | `filterItem(Object object)` Answers whether the provided object should be filtered from the UI based on activity state.
`static boolean` | `isFiltering()` Returns whether the UI is set up to filter contributions.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### allowUseOf

    public static boolean allowUseOf(Object object)

  Answers whether a given contribution is allowed to be used based on activity enablement. If it is currently disabled, then a dialog is opened and the user is prompted to activate the requried activities. If the user declines their activation then false is returned. In all other cases `true` is returned.

  Parameters:
    `object` - the contribution to test.
  Returns:
    whether the contribution is allowed to be used based on activity enablement.

### createUnifiedId

    public static final String createUnifiedId(IPluginContribution contribution)

  Utility method to create a `String` containing the plugin and extension ids of a contribution. This will have the form

      pluginId/extensionId

  . If the IPluginContribution does not define a plugin id then the extension id alone is returned.

  Parameters:
    `contribution` - the contribution to use
  Returns:
    the unified id

### filterItem

    public static final boolean filterItem(Object object)

  Answers whether the provided object should be filtered from the UI based on activity state. Returns `false` except when the object is an instance of `IPluginContribution` whos unified id matches an `IIdentifier` that is currently disabled.

  Parameters:
    `object` - the object to test
  Returns:
    whether the object should be filtered
  See Also:
    `createUnifiedId(IPluginContribution)`

### isFiltering

    public static final boolean isFiltering()

  Returns whether the UI is set up to filter contributions. This is the case if there are defined activities.

  Returns:
    whether the UI is set up to filter contributions

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.