fix a small bug, display full workspace name
authorBruno Sinou <bsinou@argeo.org>
Tue, 4 Feb 2014 21:41:03 +0000 (21:41 +0000)
committerBruno Sinou <bsinou@argeo.org>
Tue, 4 Feb 2014 21:41:03 +0000 (21:41 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@6808 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/model/WorkspaceElem.java
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/DistributionsView.java

index f5fb3722ea7c48fe1d1456a402f8309857f64206..9cf295c5f78e0839ae1f7aceadcaec1fec75e400 100644 (file)
@@ -6,20 +6,21 @@ public class WorkspaceElem extends DistParentElem {
        private String workspaceName;
        private String label;
 
-       /**
-        * Helper to display only version when the workspace name is well formatted
-        */
-       private static String formatName(String name) {
-               if (name != null && name.lastIndexOf(VERSION_SEP) > 0)
-                       return name.substring(name.lastIndexOf(VERSION_SEP) + 1);
-               else
-                       return name;
-       }
+       // /**
+       // * Helper to display only version when the workspace name is well
+       // formatted
+       // */
+       // private static String formatName(String name) {
+       // if (name != null && name.lastIndexOf(VERSION_SEP) > 0)
+       // return name.substring(name.lastIndexOf(VERSION_SEP) + 1);
+       // else
+       // return name;
+       // }
 
        public WorkspaceElem(RepoElem repoElem, String workspaceName) {
                this.repoElem = repoElem;
                this.workspaceName = workspaceName;
-               this.label = formatName(workspaceName);
+               this.label = workspaceName; // formatName(workspaceName);
        }
 
        public String getWorkspaceName() {
index 84d00e673bc0c48223183327fa2439a64ba7797a..4661487989a8724ded7832edee1abe0c457bcad4 100644 (file)
@@ -224,7 +224,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params.put(Fetch.PARAM_TARGET_REPO_PATH, targetRepoPath);
                                CommandHelpers.refreshParameterizedCommand(menuManager, window,
                                                Fetch.ID, Fetch.DEFAULT_LABEL, Fetch.DEFAULT_ICON_PATH,
-                                               isRepoElem && singleElement && !isReadOnly, params);
+                                               isRepoElem && isHomeRepo && singleElement && !isReadOnly, params);
 
                                // Normalize workspace
                                params = new HashMap<String, String>();