VDBThreadPresenter.st
changeset 23 ed5f4b55cee5
parent 22 6684f4d82301
child 24 c33a063cb363
--- a/VDBThreadPresenter.st	Sun Sep 21 23:46:10 2014 +0100
+++ b/VDBThreadPresenter.st	Mon Sep 22 09:57:54 2014 +0100
@@ -7,12 +7,16 @@
 	category:'VDB-Presentation'
 !
 
-!VDBThreadPresenter methodsFor:'displaying'!
+!VDBThreadPresenter methodsFor:'accessing'!
 
-displayString
+label
     ^ thread displayString
 
-    "Created: / 21-09-2014 / 23:31:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 22-09-2014 / 00:14:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+thread
+    ^ thread
 ! !
 
 !VDBThreadPresenter methodsFor:'initialization'!
@@ -31,8 +35,18 @@
      a O(n*log n) or even O(n^2) behavior here.
      *** to optimize: redefine by subClass"
 
-     ^ thread frames collect:[ :f | VDBFramePresenter new setFrame: f; parent: self ]
+     thread isDead ifTrue:[ ^ #() ].
+     ^ thread stack collect:[ :f | VDBFramePresenter new setFrame: f; parent: self ]
 
     "Created: / 21-09-2014 / 23:42:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 22-09-2014 / 00:54:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!VDBThreadPresenter methodsFor:'testing'!
+
+isThreadPresenter
+    ^ true
+
+    "Created: / 21-09-2014 / 23:54:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+