VDBScatchPadApplication.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.

"
jv:libgdbs - GNU Debugger Interface Library
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2022 LabWare

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"
"{ Package: 'jv:vdb' }"

"{ NameSpace: Smalltalk }"

WorkspaceApplication subclass:#VDBScatchPadApplication
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-UI-Others'
!

!VDBScatchPadApplication class methodsFor:'documentation'!

copyright
"
jv:libgdbs - GNU Debugger Interface Library
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2022 LabWare

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"
! !

!VDBScatchPadApplication methodsFor:'defaults'!

defaultEvaluatorSyntax
    ^nil

    "Created: / 21-06-2019 / 10:59:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

thisIsASmalltalkWorkspace
    "can be redefined in a subclass to disable smalltalk-specific menu items
     (expecco uses workspaces as scratchpads)"

    ^ BlockValue
        with:[:syntax | syntax value == SmalltalkLanguage instance ]                
        argument: self syntaxHolder

    "Created: / 20-06-2019 / 22:08:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 23-06-2019 / 12:09:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBScatchPadApplication methodsFor:'menu-actions'!

loadFile:file encoding: encodingSymbolOrNil into:textView
    "Load contents of `file` into `textView`"

    | mimetype |

    super loadFile:file encoding: encodingSymbolOrNil into:textView.
    mimetype := MIMETypes mimeTypeForFilename: file.
    mimetype = 'application/x-smalltalk-source' ifTrue:[ 
        textView editedLanguage: SmalltalkLanguage instance.
        textView codeAspect: SyntaxHighlighter codeAspectStatements.
        self syntax: SmalltalkLanguage instance.
    ] ifFalse:[ 
        textView editedLanguage: nil.
        textView codeAspect: nil.
        self syntax: nil.
    ].

    "Created: / 21-06-2019 / 10:46:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 21-06-2019 / 12:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBScatchPadApplication class methodsFor:'documentation'!

version_HG

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