aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2013-03-13 08:24:28 -0700
committerAndy Clement <andrew.clement@gmail.com>2013-03-13 08:24:28 -0700
commitf8c2a9aff1c7cad6a967bd26734be31fce628e96 (patch)
treeb3e65b3e7622ddeadf5ac996b3fd344338f3d5ad
parent0660ad3b68a396993723b3e66b20bc467e6fa982 (diff)
downloadaspectj-f8c2a9aff1c7cad6a967bd26734be31fce628e96.tar.gz
aspectj-f8c2a9aff1c7cad6a967bd26734be31fce628e96.zip
debug for problem in hierarchy builder
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java25
1 files changed, 24 insertions, 1 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 97a67a00a..dd38f7750 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
@@ -827,7 +827,30 @@ public class AsmHierarchyBuilder extends ASTVisitor {
// value
peNode = new ProgramElement(activeStructureModel, new String(fieldDeclaration.name), IProgramElement.Kind.ENUM_VALUE,
makeLocation(fieldDeclaration), fieldDeclaration.modifiers, null, null);
- peNode.setCorrespondingType(fieldDeclaration.binding.type.debugName());
+ String type = null;
+ boolean isOk = true;
+ if (fieldDeclaration.binding == null) {
+ type="fieldDeclaration_binding_is_null";
+ System.err.println("DebugFor402832: null fieldDeclaration.binding for "+fieldDeclaration);
+ isOk=false;
+ } else {
+ if (fieldDeclaration.binding.type==null) {
+ System.err.println("DebugFor402832: null fieldDeclaration.binding.type for "+fieldDeclaration);
+ type="fieldDeclaration_binding_type_is_null";
+ isOk=false;
+ } else {
+ type=fieldDeclaration.binding.type.debugName();
+ }
+ }
+ if (!isOk) {
+ if (fieldDeclaration.type!=null && fieldDeclaration.type.resolvedType!=null) {
+ type = fieldDeclaration.type.resolvedType.debugName();
+ System.err.println("DebugFor402832: used secondary route to compute name for "+fieldDeclaration+", set to "+type);
+ isOk=true;
+ }
+ }
+ peNode.setCorrespondingType(type);
+// peNode.setCorrespondingType(fieldDeclaration.binding.type.debugName());
} else {
peNode = new ProgramElement(activeStructureModel, new String(fieldDeclaration.name), IProgramElement.Kind.FIELD,
makeLocation(fieldDeclaration), fieldDeclaration.modifiers, null, null);