felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r947700 - in /felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands: Activator.java Basic.java
Date Mon, 24 May 2010 16:11:29 GMT
Author: rickhall
Date: Mon May 24 16:11:28 2010
New Revision: 947700

URL: http://svn.apache.org/viewvc?rev=947700&view=rev
Log:
Change the scope for our commands and display scope in help message. (FELIX-2042)

Modified:
    felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Activator.java
    felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Basic.java

Modified: felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Activator.java?rev=947700&r1=947699&r2=947700&view=diff
==============================================================================
--- felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Activator.java
(original)
+++ felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Activator.java
Mon May 24 16:11:28 2010
@@ -30,7 +30,7 @@ public class Activator implements Bundle
     public void start(BundleContext bc) throws Exception
     {
         Hashtable props = new Hashtable();
-        props.put("osgi.command.scope", "basic");
+        props.put("osgi.command.scope", "felix");
         props.put("osgi.command.function", new String[] {
             "bundlelevel", "frameworklevel", "headers",
             "help", "install", "inspect", "lb", "log", "refresh",
@@ -39,7 +39,7 @@ public class Activator implements Bundle
         bc.registerService(
             Basic.class.getName(), new Basic(bc), props);
 
-        props.put("osgi.command.scope", "files");
+        props.put("osgi.command.scope", "felix");
         props.put("osgi.command.function", new String[] {
             "cd", "ls" });
         bc.registerService(

Modified: felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Basic.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Basic.java?rev=947700&r1=947699&r2=947700&view=diff
==============================================================================
--- felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Basic.java
(original)
+++ felix/trunk/gogo/felixcommands/src/main/java/org/apache/felix/gogo/felixcommands/Basic.java
Mon May 24 16:11:28 2010
@@ -230,6 +230,7 @@ public class Basic
                 String k = entry.getKey().substring(entry.getKey().indexOf(':') + 1);
                 if (name.equals(k))
                 {
+                    name = entry.getKey();
                     methods = entry.getValue();
                     break;
                 }
@@ -255,6 +256,8 @@ public class Basic
                     System.out.println("\n" + m.getName() + " - " + d.description());
                 }
 
+                System.out.println("   scope: " + name.substring(0, name.indexOf(':')));
+
                 // Get flags and options.
                 Class[] paramTypes = m.getParameterTypes();
                 Map<String, Flag> flags = new TreeMap();



Mime
View raw message