VDBAbstractUnixConsoleApplication.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 10 Jun 2019 15:22:49 +0100
changeset 166 d55f55ac977b
parent 159 c00d27805420
child 169 807f5f62c910
permissions -rw-r--r--
plugins/bee: add symbol filter to quickly search through (possibly long) list of symbols.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     1
"
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     2
jv:vdb - Visual / VM Debugger
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     4
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     5
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     6
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     7
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     8
"
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
"{ Package: 'jv:vdb' }"
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
"{ NameSpace: Smalltalk }"
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    13
VDBAbstractConsoleApplication subclass:#VDBAbstractUnixConsoleApplication
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    14
	instanceVariableNames:''
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
	classVariableNames:''
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
	poolDictionaries:''
51
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    17
	category:'VDB-UI-Console-Unix'
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
!
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
51
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    20
!VDBAbstractUnixConsoleApplication class methodsFor:'documentation'!
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    21
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    22
copyright
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    23
"
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    24
jv:vdb - Visual / VM Debugger
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    25
Copyright (C) 2015-now Jan Vrany
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    26
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    27
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    28
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    29
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    30
"
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    31
! !
46
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 44
diff changeset
    32
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    33
!VDBAbstractUnixConsoleApplication class methodsFor:'accessing - defaults'!
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    35
defaultWindowTitle
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    36
    "Returns default window title for this application. By default,
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    37
     extracts the title from #windowSpec.
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    38
     
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    39
     Subclasses may (must) override this method."
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    40
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    41
    ^ self shouldImplement:'Override #defaultWindowTitle in concrete classes'
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
! !
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    44
!VDBAbstractUnixConsoleApplication class methodsFor:'startup-web applications'!
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    46
initialPageSpec
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    47
    "this is only required for web-applications"
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    49
    ^ self shouldImplement
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    50
!
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    52
pageSpecs
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    53
    "this is only required for web-applications"
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    55
    ^ self shouldImplement
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
! !
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
51
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    58
!VDBAbstractUnixConsoleApplication class methodsFor:'testing'!
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    59
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    60
isAbstract
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    61
    ^ self == VDBAbstractUnixConsoleApplication
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    62
! !
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    63
159
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    64
!VDBAbstractUnixConsoleApplication methodsFor:'accessing'!
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    65
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    66
consoleInput
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    67
    ^ self subclassResponsibility
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    68
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    69
    "Modified (comment): / 20-05-2019 / 11:53:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    70
!
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    71
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    72
consoleOutput
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    73
    ^ self subclassResponsibility
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    74
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    75
    "Modified (comment): / 20-05-2019 / 11:53:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    76
! !
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    77
51
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
    78
!VDBAbstractUnixConsoleApplication methodsFor:'aspects'!
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    80
consoleViewClass
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    81
    ^ VT100TerminalView
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
139
c619cc458fb1 Factored out common console code into (new) `VDBAbstractConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 94
diff changeset
    83
    "Created: / 21-01-2019 / 14:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
40
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
! !
d766d4c854a2 Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
143
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    86
!VDBAbstractUnixConsoleApplication methodsFor:'initialization & release'!
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    87
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    88
initializeConsoleView: aTerminalView forDebugger: aGDBDebugger
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    89
    aGDBDebugger notNil ifTrue:[
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    90
        aTerminalView inStream: self consoleInput.
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    91
        aTerminalView outStream: self consoleOutput. 
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    92
        aTerminalView startReaderProcessWhenVisible.
159
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    93
        aTerminalView addDependent: self.  
143
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    94
    ].
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    95
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    96
    "Created: / 25-01-2019 / 12:04:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
159
c00d27805420 UI: set console width / height when a console view is resized
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    97
    "Modified: / 20-05-2019 / 11:53:03 / 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
    98
! !
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 139
diff changeset
    99
51
6c982fc25fe2 Renamed `VDBAbstractConsoleApplication` to `VDBAbstractUnixConsoleApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
   100
!VDBAbstractUnixConsoleApplication class methodsFor:'documentation'!
46
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 44
diff changeset
   101
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 44
diff changeset
   102
version_HG
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 44
diff changeset
   103
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 44
diff changeset
   104
    ^ '$Changeset: <not expanded> $'
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 44
diff changeset
   105
! !
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 44
diff changeset
   106