From: aclement Date: Fri, 29 Aug 2008 00:00:00 +0000 (+0000) Subject: 245566: incremental magic X-Git-Tag: V1_6_2~143 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf66ed56a619637b5be8e47b4156b23b057a57b6;p=aspectj.git 245566: incremental magic --- 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; + } + }