Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How can I disable capabilities/activities ?
How can I disable capabilities/activities ? [message #280711] Tue, 08 February 2005 09:14 Go to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Hello,
how can I disable capabilities
- programmaticly
- and via settings in any configuration file.

Thanks in advance,
Yves
Re: How can I disable capabilities/activities ? [message #280719 is a reply to message #280711] Tue, 08 February 2005 12:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Chris_Laffra.ca.ibm.com

Try "Help > Help Contents..." and search for "activities".

--
Chris Laffra, http://eclipsefaq.org


"Yves Harms" <user@domain.invalid> wrote in message
news:cu9vpn$u1s$1@www.eclipse.org...
> Hello,
> how can I disable capabilities
> - programmaticly
> - and via settings in any configuration file.
>
> Thanks in advance,
> Yves
Re: How can I disable capabilities/activities ? [message #280720 is a reply to message #280719] Tue, 08 February 2005 12:53 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:AbstractPreferenceInitializer Problem
Next Topic:Legal way to intervene in file save operations?
Goto Forum:
  


Current Time: Tue Apr 23 12:53:22 GMT 2024

Powered by FUDForum. Page generated in 0.03643 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top