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 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?
Previous Topic:Eclipse plugins for flexible custom output language IDE?
Next Topic:Headless Product Build
Goto Forum:
  


Current Time: Thu Oct 30 17:44:48 GMT 2014

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

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