Exemple #1
0
 @Override
 public void update() {
   // テーブルヘッダは起動中変更できないので、ファイルは増減させない
   for (Script script : this.get()) {
     if (script.isUpdated()) {
       script.reload();
     }
   }
 }
Exemple #2
0
 @Override
 public boolean isUpdated() {
   // テーブルヘッダは起動中変更できないので、ファイルは増減させない
   for (Script script : this.get()) {
     if (script.isUpdated()) {
       return true;
     }
   }
   return false;
 }
Exemple #3
0
 private synchronized Script getTableStyleScript_(String prefix) {
   Script script = this.scripts.get(prefix);
   if (script == null) {
     File scriptFile = this.getTableStyleScriptFile(prefix);
     script = new Script(scriptFile, TableItemCreator.class, scriptFile.exists());
     this.scripts.put(prefix, script);
   } else if (script.isUpdated()) {
     script.reload();
   }
   return script;
 }
Exemple #4
0
 private void loadScripts() {
   Map<String, Script> oldScripts = this.scripts;
   this.scripts = new TreeMap<>();
   for (File file : this.getScriptFiles()) {
     Script script = oldScripts.get(file.getPath());
     if ((script == null)) {
       script = this.makeScript(file, this.type);
     } else if (script.isUpdated()) {
       script.reload();
     }
     this.scripts.put(file.getName(), script);
   }
 }
Exemple #5
0
 public boolean isUpdated() {
   File[] files = this.getScriptFiles();
   if (this.scripts.size() != files.length) {
     return true;
   }
   for (File file : files) {
     Script script = this.scripts.get(file.getPath());
     if (script == null) {
       return true;
     }
     if (script.isUpdated()) {
       return true;
     }
   }
   return false;
 }