From a9fbc05e946c402ec3a2527517304acf22d40f15 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 20 Aug 2004 13:31:09 +0000 Subject: Falls back on old way of determining name of structure model node for anonymous inner class in the new clever way doesnt work. --- .../aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java | 7 +++++++ 1 file changed, 7 insertions(+) (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 06c521561..832b61170 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 @@ -281,6 +281,13 @@ public class AsmHierarchyBuilder extends ASTVisitor { && memberTypeDeclaration.allocation.type != null) { // Create a name something like 'new Runnable() {..}' fullName = "new "+memberTypeDeclaration.allocation.type.toString()+"() {..}"; + } else if (memberTypeDeclaration.binding != null + && memberTypeDeclaration.binding.constantPoolName() != null) { + // If we couldn't find a nice name like 'new Runnable() {..}' then use the number after the $ + fullName = new String(memberTypeDeclaration.binding.constantPoolName()); + + int dollar = fullName.indexOf('$'); + fullName = fullName.substring(dollar+1); } IProgramElement.Kind kind = IProgramElement.Kind.CLASS; -- cgit v1.2.3