author | Jan Vrany <jan.vrany@labware.com> |
Mon, 30 May 2022 14:18:03 +0100 | |
changeset 264 | 23960fcb9dac |
parent 219 | 6ab12a17ca3b |
permissions | -rw-r--r-- |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
1 |
" |
264
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
2 |
jv:libgdbs - GNU Debugger Interface Library |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
3 |
Copyright (C) 2015-now Jan Vrany |
264
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
4 |
Copyright (C) 2021-2022 LabWare |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
5 |
|
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
6 |
Permission is hereby granted, free of charge, to any person obtaining a copy |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
7 |
of this software and associated documentation files (the 'Software'), to deal |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
8 |
in the Software without restriction, including without limitation the rights |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
9 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
10 |
copies of the Software, and to permit persons to whom the Software is |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
11 |
furnished to do so, subject to the following conditions: |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
12 |
|
264
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
13 |
The above copyright notice and this permission notice shall be included in all |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
14 |
copies or substantial portions of the Software. |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
15 |
|
264
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
16 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
17 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
18 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
19 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
20 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
21 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
22 |
SOFTWARE. |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
23 |
" |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
"{ Package: 'jv:vdb' }" |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
|
38
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
26 |
"{ NameSpace: Smalltalk }" |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
27 |
|
60
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
28 |
VDBAbstractPresenter subclass:#VDBThreadGroupPresenter |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
instanceVariableNames:'threadGroup' |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
classVariableNames:'' |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
poolDictionaries:'' |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
category:'VDB-Presentation' |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
|
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
35 |
!VDBThreadGroupPresenter class methodsFor:'documentation'! |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
36 |
|
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
37 |
copyright |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
38 |
" |
264
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
39 |
jv:libgdbs - GNU Debugger Interface Library |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
40 |
Copyright (C) 2015-now Jan Vrany |
264
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
41 |
Copyright (C) 2021-2022 LabWare |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
42 |
|
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
43 |
Permission is hereby granted, free of charge, to any person obtaining a copy |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
44 |
of this software and associated documentation files (the 'Software'), to deal |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
45 |
in the Software without restriction, including without limitation the rights |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
46 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
47 |
copies of the Software, and to permit persons to whom the Software is |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
48 |
furnished to do so, subject to the following conditions: |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
49 |
|
264
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
50 |
The above copyright notice and this permission notice shall be included in all |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
51 |
copies or substantial portions of the Software. |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
52 |
|
264
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
53 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
54 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
55 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
56 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
57 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
58 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
23960fcb9dac
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
219
diff
changeset
|
59 |
SOFTWARE. |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
60 |
" |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
61 |
! ! |
38
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
62 |
|
23
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
63 |
!VDBThreadGroupPresenter methodsFor:'accessing'! |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
64 |
|
24 | 65 |
icon |
31
00f6de198c7f
Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
66 |
threadGroup isRunning ifTrue:[ ^ VDBIconLibrary threadGroupRunning16x16 ]. |
00f6de198c7f
Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
67 |
threadGroup isStopped ifTrue:[ ^ VDBIconLibrary threadGroupStopped16x16 ]. |
34
cda31dfd5386
Minor tweaks in stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
31
diff
changeset
|
68 |
threadGroup isDead ifTrue:[ ^ VDBIconLibrary threadGroupTerminated16x16 ]. |
31
00f6de198c7f
Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
69 |
^ nil |
24 | 70 |
|
71 |
"Created: / 22-09-2014 / 22:13:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
34
cda31dfd5386
Minor tweaks in stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
31
diff
changeset
|
72 |
"Modified: / 30-09-2014 / 00:55:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
24 | 73 |
! |
74 |
||
23
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
75 |
label |
44 | 76 |
| executableOrThreadGrouppId pidOrEmpty state | |
77 |
||
78 |
threadGroup executable notNil ifTrue:[ |
|
79 |
executableOrThreadGrouppId := threadGroup executable contractTo: 30 |
|
80 |
] ifFalse:[ |
|
81 |
executableOrThreadGrouppId := 'thread group ', threadGroup id. |
|
82 |
]. |
|
38
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
83 |
|
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
84 |
(threadGroup type = 'process' and:[ threadGroup pid notNil ]) ifTrue:[ |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
85 |
pidOrEmpty := 'pid ', threadGroup pid printString , ', '. |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
86 |
]. |
44 | 87 |
threadGroup isStopped ifTrue:[ |
88 |
state := 'stopped' |
|
89 |
] ifFalse:[ |
|
38
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
90 |
threadGroup isRunning ifTrue:[ |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
91 |
state := 'running' |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
92 |
] ifFalse:[ |
44 | 93 |
threadGroup isFinished ifTrue:[ |
94 |
state := 'finished' |
|
95 |
] ifFalse:[ |
|
96 |
threadGroup isTerminated ifTrue:[ |
|
97 |
state := 'terminated' |
|
98 |
] ifFalse:[ |
|
99 |
state := 'not run' |
|
100 |
]]]]. |
|
38
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
101 |
|
44 | 102 |
^ '%1 [%2%3]' bindWith: executableOrThreadGrouppId |
103 |
with: pidOrEmpty ? '' |
|
104 |
with: state |
|
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
105 |
|
23
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
106 |
"Created: / 22-09-2014 / 00:14:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 107 |
"Modified: / 07-06-2017 / 07:47:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
23
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
108 |
! |
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
109 |
|
60
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
110 |
subject |
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
111 |
"Return an instance of GDB object that this presenter displays." |
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
112 |
|
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
113 |
^ threadGroup |
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
114 |
|
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
115 |
"Modified: / 05-02-2018 / 13:08:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
116 |
! |
bcdb393c956f
Cleanup of (former) `VDBModelPresenter`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
53
diff
changeset
|
117 |
|
23
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
118 |
threadGroup |
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
119 |
^ threadGroup |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
120 |
! ! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
121 |
|
219
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
122 |
!VDBThreadGroupPresenter methodsFor:'change & update'! |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
123 |
|
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
124 |
updateChildren |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
125 |
| childrenToRemove childrenToAdd | |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
126 |
|
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
127 |
children isNil ifTrue: [ ^ self ]. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
128 |
childrenToRemove := children copy. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
129 |
childrenToAdd := #(). |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
130 |
|
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
131 |
threadGroup threads do: [:thread | |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
132 |
| child | |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
133 |
|
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
134 |
child := children detect: [:each | each thread == thread ] ifNone: nil. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
135 |
child notNil ifTrue: [ |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
136 |
childrenToRemove remove: child. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
137 |
child updateChildren. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
138 |
] ifFalse: [ |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
139 |
child := VDBThreadPresenter new |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
140 |
setThread: thread; |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
141 |
parent: self; |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
142 |
yourself. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
143 |
childrenToAdd := childrenToAdd copyWith: child. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
144 |
]. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
145 |
]. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
146 |
childrenToRemove notEmpty ifTrue: [ |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
147 |
self removeAll: childrenToRemove. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
148 |
]. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
149 |
childrenToAdd notEmpty ifTrue: [ |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
150 |
self addAll: childrenToAdd. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
151 |
]. |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
152 |
|
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
153 |
"Modified: / 17-05-2021 / 16:24:15 / Jan Vrany <jan.vrany@labware.com>" |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
154 |
! ! |
6ab12a17ca3b
UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents:
212
diff
changeset
|
155 |
|
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
156 |
!VDBThreadGroupPresenter methodsFor:'initialization'! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
157 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
158 |
setThreadGroup: aGDBThreadGroup |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
159 |
threadGroup := aGDBThreadGroup |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
160 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
161 |
"Created: / 21-09-2014 / 23:38:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
162 |
! ! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
163 |
|
212
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
164 |
!VDBThreadGroupPresenter methodsFor:'printing & storing'! |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
165 |
|
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
166 |
printOn:aStream |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
167 |
"append a printed representation of the receiver to the argument, aStream" |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
168 |
|
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
169 |
super printOn:aStream. |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
170 |
aStream nextPut:$(. |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
171 |
threadGroup printOn:aStream. |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
172 |
aStream nextPut:$). |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
173 |
|
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
174 |
"Created: / 14-05-2021 / 14:34:06 / Jan Vrany <jan.vrany@labware.com>" |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
175 |
! ! |
62bb14c71a71
Add `#printOn:` to thread group, thread and frame presenters
Jan Vrany <jan.vrany@labware.com>
parents:
60
diff
changeset
|
176 |
|
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
177 |
!VDBThreadGroupPresenter methodsFor:'protocol-accessing'! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
178 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
179 |
fetchChildren |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
180 |
"should compute the list of children via the model. |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
181 |
Be aware, that the somewhat stupid 'optimization' of how the model is fetched may lead to |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
182 |
a O(n*log n) or even O(n^2) behavior here. |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
183 |
*** to optimize: redefine by subClass" |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
184 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
185 |
^ threadGroup threads collect:[ :t | VDBThreadPresenter new setThread: t; parent: self ] |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
186 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
187 |
"Created: / 21-09-2014 / 23:41:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
188 |
! ! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
189 |
|
53
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
190 |
!VDBThreadGroupPresenter methodsFor:'protocol-displaying'! |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
191 |
|
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
192 |
heightOn:aGC |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
193 |
|
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
194 |
"/ Following is a performance optimization. We know |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
195 |
"/ that label will be a string, so passing any string |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
196 |
"/ would do (this in the end asks a font metrics). |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
197 |
"/ |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
198 |
"/ This saves us a lot of time when system generates |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
199 |
"/ a lot of events since #label sends ask GDB dof details |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
200 |
height isNil ifTrue:[ |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
201 |
height := self heightOf:'%1 [%2%3]' on:aGC |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
202 |
]. |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
203 |
^ height |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
204 |
|
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
205 |
"Created: / 15-01-2018 / 09:54:22 / jv" |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
206 |
! ! |
738e2f6626bf
Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
49
diff
changeset
|
207 |
|
23
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
208 |
!VDBThreadGroupPresenter methodsFor:'testing'! |
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
209 |
|
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
210 |
isThreadGroupPresenter |
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
211 |
^ true |
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
212 |
|
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
213 |
"Created: / 21-09-2014 / 23:54:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
214 |
! ! |
ed5f4b55cee5
Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
22
diff
changeset
|
215 |
|
38
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
216 |
!VDBThreadGroupPresenter class methodsFor:'documentation'! |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
217 |
|
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
218 |
version_HG |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
219 |
|
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
220 |
^ '$Changeset: <not expanded> $' |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
221 |
! ! |
9b861cb882c8
Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
222 |