diff options
author | aclement <aclement> | 2005-04-13 11:45:02 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-04-13 11:45:02 +0000 |
commit | d8665133116ce54e90c0e33ddd83d54fbbbbec40 (patch) | |
tree | 4ba3897028456ff08bb39c20b49f1c98e7e86db9 /asm | |
parent | fbf8df9a39f53275b80ea04704c81e4005e74226 (diff) | |
download | aspectj-d8665133116ce54e90c0e33ddd83d54fbbbbec40.tar.gz aspectj-d8665133116ce54e90c0e33ddd83d54fbbbbec40.zip |
Null friendly and includes sloc when dumping model (only ever used when debugging structuremodel...)
Diffstat (limited to 'asm')
-rw-r--r-- | asm/src/org/aspectj/asm/AsmManager.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java index 3c998c1d0..3f3a900aa 100644 --- a/asm/src/org/aspectj/asm/AsmManager.java +++ b/asm/src/org/aspectj/asm/AsmManager.java @@ -391,7 +391,12 @@ public class AsmManager { public static void dumptree(Writer w,IProgramElement node,int indent) throws IOException { for (int i =0 ;i<indent;i++) w.write(" "); - w.write(node+" ["+(node==null?"null":node.getKind().toString())+"]\n"); + String loc = ""; + if (node!=null) { + if (node.getSourceLocation()!=null) + loc = node.getSourceLocation().toString(); + } + w.write(node+" ["+(node==null?"null":node.getKind().toString())+"] "+loc+"\n"); if (node!=null) for (Iterator i = node.getChildren().iterator();i.hasNext();) { dumptree(w,(IProgramElement)i.next(),indent+2); |