|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.activities.WorkbenchActivityHelper
A utility class that contains helpful methods for interacting with the activities API.
Method Summary | |
---|---|
static boolean |
allowUseOf(ITriggerPoint triggerPoint,
Object object)
Answers whether a given contribution is allowed to be used based on activity enablement. |
static boolean |
allowUseOf(Object object)
Deprecated. |
static String |
createUnifiedId(IPluginContribution contribution)
Utility method to create a String containing the plugin
and extension ids of a contribution. |
static Set |
expandActivityDependencies(Set baseActivities)
Return the expanded activities for the given activity set. |
static boolean |
filterItem(Object object)
Answers whether the provided object should be filtered from the UI based on activity state. |
static Set |
getActivityIdsForCategory(ICategory category)
Return the activities directly required by a given category. |
static Set |
getContainedCategories(IActivityManager activityManager,
String categoryId)
Return a list of category ids that are implicitly contained within the given category. |
static Set |
getDisabledCategories(IActivityManager activityManager,
String categoryId)
Return a list of category ids that will become implicity disabled if the given category becomes disabled Note that the set returned by this set represents the delta of categories that would be enabled - if the category is already enabled then it is omitted. |
static Set |
getEnabledCategories(IActivityManager activityManager)
Return the set of enabled categories. |
static Set |
getEnabledCategories(IActivityManager activityManager,
String categoryId)
Return a list of category ids that will become implicity enabled if the given category becomes enabled Note that the set returned by this set represents the delta of categories that would be enabled - if the category is already enabled then it is omitted. |
static Set |
getEnabledCategoriesForActivity(IActivityManager activityManager,
String activityId)
Return the number of enabled categories that this activity belongs to. |
static IIdentifier |
getIdentifier(IPluginContribution contribution)
Return the identifier that maps to the given contribution. |
static Set |
getRequiredActivityIds(String activityId)
Return the activities required for this activity. |
static boolean |
isEnabled(IActivityManager activityManager,
String categoryId)
Returns whether the given category is enabled. |
static boolean |
isFiltering()
Returns whether the UI is set up to filter contributions. |
static ICategory[] |
resolveCategories(IMutableActivityManager activityManager,
Set categoryIds)
Resolve the collection of category ids to an array of ICategory objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static IIdentifier getIdentifier(IPluginContribution contribution)
contribution
- the contribution
public static boolean allowUseOf(Object object)
true
is returned.
object
- the contribution to test.
allowUseOf(ITriggerPoint, Object)
public static boolean allowUseOf(ITriggerPoint triggerPoint, Object object)
true
is returned.
triggerPoint
- the trigger point being hitobject
- the contribution to test.
public static final String createUnifiedId(IPluginContribution contribution)
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.
contribution
- the contribution to use
public static final boolean filterItem(Object object)
false
except when the object is an instance
of IPluginContribution
whos unified id matches an IIdentifier
that is currently disabled.
object
- the object to test
createUnifiedId(IPluginContribution)
public static final boolean isFiltering()
public static Set getEnabledCategories(IActivityManager activityManager, String categoryId)
activityManager
- the activity manager to test againstcategoryId
- the category to be enabled
public static Set expandActivityDependencies(Set baseActivities)
baseActivities
- the set of activities to expand
public static Set getRequiredActivityIds(String activityId)
activityId
- the activity id
public static Set getActivityIdsForCategory(ICategory category)
category
- the category
public static Set getDisabledCategories(IActivityManager activityManager, String categoryId)
activityManager
- the activity manager to test against *categoryId
- the category to be enabled
public static final Set getContainedCategories(IActivityManager activityManager, String categoryId)
activityManager
- the activity manager to test agaisntcategoryId
- the category to be enabled
public static Set getEnabledCategories(IActivityManager activityManager)
activityManager
- the activity manager to test against
public static Set getEnabledCategoriesForActivity(IActivityManager activityManager, String activityId)
activityManager
- the activity manager to test against *activityId
- the activity id to query on
public static boolean isEnabled(IActivityManager activityManager, String categoryId)
activityManager
- the activity manager to test againstcategoryId
- the category id
public static ICategory[] resolveCategories(IMutableActivityManager activityManager, Set categoryIds)
ICategory
objects.
activityManager
- the activity manager to test againstcategoryIds
- the category ids
ICategory
objects
|
Eclipse Platform Release 3.1 |
|||||||||||
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, 2005. All rights reserved.