Hiding commands' UI elements [message #491154] |
Tue, 13 October 2009 09:31  |
Eclipse User |
|
|
|
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 #495431 is a reply to message #491242] |
Wed, 04 November 2009 15:21  |
Eclipse User |
|
|
|
Activities apparently only work on the whole workbench-scope; is there something that can show/hide UI elements depending on which view? For example, show them in one view, but hide them in another instance of the view (same view id).
<edit>Is there a way to do it with "contexts"? (org.eclipse.ui.context) </edit>
Thanks so much for that helpful information. This was a huge step. The SourceProvider came in useful for something too.
[Updated on: Wed, 04 November 2009 15:37] by Moderator
|
|
|
Re: Hiding commands' UI elements [message #603098 is a reply to message #491242] |
Wed, 04 November 2009 15:21  |
Eclipse User |
|
|
|
Activities apparently only work on the whole workbench-scope; is there something that can show/hide UI elements depending on which view? For example, show them in one view, but hide them in another instance of the view (same view id).
Thanks so much for that helpful information. This was a huge step. The SourceProvider came in useful for something too.
|
|
|
Powered by
FUDForum. Page generated in 0.27521 seconds