aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2004-08-20 13:31:09 +0000
committeraclement <aclement>2004-08-20 13:31:09 +0000
commita9fbc05e946c402ec3a2527517304acf22d40f15 (patch)
tree48fe423fd404b0b220b550b5774a6ae1fbf91952 /org.aspectj.ajdt.core
parent8b550ad855b72b6eeb61f3ade30f383bf337a8e6 (diff)
downloadaspectj-a9fbc05e946c402ec3a2527517304acf22d40f15.tar.gz
aspectj-a9fbc05e946c402ec3a2527517304acf22d40f15.zip
Falls back on old way of determining name of structure model node for anonymous inner class in the new clever way doesnt work.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java7
1 files changed, 7 insertions, 0 deletions
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;