Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Menucontribution only for resources contained in projects with a certain nature
Menucontribution only for resources contained in projects with a certain nature [message #1034259] Fri, 05 April 2013 08:05
Robert Gruendler is currently offline Robert GruendlerFriend
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?
Previous Topic:Help
Next Topic:Headless Product Build
Goto Forum:
  


Current Time: Thu Apr 25 01:16:31 GMT 2024

Powered by FUDForum. Page generated in 0.02917 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top