]> git.argeo.org Git - gpl/argeo-slc.git/commitdiff
+ introduce advanced submenu for distribution view
authorBruno Sinou <bsinou@argeo.org>
Mon, 3 Mar 2014 15:43:02 +0000 (15:43 +0000)
committerBruno Sinou <bsinou@argeo.org>
Mon, 3 Mar 2014 15:43:02 +0000 (15:43 +0000)
+ change workspace group icon

git-svn-id: https://svn.argeo.org/slc/trunk@6863 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

plugins/org.argeo.slc.client.ui.dist/icons/more.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/more.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/wkspGroup.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/plugin.xml
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistImages.java
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DoNothing.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/controllers/DistTreeLabelProvider.java

diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/more.gif b/plugins/org.argeo.slc.client.ui.dist/icons/more.gif
new file mode 100644 (file)
index 0000000..7dd9028
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/more.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/more.png b/plugins/org.argeo.slc.client.ui.dist/icons/more.png
new file mode 100644 (file)
index 0000000..1252a14
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/more.png differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/wkspGroup.gif b/plugins/org.argeo.slc.client.ui.dist/icons/wkspGroup.gif
new file mode 100644 (file)
index 0000000..79b22b7
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/wkspGroup.gif differ
index 21337e840555afe7f4bc7c53f38ad87388d65b25..7600f25a4f4fae9dca3ea68ad1b2f13122a45c57 100644 (file)
                        </commandParameter>
        </command>
        
+               <!-- Advanced commands --> 
+               <command
+            id="org.argeo.slc.client.ui.dist.doNothing"
+            defaultHandler="org.argeo.slc.client.ui.dist.commands.DoNothing"
+            name="Advanced">
+       </command>
+               <command
+            id="org.argeo.slc.client.ui.dist.runInOSGi"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Run in OSGi">
+            <commandParameter
+                       id="workspace"
+                       name="Workspace Name">
+                       </commandParameter>
+       </command>
+       <command
+            id="org.argeo.slc.client.ui.dist.refreshDistributionsView"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Refresh Distributions View">
+       </command>
+               
                <!-- Legacy -->
                <command
             defaultHandler="org.argeo.slc.client.ui.dist.commands.RefreshArtifactBrowser"
                                </class>
                        </state>
        </command>
-
-               <command
-            id="org.argeo.slc.client.ui.dist.runInOSGi"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Run in OSGi">
-            <commandParameter
-                       id="workspace"
-                       name="Workspace Name">
-                       </commandParameter>
-       </command>
-               
-       <command
-            id="org.argeo.slc.client.ui.dist.refreshDistributionsView"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Refresh Distributions View">
-       </command>
-
        <command
             id="org.argeo.slc.client.ui.dist.refreshDistributionOverviewPage"
             defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
             name="Refresh distribution overview page">
        </command>
-
        <command
             id="org.argeo.slc.client.ui.dist.deleteArtifacts"
             defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
             name="Remove selected artifacts">
        </command>
     </extension>
+    
+       <!-- MENU CONTRIBUTIONS --> 
        <extension
          id="menu:org.eclipse.ui.main.menu"
          point="org.eclipse.ui.menus">
-    
-         <!-- View Specific Menus --> 
-               <menuContribution
-               locationURI="toolbar:org.argeo.slc.client.ui.dist.artifactsBrowser">
-            <command
-               commandId="org.argeo.slc.client.ui.dist.showSizeColumn"
-                icon="icons/showSize.gif"
-                style="toggle" 
-                label="Show sizes"
-                tooltip="Warning: showing size column might reduce overall browser reactivity">
-            </command>
-                       <command
-               commandId="org.argeo.slc.client.ui.dist.refreshArtifactBrowser"
-                icon="icons/refresh.png"
-                       label="Refresh"
-                tooltip="Refresh the whole browser">
-            </command>
-        </menuContribution>
+               <!-- Distributions view tool bar --> 
                <menuContribution
                locationURI="toolbar:org.argeo.slc.client.ui.dist.distributionsView">
             <command
                 label="Register repository"
                 tooltip="Register a remote repository">
             </command>
