Skip to main content

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

Kim just started a mini-vacation. She's back Wednesday. 

Some people on the dynamic team suggested that we might not expose 
references to IActivityManager or IRoleManager at this time as the API is 
wee bit larger than a couple of predicates, that would be why you 
currently see what you see.

I personally think that IWorkbench should provide IActivityManager 
getActivityManager() in its entirety as you suggest. All of the API is 
still marked experimental in the javadoc right now, but it is almost 
frozen.

After doing that, I suppose the convenience method
activityManager.isEnabled(string)
*could* be provided  for: 
activityManager.match(string, activityManager.getEnabledActivityIds()); 

If I had to guess why people shy away from putting an [experimental, 
subject to change] method in IWorkbench is simply the coordination 
required with the install/update team - who needed to go against the 
recommended course and implement IWorkbench themselves for one 
particularly esoteric purpose during the restarting of the workbench after 
a configuration change. This means that adding to IWorkbench will cause 
the build to break. I suppose it makes for a good deterrent.

chris.





Nick Edgar/Ottawa/IBM@IBMCA 
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
10/17/2003 10:30 AM
Please respond to
platform-ui-dev


To

platform-ui-dev@xxxxxxxxxxx
cc





Subject
Re: [platform-ui-dev] Activity and Role changes






Can we make the expression to test whether an id is enabled or not more 
concise?  The only variable is the id string.  The fact that it is 
matching against a set of enabled activity ids should be encapsulated as 
an implementation detail.  This would allow for more possibilities for 
optimization in the future, in addition to simplifying the calls to the 
activity manager.

Also, talking to the activity manager must be done using public API only, 
and cannot require casting to internal classes (e.g. Workbench).  It's not 

just the Workbench that will be doing filtering.  E.g. Debug will need to 
filter launch configuration types.  I realize that this is work in 
progress, but in that case we should make the appropriate methods be 
public API, but with a comment in their spec stating that they are work in 

progress and may change.

I'm thinking of something like: 
PlatformUI.getWorkbench().getActivityManager().isEnabledId(string). 
(IWorkbench should not have any other API for activity management other 
than getActivityManager()).

Thanks,
Nick






Kim Horne/Ottawa/IBM@IBMCA
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
10/16/2003 03:56 PM
Please respond to platform-ui-dev
 
        To:     platform-ui-dev@xxxxxxxxxxx
        cc: 
        Subject:        [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.

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





Back to the top