You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ps...@apache.org on 2004/05/19 08:12:46 UTC
cvs commit: logging-log4j/src/java/org/apache/log4j/chainsaw/vfs VFSPlugin.java
psmith 2004/05/18 23:12:46
Modified: src/java/org/apache/log4j/chainsaw/vfs VFSPlugin.java
Log:
shutdown now calls the FileSystemManager shutdown.
the rather hard coded loadLocalFileSystem method now initiates a back
task to check what children objects are out there.
PR:
Obtained from:
Submitted by:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.3 +9 -2 logging-log4j/src/java/org/apache/log4j/chainsaw/vfs/VFSPlugin.java
Index: VFSPlugin.java
===================================================================
RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/vfs/VFSPlugin.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- VFSPlugin.java 19 May 2004 00:11:08 -0000 1.2
+++ VFSPlugin.java 19 May 2004 06:12:46 -0000 1.3
@@ -6,6 +6,7 @@
import java.util.Set;
import javax.swing.JSplitPane;
+import javax.swing.tree.DefaultMutableTreeNode;
import org.apache.commons.vfs.FileObject;
import org.apache.commons.vfs.FileSystemException;
@@ -44,6 +45,9 @@
* @see org.apache.log4j.plugins.Plugin#shutdown()
*/
public void shutdown() {
+ if(fileSystemManager!=null) {
+ fileSystemManager.close();
+ }
}
/* (non-Javadoc)
@@ -73,9 +77,12 @@
*/
private void loadLocalFileSystem() {
try {
- FileObject fileObject = this.fileSystemManager.createVirtualFileSystem(new File("").toURL().toExternalForm());
+ FileObject fileObject = this.fileSystemManager.resolveFile(new File("").toURL().toExternalForm());
- this.fileSystemTree.addFileObject("local", fileObject);
+ DefaultMutableTreeNode node = this.fileSystemTree.addFileObject("local", fileObject);
+
+ VFSUtils.lookForChildren(this.fileSystemTree.getTree(), node);
+
} catch (Exception e) {
LogLog.error("error creating local VFS",e);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org