]> source.dussan.org Git - aspectj.git/commitdiff
Falls back on old way of determining name of structure model node for anonymous inner...
authoraclement <aclement>
Fri, 20 Aug 2004 13:31:09 +0000 (13:31 +0000)
committeraclement <aclement>
Fri, 20 Aug 2004 13:31:09 +0000 (13:31 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java

index 06c52156149c1f6656aaf929f3ebadcd19fe3d35..832b611701afb43da0adb838586dd2f075c8760b 100644 (file)
@@ -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;