Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] Activity and Role changes


Chris McLaren and I have integrated our separate roles/activities work this afternoon.  As a consequence, the classes some of you are relying on may have been changed, moved or deleted.

In particular, org.eclipse.ui.internal.roles.RoleManager (and IDERoleManager) is gone.  This was used internally for various role based work but it also exposed .isEnabledId(String) for determining whether or not a given ID was active based on matching patterns with the various activities.    Some of you were using this to filter various contributions and I apologize for the breakage (but it was necessary, I swear).  To accomplish this pattern matching, you used to do the following:

        RoleManager.getInstance().isEnabledId(string);

Now you would do the this:

        IActivityManager activityManager = ((Workbench)PlatformUI.getWorkbench()).getActivityManager();
        activityManager.match(string, activityManager.getEnabledActivityIds());

.getActivityManager() may eventually be moved into the IWorkbench API at some point or somewhere else that is equally accessible.

There were of course other changes, particularly in regards to how activities are activated and deactivated (or enabled and disabled) and how you go about performing this state change based on pattern matching (as above).  There will be updated proposals and documents shortly but if you have any questions in the meantime please feel free to ask.

Back to the top