[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: How to enable/disable a menu with the new org.eclipse.ui.menus extension point?

When you register your handler using org.eclipse.ui.handlers, you can create an <enabledWhen/> expression. The default variable is a Collection with the current selection, and the current selection ISelection is provided with the variable "selection". You can feed both the default variable and the selection variable to <iterate/>

The IHandler can also control its enabled state programmatically, returning it from isEnabled() and firing a HandlerChangeEvent when the enabled state changes ... but a handler is only asked after it has been loaded.

PW