[solved] Enable buttons [message #766838] |
Fri, 16 December 2011 09:14  |
Eclipse User |
|
|
|
Hey there,
I'm trying to enable some buttons in my toolbar after some action has been executed.
The plugin.xml looks like this:
The command to be enabled:
<command
id="piOptimize.commands.doOneIteration"
name="doOneIteration">
</command>
The Handler:
<extension
point="org.eclipse.ui.handlers">
<handler
class="pioptimize.commands.DoOneIteration"
commandId="piOptimize.commands.doOneIteration">
</handler>
</extension>
And the contribution to the toolbar:
<command
commandId="piOptimize.commands.doOneIteration"
icon="icons/run_next.png"
style="push">
</command>
The command which is supposed to enable the button calls:
DoOneIteration.setEnabled(true);
This call does not have an immediate effect and I can't figure out why.
Is there a way to force the toolbar to redraw itself? It does so if I call an instance of TitleAreaDialog, but that's not the desired behaviour, the buttons are supposed to be enabled after I setEnabled(true).
It does not work with an <enableWhen> in the xml either, the change is not immediate.
I would be very pleased, if someone helped me!
[Updated on: Sat, 17 December 2011 07:56] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04129 seconds