VDBAbstractUnixConsoleApplication.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 25 Jan 2019 13:33:51 +0000
changeset 143 df7f89efd39d
parent 139 c619cc458fb1
child 159 c00d27805420
permissions -rw-r--r--
A complete rewrite of simple console ..that is not using `TerminalView`. The original (previous) implementation had various problems that were hard to fix, namely loosing some stream output in some cases. New (current) implementation uses custom console view (1VDBSimpleDebuggerConsoleView`) based on `TextCollector` rather than `TerminalView`. The resulting code is much much simpler, it does not use internal pipes nor REPL / pipe reader processes. Whole REPL runs completely in UI process.

"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany

This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'

You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
"{ Package: 'jv:vdb' }"

"{ NameSpace: Smalltalk }"

VDBAbstractConsoleApplication subclass:#VDBAbstractUnixConsoleApplication
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-UI-Console-Unix'
!

!VDBAbstractUnixConsoleApplication class methodsFor:'documentation'!

copyright
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany

This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'

You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
! !

!VDBAbstractUnixConsoleApplication class methodsFor:'accessing - defaults'!

defaultWindowTitle
    "Returns default window title for this application. By default,
     extracts the title from #windowSpec.
     
     Subclasses may (must) override this method."

    ^ self shouldImplement:'Override #defaultWindowTitle in concrete classes'
! !

!VDBAbstractUnixConsoleApplication class methodsFor:'startup-web applications'!

initialPageSpec
    "this is only required for web-applications"

    ^ self shouldImplement
!

pageSpecs
    "this is only required for web-applications"

    ^ self shouldImplement
! !

!VDBAbstractUnixConsoleApplication class methodsFor:'testing'!

isAbstract
    ^ self == VDBAbstractUnixConsoleApplication
! !

!VDBAbstractUnixConsoleApplication methodsFor:'aspects'!

consoleViewClass
    ^ VT100TerminalView

    "Created: / 21-01-2019 / 14:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBAbstractUnixConsoleApplication methodsFor:'initialization & release'!

initializeConsoleView: aTerminalView forDebugger: aGDBDebugger
    aGDBDebugger notNil ifTrue:[
        aTerminalView inStream: self consoleInput.
        aTerminalView outStream: self consoleOutput. 
        aTerminalView startReaderProcessWhenVisible.
    ].

    "Created: / 25-01-2019 / 12:04:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBAbstractUnixConsoleApplication class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !