aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoraclement <aclement>2009-04-06 19:24:09 +0000
committeraclement <aclement>2009-04-06 19:24:09 +0000
commit861ea1bbcbe27a61ecd2683052be23e36a35d189 (patch)
tree17549e2decbfed234f361e839bb1fae800c8ce76 /asm
parent0b3e0b9b6310596baa5eada118d5988156cf7e47 (diff)
downloadaspectj-861ea1bbcbe27a61ecd2683052be23e36a35d189.tar.gz
aspectj-861ea1bbcbe27a61ecd2683052be23e36a35d189.zip
271201: inpath handles
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/AsmManager.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java
index 5152908f2..e5e30fd49 100644
--- a/asm/src/org/aspectj/asm/AsmManager.java
+++ b/asm/src/org/aspectj/asm/AsmManager.java
@@ -82,6 +82,10 @@ public class AsmManager implements IStructureModel {
// below to the AjState for a compilation and recover it if switching
// between projects.
protected IHierarchy hierarchy;
+
+ /* Map from String > String - it maps absolute paths for
+ * inpath dirs/jars to workspace relative paths suitable for handle inclusion */
+ protected Map inpathMap;
private IRelationshipMap mapper;
private IElementHandleProvider handleProvider;
@@ -100,11 +104,12 @@ public class AsmManager implements IStructureModel {
private AsmManager() {
}
- public static AsmManager createNewStructureModel() {
+ public static AsmManager createNewStructureModel(Map inpathMap) {
if (forceSingletonBehaviour && lastActiveStructureModel != null) {
return lastActiveStructureModel;
}
AsmManager asm = new AsmManager();
+ asm.inpathMap = inpathMap;
asm.hierarchy = new AspectJElementHierarchy(asm);
asm.mapper = new RelationshipMap(asm.hierarchy);
asm.handleProvider = new JDTLikeHandleProvider(asm);
@@ -1256,4 +1261,8 @@ public class AsmManager implements IStructureModel {
}
}
+ public String getHandleElementForInpath(String binaryPath) {
+ return (String)inpathMap.get(new File(binaryPath));
+ }
+
}