aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authormkersten <mkersten>2003-08-14 17:18:34 +0000
committermkersten <mkersten>2003-08-14 17:18:34 +0000
commit56d4d719ba6e1ff20efe3f1003aa8eec8d5b88a2 (patch)
tree98aed82a88fcdef2d0aaf660ce44f9ec8bb8896d /org.aspectj.ajdt.core
parentb5d8b449c79cbedc82e03381cc459ae8c8ae9718 (diff)
downloadaspectj-56d4d719ba6e1ff20efe3f1003aa8eec8d5b88a2.tar.gz
aspectj-56d4d719ba6e1ff20efe3f1003aa8eec8d5b88a2.zip
Improved declare relationships. Implemented batch-build relationship clearing policy.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java
index 329e5b57e..46a155204 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java
@@ -12,10 +12,10 @@
package org.aspectj.ajdt.internal.compiler.lookup;
-import java.util.*;
+import java.io.IOException;
import org.aspectj.asm.*;
-import org.aspectj.asm.internal.Relationship;
+import org.aspectj.asm.internal.ProgramElement;
import org.aspectj.weaver.*;
/**
@@ -23,7 +23,7 @@ import org.aspectj.weaver.*;
*/
public class AsmInterTypeRelationshipProvider {
- public static final String INTER_TYPE_DECLARES = "declares on";
+ public static final String INTER_TYPE_DECLARES = "declared on";
public static final String INTER_TYPE_DECLARED_BY = "aspect declarations";
public static void addRelationship(
@@ -43,25 +43,25 @@ public class AsmInterTypeRelationshipProvider {
if (munger.getSourceLocation() != null
&& munger.getSourceLocation() != null) {
- String sourceHandle =
- munger.getSourceLocation().getSourceFile().getAbsolutePath() + IProgramElement.ID_DELIM
- + munger.getSourceLocation().getLine() + IProgramElement.ID_DELIM
- + munger.getSourceLocation().getColumn();
+ String sourceHandle = ProgramElement.createHandleIdentifier(
+ munger.getSourceLocation().getSourceFile(),
+ munger.getSourceLocation().getLine(),
+ munger.getSourceLocation().getColumn());
- String targetHandle =
- onType.getSourceLocation().getSourceFile().getAbsolutePath() + IProgramElement.ID_DELIM
- + onType.getSourceLocation().getLine() + IProgramElement.ID_DELIM
- + onType.getSourceLocation().getColumn();
-
+ String targetHandle = ProgramElement.createHandleIdentifier(
+ onType.getSourceLocation().getSourceFile(),
+ onType.getSourceLocation().getLine(),
+ onType.getSourceLocation().getColumn());
+
+// System.err.println(">> putting: " + sourceHandle + ", to " + targetHandle);
IRelationshipMap mapper = AsmManager.getDefault().getRelationshipMap();
if (sourceHandle != null && targetHandle != null) {
- IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.ADVICE, INTER_TYPE_DECLARES);
+ IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARES);
foreward.getTargets().add(targetHandle);
- IRelationship back = mapper.get(targetHandle, IRelationship.Kind.ADVICE, INTER_TYPE_DECLARED_BY);
- back.getTargets().add(sourceHandle);
+ IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARED_BY);
+ back.getTargets().add(sourceHandle);
}
}
}
-
}