diff options
author | Andy Clement <andrew.clement@gmail.com> | 2013-03-13 08:24:28 -0700 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2013-03-13 08:24:28 -0700 |
commit | f8c2a9aff1c7cad6a967bd26734be31fce628e96 (patch) | |
tree | b3e65b3e7622ddeadf5ac996b3fd344338f3d5ad | |
parent | 0660ad3b68a396993723b3e66b20bc467e6fa982 (diff) | |
download | aspectj-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.java | 25 |
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); |