VDBThreadGroupPresenter.st
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--
Added icons from Eclipse.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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:#VDBThreadGroupPresenter
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
	instanceVariableNames:'threadGroup'
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
!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
    11
24
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    12
icon
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    13
    ^ VDBIconLibrary threadGroupRunning16x16
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    14
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    15
    "Created: / 22-09-2014 / 22:13:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    16
!
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    17
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
    18
label
22
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
    ^ threadGroup displayString
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
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
    21
    "Created: / 22-09-2014 / 00:14:26 / 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
    22
!
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
    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
    24
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
    25
    ^ threadGroup
22
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
! !
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!VDBThreadGroupPresenter methodsFor:'initialization'!
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
setThreadGroup: aGDBThreadGroup
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
    threadGroup := aGDBThreadGroup
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
    "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
    34
! !
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
!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
    37
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
fetchChildren
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
    "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
    40
     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
    41
     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
    42
     *** 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
    43
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
    ^ 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
    45
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
    "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
    47
! !
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
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
    49
!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
    50
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
    51
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
    52
    ^ 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
    53
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
    54
    "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
    55
! !
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