[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: help regarding Action filters

If you already have an IActionDelegate you can use IAction#setEnabled(*) to disable the database button, no?

The IAction will only be updated on selection change, though.

The other way (supported in 3.3.x) is to write a command/handler and then use menu contributions to place the command in the toolbar. The handler can change its enabled state and fire a HandlerEvent, and the tool item will be updated.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm