AddWorkspace and AddPrivileges in JCR Explorer
[lgpl/argeo-commons.git] / server / plugins / org.argeo.jcr.ui.explorer / plugin.xml
index 1ab31901f56e25c292206dd7b499507fcff44aee..9428cbe9805fbec27ce8cec8975098ce7d285ce9 100644 (file)
          <command
                defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
                id="org.argeo.jcr.ui.explorer.addFolderNode"
-               name="Create the new folder">
+               name="Create a new folder">
+         </command>
+         <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.jcr.ui.explorer.addPrivileges"
+               name="Add Privileges">
+         </command>
+         <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.jcr.ui.explorer.createWorkspace"
+               name="Create a new workspace">
          </command>
          <command
                defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
                                style="push">
                        </command>
                        <command
-         commandId="org.argeo.jcr.ui.explorer.addFolderNode"
-         icon="icons/addFolder.gif"
-         label="Add folder"
-         style="push">
+                        commandId="org.argeo.jcr.ui.explorer.addFolderNode"
+                        icon="icons/addFolder.gif"
+                        label="Add Folder"
+                        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>
+                               <with variable="activeMenuSelection"><count value="1"/></with>
+                                     </and>
+                                       </iterate>
+                               </visibleWhen>
+                       </command>
+                       <command
+                        commandId="org.argeo.jcr.ui.explorer.addPrivileges"
+                        icon="icons/addPrivileges.png"
+                        label="Add Privileges"
+                        style="push">
                                <visibleWhen>
                                        <iterate>
                                      <and>
                                                  value="org.argeo.jcr.ui.explorer.model.WorkspaceNode">
                                            </instanceof>
                                         </or>
-             <reference
-                   definitionId="expression.onlyOneItemSelected">
-             </reference>
+                               <with variable="activeMenuSelection"><count value="1"/></with>
                                      </and>
                                        </iterate>
                                </visibleWhen>
                        </command>
+                       <command
+                        commandId="org.argeo.jcr.ui.explorer.createWorkspace"
+                        icon="icons/addWorkspace.png"
+                        label="Create Workspace"
+                        style="push">
+                       <visibleWhen>
+                               <iterate>
+                             <and>
+                                <or>
+                                   <instanceof
+                                         value="org.argeo.jcr.ui.explorer.model.RepositoryNode">
+                                   </instanceof>
+                                </or>
+                       <with variable="activeMenuSelection"><count value="1"/></with>
+                             </and>
+                               </iterate>
+                       </visibleWhen>
+                       </command>
      <command
            commandId="org.argeo.jcr.ui.explorer.deleteNodes"
            icon="icons/remove.gif"
+                  label="Delete Nodes"
            style="push">
         <visibleWhen>
            <iterate>
            commandId="org.argeo.jcr.ui.explorer.importFileSystem"
            icon="icons/import_fs.png"
            style="push"
-           tooltip="Import files from the files sytem to the repository">
+           tooltip="Import files from the files sytem">
         <visibleWhen>
            <iterate>
               <and>
                           value="org.argeo.jcr.ui.explorer.model.WorkspaceNode">
                     </instanceof>
                  </or>
-                 <with
-                     variable="activeMenuSelection">
-                  <count
-                        value="1">
-                  </count>
-               </with>
+                 <with variable="activeMenuSelection"><count value="1"/></with>
               </and>
            </iterate>
         </visibleWhen>