Add `-consumed` and `-remaining` fields to `ReadStream` to ease debugging jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 29 May 2020 12:10:35 +0100
branchjv
changeset 19588 1b9aab48be17
parent 19285 a79de6d0d1a3
child 19589 8f1c638e83cf
Add `-consumed` and `-remaining` fields to `ReadStream` to ease debugging
extensions.st
--- a/extensions.st	Thu Aug 01 10:29:53 2019 +0100
+++ b/extensions.st	Fri May 29 12:10:35 2020 +0100
@@ -2141,6 +2141,21 @@
     ^ #queryClassBrowserIcon
 ! !
 
+!ReadStream methodsFor:'inspecting'!
+
+inspectorExtraAttributes
+    | extras |
+
+    extras := super inspectorExtraAttributes.
+    (collection notNil and:[ collection isString ]) ifTrue:[ 
+        extras add: '-consumed' -> [ collection copyTo: self position ].
+        extras add: '-remaining' -> [ collection copyFrom: self position + 1 ].
+    ].
+    ^ extras
+
+    "Created: / 27-05-2020 / 14:58:50 / Jan Vrany <jan.vrany@labware.com>"
+! !
+
 !Rectangle methodsFor:'inspecting'!
 
 inspectorValueStringInListFor:anInspector
@@ -3093,7 +3108,7 @@
 
 !stx_libtool class methodsFor:'documentation'!
 
-extensionsVersion_CVS
-    ^ '$Header$'
+extensionsVersion_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
-