VDBAbstractConsoleApplication.st
author Jan Vrany <jan.vrany@labware.com>
Tue, 26 Jul 2022 15:01:33 +0100
changeset 265 f2470f0dd9cd
parent 264 23960fcb9dac
permissions -rw-r--r--
Do not show address for (pseudo) instructions with no code While such instructions do not appear in GDB-produced disassembly, they may appear in some manually-generated instruction lists. One example of such (pseudo) instruction is label.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     2
jv:libgdbs - GNU Debugger Interface Library
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     4
Copyright (C) 2021-2022 LabWare
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     5
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     6
Permission is hereby granted, free of charge, to any person obtaining a copy
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     7
of this software and associated documentation files (the 'Software'), to deal
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     8
in the Software without restriction, including without limitation the rights
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    10
copies of the Software, and to permit persons to whom the Software is
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    11
furnished to do so, subject to the following conditions:
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    13
The above copyright notice and this permission notice shall be included in all
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    14
copies or substantial portions of the Software.
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    16
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    19
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    21
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    22
SOFTWARE.
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
"{ Package: 'jv:vdb' }"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
"{ NameSpace: Smalltalk }"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
VDBAbstractApplication subclass:#VDBAbstractConsoleApplication
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
	instanceVariableNames:'consoleView'
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
	classVariableNames:''
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
	poolDictionaries:''
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
	category:'VDB-UI-Abstract'
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
!VDBAbstractConsoleApplication class methodsFor:'documentation'!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
copyright
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
"
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    39
jv:libgdbs - GNU Debugger Interface Library
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
Copyright (C) 2015-now Jan Vrany
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    41
Copyright (C) 2021-2022 LabWare
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    42
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    43
Permission is hereby granted, free of charge, to any person obtaining a copy
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    44
of this software and associated documentation files (the 'Software'), to deal
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    45
in the Software without restriction, including without limitation the rights
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    46
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    47
copies of the Software, and to permit persons to whom the Software is
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    48
furnished to do so, subject to the following conditions:
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    50
The above copyright notice and this permission notice shall be included in all
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    51
copies or substantial portions of the Software.
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    53
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    54
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    55
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    56
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    57
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    58
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    59
SOFTWARE.
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
! !
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
!VDBAbstractConsoleApplication class methodsFor:'interface specs'!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
windowSpec
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
    "This resource specification was automatically generated
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
     by the UIPainter of ST/X."
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
    "Do not manually edit this!! If it is corrupted,
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
     the UIPainter may not be able to read the specification."
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
    "
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
     UIPainter new openOnClass:VDBAbstractConsoleApplication andSelector:#windowSpec
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
     VDBAbstractConsoleApplication new openInterface:#windowSpec
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
     VDBAbstractConsoleApplication open
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
    "
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
    <resource: #canvas>
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
    ^ 
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
    #(FullSpec
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
       name: windowSpec
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
       window: 
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
      (WindowSpec
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
         label: 'Console'
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
         name: 'Console'
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
         min: (Point 10 10)
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    88
         bounds: (Rectangle 0 0 782 332)
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
       )
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90
       component: 
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    91
      (SpecCollection
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    92
         collection: (
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    93
          (ArbitraryComponentSpec
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
             name: 'Console'
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
             layout: (LayoutFrame 0 0 0 0 0 1 0 1)
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
             hasHorizontalScrollBar: true
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    97
             hasVerticalScrollBar: true
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    98
             miniScrollerHorizontal: true
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    99
             autoHideScrollBars: false
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   100
             hasBorder: false
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   101
             component: consoleView
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   102
           )
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   103
          )
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   104
        
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   105
       )
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
     )
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
! !
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   109
!VDBAbstractConsoleApplication class methodsFor:'plugIn spec'!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   111
aspectSelectors
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
    "This resource specification was automatically generated
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
     by the UIPainter of ST/X."
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   114
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   115
    "Do not manually edit this. If it is corrupted,
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   116
     the UIPainter may not be able to read the specification."
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   117
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   118
    "Return a description of exported aspects;
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   119
     these can be connected to aspects of an embedding application
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
     (if this app is embedded in a subCanvas)."
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   121
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   122
    ^ #(
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
        #debuggerHolder
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
      ).
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
! !
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   127
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
!VDBAbstractConsoleApplication class methodsFor:'queries'!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
isAbstract
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
    "Return if this class is an abstract class.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
     True is returned here for myself only; false for subclasses.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
     Abstract subclasses must redefine this again."
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   134
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
    ^ self == VDBAbstractConsoleApplication.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
! !
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
!VDBAbstractConsoleApplication methodsFor:'aspects'!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
consoleView
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
    consoleView isNil ifTrue:[ 
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
        consoleView := self consoleViewClass new.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   143
        self initializeConsoleView: consoleView.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
    ].
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   145
    ^ consoleView.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
    "Created: / 21-01-2019 / 14:09:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   148
!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   149
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   150
consoleViewClass
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   151
    ^ self subclassResponsibility
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   152
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
    "Created: / 21-01-2019 / 14:10:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   154
! !
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
!VDBAbstractConsoleApplication methodsFor:'initialization & release'!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
initializeConsoleView: aTerminalView
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
     aTerminalView font: self textFont;
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   160
                cursorType: #block;  
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   161
                foregroundColor: Color white
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   162
                backgroundColor: Color black;
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   163
                cursorForegroundColor: Color white
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   164
                      backgroundColor: Color white.        
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   165
     self initializeConsoleView: aTerminalView forDebugger: debugger.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   166
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
    "Created: / 21-01-2019 / 14:11:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   168
    "Modified: / 21-01-2019 / 15:31:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   169
!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   171
initializeConsoleView: aTerminalView forDebugger: aGDBDebugger
143
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
   172
    "/ Nothing to do by default
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   173
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   174
    "Created: / 21-01-2019 / 15:30:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
143
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
   175
    "Modified: / 25-01-2019 / 12:05:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   176
!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   177
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   178
subscribe   
241
9996050286c5 Always call `super subscribe` when overriding
Jan Vrany <jan.vrany@labware.com>
parents: 143
diff changeset
   179
    super subscribe.
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   180
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   181
    consoleView notNil ifTrue:[
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   182
        self initializeConsoleView: consoleView forDebugger: debugger
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   183
    ].
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   184
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   185
    "Created: / 10-06-2014 / 21:02:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   186
    "Modified: / 21-01-2019 / 15:31:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
241
9996050286c5 Always call `super subscribe` when overriding
Jan Vrany <jan.vrany@labware.com>
parents: 143
diff changeset
   187
    "Modified (comment): / 18-11-2021 / 16:24:21 / Jan Vrany <jan.vrany@labware.com>"
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   188
!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   189
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   190
unsubscribe
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   191
    "Unsubscribe myself fo debugger events"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   192
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   193
    super unsubscribe.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   194
    consoleView notNil ifTrue:[ 
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   195
        self initializeConsoleView: consoleView forDebugger: nil 
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   196
    ].
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   197
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   198
    "Created: / 09-06-2014 / 10:09:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   199
    "Modified: / 21-01-2019 / 15:32:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   200
! !
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   201
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   202
!VDBAbstractConsoleApplication class methodsFor:'documentation'!
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   203
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   204
version_HG
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   205
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   206
    ^ '$Changeset: <not expanded> $'
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   207
! !
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   208