Index: projects/woenvironment/src/java/org/objectstyle/woenvironment/env/WOEnvironment.java =================================================================== RCS file: /cvsroot/woproject/woproject/projects/woenvironment/src/java/org/objectstyle/woenvironment/env/WOEnvironment.java,v retrieving revision 1.2 diff -u -r1.2 WOEnvironment.java --- projects/woenvironment/src/java/org/objectstyle/woenvironment/env/WOEnvironment.java 5 Sep 2003 07:30:38 -0000 1.2 +++ projects/woenvironment/src/java/org/objectstyle/woenvironment/env/WOEnvironment.java 1 Oct 2003 00:37:04 -0000 ..-57,6 +57,7 @@ package org.objectstyle.woenvironment.env; import java.io.File; +import java.util.Map; /** *..uthor uli ..-72,6 +73,16 @@ super(); woVariables = new WOVariables(this); } + + /** + * Creates new WOEnvironment, specifying the list of alternative properties. + * + *..aram properties + */ + public WOEnvironment(Map altProperties) { + super(); + woVariables = new WOVariables(this, altProperties); + } /** *..eturn WOVariables ..-165,5 +176,9 @@ System.out.println(anException); } return null; + } + + public boolean variablesConfigured() { + return getWOVariables().systemRoot() != null && getWOVariables().localRoot() != null; } } Index: projects/woenvironment/src/java/org/objectstyle/woenvironment/env/WOVariables.java =================================================================== RCS file: /cvsroot/woproject/woproject/projects/woenvironment/src/java/org/objectstyle/woenvironment/env/WOVariables.java,v retrieving revision 1.2 diff -u -r1.2 WOVariables.java --- projects/woenvironment/src/java/org/objectstyle/woenvironment/env/WOVariables.java 1 Oct 2003 00:35:48 -0000 1.2 +++ projects/woenvironment/src/java/org/objectstyle/woenvironment/env/WOVariables.java 1 Oct 2003 00:37:04 -0000 ..-58,7 +58,10 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; +import java.util.Collections; +import java.util.Map; import java.util.Properties; + import org.objectstyle.woenvironment.util.FileStringScanner; /** *..uthor uli ..-80,14 +83,23 @@ private Properties wobuildProperties; private File wobuildPropertiesFile; private Environment environment; + /** * Constructor for WOVariables. */ protected WOVariables(Environment environment) { + this(environment, Collections.EMPTY_MAP); + } + + /** + * Constructor for WOVariables. + */ + protected WOVariables(Environment environment, Map altProperties) { super(); this.environment = environment; - this.init(); + this.init(altProperties); } + /** * Method init.Tries to load wobuild.properties file in the following way *