VDBStackApplication.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 11 Jul 2017 09:07:35 +0200
changeset 46 6b857f3cec8c
parent 42 a6f5f470a947
child 49 2ec7f7ed9242
permissions -rw-r--r--
Initial support for breakpoints
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'jv:vdb' }"
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
     3
"{ NameSpace: Smalltalk }"
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
     4
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
     5
VDBAbstractTreeApplication subclass:#VDBStackApplication
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
     6
	instanceVariableNames:'selectedThreadGroupHolder selectedThreadHolder
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
     7
		selectedFrameHolder'
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	classVariableNames:''
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	poolDictionaries:''
16
fc1898815ab6 Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 15
diff changeset
    10
	category:'VDB-UI-Others'
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    13
46
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    14
!VDBStackApplication class methodsFor:'accessing'!
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    15
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    16
windowTitle
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    17
    ^ 'Backtrace'
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    18
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    19
    "Created: / 11-07-2017 / 16:37:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    20
! !
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    21
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
!VDBStackApplication class methodsFor:'plugIn spec'!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
aspectSelectors
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
    "This resource specification was automatically generated
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
     by the UIPainter of ST/X."
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
    "Do not manually edit this. If it is corrupted,
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
     the UIPainter may not be able to read the specification."
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
    "Return a description of exported aspects;
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
     these can be connected to aspects of an embedding application
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
     (if this app is embedded in a subCanvas)."
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
    ^ #(
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
        #debuggerHolder
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    37
        #selectedFrameHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    38
        #selectedThreadGroupHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    39
        #selectedThreadHolder
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
      ).
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
!VDBStackApplication methodsFor:'aspects'!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    46
selectedFrameHolder
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
    "return/create the 'selectionHolder' value holder (automatically generated)"
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
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: 17
diff changeset
    49
    selectedFrameHolder isNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    50
        selectedFrameHolder := ValueHolder new.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    51
        selectedFrameHolder addDependent:self.
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
    ].
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    53
    ^ selectedFrameHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    54
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    55
    "Created: / 21-09-2014 / 23:51:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    56
!
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    57
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    58
selectedFrameHolder:aValueModel
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    59
    "set the 'selectionHolder' value holder (automatically generated)"
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    60
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    61
    |oldValue newValue|
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
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: 17
diff changeset
    63
    selectedFrameHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    64
        oldValue := selectedFrameHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    65
        selectedFrameHolder removeDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    66
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    67
    selectedFrameHolder := aValueModel.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    68
    selectedFrameHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    69
        selectedFrameHolder addDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    70
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    71
    newValue := selectedFrameHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    72
    oldValue ~~ newValue ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    73
        self update:#value with:newValue from:selectedFrameHolder.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    74
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
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: 17
diff changeset
    76
    "Created: / 21-09-2014 / 23:50:54 / 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: 17
diff changeset
    77
!
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
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: 17
diff changeset
    79
selectedThreadGroupHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    80
    "return/create the 'selectedThreadGroupHolder' value holder (automatically generated)"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    81
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    82
    selectedThreadGroupHolder isNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    83
        selectedThreadGroupHolder := ValueHolder new.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    84
        selectedThreadGroupHolder addDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    85
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    86
    ^ selectedThreadGroupHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    87
!
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    88
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    89
selectedThreadGroupHolder:something
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    90
    "set the 'selectedThreadGroupHolder' value holder (automatically generated)"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    91
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    92
    |oldValue newValue|
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    93
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    94
    selectedThreadGroupHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    95
        oldValue := selectedThreadGroupHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    96
        selectedThreadGroupHolder removeDependent:self.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    97
    ].
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    98
    selectedThreadGroupHolder := something.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    99
    selectedThreadGroupHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   100
        selectedThreadGroupHolder addDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   101
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   102
    newValue := selectedThreadGroupHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   103
    oldValue ~~ newValue ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   104
        self update:#value with:newValue from:selectedThreadGroupHolder.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   105
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   106
!
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   107
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   108
selectedThreadHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   109
    "return/create the 'selectedThreadHolder' value holder (automatically generated)"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   110
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   111
    selectedThreadHolder isNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   112
        selectedThreadHolder := ValueHolder new.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   113
        selectedThreadHolder addDependent:self.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   114
    ].
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   115
    ^ selectedThreadHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   116
