]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - server/plugins/org.argeo.jcr.ui.explorer/plugin.xml
Clean JCR Ui Explorer editor
[lgpl/argeo-commons.git] / server / plugins / org.argeo.jcr.ui.explorer / plugin.xml
index 8521924ae009e2d0d24e28b9d97ddb2f34b7e3d1..7d220a04fe0cac3f5508bd2fe6795815e4b459e7 100644 (file)
                                name="Node path">
                        </commandParameter>
                </command>    
+       <command
+                       defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+                       id="org.argeo.jcr.ui.explorer.getNodeSize"
+                       name="Get node size">
+               </command>    
        <command
                        defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
                        id="org.argeo.jcr.ui.explorer.addRemoteRepository"
@@ -67,8 +72,8 @@
                </command>    
          <command
                defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.jcr.ui.explorer.addFileFolder"
-               name="Add file folder...">
+               id="org.argeo.jcr.ui.explorer.addFolderNode"
+               name="Create the new folder">
          </command>
          <command
                defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
@@ -77,8 +82,8 @@
          </command>
          <command
                defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.jcr.ui.explorer.deleteNode"
-               name="Delete node">
+               id="org.argeo.jcr.ui.explorer.deleteNodes"
+               name="Delete nodes">
          </command>
          <command
                defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
                name="Open current file">
          </command>
     </extension>
+
+    <!-- Menus --> 
        <extension point="org.eclipse.ui.menus">
                <menuContribution
-                locationURI="menu:org.argeo.jcr.ui.explorer.browserView">
-                <command
-                      commandId="org.argeo.jcr.ui.explorer.openGenericJcrQueryEditor"
-                      icon="icons/query.png"
-                      style="push">
-                </command>
-          </menuContribution>
+                       locationURI="menu:org.argeo.jcr.ui.explorer.browserView">
+            <command
+               commandId="org.argeo.jcr.ui.explorer.openGenericJcrQueryEditor"
+                icon="icons/query.png"
+                style="push">
+            </command>
+            <command
+               commandId="org.argeo.jcr.ui.explorer.addRemoteRepository"
+                icon="icons/addRepo.gif"
+                style="push">
+            </command>
+               </menuContribution>
                <menuContribution
-                locationURI="menu:org.argeo.jcr.ui.explorer.browserView">
-                <command
-                      commandId="org.argeo.jcr.ui.explorer.addRemoteRepository"
-                      icon="icons/add.gif"
-                      style="push">
-                </command>
-          </menuContribution>
-  <menuContribution
-        locationURI="popup:org.argeo.jcr.ui.explorer.browserView">
-     <command
-           commandId="org.argeo.jcr.ui.explorer.refresh"
-           icon="icons/refresh.png"
-           style="push">
-     </command>
-     <command
-           commandId="org.argeo.jcr.ui.explorer.addFileFolder"
-           icon="icons/add.gif"
-           style="push">
-     </command>
+                       locationURI="popup:org.argeo.jcr.ui.explorer.browserView">
+                       <command
+                               commandId="org.argeo.jcr.ui.explorer.refresh"
+                               icon="icons/refresh.png"
+                               style="push">
+                       </command>
+                       <command
+         commandId="org.argeo.jcr.ui.explorer.addFolderNode"
+         icon="icons/addFolder.gif"
+         label="%addNewFolderCmdLbl"
+         style="push">
+                               <visibleWhen>
+                                       <iterate>
+                                     <and>
+                                        <or>
+                                           <instanceof
+                                                 value="org.argeo.jcr.ui.explorer.model.SingleJcrNode">
+                                           </instanceof>
+                                           <instanceof
+                                                 value="org.argeo.jcr.ui.explorer.model.WorkspaceNode">
+                                           </instanceof>
+                                        </or>
+             <reference
+                   definitionId="expression.onlyOneItemSelected">
+             </reference>
+                                     </and>
+                                       </iterate>
+                               </visibleWhen>
+                       </command>
      <command
-           commandId="org.argeo.jcr.ui.explorer.deleteNode"
+           commandId="org.argeo.jcr.ui.explorer.deleteNodes"
            icon="icons/remove.gif"
            style="push">
+        <visibleWhen>
+           <iterate>
+              <or>
+                 <instanceof
+                       value="org.argeo.jcr.ui.explorer.model.SingleJcrNode">
+                 </instanceof>
+                 <instanceof
+                       value="org.argeo.jcr.ui.explorer.model.WorkspaceNode">
+                 </instanceof>
+              </or>
+           </iterate>
+        </visibleWhen>
      </command>
      <command
            commandId="org.argeo.jcr.ui.explorer.importFileSystem"
            icon="icons/import_fs.png"
            style="push"
            tooltip="Import files from the files sytem to the repository">
+        <visibleWhen>
+           <iterate>
+              <and>
+                 <or>
+                    <instanceof
+                          value="org.argeo.jcr.ui.explorer.model.SingleJcrNode">
+                    </instanceof>
+                    <instanceof
+                          value="org.argeo.jcr.ui.explorer.model.WorkspaceNode">
+                    </instanceof>
+                 </or>
+                 <with
+                     variable="activeMenuSelection">
+                  <count
+                        value="1">
+                  </count>
+               </with>
+              </and>
+           </iterate>
+        </visibleWhen>
+     </command>
+     <command
+           commandId="org.argeo.jcr.ui.explorer.addRemoteRepository"
+           icon="icons/addRepo.gif"
+           style="push">
+        <visibleWhen>
+           <iterate> 
+                               <or>
+                       <instanceof
+                       value="org.argeo.jcr.ui.explorer.model.RepositoriesNode">
+                                       </instanceof>
+                                       <instanceof
+                                               value="org.argeo.jcr.ui.explorer.model.RepositoryNode">
+                                       </instanceof>
+                               </or> 
+           </iterate>
+        </visibleWhen>
+     </command>
+     <command
+           commandId="org.argeo.jcr.ui.explorer.getNodeSize"
+           icon="icons/getSize.gif"
+           style="push">
+        <visibleWhen>
+           <iterate>
+              <or>
+                 <instanceof
+                       value="org.argeo.jcr.ui.explorer.model.SingleJcrNode">
+                 </instanceof>
+                 <instanceof
+                       value="org.argeo.jcr.ui.explorer.model.WorkspaceNode">
+                 </instanceof>
+              </or>
+           </iterate>
+        </visibleWhen>
      </command>
   </menuContribution>
        </extension>
+       
+       <!-- Core expression definition --> 
+       
+       <extension
+         point="org.eclipse.core.expressions.definitions">
+      <definition
+            id="expression.onlyOneItemSelected">
+         <with
+               variable="activeMenuSelection">
+            <count
+                  value="1">
+            </count>
+         </with>
+      </definition>
+   </extension>
+       
   <extension
            point="org.eclipse.ui.activities">
         <activity