From a2469c733c9f65514c3949cb1cc7254495011894 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Aug 2004 09:37:46 +0000 Subject: Fix for Bugzilla Bug 70241: outline view shows anonymous inner classes in different way than jdt outline --- .../ajdt/internal/core/builder/AsmHierarchyBuilder.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'org.aspectj.ajdt.core') 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 5ff6f078c..ffe8e37e3 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 @@ -279,11 +279,9 @@ public class AsmHierarchyBuilder extends ASTVisitor { String fullName = ""; if (memberTypeDeclaration.binding != null && memberTypeDeclaration.binding.constantPoolName() != null) { - fullName = new String(memberTypeDeclaration.binding.constantPoolName()); + // Create a name something like 'new Runnable() {..}' + fullName = "new "+memberTypeDeclaration.allocation.type.toString()+"() {..}"; } - - int dollar = fullName.indexOf('$'); - fullName = fullName.substring(dollar+1); IProgramElement.Kind kind = IProgramElement.Kind.CLASS; if (memberTypeDeclaration.isInterface()) kind = IProgramElement.Kind.INTERFACE; @@ -298,8 +296,8 @@ public class AsmHierarchyBuilder extends ASTVisitor { peNode.setSourceSignature(genSourceSignature(memberTypeDeclaration)); peNode.setFormalComment(generateJavadocComment(memberTypeDeclaration)); - //??? we add this to the compilation unit - findEnclosingClass(stack).addChild(peNode); + + ((IProgramElement)stack.peek()).addChild(peNode); stack.push(peNode); return true; } -- cgit v1.2.3