<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
     Copyright (c) 2005, 2008 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
     which accompanies this distribution, and is available at
     http://www.eclipse.org/legal/epl-v10.html
    
     Contributors:
         IBM Corporation - initial API and implementation
 -->

<plugin>

   
   <extension point="org.eclipse.ui.menus">
     <menuContribution locationURI="popup:org.eclipse.rse.ui.view.systemView">
        <menu id="org.eclipse.rse.ui.useractions.compile.menu"
              label="%DynamicLabel.CompileActionNode">
           <dynamic class="org.eclipse.rse.internal.useractions.api.ui.compile.SystemDynamicCompileMenu"
                     id="org.eclipse.ui.rse.ui.views.dynamiccompilemenu">
           </dynamic>
           <visibleWhen>
               <with
                     variable="activeMenuSelection">
                  <count
                        value="1">
                  </count>
                  <iterate
                        ifEmpty="false">
                     <and>
                        <adapt
                              type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
                        </adapt>
                        <test
                              property="org.eclipse.rse.internal.useractions.files.compile.iscompilable"
                              value="true">
                        </test>
                        <test
                              property="org.eclipse.rse.subsystems.files.isdirectory"
                              value="false">
                        </test>
                        <test
                              property="org.eclipse.rse.subsystems.files.isvirtual"
                              value="false">
                        </test>
                        <test
                              property="org.eclipse.rse.subsystems.files.isarchive"
                              value="false">
                        </test>
                     </and>
                  </iterate>
               </with>
            </visibleWhen>
        </menu>
        <menu
              id="org.eclipse.rse.ui.useractions.compileprompt.menu"
              label="%DynamicLabel.CompilePromptActionNode">
           <dynamic
                 class="org.eclipse.rse.internal.useractions.api.ui.compile.SystemDynamicCompilePromptMenu"
                 id="org.eclipse.ui.rse.ui.views.dynamiccompilepromptmenu">
           </dynamic>
           <visibleWhen>
              <with
                    variable="activeMenuSelection">
                 <count
                       value="1">
                 </count>
                 <iterate
                       ifEmpty="false">
                    <and>
                       <adapt
                             type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
                       </adapt>
                       <test
                             property="org.eclipse.rse.internal.useractions.files.compile.iscompilable"
                             value="true">
                       </test>
                       <test
                             property="org.eclipse.rse.subsystems.files.isdirectory"
                             value="false">
                       </test>
                       <test
                             property="org.eclipse.rse.subsystems.files.isvirtual"
                             value="false">
                       </test>
                       <test
                             property="org.eclipse.rse.subsystems.files.isarchive"
                             value="false">
                       </test>
                    </and>
                 </iterate>
              </with>
           </visibleWhen>
        </menu>
      	<menu id="org.eclipse.rse.ui.useractions.useraction.menu"
              label="%DynamicLabel.UserActionNode">
           <dynamic class="org.eclipse.rse.internal.useractions.api.ui.uda.SystemDynamicUserActionMenu"
                    id="org.eclipse.ui.rse.ui.views.dynamicuseractionmenu">
           </dynamic>
           <visibleWhen>
               <with
                     variable="activeMenuSelection">
                  <iterate
                        ifEmpty="false">
                     <and>
                        <adapt
                              type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
                        </adapt>
                        <test
                              property="org.eclipse.rse.subsystems.files.isvirtual"
                              value="false">
                        </test>
                     </and>
                  </iterate>
               </with>
            </visibleWhen>
        </menu>
     </menuContribution>
     </extension>
     
   <extension
         point="org.eclipse.core.expressions.propertyTesters">
      <propertyTester
			class="org.eclipse.rse.internal.useractions.files.compile.CompilablePropertyTester"
			id="org.eclipse.rse.internal.useractions.files.compile.CompilablePropertyTester"
			namespace="org.eclipse.rse.internal.useractions.files.compile"
			properties="iscompilable"
			type="org.eclipse.core.runtime.IAdaptable">
		</propertyTester>
   </extension>
   
	
</plugin>
