geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r741069 - in /geronimo/gshell/trunk: gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/ gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/
Date Thu, 05 Feb 2009 10:43:09 GMT
Author: gnodet
Date: Thu Feb  5 10:43:09 2009
New Revision: 741069

URL: http://svn.apache.org/viewvc?rev=741069&view=rev
Log:
GSHELL-157: Dynamically adding / removing commands does not work well

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/GroupDirectoryResolver.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java?rev=741069&r1=741068&r2=741069&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java
Thu Feb  5 10:43:09 2009
@@ -114,11 +114,21 @@
     }
 
     public FileObject resolveFile(final FileObject baseFile, final String name) throws FileSystemException
{
-        return getManager().resolveFile(baseFile, name);
+        FileObject f = getManager().resolveFile(baseFile, name);
+        FileObject d = dereference(f);
+        if (d != null) {
+            d.refresh();
+        }
+        return f;
     }
 
     public FileObject resolveFile(final String name) throws FileSystemException {
-        return getManager().resolveFile(getCurrentDirectory(), name);
+        FileObject f = getManager().resolveFile(getCurrentDirectory(), name);
+        FileObject d = dereference(f);
+        if (d != null) {
+            d.refresh();
+        }
+        return f;
     }
 
     public boolean isLocalFile(final FileObject file) {
@@ -187,4 +197,5 @@
         assert rootFile != null;
         return getManager().createVirtualFileSystem(rootFile);
     }
+
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java?rev=741069&r1=741068&r2=741069&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java
Thu Feb  5 10:43:09 2009
@@ -114,7 +114,7 @@
 
     private FileObject getAliasesRoot() throws FileSystemException {
         if (aliasesRoot == null) {
-            aliasesRoot = fileSystemAccess.resolveFile(null, ALIASES_ROOT);
+            aliasesRoot = fileSystemAccess.createVirtualFileSystem(ALIASES_ROOT);
         }
 
         return aliasesRoot;
@@ -147,7 +147,7 @@
 
     private FileObject getCommandsRoot() throws FileSystemException {
         if (commandsRoot == null) {
-            commandsRoot = fileSystemAccess.resolveFile(null, COMMANDS_ROOT);
+            commandsRoot = fileSystemAccess.createVirtualFileSystem(COMMANDS_ROOT);
         }
 
         return commandsRoot;

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/GroupDirectoryResolver.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/GroupDirectoryResolver.java?rev=741069&r1=741068&r2=741069&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/GroupDirectoryResolver.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/GroupDirectoryResolver.java
Thu Feb  5 10:43:09 2009
@@ -48,7 +48,7 @@
 
     private FileObject getCommandsRoot() throws FileSystemException {
         if (commandsRoot == null) {
-            commandsRoot = fileSystemAccess.resolveFile(null, CommandResolver.COMMANDS_ROOT);
+            commandsRoot = fileSystemAccess.createVirtualFileSystem(CommandResolver.COMMANDS_ROOT);
         }
 
         return commandsRoot;



Mime
View raw message