VDBFramePresenter.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 23 Nov 2017 22:45:57 +0000
changeset 49 2ec7f7ed9242
parent 40 d766d4c854a2
child 54 d974a70c70ad
permissions -rw-r--r--
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
     1
"
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
     2
jv:vdb - Visual / VM Debugger
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
     4
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
     5
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
     6
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
     7
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
     8
"
22
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
"{ Package: 'jv:vdb' }"
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    11
"{ NameSpace: Smalltalk }"
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    12
22
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
VDBModelPresenter subclass:#VDBFramePresenter
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
	instanceVariableNames:'frame'
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
	classVariableNames:''
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
	poolDictionaries:''
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
	category:'VDB-Presentation'
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
!
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    20
!VDBFramePresenter class methodsFor:'documentation'!
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    21
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    22
copyright
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    23
"
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    24
jv:vdb - Visual / VM Debugger
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    25
Copyright (C) 2015-now Jan Vrany
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    26
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    27
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    28
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    29
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    30
"
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    31
! !
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    32
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
    33
!VDBFramePresenter methodsFor:'accessing'!
22
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
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
    35
frame
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
    36
    ^ frame
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
    37
!
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
    38
24
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    39
icon
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    40
    ^ frame thread isRunning 
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    41
        ifTrue:[ VDBIconLibrary frameRunning16x16 ]
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    42
        ifFalse:[ VDBIconLibrary frameStopped16x16 ]
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    43
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    44
    "Created: / 22-09-2014 / 22:06:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    45
!
c33a063cb363 Added icons from Eclipse.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    46
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
    47
label
22
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
    ^ frame displayString
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
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
    50
    "Created: / 22-09-2014 / 00:14:39 / 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
    51
! !
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
!VDBFramePresenter methodsFor:'initialization'!
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
setFrame: aGDBFrame
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
    ^ frame := aGDBFrame
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    "Created: / 21-09-2014 / 23:38:30 / 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
    59
! !
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
!VDBFramePresenter methodsFor:'protocol-accessing'!
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
fetchChildren
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
    "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
    65
     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
    66
     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
    67
     *** 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
    68
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
    ^  #()
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
    "Created: / 21-09-2014 / 23:37:47 / 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
    72
! !
6684f4d82301 Temporary commit: reworking VDBStackApplication to support multiple threads and inferiors
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
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
    74
!VDBFramePresenter 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
    75
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
    76
isFramePresenter
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
    77
    ^ 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
    78
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
    79
    "Created: / 21-09-2014 / 23:54:15 / 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
    80
! !
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
    81