summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authormkersten <mkersten>2005-04-14 16:44:01 +0000
committermkersten <mkersten>2005-04-14 16:44:01 +0000
commitdf7fff4c8c073a3bbcfe749134d577299402d5fb (patch)
tree566a368b2d30af514d724197620fa6854b7b5ce0 /weaver
parentbcef03bef88e3e43347ecfc57f0d6cb6694d7b1c (diff)
downloadaspectj-df7fff4c8c073a3bbcfe749134d577299402d5fb.tar.gz
aspectj-df7fff4c8c073a3bbcfe749134d577299402d5fb.zip
bug#82171 Created sepereate handle provider to enable ASM use of IDE-specific handle identifiers.
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java22
-rw-r--r--weaver/src/org/aspectj/weaver/ShadowMunger.java3
2 files changed, 13 insertions, 12 deletions
diff --git a/weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java b/weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java
index 15b58dcb2..7a1bbba43 100644
--- a/weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java
+++ b/weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java
@@ -55,13 +55,13 @@ public class AsmRelationshipProvider {
// Ensure a node for the target exists
IProgramElement targetNode = getNode(AsmManager.getDefault().getHierarchy(), shadow);
- String sourceHandle = ProgramElement.createHandleIdentifier(
+ String sourceHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(
checker.getSourceLocation().getSourceFile(),
checker.getSourceLocation().getLine(),
checker.getSourceLocation().getColumn(),
checker.getSourceLocation().getOffset());
- String targetHandle = ProgramElement.createHandleIdentifier(
+ String targetHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(
shadow.getSourceLocation().getSourceFile(),
shadow.getSourceLocation().getLine(),
shadow.getSourceLocation().getColumn(),
@@ -90,13 +90,13 @@ public class AsmRelationshipProvider {
if (!AsmManager.isCreatingModel()) return;
String sourceHandle = "";
if (munger.getSourceLocation()!=null) {
- sourceHandle = ProgramElement.createHandleIdentifier(
+ sourceHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(
munger.getSourceLocation().getSourceFile(),
munger.getSourceLocation().getLine(),
munger.getSourceLocation().getColumn(),
munger.getSourceLocation().getOffset());
} else {
- sourceHandle = ProgramElement.createHandleIdentifier(
+ sourceHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(
originatingAspect.getSourceLocation().getSourceFile(),
originatingAspect.getSourceLocation().getLine(),
originatingAspect.getSourceLocation().getColumn(),
@@ -104,7 +104,7 @@ public class AsmRelationshipProvider {
}
if (originatingAspect.getSourceLocation() != null) {
- String targetHandle = ProgramElement.createHandleIdentifier(
+ String targetHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(
onType.getSourceLocation().getSourceFile(),
onType.getSourceLocation().getLine(),
onType.getSourceLocation().getColumn(),
@@ -126,12 +126,12 @@ public class AsmRelationshipProvider {
public void addDeclareParentsRelationship(ISourceLocation decp,ResolvedTypeX targetType, List newParents) {
if (!AsmManager.isCreatingModel()) return;
- String sourceHandle = ProgramElement.createHandleIdentifier(decp.getSourceFile(),decp.getLine(),decp.getColumn(),decp.getOffset());
+ String sourceHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(decp.getSourceFile(),decp.getLine(),decp.getColumn(),decp.getOffset());
IProgramElement ipe = AsmManager.getDefault().getHierarchy().findElementForHandle(sourceHandle);
- String targetHandle = ProgramElement.createHandleIdentifier(
+ String targetHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(
targetType.getSourceLocation().getSourceFile(),
targetType.getSourceLocation().getLine(),
targetType.getSourceLocation().getColumn(),
@@ -154,11 +154,11 @@ public class AsmRelationshipProvider {
*/
public void addDeclareAnnotationRelationship(ISourceLocation declareAnnotationLocation,ISourceLocation annotatedLocation) {
if (!AsmManager.isCreatingModel()) return;
- String sourceHandle = ProgramElement.createHandleIdentifier(declareAnnotationLocation.getSourceFile(),declareAnnotationLocation.getLine(),
+ String sourceHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(declareAnnotationLocation.getSourceFile(),declareAnnotationLocation.getLine(),
declareAnnotationLocation.getColumn(),declareAnnotationLocation.getOffset());
IProgramElement declareAnnotationPE = AsmManager.getDefault().getHierarchy().findElementForHandle(sourceHandle);
- String targetHandle = ProgramElement.createHandleIdentifier(
+ String targetHandle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(
annotatedLocation.getSourceFile(),
annotatedLocation.getLine(),
annotatedLocation.getColumn(),
@@ -384,7 +384,7 @@ public class AsmRelationshipProvider {
try {
String sourceHandle =
- ProgramElement.createHandleIdentifier(sourceLocation.getSourceFile(),sourceLocation.getLine(),
+ AsmManager.getDefault().getHandleProvider().createHandleIdentifier(sourceLocation.getSourceFile(),sourceLocation.getLine(),
sourceLocation.getColumn(),sourceLocation.getOffset());
String targetHandle = methodElem.getHandleIdentifier();
@@ -425,7 +425,7 @@ public class AsmRelationshipProvider {
if (fieldElem== null) return;
String sourceHandle =
- ProgramElement.createHandleIdentifier(sourceLocation.getSourceFile(),sourceLocation.getLine(),
+ AsmManager.getDefault().getHandleProvider().createHandleIdentifier(sourceLocation.getSourceFile(),sourceLocation.getLine(),
sourceLocation.getColumn(),sourceLocation.getOffset());
String targetHandle = fieldElem.getHandleIdentifier();
diff --git a/weaver/src/org/aspectj/weaver/ShadowMunger.java b/weaver/src/org/aspectj/weaver/ShadowMunger.java
index 9924d2e7f..9425cd6fd 100644
--- a/weaver/src/org/aspectj/weaver/ShadowMunger.java
+++ b/weaver/src/org/aspectj/weaver/ShadowMunger.java
@@ -15,6 +15,7 @@ package org.aspectj.weaver;
import java.util.Collection;
+import org.aspectj.asm.AsmManager;
import org.aspectj.asm.internal.ProgramElement;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.util.PartialOrder;
@@ -87,7 +88,7 @@ public abstract class ShadowMunger implements PartialOrder.PartialComparable, IH
if (null == handle) {
ISourceLocation sl = getSourceLocation();
if (sl != null) {
- handle = ProgramElement.createHandleIdentifier(
+ handle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(
sl.getSourceFile(),
sl.getLine(),
sl.getColumn(),