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.
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.
public static boolean allowUseOf(Object object)(Code)
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. whether the contribution is allowed to be used based on activityenablement. See Also:WorkbenchActivityHelper.allowUseOf(ITriggerPoint,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: triggerPoint - the trigger point being hit Parameters: object - the contribution to test. whether the contribution is allowed to be used based on activityenablement.
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 the unified id
expandActivityDependencies
public static Set expandActivityDependencies(Set baseActivities)(Code)
Return the expanded activities for the given activity set. This will
resolve all activity requirement bindings.
Parameters: baseActivities - the set of activities to expand the expanded activities since: 3.1
filterItem
final public static boolean filterItem(Object object)(Code)
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 whether the object should be filtered See Also:WorkbenchActivityHelper.createUnifiedId(IPluginContribution)
Return the activities directly required by a given category.
Parameters: category - the category the activities directly required by a given category since: 3.1
Return a list of category ids that are implicitly contained within the
given category.
Parameters: activityManager - the activity manager to test agaisnt Parameters: categoryId - the category to be enabled a list of category ids that will become implicity enabled if thegiven category becomes enabled since: 3.1
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.
Parameters: activityManager - the activity manager to test against Parameters: categoryId - the category to be enabled a list of category ids that will become implicity enabled if thegiven category becomes enabled since: 3.1
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.
Parameters: activityManager - the activity manager to test against Parameters: categoryId - the category to be enabled a list of category ids that will become implicity enabled if thegiven category becomes enabled since: 3.1
Return the set of enabled categories. An enabled category is one in which
all contained activities are enabled.
Parameters: activityManager - the activity manager to test against the set of enabled categories. since: 3.1
Return the number of enabled categories that this activity belongs to.
Parameters: activityManager - the activity manager to test against * Parameters: activityId - the activity id to query on the set of enabled category ids that this activity belongs to since: 3.1
Return the set of partially enabled categories.
Parameters: activityManager - the activity manager to test against the set of partially enabled categories since: 3.2
getRequiredActivityIds
public static Set getRequiredActivityIds(String activityId)(Code)
Return the activities required for this activity.
Parameters: activityId - the activity id the activities required for this activity since: 3.1
Returns whether the given category is enabled. A category is enabled if
all of its activities are enabled.
Parameters: activityManager - the activity manager to test against Parameters: categoryId - the category id whether the category is enabled since: 3.1
Returns whether the UI is set up to filter contributions. This is the
case if there are defined activities.
whether the UI is set up to filter contributions
Returns whether the given category is partially enabled. A partially
enabled category is one in which the number of enabled activites is both
non-zero and less than the total number of activities in the category.
Parameters: activityManager - the activity manager to test against Parameters: categoryId - the category id whether the category is enabled since: 3.2
Resolve the collection of category ids to an array of
ICategory objects.
Parameters: activityManager - the activity manager to test against Parameters: categoryIds - the category ids the array of category ids resolved to ICategoryobjects since: 3.1