[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Disabling Menu Items at Runtime

Hi guys,

In our application, we need to enable/disable menu items at run-time, based on a boolean value returned by each plugin. Basically what happens is that when the user loads a file, for example, a java Object is created representing its contents (this can be a sparse matrix or a tree, for example). We would then like to query each plugin to see if it has capabilities to process this data Object. If yes, then that menu item is enabled, else it is disabled. This ensures that a user doesn't click on every damn menu item to see what he/she can do.

We have yet to find a way to enable/disable menu-items at run-time. Is there a good [non-hack :)] way of doing this? What we've seen in RCP so far just ROCKS and so we'd really like to not give it up - which we would have to cuz this feature is a critical requirement.

ideas?

Shashi
p.s. Cheers from an exceptionally warm Indiana ;)