!
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   117
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   118
selectedThreadHolder:something
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   119
    "set the 'selectedThreadHolder' value holder (automatically generated)"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   120
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   121
    |oldValue newValue|
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   122
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   123
    selectedThreadHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   124
        oldValue := selectedThreadHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   125
        selectedThreadHolder removeDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   126
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   127
    selectedThreadHolder := something.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   128
    selectedThreadHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   129
        selectedThreadHolder addDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   130
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   131
    newValue := selectedThreadHolder value.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   132
    oldValue ~~ newValue ifTrue:[
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   133
        self update:#value with:newValue from:selectedThreadHolder.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   134
    ].
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   135
! !
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   136
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   137
!VDBStackApplication methodsFor:'change & update'!
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   138
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   139
enqueueUpdateInternalSelectionAfterThreadStopped: aGDBThread 
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   140
    self window sensor pushUserEvent:#updateInternalSelectionAfterThreadStopped: for:self withArgument: aGDBThread
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   141
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   142
    "Created: / 22-09-2014 / 23:15:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   143
!
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   145
update:aspect with:param from:sender
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   146
    "Invoked when an object that I depend upon sends a change notification."
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   147
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   148
    "stub code automatically generated - please change as required"
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   149
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   150
    sender == selectedFrameHolder ifTrue:[
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   151
         self updateInternalSelection.
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   152
         ^ self.
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   153
    ].
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   154
    super update:aspect with:param from:sender
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   155
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   156
    "Modified: / 27-02-2015 / 15:44:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   157
!
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   158
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   159
updateInternalSelection
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   160
"/    | selection internalSelection |
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   161
"/
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   162
"/    selection := self selectionHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   163
"/    internalSelection := self internalListHolder value 
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   164
"/            detect:[:e | e value == selection ] ifNone:[ nil ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   165
"/    self internalSelectionHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   166
"/        value: internalSelection
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   167
"/        withoutNotifying: self.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   168
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   169
    "Created: / 20-09-2014 / 23:05:57 / 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: 17
diff changeset
   170
    "Modified: / 21-09-2014 / 23:52:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   171
!
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   172
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   173
updateInternalSelectionAfterThreadStopped: thread
46
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   174
    "/ It may happen that by te time we get here the thread is running
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   175
    "/ again, so care for this.
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   176
    thread isStopped ifTrue:[
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   177
        | threadP framePs frameP |
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   178
        threadP := self internalListHolder value root 
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   179
                        recursiveDetect:[ :e | e isThreadPresenter and:[ e thread == thread ] ].
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   180
        framePs := threadP children.
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   181
        framePs notEmpty ifTrue:[
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   182
            frameP := threadP children first.
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   183
            self internalSelectionHolder value: frameP
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   184
        ].
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   185
    ].
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   186
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   187
    "Created: / 22-09-2014 / 23:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
46
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
   188
    "Modified: / 06-07-2017 / 08:56:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   189
!
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   190
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   191
updateSelection
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   192
    | internalSelection frame thread group |
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   193
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   194
    internalSelection := self internalSelectionHolder value.
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   195
    internalSelection notNil ifTrue:[ 
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   196
        internalSelection isFramePresenter ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   197
            frame := internalSelection frame.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   198
            thread := frame thread.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   199
            group := thread group.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   200
        ] ifFalse:[ 
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   201
            internalSelection isThreadPresenter ifTrue:[ 
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   202
                thread := internalSelection thread.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   203
                group := thread group.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   204
            ] ifFalse:[  
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   205
                group := internalSelection threadGroup.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   206
            ]
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   207
        ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   208
    ].
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   209
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   210
    self selectedThreadGroupHolder value: group withoutNotifying: self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   211
    self selectedThreadHolder value: thread withoutNotifying: self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   212
    self selectedFrameHolder value: frame withoutNotifying: self.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   213
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   214
    "Created: / 20-09-2014 / 23:10:19 / 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: 17
