Added parse tree inspector tab to JavaSourceDocument to ease debugging. development
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 26 Sep 2013 09:15:02 +0100
branchdevelopment
changeset 2779 18d2c83ecb3c
parent 2778 f5f21ffdbfd9
child 2780 7638771efcbe
Added parse tree inspector tab to JavaSourceDocument to ease debugging.
tools/JavaSourceDocument.st
--- a/tools/JavaSourceDocument.st	Thu Sep 26 09:11:50 2013 +0100
+++ b/tools/JavaSourceDocument.st	Thu Sep 26 09:15:02 2013 +0100
@@ -207,6 +207,31 @@
     "Created: / 12-09-2013 / 21:40:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!JavaSourceDocument methodsFor:'debugging'!
+
+inspector2TabParseTreeInspector
+    (Smalltalk at:#'SmallSense::ParseNodeInspector') ifTrue:[
+        | source |
+
+        source := sourceText notNil ifTrue:[sourceText] ifFalse:[javaClass source].
+        ^ Tools::Inspector2Tab new
+            label: 'Parse tree';
+            priority: 50;
+            application: ((Smalltalk at:#'SmallSense::ParseNodeInspector') new
+                            node: self sourceTree source: source);
+            yourself
+    ].
+    ^ nil
+
+    "Created: / 19-09-2013 / 18:10:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 26-09-2013 / 00:11:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+inspector2Tabs
+    ^ super inspector2Tabs , #(inspector2TabParseTreeInspector)
+
+    "Created: / 19-09-2013 / 18:11:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
 
 !JavaSourceDocument methodsFor:'initialization-private'!