From c2b29e1ed1e75f6f03629241c27e794a9410c35f Mon Sep 17 00:00:00 2001 From: aclement Date: Sat, 6 Dec 2008 00:00:41 +0000 Subject: [PATCH] getCorrespondingType() fixed for itdf --- .../internal/core/builder/AsmHierarchyBuilder.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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())); -- 2.39.5