Esempio n. 1
0
 public boolean interestedInScript(File script, AntSession session) {
   FileObject projfile = FileUtil.toFileObject(FileUtil.normalizeFile(script));
   if (projfile == null) return false;
   Project proj = FileOwnerQuery.getOwner(projfile);
   if (proj == null) return false;
   AntProjectHelper helper = proj.getLookup().lookup(AntProjectHelper.class);
   if (helper == null) return false;
   String sourceRoot = helper.getStandardPropertyEvaluator().getProperty("src.dir"); // NOI18N
   if (sourceRoot == null) return false;
   File srcRoot = helper.resolveFile(sourceRoot);
   if (srcRoot == null) return false;
   HashMap<File, String> roots = (HashMap) session.getCustomData(this);
   if (roots == null) {
     roots = new HashMap();
     session.putCustomData(this, roots);
   }
   roots.put(
       script, srcRoot.getAbsolutePath().replaceAll(CHARSTOESCAPE, ESCAPESEQUENCE) + separator);
   return true;
 }
Esempio n. 2
0
 /** Default constructor for lookup. public J2MEAntLogger() { } */
 public boolean interestedInSession(AntSession session) {
   // disable this feature when verbosity set to DEBUG
   return session.getVerbosity() < AntEvent.LOG_DEBUG;
 }