Menucontribution only for resources contained in projects with a certain nature [message #1034259] |
Fri, 05 April 2013 08:05 |
Robert Gruendler Messages: 66 Registered: June 2011 |
Member |
|
|
I'm trying to restrict the visibility of a menu contribution only for files with a specific content type AND for files nested in a project with a specific nature.
So far i've tried a lot of different combinations, but i can't get this to work. My current approach looks like this:
<visibleWhen
checkEnabled="false">
<and>
<reference
definitionId="org.eclipse.php.ui.phpContentType.definition">
</reference>
<iterate
operator="or">
<test
property="org.eclipse.core.resources.projectNature"
value="com.dubture.composer.core.composerNature">
</test>
</iterate>
</and>
</visibleWhen>
But this way, the menu contribution does not appear at all.
I'm unable to grasp how to target the project the selected file is a child of in the expression, so i can test against the projectNature property.
Anyone knows how to do this?
|
|
|
Powered by
FUDForum. Page generated in 0.02917 seconds