Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Working with Action not enabled exception
Working with Action not enabled exception [message #535160] Fri, 21 May 2010 13:11
saurav sarkar is currently offline saurav sarkar
Messages: 424
Registered: July 2009
Senior Member
Hi All,

I have tabbed property sheets, where in i have a table viewer.I have bound few keys with the actions.
When creating the actions, i have disabled the actions.
On the selection of the table viewer the actions are enabled/disabled depending upon the logic.

All the scenario works except one.
(1) When the user first comes in and clicks ctrl-c ------> ctrl-c works and the corresponding handlers is invoked.
(2) I press ctrl-v------------> Now the paste actions is disabled and the handler is not executed.

The above scenario is not working because the selection on the table viewer is not made for the paste.


Soln> To enable the paste action after the copy action has been perfromed.
But i dont see this as a proper solution as the the copy action/service should do its own stuff.Multiple instances of the tableviewer will again give me problems.

Is there any callabacks from the command framework where i can enable/disable the action depending on the logic. like overriding the isEnabled() method of the Action.

In this case it does not work because the Actionhandler (org.eclipse.ui.commands) does not check the isEnabled() method of the action rather the hashmap entitiies of the attributes.

Any help would be hugely appreciated.

Thanks and Regards,
Saurav


Previous Topic:Problems with headless build on 3.5
Next Topic:moved to equinox forum
Goto Forum:
  


Current Time: Tue Sep 30 23:55:59 GMT 2014

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

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