When execution is stopped. pre-select frame of stopped thread.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 22 Sep 2014 23:49:05 +0100
changeset 25 e0f3744cd77d
parent 24 c33a063cb363
child 26 45980fbc001b
When execution is stopped. pre-select frame of stopped thread.
VDBStackApplication.st
application/applicationWinRC.rc
tests/tests.rc
vdb.rc
--- a/VDBStackApplication.st	Mon Sep 22 22:50:28 2014 +0100
+++ b/VDBStackApplication.st	Mon Sep 22 23:49:05 2014 +0100
@@ -290,6 +290,17 @@
     "Modified: / 21-09-2014 / 23:52:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+updateInternalSelectionAfterThreadStopped: thread
+    | threadP frameP |
+
+    threadP := self internalListHolder value root 
+                    recursiveDetect:[ :e | e isThreadPresenter and:[ e thread == thread ] ].
+    frameP := threadP children first.
+    self internalSelectionHolder value: frameP
+
+    "Created: / 22-09-2014 / 23:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 updateSelection
     | internalSelection frame thread group |
 
@@ -317,32 +328,39 @@
     "Modified: / 22-09-2014 / 00:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-!VDBStackApplication methodsFor:'change & update-dekayed'!
+!VDBStackApplication methodsFor:'change & update-delayed'!
 
-delayedUpdateInternalList
-    self window sensor pushUserEvent: #updateInternalList for: self
+enqueueUpdateInternalList
+    self window sensor pushUserEvent:#updateInternalList for:self
 
     "Created: / 20-09-2014 / 23:05:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+enqueueUpdateInternalSelectionAfterThreadStopped: aGDBThread 
+    self window sensor pushUserEvent:#updateInternalSelectionAfterThreadStopped: for:self withArgument: aGDBThread
+
+    "Created: / 22-09-2014 / 23:15:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !VDBStackApplication methodsFor:'event handling'!
 
 onStoppedEvent: event
-    self delayedUpdateInternalList.
+    self enqueueUpdateInternalList.
+    self enqueueUpdateInternalSelectionAfterThreadStopped:event stoppedThread.
 
     "Created: / 17-09-2014 / 23:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 20-09-2014 / 23:08:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 22-09-2014 / 23:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 onThreadExitedEvent: event
-    self delayedUpdateInternalList.
+    self enqueueUpdateInternalList.
 
     "Created: / 18-09-2014 / 23:30:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 20-09-2014 / 23:08:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 onThreadGroupExitedEvent: event
-    self delayedUpdateInternalList.
+    self enqueueUpdateInternalList.
 
     "Created: / 18-09-2014 / 23:30:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 20-09-2014 / 23:08:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -353,7 +371,7 @@
 commonPostOpen
     "a common hook for postOpenWith:, postOpenAsSubcanvasWith: and postOpenAsDialogWith:."
 
-    self delayedUpdateInternalList
+    self enqueueUpdateInternalList
 
     "Created: / 18-09-2014 / 00:29:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 20-09-2014 / 23:50:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
--- a/application/applicationWinRC.rc	Mon Sep 22 22:50:28 2014 +0100
+++ b/application/applicationWinRC.rc	Mon Sep 22 23:49:05 2014 +0100
@@ -39,7 +39,7 @@
       VALUE "LegalCopyright", "Copyring (C) 2014 Jan Vrany\0"
       VALUE "ProductName", "Visual Debugger\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Mon, 22 Sep 2014 21:49:56 GMT\0"
+      VALUE "ProductDate", "Mon, 22 Sep 2014 22:48:32 GMT\0"
     END
   END
 
--- a/tests/tests.rc	Mon Sep 22 22:50:28 2014 +0100
+++ b/tests/tests.rc	Mon Sep 22 23:49:05 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
       VALUE "ProductName", "LibraryName\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Mon, 22 Sep 2014 21:49:54 GMT\0"
+      VALUE "ProductDate", "Mon, 22 Sep 2014 22:48:31 GMT\0"
     END
 
   END
--- a/vdb.rc	Mon Sep 22 22:50:28 2014 +0100
+++ b/vdb.rc	Mon Sep 22 23:49:05 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
       VALUE "ProductName", "LibraryName\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Mon, 22 Sep 2014 21:49:52 GMT\0"
+      VALUE "ProductDate", "Mon, 22 Sep 2014 22:48:30 GMT\0"
     END
 
   END