]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - server/plugins/org.argeo.jcr.ui.explorer/plugin.xml
Improve secure logging
[lgpl/argeo-commons.git] / server / plugins / org.argeo.jcr.ui.explorer / plugin.xml
index 8288ab5d725223cd07fe18d85778579a839ad50c..09dffb8a9379647aed275545f8cb384f46b696c4 100644 (file)
@@ -1,15 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.4"?>
 <plugin>
+       <!-- Perspectives -->
    <extension
          point="org.eclipse.ui.perspectives">
       <perspective
-            class="org.argeo.eclipse.ui.jcr.explorer.JcrExplorerPerspective"
+            class="org.argeo.jcr.ui.explorer.JcrExplorerPerspective"
             icon="icons/nodes.gif"
             id="org.argeo.jcr.ui.explorer.perspective"
             name="JCR Explorer">
       </perspective>
    </extension>
+   <!-- Views --> 
    <extension
          point="org.eclipse.ui.views">
           <view
@@ -19,6 +21,7 @@
           name="JCR Browser">
           </view>
    </extension>
+   <!-- Editors --> 
    <extension
            point="org.eclipse.ui.editors">
             <editor
               name="JCR Query"
               icon="icons/query.png"
               default="false">
+        </editor>
+            <editor
+                 class="org.argeo.eclipse.spring.SpringExtensionFactory"
+              id="org.argeo.jcr.ui.explorer.genericNodeEditor"
+              name="Node Editor"
+              icon="icons/query.png"
+              default="false">
         </editor>
      </extension>
+       <!-- Commands --> 
        <extension
          point="org.eclipse.ui.commands">
                <command
             id="org.argeo.jcr.ui.explorer.openGenericJcrQueryEditor"
             name="New generic JCR query">
        </command>
-  <command
-        defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-        id="org.argeo.jcr.ui.explorer.addFileFolder"
-        name="Add file folder...">
-  </command>
-  <command
-        defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-        id="org.argeo.jcr.ui.explorer.initUserHome"
-        name="Initialize user home">
-  </command>
-  <command
-        defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-        id="org.argeo.jcr.ui.explorer.refresh"
-        name="Refresh">
-  </command>
-  <command
-        defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-        id="org.argeo.jcr.ui.explorer.deleteNode"
-        name="Delete node">
-  </command>
-  <command
-        defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-        id="org.argeo.jcr.ui.explorer.importFileSystem"
-        name="Import files...">
-  </command>
-  <!-- TEST --> 
-  <command
-        defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-        id="org.argeo.jcr.ui.explorer.openFile"
-        name="Open current file">
-  </command>
-  <!-- TEST END --> 
-  
+       <command
+                       defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+                       id="org.argeo.jcr.ui.explorer.openGenericNodeEditor"
+                       name="Open generic node Editor">
+                       <commandParameter
+                               id="org.argeo.jcr.ui.explorer.nodePath"
+                               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"
+                       name="Add remote JCR repository">
+                       <commandParameter
+                               id="org.argeo.jcr.ui.explorer.repositoryUri"
+                               name="Repository URI">
+                       </commandParameter>
+               </command>    
+         <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.jcr.ui.explorer.addFolderNode"
+               name="Create the new folder">
+         </command>
+         <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.jcr.ui.explorer.refresh"
+               name="Refresh">
+         </command>
+         <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.jcr.ui.explorer.deleteNodes"
+               name="Delete nodes">
+         </command>
+         <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.jcr.ui.explorer.importFileSystem"
+               name="Import files...">
+         </command>
+         <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.jcr.ui.explorer.openFile"
+               name="Open current file">
+         </command>
+         <command
+            defaultHandler="org.argeo.jcr.ui.explorer.commands.SortChildNodes"
+            id="org.argeo.jcr.ui.explorer.sortChildNodes"
+            name="Sort node tree">
+            <state 
+                               id="org.argeo.jcr.ui.explorer.sortChildNodes.toggleState">
+                               <class class="org.eclipse.jface.commands.ToggleState"> 
+                                       <parameter
+                                               name="default"
+                                       value="true" />
+                               </class>
+                       </state>
+     </command>
     </extension>
+
+    <!-- Menus --> 
        <extension point="org.eclipse.ui.menus">
+               <!-- Browser view specific menu --> 
                <menuContribution
-                allPopups="false"
-                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.initUserHome"
-                                  style="push"
-                                  tooltip="Initializes the user specific area within this node">
-                            </command>
-          </menuContribution>
-  <menuContribution
-        allPopups="false"
-        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="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>
+             <command
+               commandId="org.argeo.jcr.ui.explorer.sortChildNodes"
+                icon="icons/sort.gif"
+                style="toggle" 
+                label="Sort child nodes"
+                tooltip="Warning: stopping to sort children nodes might enhance overall performances">
+            </command>
+               </menuContribution>
+               <!-- Browser view popup context menu --> 
+               <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.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">
+        <activityPatternBinding
+              activityId="org.argeo.security.ui.adminActivity"
+              isEqualityPattern="true"
+              pattern="org.argeo.jcr.ui.explorer/org.argeo.jcr.ui.explorer.perspective">
+        </activityPatternBinding>
+     </extension>
 </plugin>