From: aclement Date: Sat, 6 Dec 2008 00:00:41 +0000 (+0000) Subject: getCorrespondingType() fixed for itdf X-Git-Tag: V1_6_3rc1~47 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c2b29e1ed1e75f6f03629241c27e794a9410c35f;p=aspectj.git getCorrespondingType() fixed for itdf --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java index 8e85ac885..8aa528ef1 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java @@ -29,6 +29,7 @@ import org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration; import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration; import org.aspectj.ajdt.internal.compiler.ast.DeclareDeclaration; import org.aspectj.ajdt.internal.compiler.ast.InterTypeDeclaration; +import org.aspectj.ajdt.internal.compiler.ast.InterTypeFieldDeclaration; import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration; import org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment; import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory; @@ -505,7 +506,14 @@ public class AsmHierarchyBuilder extends ASTVisitor { // methods, then we loose the type, for example int, for the field // and instead get "void". if (peNode.getKind().equals(IProgramElement.Kind.INTER_TYPE_FIELD)) { - peNode.setCorrespondingType(methodDeclaration.returnType.toString()); + + InterTypeFieldDeclaration itfd = (InterTypeFieldDeclaration) methodDeclaration; + if (itfd.getRealFieldType() != null) { + peNode.setCorrespondingType(new String(itfd.getRealFieldType().readableName())); + } else + peNode.setCorrespondingType(null); + + // was peNode.setCorrespondingType(methodDeclaration.returnType.toString()); } else { if (methodDeclaration.returnType.resolvedType != null) peNode.setCorrespondingType(new String(methodDeclaration.returnType.resolvedType.readableName()));