VDBEvaluator.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 21 Jan 2019 14:43:03 +0000
changeset 139 c619cc458fb1
parent 68 6caeb5d7c92b
child 151 bc7626f46210
permissions -rw-r--r--
Factored out common console code into (new) `VDBAbstractConsoleApplication` ...to avoid code duplication between UNIX (PTY-based) and simple (emulated) console applications.

"
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 }"

Object subclass:#VDBEvaluator
	instanceVariableNames:'debugger'
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-Tools'
!

!VDBEvaluator 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/
"
! !

!VDBEvaluator methodsFor:'accessing - mimicry'!

currentNameSpace: ignored
    self assert: ignored isNil

    "Created: / 21-03-2018 / 22:40:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

moreSharedPools:ignored
    self assert: ignored isNil

    "Created: / 21-03-2018 / 22:41:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBEvaluator methodsFor:'evaluation'!

evaluate:aString in: context receiver: receiver notifying: requestor logged:logged ifFail:failBlock
    ^ debugger evaluate: aString

    "Created: / 21-03-2018 / 22:41:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBEvaluator methodsFor:'initialization'!

setDebugger: aGDBDebugger
    debugger := aGDBDebugger

    "Created: / 21-03-2018 / 22:14:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBEvaluator methodsFor:'instance creation'!

new

    "/ This is hack to overcome the fact that TextView and other expect
    "/ class that they instantiate themselves. This is indeed weird interface, 
    "/ but well, we cannot change that easily due to backward compatibility.
    "/ See
    "/ 
    "/      Workspace >> #executeDoIt:
    "/ 
    ^ self

    "Created: / 21-03-2018 / 22:36:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !