|Toolbar Buttons Enablement problem [message #1772438]
||Sat, 09 September 2017 20:42
| Frank Buloup
Registered: August 2017
I have a bunch of actions inheriting from JFace Action class and implementing some listeners in order to define their enablements depending on the selection in a specific view. Then I define commands associated to each of these actions declaratively in plugin.xml : Action classes and commands in plugin.xml have same IDs . Then I create, still declaratively in plugin.xml, the main menu, the popup menu for this specific view and the main toolbar using command ids pointing to the previous ones.
My problem is that the main and popup menus items enablements reflect perfectly actions states but not the main toolbar buttons !
Why is it working properly for main and popup menus and not for toolbar ???!!!
It's like if the main toolbar buttons were always late. The toolbar buttons enablements reflects the state of the previous actions enablements !
I think my problem is very, very similar to this bug : https://bugs.eclipse.org/bugs/show_bug.cgi?id=180203
But I've not found any workaround. I know that it is better to use Handler instead of Action, but I would like to avoid any refactoring.
Is there any solution to this strange behaviour ?
[Updated on: Sat, 09 September 2017 20:45]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01793 seconds