Update of /cvsroot/webmacro/webmacro/src/org/webmacro
In directory sc8-pr-cvs1:/tmp/cvs-serv19720/src/org/webmacro
Modified Files:
Context.java
Log Message:
BuildContext.java was loading ContextTools that it just doesn't need.
Overloaded Context's constructor to provide an argument for "should load tools", default is "true", but BuildContext specifies "false".
Maybe should do this via a method?:
protected boolean shouldLoadTools();
Index: Context.java
===================================================================
RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/Context.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** Context.java 20 Dec 2002 02:25:23 -0000 1.59
--- Context.java 21 May 2003 23:01:46 -0000 1.60
***************
*** 84,87 ****
--- 84,91 ----
*/
public Context(Broker broker) {
+ this (broker, true);
+ }
+
+ protected Context(Broker broker, boolean loadTools) {
_prof = broker.newProfile();
if (_prof != null) { startTiming("Context life"); }
***************
*** 89,93 ****
_broker = broker;
_log = broker.getLog("context", "property and evaluation errors");
! loadTools("ContextTools");
if (_prof != null) { stopTiming(); }
}
--- 93,98 ----
_broker = broker;
_log = broker.getLog("context", "property and evaluation errors");
! if (loadTools)
! loadTools("ContextTools");
if (_prof != null) { stopTiming(); }
}
|