175
|
1 |
"
|
|
2 |
jv:vdb - Visual / VM Debugger
|
|
3 |
Copyright (C) 2015-now Jan Vrany
|
|
4 |
|
|
5 |
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
|
|
6 |
|
|
7 |
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
|
|
8 |
"
|
|
9 |
"{ Package: 'jv:vdb' }"
|
|
10 |
|
|
11 |
"{ NameSpace: Smalltalk }"
|
|
12 |
|
|
13 |
WorkspaceApplication subclass:#VDBScatchPadApplication
|
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'VDB-UI-Others'
|
|
18 |
!
|
|
19 |
|
|
20 |
!VDBScatchPadApplication class methodsFor:'documentation'!
|
|
21 |
|
|
22 |
copyright
|
|
23 |
"
|
|
24 |
jv:vdb - Visual / VM Debugger
|
|
25 |
Copyright (C) 2015-now Jan Vrany
|
|
26 |
|
|
27 |
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
|
|
28 |
|
|
29 |
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
|
|
30 |
"
|
|
31 |
! !
|
|
32 |
|
|
33 |
!VDBScatchPadApplication methodsFor:'defaults'!
|
|
34 |
|
|
35 |
defaultEvaluatorSyntax
|
|
36 |
^nil
|
|
37 |
|
|
38 |
"Created: / 21-06-2019 / 10:59:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
39 |
!
|
|
40 |
|
|
41 |
thisIsASmalltalkWorkspace
|
|
42 |
"can be redefined in a subclass to disable smalltalk-specific menu items
|
|
43 |
(expecco uses workspaces as scratchpads)"
|
|
44 |
|
|
45 |
^ BlockValue
|
|
46 |
with:[:syntax | syntax value == SmalltalkLanguage instance ]
|
|
47 |
argument: self syntaxHolder
|
|
48 |
|
|
49 |
"Created: / 20-06-2019 / 22:08:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
50 |
"Modified: / 23-06-2019 / 12:09:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
51 |
! !
|
|
52 |
|
|
53 |
!VDBScatchPadApplication methodsFor:'menu-actions'!
|
|
54 |
|
|
55 |
loadFile:file encoding: encodingSymbolOrNil into:textView
|
|
56 |
"Load contents of `file` into `textView`"
|
|
57 |
|
|
58 |
| mimetype |
|
|
59 |
|
|
60 |
super loadFile:file encoding: encodingSymbolOrNil into:textView.
|
|
61 |
mimetype := MIMETypes mimeTypeForFilename: file.
|
|
62 |
mimetype = 'application/x-smalltalk-source' ifTrue:[
|
|
63 |
textView editedLanguage: SmalltalkLanguage instance.
|
|
64 |
textView codeAspect: SyntaxHighlighter codeAspectStatements.
|
|
65 |
self syntax: SmalltalkLanguage instance.
|
|
66 |
] ifFalse:[
|
|
67 |
textView editedLanguage: nil.
|
|
68 |
textView codeAspect: nil.
|
|
69 |
self syntax: nil.
|
|
70 |
].
|
|
71 |
|
|
72 |
"Created: / 21-06-2019 / 10:46:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
73 |
"Modified: / 21-06-2019 / 12:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
74 |
! !
|
|
75 |
|
|
76 |
!VDBScatchPadApplication class methodsFor:'documentation'!
|
|
77 |
|
|
78 |
version_HG
|
|
79 |
|
|
80 |
^ '$Changeset: <not expanded> $'
|
|
81 |
! !
|
|
82 |
|