You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2016/02/20 22:07:47 UTC

svn commit: r1731463 - /sling/trunk/tooling/ide/eclipse-ui/plugin.xml

Author: rombert
Date: Sat Feb 20 21:07:47 2016
New Revision: 1731463

URL: http://svn.apache.org/viewvc?rev=1731463&view=rev
Log:
SLING-4046 - Keyboard shortcuts do not work on content structure 

Consolidate some visibleWhen conditions by using the
'org.eclipse.core.expressions.definitions' extension point

Modified:
    sling/trunk/tooling/ide/eclipse-ui/plugin.xml

Modified: sling/trunk/tooling/ide/eclipse-ui/plugin.xml
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-ui/plugin.xml?rev=1731463&r1=1731462&r2=1731463&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-ui/plugin.xml (original)
+++ sling/trunk/tooling/ide/eclipse-ui/plugin.xml Sat Feb 20 21:07:47 2016
@@ -344,6 +344,29 @@
    </extension>
    
    <extension
+         point="org.eclipse.core.expressions.definitions">
+         <definition
+               id="org.apache.sling.ide.eclipse.jcrNode">
+            <iterate ifEmpty="false">
+ 	           <adapt type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode"/>
+ 	         </iterate>
+         </definition>
+         <definition
+               id="org.apache.sling.ide.eclipse.nonSlingProject">
+     	   <not>
+       	   	  <or>
+              	<test
+	    			property="org.eclipse.wst.common.project.facet.core.projectFacet" 
+    				value="sling.content"/>
+              	<test
+	    			property="org.eclipse.wst.common.project.facet.core.projectFacet" 
+    				value="sling.bundle"/>
+    		  </or>
+			</not>               
+         </definition>
+   </extension>
+    
+   <extension
    		point="org.eclipse.ui.menus">
    		<!-- Convert to ... contributions -->
    		<menuContribution
@@ -359,22 +382,13 @@
                        checkEnabled="false">
                    	 <iterate ifEmpty="false">
                    	   <instanceof value="org.eclipse.core.resources.IProject"/>
-                 	   <not>
-                   	   	  <or>
-                          	<test
-	        	    			property="org.eclipse.wst.common.project.facet.core.projectFacet" 
-	            				value="sling.content"/>
-                          	<test
-	        	    			property="org.eclipse.wst.common.project.facet.core.projectFacet" 
-	            				value="sling.bundle"/>
-	            		  </or>
-            			</not>
+                   	   <reference
+                             definitionId="org.apache.sling.ide.eclipse.nonSlingProject"/>
                    	 </iterate>
                  </visibleWhen>
            </command>
            <command
                  commandId="org.apache.sling.ide.eclipse.ui.wizards.convertToBundleProjectCommand"
-                 icon="org.apache.sling.ide.eclipse-ui.command4"
                  label="Convert to Bundle Project...">
                  <!-- 
                  	don't enable for sling.content or sling.bundle projects
@@ -386,16 +400,8 @@
                    	   <instanceof value="org.eclipse.core.resources.IProject"/>
                    	   <test property="org.eclipse.core.resources.projectNature"
                    	   		value="org.eclipse.jdt.core.javanature"/>
-                 	   <not>
-                   	   	  <or>
-                          	<test
-	        	    			property="org.eclipse.wst.common.project.facet.core.projectFacet" 
-	            				value="sling.content"/>
-                          	<test
-	        	    			property="org.eclipse.wst.common.project.facet.core.projectFacet" 
-	            				value="sling.bundle"/>
-	            		  </or>
-            			</not>
+                   	   <reference
+                             definitionId="org.apache.sling.ide.eclipse.nonSlingProject"/>
                    	 </iterate>
                  </visibleWhen>                 
            </command>
@@ -409,44 +415,28 @@
                  commandId="org.eclipse.ui.edit.copy">
                  <visibleWhen
                        checkEnabled="false">
-                     <iterate ifEmpty="false">
-                         <adapt
-                               type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-                         </adapt> 	 
-                     </iterate>
+					<reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
                  </visibleWhen>
            </command>
            <command
                  commandId="org.eclipse.ui.edit.paste">
                  <visibleWhen
                        checkEnabled="false">
-                     <iterate ifEmpty="false">
-                         <adapt
-                               type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-                         </adapt> 	 
-                     </iterate>
+                    <reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
                  </visibleWhen>
            </command>
            <command
                  commandId="org.eclipse.ui.edit.delete">
                  <visibleWhen
                        checkEnabled="false">
-                     <iterate ifEmpty="false">
-                         <adapt
-                               type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-                         </adapt> 	 
-                     </iterate>
+                       <reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
                  </visibleWhen>
            </command>
            <command
                  commandId="org.eclipse.ui.edit.rename">
                  <visibleWhen
                        checkEnabled="false">
-                     <iterate ifEmpty="false">
-                         <adapt
-                               type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-                         </adapt>
-                     </iterate>
+                       <reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
                  </visibleWhen>
            </command>
         </menuContribution>
@@ -460,19 +450,7 @@
               	label="&amp;Open .html (on server) in browser">
                  <visibleWhen
                        checkEnabled="false">
-                     <iterate ifEmpty="false">
-                         <adapt
-                               type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-                         </adapt>
-                         <!--
-         <visibility>
-               <objectState
-                     name="browseableNode"
-                     value="true">
-               </objectState>
-         </visibility>                         
-                         -->
-                     </iterate>
+					<reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
                  </visibleWhen>
               </command>
         </menuContribution>
@@ -528,44 +506,28 @@
            commandId="org.eclipse.ui.edit.delete"
            class="org.apache.sling.ide.eclipse.ui.actions.JcrNodeDeleteHandler">
            <activeWhen>
-             <iterate ifEmpty="false">
-             <adapt
-                   type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-             </adapt>        
-             </iterate>        
+             <reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
            </activeWhen>
    		</handler>
    		<handler
            commandId="org.eclipse.ui.edit.rename"
            class="org.apache.sling.ide.eclipse.ui.actions.JcrNodeRenameHandler">
            <activeWhen>
-             <iterate ifEmpty="false">
-             <adapt
-                   type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-             </adapt>        
-             </iterate>        
+             <reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
            </activeWhen>
    		</handler>
    		<handler
            commandId="org.eclipse.ui.edit.copy"
            class="org.apache.sling.ide.eclipse.ui.actions.JcrNodeCopyHandler">
            <activeWhen>
-             <iterate ifEmpty="false">
-             <adapt
-                   type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-             </adapt>        
-             </iterate>        
+             <reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
            </activeWhen>
    		</handler>
    		<handler
            commandId="org.eclipse.ui.edit.paste"
            class="org.apache.sling.ide.eclipse.ui.actions.JcrNodePasteHandler">
            <activeWhen>
-             <iterate ifEmpty="false">
-             <adapt
-                   type="org.apache.sling.ide.eclipse.ui.nav.model.JcrNode">
-             </adapt>        
-             </iterate>        
+             <reference definitionId="org.apache.sling.ide.eclipse.jcrNode"/>
            </activeWhen>
    		</handler>
    	</extension>