typemanager now displays for which files an update

is performed, and updatables display their filename
 in the toString() method
This commit is contained in:
hns 2001-03-07 22:47:33 +00:00
parent 7d49b8b673
commit 4027b850ee
4 changed files with 15 additions and 1 deletions

View file

@ -123,6 +123,9 @@ public class Action implements Updatable {
return functionName;
}
public String toString () {
return prototype.getName()+"/"+file.getName();
}
public synchronized void updateRequestEvaluator (RequestEvaluator reval) throws EcmaScriptException {
if (pfunc != null)

View file

@ -179,6 +179,11 @@ public class FunctionFile implements Updatable {
}
}
public String toString () {
return prototype.getName()+"/"+file.getName();
}
}

View file

@ -72,6 +72,9 @@ public class SkinFile implements Updatable {
return skin;
}
public String toString () {
return prototype.getName()+"/"+file.getName();
}
}

View file

@ -243,12 +243,14 @@ public class TypeManager implements Runnable {
// app.logEvent ("updating prototype "+name);
boolean needsUpdate = false;
HashSet updatables = new HashSet ();
// our plan is to do as little as possible, so first check if anything has changed at all...
for (Iterator i = proto.updatables.values().iterator(); i.hasNext(); ) {
Updatable upd = (Updatable) i.next();
if (upd.needsUpdate ()) {
needsUpdate = true;
updatables.add (upd);
}
}
@ -259,6 +261,7 @@ public class TypeManager implements Runnable {
if (fn.endsWith (app.templateExtension) || fn.endsWith (app.scriptExtension) ||
fn.endsWith (app.actionExtension) || fn.endsWith (app.scriptExtension) || "type.properties".equalsIgnoreCase (fn)) {
needsUpdate = true;
updatables.add ("[new:"+proto.getName()+"/"+fn+"]");
}
}
}
@ -268,7 +271,7 @@ public class TypeManager implements Runnable {
// let the thread know we had to do something.
idleSeconds = 0;
app.logEvent ("TypeManager: Updating prototypes for "+app.getName());
app.logEvent ("TypeManager: Updating prototypes for "+app.getName()+": "+updatables);
// first go through new files and create new items
for (int i=0; i<list.length; i++) {