VDBStackApplication.st
changeset 25 e0f3744cd77d
parent 24 c33a063cb363
child 31 00f6de198c7f
equal deleted inserted replaced
24:c33a063cb363 25:e0f3744cd77d
   288 
   288 
   289     "Created: / 20-09-2014 / 23:05:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   289     "Created: / 20-09-2014 / 23:05:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   290     "Modified: / 21-09-2014 / 23:52:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   290     "Modified: / 21-09-2014 / 23:52:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   291 !
   291 !
   292 
   292 
       
   293 updateInternalSelectionAfterThreadStopped: thread
       
   294     | threadP frameP |
       
   295 
       
   296     threadP := self internalListHolder value root 
       
   297                     recursiveDetect:[ :e | e isThreadPresenter and:[ e thread == thread ] ].
       
   298     frameP := threadP children first.
       
   299     self internalSelectionHolder value: frameP
       
   300 
       
   301     "Created: / 22-09-2014 / 23:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   302 !
       
   303 
   293 updateSelection
   304 updateSelection
   294     | internalSelection frame thread group |
   305     | internalSelection frame thread group |
   295 
   306 
   296     internalSelection := self internalSelectionHolder value.
   307     internalSelection := self internalSelectionHolder value.
   297     internalSelection notNil ifTrue:[ 
   308     internalSelection notNil ifTrue:[ 
   315 
   326 
   316     "Created: / 20-09-2014 / 23:10:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   327     "Created: / 20-09-2014 / 23:10:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   317     "Modified: / 22-09-2014 / 00:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   328     "Modified: / 22-09-2014 / 00:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   318 ! !
   329 ! !
   319 
   330 
   320 !VDBStackApplication methodsFor:'change & update-dekayed'!
   331 !VDBStackApplication methodsFor:'change & update-delayed'!
   321 
   332 
   322 delayedUpdateInternalList
   333 enqueueUpdateInternalList
   323     self window sensor pushUserEvent: #updateInternalList for: self
   334     self window sensor pushUserEvent:#updateInternalList for:self
   324 
   335 
   325     "Created: / 20-09-2014 / 23:05:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   336     "Created: / 20-09-2014 / 23:05:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   337 !
       
   338 
       
   339 enqueueUpdateInternalSelectionAfterThreadStopped: aGDBThread 
       
   340     self window sensor pushUserEvent:#updateInternalSelectionAfterThreadStopped: for:self withArgument: aGDBThread
       
   341 
       
   342     "Created: / 22-09-2014 / 23:15:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   326 ! !
   343 ! !
   327 
   344 
   328 !VDBStackApplication methodsFor:'event handling'!
   345 !VDBStackApplication methodsFor:'event handling'!
   329 
   346 
   330 onStoppedEvent: event
   347 onStoppedEvent: event
   331     self delayedUpdateInternalList.
   348     self enqueueUpdateInternalList.
       
   349     self enqueueUpdateInternalSelectionAfterThreadStopped:event stoppedThread.
   332 
   350 
   333     "Created: / 17-09-2014 / 23:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   351     "Created: / 17-09-2014 / 23:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   334     "Modified: / 20-09-2014 / 23:08:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   352     "Modified: / 22-09-2014 / 23:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   335 !
   353 !
   336 
   354 
   337 onThreadExitedEvent: event
   355 onThreadExitedEvent: event
   338     self delayedUpdateInternalList.
   356     self enqueueUpdateInternalList.
   339 
   357 
   340     "Created: / 18-09-2014 / 23:30:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   358     "Created: / 18-09-2014 / 23:30:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   341     "Modified: / 20-09-2014 / 23:08:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   359     "Modified: / 20-09-2014 / 23:08:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   342 !
   360 !
   343 
   361 
   344 onThreadGroupExitedEvent: event
   362 onThreadGroupExitedEvent: event
   345     self delayedUpdateInternalList.
   363     self enqueueUpdateInternalList.
   346 
   364 
   347     "Created: / 18-09-2014 / 23:30:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   365     "Created: / 18-09-2014 / 23:30:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   348     "Modified: / 20-09-2014 / 23:08:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   366     "Modified: / 20-09-2014 / 23:08:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   349 ! !
   367 ! !
   350 
   368 
   351 !VDBStackApplication methodsFor:'hooks'!
   369 !VDBStackApplication methodsFor:'hooks'!
   352 
   370 
   353 commonPostOpen
   371 commonPostOpen
   354     "a common hook for postOpenWith:, postOpenAsSubcanvasWith: and postOpenAsDialogWith:."
   372     "a common hook for postOpenWith:, postOpenAsSubcanvasWith: and postOpenAsDialogWith:."
   355 
   373 
   356     self delayedUpdateInternalList
   374     self enqueueUpdateInternalList
   357 
   375 
   358     "Created: / 18-09-2014 / 00:29:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   376     "Created: / 18-09-2014 / 00:29:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   359     "Modified: / 20-09-2014 / 23:50:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   377     "Modified: / 20-09-2014 / 23:50:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   360 ! !
   378 ! !
   361 
   379