-            <command
-               commandId="org.argeo.slc.client.ui.dist.refreshDistributionsView"
-                icon="icons/refresh.png"
-                label="Refresh"
-                tooltip="Refresh distributions view">
-            </command>
-           <!--
+             <command
+                commandId="org.argeo.slc.client.ui.dist.doNothing"
+                 id="org.argeo.slc.client.ui.dist.advancedMenu"
+                 icon="icons/more.gif"
+                 tooltip="Access to advanced commands"
+                 style="pulldown">
+           </command>
+        </menuContribution>
+               <menuContribution locationURI="menu:org.argeo.slc.client.ui.dist.advancedMenu">
+               <command
+                               commandId="org.argeo.slc.client.ui.dist.refreshDistributionsView"
+                               icon="icons/refresh.png"
+                               label="Refresh"
+                               tooltip="Force the full refresh of the distribution tree (close all open connections)">
+                       </command>
             <command
                commandId="org.argeo.slc.client.ui.dist.runInOSGi"
                 icon="icons/showSize.gif"
                 label="Run in OSGi"
                 tooltip="Run in a spearate OSGi runtime">
             </command>
-            -->
-        </menuContribution>
+               </menuContribution>
+               <!-- Anonymous distribution view toolbar -->             
         <menuContribution
                locationURI="toolbar:org.argeo.slc.client.ui.dist.anonymousDistributionsView">
             <command
                commandId="org.argeo.slc.client.ui.dist.refreshDistributionsView"
                 icon="icons/refresh.png"
                 label="Refresh"
-                tooltip="Refresh distributions view">
+                tooltip="Force the full refresh of the distribution tree (close all open connections)">
+            </command>
+        </menuContribution>
+        <!-- Artifact Browser Tool bar --> 
+               <menuContribution
+               locationURI="toolbar:org.argeo.slc.client.ui.dist.artifactsBrowser">
+            <command
+               commandId="org.argeo.slc.client.ui.dist.showSizeColumn"
+                icon="icons/showSize.gif"
+                style="toggle" 
+                label="Show sizes"
+                tooltip="Warning: showing size column might reduce overall browser reactivity">
+            </command>
+                       <command
+               commandId="org.argeo.slc.client.ui.dist.refreshArtifactBrowser"
+                icon="icons/refresh.png"
+                       label="Refresh"
+                tooltip="Refresh the whole browser">
             </command>
         </menuContribution>
         <!-- Queries --> 
              </menu>
           </menuContribution> -->
        </extension>
-  <extension
+       <extension
            point="org.eclipse.ui.activities">
         <!-- TODO: find a way to exclude evrything -->
         <activityPatternBinding
index ebc4d42403d2272e384d4bf2ce9882d18b613f6b..e5c91fcd954e366a980b65bc02be036ef97e3c83 100644 (file)
@@ -58,6 +58,9 @@ public class DistImages {
        public final static Image IMG_GROUP_BASE = DistPlugin.getImageDescriptor(
                        "icons/packages.gif").createImage();
 
+       public final static Image IMG_WKSP_GROUP = DistPlugin.getImageDescriptor(
+                       "icons/wkspGroup.gif").createImage();
+
        /* CHECK BOXES */
        public final static Image CHECKED = DistPlugin.getImageDescriptor(
                        "icons/checked.gif").createImage();
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DoNothing.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DoNothing.java
new file mode 100644 (file)
index 0000000..5519359
--- /dev/null
@@ -0,0 +1,17 @@
+package org.argeo.slc.client.ui.dist.commands;
+
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+/**
+ * Utilitary command used to enable sub menus in various toolbars. Does nothing
+ */
+public class DoNothing extends AbstractHandler {
+       public final static String ID = DistPlugin.ID + ".doNothing";
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               return null;
+       }
+}
index b2ca9f2907d68389dad658dba45e339554afc46c..4bebdda8895f6aaa1d2db5b742736049be11b9c6 100644 (file)
@@ -38,7 +38,7 @@ public class DistTreeLabelProvider extends ColumnLabelProvider {
                        else
                                return JcrImages.WORKSPACE_DISCONNECTED;
                } else if (element instanceof WkspGroupElem)
-                       return JcrImages.WORKSPACE_CONNECTED;
+                       return DistImages.IMG_WKSP_GROUP;
                else if (element instanceof GroupBaseElem)
                        return DistImages.IMG_GROUP_BASE;
                return super.getImage(element);