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
*/
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.
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;
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();
+ }
+
}
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,
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;
initLocations();
return resourceOutputLoc;
}
+
+ public Map getInpathMap() {
+ return inpathMap;
+ }
+
// -------------- setter methods useful for testing -------------
public void setOutputLocForClass(File f) {
import java.io.File;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import org.aspectj.ajde.core.AjdeCoreTestCase;
}
public void testInterfaceIsSameInBoth() {
- AsmManager asm = AsmManager.createNewStructureModel();
+ AsmManager asm = AsmManager.createNewStructureModel(Collections.EMPTY_MAP);
asm.readStructureModel(getAbsoluteProjectDir());
IHierarchy model = asm.getHierarchy();
}
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();