diff options
author | aclement <aclement> | 2008-08-26 22:37:24 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-08-26 22:37:24 +0000 |
commit | cdd0d8d67adb32b5a3f849b94403920a3dfc7c69 (patch) | |
tree | ca93f606557470f3eabc974aea731786aeac1863 /org.aspectj.ajdt.core | |
parent | c431df6c564152021dd06cb9545538ea0fd15fdf (diff) | |
download | aspectj-cdd0d8d67adb32b5a3f849b94403920a3dfc7c69.tar.gz aspectj-cdd0d8d67adb32b5a3f849b94403920a3dfc7c69.zip |
minor optimizations
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java index 97aa9a8be..472480a4f 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java @@ -20,8 +20,10 @@ import java.io.File; import java.io.FileFilter; import java.io.FileReader; import java.io.IOException; +import java.util.HashMap; import java.util.LinkedList; import java.util.List; +import java.util.Map; public class ConfigParser { Location location; @@ -116,19 +118,23 @@ public class ConfigParser { } void addFileOrPattern(File sourceFile) { - if (sourceFile.getName().equals("*.java")) { - addFiles(sourceFile.getParentFile(), new FileFilter() { - public boolean accept(File f) { - return f != null && f.getName().endsWith(".java"); - }}); - } else if (sourceFile.getName().equals("*.aj")) { - addFiles(sourceFile.getParentFile(), new FileFilter() { - public boolean accept(File f) { - return f != null && f.getName().endsWith(".aj"); - }}); - } else { - addFile(sourceFile); - } + if (sourceFile.getName().charAt(0)=='*') { + if (sourceFile.getName().equals("*.java")) { + addFiles(sourceFile.getParentFile(), new FileFilter() { + public boolean accept(File f) { + return f != null && f.getName().endsWith(".java"); + }}); + } else if (sourceFile.getName().equals("*.aj")) { + addFiles(sourceFile.getParentFile(), new FileFilter() { + public boolean accept(File f) { + return f != null && f.getName().endsWith(".aj"); + }}); + } else { + addFile(sourceFile); + } + } else { + addFile(sourceFile); + } } void addFiles(File dir, FileFilter filter) { @@ -186,10 +192,10 @@ public class ConfigParser { boolean isSourceFileName(String s) { if (s.endsWith(".java")) return true; if (s.endsWith(".aj")) return true; - if (s.endsWith(".ajava")) { - showWarning(".ajava is deprecated, replace with .aj or .java: " + s); - return true; - } +// if (s.endsWith(".ajava")) { +// showWarning(".ajava is deprecated, replace with .aj or .java: " + s); +// return true; +// } return false; } |