author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 22 Sep 2014 22:50:28 +0100 | |
changeset 24 | c33a063cb363 |
parent 23 | ed5f4b55cee5 |
child 31 | 00f6de198c7f |
permissions | -rw-r--r-- |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
"{ Package: 'jv:vdb' }" |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
VDBModelPresenter subclass:#VDBThreadPresenter |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
instanceVariableNames:'thread' |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
classVariableNames:'' |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
poolDictionaries:'' |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
category:'VDB-Presentation' |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
|
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
|
10 |
!VDBThreadPresenter methodsFor:'accessing'! |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
|
24 | 12 |
icon |
13 |
thread isRunning ifTrue:[ ^ VDBIconLibrary threadRunning16x16 ]. |
|
14 |
thread isStopped ifTrue:[ ^ VDBIconLibrary threadStopped16x16 ]. |
|
15 |
thread isTerminated ifTrue:[ ^ VDBIconLibrary threadTerminated16x16 ]. |
|
16 |
||
17 |
^ nil |
|
18 |
||
19 |
"Created: / 22-09-2014 / 22:00:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
20 |
! |
|
21 |
||
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
|
22 |
label |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
^ thread displayString |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
|
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
|
25 |
"Created: / 22-09-2014 / 00:14:11 / 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
|
26 |
! |
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
|
27 |
|
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
|
28 |
thread |
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
|
29 |
^ thread |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
! ! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
!VDBThreadPresenter methodsFor:'initialization'! |
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 |
setThread: aGDBThread |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
thread := aGDBThread |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
"Created: / 21-09-2014 / 23:39:18 / 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
|
38 |
! ! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
!VDBThreadPresenter methodsFor:'protocol-accessing'! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
41 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
42 |
fetchChildren |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
43 |
"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
|
44 |
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
|
45 |
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
|
46 |
*** 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
|
47 |
|
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
|
48 |
thread isDead ifTrue:[ ^ #() ]. |
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
|
49 |
^ thread stack collect:[ :f | VDBFramePresenter new setFrame: f; parent: self ] |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
50 |
|
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
51 |
"Created: / 21-09-2014 / 23:42:26 / 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
|
52 |
"Modified: / 22-09-2014 / 00:54:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
22
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
53 |
! ! |
6684f4d82301
Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
54 |
|
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
|
55 |
!VDBThreadPresenter 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
|
56 |
|
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
|
57 |
isThreadPresenter |
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
|
58 |
^ 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
|
59 |
|
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
|
60 |
"Created: / 21-09-2014 / 23:54:28 / 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
|
61 |
! ! |
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
|
62 |