Skip to main content

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 sarkarFriend
Messages: 428
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,

Previous Topic:Eclipse 3.4 does not show the newly created CVS branches
Next Topic:moved to equinox forum
Goto Forum:

Current Time: Wed May 23 22:56:36 GMT 2018

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

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

Back to the top