Enabling or disabling command handler based on selection [message #330981] |
Wed, 20 August 2008 09:19  |
Eclipse User |
|
|
|
Originally posted by: nick.allen.onlinehome.de
Hi,
I am writing a plug-in for Eclipse that integrates with the Bazaar
version control system. I have written my command handlers and used the
menu extension point to insert a "Bazaar" menu into the main eclipse
window. The problem is that my actions are always enabled and I need to
change that based on which files are selected or whether the editor has
focus or not. For selected files I need to check if they are in a parent
(or ancestor) directory that contains a ".bzr" directory and if the
editor has focus I need to check if the file being edited is in such a
directory structure.
The examples show how to use expressions in the XML file for the command
handlers but my condition is too complex to express in XML syntax. I
would like to do this programmatically or to at least write a new
expression class which I can then use in the XML (e.g.
IsUnderBazaarVersionControlExpression).
I have searched for 3 days solid and found nothing appropriate.
How do I do this? Any feedback greatly appreciated.
Many thanks in advance,
Nicholas Allen
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08279 seconds