geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r573686 - in /geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell: layout/LayoutManagerImpl.java plugin/PluginCollector.java
Date Fri, 07 Sep 2007 20:07:29 GMT
Author: jdillon
Date: Fri Sep  7 13:07:26 2007
New Revision: 573686

URL: http://svn.apache.org/viewvc?rev=573686&view=rev
Log:
Expose desc access by id

Modified:
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/LayoutManagerImpl.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/LayoutManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/LayoutManagerImpl.java?rev=573686&r1=573685&r2=573686&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/LayoutManagerImpl.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/LayoutManagerImpl.java
Fri Sep  7 13:07:26 2007
@@ -125,15 +125,16 @@
         log.debug("Searching for command descriptor for path: {}", path);
 
         //
+        // TODO: Need the current environment, so we can get the current group (pwd) and
search path, and then
+        //       use that to search the layout tree.
+        //
+
+        //
         // HACK: For now, assume the path is just the id... should eventually change this
         //
 
-        for (CommandDescriptor desc : pluginCollector.getCommandDescriptors()) {
-            if (path.equals(desc.getId())) {
-                return desc;
-            }
-        }
+        CommandDescriptor desc = pluginCollector.getCommandDescriptor(path);
 
-        return null;
+        return desc;
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java?rev=573686&r1=573685&r2=573686&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
Fri Sep  7 13:07:26 2007
@@ -76,4 +76,10 @@
     public Collection<CommandDescriptor> getCommandDescriptors() {
         return commandDescriptors.values();
     }
+
+    public CommandDescriptor getCommandDescriptor(final String id) {
+        assert id != null;
+
+        return commandDescriptors.get(id);
+    }
 }



Mime
View raw message