I'm currently developing an eclipse plugin which conains (among others) an "upload" command and a projectNature "myNature"
This command should be visible at the following places:
- In the context menu of the package explorer (if the surrounding project is of "myNature")
So the first part (Project Explorer context menu is working fine).
For the second part i added a menuContribution like this:
<!-- a good solution is missing here -->
and a command like this:
<enabledWhen><!-- this works -->
What i can't figure out is how i can test the currently opened file in the enabledWhen or visbleWhen elements. I'd like to add an element to enabledWhen section of the command so that it is also enabled when the currentFile is contained in a "myNature" project. The "hasProjectnature" definition only works if there are selected elements in the Project Explorer view.
Can anyone help?