create base prototypes for which no directory exists
without creating an empty directory. doesn't implement Runnable anymore.
This commit is contained in:
parent
a99dc703a4
commit
545aec7407
1 changed files with 5 additions and 13 deletions
|
@ -16,7 +16,7 @@ import java.io.*;
|
||||||
* applications and updates the evaluators if anything has changed.
|
* applications and updates the evaluators if anything has changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class TypeManager implements Runnable {
|
public class TypeManager {
|
||||||
|
|
||||||
Application app;
|
Application app;
|
||||||
File appDir;
|
File appDir;
|
||||||
|
@ -30,8 +30,6 @@ public class TypeManager implements Runnable {
|
||||||
// and thus need to get updates
|
// and thus need to get updates
|
||||||
List registeredEvaluators;
|
List registeredEvaluators;
|
||||||
|
|
||||||
Thread typechecker;
|
|
||||||
|
|
||||||
|
|
||||||
static HashSet standardTypes;
|
static HashSet standardTypes;
|
||||||
static {
|
static {
|
||||||
|
@ -57,7 +55,7 @@ public class TypeManager implements Runnable {
|
||||||
}
|
}
|
||||||
prototypes = new HashMap ();
|
prototypes = new HashMap ();
|
||||||
zipfiles = new HashMap ();
|
zipfiles = new HashMap ();
|
||||||
registeredEvaluators = Collections.synchronizedList (new ArrayList (30));
|
registeredEvaluators = Collections.synchronizedList (new ArrayList ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,18 +128,12 @@ public class TypeManager implements Runnable {
|
||||||
for (Iterator it=standardTypes.iterator (); it.hasNext (); ) {
|
for (Iterator it=standardTypes.iterator (); it.hasNext (); ) {
|
||||||
String pname = (String) it.next();
|
String pname = (String) it.next();
|
||||||
if (prototypes.get (pname) == null) {
|
if (prototypes.get (pname) == null) {
|
||||||
File f = new File (appDir, pname);
|
|
||||||
if (!f.exists() && !f.mkdir ())
|
|
||||||
app.logEvent ("Warning: directory "+f.getAbsolutePath ()+" could not be created.");
|
|
||||||
else if (!f.isDirectory ())
|
|
||||||
app.logEvent ("Warning: "+f.getAbsolutePath ()+" is not a directory.");
|
|
||||||
Prototype proto = new Prototype (pname, app);
|
Prototype proto = new Prototype (pname, app);
|
||||||
registerPrototype (pname, f, proto, update);
|
|
||||||
prototypes.put (pname, proto);
|
prototypes.put (pname, proto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rewire) {
|
if (rewire) {
|
||||||
// there have been changes in the DbMappings
|
// there have been changes in the DbMappings
|
||||||
app.rewireDbMappings ();
|
app.rewireDbMappings ();
|
||||||
|
@ -161,7 +153,7 @@ public class TypeManager implements Runnable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start () {
|
/* public void start () {
|
||||||
stop ();
|
stop ();
|
||||||
typechecker = new Thread (this, "Typechecker-"+app.getName());
|
typechecker = new Thread (this, "Typechecker-"+app.getName());
|
||||||
typechecker.setPriority (Thread.MIN_PRIORITY);
|
typechecker.setPriority (Thread.MIN_PRIORITY);
|
||||||
|
@ -192,7 +184,7 @@ public class TypeManager implements Runnable {
|
||||||
checkPrototypes ();
|
checkPrototypes ();
|
||||||
} catch (Exception ignore) {}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue