chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfermig...@apache.org
Subject svn commit: r906052 - in /incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell: app/ChemistryContext.java command/Command.java
Date Wed, 03 Feb 2010 14:05:11 GMT
Author: sfermigier
Date: Wed Feb  3 14:05:10 2010
New Revision: 906052

URL: http://svn.apache.org/viewvc?rev=906052&view=rev
Log:
First step towards colorization for other servers than Nuxeo.


Modified:
    incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryContext.java
    incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/command/Command.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryContext.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryContext.java?rev=906052&r1=906051&r2=906052&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryContext.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryContext.java
Wed Feb  3 14:05:10 2010
@@ -124,7 +124,11 @@
             for (CMISObject entry : feed) {
                 children.put(entry.getName(), entry);
                 keys[i] = entry.getName();
-                ls[i++] = ColorHelper.decorateNameByType(entry.getName(), entry.getTypeId());
+                String entryTypeId = entry.getTypeId();
+                if (entryTypeId.startsWith("cmis:")) {
+                    entryTypeId = entryTypeId.substring("cmis:".length());
+                }
+                ls[i++] = ColorHelper.decorateNameByType(entry.getName(), entryTypeId);
             }
         }
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/command/Command.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/command/Command.java?rev=906052&r1=906051&r2=906052&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/command/Command.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/command/Command.java
Wed Feb  3 14:05:10 2010
@@ -70,7 +70,7 @@
     public String getHelp() {
         URL url = getClass().getResource("/help/"+getName()+".help");
         if (url == null) {
-            return "N/A";
+            return "";
         }
         InputStream in = null;
         try {
@@ -81,7 +81,7 @@
         } finally {
             try { if (in != null) in.close(); } catch (IOException e) {}
         }
-        return "N/A";
+        return "";
     }
 
     public void print(InputStream in) throws IOException {



Mime
View raw message