|
From: <tr...@us...> - 2003-08-26 22:23:41
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core
In directory sc8-pr-cvs1:/tmp/cvs-serv16008/core/src/com/babeldoc/core
Modified Files:
EnvironmentLoader.java
Log Message:
Updates to the GUI code.
Index: EnvironmentLoader.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/EnvironmentLoader.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** EnvironmentLoader.java 12 Aug 2003 00:28:29 -0000 1.10
--- EnvironmentLoader.java 26 Aug 2003 22:23:32 -0000 1.11
***************
*** 79,83 ****
/**
! * The environment loader is a streamlined way to get a set of name/values
* pairs from a configuration into the system.properties. Certain third party
* libraries relie on this explicitly and instead of doing thing from the
--- 79,83 ----
/**
! * The environment loader is a streamlined way to getChild a set of name/values
* pairs from a configuration into the system.properties. Certain third party
* libraries relie on this explicitly and instead of doing thing from the
***************
*** 109,112 ****
--- 109,126 ----
*/
public static synchronized ArrayList getSearchPaths() {
+ loadSearchPaths();
+
+ ArrayList copyList = new ArrayList(searchPaths.size());
+ copyList.addAll(searchPaths);
+
+ // System.out.println("Searchpath: "+StringUtils.join(copyList.iterator(), " ;"));
+ return copyList;
+ }
+
+ /**
+ * Get the search paths and NOT a copy of them like the method of derivative
+ * name.
+ */
+ private static Collection loadSearchPaths() {
if (searchPaths.size() == 0) {
String spath = System.getProperty(SEARCH_PATH_DEFINE);
***************
*** 120,134 ****
}
}
! ArrayList copyList = new ArrayList(searchPaths.size());
! copyList.addAll(searchPaths);
!
! // System.out.println("Searchpath: "+StringUtils.join(copyList.iterator(), " ;"));
! return copyList;
}
/**
* The loadEnvironment method is an extremely important method that NEEDS to
! * be called before any real work can be done. This get calls into the
* BabeldocModuleList to find and initialize the list of modules. This then
* makes the search paths.
--- 134,154 ----
}
}
+ return searchPaths;
+ }
! /**
! * Add a directory to the search path. All of the configuration caches
! * are completely flushed.
! *
! * @param dir
! */
! public static synchronized void addSearchPath(String dir) {
! loadSearchPaths().add(dir);
! ConfigService.clearCache();
}
/**
* The loadEnvironment method is an extremely important method that NEEDS to
! * be called before any real work can be done. This getChild calls into the
* BabeldocModuleList to find and initialize the list of modules. This then
* makes the search paths.
|