summaryrefslogtreecommitdiffstats
path: root/ajde.core
diff options
context:
space:
mode:
authoraclement <aclement>2008-08-29 00:00:16 +0000
committeraclement <aclement>2008-08-29 00:00:16 +0000
commit10e7a8297323e1013ebb7fd371c7b807cfc62719 (patch)
tree0d05f6377cc1e81aab39c284a1bddd43051e5aee /ajde.core
parent4ba9d260cc39de8dd5690dca13d999530bf14cbd (diff)
downloadaspectj-10e7a8297323e1013ebb7fd371c7b807cfc62719.tar.gz
aspectj-10e7a8297323e1013ebb7fd371c7b807cfc62719.zip
245566: incremental magic
Diffstat (limited to 'ajde.core')
-rw-r--r--ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java61
1 files changed, 29 insertions, 32 deletions
diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java b/ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java
index 5cb3990ec..f4a60a967 100644
--- a/ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java
+++ b/ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java
@@ -23,18 +23,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;
@@ -42,25 +39,22 @@ 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 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() {
@@ -70,8 +64,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;
}
@@ -94,31 +88,31 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
public List getProjectSourceFiles() {
return projectSourceFiles;
}
-
+
public List getProjectSourceFilesChanged() {
return null;
}
+ public void configurationRead() {
+ }
+
public Map getSourcePathResources() {
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]);
}
@@ -127,7 +121,6 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
return sourcePathResources;
}
-
// -------------------- setter methods useful for testing ---------------
public void setAspectPath(Set aspectPath) {
this.aspectpath = aspectPath;
@@ -144,7 +137,7 @@ public class TestCompilerConfiguration implements ICompilerConfiguration {
public void setJavaOptions(Map javaOptions) {
this.javaOptions = javaOptions;
}
-
+
public void setNonStandardOptions(String options) {
this.nonStandardOptions = options;
}
@@ -156,9 +149,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;
+ }
+
}