Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Roles and activities


What about when you attempt to populate the UI for the first time?  You could at that point get the collection of launch types and initialize the manager...  Just a thought - if pattern matching is good for you then no worries.

I made a comment in the bug report you entered - you should be keying on enabled activities, not active activities.



Jared Burns <jaredburns@xxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

29/10/2003 04:34 PM

Please respond to
platform-ui-dev

To
platform-ui-dev@xxxxxxxxxxx
cc
Subject
Re: [platform-ui-dev] Roles and activities





Unfortunately, the launch configuration type extension point is managed in
Debug Core, so we can't access the Workbench when we're loading the
extensions.

This means we'll have to do the pattern matching ourselves. However, I hit
another problem while implementing this. The activity manager is returning an
empty set when I asked it for the active activity ids. In the "Activity
Configuration..." dialog, I have all activities set as active.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=45766

Thanks,
- Jared

> Additionally, there is another way in which you can use this system at a
> slightly higher level.  Instead of comparing your contributions ID against
> the activities directly, you can instead populate an
> IObjectActivityManager with all of your contributions and simply ask it
> for the set of currently enabled contributions.  IObjectActivityManager
> was intended to hide away the pattern matching under the hood.  This would
> go something as follows:
>
> // when you're loading the launch types extension point
> IObjectActivityManager manager =
> workbench.getObjectActivityManager(LAUNCH_CONFIG_EXT_POINT_ID, true);
>
> for (Iterator over launchTypes) {
>         manager.addObject(launchType.ext_pluginID, launchType.ext_localID,
> launchType);
> }
> manager.applyPatternBindings();
>
> // when you need to get the active types
>
> Collection launchTypes = allTypes;
> IObjectActivityManager manager =
> workbench.getObjectActivityManager(LAUNCH_CONFIG_EXT_POINT_ID, false);
>
> if (manager != null) {
>         launchTypes = manager.getActiveObjects();
> }
> show(launchTypes);

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev


Back to the top