|
|
Re: How can I disable capabilities/activities ? [message #280720 is a reply to message #280719] |
Tue, 08 February 2005 12:53 |
Eclipse User |
|
|
|
Originally posted by: user.domain.invalid
Chris Laffra wrote:
> Try "Help > Help Contents..." and search for "activities".
>
The Eclipse Help only describes how to declare and activate
cativities/capabilities.
But again, how can I deactivate an activity ?
Yves
|
|
|
Re: How can I disable capabilities/activities ? [message #280722 is a reply to message #280720] |
Tue, 08 February 2005 14:14 |
Eclipse User |
|
|
|
Originally posted by: Chris_Laffra.ca.ibm.com
Not knowing enough about activities, I did Ctrl+Shift+T on IActivity.
Then I pressed F4 to get the concrete implementations.
I visited the Activity.class. I looked at the "enabled" variable.
I selected the setEnabled method. I pressed Ctrl-Alt-H to get all the
callers.
Finally, I noticed that setEnabled is package private API an no public API
seems to lead to it.
The closest thing to a useful API I saw was in
ActivityPersistanceHelper.loadEnabledStates(...).
Concluding, to me it seems there is no public API to dynamically disable
an activity (AKA capability). I may be wrong.
When activities were just introduced, there was this little dialog
off "Window>" where you could explicitly enable/disable activities.
It seems to have disappeared now.
--
Chris Laffra, http://eclipsefaq.org
"Yves Harms" <user@domain.invalid> wrote in message
news:cuacl2$q6g$1@www.eclipse.org...
> Chris Laffra wrote:
> > Try "Help > Help Contents..." and search for "activities".
> >
>
> The Eclipse Help only describes how to declare and activate
> cativities/capabilities.
> But again, how can I deactivate an activity ?
>
> Yves
|
|
|
Re: How can I disable capabilities/activities ? [message #280736 is a reply to message #280722] |
Tue, 08 February 2005 19:36 |
Eclipse User |
|
|
|
Originally posted by: kim_horne.ca.ibm.com
You should look at org.eclipse.ui.activities.IWorkbenchActivitySupport.
This interface contains setEnabledActivityIds(Set) which can be used
to alter the activity enablement state. An instancce of
IWorkbenchActivitySupport can be obtained from
IWorkbench.getActivitySupport().
Typical usage is as follows:
Set enabledActivities = new
HashSet(PlatformUI.getActivitySupport().getActivityManager() .getEnabledActivityIds());
// alter the set by adding or removing activity ids
PlatformUI.getActivitySupport().setEnabledActivityIds(enable dActivities);
Chris Laffra wrote:
> Not knowing enough about activities, I did Ctrl+Shift+T on IActivity.
> Then I pressed F4 to get the concrete implementations.
> I visited the Activity.class. I looked at the "enabled" variable.
> I selected the setEnabled method. I pressed Ctrl-Alt-H to get all the
> callers.
> Finally, I noticed that setEnabled is package private API an no public API
> seems to lead to it.
> The closest thing to a useful API I saw was in
> ActivityPersistanceHelper.loadEnabledStates(...).
>
> Concluding, to me it seems there is no public API to dynamically disable
> an activity (AKA capability). I may be wrong.
>
> When activities were just introduced, there was this little dialog
> off "Window>" where you could explicitly enable/disable activities.
> It seems to have disappeared now.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03643 seconds