diff changeset
   215
    "Modified: / 22-09-2014 / 00:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   216
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   217
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   218
!VDBStackApplication methodsFor:'change & update-delayed'!
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   219
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   220
delayedUpdateInternalList
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   221
    | root  list |
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   222
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   223
    debugger isNil ifTrue:[
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   224
        self internalListHolder root children:#().
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   225
        ^ self.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   226
    ].
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   227
    root := self internalListHolder root.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   228
    list := debugger inferiors 
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   229
            select:[:inferior | true "inferior isRunning or:[ inferior isStopped ]" ]
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   230
            thenCollect:[:inferior | 
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   231
                (VDBThreadGroupPresenter new)
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   232
                    setThreadGroup:inferior;
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   233
                    parent:root
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   234
            ].
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   235
    root children:list.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   236
    root expand.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   237
    root children size == 1 ifTrue:[
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   238
        root children anElement expand.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   239
        root children anElement children size == 1 ifTrue:[
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   240
            root children anElement children anElement expand.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   241
        ]
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   242
    ].
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   243
    internalListView notNil ifTrue:[
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   244
        internalListView invalidate.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   245
    ]
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   246
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   247
    "Created: / 20-09-2014 / 23:05:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   248
    "Modified: / 02-03-2015 / 06:43:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   249
!
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   250
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   251
delayedUpdateSelection
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   252
    | internalSelection frame thread group |
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   253
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   254
    internalSelection := self internalSelectionHolder value.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   255
    internalSelection notNil ifTrue:[ 
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   256
        internalSelection isFramePresenter ifTrue:[
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   257
            frame := internalSelection frame.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   258
            thread := frame thread.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   259
            group := thread group.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   260
        ] ifFalse:[ 
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   261
            internalSelection isThreadPresenter ifTrue:[ 
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   262
                thread := internalSelection thread.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   263
                group := thread group.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   264
            ] ifFalse:[  
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   265
                group := internalSelection threadGroup.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   266
            ]
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   267
        ].
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   268
    ].
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   269
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   270
    self selectedThreadGroupHolder value: group withoutNotifying: self.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   271
    self selectedThreadHolder value: thread withoutNotifying: self.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   272
    self selectedFrameHolder value: frame withoutNotifying: self.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   273
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   274
    "Created: / 27-02-2015 / 15:33:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   275
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   276
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   277
!VDBStackApplication methodsFor:'event handling'!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   278
31
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   279
onRunningEvent: event
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   280
    self enqueueDelayedUpdateInternalList.
31
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   281
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   282
    "Created: / 30-09-2014 / 00:02:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   283
!
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   284
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   285
onStoppedEvent: event
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   286
    self enqueueDelayedUpdateInternalList.
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   287
    self enqueueUpdateInternalSelectionAfterThreadStopped:event stoppedThread.
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   288
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   289
    "Created: / 17-09-2014 / 23:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   290
    "Modified: / 22-09-2014 / 23:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   291
!
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   292
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   293
onThreadExitedEvent: event
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   294
    self enqueueDelayedUpdateInternalList.
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   295
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   296
    "Created: / 18-09-2014 / 23:30:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   297
    "Modified: / 20-09-2014 / 23:08:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   298
!
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   299
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   300
onThreadGroupExitedEvent: event
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   301
    self enqueueDelayedUpdateInternalList.
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   302
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   303
    "Created: / 18-09-2014 / 23:30:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   304
    "Modified: / 20-09-2014 / 23:08:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   305
!
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   306
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   307
onThreadGroupStartedEvent: event
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   308
    self enqueueDelayedUpdateInternalList.
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   309
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   310
    "Created: / 02-03-2015 / 06:42:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   311
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   312
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   313
!VDBStackApplication methodsFor:'initialization & release'!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   314
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   315
subscribe   
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   316
    "Register for debugger events. To be overrided by subclasses"
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   317
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   318
    debugger announcer
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   319
        when: GDBRunningEvent               send: #onRunningEvent: to: self;
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   320
        when: GDBStoppedEvent               send: #onStoppedEvent: to: self;
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   321
        when: GDBThreadGroupStartedEvent    send: #onThreadGroupStartedEvent: to: self;
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   322
        when: GDBThreadExitedEvent          send: #onThreadExitedEvent: to: self;
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   323
        when: GDBThreadGroupExitedEvent     send: #onThreadGroupExitedEvent: to: self
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   324
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   325
    "Created: / 07-06-2014 / 14:33:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   326
    "Modified: / 02-03-2015 / 06:42:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   327
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   328
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   329
!VDBStackApplication class methodsFor:'documentation'!
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   330
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   331
version_HG
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   332
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   333
    ^ '$Changeset: <not expanded> $'
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   334
! !
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   335