Community
Participate
Working Groups
Hello, With the migration to Juno 4.2, class extending WorkbenchWindowControlContribution isn't invoking an overridden method isVisible() { Method inherited from class org.eclipse.jface.action.ContributionItem} which was working fine till 3.8. This is despite the fact that the javadoc for juno still enlists them as a valid method/implementation. I am using this method to hide a custom composite (created in createControl method) to be shown/hidden in the toolbar based on the perspective. Is this an intentional change or should anything else be changed in the implementation to migrate to Juno? Experts from Eclipse forum suggested me to open a bugzilla entry instead. (http://www.eclipse.org/forums/index.php/t/441135/) Thank you for any help one can provide on this. Any assistance in this direction will really be appreciated. Regards, Nihal
Update: I noticed that the isVisible method in DynamicToolBarContributionItem class is no longer present and it relies on the super implementation of this method from the class ContributionItem. In addition, I also noticed that this DynamicToolBarContributionItem is not getting listed as a contribution item in ToolBarManager class. :( Can this additional information help anybody point me to what's happening here? Regards, Nihal
Moving to platform UI
I don't see why it shouldn't just implement setVisible(*)/isVisible(*) like the 3.8 version. PW
Hi Paul, Thank you very much for a quick reply. For a moment, I too was convinced that perhaps your suggestion could work. However, setVisible method isn't getting invoked both in 3.8 and 4.2 :( Nevertheless, isVisible is invoked in 3.8 and not 4.2 which is why it works fine as I conditionally return true or false in this method. I also came across this https://bugs.eclipse.org/bugs/show_bug.cgi?id=297375 My implementation is exactly like specified in Comment 1 by Dominik G. However, this isn't related to 4.2. Am I missing out on something relevant to 4.2 for this? Anticipating a promising reply. Regards, Nihal
Those proxy methods are missing from 4.2, that's probably what causes the problem. if you provide a patch, I'll be happy to look at it. http://wiki.eclipse.org/Platform_UI/How_to_Contribute PW
Resolved this by appending a visibleWhen condition to the control through the plugin.xml to hide the control based on the perspective instead of pro grammatically hiding it. However, the issue of isVisible method not being invoked remains as is. :( Thanks, Nihal
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.