Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Hiding commands' UI elements
Hiding commands' UI elements [message #602456] Tue, 13 October 2009 13:31 Go to next message
Joel is currently offline JoelFriend
Messages: 16
Registered: October 2009
Junior Member
Hello. I have a toggle Command that must toggle the visibility of four other Commands. They are all contributed to a view's toolbar as toolbar buttons. Does anyone know how to do this? Please help.

It sounds like it would be so simple, but I've been researching this and trying things for about 9 hours total now without any success. One thing I tried was having a static member variable in the toggle command's IHandler, which the other commands use in their isEnabled() methods to decide whether they should be enabled or not. The problem with this is that isEnabled() is only called at initialization (not to mention that the member having to be static means that it will toggle the commands in all instances of the view, but i'm desperate at this point.)
Re: Hiding commands' UI elements [message #602474 is a reply to message #602456] Tue, 13 October 2009 18:54 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi,

I believe you are looking for activities in combination with your own
source provider.

This might help:

http://www.vogella.de/blog/2009/07/13/eclipse-activities/
http://www.vogella.de/articles/EclipseCommands/article.html# commmands_sourceprovider

Best regards, Lars


joel.becker@21csi.com wrote:
> Hello. I have a toggle Command that must toggle the visibility of four
> other Commands. They are all contributed to a view's toolbar as toolbar
> buttons. Does anyone know how to do this? Please help.
> It sounds like it would be so simple, but I've been researching this and
> trying things for about 9 hours total now without any success. One thing
> I tried was having a static member variable in the toggle command's
> IHandler, which the other commands use in their isEnabled() methods to
> decide whether they should be enabled or not. The problem with this is
> that isEnabled() is only called at initialization (not to mention that
> the member having to be static means that it will toggle the commands in
> all instances of the view, but i'm desperate at this point.)
>
Previous Topic:Product build generates folder artifacts
Next Topic:Product build generates folder artifacts
Goto Forum:
  


Current Time: Thu Apr 25 08:44:02 GMT 2024

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

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

Back to the top