aboutsummaryrefslogtreecommitdiffstats
path: root/ajde/testsrc
diff options
context:
space:
mode:
authoraclement <aclement>2008-08-29 00:00:00 +0000
committeraclement <aclement>2008-08-29 00:00:00 +0000
commitcf66ed56a619637b5be8e47b4156b23b057a57b6 (patch)
treece0d3f1c1160d506390a53520422dae14b22e0ef /ajde/testsrc
parentd4d9ca53eb0d22797f0c386747d46fe8ef057d4b (diff)
downloadaspectj-cf66ed56a619637b5be8e47b4156b23b057a57b6.tar.gz
aspectj-cf66ed56a619637b5be8e47b4156b23b057a57b6.zip
245566: incremental magic
Diffstat (limited to 'ajde/testsrc')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ui/utils/TestCompilerConfiguration.java57
1 files changed, 27 insertions, 30 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/ui/utils/TestCompilerConfiguration.java b/ajde/testsrc/org/aspectj/ajde/ui/utils/TestCompilerConfiguration.java
index 74c041165..9a273e48e 100644
--- a/ajde/testsrc/org/aspectj/ajde/ui/utils/TestCompilerConfiguration.java
+++ b/ajde/testsrc/org/aspectj/ajde/ui/utils/TestCompilerConfiguration.java
@@ -26,18 +26,15 @@ import org.aspectj.tools.ajc.AjcTests;
import org.aspectj.util.FileUtil;
/**
- * Test implementation of ICompilerConfiguration. Allows users to configure
- * the settings via setter methods. By default returns null for all options
- * except getClasspath(), getJavaOptionsMap() (by default returns that it's
- * 1.3 compliant), getOutputLocationManager(), getSourcePathResources() (it
- * recursively looks for them) and getProjectSourceFiles(). If no source
- * files are specified by the user, then getProjectSourceFiles() returns
- * an empty list.
+ * Test implementation of ICompilerConfiguration. Allows users to configure the settings via setter methods. By default returns null
+ * for all options except getClasspath(), getJavaOptionsMap() (by default returns that it's 1.3 compliant),
+ * getOutputLocationManager(), getSourcePathResources() (it recursively looks for them) and getProjectSourceFiles(). If no source
+ * files are specified by the user, then getProjectSourceFiles() returns an empty list.
*/
public class TestCompilerConfiguration implements ICompilerConfiguration {
private String projectPath;
-
+
private Set aspectpath;
private Set inpath;
private String outjar;
@@ -45,25 +42,25 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
private String nonStandardOptions;
private List projectSourceFiles = new ArrayList();
private Map sourcePathResources;
-
+
private String srcDirName = "src";
-
+
private IOutputLocationManager outputLoc;
-
+
public TestCompilerConfiguration(String projectPath) {
this.projectPath = projectPath;
}
-
+
+ public void configurationRead() {
+ }
+
public Set getAspectPath() {
return aspectpath;
}
public String getClasspath() {
- return projectPath
- + File.pathSeparator
- + System.getProperty("sun.boot.class.path")
- + File.pathSeparator
- + AjcTests.aspectjrtClasspath();
+ return projectPath + File.pathSeparator + System.getProperty("sun.boot.class.path") + File.pathSeparator
+ + AjcTests.aspectjrtClasspath();
}
public Set getInpath() {
@@ -73,8 +70,8 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
public Map getJavaOptionsMap() {
if (javaOptions == null) {
javaOptions = new Hashtable();
- javaOptions.put(JavaOptions.COMPLIANCE_LEVEL,JavaOptions.VERSION_13);
- javaOptions.put(JavaOptions.SOURCE_COMPATIBILITY_LEVEL,JavaOptions.VERSION_13);
+ javaOptions.put(JavaOptions.COMPLIANCE_LEVEL, JavaOptions.VERSION_13);
+ javaOptions.put(JavaOptions.SOURCE_COMPATIBILITY_LEVEL, JavaOptions.VERSION_13);
}
return javaOptions;
}
@@ -106,22 +103,19 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
if (sourcePathResources == null) {
sourcePathResources = new HashMap();
- /* Allow the user to override the testProjectPath by using sourceRoots */
+ /* Allow the user to override the testProjectPath by using sourceRoots */
File[] srcBase = new File[] { new File(projectPath + File.separator + srcDirName) };
-
+
for (int j = 0; j < srcBase.length; j++) {
File[] fromResources = FileUtil.listFiles(srcBase[j], new FileFilter() {
public boolean accept(File pathname) {
String name = pathname.getName().toLowerCase();
- return !name.endsWith(".class")
- && !name.endsWith(".java")
- && !name.endsWith(".aj")
- && !name.endsWith(".lst")
- && !name.endsWith(".jar");
+ return !name.endsWith(".class") && !name.endsWith(".java") && !name.endsWith(".aj")
+ && !name.endsWith(".lst") && !name.endsWith(".jar");
}
});
for (int i = 0; i < fromResources.length; i++) {
- String normPath = FileUtil.normalizedPath(fromResources[i] ,srcBase[j]);
+ String normPath = FileUtil.normalizedPath(fromResources[i], srcBase[j]);
sourcePathResources.put(normPath, fromResources[i]);
}
@@ -130,7 +124,6 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
return sourcePathResources;
}
-
// -------------------- setter methods useful for testing ---------------
public void setAspectPath(Set aspectPath) {
this.aspectpath = aspectPath;
@@ -147,7 +140,7 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
public void setJavaOptions(Map javaOptions) {
this.javaOptions = javaOptions;
}
-
+
public void setNonStandardOptions(String options) {
this.nonStandardOptions = options;
}
@@ -159,9 +152,13 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
public void setSourcePathResources(Map sourcePathResources) {
this.sourcePathResources = sourcePathResources;
}
-
+
public void setSourceDir(String srcDirName) {
this.srcDirName = srcDirName;
}
+ public int getConfigurationChanges() {
+ return ICompilerConfiguration.EVERYTHING;
+ }
+
}