diff options
author | aclement <aclement> | 2009-04-06 19:23:16 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-04-06 19:23:16 +0000 |
commit | 1da67c35d8b6a7ab7df85e846a8852141f434180 (patch) | |
tree | dfd7fa2b937cb29b3af3c099905b831d8dd2d91e | |
parent | c4f8d70ef68455e53f47450df811c84f1c3bc905 (diff) | |
download | aspectj-1da67c35d8b6a7ab7df85e846a8852141f434180.tar.gz aspectj-1da67c35d8b6a7ab7df85e846a8852141f434180.zip |
271201: inpath handles
4 files changed, 32 insertions, 2 deletions
diff --git a/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java b/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java index d9f9a6d34..605629ad4 100644 --- a/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java +++ b/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java @@ -13,6 +13,7 @@ package org.aspectj.ajde.core; import java.io.File; import java.util.List; +import java.util.Map; /** * Interface that handles where the compilation output is sent. Allows for the output folder to be different for different source @@ -69,6 +70,11 @@ public interface IOutputLocationManager { void reportFileWrite(String outputfile, int fileType); /** + * @return a Map<File,String> from inpath absolute paths to handle components + */ + Map getInpathMap(); + + /** * Callback from the compiler to indicate that a file has been removed from disk, the type of the file (if known) is also * supplied. * diff --git a/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java b/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java index 380ab1c59..a944de996 100644 --- a/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java +++ b/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java @@ -14,6 +14,7 @@ package org.aspectj.ajde.core.internal; import java.io.File; import java.util.List; +import java.util.Map; import org.aspectj.ajde.core.IOutputLocationManager; import org.aspectj.ajdt.internal.compiler.CompilationResultDestinationManager; @@ -61,4 +62,13 @@ public class OutputLocationAdapter implements CompilationResultDestinationManage return this.locationManager.discoverChangesSince(dir,buildtime); } + /** + * Return a map from fully qualified jar/dir entries to handle components. + * + * @return a map from inpath entries (jars/dirs) to handle components. + */ + public Map getInpathMap() { + return this.locationManager.getInpathMap(); + } + } diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/TestOutputLocationManager.java b/ajde.core/testsrc/org/aspectj/ajde/core/TestOutputLocationManager.java index 495dd182f..8ce149c37 100644 --- a/ajde.core/testsrc/org/aspectj/ajde/core/TestOutputLocationManager.java +++ b/ajde.core/testsrc/org/aspectj/ajde/core/TestOutputLocationManager.java @@ -12,7 +12,9 @@ package org.aspectj.ajde.core; import java.io.File; import java.util.ArrayList; +import java.util.Collections; import java.util.List; +import java.util.Map; /** * Test implementation of IOutputLocationManager. By default returns the same location for both resources and classes, however, @@ -25,11 +27,17 @@ public class TestOutputLocationManager implements IOutputLocationManager { private File classOutputLoc; private File resourceOutputLoc; private List allOutputLocations; + private Map inpathMap = Collections.EMPTY_MAP; public TestOutputLocationManager(String testProjectPath) { this.testProjectOutputPath = testProjectPath + File.separator + "bin"; } + public TestOutputLocationManager(String string, Map inpathMap) { + this(string); + this.inpathMap = inpathMap; + } + public File getOutputLocationForClass(File compilationUnit) { initLocations(); return classOutputLoc; @@ -39,6 +47,11 @@ public class TestOutputLocationManager implements IOutputLocationManager { initLocations(); return resourceOutputLoc; } + + public Map getInpathMap() { + return inpathMap; + } + // -------------- setter methods useful for testing ------------- public void setOutputLocForClass(File f) { diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/SavedModelConsistencyTests.java b/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/SavedModelConsistencyTests.java index 5c97bcbe7..1b475ae89 100644 --- a/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/SavedModelConsistencyTests.java +++ b/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/SavedModelConsistencyTests.java @@ -14,6 +14,7 @@ package org.aspectj.ajde.core.tests.model; import java.io.File; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import org.aspectj.ajde.core.AjdeCoreTestCase; @@ -54,7 +55,7 @@ public class SavedModelConsistencyTests extends AjdeCoreTestCase { } public void testInterfaceIsSameInBoth() { - AsmManager asm = AsmManager.createNewStructureModel(); + AsmManager asm = AsmManager.createNewStructureModel(Collections.EMPTY_MAP); asm.readStructureModel(getAbsoluteProjectDir()); IHierarchy model = asm.getHierarchy(); @@ -77,7 +78,7 @@ public class SavedModelConsistencyTests extends AjdeCoreTestCase { } public void testModelIsSamePreAndPostBuild() { - AsmManager asm = AsmManager.createNewStructureModel(); + AsmManager asm = AsmManager.createNewStructureModel(Collections.EMPTY_MAP); asm.readStructureModel(getAbsoluteProjectDir()); // AsmManager.getDefault().readStructureModel(getAbsoluteProjectDir()); IHierarchy model = asm.getHierarchy(); |