author | Claus Gittinger <cg@exept.de> |
Fri, 01 May 2020 14:59:17 +0200 | |
changeset 19584 | 42294ec5ee95 |
parent 19444 | d2f8caf0e85c |
permissions | -rw-r--r-- |
19248 | 1 |
"{ Encoding: utf8 }" |
2 |
||
5140 | 3 |
" |
4 |
COPYRIGHT (c) 2001 by eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
3154 | 14 |
"{ Package: 'stx:libtool' }" |
15 |
||
15234
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
16 |
"{ NameSpace: Smalltalk }" |
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
17 |
|
5303 | 18 |
MultiViewToolApplication subclass:#WorkspaceApplication |
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
19 |
instanceVariableNames:'autoDefineVariables syntaxHolder poolsConsideredInDoIts |
9695 | 20 |
smalltalkMenuEnabledHolder clipBoardWatcherProcess |
9735 | 21 |
fetchClipboardLines cursorLineHolder cursorColHolder |
13852 | 22 |
modeLabelHolder toolBarView namespaceHolder |
15817
f6046130309e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15816
diff
changeset
|
23 |
canChangeLanguageHolder cursorLineAndColumnInfoHolder |
18055 | 24 |
cursorLineAndColumnLabelHolder autoFetchSelectionHolder' |
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
25 |
classVariableNames:'LastFilterBlockString LastProcessingBlockString |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
26 |
LastGeneratorBlockString LastTeaWaitTime DefaultToolBarVisible |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
27 |
ClipBoardFetchingInstance LastLanguage MyWorkspaceOpened |
16260 | 28 |
LastNamespace LastSnippetFilename' |
8315 | 29 |
poolDictionaries:'' |
30 |
category:'Interface-Smalltalk' |
|
3154 | 31 |
! |
32 |
||
3191 | 33 |
!WorkspaceApplication class methodsFor:'documentation'! |
34 |
||
5140 | 35 |
copyright |
36 |
" |
|
37 |
COPYRIGHT (c) 2001 by eXept Software AG |
|
38 |
All Rights Reserved |
|
39 |
||
40 |
This software is furnished under a license and may be used |
|
41 |
only in accordance with the terms of that license and with the |
|
42 |
inclusion of the above copyright notice. This software may not |
|
43 |
be provided or otherwise made available to, or used by, any |
|
44 |
other person. No title to or ownership of the software is |
|
45 |
hereby transferred. |
|
46 |
" |
|
47 |
! |
|
48 |
||
3191 | 49 |
documentation |
50 |
" |
|
51 |
A simple wrapper around a WorkSpace-View, adding a pullDown menu. |
|
52 |
||
53 |
[author:] |
|
54 |
Claus Gittinger |
|
55 |
" |
|
56 |
! ! |
|
3154 | 57 |
|
7825 | 58 |
!WorkspaceApplication class methodsFor:'defaults'! |
59 |
||
15833
b058e6078d5a
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15817
diff
changeset
|
60 |
default |
b058e6078d5a
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15817
diff
changeset
|
61 |
"a place where the default workspaceApplication could be hooked in; |
b058e6078d5a
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15817
diff
changeset
|
62 |
see SystemBrowser default and FileBrowser default on the intention..." |
b058e6078d5a
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15817
diff
changeset
|
63 |
|
b058e6078d5a
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15817
diff
changeset
|
64 |
^ self |
b058e6078d5a
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15817
diff
changeset
|
65 |
! |
b058e6078d5a
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15817
diff
changeset
|
66 |
|
8499 | 67 |
defaultEditToolbarVisible |
68 |
^ UserPreferences current editToolbarVisibleInWorkspace |
|
69 |
||
70 |
"Created: / 14-07-2007 / 16:42:50 / cg" |
|
71 |
! |
|
72 |
||
7825 | 73 |
defaultInfoVisible |
74 |
^ UserPreferences current infoVisibleInWorkspace |
|
75 |
||
76 |
"Created: / 14-07-2007 / 16:43:21 / cg" |
|
77 |
! |
|
78 |
||
10169 | 79 |
defaultMyWorkspaceDotWspFile |
10568 | 80 |
|stxFolder f | |
81 |
||
82 |
stxFolder := Filename homeDirectory / '.smalltalk'. |
|
83 |
f := stxFolder / 'MyWorkspace.wsp'. |
|
10169 | 84 |
f exists ifFalse:[ |
10568 | 85 |
stxFolder makeDirectory. |
86 |
||
10169 | 87 |
f writingFileDo:[:s| |
88 |
'MyWorkspace.wsp' asFilename exists ifTrue:[ |
|
89 |
s nextPutAll:('MyWorkspace.wsp' asFilename contentsAsString) |
|
90 |
] ifFalse:[ |
|
91 |
s nextPutLine: '"This is your personal workspace..."'. |
|
92 |
s nextPutLine: '"Edit and save as ', f pathName , '"'. |
|
10568 | 93 |
|
94 |
'MyWorkspaceSample.wsp' asFilename exists ifTrue:[ |
|
95 |
s nextPutAll:('MyWorkspaceSample.wsp' asFilename contentsAsString) |
|
96 |
] |
|
12393 | 97 |
]. |
98 |
s syncData. |
|
99 |
]. |
|
10169 | 100 |
]. |
101 |
^f |
|
102 |
||
103 |
"Created: / 21-06-2011 / 08:45:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10317 | 104 |
"Modified: / 14-07-2011 / 13:08:30 / Administrator" |
10568 | 105 |
"Modified: / 10-08-2011 / 21:40:31 / cg" |
10169 | 106 |
! |
107 |
||
7825 | 108 |
defaultToolbarVisible |
109 |
^ UserPreferences current toolbarVisibleInWorkspace |
|
110 |
||
111 |
"Created: / 14-07-2007 / 16:42:50 / cg" |
|
8486 | 112 |
! |
113 |
||
17054 | 114 |
filterTemplate |
115 |
^ |
|
116 |
'"/ general text filter; |
|
117 |
"/ the following block should evaluate to true for all lines |
|
118 |
"/ you want to KEEP. |
|
119 |
"/ Lines for which the block returns false, will be removed. |
|
120 |
"/ Beginner warning: Smalltalk know-how is useful here. |
|
121 |
||
122 |
[:line :lineNr :previousLine :nextLine| |
|
123 |
"/ any condition on line. |
|
124 |
"/ Notice, that line might be a Text object (i.e. non-string), |
|
125 |
"/ so you may want to use ''line string''. |
|
126 |
"/ |
|
127 |
"/ Useful queries on the line are: |
|
128 |
"/ - size the length of the line |
|
129 |
"/ - hasChangeOfEmphasis any bold, italic etc. |
|
130 |
"/ - startsWith:someString |
|
131 |
"/ - endsWith:someString |
|
132 |
"/ - includesString:someString |
|
133 |
"/ - pattern match: |
|
134 |
||
135 |
"/ example filters |
|
136 |
"/ |
|
137 |
"/ -------- removes all empty lines --------------- |
|
138 |
"/ |
|
139 |
"/ line size > 0 |
|
140 |
||
141 |
"/ -------- removes all lines which do not end with some suffix ---------- |
|
142 |
"/ |
|
143 |
"/ (line asLowercase endsWith:''foo'') not |
|
144 |
||
145 |
"/ -------- removes duplicates ---------- |
|
146 |
"/ |
|
147 |
"/ (line = nextLine) not |
|
148 |
||
17055 | 149 |
"/ -------- keep lines which start with some suffix ---------- |
150 |
"/ |
|
151 |
"/ (line asLowercase startsWith:''foo'') |
|
152 |
||
153 |
"/ -------- keep lines which include some substring ---------- |
|
154 |
"/ |
|
155 |
"/ (line asLowercase includesString:''foo'') |
|
156 |
||
17054 | 157 |
"/ dummy filter (keeps all lines) |
158 |
"/ |
|
159 |
true |
|
160 |
] |
|
161 |
'. |
|
162 |
! |
|
163 |
||
164 |
generatorTemplate |
|
165 |
^ |
|
166 |
'"/ general text generator; |
|
167 |
"/ the following block is called with a write stream argument |
|
168 |
"/ and the generated text is inserted at the current cursor position |
|
169 |
"/ or replaces the current selection. |
|
170 |
"/ Beginner warning: Smalltalk know-how is useful here. |
|
171 |
||
172 |
[:outputStream :selectedText | |
|
173 |
"/ example generators |
|
174 |
||
175 |
"/ -------- generates N empty lines --------------- |
|
176 |
"/ |
|
177 |
"/ |n| |
|
178 |
"/ n := Dialog requestNumber:''how many empty lines:''. |
|
179 |
"/ n timesRepeat:[ outputStream nextPutLine:'''' ]. |
|
180 |
||
181 |
"/ -------- generates a table of binary numbers |
|
182 |
"/ |
|
183 |
"/ |n| |
|
184 |
"/ n := Dialog requestNumber:''how many numbers:''. |
|
185 |
"/ 1 to:n do:[:i | outputStream nextPutLine:(i raisedTo:i) printString ]. |
|
186 |
] |
|
187 |
' |
|
188 |
! |
|
189 |
||
190 |
textProcessorTemplate |
|
191 |
^ |
|
192 |
'"/ general text processor; |
|
193 |
"/ the following block should evaluate to a new line, |
|
194 |
"/ given the original line as argument. |
|
195 |
"/ Beginner warning: Smalltalk know-how is useful here. |
|
196 |
||
197 |
[:line | |
|
198 |
"/ any processing on line. |
|
199 |
"/ Notice, that line might be a Text object (i.e. non-string), |
|
200 |
"/ |
|
201 |
"/ Useful operations on the line are: |
|
202 |
"/ - '' .... '' , concatenation of any prefix/suffix |
|
203 |
"/ - leftPaddedTo:size padding |
|
204 |
"/ - rightPaddedTo:size padding |
|
205 |
"/ - copyTo:(size min:N) |
|
206 |
"/ - asUppercase |
|
207 |
"/ - asLowercase |
|
208 |
"/ - withoutSeparators remove whiteSpace |
|
209 |
"/ - asCollectionOfWords words |
|
210 |
||
211 |
"/ makes everything bold |
|
212 |
"/ |
|
213 |
"/ line allBold |
|
214 |
||
215 |
"/ first word only |
|
216 |
"/ |
|
217 |
"/ line withoutSeparators asCollectionOfWords first |
|
218 |
||
219 |
"/ dummy filter (keeps all lines as-is) |
|
220 |
"/ |
|
221 |
line |
|
222 |
] |
|
223 |
' |
|
224 |
! |
|
225 |
||
8486 | 226 |
webServiceLinkName |
227 |
^ '/workspace' |
|
7825 | 228 |
! ! |
229 |
||
8708 | 230 |
!WorkspaceApplication class methodsFor:'help specs'! |
231 |
||
17881 | 232 |
helpSpec |
8708 | 233 |
<resource: #help> |
234 |
||
17881 | 235 |
^ super helpSpec addPairsFrom:#( |
8708 | 236 |
|
12479 | 237 |
#editCopy |
238 |
'Copy the selected text to the clipboard' |
|
239 |
||
240 |
#editCut |
|
241 |
'Cut the selected text to the clipboard' |
|
242 |
||
243 |
#editDelete |
|
244 |
'Delete the selected text' |
|
245 |
||
10169 | 246 |
#addTerminal |
10277 | 247 |
'Add a tab with an embedded console-terminal' |
248 |
||
249 |
#addTerminalWindows |
|
18554
1a0789b603da
#UI_ENHANCEMENT by cgexept.de
Claus Gittinger <cg@exept.de>
parents:
18553
diff
changeset
|
250 |
'Add a tab with an embedded console-terminal\(Windows users: ignore the no-echo bug, please)' |
10169 | 251 |
|
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
252 |
#lineAndColumnLabel |
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
253 |
'The text-cursor''s line and column number' |
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
254 |
|
9695 | 255 |
#columnLabel |
256 |
'The text-cursor''s column number' |
|
257 |
||
258 |
#lineLabel |
|
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
259 |
'The text-cursor''s line number. Double-click to change' |
9695 | 260 |
|
261 |
#modeLabel |
|
18846 | 262 |
'The editing mode (insert vs. overwrite).\Right-click to change' |
9695 | 263 |
|
8708 | 264 |
#editRedo |
8709 | 265 |
'Redo' |
8708 | 266 |
|
267 |
#doIndent |
|
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
268 |
'Indent (shift right)' |
8708 | 269 |
|
270 |
#doUndent |
|
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
271 |
'Undent (shift left)' |
8708 | 272 |
|
9676 | 273 |
#languageSelection |
15737
5f5dd0d93690
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15608
diff
changeset
|
274 |
'Syntax for doits, syntax checks and coloring. Right-click for menu to change' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
275 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
276 |
#namespaceSelection |
15737
5f5dd0d93690
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15608
diff
changeset
|
277 |
'Namespace for doits. Right-click for menu to change' |
9676 | 278 |
|
10169 | 279 |
#menuSave |
280 |
'Save the page''s contents in the original file' |
|
281 |
||
282 |
#menuSaveAs |
|
283 |
'Ask for a file and save the page''s contents there' |
|
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
284 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
285 |
#snippedPaste |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
286 |
'Paste the selected snippet''s text into the text' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
287 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
288 |
#snippedDefine |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
289 |
'Add the above definition to the list of snippets' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
290 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
291 |
#snippedRemove |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
292 |
'Remove the above selected snippet from the list of snippets' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
293 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
294 |
#snippedKey |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
295 |
'The key of the snippet. This is the abbreviation you will have to type before pressing Shift-Space' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
296 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
297 |
#snippedList |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
298 |
'The list of defined snippets.' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
299 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
300 |
#snippedText |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
301 |
'The text of the snippet. This is the text that will be inserted when pressing Shift-Space' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
302 |
|
8708 | 303 |
) |
9676 | 304 |
|
10277 | 305 |
"Modified: / 08-07-2011 / 08:29:51 / cg" |
18846 | 306 |
"Modified: / 26-06-2019 / 22:21:20 / Claus Gittinger" |
8708 | 307 |
! ! |
308 |
||
7931 | 309 |
!WorkspaceApplication class methodsFor:'interface specs'! |
310 |
||
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
311 |
manageSnippetsDialogSpec |
7931 | 312 |
"This resource specification was automatically generated |
313 |
by the UIPainter of ST/X." |
|
314 |
||
315 |
"Do not manually edit this!! If it is corrupted, |
|
316 |
the UIPainter may not be able to read the specification." |
|
317 |
||
318 |
" |
|
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
319 |
UIPainter new openOnClass:WorkspaceApplication andSelector:#manageSnippetsDialogSpec |
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
320 |
WorkspaceApplication new openInterface:#manageSnippetsDialogSpec |
7931 | 321 |
" |
322 |
||
323 |
<resource: #canvas> |
|
324 |
||
325 |
^ |
|
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
326 |
#(FullSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
327 |
name: manageSnippetsDialogSpec |
17743 | 328 |
uuid: '74513a6c-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
329 |
window: |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
330 |
(WindowSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
331 |
label: 'Manage Snippets' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
332 |
name: 'Manage Snippets' |
17743 | 333 |
uuid: '625f25a8-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
334 |
min: (Point 10 10) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
335 |
bounds: (Rectangle 0 0 379 590) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
336 |
menu: manageSnippetDialogMenuSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
337 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
338 |
component: |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
339 |
(SpecCollection |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
340 |
collection: ( |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
341 |
(LabelSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
342 |
label: 'Snippet:' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
343 |
name: 'Label1' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
344 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
17743 | 345 |
uuid: '625f28f0-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
346 |
translateLabel: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
347 |
adjust: left |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
348 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
349 |
(VariableVerticalPanelSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
350 |
name: 'VariableVerticalPanel1' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
351 |
layout: (LayoutFrame 0 0 30 0 0 1 -80 1) |
17743 | 352 |
uuid: '625f2bac-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
353 |
component: |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
354 |
(SpecCollection |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
355 |
collection: ( |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
356 |
(SequenceViewSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
357 |
name: 'List1' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
358 |
activeHelpKey: snippedList |
17743 | 359 |
uuid: '625f2e04-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
360 |
model: selectedSnippet |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
361 |
hasHorizontalScrollBar: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
362 |
hasVerticalScrollBar: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
363 |
useIndex: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
364 |
sequenceList: listOfSnippets |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
365 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
366 |
(ViewSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
367 |
name: 'Box1' |
17743 | 368 |
uuid: '625f3138-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
369 |
component: |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
370 |
(SpecCollection |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
371 |
collection: ( |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
372 |
(TextEditorSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
373 |
name: 'TextEditor1' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
374 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
375 |
activeHelpKey: snippedText |
17743 | 376 |
uuid: '625f32b4-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
377 |
model: selectedSnippetsText |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
378 |
hasHorizontalScrollBar: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
379 |
hasVerticalScrollBar: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
380 |
acceptChannel: snippetTextAcceptHolder |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
381 |
modifiedChannel: snippetTextModified |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
382 |
hasKeyboardFocusInitially: false |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
383 |
viewClassName: '' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
384 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
385 |
(LabelSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
386 |
label: 'Snippet Key:' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
387 |
name: 'Label2' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
388 |
layout: (LayoutFrame 0 0 2 0 100 0 28 0) |
17743 | 389 |
uuid: '625f35ca-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
390 |
translateLabel: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
391 |
adjust: left |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
392 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
393 |
(InputFieldSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
394 |
name: 'EntryField1' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
395 |
layout: (LayoutFrame 100 0.0 2 0 0 1.0 28 0) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
396 |
activeHelpKey: snippedKey |
17743 | 397 |
uuid: '625f37aa-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
398 |
model: selectedSnippetsKeyHolder |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
399 |
immediateAccept: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
400 |
acceptOnReturn: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
401 |
acceptOnTab: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
402 |
acceptOnPointerLeave: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
403 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
404 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
405 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
406 |
) |
7931 | 407 |
) |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
408 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
409 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
410 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
411 |
handles: (Any 0.5 1.0) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
412 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
413 |
(HorizontalPanelViewSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
414 |
name: 'ButtonPanel' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
415 |
layout: (LayoutFrame 0 0 -70 1 0 1 -40 1) |
17743 | 416 |
uuid: '625f3b38-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
417 |
horizontalLayout: center |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
418 |
verticalLayout: center |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
419 |
horizontalSpace: 3 |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
420 |
verticalSpace: 3 |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
421 |
component: |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
422 |
(SpecCollection |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
423 |
collection: ( |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
424 |
(ActionButtonSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
425 |
label: 'Define' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
426 |
name: 'DefineButton' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
427 |
activeHelpKey: snippedDefine |
17743 | 428 |
uuid: '625f3d90-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
429 |
translateLabel: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
430 |
model: defineSelectedSnippet |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
431 |
enableChannel: defineEnabled |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
432 |
extent: (Point 125 22) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
433 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
434 |
(ActionButtonSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
435 |
label: 'Remove' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
436 |
name: 'RemoveButton' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
437 |
activeHelpKey: snippedRemove |
17743 | 438 |
uuid: '625f402e-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
439 |
translateLabel: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
440 |
model: removeSelectedSnippet |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
441 |
enableChannel: removeEnabled |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
442 |
extent: (Point 125 22) |
8286 | 443 |
) |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
444 |
(ActionButtonSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
445 |
label: 'Paste' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
446 |
name: 'PasteButton' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
447 |
activeHelpKey: snippedPaste |
17743 | 448 |
uuid: '625f4222-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
449 |
translateLabel: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
450 |
model: pasteSelectedSnippet |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
451 |
enableChannel: pasteEnabled |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
452 |
extent: (Point 125 22) |
7931 | 453 |
) |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
454 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
455 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
456 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
457 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
458 |
(DividerSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
459 |
name: 'Separator1' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
460 |
layout: (LayoutFrame 0 0.0 557 0 0 1.0 561 0) |
17743 | 461 |
uuid: '625f443e-c5a3-11e7-82f7-c42c033b4871' |
7931 | 462 |
) |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
463 |
(HorizontalPanelViewSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
464 |
name: 'CloseButtonPanel' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
465 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
17743 | 466 |
uuid: '625f4600-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
467 |
horizontalLayout: fitSpace |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
468 |
verticalLayout: center |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
469 |
horizontalSpace: 3 |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
470 |
verticalSpace: 3 |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
471 |
reverseOrderIfOKAtLeft: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
472 |
component: |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
473 |
(SpecCollection |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
474 |
collection: ( |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
475 |
(ActionButtonSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
476 |
label: 'Close' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
477 |
name: 'Button1' |
17743 | 478 |
uuid: '625f47c2-c5a3-11e7-82f7-c42c033b4871' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
479 |
translateLabel: true |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
480 |
model: cancel |
17743 | 481 |
extent: (Point 371 22) |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
482 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
483 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
484 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
485 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
486 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
487 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
488 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
489 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
490 |
) |
9381 | 491 |
! |
492 |
||
10169 | 493 |
toolBarSpec |
494 |
"This resource specification was automatically generated |
|
495 |
by the UIPainter of ST/X." |
|
496 |
||
497 |
"Do not manually edit this!! If it is corrupted, |
|
498 |
the UIPainter may not be able to read the specification." |
|
499 |
||
500 |
" |
|
501 |
UIPainter new openOnClass:WorkspaceApplication andSelector:#toolBarSpec |
|
502 |
WorkspaceApplication new openInterface:#toolBarSpec |
|
503 |
" |
|
504 |
||
505 |
<resource: #canvas> |
|
506 |
||
507 |
^ |
|
17743 | 508 |
#(FullSpec |
509 |
name: toolBarSpec |
|
510 |
uuid: '5fe89e08-c5a3-11e7-82f7-c42c033b4871' |
|
511 |
window: |
|
512 |
(WindowSpec |
|
513 |
label: 'Toolbar' |
|
514 |
name: 'Toolbar' |
|
515 |
uuid: '5fe8a2fe-c5a3-11e7-82f7-c42c033b4871' |
|
516 |
min: (Point 10 10) |
|
517 |
bounds: (Rectangle 0 0 728 48) |
|
518 |
) |
|
519 |
component: |
|
520 |
(SpecCollection |
|
521 |
collection: ( |
|
522 |
(MenuPanelSpec |
|
523 |
name: 'ToolBarMenu' |
|
524 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
525 |
uuid: '5fe8a6be-c5a3-11e7-82f7-c42c033b4871' |
|
526 |
level: 0 |
|
527 |
visibilityChannel: toolBarVisibleHolder |
|
528 |
menu: toolBarMenu |
|
529 |
textDefault: true |
|
10169 | 530 |
) |
17743 | 531 |
) |
532 |
||
533 |
) |
|
534 |
) |
|
10169 | 535 |
! |
536 |
||
9381 | 537 |
windowSpec |
538 |
"This resource specification was automatically generated |
|
539 |
by the UIPainter of ST/X." |
|
540 |
||
541 |
"Do not manually edit this!! If it is corrupted, |
|
542 |
the UIPainter may not be able to read the specification." |
|
543 |
||
544 |
" |
|
545 |
UIPainter new openOnClass:WorkspaceApplication andSelector:#windowSpec |
|
546 |
WorkspaceApplication new openInterface:#windowSpec |
|
547 |
WorkspaceApplication open |
|
548 |
" |
|
549 |
||
550 |
<resource: #canvas> |
|
551 |
||
552 |
^ |
|
15890 | 553 |
#(FullSpec |
554 |
name: windowSpec |
|
17743 | 555 |
uuid: '99c04dd0-c5a1-11e7-82f7-c42c033b4871' |
15890 | 556 |
window: |
557 |
(WindowSpec |
|
558 |
label: 'Workspace' |
|
559 |
name: 'Workspace' |
|
17743 | 560 |
uuid: '99c05262-c5a1-11e7-82f7-c42c033b4871' |
15890 | 561 |
min: (Point 10 10) |
562 |
bounds: (Rectangle 0 0 640 480) |
|
563 |
menu: mainMenu |
|
564 |
) |
|
565 |
component: |
|
566 |
(SpecCollection |
|
567 |
collection: ( |
|
568 |
(ViewSpec |
|
569 |
name: 'ToolBar' |
|
570 |
layout: (LayoutFrame 0 0 0 0 0 1 32 0) |
|
17743 | 571 |
uuid: '99c055e6-c5a1-11e7-82f7-c42c033b4871' |
15890 | 572 |
level: #'application.toolbarLevel' |
573 |
visibilityChannel: toolBarVisibleHolder |
|
574 |
component: |
|
575 |
(SpecCollection |
|
576 |
collection: ( |
|
577 |
(ActionButtonSpec |
|
578 |
label: 'hideToolBarIcon' |
|
579 |
name: 'HideToolBarButton' |
|
580 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
581 |
activeHelpKey: hideToolBar |
|
17743 | 582 |
uuid: '99c05834-c5a1-11e7-82f7-c42c033b4871' |
15890 | 583 |
hasCharacterOrientedLabel: false |
584 |
translateLabel: true |
|
585 |
model: hideToolbar |
|
586 |
postBuildCallback: hideToolBarButtonCreated: |
|
587 |
) |
|
588 |
(NonScrollableArbitraryComponentSpec |
|
589 |
name: 'ToolBarView' |
|
590 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
17743 | 591 |
uuid: '99c05ba4-c5a1-11e7-82f7-c42c033b4871' |
15890 | 592 |
visibilityChannel: toolBarVisibleHolder |
593 |
component: toolBarView |
|
9381 | 594 |
) |
15890 | 595 |
) |
596 |
||
597 |
) |
|
598 |
) |
|
599 |
(ViewSpec |
|
600 |
name: 'EditToolBar' |
|
601 |
layout: (LayoutFrame 0 0 32 0 0 1 64 0) |
|
17743 | 602 |
uuid: '99c05eba-c5a1-11e7-82f7-c42c033b4871' |
15890 | 603 |
visibilityChannel: editToolBarVisibleHolder |
604 |
component: |
|
605 |
(SpecCollection |
|
606 |
collection: ( |
|
607 |
(ActionButtonSpec |
|
608 |
label: 'hideToolBarIcon' |
|
609 |
name: 'HideEditToolBarButton' |
|
610 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
611 |
activeHelpKey: hideEditToolBar |
|
17743 | 612 |
uuid: '99c06040-c5a1-11e7-82f7-c42c033b4871' |
15890 | 613 |
hasCharacterOrientedLabel: false |
614 |
translateLabel: true |
|
615 |
model: hideEditToolbar |
|
616 |
postBuildCallback: hideToolBarButtonCreated: |
|
617 |
) |
|
618 |
(MenuPanelSpec |
|
619 |
name: 'EditToolBar1' |
|
620 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
17743 | 621 |
uuid: '99c06284-c5a1-11e7-82f7-c42c033b4871' |
15890 | 622 |
visibilityChannel: editToolBarVisibleHolder |
623 |
menu: editToolBarMenu |
|
624 |
textDefault: true |
|
9381 | 625 |
) |
15890 | 626 |
) |
627 |
||
628 |
) |
|
9381 | 629 |
) |
15890 | 630 |
(NoteBookViewSpec |
631 |
name: 'NoteBook' |
|
632 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -26 1.0) |
|
17743 | 633 |
uuid: '99c064f0-c5a1-11e7-82f7-c42c033b4871' |
15890 | 634 |
model: selectedWorkspaceIndexHolder |
635 |
menu: tabList |
|
636 |
useIndex: true |
|
637 |
accessTabMenuAction: tabMenuAt: |
|
638 |
translateLabel: true |
|
639 |
destroyTabAction: destroyTab: |
|
640 |
canvas: workspaceHolder |
|
641 |
canvasInset: 0 |
|
642 |
keepCanvasAlive: true |
|
643 |
tabLevel: 1 |
|
644 |
) |
|
645 |
(UISubSpecification |
|
646 |
name: 'infoBarSubSpec' |
|
647 |
layout: (LayoutFrame 0 0.0 -26 1 -16 1.0 0 1.0) |
|
17743 | 648 |
uuid: '99c0682e-c5a1-11e7-82f7-c42c033b4871' |
15890 | 649 |
level: #'infobar.level' |
650 |
visibilityChannel: infoVisibleHolder |
|
651 |
majorKey: WorkspaceApplication |
|
652 |
minorKey: windowSpecForInfoBar |
|
653 |
keepSpaceForOSXResizeHandleH: true |
|
654 |
) |
|
655 |
) |
|
656 |
||
657 |
) |
|
658 |
) |
|
9381 | 659 |
! |
660 |
||
661 |
windowSpecForInfoBar |
|
662 |
"This resource specification was automatically generated |
|
663 |
by the UIPainter of ST/X." |
|
664 |
||
665 |
"Do not manually edit this!! If it is corrupted, |
|
666 |
the UIPainter may not be able to read the specification." |
|
667 |
||
668 |
" |
|
669 |
UIPainter new openOnClass:WorkspaceApplication andSelector:#windowSpecForInfoBar |
|
670 |
WorkspaceApplication new openInterface:#windowSpecForInfoBar |
|
671 |
" |
|
672 |
||
673 |
<resource: #canvas> |
|
674 |
||
675 |
^ |
|
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
676 |
#(FullSpec |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
677 |
name: windowSpecForInfoBar |
17743 | 678 |
uuid: '5d3254b0-c5a3-11e7-82f7-c42c033b4871' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
679 |
window: |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
680 |
(WindowSpec |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
681 |
label: 'Info Bar' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
682 |
name: 'Info Bar' |
17743 | 683 |
uuid: '5d3258ca-c5a3-11e7-82f7-c42c033b4871' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
684 |
bounds: (Rectangle 0 0 473 30) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
685 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
686 |
component: |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
687 |
(SpecCollection |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
688 |
collection: ( |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
689 |
(ViewSpec |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
690 |
name: 'infoView' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
691 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
17743 | 692 |
uuid: '5d325ba4-c5a3-11e7-82f7-c42c033b4871' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
693 |
component: |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
694 |
(SpecCollection |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
695 |
collection: ( |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
696 |
(LabelSpec |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
697 |
name: 'infoLabel' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
698 |
layout: (LayoutFrame 0 0.0 0 0.0 -220 1.0 0 1.0) |
17743 | 699 |
uuid: '5d325d98-c5a3-11e7-82f7-c42c033b4871' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
700 |
level: -1 |
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
701 |
translateLabel: true |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
702 |
labelChannel: infoLabelHolder |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
703 |
resizeForLabel: false |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
704 |
adjust: left |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
705 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
706 |
(LabelSpec |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
707 |
name: 'namespaceInfoLabelHolder' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
708 |
layout: (LayoutFrame -220 1.0 0 0.0 -136 1.0 0 1.0) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
709 |
activeHelpKey: namespaceSelection |
17743 | 710 |
uuid: '5d325ffa-c5a3-11e7-82f7-c42c033b4871' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
711 |
level: -1 |
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
712 |
translateLabel: true |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
713 |
labelChannel: namespaceInfoLabelHolder |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
714 |
resizeForLabel: false |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
715 |
adjust: left |
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
716 |
menu: namespaceInfoLabelMenuHolder |
9381 | 717 |
) |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
718 |
(LabelSpec |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
719 |
name: 'LanguageLabel' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
720 |
layout: (LayoutFrame -136 1.0 0 0.0 -65 1.0 0 1.0) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
721 |
activeHelpKey: languageSelection |
17743 | 722 |
uuid: '5d3261bc-c5a3-11e7-82f7-c42c033b4871' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
723 |
level: -1 |
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
724 |
translateLabel: true |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
725 |
labelChannel: languageInfoLabelHolder |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
726 |
resizeForLabel: false |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
727 |
adjust: left |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
728 |
menu: languageInfoLabelMenu |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
729 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
730 |
(LabelSpec |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
731 |
name: 'ModeLabel' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
732 |
layout: (LayoutFrame -65 1 0 0.0 -50 1 0 1.0) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
733 |
activeHelpKey: modeLabel |
17743 | 734 |
uuid: '5d32636a-c5a3-11e7-82f7-c42c033b4871' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
735 |
level: -1 |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
736 |
translateLabel: true |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
737 |
labelChannel: modeLabelHolder |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
738 |
postBuildCallback: postBuildEditModeInfoLabel: |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
739 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
740 |
(LabelSpec |
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
741 |
name: 'CursorLineAndColLabel' |
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
742 |
layout: (LayoutFrame -50 1 0 0.0 0 1 0 1.0) |
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
743 |
activeHelpKey: lineAndColumnLabel |
17743 | 744 |
uuid: '5d326522-c5a3-11e7-82f7-c42c033b4871' |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
745 |
level: -1 |
17743 | 746 |
translateLabel: true |
15817
f6046130309e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15816
diff
changeset
|
747 |
labelChannel: cursorLineAndColumnLabelHolder |
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
748 |
adjust: left |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
749 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
750 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
751 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
752 |
) |
9381 | 753 |
) |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
754 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
755 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
756 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
757 |
) |
7931 | 758 |
! ! |
759 |
||
3154 | 760 |
!WorkspaceApplication class methodsFor:'menu specs'! |
761 |
||
10169 | 762 |
bufferAddMenuSlice |
763 |
"This resource specification was automatically generated |
|
764 |
by the MenuEditor of ST/X." |
|
765 |
||
766 |
"Do not manually edit this!! If it is corrupted, |
|
767 |
the MenuEditor may not be able to read the specification." |
|
768 |
||
13852 | 769 |
|
10169 | 770 |
" |
771 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#bufferAddMenuSlice |
|
772 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication bufferAddMenuSlice)) startUp |
|
773 |
" |
|
774 |
||
775 |
<resource: #menu> |
|
776 |
||
13852 | 777 |
^ |
10169 | 778 |
#(Menu |
13852 | 779 |
( |
780 |
(MenuItem |
|
781 |
label: 'Terminal' |
|
782 |
itemValue: addTerminal |
|
783 |
translateLabel: true |
|
784 |
) |
|
785 |
(MenuItem |
|
786 |
label: 'Web Browser' |
|
787 |
itemValue: addWebBrowser |
|
788 |
translateLabel: true |
|
789 |
isVisible: isWebBrowserAvailable |
|
790 |
) |
|
791 |
(MenuItem |
|
792 |
enabled: isSQLWorkspaceAvailable |
|
793 |
label: 'SQL Workspace' |
|
794 |
itemValue: addSQLWorkspace |
|
795 |
translateLabel: true |
|
796 |
) |
|
797 |
(MenuItem |
|
798 |
label: 'Tea Timer' |
|
799 |
itemValue: addTeaTimer |
|
800 |
translateLabel: true |
|
801 |
) |
|
802 |
(MenuItem |
|
12032
37dea732aec1
changed: #bufferAddMenuSlice
Claus Gittinger <cg@exept.de>
parents:
12028
diff
changeset
|
803 |
label: 'Stopwatch' |
13852 | 804 |
itemValue: addStopWatch |
805 |
translateLabel: true |
|
806 |
) |
|
807 |
) |
|
808 |
nil |
|
809 |
nil |
|
10169 | 810 |
) |
811 |
! |
|
812 |
||
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
813 |
bufferMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
814 |
"This resource specification was automatically generated |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
815 |
by the MenuEditor of ST/X." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
816 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
817 |
"Do not manually edit this!! If it is corrupted, |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
818 |
the MenuEditor may not be able to read the specification." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
819 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
820 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
821 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#bufferMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
822 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication bufferMenu)) startUp |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
823 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
824 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
825 |
<resource: #menu> |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
826 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
827 |
^ |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
828 |
#(Menu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
829 |
( |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
830 |
(MenuItem |
18395 | 831 |
label: 'Add Page' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
832 |
itemValue: addWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
833 |
translateLabel: true |
10169 | 834 |
shortcutKey: Ctrlt |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
835 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
836 |
(MenuItem |
18395 | 837 |
label: 'Add Page with same Contents' |
17719 | 838 |
itemValue: addWorkspaceWithSameContents |
839 |
translateLabel: true |
|
840 |
) |
|
841 |
(MenuItem |
|
8111 | 842 |
label: '-' |
843 |
isVisible: thisIsASmalltalkWorkspace |
|
844 |
) |
|
845 |
(MenuItem |
|
18395 | 846 |
label: 'Add Page on MyWorkspace' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
847 |
itemValue: addMyWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
848 |
translateLabel: true |
7866 | 849 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
850 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
851 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
852 |
enabled: anyWorkspaceVariableIsDefined |
18395 | 853 |
label: 'Add Page on Workspace Variables' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
854 |
itemValue: addWorkspaceVariableInspector |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
855 |
translateLabel: true |
7866 | 856 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
857 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
858 |
(MenuItem |
18395 | 859 |
label: 'Add Page on Global Variables' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
860 |
itemValue: addGlobalVariableInspector |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
861 |
translateLabel: true |
7866 | 862 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
863 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
864 |
(MenuItem |
18395 | 865 |
label: 'Add Page on Namespace...' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
866 |
itemValue: addNamespaceInspector |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
867 |
translateLabel: true |
7866 | 868 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
869 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
870 |
(MenuItem |
18395 | 871 |
label: 'Add Page on SharedPool...' |
7944
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
872 |
itemValue: addSharedPoolInspector |
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
873 |
translateLabel: true |
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
874 |
isVisible: thisIsASmalltalkWorkspace |
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
875 |
) |
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
876 |
(MenuItem |
18395 | 877 |
label: 'Add Page on Class Variables' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
878 |
itemValue: addClassVariableInspector |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
879 |
translateLabel: true |
7866 | 880 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
881 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
882 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
883 |
label: '-' |
7866 | 884 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
885 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
886 |
(MenuItem |
18395 | 887 |
label: 'Add Evaluation Page' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
888 |
itemValue: addEvaluationWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
889 |
translateLabel: true |
7866 | 890 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
891 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
892 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
893 |
label: '-' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
894 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
895 |
(MenuItem |
10169 | 896 |
label: 'Menu Slice' |
8111 | 897 |
translateLabel: true |
10169 | 898 |
submenuChannel: bufferAddMenuSlice |
899 |
isMenuSlice: true |
|
8111 | 900 |
) |
901 |
(MenuItem |
|
902 |
label: '-' |
|
903 |
) |
|
904 |
(MenuItem |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
905 |
label: 'Rename...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
906 |
itemValue: renameWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
907 |
translateLabel: true |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
908 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
909 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
910 |
label: '-' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
911 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
912 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
913 |
enabled: canRemoveWorkspace |
18395 | 914 |
label: 'Remove Page' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
915 |
itemValue: removeWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
916 |
translateLabel: true |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
917 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
918 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
919 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
920 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
921 |
) |
17719 | 922 |
|
923 |
"Modified: / 22-10-2017 / 20:38:32 / cg" |
|
18395 | 924 |
"Modified: / 21-09-2018 / 10:57:30 / Claus Gittinger" |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
925 |
! |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
926 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
927 |
editMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
928 |
"This resource specification was automatically generated |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
929 |
by the MenuEditor of ST/X." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
930 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
931 |
"Do not manually edit this!! If it is corrupted, |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
932 |
the MenuEditor may not be able to read the specification." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
933 |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
934 |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
935 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
936 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#editMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
937 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication editMenu)) startUp |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
938 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
939 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
940 |
<resource: #menu> |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
941 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
942 |
^ |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
943 |
#(Menu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
944 |
( |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
945 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
946 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
947 |
label: 'Cut' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
948 |
itemValue: cutSelection |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
949 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
950 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
951 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
952 |
label: 'Copy' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
953 |
itemValue: copySelection |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
954 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
955 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
956 |
label: 'Paste' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
957 |
itemValue: paste |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
958 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
959 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
960 |
enabled: hasHistory |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
961 |
label: 'Paste Last' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
962 |
itemValue: pasteLastDoIt |
8492 | 963 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
964 |
submenuChannel: pasteRecentDoItMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
965 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
966 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
967 |
label: '-' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
968 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
969 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
970 |
enabled: hasSelectionInActiveWorkspace |
13500 | 971 |
label: 'Copy as Snippet...' |
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
972 |
itemValue: addSelectionToSnippets |
7931 | 973 |
) |
974 |
(MenuItem |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
975 |
enabled: selectedWorkspaceIsTextView |
13500 | 976 |
label: 'Paste Snippet...' |
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
977 |
itemValue: pasteSnippet |
7931 | 978 |
) |
979 |
(MenuItem |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
980 |
enabled: selectedWorkspaceIsTextView |
13500 | 981 |
label: 'Manage Snippets...' |
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
982 |
itemValue: manageSnippets |
7931 | 983 |
) |
984 |
(MenuItem |
|
985 |
label: '-' |
|
986 |
) |
|
987 |
(MenuItem |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
988 |
label: 'Select All' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
989 |
itemValue: selectAll |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
990 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
991 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
992 |
label: '-' |
8134
e2d9bc2a289e
smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8133
diff
changeset
|
993 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
994 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
995 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
996 |
enabled: selectedWorkspaceIsTextView |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
997 |
label: 'Filter Text...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
998 |
itemValue: filterText |
8134
e2d9bc2a289e
smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8133
diff
changeset
|
999 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1000 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1001 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1002 |
enabled: selectedWorkspaceIsTextView |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1003 |
label: 'Process Text...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1004 |
itemValue: processText |
8134
e2d9bc2a289e
smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8133
diff
changeset
|
1005 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1006 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1007 |
(MenuItem |
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
1008 |
label: 'Generate Text...' |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
1009 |
itemValue: generateText |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
1010 |
) |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
1011 |
(MenuItem |
11496 | 1012 |
label: 'Compare Text Against...' |
1013 |
itemValue: compareTextAgainst |
|
1014 |
) |
|
1015 |
(MenuItem |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1016 |
label: '-' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1017 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1018 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1019 |
label: 'Services' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1020 |
submenu: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1021 |
(Menu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1022 |
( |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1023 |
(MenuItem |
18055 | 1024 |
isVisible: autoFetchSelectionMenuItemVisible |
9632 | 1025 |
label: 'Autofetch Selection' |
11627 | 1026 |
hideMenuOnActivated: false |
18055 | 1027 |
indication: autoFetchSelectionHolder |
9632 | 1028 |
) |
1029 |
(MenuItem |
|
18055 | 1030 |
isVisible: autoFetchSelectionMenuItemVisible |
11627 | 1031 |
enabled: autoFetchSelection |
1032 |
label: 'Insert as Line (Append CR)' |
|
1033 |
hideMenuOnActivated: false |
|
9735 | 1034 |
indication: autoFetchSelectionLines |
1035 |
) |
|
1036 |
(MenuItem |
|
9632 | 1037 |
label: '-' |
18055 | 1038 |
isVisible: thisIsASmalltalkWorkspaceAndAutoFetchMenuItemVisible |
9632 | 1039 |
) |
1040 |
(MenuItem |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1041 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1042 |
label: 'Google Spell' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1043 |
itemValue: googleSpellingSuggestion |
7876 | 1044 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1045 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1046 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1047 |
enabled: hasSelectionInActiveWorkspace |
9632 | 1048 |
label: 'Translate (babelFish)' |
7876 | 1049 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1050 |
submenu: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1051 |
(Menu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1052 |
( |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1053 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1054 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1055 |
label: 'English -> German' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1056 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1057 |
argument: 'en_de' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1058 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1059 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1060 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1061 |
label: 'English -> French' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1062 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1063 |
argument: 'en_fr' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1064 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1065 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1066 |
enabled: hasSelectionInActiveWorkspace |
19403 | 1067 |
label: 'English -> Italian' |
1068 |
itemValue: babelFishTranslate: |
|
1069 |
argument: 'en_it' |
|
1070 |
) |
|
1071 |
(MenuItem |
|
1072 |
enabled: hasSelectionInActiveWorkspace |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1073 |
label: 'English -> Spanish' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1074 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1075 |
argument: 'en_es' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1076 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1077 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1078 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1079 |
label: 'English -> Portuguese' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1080 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1081 |
argument: 'en_pt' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1082 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1083 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1084 |
label: '-' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1085 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1086 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1087 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1088 |
label: 'German -> English' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1089 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1090 |
argument: 'de_en' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1091 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1092 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1093 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1094 |
label: 'French -> English' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1095 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1096 |
argument: 'fr_en' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1097 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1098 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1099 |
enabled: hasSelectionInActiveWorkspace |
19403 | 1100 |
label: 'Italian -> English' |
1101 |
itemValue: babelFishTranslate: |
|
1102 |
argument: 'it_en' |
|
1103 |
) |
|
1104 |
(MenuItem |
|
1105 |
enabled: hasSelectionInActiveWorkspace |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1106 |
label: 'Spanish -> English' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1107 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1108 |
argument: 'es_en' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1109 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1110 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1111 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1112 |
label: 'Portuguese -> English' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1113 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1114 |
argument: 'pt_en' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1115 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1116 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1117 |
enabled: hasSelectionInActiveWorkspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1118 |
label: 'Russian -> English' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1119 |
itemValue: babelFishTranslate: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1120 |
argument: 'ru_en' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1121 |
) |
19403 | 1122 |
(MenuItem |
1123 |
label: '-' |
|
1124 |
) |
|
1125 |
(MenuItem |
|
1126 |
enabled: hasSelectionInActiveWorkspace |
|
19435 | 1127 |
label: 'any -> English' |
1128 |
itemValue: babelFishTranslate: |
|
1129 |
argument: 'auto_en' |
|
1130 |
) |
|
1131 |
(MenuItem |
|
1132 |
enabled: hasSelectionInActiveWorkspace |
|
19403 | 1133 |
label: 'any -> German' |
1134 |
itemValue: babelFishTranslate: |
|
1135 |
argument: 'auto_de' |
|
1136 |
) |
|
1137 |
(MenuItem |
|
1138 |
enabled: hasSelectionInActiveWorkspace |
|
1139 |
label: 'any -> French' |
|
1140 |
itemValue: babelFishTranslate: |
|
1141 |
argument: 'auto_fr' |
|
1142 |
) |
|
1143 |
(MenuItem |
|
1144 |
enabled: hasSelectionInActiveWorkspace |
|
1145 |
label: 'any -> Italian' |
|
1146 |
itemValue: babelFishTranslate: |
|
1147 |
argument: 'auto_it' |
|
1148 |
) |
|
1149 |
(MenuItem |
|
1150 |
enabled: hasSelectionInActiveWorkspace |
|
1151 |
label: 'any -> Spanish' |
|
1152 |
itemValue: babelFishTranslate: |
|
1153 |
argument: 'auto_es' |
|
1154 |
) |
|
1155 |
(MenuItem |
|
1156 |
enabled: hasSelectionInActiveWorkspace |
|
1157 |
label: 'any -> Portuguese' |
|
1158 |
itemValue: babelFishTranslate: |
|
1159 |
argument: 'auto_pt' |
|
1160 |
) |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1161 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1162 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1163 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1164 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1165 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1166 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1167 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1168 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1169 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1170 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1171 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1172 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1173 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1174 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1175 |
! |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1176 |
|
9695 | 1177 |
editModeInfoLabelMenu |
1178 |
"This resource specification was automatically generated |
|
1179 |
by the MenuEditor of ST/X." |
|
1180 |
||
1181 |
"Do not manually edit this!! If it is corrupted, |
|
1182 |
the MenuEditor may not be able to read the specification." |
|
1183 |
||
1184 |
" |
|
1185 |
MenuEditor new openOnClass:Tools::NewSystemBrowser andSelector:#editModeInfoLabelMenu |
|
1186 |
(Menu new fromLiteralArrayEncoding:(Tools::NewSystemBrowser editModeInfoLabelMenu)) startUp |
|
1187 |
" |
|
1188 |
||
1189 |
<resource: #menu> |
|
1190 |
||
1191 |
^ |
|
1192 |
#(Menu |
|
1193 |
( |
|
1194 |
(MenuItem |
|
1195 |
label: 'Insert' |
|
1196 |
itemValue: editModeInsert |
|
1197 |
translateLabel: true |
|
1198 |
) |
|
1199 |
(MenuItem |
|
1200 |
label: 'Overwrite' |
|
1201 |
itemValue: editModeOverwrite |
|
1202 |
translateLabel: true |
|
1203 |
) |
|
1204 |
(MenuItem |
|
1205 |
label: 'Insert Selecting' |
|
1206 |
itemValue: editModeInsertAndSelect |
|
1207 |
translateLabel: true |
|
1208 |
) |
|
1209 |
) |
|
1210 |
nil |
|
1211 |
nil |
|
1212 |
) |
|
1213 |
||
1214 |
"Created: / 22-01-2011 / 11:50:05 / cg" |
|
1215 |
! |
|
1216 |
||
8499 | 1217 |
editToolBarMenu |
1218 |
"This resource specification was automatically generated |
|
1219 |
by the MenuEditor of ST/X." |
|
1220 |
||
1221 |
"Do not manually edit this!! If it is corrupted, |
|
1222 |
the MenuEditor may not be able to read the specification." |
|
1223 |
||
1224 |
" |
|
1225 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#editToolBarMenu |
|
1226 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication editToolBarMenu)) startUp |
|
1227 |
" |
|
1228 |
||
1229 |
<resource: #menu> |
|
1230 |
||
1231 |
^ |
|
1232 |
#(Menu |
|
1233 |
( |
|
1234 |
(MenuItem |
|
8506 | 1235 |
activeHelpKey: editCut |
8499 | 1236 |
label: 'Cut' |
1237 |
itemValue: cutSelection |
|
1238 |
translateLabel: true |
|
8508 | 1239 |
labelImage: (ResourceRetriever ToolbarIconLibrary cut16x16Icon) |
8499 | 1240 |
isButton: true |
1241 |
) |
|
1242 |
(MenuItem |
|
8506 | 1243 |
activeHelpKey: editCopy |
8499 | 1244 |
label: 'Copy' |
1245 |
itemValue: copySelection |
|
1246 |
translateLabel: true |
|
1247 |
labelImage: (ResourceRetriever ToolbarIconLibrary copy16x16Icon) |
|
1248 |
isButton: true |
|
1249 |
) |
|
1250 |
(MenuItem |
|
8506 | 1251 |
activeHelpKey: editPaste |
8499 | 1252 |
label: 'Paste' |
1253 |
itemValue: paste |
|
1254 |
translateLabel: true |
|
1255 |
labelImage: (ResourceRetriever ToolbarIconLibrary paste16x16Icon) |
|
1256 |
isButton: true |
|
1257 |
) |
|
1258 |
(MenuItem |
|
1259 |
label: '-' |
|
1260 |
) |
|
1261 |
(MenuItem |
|
8508 | 1262 |
activeHelpKey: editUndo |
1263 |
label: 'Undo' |
|
1264 |
itemValue: undo |
|
1265 |
translateLabel: true |
|
1266 |
labelImage: (ResourceRetriever ToolbarIconLibrary undo16x16Icon) |
|
1267 |
isButton: true |
|
1268 |
) |
|
1269 |
(MenuItem |
|
1270 |
activeHelpKey: editRedo |
|
1271 |
label: 'Redo' |
|
1272 |
itemValue: redo |
|
1273 |
translateLabel: true |
|
1274 |
labelImage: (ResourceRetriever ToolbarIconLibrary redo16x16Icon) |
|
1275 |
isButton: true |
|
1276 |
) |
|
1277 |
(MenuItem |
|
1278 |
label: '-' |
|
1279 |
) |
|
1280 |
(MenuItem |
|
8506 | 1281 |
activeHelpKey: editSearch |
8499 | 1282 |
label: 'Search' |
1283 |
itemValue: search |
|
1284 |
translateLabel: true |
|
1285 |
labelImage: (ResourceRetriever ToolbarIconLibrary search16x16Icon) |
|
1286 |
isButton: true |
|
1287 |
) |
|
1288 |
(MenuItem |
|
1289 |
label: '-' |
|
1290 |
) |
|
1291 |
(MenuItem |
|
8508 | 1292 |
activeHelpKey: doUndent |
1293 |
label: 'Undent' |
|
1294 |
itemValue: undent |
|
1295 |
translateLabel: true |
|
1296 |
isButton: true |
|
1297 |
labelImage: (ResourceRetriever ToolbarIconLibrary undent16x16Icon) |
|
1298 |
) |
|
1299 |
(MenuItem |
|
8506 | 1300 |
activeHelpKey: doIndent |
8499 | 1301 |
label: 'Indent' |
1302 |
itemValue: indent |
|
1303 |
translateLabel: true |
|
1304 |
isButton: true |
|
1305 |
labelImage: (ResourceRetriever ToolbarIconLibrary indent16x16Icon) |
|
1306 |
) |
|
1307 |
) |
|
1308 |
nil |
|
1309 |
nil |
|
1310 |
) |
|
1311 |
! |
|
1312 |
||
8342 | 1313 |
executionMenu |
1314 |
"This resource specification was automatically generated |
|
1315 |
by the MenuEditor of ST/X." |
|
1316 |
||
1317 |
"Do not manually edit this!! If it is corrupted, |
|
1318 |
the MenuEditor may not be able to read the specification." |
|
1319 |
||
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1320 |
|
8342 | 1321 |
" |
8492 | 1322 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#executionMenu |
1323 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication executionMenu)) startUp |
|
8342 | 1324 |
" |
1325 |
||
1326 |
<resource: #menu> |
|
1327 |
||
1328 |
^ |
|
1329 |
#(Menu |
|
1330 |
( |
|
1331 |
(MenuItem |
|
1332 |
enabled: hasHistory |
|
1333 |
label: 'Redo Last' |
|
1334 |
itemValue: redoLastDoIt |
|
1335 |
submenuChannel: redoRecentDoItMenu |
|
1336 |
) |
|
1337 |
(MenuItem |
|
1338 |
label: '-' |
|
1339 |
) |
|
1340 |
(MenuItem |
|
1341 |
enabled: hasSelectionInActiveWorkspace |
|
1342 |
label: 'DoIt' |
|
1343 |
itemValue: doIt |
|
1344 |
) |
|
1345 |
(MenuItem |
|
17199 | 1346 |
enabled: hasSelectionInActiveWorkspaceAndEditorIsNotReadonly |
8342 | 1347 |
label: 'PrintIt' |
1348 |
itemValue: printIt |
|
1349 |
) |
|
1350 |
(MenuItem |
|
1351 |
enabled: hasSelectionInActiveWorkspace |
|
1352 |
label: 'InspectIt' |
|
1353 |
itemValue: inspectIt |
|
1354 |
) |
|
1355 |
(MenuItem |
|
1356 |
label: '-' |
|
1357 |
) |
|
1358 |
(MenuItem |
|
1359 |
enabled: hasSelectionInActiveWorkspace |
|
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1360 |
label: 'TimeIt' |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1361 |
itemValue: timeIt |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1362 |
) |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1363 |
(MenuItem |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1364 |
enabled: hasSelectionInActiveWorkspace |
12028 | 1365 |
label: 'SpyOnIt (Transcript)' |
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1366 |
itemValue: spyOnIt |
12028 | 1367 |
) |
1368 |
(MenuItem |
|
1369 |
enabled: hasSelectionInActiveWorkspace |
|
1370 |
label: 'ProfileIt (Visual)' |
|
1371 |
itemValue: profileIt |
|
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1372 |
) |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1373 |
(MenuItem |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1374 |
label: '-' |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1375 |
) |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1376 |
(MenuItem |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
1377 |
enabled: hasSelectionInActiveWorkspace |
8342 | 1378 |
label: 'Browse Class' |
1379 |
itemValue: browseIt |
|
1380 |
) |
|
1381 |
(MenuItem |
|
1382 |
enabled: hasSelectionInActiveWorkspace |
|
1383 |
label: 'Browse Implementors of It' |
|
1384 |
itemValue: browseImplementorsOfIt |
|
1385 |
) |
|
1386 |
(MenuItem |
|
1387 |
enabled: hasSelectionInActiveWorkspace |
|
1388 |
label: 'Browse References to It' |
|
1389 |
itemValue: browseReferencesToIt |
|
1390 |
) |
|
1391 |
) |
|
1392 |
nil |
|
1393 |
nil |
|
1394 |
) |
|
1395 |
! |
|
1396 |
||
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1397 |
fileMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1398 |
"This resource specification was automatically generated |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1399 |
by the MenuEditor of ST/X." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1400 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1401 |
"Do not manually edit this!! If it is corrupted, |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1402 |
the MenuEditor may not be able to read the specification." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1403 |
|
13852 | 1404 |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1405 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1406 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#fileMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1407 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication fileMenu)) startUp |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1408 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1409 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1410 |
<resource: #menu> |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1411 |
|
19391 | 1412 |
^ |
1413 |
#(Menu |
|
1414 |
(MenuItem |
|
1415 |
label: 'Connect...' |
|
1416 |
itemValue: menuSQLConnect |
|
1417 |
isVisible: isSQLWorkspaceSelected |
|
1418 |
) |
|
1419 |
(MenuItem |
|
1420 |
label: '-' |
|
1421 |
isVisible: isSQLWorkspaceSelected |
|
1422 |
) |
|
1423 |
(MenuItem |
|
1424 |
label: 'New Workspace' |
|
1425 |
itemValue: newWorkspace |
|
1426 |
shortcutKey: Ctrln |
|
1427 |
) |
|
1428 |
(MenuItem |
|
1429 |
label: 'New Tab' |
|
1430 |
itemValue: addWorkspace |
|
1431 |
isVisible: false |
|
1432 |
shortcutKey: Ctrlt |
|
1433 |
) |
|
1434 |
(MenuItem |
|
1435 |
label: 'New SystemWorkspace' |
|
1436 |
itemValue: newSystemWorkspace |
|
1437 |
isVisible: thisIsASmalltalkWorkspace |
|
1438 |
) |
|
1439 |
(MenuItem |
|
1440 |
label: 'New EvaluationWorkspace' |
|
1441 |
itemValue: newEvaluationWorkspace |
|
1442 |
isVisible: thisIsASmalltalkWorkspace |
|
1443 |
) |
|
1444 |
(MenuItem |
|
1445 |
label: '-' |
|
1446 |
) |
|
1447 |
(MenuItem |
|
1448 |
label: 'Open File...' |
|
1449 |
itemValue: menuLoad |
|
1450 |
shortcutKey: Ctrlo |
|
1451 |
) |
|
1452 |
(MenuItem |
|
1453 |
label: '-' |
|
1454 |
) |
|
1455 |
(MenuItem |
|
1456 |
label: 'Save' |
|
1457 |
itemValue: menuSave |
|
1458 |
shortcutKey: Ctrls |
|
1459 |
) |
|
1460 |
(MenuItem |
|
1461 |
label: 'Save As...' |
|
1462 |
itemValue: menuSaveAs |
|
1463 |
shortcutKey: SaveAs |
|
1464 |
) |
|
1465 |
(MenuItem |
|
1466 |
enabled: hasMultipleBuffersHolder |
|
1467 |
label: 'Save all As...' |
|
1468 |
itemValue: menuSaveAllAs |
|
1469 |
) |
|
1470 |
(MenuItem |
|
1471 |
label: '-' |
|
1472 |
isVisible: hasCryptLoaded |
|
1473 |
) |
|
1474 |
(MenuItem |
|
19407 | 1475 |
label: 'Load Encrypted From...' |
1476 |
itemValue: menuLoadEncryptedFrom |
|
19391 | 1477 |
isVisible: hasCryptLoaded |
1478 |
) |
|
1479 |
(MenuItem |
|
19407 | 1480 |
label: 'Save Encrypted As...' |
1481 |
itemValue: menuSaveEncryptedAs |
|
19391 | 1482 |
isVisible: hasCryptLoaded |
1483 |
) |
|
1484 |
(MenuItem |
|
1485 |
label: '-' |
|
1486 |
) |
|
1487 |
(MenuItem |
|
1488 |
enabled: hasTextInActiveWorkspace |
|
1489 |
label: 'Print...' |
|
1490 |
itemValue: menuPrint |
|
1491 |
) |
|
1492 |
(MenuItem |
|
1493 |
label: '-' |
|
1494 |
) |
|
1495 |
(MenuItem |
|
1496 |
label: 'Exit' |
|
1497 |
itemValue: closeRequest |
|
1498 |
) |
|
1499 |
) |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1500 |
! |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1501 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1502 |
helpMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1503 |
"This resource specification was automatically generated |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1504 |
by the MenuEditor of ST/X." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1505 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1506 |
"Do not manually edit this!! If it is corrupted, |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1507 |
the MenuEditor may not be able to read the specification." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1508 |
|
13581
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
1509 |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1510 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1511 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#helpMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1512 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication helpMenu)) startUp |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1513 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1514 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1515 |
<resource: #menu> |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1516 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1517 |
^ |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1518 |
#(Menu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1519 |
( |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1520 |
(MenuItem |
15384
196b596fa7e3
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15294
diff
changeset
|
1521 |
label: 'Workspace Documentation' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1522 |
itemValue: openDocumentation |
13581
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
1523 |
) |
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
1524 |
(MenuItem |
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
1525 |
label: 'Editing Text' |
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
1526 |
itemValue: openEditingDocumentation |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1527 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1528 |
(MenuItem |
8315 | 1529 |
label: 'Documentation on Smalltalk/X' |
1530 |
itemValue: openSTXDocumentation |
|
1531 |
) |
|
1532 |
(MenuItem |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1533 |
label: '-' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1534 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1535 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1536 |
label: 'About this Application...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1537 |
itemValue: openAboutThisApplication |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1538 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1539 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1540 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1541 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1542 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1543 |
! |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1544 |
|
9676 | 1545 |
languageInfoLabelMenu |
1546 |
"This resource specification was automatically generated |
|
1547 |
by the MenuEditor of ST/X." |
|
1548 |
||
1549 |
"Do not manually edit this!! If it is corrupted, |
|
1550 |
the MenuEditor may not be able to read the specification." |
|
1551 |
||
1552 |
" |
|
1553 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#workspaceMenu |
|
1554 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication workspaceMenu)) startUp |
|
1555 |
" |
|
1556 |
||
1557 |
<resource: #menu> |
|
1558 |
||
1559 |
^ |
|
1560 |
#(Menu |
|
1561 |
( |
|
1562 |
(MenuItem |
|
1563 |
label: 'Language List Slice' |
|
1564 |
translateLabel: true |
|
1565 |
submenuChannel: languageListMenuSlice |
|
1566 |
isMenuSlice: true |
|
1567 |
) |
|
1568 |
) |
|
1569 |
nil |
|
1570 |
nil |
|
1571 |
) |
|
1572 |
||
1573 |
"Created: / 24-12-2010 / 02:03:59 / cg" |
|
1574 |
! |
|
1575 |
||
3154 | 1576 |
mainMenu |
1577 |
"This resource specification was automatically generated |
|
1578 |
by the MenuEditor of ST/X." |
|
1579 |
||
1580 |
"Do not manually edit this!! If it is corrupted, |
|
1581 |
the MenuEditor may not be able to read the specification." |
|
1582 |
||
13413
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
1583 |
|
3154 | 1584 |
" |
1585 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#mainMenu |
|
1586 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication mainMenu)) startUp |
|
1587 |
" |
|
1588 |
||
1589 |
<resource: #menu> |
|
1590 |
||
1591 |
^ |
|
5852 | 1592 |
#(Menu |
1593 |
( |
|
1594 |
(MenuItem |
|
1595 |
label: 'File' |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1596 |
submenuChannel: fileMenu |
3154 | 1597 |
) |
5852 | 1598 |
(MenuItem |
18395 | 1599 |
label: 'Pages' |
8147 | 1600 |
submenuChannel: bufferMenu |
1601 |
) |
|
1602 |
(MenuItem |
|
8146 | 1603 |
label: 'Edit' |
1604 |
submenuChannel: editMenu |
|
1605 |
) |
|
1606 |
(MenuItem |
|
7651 | 1607 |
label: 'View' |
1608 |
submenuChannel: viewMenu |
|
1609 |
) |
|
1610 |
(MenuItem |
|
10169 | 1611 |
label: 'Bookmarks' |
1612 |
submenuChannel: bookmarkMenu |
|
1613 |
) |
|
1614 |
(MenuItem |
|
8501 | 1615 |
label: 'Execute' |
10169 | 1616 |
isVisible: executeMenuVisible |
8501 | 1617 |
submenuChannel: executionMenu |
1618 |
) |
|
1619 |
(MenuItem |
|
5852 | 1620 |
label: 'Workspace' |
8501 | 1621 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1622 |
submenuChannel: workspaceMenu |
3722 | 1623 |
) |
5852 | 1624 |
(MenuItem |
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
1625 |
enabled: smalltalkMenuEnabledHolder |
5852 | 1626 |
label: 'Smalltalk' |
8501 | 1627 |
isVisible: thisIsASmalltalkWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1628 |
submenuChannel: smalltalkMenu |
3154 | 1629 |
) |
5852 | 1630 |
(MenuItem |
7461
605ae97c85db
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
7441
diff
changeset
|
1631 |
label: 'MENU_Help' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1632 |
submenuChannel: helpMenu |
3154 | 1633 |
) |
1634 |
) |
|
1635 |
nil |
|
1636 |
nil |
|
1637 |
) |
|
18395 | 1638 |
|
1639 |
"Modified: / 21-09-2018 / 10:56:17 / Claus Gittinger" |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1640 |
! |
7831 | 1641 |
|
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1642 |
manageSnippetDialogMenuSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1643 |
"This resource specification was automatically generated |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1644 |
by the MenuEditor of ST/X." |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1645 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1646 |
"Do not manually edit this!! If it is corrupted, |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1647 |
the MenuEditor may not be able to read the specification." |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1648 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1649 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1650 |
" |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1651 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#manageSnippetDialogMenuSpec |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1652 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication manageSnippetDialogMenuSpec)) startUp |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1653 |
" |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1654 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1655 |
<resource: #menu> |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1656 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1657 |
^ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1658 |
#(Menu |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1659 |
( |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1660 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1661 |
label: 'File' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1662 |
submenu: |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1663 |
(Menu |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1664 |
( |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1665 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1666 |
label: 'Open Snippet File...' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1667 |
itemValue: menuOpenSnippetFile |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1668 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1669 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1670 |
label: '-' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1671 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1672 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1673 |
label: 'Save As Snipped File...' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1674 |
itemValue: menuSaveSnippetFileAs |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1675 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1676 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1677 |
label: '-' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1678 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1679 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1680 |
label: 'Close' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1681 |
itemValue: closeSnippetDialog |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1682 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1683 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1684 |
nil |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1685 |
nil |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1686 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1687 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1688 |
(MenuItem |
15392
5d9d4650b23f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15384
diff
changeset
|
1689 |
label: 'MENU_Help' |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1690 |
startGroup: conditionalRight |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1691 |
submenu: |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1692 |
(Menu |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1693 |
( |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1694 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1695 |
label: 'Documentation' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1696 |
itemValue: openSnippetDocumentation |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1697 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1698 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1699 |
label: '-' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1700 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1701 |
(MenuItem |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1702 |
label: 'About this Application...' |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1703 |
itemValue: openAboutThisApplication |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1704 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1705 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1706 |
nil |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1707 |
nil |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1708 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1709 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1710 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1711 |
nil |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1712 |
nil |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1713 |
) |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1714 |
! |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
1715 |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1716 |
smalltalkMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1717 |
"This resource specification was automatically generated |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1718 |
by the MenuEditor of ST/X." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1719 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1720 |
"Do not manually edit this!! If it is corrupted, |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1721 |
the MenuEditor may not be able to read the specification." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1722 |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1723 |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1724 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1725 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#smalltalkMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1726 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication smalltalkMenu)) startUp |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1727 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1728 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1729 |
<resource: #menu> |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1730 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1731 |
^ |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1732 |
#(Menu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1733 |
( |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1734 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1735 |
enabled: hasSelectionInActiveWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1736 |
label: 'FileIn Text' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1737 |
itemValue: fileInText |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1738 |
translateLabel: true |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1739 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1740 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1741 |
enabled: hasSelectionInActiveWorkspace |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1742 |
label: 'ChangeList on Text' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1743 |
itemValue: changesBrowserOnText |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1744 |
translateLabel: true |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1745 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1746 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1747 |
label: '-' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1748 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1749 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1750 |
enabled: selectedWorkspaceIsTextView |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1751 |
label: 'Add Global Variable...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1752 |
itemValue: addGlobalVariable |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1753 |
translateLabel: true |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1754 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1755 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1756 |
enabled: selectedWorkspaceIsTextView |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1757 |
label: 'Remove Global Variable...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1758 |
itemValue: removeGlobalVariable |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1759 |
translateLabel: true |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1760 |
) |
8342 | 1761 |
(MenuItem |
1762 |
label: '-' |
|
1763 |
) |
|
1764 |
(MenuItem |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1765 |
enabled: selectedWorkspaceIsTextView |
8342 | 1766 |
label: 'Add SharedPool...' |
1767 |
itemValue: addSharedPool |
|
1768 |
translateLabel: true |
|
1769 |
) |
|
1770 |
(MenuItem |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1771 |
enabled: selectedWorkspaceIsTextView |
8342 | 1772 |
label: 'Remove SharedPool...' |
1773 |
itemValue: removeSharedPool |
|
1774 |
translateLabel: true |
|
1775 |
) |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1776 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1777 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1778 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1779 |
) |
7658 | 1780 |
! |
1781 |
||
1782 |
toolBarMenu |
|
1783 |
"This resource specification was automatically generated |
|
1784 |
by the MenuEditor of ST/X." |
|
1785 |
||
1786 |
"Do not manually edit this!! If it is corrupted, |
|
1787 |
the MenuEditor may not be able to read the specification." |
|
1788 |
||
14060
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1789 |
|
7658 | 1790 |
" |
1791 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#toolBarMenu |
|
1792 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication toolBarMenu)) startUp |
|
1793 |
" |
|
1794 |
||
1795 |
<resource: #menu> |
|
1796 |
||
1797 |
^ |
|
1798 |
#(Menu |
|
1799 |
( |
|
1800 |
(MenuItem |
|
1801 |
label: '' |
|
1802 |
) |
|
1803 |
(MenuItem |
|
18396 | 1804 |
label: 'Add Page' |
7658 | 1805 |
itemValue: addWorkspace |
1806 |
isButton: true |
|
1807 |
labelImage: (ResourceRetriever ToolbarIconLibrary addBufferIcon) |
|
1808 |
) |
|
1809 |
(MenuItem |
|
1810 |
label: '-' |
|
1811 |
) |
|
1812 |
(MenuItem |
|
10169 | 1813 |
activeHelpKey: menuSaveOrSaveAs |
1814 |
label: 'Save Text' |
|
1815 |
itemValue: menuSave |
|
7658 | 1816 |
isButton: true |
11612 | 1817 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveToFileIcon) |
7658 | 1818 |
) |
1819 |
(MenuItem |
|
8226 | 1820 |
label: '-' |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
1821 |
isVisible: doItMenuButtonVisible |
7658 | 1822 |
) |
1823 |
(MenuItem |
|
10169 | 1824 |
activeHelpKey: #'help_doIt' |
7658 | 1825 |
label: 'DoIt' |
1826 |
itemValue: doIt |
|
7789 | 1827 |
isButton: true |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
1828 |
isVisible: doItMenuButtonVisible |
8226 | 1829 |
labelImage: (ResourceRetriever ToolbarIconLibrary doItIcon) |
1830 |
) |
|
1831 |
(MenuItem |
|
10169 | 1832 |
activeHelpKey: #'help_printIt' |
8226 | 1833 |
label: 'PrintIt' |
1834 |
itemValue: printIt |
|
1835 |
isButton: true |
|
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
1836 |
isVisible: printItMenuButtonVisible |
8226 | 1837 |
labelImage: (ResourceRetriever ToolbarIconLibrary printItIcon) |
7658 | 1838 |
) |
1839 |
(MenuItem |
|
10169 | 1840 |
activeHelpKey: #'help_inspectIt' |
7658 | 1841 |
label: 'InspectIt' |
1842 |
itemValue: inspectIt |
|
7789 | 1843 |
isButton: true |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
1844 |
isVisible: inspectItMenuButtonVisible |
8226 | 1845 |
labelImage: (ResourceRetriever ToolbarIconLibrary inspectItIcon) |
1846 |
) |
|
1847 |
(MenuItem |
|
10169 | 1848 |
activeHelpKey: #'help_browseIt' |
8226 | 1849 |
label: 'BrowseIt' |
1850 |
itemValue: browseIt |
|
1851 |
isButton: true |
|
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
1852 |
isVisible: browseItMenuButtonVisible |
8226 | 1853 |
labelImage: (ResourceRetriever ToolbarIconLibrary browseItIcon) |
7658 | 1854 |
) |
10169 | 1855 |
(MenuItem |
14060
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1856 |
activeHelpKey: #'help_profileIt' |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1857 |
label: 'ProfileIt' |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1858 |
itemValue: profileIt |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1859 |
isButton: true |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1860 |
isVisible: profileItMenuButtonVisible |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1861 |
labelImage: (ResourceRetriever ToolbarIconLibrary profileItIcon) |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1862 |
) |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
1863 |
(MenuItem |
10169 | 1864 |
activeHelpKey: addTerminal |
1865 |
label: 'Web Browser' |
|
1866 |
itemValue: addWebBrowser |
|
1867 |
isButton: true |
|
1868 |
startGroup: right |
|
1869 |
isVisible: isWebBrowserAvailable |
|
1870 |
labelImage: (ResourceRetriever ToolbarIconLibrary webKit22x22) |
|
1871 |
) |
|
1872 |
(MenuItem |
|
1873 |
activeHelpKey: addTerminal |
|
1874 |
label: 'Terminal' |
|
1875 |
itemValue: addTerminal |
|
1876 |
isButton: true |
|
1877 |
startGroup: right |
|
1878 |
labelImage: (ResourceRetriever ToolbarIconLibrary shellTerminalIcon) |
|
1879 |
) |
|
7658 | 1880 |
) |
1881 |
nil |
|
1882 |
nil |
|
1883 |
) |
|
18396 | 1884 |
|
1885 |
"Modified: / 21-09-2018 / 11:06:00 / Claus Gittinger" |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1886 |
! |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1887 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1888 |
workspaceMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1889 |
"This resource specification was automatically generated |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1890 |
by the MenuEditor of ST/X." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1891 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1892 |
"Do not manually edit this!! If it is corrupted, |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1893 |
the MenuEditor may not be able to read the specification." |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1894 |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1895 |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1896 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1897 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#workspaceMenu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1898 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication workspaceMenu)) startUp |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1899 |
" |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1900 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1901 |
<resource: #menu> |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1902 |
|
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1903 |
^ |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1904 |
#(Menu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1905 |
( |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1906 |
(MenuItem |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1907 |
label: 'Language List Slice' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1908 |
submenuChannel: languageListMenuSlice |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1909 |
isMenuSlice: true |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1910 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1911 |
(MenuItem |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1912 |
label: '-' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1913 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1914 |
(MenuItem |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1915 |
label: 'Namespace for DoIt' |
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
1916 |
submenuChannel: namespaceInfoLabelMenuHolder |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1917 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1918 |
(MenuItem |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1919 |
label: '-' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1920 |
) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
1921 |
(MenuItem |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
1922 |
enabled: selectedWorkspaceIsTextView |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1923 |
label: 'Add Workspace Variable...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1924 |
itemValue: addWorkspaceVariable |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1925 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1926 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1927 |
enabled: anyWorkspaceVariableIsDefined |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1928 |
label: 'Remove Workspace Variable...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1929 |
itemValue: removeWorkspaceVariable |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1930 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1931 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1932 |
enabled: anyWorkspaceVariableIsDefined |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1933 |
label: 'Remove all Workspace Variables...' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1934 |
itemValue: removeAllWorkspaceVariables |
10169 | 1935 |
) |
1936 |
(MenuItem |
|
1937 |
label: '-' |
|
1938 |
) |
|
1939 |
(MenuItem |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1940 |
enabled: anyWorkspaceVariableIsDefined |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1941 |
label: 'Inspect Workspace Variables' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1942 |
itemValue: inspectWorkspaceVariables |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1943 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1944 |
(MenuItem |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1945 |
label: '-' |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1946 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1947 |
(MenuItem |
11799 | 1948 |
label: 'Autodefine Variables' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1949 |
submenu: |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1950 |
(Menu |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1951 |
( |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1952 |
(MenuItem |
11799 | 1953 |
label: 'As Workspace Variable' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1954 |
hideMenuOnActivated: false |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1955 |
choice: autoDefineVariables |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1956 |
choiceValue: workspace |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1957 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1958 |
(MenuItem |
11799 | 1959 |
label: 'As DoIt Variable' |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1960 |
hideMenuOnActivated: false |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1961 |
choice: autoDefineVariables |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1962 |
choiceValue: doIt |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1963 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1964 |
(MenuItem |
11799 | 1965 |
label: '-' |
1966 |
) |
|
1967 |
(MenuItem |
|
1968 |
label: 'Do not Autodefine' |
|
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1969 |
hideMenuOnActivated: false |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1970 |
choice: autoDefineVariables |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1971 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1972 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1973 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1974 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1975 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1976 |
) |
13413
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
1977 |
(MenuItem |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
1978 |
label: '-' |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
1979 |
) |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
1980 |
(MenuItem |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
1981 |
label: 'Terminate Processes Forked Here' |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
1982 |
itemValue: terminateBackgroundProcesses |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
1983 |
) |
7865
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1984 |
) |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1985 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1986 |
nil |
ae5b649724dd
separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents:
7853
diff
changeset
|
1987 |
) |
3154 | 1988 |
! ! |
1989 |
||
10169 | 1990 |
!WorkspaceApplication class methodsFor:'private'! |
1991 |
||
1992 |
createWorkspaceView |
|
13585
3e4d51ef27a2
Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13581
diff
changeset
|
1993 |
| view | |
3e4d51ef27a2
Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13581
diff
changeset
|
1994 |
|
3e4d51ef27a2
Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13581
diff
changeset
|
1995 |
view := (UserPreferences current useCodeView2In:#Workspace) |
15294
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
1996 |
ifTrue:[Tools::CodeView2 new] |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
1997 |
ifFalse:[HVScrollableView for:Workspace]. |
13585
3e4d51ef27a2
Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13581
diff
changeset
|
1998 |
^ view |
3e4d51ef27a2
Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13581
diff
changeset
|
1999 |
|
3e4d51ef27a2
Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13581
diff
changeset
|
2000 |
"Modified: / 27-09-2013 / 10:23:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10169 | 2001 |
! ! |
2002 |
||
3332 | 2003 |
!WorkspaceApplication class methodsFor:'special startup'! |
2004 |
||
7403
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2005 |
openEvaluationWorkspace |
11728
eb5cf1a80189
comment/format in: #openEvaluationWorkspace
Stefan Vogel <sv@exept.de>
parents:
11725
diff
changeset
|
2006 |
|wsApp needRemove| |
7403
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2007 |
|
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2008 |
needRemove := true. |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2009 |
|
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2010 |
wsApp := self new. |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2011 |
wsApp allButOpen. |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2012 |
wsApp window extent:400@500. |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2013 |
|
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2014 |
wsApp addEvaluationWorkspace. |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2015 |
wsApp removeWorkspace:1. |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2016 |
wsApp renameWorkspace:1 to:'Evaluator'. |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2017 |
|
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2018 |
wsApp openWindow. |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2019 |
wsApp selectedWorkspaceIndexHolder value:1. |
7849
e3e01db99dd9
open methods return the just created ws
Claus Gittinger <cg@exept.de>
parents:
7848
diff
changeset
|
2020 |
^ wsApp |
7403
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2021 |
|
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2022 |
" |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2023 |
self openEvaluationWorkspace |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2024 |
" |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2025 |
|
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2026 |
"Created: / 13-10-2006 / 12:14:13 / cg" |
7849
e3e01db99dd9
open methods return the just created ws
Claus Gittinger <cg@exept.de>
parents:
7848
diff
changeset
|
2027 |
"Modified: / 25-09-2007 / 21:00:45 / cg" |
7403
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2028 |
! |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
2029 |
|
9085 | 2030 |
openForSinglePageDoing:aBlock |
2031 |
|wsApp needRemove| |
|
2032 |
||
2033 |
needRemove := true. |
|
2034 |
||
2035 |
wsApp := self new. |
|
2036 |
wsApp allButOpen. |
|
2037 |
||
2038 |
(wsApp builder componentAt:'NoteBook') destroyTabAction:nil. |
|
2039 |
||
2040 |
wsApp window height:500. |
|
2041 |
||
2042 |
aBlock value:wsApp. |
|
2043 |
wsApp removeWorkspace:1. "/ the original Workspace |
|
2044 |
"/ wsApp renameWorkspace:1 to:'LICENCE README'. |
|
2045 |
||
2046 |
wsApp openWindow. |
|
2047 |
wsApp selectedWorkspaceIndexHolder value:1. |
|
2048 |
^ wsApp |
|
2049 |
||
2050 |
" |
|
2051 |
self openWithGlobalsInspector |
|
2052 |
" |
|
2053 |
! |
|
2054 |
||
8317 | 2055 |
openMyWorkspace |
15608
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2056 |
|ws| |
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2057 |
|
17035 | 2058 |
"/ openMyWorkspace_new leads to an error in root /, which we don't understand... |
15608
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2059 |
ws := self openMyWorkspace_new. |
12699 | 2060 |
"/ self openMyWorkspace_old. |
2061 |
MyWorkspaceOpened := true. |
|
15608
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2062 |
^ ws |
10318 | 2063 |
|
2064 |
" |
|
10562 | 2065 |
WorkspaceApplication openMyWorkspace |
10318 | 2066 |
" |
2067 |
||
2068 |
"Modified: / 21-06-2011 / 08:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2069 |
"Modified: / 14-07-2011 / 13:12:04 / Administrator" |
|
10562 | 2070 |
"Modified (comment): / 09-08-2011 / 22:59:13 / cg" |
10318 | 2071 |
! |
2072 |
||
2073 |
openMyWorkspace_new |
|
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2074 |
"open showing tabs for ALL bookmarked workspace files" |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2075 |
|
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2076 |
|workspace| |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2077 |
|
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2078 |
"/ workspace := self openWith: nil. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2079 |
"/ workspace enqueueDelayedAction:[ |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2080 |
"/ Error handle:[:ex | |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2081 |
"/ "/ no time to debug that stuff now... |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2082 |
"/ Dialog information:'Error in bookmark handling: ',ex description |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2083 |
"/ ] do:[ |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2084 |
"/ BookmarkList forWorkspace myWorkspaces do:[:bookmark| |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2085 |
"/ workspace switchToBookmarkEntry: bookmark |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2086 |
"/ ]. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2087 |
"/ |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2088 |
"/ |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2089 |
"/ |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2090 |
"/ ]. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2091 |
"/ workspace selectedWorkspaceIndexHolder value: 1. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2092 |
"/ ]. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2093 |
|
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2094 |
workspace := self new. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2095 |
workspace allButOpen. |
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2096 |
workspace initialSyntax:SmalltalkLanguage instance. |
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2097 |
|
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2098 |
Error handle:[:ex | |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2099 |
ex reject. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2100 |
"/ no time to debug that stuff now... |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2101 |
Dialog information:'Error in bookmark handling: ',ex description |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2102 |
] do:[ |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2103 |
BookmarkList forWorkspace myWorkspaces do:[:bookmark| |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2104 |
workspace switchToBookmarkEntry: bookmark |
10169 | 2105 |
]. |
2106 |
]. |
|
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2107 |
workspace selectedWorkspaceIndexHolder value: 1. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2108 |
workspace openWindow. |
15608
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2109 |
^ workspace |
10169 | 2110 |
|
2111 |
" |
|
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2112 |
WorkspaceApplication openMyWorkspace |
10169 | 2113 |
" |
2114 |
||
2115 |
"Modified: / 21-06-2011 / 08:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10318 | 2116 |
"Created: / 14-07-2011 / 13:11:32 / Administrator" |
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2117 |
"Modified: / 26-04-2012 / 12:45:50 / cg" |
10169 | 2118 |
! |
2119 |
||
2120 |
openMyWorkspace_old |
|
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2121 |
"open showing the single file: MyWorkspace.wsp" |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2122 |
|
15608
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2123 |
^ self openOnFile:'MyWorkspace.wsp' |
8317 | 2124 |
|
2125 |
" |
|
2126 |
self openMyWorkspace. |
|
2127 |
" |
|
10169 | 2128 |
|
2129 |
"Created: / 21-06-2011 / 08:51:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
2130 |
"Modified (comment): / 28-09-2011 / 07:48:07 / cg" |
8317 | 2131 |
! |
2132 |
||
6022 | 2133 |
openOnFile:aFilename |
2134 |
"launch a new workspace on the contents of some file" |
|
2135 |
||
2136 |
|ws| |
|
2137 |
||
2138 |
ws := self openWith:nil. |
|
8369 | 2139 |
|
2140 |
"/ let the ws load the file - instead of the caller. |
|
2141 |
"/ so the error dialog is shown in its context, |
|
2142 |
"/ and the caller (Launcher) is not blocked. |
|
2143 |
ws enqueueDelayedAction:[ws loadFile:aFilename]. |
|
2144 |
"/ ws loadFile:aFilename. |
|
6022 | 2145 |
^ ws |
2146 |
||
2147 |
" |
|
2148 |
WorkspaceApplication openOnFile:'Makefile' |
|
2149 |
" |
|
2150 |
! |
|
2151 |
||
3332 | 2152 |
openSystemWorkspace |
14747 | 2153 |
^ self new openSystemWorkspace. |
3332 | 2154 |
|
2155 |
" |
|
7850 | 2156 |
|ws b| |
2157 |
ws := self openSystemWorkspace. |
|
7853 | 2158 |
ws addMyWorkspace. |
2159 |
ws selectedWorkspaceIndexHolder value:(ws workspaces size). |
|
2160 |
ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll. |
|
7850 | 2161 |
ws selectedWorkspace |
7851 | 2162 |
add:(b := Button label:'DoIt' action:[ws doIt. b destroy]) |
3332 | 2163 |
" |
7853 | 2164 |
" |
2165 |
|ws b| |
|
2166 |
ws := self new. |
|
2167 |
ws open. |
|
2168 |
ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll. |
|
2169 |
" |
|
7612
42b1c57c6cc7
Private.wsp and MyWorkspace.wsp
Claus Gittinger <cg@exept.de>
parents:
7544
diff
changeset
|
2170 |
|
10169 | 2171 |
"Modified: / 14-02-2010 / 23:02:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2172 |
"Modified: / 05-07-2011 / 15:34:40 / cg" |
|
4542 | 2173 |
! |
2174 |
||
2175 |
openWith:initialText |
|
15046
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2176 |
"launch a new workspace with some initial contents. |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2177 |
The workspace will be opened in smalltalk syntax mode" |
4542 | 2178 |
|
13852 | 2179 |
^ self openWith:initialText selected:false |
5098 | 2180 |
|
2181 |
" |
|
13852 | 2182 |
WorkspaceApplication openWith:'Transcript showCR:''hello world''' |
5098 | 2183 |
" |
2184 |
! |
|
2185 |
||
2186 |
openWith:initialText selected:selectedBoolean |
|
15046
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2187 |
"launch a new workspace with some initial contents. |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2188 |
The workspace will be opened in smalltalk syntax mode" |
5098 | 2189 |
|
13852 | 2190 |
|workspace| |
2191 |
||
2192 |
workspace := self new. |
|
2193 |
workspace open. |
|
2194 |
workspace selectedWorkspace contents:initialText selected:selectedBoolean. |
|
2195 |
^ workspace |
|
12639
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2196 |
|
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2197 |
" |
13852 | 2198 |
WorkspaceApplication openWith:'Transcript showCR:''hello world''' |
12639
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2199 |
" |
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2200 |
! |
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2201 |
|
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2202 |
openWith:initialText selected:selectedBoolean title:titleString |
15046
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2203 |
"launch a new workspace with some initial contents. |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2204 |
The workspace will be opened in smalltalk syntax mode" |
12639
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2205 |
|
4542 | 2206 |
|workspace| |
2207 |
||
2208 |
workspace := self new. |
|
2209 |
workspace open. |
|
12639
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2210 |
titleString notNil ifTrue:[workspace setLabel:titleString]. |
5098 | 2211 |
workspace selectedWorkspace contents:initialText selected:selectedBoolean. |
4542 | 2212 |
^ workspace |
2213 |
||
2214 |
" |
|
12639
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2215 |
WorkspaceApplication |
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2216 |
openWith:'Transcript showCR:''hello world''' |
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2217 |
selected:false |
6a0a5bf99236
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12479
diff
changeset
|
2218 |
title:'hello' |
4542 | 2219 |
" |
9085 | 2220 |
! |
2221 |
||
2222 |
openWithGlobalsInspector |
|
2223 |
"open a workspaceApp with a single initial pane, showing global variables. |
|
2224 |
Same as Smalltalk inspect, but looks nicer..." |
|
2225 |
||
2226 |
^ self openForSinglePageDoing:[:wsApp | wsApp addNamespaceInspectorFor:Smalltalk] |
|
2227 |
||
2228 |
" |
|
2229 |
self openWithGlobalsInspector |
|
2230 |
" |
|
2231 |
! |
|
2232 |
||
15046
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2233 |
openWithText:initialText |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2234 |
"like openWith, but will set the language to 'text', so it is not incorrectly syntax highlighted" |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2235 |
|
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2236 |
|ws| |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2237 |
|
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2238 |
ws := self openWith:initialText selected:false. |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2239 |
ws syntax:nil. |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2240 |
^ ws. |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2241 |
|
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2242 |
" |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2243 |
WorkspaceApplication openWithText:'foo 1 2 3 4' |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2244 |
" |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2245 |
! |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2246 |
|
9085 | 2247 |
openWithWorkspaceVariableInspector |
2248 |
"open a workspaceApp with a single initial pane, showing workspace variables. |
|
2249 |
Same as Workspace workspaceVariables inspect, but looks nicer..." |
|
2250 |
||
2251 |
^ self openForSinglePageDoing:[:wsApp | wsApp addWorkspaceVariableInspector] |
|
2252 |
||
2253 |
" |
|
2254 |
self openWithWorkspaceVariableInspector |
|
2255 |
" |
|
3332 | 2256 |
! ! |
2257 |
||
10169 | 2258 |
!WorkspaceApplication class methodsFor:'startup'! |
2259 |
||
2260 |
open |
|
2261 |
"/ the very first open opens a MyWorkspace |
|
2262 |
||
2263 |
(MyWorkspaceOpened == true) ifTrue:[ |
|
15608
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2264 |
^ self openRegularWorkspace |
10169 | 2265 |
] ifFalse:[ |
15608
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2266 |
^ self openMyWorkspace |
10169 | 2267 |
]. |
2268 |
||
2269 |
" |
|
2270 |
MyWorkspaceOpened := nil. |
|
2271 |
WorkspaceApplication open. |
|
2272 |
" |
|
2273 |
||
2274 |
"Created: / 21-06-2011 / 09:03:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2275 |
"Modified (comment): / 05-07-2011 / 15:23:53 / cg" |
|
15234
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2276 |
! |
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2277 |
|
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2278 |
openRegularWorkspace |
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2279 |
"/ always open a normal MyWorkspace |
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2280 |
|
15608
0f4b14944011
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15409
diff
changeset
|
2281 |
^ super open |
15234
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2282 |
|
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2283 |
" |
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2284 |
MyWorkspaceOpened := nil. |
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2285 |
WorkspaceApplication open. |
e00c67bae495
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15046
diff
changeset
|
2286 |
" |
10169 | 2287 |
! ! |
2288 |
||
3193 | 2289 |
!WorkspaceApplication methodsFor:'aspects'! |
2290 |
||
4474 | 2291 |
autoDefineVariables |
2292 |
autoDefineVariables isNil ifTrue:[ |
|
2293 |
autoDefineVariables := ValueHolder new. |
|
2294 |
(UserPreferences current autoDefineWorkspaceVariables) ifTrue:[ |
|
5547
65af7af97085
initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents:
5490
diff
changeset
|
2295 |
autoDefineVariables value:#workspace. |
9381 | 2296 |
] ifFalse:[ |
2297 |
autoDefineVariables value:#doIt. |
|
4474 | 2298 |
]. |
2299 |
autoDefineVariables onChangeSend:#autoDefineVariablesChanged to:self. |
|
2300 |
]. |
|
2301 |
^ autoDefineVariables. |
|
2302 |
! |
|
2303 |
||
18055 | 2304 |
autoFetchSelectionHolder |
2305 |
autoFetchSelectionHolder isNil ifTrue:[ |
|
2306 |
autoFetchSelectionHolder := ValueHolder with:false. |
|
2307 |
autoFetchSelectionHolder onChangeEvaluate:[self autoFetchSelection:autoFetchSelectionHolder value]. |
|
2308 |
]. |
|
2309 |
^ autoFetchSelectionHolder |
|
2310 |
! |
|
2311 |
||
2312 |
autoFetchSelectionMenuItemVisible |
|
2313 |
^ false |
|
2314 |
! |
|
2315 |
||
10169 | 2316 |
bookmarks |
2317 |
|ws app| |
|
2318 |
||
2319 |
ws := self selectedWorkspace scrolledView. |
|
2320 |
ws isTextView ifTrue:[ |
|
2321 |
^ BookmarkList forWorkspace |
|
2322 |
]. |
|
11725
0b626c2b4b2d
Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
2323 |
(ws isApplicationSubView) ifTrue:[ |
10169 | 2324 |
app := ws application. |
2325 |
(app respondsTo:#bookmarks) ifTrue:[ |
|
2326 |
^ app bookmarks |
|
2327 |
]. |
|
2328 |
(app respondsTo:#bookmarkListHolder) ifTrue:[ |
|
2329 |
^ app bookmarkListHolder value |
|
2330 |
]. |
|
2331 |
]. |
|
2332 |
^ BookmarkList new. |
|
2333 |
||
2334 |
"Created: / 20-06-2011 / 22:23:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2335 |
"Modified: / 21-06-2011 / 08:13:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2336 |
"Modified (format): / 05-07-2011 / 14:21:10 / cg" |
|
2337 |
! |
|
2338 |
||
8226 | 2339 |
browseItMenuButtonVisibile |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2340 |
"/ typo in previous version |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2341 |
^ self browseItMenuButtonVisible |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2342 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2343 |
"Modified: / 17-12-2013 / 16:34:59 / cg" |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2344 |
! |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2345 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2346 |
browseItMenuButtonVisible |
8226 | 2347 |
^ self thisIsASmalltalkWorkspace |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2348 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2349 |
"Created: / 17-12-2013 / 16:34:04 / cg" |
8226 | 2350 |
! |
2351 |
||
13852 | 2352 |
canChangeLanguageHolder |
2353 |
"return/create the 'canChangeLanguageHolder' value holder (automatically generated)" |
|
2354 |
||
2355 |
canChangeLanguageHolder isNil ifTrue:[ |
|
2356 |
canChangeLanguageHolder := ValueHolder with: true. |
|
2357 |
]. |
|
2358 |
^ canChangeLanguageHolder |
|
2359 |
||
2360 |
"Modified: / 10-05-2012 / 23:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2361 |
! |
|
2362 |
||
2363 |
canChangeLanguageHolder:something |
|
2364 |
"set the 'canChangeLanguageHolder' value holder (automatically generated)" |
|
2365 |
||
2366 |
canChangeLanguageHolder := something. |
|
2367 |
! |
|
2368 |
||
9695 | 2369 |
cursorColHolder |
2370 |
cursorColHolder isNil ifTrue:[ |
|
15273
a6606b8ea2f6
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15234
diff
changeset
|
2371 |
cursorColHolder := IndirectValue for:(ValueHolder with:1) |
9695 | 2372 |
]. |
2373 |
^ cursorColHolder |
|
2374 |
||
2375 |
"Created: / 22-01-2011 / 11:36:00 / cg" |
|
2376 |
! |
|
2377 |
||
2378 |
cursorColLabelHolder |
|
2379 |
^ BlockValue |
|
2380 |
with:[:v | v isNil ifTrue:[''] ifFalse:[v printString]] |
|
2381 |
argument:self cursorColHolder. |
|
2382 |
||
2383 |
"Created: / 22-01-2011 / 11:36:08 / cg" |
|
2384 |
! |
|
2385 |
||
15817
f6046130309e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15816
diff
changeset
|
2386 |
cursorLineAndColumnLabelHolder |
f6046130309e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15816
diff
changeset
|
2387 |
cursorLineAndColumnLabelHolder isNil ifTrue:[ |
f6046130309e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15816
diff
changeset
|
2388 |
cursorLineAndColumnLabelHolder := IndirectValue for:(ValueHolder with:1) |
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
2389 |
]. |
15817
f6046130309e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15816
diff
changeset
|
2390 |
^ cursorLineAndColumnLabelHolder |
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
2391 |
! |
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
2392 |
|
9695 | 2393 |
cursorLineHolder |
2394 |
cursorLineHolder isNil ifTrue:[ |
|
15273
a6606b8ea2f6
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15234
diff
changeset
|
2395 |
cursorLineHolder := IndirectValue for:(ValueHolder with:1) |
9695 | 2396 |
]. |
2397 |
^ cursorLineHolder |
|
2398 |
||
2399 |
"Created: / 22-01-2011 / 11:35:22 / cg" |
|
2400 |
! |
|
2401 |
||
2402 |
cursorLineLabelHolder |
|
2403 |
^ BlockValue |
|
2404 |
with:[:v | v isNil ifTrue:[''] ifFalse:[v printString]] |
|
2405 |
argument:self cursorLineHolder. |
|
2406 |
||
2407 |
"Modified: / 22-01-2011 / 11:42:56 / cg" |
|
2408 |
! |
|
2409 |
||
8133
8b09d048b345
doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8111
diff
changeset
|
2410 |
doItMenuButtonVisibile |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2411 |
"/ typo in previous version |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2412 |
^ self doItMenuButtonVisible |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2413 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2414 |
"Modified: / 17-12-2013 / 16:35:05 / cg" |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2415 |
! |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2416 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2417 |
doItMenuButtonVisible |
8133
8b09d048b345
doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8111
diff
changeset
|
2418 |
^ self thisIsASmalltalkWorkspace |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2419 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2420 |
"Created: / 17-12-2013 / 16:34:10 / cg" |
8133
8b09d048b345
doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8111
diff
changeset
|
2421 |
! |
8b09d048b345
doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8111
diff
changeset
|
2422 |
|
19391 | 2423 |
hasCryptLoaded |
2424 |
^ (Smalltalk at:#TwofishCipher) notNil |
|
2425 |
! |
|
2426 |
||
4136 | 2427 |
hasHistory |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2428 |
^ Workspace doItHistory notEmptyOrNil. |
5852 | 2429 |
! |
2430 |
||
9381 | 2431 |
hasInfoLabel |
2432 |
^ true |
|
2433 |
! |
|
2434 |
||
8133
8b09d048b345
doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8111
diff
changeset
|
2435 |
inspectItMenuButtonVisibile |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2436 |
"/ typo in previous version |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2437 |
^ self inspectItMenuButtonVisible |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2438 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2439 |
"Modified: / 17-12-2013 / 16:35:17 / cg" |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2440 |
! |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2441 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2442 |
inspectItMenuButtonVisible |
8133
8b09d048b345
doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8111
diff
changeset
|
2443 |
^ self thisIsASmalltalkWorkspace |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2444 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2445 |
"Created: / 17-12-2013 / 16:34:17 / cg" |
8133
8b09d048b345
doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8111
diff
changeset
|
2446 |
! |
8b09d048b345
doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents:
8111
diff
changeset
|
2447 |
|
9381 | 2448 |
languageInfoLabelHolder |
2449 |
^ BlockValue |
|
11612 | 2450 |
with:[:syntax | |
2451 |
syntax notNil ifTrue:[ |
|
2452 |
"'Syntax: ',"syntax name |
|
2453 |
] ifFalse:[ |
|
11615
f9dfb7daa5e4
corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents:
11612
diff
changeset
|
2454 |
'Text' |
11612 | 2455 |
] |
2456 |
] |
|
9381 | 2457 |
argument:self syntaxHolder |
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2458 |
|
11615
f9dfb7daa5e4
corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents:
11612
diff
changeset
|
2459 |
"Modified: / 19-07-2012 / 16:53:30 / cg" |
9381 | 2460 |
! |
2461 |
||
9695 | 2462 |
modeLabelHolder |
2463 |
modeLabelHolder isNil ifTrue:[ |
|
15273
a6606b8ea2f6
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15234
diff
changeset
|
2464 |
modeLabelHolder := IndirectValue for:(ValueHolder with:'I') |
9695 | 2465 |
]. |
2466 |
^ modeLabelHolder |
|
2467 |
||
2468 |
"Created: / 22-01-2011 / 11:37:25 / cg" |
|
2469 |
! |
|
2470 |
||
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2471 |
namespaceHolder |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2472 |
namespaceHolder isNil ifTrue:[ |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2473 |
namespaceHolder := self defaultNameSpaceForDoIts asValue. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2474 |
namespaceHolder onChangeSend:#setNameSpaceForDoIts to:self |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2475 |
]. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2476 |
^ namespaceHolder |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2477 |
! |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2478 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2479 |
namespaceInfoLabelHolder |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2480 |
^ BlockValue |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2481 |
with:[:ns | |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2482 |
ns notNil ifTrue:[ |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2483 |
ns name |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2484 |
] ifFalse:[ |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2485 |
'' |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2486 |
] |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2487 |
] |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2488 |
argument:self namespaceHolder |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2489 |
! |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2490 |
|
8226 | 2491 |
printItMenuButtonVisibile |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2492 |
"/ typo in previous version |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2493 |
^ self printItMenuButtonVisible |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2494 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2495 |
"Modified: / 17-12-2013 / 16:35:11 / cg" |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2496 |
! |
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2497 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2498 |
printItMenuButtonVisible |
8226 | 2499 |
^ self thisIsASmalltalkWorkspace |
13728
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2500 |
|
01b72a80639e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13690
diff
changeset
|
2501 |
"Created: / 17-12-2013 / 16:34:23 / cg" |
8226 | 2502 |
! |
2503 |
||
14060
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
2504 |
profileItMenuButtonVisible |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
2505 |
^ self thisIsASmalltalkWorkspace |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
2506 |
|
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
2507 |
"Created: / 17-12-2013 / 16:34:04 / cg" |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
2508 |
! |
fef6bc962708
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13949
diff
changeset
|
2509 |
|
10169 | 2510 |
setWindowLabel: label |
2511 |
||
2512 |
self setWindowLabel: label language: self syntaxHolder value |
|
2513 |
! |
|
2514 |
||
2515 |
setWindowLabel: label language: language |
|
11624 | 2516 |
|languageName| |
2517 |
||
2518 |
language notNil ifTrue:[ |
|
2519 |
languageName := ' - ', language name. |
|
2520 |
] ifFalse:[ |
|
2521 |
languageName := ''. |
|
2522 |
]. |
|
2523 |
self window label:label, ' - ' , languageName |
|
10169 | 2524 |
! |
2525 |
||
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
2526 |
smalltalkMenuEnabledHolder |
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
2527 |
smalltalkMenuEnabledHolder isNil ifTrue:[ |
15273
a6606b8ea2f6
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15234
diff
changeset
|
2528 |
smalltalkMenuEnabledHolder := ValueHolder with:true. |
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
2529 |
]. |
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
2530 |
^ smalltalkMenuEnabledHolder |
5852 | 2531 |
! |
2532 |
||
15046
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2533 |
syntax:aProgrammingLanguageOrNil |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2534 |
"the argument must sth. like SmalltalkLanguage" |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2535 |
|
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2536 |
self syntaxHolder value:aProgrammingLanguageOrNil |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2537 |
! |
0441bc4caefc
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14837
diff
changeset
|
2538 |
|
5852 | 2539 |
syntaxHolder |
2540 |
syntaxHolder isNil ifTrue:[ |
|
9341
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2541 |
syntaxHolder := self defaultEvaluatorSyntax asValue. |
5852 | 2542 |
syntaxHolder onChangeSend:#setCompilerForSyntax to:self |
2543 |
]. |
|
2544 |
^ syntaxHolder |
|
10169 | 2545 |
! |
2546 |
||
2547 |
toolBarView |
|
2548 |
||
2549 |
toolBarView isNil ifTrue:[ |
|
2550 |
toolBarView := SubCanvas new. |
|
2551 |
toolBarView level: 0. |
|
2552 |
toolBarView client: self spec: #toolBarSpec builder: builder. |
|
2553 |
]. |
|
2554 |
^toolBarView |
|
2555 |
||
2556 |
"Created: / 10-06-2011 / 22:52:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2557 |
"Modified: / 11-06-2011 / 00:06:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3193 | 2558 |
! ! |
2559 |
||
4358 | 2560 |
!WorkspaceApplication methodsFor:'aspects-queries'! |
3193 | 2561 |
|
3812 | 2562 |
anyWorkspaceVariableIsDefined |
6267 | 2563 |
^ Workspace anyWorkspaceVariableIsDefined |
2564 |
||
2565 |
"Modified: / 20-04-2005 / 11:57:59 / cg" |
|
10169 | 2566 |
! |
2567 |
||
2568 |
canAddBookmark |
|
2569 |
||
16259 | 2570 |
| ws | |
10169 | 2571 |
|
2572 |
ws := self selectedWorkspace scrolledView. |
|
16259 | 2573 |
ws isTextView ifFalse:[^ true]. |
2574 |
||
2575 |
^ ws defaultFileNameForFileDialog notNil. |
|
10169 | 2576 |
|
2577 |
"Created: / 20-06-2011 / 22:43:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2578 |
! |
|
2579 |
||
13852 | 2580 |
isSQLWorkspaceAvailable |
2581 |
||
2582 |
^(Smalltalk at:#'SQL::WorkspacePage') notNil |
|
2583 |
||
2584 |
"Created: / 10-05-2012 / 18:49:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2585 |
! |
|
2586 |
||
2587 |
isSQLWorkspaceSelected |
|
2588 |
||
2589 |
builder isNil ifTrue:[self createBuilder]. |
|
14168
f3b4d93f0481
class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14060
diff
changeset
|
2590 |
^ builder bindings at: #isSQLWorkspaceSelected ifAbsentPut: [ |
13852 | 2591 |
BlockValue |
14168
f3b4d93f0481
class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14060
diff
changeset
|
2592 |
with:[:ignored| |
f3b4d93f0481
class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14060
diff
changeset
|
2593 |
self selectedWorkspaceApplication isKindOf: (Smalltalk at:#'SQL::WorkspacePage') |
f3b4d93f0481
class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14060
diff
changeset
|
2594 |
] |
13852 | 2595 |
argument: self selectedWorkspaceIndexHolder |
2596 |
] |
|
2597 |
||
2598 |
"Created: / 11-05-2012 / 09:41:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14168
f3b4d93f0481
class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14060
diff
changeset
|
2599 |
"Modified: / 27-03-2014 / 16:38:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13852 | 2600 |
! |
2601 |
||
10169 | 2602 |
isWebBrowserAvailable |
2603 |
||
2604 |
^(Smalltalk at:#WebKitView) notNil |
|
2605 |
||
2606 |
"Created: / 11-06-2011 / 00:30:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2607 |
! |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2608 |
|
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2609 |
selectedWorkspaceIsTextView |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2610 |
^ self selectedWorkspacesTextView notNil |
3154 | 2611 |
! ! |
2612 |
||
9632 | 2613 |
!WorkspaceApplication methodsFor:'autofetch selection'! |
2614 |
||
2615 |
autoFetchSelection |
|
18055 | 2616 |
^ [ clipBoardWatcherProcess notNil ] |
9632 | 2617 |
|
2618 |
"Created: / 16-11-2010 / 14:55:39 / cg" |
|
2619 |
! |
|
2620 |
||
2621 |
autoFetchSelection:aBoolean |
|
14746 | 2622 |
Screen current isWindowsPlatform ifTrue:[ |
9632 | 2623 |
aBoolean ifTrue:[ |
2624 |
self startClipboardWatcher |
|
2625 |
] ifFalse:[ |
|
2626 |
self stopClipboardWatcher |
|
2627 |
]. |
|
2628 |
^ self. |
|
2629 |
]. |
|
2630 |
||
2631 |
aBoolean ifTrue:[ |
|
2632 |
self window windowGroup addPreEventHook:self. |
|
2633 |
device addSelectionHandler:self |
|
2634 |
] ifFalse:[ |
|
2635 |
self window windowGroup removePreEventHook:self. |
|
2636 |
device removeSelectionHandler:self |
|
2637 |
]. |
|
2638 |
||
2639 |
"Created: / 16-11-2010 / 14:34:15 / cg" |
|
2640 |
! |
|
2641 |
||
9735 | 2642 |
autoFetchSelectionLines |
2643 |
fetchClipboardLines isNil ifTrue:[ |
|
15273
a6606b8ea2f6
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15234
diff
changeset
|
2644 |
fetchClipboardLines := ValueHolder with:true |
9735 | 2645 |
]. |
2646 |
^ fetchClipboardLines |
|
2647 |
||
2648 |
"Created: / 04-02-2011 / 17:52:34 / cg" |
|
2649 |
! |
|
2650 |
||
9632 | 2651 |
itemFromClipboard |
2652 |
|text| |
|
2653 |
||
2654 |
text := self window getClipboardText. |
|
2655 |
(text notNil and:[text isString]) ifTrue:[ |
|
9735 | 2656 |
self autoFetchSelectionLines value ifTrue:[ |
2657 |
text := text , Character cr |
|
2658 |
]. |
|
9632 | 2659 |
self paste:text. |
2660 |
]. |
|
2661 |
||
2662 |
"Created: / 16-11-2010 / 14:44:26 / cg" |
|
9735 | 2663 |
"Modified: / 04-02-2011 / 17:53:46 / cg" |
9632 | 2664 |
! |
2665 |
||
18055 | 2666 |
selectionClear:foo |
18057 | 2667 |
"/ Transcript showCR:foo. |
18055 | 2668 |
! |
2669 |
||
9632 | 2670 |
startClipboardWatcher |
2671 |
clipBoardWatcherProcess isNil ifTrue:[ |
|
2672 |
ClipBoardFetchingInstance notNil ifTrue:[ |
|
2673 |
ClipBoardFetchingInstance stopClipboardWatcher |
|
2674 |
]. |
|
2675 |
clipBoardWatcherProcess := |
|
2676 |
[ |
|
2677 |
[true] whileTrue:[ |
|
2678 |
self waitForClipBoardToChange. |
|
2679 |
]. |
|
2680 |
] newProcess. |
|
2681 |
||
2682 |
clipBoardWatcherProcess resume. |
|
2683 |
ClipBoardFetchingInstance := self. |
|
2684 |
]. |
|
2685 |
||
2686 |
"Created: / 16-11-2010 / 14:35:55 / cg" |
|
2687 |
! |
|
2688 |
||
2689 |
stopClipboardWatcher |
|
2690 |
|p| |
|
2691 |
||
2692 |
(p := clipBoardWatcherProcess) notNil ifTrue:[ |
|
2693 |
ClipBoardFetchingInstance := nil. |
|
2694 |
clipBoardWatcherProcess := nil. |
|
2695 |
p terminate |
|
2696 |
]. |
|
2697 |
||
2698 |
"Created: / 16-11-2010 / 14:36:12 / cg" |
|
2699 |
! |
|
2700 |
||
2701 |
waitForClipBoardToChange |
|
2702 |
|prev| |
|
2703 |
||
2704 |
prev := self window getClipboardText. |
|
2705 |
[ |
|
2706 |
Delay waitForSeconds:0.2. |
|
2707 |
self window getClipboardText = prev |
|
2708 |
] whileTrue. |
|
2709 |
self itemFromClipboard. |
|
2710 |
||
2711 |
"Created: / 16-11-2010 / 14:44:05 / cg" |
|
2712 |
! ! |
|
2713 |
||
7474
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2714 |
!WorkspaceApplication methodsFor:'defaults'! |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2715 |
|
9341
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2716 |
defaultEvaluatorSyntax |
9653 | 2717 |
LastLanguage notNil ifTrue:[^ LastLanguage]. |
9341
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2718 |
^ SmalltalkLanguage instance. |
9653 | 2719 |
|
2720 |
"Modified: / 01-12-2010 / 12:21:41 / cg" |
|
9341
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2721 |
! |
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2722 |
|
7474
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2723 |
defaultFileNameForLoad |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2724 |
^ 'file.wsp' |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2725 |
|
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2726 |
"Created: / 25-10-2006 / 14:56:10 / cg" |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2727 |
! |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2728 |
|
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2729 |
defaultFileNameForSave |
8324 | 2730 |
|ws| |
2731 |
||
9695 | 2732 |
ws := self selectedWorkspace scrolledView. |
8324 | 2733 |
ws isTextView ifFalse:[ |
2734 |
"/ eval-ws |
|
2735 |
^ super defaultFileNameForSave |
|
2736 |
]. |
|
2737 |
^ ws defaultFileNameForFileDialog ? super defaultFileNameForSave |
|
9695 | 2738 |
|
2739 |
"Modified: / 22-01-2011 / 12:01:27 / cg" |
|
7474
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2740 |
! |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2741 |
|
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2742 |
defaultFileNameForSaveAll |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2743 |
^ 'file.wsp' |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2744 |
|
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2745 |
"Created: / 25-10-2006 / 14:56:04 / cg" |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2746 |
! |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2747 |
|
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2748 |
defaultNameSpaceForDoIts |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2749 |
LastNamespace notNil ifTrue:[^ LastNamespace]. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2750 |
^ Smalltalk. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2751 |
! |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
2752 |
|
7474
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2753 |
defaultPatternLoad |
8032 | 2754 |
^ '*.wsp; *.txt; *.rc' |
7474
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2755 |
|
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2756 |
"Created: / 25-10-2006 / 14:57:25 / cg" |
7866 | 2757 |
! |
2758 |
||
9341
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2759 |
executeMenuVisible |
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2760 |
^ self thisIsASmalltalkWorkspace |
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2761 |
! |
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2762 |
|
7866 | 2763 |
thisIsASmalltalkWorkspace |
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
2764 |
"can be redefined in a subclass to disable smalltalk-specific menu items |
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
2765 |
(expecco uses workspaces as scratchpads)" |
7866 | 2766 |
|
2767 |
^ true |
|
18055 | 2768 |
! |
2769 |
||
2770 |
thisIsASmalltalkWorkspaceAndAutoFetchMenuItemVisible |
|
2771 |
^ self thisIsASmalltalkWorkspace and:[self autoFetchSelectionMenuItemVisible] |
|
7474
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2772 |
! ! |
f18ef25a1ca6
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
7461
diff
changeset
|
2773 |
|
9372 | 2774 |
!WorkspaceApplication methodsFor:'drag & drop'! |
2775 |
||
2776 |
droppedFile:aFilename in:aComponent |
|
2777 |
"this is a notification from my textView component" |
|
2778 |
||
2779 |
self |
|
2780 |
renameWorkspace:(self selectedWorkspaceIndexHolder value) |
|
2781 |
to:aFilename asFilename baseName |
|
2782 |
! ! |
|
2783 |
||
10169 | 2784 |
!WorkspaceApplication methodsFor:'help'! |
2785 |
||
10220 | 2786 |
updateHelpSpec:aSpec |
2787 |
|file ws| |
|
10169 | 2788 |
|
17881 | 2789 |
"/ dynamically adjust the menuSave item's helpText |
10169 | 2790 |
ws := self selectedWorkspace scrolledView. |
2791 |
ws isTextView ifTrue:[ |
|
2792 |
file := ws defaultFileNameForFileDialog. |
|
2793 |
]. |
|
2794 |
||
10220 | 2795 |
aSpec |
10169 | 2796 |
at:#menuSaveOrSaveAs |
10220 | 2797 |
put:(file isNil ifTrue:[aSpec at:#menuSaveAs] ifFalse:[aSpec at:#menuSave]). |
2798 |
||
10277 | 2799 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
18553 | 2800 |
aSpec at:#addTerminal put:(aSpec at:#addTerminalWindows). |
10277 | 2801 |
|
2802 |
]. |
|
10220 | 2803 |
^ aSpec |
2804 |
||
2805 |
"Created: / 06-07-2011 / 16:32:13 / cg" |
|
18553 | 2806 |
"Modified (format): / 21-12-2018 / 09:59:08 / Claus Gittinger" |
10169 | 2807 |
! ! |
2808 |
||
19216 | 2809 |
!WorkspaceApplication methodsFor:'help specs'! |
2810 |
||
2811 |
helpSpec |
|
2812 |
"/ dynamically adjust the menuSave item's helpText |
|
2813 |
^ self updateHelpSpec:(super helpSpec) |
|
2814 |
||
2815 |
"Created: / 05-07-2011 / 15:42:25 / cg" |
|
2816 |
! ! |
|
2817 |
||
3154 | 2818 |
!WorkspaceApplication methodsFor:'initialization & release'! |
2819 |
||
2820 |
closeRequest |
|
6636 | 2821 |
"asks for permission before closing" |
2822 |
||
14818
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
2823 |
(self askIfAnyModified:'Text in %1 was not saved. Close anyway ?' yesButton:'Close') ifFalse:[ |
3154 | 2824 |
^ self |
2825 |
]. |
|
2826 |
||
2827 |
^ super closeRequest |
|
9341
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2828 |
! |
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2829 |
|
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2830 |
initialSyntax: aLanguage |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2831 |
self syntaxHolder value: aLanguage. |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2832 |
|
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2833 |
"Created: / 26-04-2012 / 12:26:48 / cg" |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2834 |
! |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
2835 |
|
9695 | 2836 |
postBuildEditModeInfoLabel:aLabel |
2837 |
aLabel menuHolder:self; menuMessage:#editModeInfoLabelMenu. |
|
2838 |
||
2839 |
"Created: / 22-01-2011 / 11:32:57 / cg" |
|
2840 |
! |
|
2841 |
||
9341
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2842 |
postBuildWith:aBuilder |
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
2843 |
super postBuildWith:aBuilder. |
9381 | 2844 |
self setCompilerForSyntax. |
2845 |
||
2846 |
self infoVisibilityChanged. "/ force geometry update |
|
2847 |
self autoDefineVariablesChanged. "/ force workspaceView update |
|
9695 | 2848 |
! |
2849 |
||
2850 |
postOpenWith:aBuilder |
|
2851 |
self windowGroup addPreEventHook:self. |
|
2852 |
super postOpenWith:aBuilder. |
|
2853 |
||
2854 |
"Created: / 22-01-2011 / 12:09:20 / cg" |
|
9746
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
2855 |
"Modified: / 08-02-2011 / 21:33:49 / cg" |
9695 | 2856 |
! |
2857 |
||
2858 |
processEvent:anEvent |
|
2859 |
"filter double click in line-label. |
|
2860 |
Return true, if I have eaten the event" |
|
2861 |
||
2862 |
anEvent isButtonMultiPressEvent ifTrue:[ |
|
2863 |
anEvent view name = 'CursorLineLabel' ifTrue:[ |
|
2864 |
self selectedWorkspace scrolledView gotoLine. |
|
2865 |
^ true |
|
2866 |
]. |
|
2867 |
]. |
|
2868 |
^ false |
|
2869 |
||
2870 |
"Created: / 22-01-2011 / 12:10:01 / cg" |
|
3154 | 2871 |
! ! |
2872 |
||
4359 | 2873 |
!WorkspaceApplication methodsFor:'menu-actions'! |
3154 | 2874 |
|
19407 | 2875 |
askForEncryptionKey |
2876 |
|key rememberKey| |
|
2877 |
||
2878 |
key := self objectAttributeAt:#rememberedSecretKey. |
|
2879 |
rememberKey := false. |
|
2880 |
Dialog |
|
2881 |
withOptoutOption:[rememberKey := true] |
|
2882 |
labelled:'Remember key during session' |
|
2883 |
do:[ |
|
2884 |
key := Dialog requestPassword:'Key' initialAnswer:key. |
|
2885 |
]. |
|
2886 |
key isEmptyOrNil ifTrue:[^ nil]. |
|
2887 |
||
2888 |
rememberKey ifTrue:[ |
|
2889 |
self objectAttributeAt:#rememberedSecretKey put:key. |
|
2890 |
] ifFalse:[ |
|
2891 |
self removeObjectAttribute:#rememberedSecretKey. |
|
2892 |
]. |
|
2893 |
||
2894 |
[key size < SkipJackCipher keySize] whileTrue:[ |
|
2895 |
key := key , key. |
|
2896 |
]. |
|
2897 |
key := key copyTo:SkipJackCipher keySize. |
|
2898 |
^ key |
|
2899 |
! |
|
2900 |
||
19423 | 2901 |
askForEncryptionKeyFor:algorithm |
19426 | 2902 |
|key rememberKeyHolder| |
19423 | 2903 |
|
2904 |
key := self objectAttributeAt:#rememberedSecretKey. |
|
19426 | 2905 |
|
2906 |
rememberKeyHolder := true asValue. |
|
2907 |
Dialog |
|
2908 |
modifyingBoxWith:[:box | |
|
2909 |
box verticalPanel add:((CheckBox label:'Remember key during session') model:rememberKeyHolder). |
|
2910 |
] do:[ |
|
19423 | 2911 |
key := Dialog requestPassword:'Key' initialAnswer:key. |
2912 |
]. |
|
2913 |
key isEmptyOrNil ifTrue:[^ nil]. |
|
2914 |
||
19426 | 2915 |
rememberKeyHolder value ifTrue:[ |
19423 | 2916 |
self objectAttributeAt:#rememberedSecretKey put:key. |
2917 |
] ifFalse:[ |
|
2918 |
self removeObjectAttribute:#rememberedSecretKey. |
|
2919 |
]. |
|
2920 |
||
2921 |
[key size < algorithm keySize] whileTrue:[ |
|
2922 |
key := key , key. |
|
2923 |
]. |
|
2924 |
key := key copyTo:algorithm keySize. |
|
2925 |
^ key |
|
2926 |
! |
|
2927 |
||
3752 | 2928 |
askForFilterBlock:message template:template rememberIn:nameOfClassVar |
2929 |
|filterBlockString filterBlock dialog textHolder classVarValue| |
|
2930 |
||
2931 |
classVarValue := self class classVarAt:nameOfClassVar ifAbsent:nil. |
|
2932 |
classVarValue isNil ifTrue:[ |
|
2933 |
self class classVarAt:nameOfClassVar put:template. |
|
2934 |
classVarValue := template. |
|
2935 |
]. |
|
2936 |
||
2937 |
textHolder := ValueHolder new. |
|
2938 |
dialog := Dialog |
|
2939 |
forRequestText:(resources string:message) |
|
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
2940 |
editViewClass:CodeView |
3752 | 2941 |
lines:25 |
2942 |
columns:70 |
|
2943 |
initialAnswer:classVarValue |
|
2944 |
model:textHolder. |
|
2945 |
dialog addButton:(Button label:'Template' action:[textHolder value:template. textHolder changed:#value.]). |
|
2946 |
dialog open. |
|
2947 |
dialog accepted ifFalse:[^ nil]. |
|
2948 |
||
2949 |
filterBlockString := textHolder value. |
|
2950 |
self class classVarAt:nameOfClassVar put:filterBlockString. |
|
2951 |
||
2952 |
filterBlock := Parser evaluate:filterBlockString. |
|
2953 |
filterBlock isBlock ifFalse:[ |
|
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
2954 |
self error:'bad input for block' mayProceed:true. |
3752 | 2955 |
^ nil |
2956 |
]. |
|
2957 |
||
2958 |
^ filterBlock |
|
2959 |
! |
|
2960 |
||
4474 | 2961 |
autoDefineVariablesChanged |
2962 |
|autoDefine| |
|
2963 |
||
2964 |
autoDefine := autoDefineVariables value. |
|
2965 |
UserPreferences current autoDefineWorkspaceVariables:(autoDefine == #workspace). |
|
2966 |
workspaces do:[:each | |
|
2967 |
each autoDefineVariables:autoDefine |
|
2968 |
]. |
|
2969 |
! |
|
2970 |
||
3198 | 2971 |
basicInspectIt |
2972 |
self inspectIt:true |
|
2973 |
! |
|
2974 |
||
3383
fb3b6909bd1a
+ browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents:
3347
diff
changeset
|
2975 |
browseImplementorsOfIt |
fb3b6909bd1a
+ browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents:
3347
diff
changeset
|
2976 |
self selectedWorkspacesTextView browseImplementorsOfIt |
fb3b6909bd1a
+ browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents:
3347
diff
changeset
|
2977 |
! |
fb3b6909bd1a
+ browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents:
3347
diff
changeset
|
2978 |
|
3154 | 2979 |
browseIt |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2980 |
|ws| |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2981 |
|
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2982 |
ws := self selectedWorkspacesTextView. |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2983 |
ws notNil ifTrue:[ |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2984 |
ws browseIt |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
2985 |
] |
3154 | 2986 |
! |
2987 |
||
3383
fb3b6909bd1a
+ browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents:
3347
diff
changeset
|
2988 |
browseReferencesToIt |
fb3b6909bd1a
+ browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents:
3347
diff
changeset
|
2989 |
self selectedWorkspacesTextView browseReferencesToIt |
fb3b6909bd1a
+ browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents:
3347
diff
changeset
|
2990 |
! |
fb3b6909bd1a
+ browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents:
3347
diff
changeset
|
2991 |
|
4136 | 2992 |
clearHistory |
2993 |
Workspace clearDoItHistory |
|
2994 |
! |
|
2995 |
||
11496 | 2996 |
compareTextAgainst |
2997 |
|ws otherText thisText| |
|
2998 |
||
2999 |
ws := self selectedWorkspace scrolledView. |
|
3000 |
ws isTextView ifFalse:[ |
|
3001 |
^ self |
|
3002 |
]. |
|
3003 |
||
3004 |
ws hasSelection ifTrue:[ |
|
3005 |
thisText := ws selectionAsString. |
|
3006 |
] ifFalse:[ |
|
3007 |
thisText := ws contents asString. |
|
3008 |
]. |
|
3009 |
||
3010 |
otherText := Dialog requestText:'Paste other text below:'. |
|
3011 |
otherText isEmptyOrNil ifTrue:[^ self ]. |
|
3012 |
||
3013 |
DiffTextView |
|
3014 |
openOn: thisText label: 'Workspace' |
|
3015 |
and: otherText label: 'Other Text' |
|
3016 |
title: 'Comparing Workspace Contents' |
|
3017 |
||
3018 |
"Created: / 04-05-2012 / 15:35:32 / cg" |
|
3019 |
! |
|
3020 |
||
3154 | 3021 |
doIt |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3022 |
|ws| |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3023 |
|
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3024 |
ws := self selectedWorkspacesTextView. |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3025 |
ws notNil ifTrue:[ |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3026 |
ws doIt |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3027 |
] |
3154 | 3028 |
! |
3029 |
||
19423 | 3030 |
encryptionAlgorithm |
3031 |
^ SkipJackCipher. |
|
3032 |
! |
|
3033 |
||
3154 | 3034 |
inspectIt |
3198 | 3035 |
self inspectIt:false |
3036 |
! |
|
3037 |
||
4086
9f685ed7ad3f
autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents:
4031
diff
changeset
|
3038 |
inspectIt:isBasicInspector |
9f685ed7ad3f
autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents:
4031
diff
changeset
|
3039 |
|ws| |
3196 | 3040 |
|
3198 | 3041 |
ws := self selectedWorkspacesTextView. |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3042 |
ws isNil ifTrue:[ |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3043 |
"there is none - i.e. it is a HTMLDocumentView" |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3044 |
^ self. |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3045 |
]. |
3196 | 3046 |
ws |
3047 |
do:(ws selection) |
|
3048 |
withValueDo:[:result | |
|
4096
1c393b3edbcd
Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents:
4086
diff
changeset
|
3049 |
self addInspectorOn:result basic:isBasicInspector suppressPseudoSlots:false |
3196 | 3050 |
] |
3051 |
||
3052 |
"/ self selectedWorkspace inspectIt |
|
3154 | 3053 |
! |
3054 |
||
3812 | 3055 |
inspectWorkspaceVariables |
3056 |
|wsvars| |
|
3057 |
||
3058 |
wsvars := Workspace workspaceVariables. |
|
3059 |
wsvars size == 0 ifTrue:[ |
|
3060 |
Dialog information:'No Workspace Variables are defined'. |
|
3061 |
^ self |
|
3062 |
]. |
|
3063 |
wsvars inspect |
|
3064 |
! |
|
3065 |
||
10169 | 3066 |
loadFile:aFileName encoding:encodingSymbolOrNil label:label |
3067 |
||
3068 |
"This small hack allows programmers to have their own |
|
3069 |
MyWorkspace.wsp in their ~/.smalltalk directory" |
|
3070 |
||
3071 |
| f | |
|
3072 |
f := aFileName asFilename. |
|
3073 |
(f exists not and:[f isAbsolute not]) ifTrue:[ |
|
3074 |
f := Filename homeDirectory / '.smalltalk' / f pathName. |
|
3075 |
f exists ifFalse:[ |
|
3076 |
(aFileName = 'MyWorkspace.wsp') |
|
3077 |
ifTrue: |
|
3078 |
[| s| |
|
3079 |
s := f writeStream. |
|
3080 |
[s nextPutAll:'"Edit and save as ', f pathName , '"'] |
|
3081 |
ensure:[s close]] |
|
3082 |
ifFalse: |
|
3083 |
[f := aFileName asFilename] |
|
3084 |
]]. |
|
3085 |
^super loadFile:f pathName encoding:encodingSymbolOrNil label:label |
|
3086 |
||
3087 |
"Created: / 23-12-2009 / 10:13:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3088 |
"Modified: / 11-02-2010 / 10:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3089 |
! |
|
3090 |
||
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3091 |
manageSnippets |
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3092 |
|bindings listOfSnippets removeAction pasteAction |
7931 | 3093 |
hasSelectionHolder removeEnabledHolder pasteEnabledHolder |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3094 |
selectedSnippetHolder selectedSnippetsTextHolder selectedSnippetsKeyHolder |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3095 |
selectedSnippetsName |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3096 |
snippetsDictionary defineEnabledHolder defineAction |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3097 |
snippetTextAcceptHolder snippetTextModifiedHolder |
16260 | 3098 |
loadFileAction saveFileAction| |
13500 | 3099 |
|
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3100 |
snippetsDictionary := Workspace snippets. |
13500 | 3101 |
snippetsDictionary isEmptyOrNil ifTrue:[ |
3102 |
Dialog information:(resources string:'No Snippets to Manage'). |
|
7944
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
3103 |
^ self. |
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
3104 |
]. |
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
3105 |
|
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3106 |
listOfSnippets := List withAll:(snippetsDictionary keysSorted). |
15273
a6606b8ea2f6
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15234
diff
changeset
|
3107 |
selectedSnippetsTextHolder := ValueHolder with:''. |
a6606b8ea2f6
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15234
diff
changeset
|
3108 |
selectedSnippetsKeyHolder := ValueHolder with:''. |
13500 | 3109 |
|
3110 |
selectedSnippetHolder := nil asValue. |
|
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3111 |
selectedSnippetHolder |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3112 |
onChangeEvaluate:[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3113 |
(selectedSnippetHolder value) isNil ifTrue:[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3114 |
selectedSnippetsName := nil. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3115 |
selectedSnippetsTextHolder value:''. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3116 |
selectedSnippetsKeyHolder value:nil. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3117 |
] ifFalse:[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3118 |
selectedSnippetsName := listOfSnippets at:(selectedSnippetHolder value). |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3119 |
selectedSnippetsKeyHolder value:selectedSnippetsName. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3120 |
selectedSnippetsTextHolder value:(snippetsDictionary at:selectedSnippetsName). |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3121 |
]. |
7931 | 3122 |
]. |
3123 |
||
18762 | 3124 |
hasSelectionHolder := BlockValue with:[:m | m notNil] argument:selectedSnippetHolder. |
7931 | 3125 |
removeEnabledHolder := hasSelectionHolder. |
3126 |
pasteEnabledHolder := hasSelectionHolder. |
|
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3127 |
defineEnabledHolder := |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3128 |
BlockValue |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3129 |
with:[:key :text| |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3130 |
key notEmptyOrNil |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3131 |
and:[(snippetsDictionary includesKey:key) not |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3132 |
or:[ (snippetsDictionary at:key) ~= text]] |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3133 |
] |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3134 |
argument: selectedSnippetsKeyHolder argument: selectedSnippetsTextHolder. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3135 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3136 |
removeAction := |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3137 |
[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3138 |
snippetsDictionary removeKey:selectedSnippetsName. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3139 |
listOfSnippets remove:selectedSnippetsName. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3140 |
]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3141 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3142 |
pasteAction := |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3143 |
[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3144 |
|text| |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3145 |
text := snippetsDictionary at:selectedSnippetsName. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3146 |
self paste:text |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3147 |
]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3148 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3149 |
defineAction := |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3150 |
[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3151 |
|originalText newText key| |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3152 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3153 |
key := selectedSnippetsKeyHolder value. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3154 |
key notEmptyOrNil ifTrue:[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3155 |
originalText := snippetsDictionary at:key ifAbsent:nil. "/ selectedSnippetsName. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3156 |
newText := selectedSnippetsTextHolder value withoutTrailingSeparators. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3157 |
originalText ~= newText ifTrue:[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3158 |
snippetsDictionary at: key put: newText. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3159 |
snippetTextModifiedHolder value:false. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3160 |
]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3161 |
]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3162 |
defineEnabledHolder recomputeValue. |
8286 | 3163 |
]. |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3164 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3165 |
loadFileAction := |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3166 |
[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3167 |
|file fileSnippets| |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3168 |
|
16260 | 3169 |
file := Dialog requestFileName:'Load Snippet Definition File' default:(LastSnippetFilename ? 'snippets.txt'). |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3170 |
file notEmptyOrNil ifTrue:[ |
16260 | 3171 |
LastSnippetFilename := file. |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3172 |
file asFilename readingFileDo:[:s | |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3173 |
fileSnippets := (Object readFrom:s onError:#()) decodeAsLiteralArray. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3174 |
]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3175 |
fileSnippets notEmptyOrNil ifTrue:[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3176 |
snippetsDictionary declareAllFrom:fileSnippets. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3177 |
listOfSnippets contents:(snippetsDictionary keysSorted). |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3178 |
selectedSnippetHolder value:nil. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3179 |
selectedSnippetsTextHolder value:''. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3180 |
selectedSnippetsKeyHolder value:''. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3181 |
] |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3182 |
] |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3183 |
]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3184 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3185 |
saveFileAction := |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3186 |
[ |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3187 |
|file| |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3188 |
|
16260 | 3189 |
file := Dialog requestFileName:'Save Snippet Definition File' default:(LastSnippetFilename ? 'snippets.txt'). |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3190 |
file notEmptyOrNil ifTrue:[ |
16260 | 3191 |
LastSnippetFilename := file. |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3192 |
file asFilename writingFileDo:[:s | |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3193 |
s nextPutLine:'#( Dictionary'. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3194 |
snippetsDictionary keys asSortedCollection do:[:k | |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3195 |
k storeOn:s. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3196 |
s spaces:2. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3197 |
(snippetsDictionary at:k) storeOn:s. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3198 |
s cr. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3199 |
]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3200 |
s nextPutLine:')'. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3201 |
] |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3202 |
] |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3203 |
]. |
7931 | 3204 |
|
3205 |
bindings := IdentityDictionary new. |
|
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3206 |
bindings at:#listOfSnippets put:listOfSnippets. |
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3207 |
bindings at:#selectedSnippet put:selectedSnippetHolder asValue. |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3208 |
bindings at:#selectedSnippetsKeyHolder put:selectedSnippetsKeyHolder. |
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3209 |
bindings at:#selectedSnippetsText put:selectedSnippetsTextHolder. |
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3210 |
bindings at:#removeSelectedSnippet put:removeAction. |
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3211 |
bindings at:#pasteSelectedSnippet put:pasteAction. |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3212 |
bindings at:#defineSelectedSnippet put:defineAction. |
7931 | 3213 |
bindings at:#removeEnabled put:removeEnabledHolder. |
8286 | 3214 |
bindings at:#pasteEnabled put:pasteEnabledHolder. |
14837
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3215 |
bindings at:#defineEnabled put:defineEnabledHolder. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3216 |
bindings at:#menuOpenSnippetFile put:loadFileAction. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3217 |
bindings at:#menuSaveSnippetFileAs put:saveFileAction. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3218 |
bindings at:#closeSnippetDialog put:[:a :menu | menu topView closeRequest]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3219 |
bindings at:#snippetTextAcceptHolder put:(snippetTextAcceptHolder := TriggerValue new). |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3220 |
bindings at:#snippetTextModified put:(snippetTextModifiedHolder := TriggerValue new). |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3221 |
bindings at:#openSnippetDocumentation put:[self halt. self openHTMLDocument: 'tools/misc/TOP.html#WORKSPACE']. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3222 |
|
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3223 |
snippetTextModifiedHolder onChangeEvaluate:[snippetTextAcceptHolder value:true. defineEnabledHolder recomputeValue ]. |
d7de71154d37
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14830
diff
changeset
|
3224 |
selectedSnippetsKeyHolder onChangeEvaluate:[defineEnabledHolder recomputeValue ]. |
7931 | 3225 |
|
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3226 |
self openDialogInterface:#manageSnippetsDialogSpec withBindings:bindings |
18762 | 3227 |
|
3228 |
"Modified: / 17-05-2019 / 15:59:10 / Stefan Vogel" |
|
7931 | 3229 |
! |
3230 |
||
19391 | 3231 |
menuLoadEncryptedFrom |
19423 | 3232 |
|algorithm key| |
3233 |
||
3234 |
algorithm := self encryptionAlgorithm. |
|
3235 |
||
3236 |
key := self askForEncryptionKeyFor:algorithm. |
|
19407 | 3237 |
key isNil ifTrue:[^ self]. |
19391 | 3238 |
|
3239 |
self |
|
3240 |
askForFile:'Load Encrypted From:' |
|
3241 |
default:(self defaultFileNameForSave) |
|
19421 | 3242 |
forSave:false |
19423 | 3243 |
thenDo:[:file | |
19424 | 3244 |
|ws blob pos1 pos2 contents lbl cipher crypt plaintext szString sz start| |
19391 | 3245 |
|
3246 |
contents := file asFilename binaryContents. |
|
3247 |
||
3248 |
ws := self selectedWorkspacesTextView. |
|
19423 | 3249 |
cipher := algorithm new key:key mode:#CBC . |
19425 | 3250 |
|
3251 |
"/ there are 64 random bytes before the actual text, |
|
3252 |
"/ and the size info is somewhere in there |
|
19424 | 3253 |
blob := (cipher decrypt:contents) asString. |
3254 |
pos1 := (blob indexOf:(Character null))+1. |
|
3255 |
pos2 := (blob indexOf:(Character space) startingAt:pos1)-1. |
|
3256 |
szString := blob copyFrom:pos1 to:pos2. |
|
3257 |
sz := Integer readFrom:szString. |
|
3258 |
||
3259 |
plaintext := blob copyFrom:65 to:(65+sz-1). |
|
19391 | 3260 |
ws contents:plaintext. |
19421 | 3261 |
ws defaultFileNameForFileDialog:file asFilename baseName. |
19391 | 3262 |
] |
3263 |
! |
|
3264 |
||
13852 | 3265 |
menuSQLConnect |
3266 |
||
3267 |
self selectedWorkspaceApplication menuConnect |
|
3268 |
||
3269 |
"Created: / 11-05-2012 / 10:00:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3270 |
! |
|
3271 |
||
10169 | 3272 |
menuSave |
10786
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3273 |
|ws file| |
10169 | 3274 |
|
3275 |
ws := self selectedWorkspace scrolledView. |
|
3276 |
ws isTextView ifFalse:[ |
|
3277 |
self shouldImplement:'Functionality not yet implemented'. |
|
3278 |
]. |
|
3279 |
file := ws defaultFileNameForFileDialog. |
|
10786
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3280 |
file |
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3281 |
ifNil:[ |
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3282 |
self menuSaveAs. |
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3283 |
^ self |
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3284 |
]. |
10169 | 3285 |
ws saveAs:file doAppend:false. |
10786
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3286 |
ws isCodeView2 ifTrue:[ |
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3287 |
ws beUnmodified |
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3288 |
] |
10169 | 3289 |
|
3290 |
"Created: / 21-06-2011 / 11:42:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3291 |
"Modified (format): / 05-07-2011 / 15:44:27 / cg" |
|
10786
2499584c6260
changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents:
10730
diff
changeset
|
3292 |
"Modified: / 08-10-2011 / 12:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10169 | 3293 |
! |
3294 |
||
19391 | 3295 |
menuSaveEncryptedAs |
19423 | 3296 |
|algorithm key| |
3297 |
||
3298 |
algorithm := self encryptionAlgorithm. |
|
3299 |
||
3300 |
key := self askForEncryptionKeyFor:algorithm. |
|
19407 | 3301 |
key isNil ifTrue:[^ self]. |
19391 | 3302 |
|
3303 |
self |
|
3304 |
askForFile:'Save Encrypted Buffer in:' |
|
3305 |
default:(self defaultFileNameForSave) |
|
19421 | 3306 |
forSave:true |
19391 | 3307 |
thenDo:[:file :doAppend | |
19444 | 3308 |
|bs ws contents lbl cipher crypted rndBytes pos sz fn| |
3309 |
||
3310 |
fn := file asFilename. |
|
19423 | 3311 |
|
3312 |
bs := algorithm blockSize. |
|
19391 | 3313 |
ws := self selectedWorkspacesTextView. |
3314 |
contents := ws contentsAsString. |
|
19444 | 3315 |
sz := contents size. |
19424 | 3316 |
|
3317 |
"/ place the size info at some random position within the random bytes |
|
3318 |
rndBytes := ByteArray withAll:((Random next:64 between:1 and:255) collect:#rounded). |
|
3319 |
pos := Random nextIntegerBetween:20 and:50. |
|
3320 |
rndBytes at:pos put:0. |
|
19444 | 3321 |
rndBytes replaceFrom:pos+1 with:(sz printString , ' '). |
19424 | 3322 |
rndBytes := rndBytes asString. |
3323 |
||
3324 |
contents := rndBytes , contents. |
|
19444 | 3325 |
contents := contents , (String new:(sz nextMultipleOf:bs)). |
19424 | 3326 |
cipher := algorithm new key:key mode:#CBC. |
3327 |
||
3328 |
crypted := cipher encrypt:contents. |
|
19444 | 3329 |
fn writingFileDo:[:s | |
19391 | 3330 |
s binary. |
19424 | 3331 |
s nextPutAll:crypted. |
19391 | 3332 |
]. |
19444 | 3333 |
ws defaultFileNameForFileDialog:fn baseName. |
19443 | 3334 |
ws isCodeView2 ifTrue:[ |
3335 |
ws beUnmodified |
|
3336 |
] |
|
19391 | 3337 |
] |
3338 |
! |
|
3339 |
||
7403
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
3340 |
newEvaluationWorkspace |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
3341 |
self class openEvaluationWorkspace |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
3342 |
|
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
3343 |
"Created: / 13-10-2006 / 12:19:47 / cg" |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
3344 |
! |
73712386ea82
menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents:
6865
diff
changeset
|
3345 |
|
3334 | 3346 |
newSystemWorkspace |
3347 |
self class openSystemWorkspace |
|
3348 |
! |
|
3349 |
||
3154 | 3350 |
openDocumentation |
3351 |
"opens the documentation file" |
|
19248 | 3352 |
"Called when <F1> is pressed" |
3154 | 3353 |
|
3354 |
self openHTMLDocument: 'tools/misc/TOP.html#WORKSPACE' |
|
3355 |
! |
|
3356 |
||
13581
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
3357 |
openEditingDocumentation |
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
3358 |
"opens the documentation file" |
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
3359 |
|
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
3360 |
self openHTMLDocument: 'tools/codeeditor.html' |
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
3361 |
! |
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
3362 |
|
4267 | 3363 |
pasteAndExecute:aString |
3364 |
self paste:aString. |
|
4136 | 3365 |
self printIt |
3366 |
! |
|
3367 |
||
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3368 |
pasteSnippet |
13500 | 3369 |
|allSnippets snippetToPaste snippetsDictionary| |
3370 |
||
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3371 |
snippetsDictionary := Workspace snippets. |
13500 | 3372 |
snippetsDictionary isEmptyOrNil ifTrue:[ |
3373 |
Dialog information:(resources string:'No Snippet to Paste'). |
|
7944
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
3374 |
^ self. |
3d185d0ca8e9
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7931
diff
changeset
|
3375 |
]. |
13500 | 3376 |
allSnippets := snippetsDictionary keysSorted. |
3377 |
||
3378 |
snippetToPaste := Dialog |
|
3379 |
choose:(resources string:'Paste Snippet:') |
|
3380 |
fromList:allSnippets |
|
7931 | 3381 |
lines:10. |
13500 | 3382 |
snippetToPaste isNil ifTrue:[ |
7931 | 3383 |
^ self |
3384 |
]. |
|
13500 | 3385 |
self paste:(snippetsDictionary at:snippetToPaste) withCRs. |
9616 | 3386 |
|
3387 |
"Modified: / 29-10-2010 / 10:21:29 / cg" |
|
7931 | 3388 |
! |
3389 |
||
3154 | 3390 |
printIt |
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3391 |
|ws| |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3392 |
|
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3393 |
ws := self selectedWorkspacesTextView. |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3394 |
ws notNil ifTrue:[ |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3395 |
ws printIt |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3396 |
] |
3193 | 3397 |
! |
3398 |
||
12028 | 3399 |
profileIt |
3400 |
self selectedWorkspacesTextView profileIt |
|
3401 |
! |
|
3402 |
||
4136 | 3403 |
redoLastDoIt |
4267 | 3404 |
|s| |
4136 | 3405 |
|
4267 | 3406 |
s := self lastDoItsString. |
3407 |
s notNil ifTrue:[ |
|
3408 |
self pasteAndExecute:s |
|
3409 |
] |
|
4136 | 3410 |
! |
3411 |
||
3722 | 3412 |
removeAllWorkspaceVariables |
5846 | 3413 |
(Dialog confirm:(resources string:'Do you really want to remove all Workspace Variables ?')) |
3722 | 3414 |
ifTrue:[ |
3415 |
Workspace removeAllWorkspaceVariables |
|
3416 |
]. |
|
3417 |
! |
|
3418 |
||
4284 | 3419 |
removeGlobalVariable |
3420 |
|name nameKey selection value| |
|
3421 |
||
3422 |
selection := self selectedWorkspacesTextView selection ? ''. |
|
3423 |
||
3424 |
name := Dialog |
|
3425 |
request:'Remove Global Variable:' |
|
3426 |
initialAnswer:(selection asString string) |
|
3427 |
okLabel:'Remove' |
|
3428 |
title:'Remove Global'. |
|
3429 |
||
3430 |
name size == 0 ifTrue:[^ self]. |
|
3431 |
nameKey := name asSymbolIfInterned. |
|
3432 |
nameKey isNil ifTrue:[^ self]. |
|
3433 |
||
3434 |
(Smalltalk includesKey:nameKey) ifFalse:[ |
|
3435 |
self warn:('No such Global Binding: ''%1''.' bindWith:name). |
|
3436 |
^ self. |
|
3437 |
]. |
|
3438 |
||
3439 |
value := Smalltalk at:nameKey. |
|
3440 |
value notNil ifTrue:[ |
|
3441 |
(self confirm:('Global ''%1'' is currently bound to %2\\Remove Binding ?' bindWith:name with:value) withCRs) |
|
3442 |
ifFalse:[ |
|
3443 |
^ self. |
|
3444 |
]. |
|
3445 |
]. |
|
3446 |
Smalltalk at:nameKey put:nil. |
|
3447 |
Smalltalk removeKey:nameKey |
|
3448 |
! |
|
3449 |
||
7931 | 3450 |
removeSharedPool |
3451 |
|poolToRemove| |
|
3452 |
||
3453 |
poolsConsideredInDoIts isEmptyOrNil ifTrue:[ |
|
3454 |
Dialog information:'No pools have been added yet'. |
|
3455 |
^ self. |
|
3456 |
]. |
|
3457 |
||
3458 |
poolToRemove := Dialog |
|
3459 |
choose:'Pool to Remove (No longer known in doIt-Evaluations):' |
|
3460 |
fromList:(poolsConsideredInDoIts asOrderedCollection sort) |
|
3461 |
lines:10. |
|
3462 |
||
3463 |
poolToRemove isNil ifTrue:[ |
|
3464 |
^ self |
|
3465 |
]. |
|
3466 |
poolsConsideredInDoIts remove:poolToRemove. |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3467 |
workspaces do:[:eachWs | |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3468 |
|ws| |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3469 |
ws := self workspaceViewOfView:eachWs. |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3470 |
ws notNil ifTrue:[ |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3471 |
ws poolsConsideredInDoIts:poolsConsideredInDoIts. |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3472 |
]. |
7931 | 3473 |
]. |
3474 |
||
3475 |
"Modified: / 24-11-2006 / 12:44:16 / cg" |
|
3476 |
! |
|
3477 |
||
3722 | 3478 |
removeWorkspaceVariable |
6266 | 3479 |
|name selection wsVarNames| |
3812 | 3480 |
|
6266 | 3481 |
wsVarNames := Workspace workspaceVariableNames. |
3482 |
wsVarNames isEmpty ifTrue:[ |
|
3812 | 3483 |
Dialog information:'No Workspace Variables are defined'. |
3484 |
^ self |
|
3485 |
]. |
|
3722 | 3486 |
|
3487 |
selection := self selectedWorkspacesTextView selection ? ''. |
|
3488 |
||
3489 |
name := Dialog |
|
3490 |
request:'Variable to remove:' |
|
3491 |
initialAnswer:(selection asString string) |
|
3492 |
okLabel:'Remove' |
|
3493 |
title:'Enter Variable Name' |
|
6266 | 3494 |
list:(wsVarNames asOrderedCollection sort). |
3495 |
name isEmptyOrNil ifTrue:[ |
|
3722 | 3496 |
^ self |
3497 |
]. |
|
3498 |
Workspace removeWorkspaceVariable:name. |
|
6266 | 3499 |
|
3500 |
"Modified: / 20-04-2005 / 11:56:28 / cg" |
|
3722 | 3501 |
! |
3502 |
||
10169 | 3503 |
renameWorkspace:wsIndex to:newName |
3504 |
|tabList| |
|
3505 |
||
3506 |
tabList := self tabList. |
|
3507 |
tabList notEmpty ifTrue:[ |
|
3508 |
tabList at:wsIndex put:newName. |
|
3509 |
]. |
|
3510 |
wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[ |
|
3511 |
self setWindowLabel: newName. |
|
3512 |
]. |
|
3513 |
! |
|
3514 |
||
9746
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3515 |
setCompilerForSyntax |
11811
41a4ebfe2da2
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11799
diff
changeset
|
3516 |
|selectedWorkspace ws| |
11654
7ac01328f0ef
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11627
diff
changeset
|
3517 |
|
7ac01328f0ef
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11627
diff
changeset
|
3518 |
(selectedWorkspace := self selectedWorkspace) notNil ifTrue:[ |
11811
41a4ebfe2da2
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11799
diff
changeset
|
3519 |
(ws := self workspaceViewOfView:selectedWorkspace) notNil ifTrue:[ |
41a4ebfe2da2
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11799
diff
changeset
|
3520 |
self setCompilerForSyntaxIn:ws. |
41a4ebfe2da2
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11799
diff
changeset
|
3521 |
] |
11654
7ac01328f0ef
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11627
diff
changeset
|
3522 |
]. |
7ac01328f0ef
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11627
diff
changeset
|
3523 |
|
11811
41a4ebfe2da2
changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents:
11799
diff
changeset
|
3524 |
"Modified: / 26-09-2012 / 11:55:59 / cg" |
9746
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3525 |
! |
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3526 |
|
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3527 |
setCompilerForSyntaxIn:aWorkspace |
11826 | 3528 |
|compilerClass language| |
9746
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3529 |
|
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3530 |
language := self syntaxHolder value. |
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3531 |
language isSymbol ifTrue:[ |
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3532 |
language := ProgrammingLanguage named:language |
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3533 |
]. |
11612 | 3534 |
language isNil ifTrue:[ |
11826 | 3535 |
compilerClass := nil |
11612 | 3536 |
] ifFalse:[ |
17719 | 3537 |
"/ compilerClass := (language evaluatorClass "self compilerClassForSyntaxName:syntax"). |
17720 | 3538 |
compilerClass := (language compilerClass ? language evaluatorClass "self compilerClassForSyntaxName:syntax"). |
11612 | 3539 |
]. |
11826 | 3540 |
[ |
3541 |
"/ could be a non-text view (VT100Terminal) |
|
3542 |
aWorkspace compilerClass:compilerClass. |
|
13581
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
3543 |
aWorkspace editedLanguage:language. |
11826 | 3544 |
] on:MessageNotUnderstood do:[]. |
3545 |
||
11612 | 3546 |
self smalltalkMenuEnabledHolder value:(language notNil and:[language isSmalltalk]). |
9746
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3547 |
|
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3548 |
"Created: / 08-02-2011 / 21:32:39 / cg" |
10602 | 3549 |
"Modified: / 17-08-2011 / 08:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17720 | 3550 |
"Modified: / 22-10-2017 / 21:06:53 / cg" |
9746
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3551 |
! |
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
3552 |
|
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3553 |
setNameSpaceForDoIts |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3554 |
|selectedWorkspace ws| |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3555 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3556 |
(selectedWorkspace := self selectedWorkspace) notNil ifTrue:[ |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3557 |
(ws := self workspaceViewOfView:selectedWorkspace) notNil ifTrue:[ |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3558 |
(self compilerClassOf:selectedWorkspace) notNil ifTrue:[ |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3559 |
ws nameSpaceForDoits:(self namespaceHolder value). |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3560 |
]. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3561 |
] |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3562 |
]. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3563 |
! |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
3564 |
|
3384 | 3565 |
spyOnIt |
3566 |
self selectedWorkspacesTextView spyOnIt |
|
3567 |
! |
|
3568 |
||
10169 | 3569 |
switchToBookmarkEntry: bookmark |
11829
2e8997ff4629
changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents:
11826
diff
changeset
|
3570 |
| ws file app | |
10169 | 3571 |
|
3572 |
ws := self selectedWorkspace scrolledView. |
|
11725
0b626c2b4b2d
Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
3573 |
(ws isApplicationSubView) ifTrue:[ |
11829
2e8997ff4629
changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents:
11826
diff
changeset
|
3574 |
((app := ws application) respondsTo:#switchToBookmarkEntry:) ifTrue:[ |
2e8997ff4629
changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents:
11826
diff
changeset
|
3575 |
app switchToBookmarkEntry: bookmark |
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
3576 |
]. |
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
3577 |
^ self. |
10169 | 3578 |
]. |
3579 |
||
3580 |
bookmark isFileBookmark ifTrue:[ |
|
3581 |
file := bookmark path asFilename. |
|
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
3582 |
(ws isTextView not or:[ws contents notEmpty]) ifTrue:[ |
10169 | 3583 |
self addWindow: (self createWorkspace) named: file withoutSuffix baseName. |
3584 |
]. |
|
3585 |
file exists ifFalse:[ |
|
18595 | 3586 |
Transcript showCR:'Bookmarked workspace file no longer exists: %1' with:file |
10169 | 3587 |
] ifTrue:[ |
18595 | 3588 |
self loadFile:file. |
10169 | 3589 |
]. |
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
3590 |
^ self. |
10169 | 3591 |
]. |
3592 |
||
3593 |
"Created: / 20-06-2011 / 22:45:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3594 |
"Modified: / 21-06-2011 / 08:18:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10730
23c04d952143
much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents:
10602
diff
changeset
|
3595 |
"Modified: / 28-09-2011 / 07:44:53 / cg" |
18595 | 3596 |
"Modified: / 15-02-2019 / 09:45:01 / Claus Gittinger" |
10169 | 3597 |
! |
3598 |
||
13413
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
3599 |
terminateBackgroundProcesses |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
3600 |
Processor activeProcess terminateAllSubprocessesInGroup |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
3601 |
! |
1e726d57eeca
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12942
diff
changeset
|
3602 |
|
3384 | 3603 |
timeIt |
3604 |
self selectedWorkspacesTextView timeIt |
|
3154 | 3605 |
! ! |
3606 |
||
8763 | 3607 |
!WorkspaceApplication methodsFor:'menu-actions-adding'! |
3608 |
||
10169 | 3609 |
addBookmark |
3610 |
||
3611 |
self menuAddBookmarkTo: self bookmarks root. |
|
3612 |
||
3613 |
"Created: / 20-06-2011 / 22:34:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3614 |
"Modified: / 21-06-2011 / 08:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3615 |
! |
|
3616 |
||
8763 | 3617 |
addClassVariableInspector |
3618 |
|v| |
|
3619 |
||
3620 |
ClassVariablesInspectorView isNil ifTrue:[ |
|
3621 |
self error:'Missing class: "ClassVariablesInspectorView"'. |
|
3622 |
^ self. |
|
3623 |
]. |
|
3624 |
v := self addInspectorOn:Smalltalk inspectorClass:ClassVariablesInspectorView suppressPseudoSlots:true. |
|
3625 |
||
3626 |
v fieldListLabel:'Name'. |
|
3627 |
self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Class Variables'. |
|
3628 |
||
3629 |
"Modified: / 22-10-2006 / 11:28:14 / cg" |
|
3630 |
! |
|
3631 |
||
3632 |
addEvaluationWorkspace |
|
3633 |
^ self addWindow:(self createEvaluationWorkspace) named:'Eval%1' |
|
3634 |
||
3635 |
"Modified: / 13-10-2006 / 12:16:35 / cg" |
|
3636 |
! |
|
3637 |
||
3638 |
addGlobalVariable |
|
3639 |
|name nameKey selection| |
|
3640 |
||
3641 |
selection := self selectedWorkspacesTextView selection ? ''. |
|
3642 |
||
3643 |
name := Dialog |
|
3644 |
request:'Name of new Global Variable:' |
|
3645 |
initialAnswer:(selection asString string) |
|
3646 |
okLabel:'Add' |
|
3647 |
title:'Enter Variable Name'. |
|
3648 |
name size == 0 ifTrue:[ |
|
3649 |
^ self |
|
3650 |
]. |
|
3651 |
nameKey := name asSymbol. |
|
3652 |
||
3653 |
(Smalltalk includesKey:nameKey) ifTrue:[ |
|
3654 |
self warn:'Global named ''' , name , ''' already exists.'. |
|
3655 |
^ self. |
|
3656 |
]. |
|
3657 |
Smalltalk at:nameKey put:nil. |
|
3658 |
! |
|
3659 |
||
3660 |
addGlobalVariableInspector |
|
3661 |
^ self addNamespaceInspectorFor:Smalltalk |
|
3662 |
||
3663 |
"Modified: / 29-05-2007 / 19:08:58 / cg" |
|
3664 |
! |
|
3665 |
||
3666 |
addInspectorOn:aValue basic:isBasicInspector suppressPseudoSlots:suppressPseudoSlots |
|
3667 |
|inspectorClass| |
|
3668 |
||
3669 |
isBasicInspector ifFalse:[ |
|
12737 | 3670 |
"/ Inspector2 does not work yet!! |
3671 |
"(Tools::Inspector2 notNil and:[UserPreferences current useInspector2])" false ifTrue:[ |
|
3672 |
inspectorClass := Tools::Inspector2. |
|
3673 |
] ifFalse:[ |
|
3674 |
inspectorClass := aValue inspectorClass. |
|
3675 |
]. |
|
8763 | 3676 |
]. |
3677 |
inspectorClass isNil ifTrue:[ |
|
3678 |
inspectorClass := InspectorView |
|
3679 |
]. |
|
3680 |
||
3681 |
^ self |
|
3682 |
addInspectorOn:aValue |
|
3683 |
inspectorClass:inspectorClass |
|
3684 |
suppressPseudoSlots:suppressPseudoSlots |
|
3685 |
! |
|
3686 |
||
3687 |
addInspectorOn:aValue inspectorClass:inspectorClass suppressPseudoSlots:suppressPseudoSlots |
|
3688 |
|view resultString| |
|
3689 |
||
3690 |
view := inspectorClass new. |
|
3691 |
view suppressPseudoSlots:suppressPseudoSlots. |
|
3692 |
view inspect:aValue. |
|
3693 |
"/ v allowFollow:true. |
|
3694 |
aValue isBehavior ifTrue:[ |
|
3695 |
resultString := aValue name |
|
3696 |
] ifFalse:[ |
|
3697 |
resultString := aValue classNameWithArticle |
|
3698 |
]. |
|
3699 |
self addWindow:view named:('Inspecting: ' , resultString). |
|
3700 |
^ view |
|
3701 |
! |
|
3702 |
||
3703 |
addMyWorkspace |
|
16261 | 3704 |
|ws f| |
8763 | 3705 |
|
10169 | 3706 |
self |
16261 | 3707 |
addWindow:(ws := self createWorkspaceView) |
10169 | 3708 |
named:'My Workspace' |
3709 |
asFirst:false. |
|
3710 |
||
3711 |
f := Filename homeDirectory / 'MyWorkspace.wsp'. |
|
3712 |
f exists ifFalse:[ |
|
3713 |
f := Filename homeDirectory / '.smalltalk' / 'MyWorkspace.wsp'. |
|
3714 |
f exists ifFalse:[ |
|
3715 |
f := 'MyWorkspace.wsp' asFilename |
|
3716 |
] |
|
3717 |
]. |
|
3718 |
f exists ifTrue:[ |
|
3719 |
self loadFile:f label:'My Workspace'. |
|
8763 | 3720 |
] ifFalse:[ |
16261 | 3721 |
ws defaultFileNameForFileDialog: f pathName. |
8763 | 3722 |
]. |
3723 |
||
10169 | 3724 |
"Modified: / 21-06-2010 / 08:40:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3725 |
"Modified: / 05-07-2011 / 15:39:08 / cg" |
|
8763 | 3726 |
! |
3727 |
||
3728 |
addNamespaceInspector |
|
3729 |
|ns| |
|
3730 |
||
3731 |
ns := Dialog requestNameSpace:'Namespace' initialAnswer:nil. |
|
3732 |
ns isEmptyOrNil ifTrue:[^ self]. |
|
3733 |
^ self addNamespaceInspectorFor:(Smalltalk at:ns asSymbol) |
|
3734 |
||
3735 |
"Created: / 29-05-2007 / 19:10:50 / cg" |
|
3736 |
! |
|
3737 |
||
3738 |
addNamespaceInspectorFor:aNameSpaceOrSharedPool |
|
3739 |
|v label| |
|
3740 |
||
3741 |
SmalltalkInspectorView isNil ifTrue:[ |
|
3742 |
self error:'Missing class: "SmalltalkInspectorView"'. |
|
3743 |
^ nil. |
|
3744 |
]. |
|
3745 |
||
3746 |
v := self |
|
3747 |
addInspectorOn:aNameSpaceOrSharedPool |
|
3748 |
inspectorClass:SmalltalkInspectorView |
|
3749 |
suppressPseudoSlots:true. |
|
3750 |
||
3751 |
v fieldListLabel:'Name'. |
|
3752 |
aNameSpaceOrSharedPool == Smalltalk ifTrue:[ |
|
3753 |
label := 'Smalltalk (Globals)' |
|
3754 |
] ifFalse:[ |
|
3755 |
aNameSpaceOrSharedPool isSharedPool ifTrue:[ |
|
3756 |
label := aNameSpaceOrSharedPool name,' (SharedPool)' |
|
3757 |
] ifFalse:[ |
|
3758 |
label := aNameSpaceOrSharedPool name,' (Namespace)' |
|
3759 |
]. |
|
3760 |
]. |
|
3761 |
||
3762 |
self |
|
3763 |
renameWorkspace:(self selectedWorkspaceIndexHolder value) |
|
3764 |
to:label. |
|
3765 |
^ v |
|
3766 |
||
3767 |
"Created: / 29-05-2007 / 19:08:45 / cg" |
|
3768 |
! |
|
3769 |
||
13852 | 3770 |
addSQLWorkspace |
3771 |
|page view | |
|
3772 |
||
3773 |
page := (Smalltalk at:#'SQL::WorkspacePage') new. |
|
3774 |
view := ApplicationSubView new. |
|
3775 |
view client:page spec:#windowSpec. |
|
3776 |
self addWindow:view named:'SQL Workspace %1'. |
|
3777 |
||
3778 |
"Created: / 10-05-2012 / 18:48:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3779 |
! |
|
3780 |
||
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3781 |
addSelectionToSnippets |
13500 | 3782 |
|selection snippetsBaseName snippetsName nr snippetsDictionary| |
8763 | 3783 |
|
3784 |
selection := (self selectedWorkspacesTextView selection ? '') asString. |
|
3785 |
selection isEmpty ifTrue:[ |
|
3786 |
Dialog information:(resources string:'Nothing Selected'). |
|
3787 |
^ self |
|
3788 |
]. |
|
3789 |
||
13500 | 3790 |
snippetsBaseName := Dialog request:(resources string:'Name of Snippet:'). |
3791 |
snippetsBaseName isNil ifTrue:[ |
|
8763 | 3792 |
^ self |
3793 |
]. |
|
13500 | 3794 |
snippetsBaseName isEmpty ifTrue:[ |
3795 |
snippetsBaseName := Time now asString. |
|
8763 | 3796 |
]. |
14830
ae72eee69f1c
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14818
diff
changeset
|
3797 |
snippetsDictionary := Workspace snippets. |
13500 | 3798 |
|
3799 |
snippetsName := snippetsBaseName. |
|
3800 |
(snippetsDictionary includesKey:snippetsName) ifTrue:[ |
|
3801 |
(Dialog confirm:(resources string:'Replace existing snippet named "%1" ?' with:snippetsName)) |
|
8763 | 3802 |
ifFalse:[ |
13500 | 3803 |
[snippetsDictionary includesKey:snippetsName] whileTrue:[ |
8763 | 3804 |
nr := (nr ? 1) + 1. |
13500 | 3805 |
snippetsName := (snippetsBaseName,'(%1)') bindWith:nr |
8763 | 3806 |
]. |
3807 |
] |
|
3808 |
]. |
|
13500 | 3809 |
snippetsDictionary at:snippetsName put:selection |
8763 | 3810 |
|
3811 |
"Modified: / 24-11-2006 / 12:44:16 / cg" |
|
3812 |
! |
|
3813 |
||
3814 |
addSharedPool |
|
3815 |
|allPools poolToAdd| |
|
3816 |
||
3817 |
allPools := SharedPool allSubclasses collect:[:p | p name]. |
|
3818 |
allPools removeAll:(poolsConsideredInDoIts ? #()). |
|
9671 | 3819 |
allPools sort. |
8763 | 3820 |
|
3821 |
poolToAdd := Dialog |
|
3822 |
choose:'Select a SharedPool to Add (To be known in doIt-Evaluations):' |
|
3823 |
fromList:allPools |
|
3824 |
lines:15. |
|
3825 |
poolToAdd isNil ifTrue:[ |
|
3826 |
^ self |
|
3827 |
]. |
|
3828 |
poolsConsideredInDoIts isNil ifTrue:[ |
|
3829 |
poolsConsideredInDoIts := (Set new). |
|
3830 |
]. |
|
3831 |
poolsConsideredInDoIts add:poolToAdd. |
|
11481
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3832 |
workspaces do:[:eachWs | |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3833 |
|ws| |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3834 |
ws := self workspaceViewOfView:eachWs. |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3835 |
ws notNil ifTrue:[ |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3836 |
ws poolsConsideredInDoIts:poolsConsideredInDoIts. |
d0a2a73ed69d
added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents:
11480
diff
changeset
|
3837 |
]. |
8763 | 3838 |
]. |
3839 |
||
3840 |
"Modified: / 24-11-2006 / 12:44:16 / cg" |
|
3841 |
! |
|
3842 |
||
3843 |
addSharedPoolInspector |
|
3844 |
|pool| |
|
3845 |
||
3846 |
pool := Dialog requestSharedPool:'SharedPool' title:nil initialAnswer:nil. |
|
3847 |
pool isEmptyOrNil ifTrue:[^ self]. |
|
3848 |
^ self addNamespaceInspectorFor:(Smalltalk at:pool asSymbol) |
|
3849 |
||
3850 |
"Created: / 29-05-2007 / 19:10:50 / cg" |
|
3851 |
! |
|
3852 |
||
3853 |
addStopWatch |
|
16485 | 3854 |
|v clockViewClass clock| |
8763 | 3855 |
|
3856 |
v := View new. |
|
3857 |
v viewBackground:Color white. |
|
16485 | 3858 |
"/ avoid making stx:libwidg3 a prerequisite. |
3859 |
Smalltalk loadPackage:#'stx:libwidg3'. "/ ClockView package |
|
3860 |
clockViewClass := Smalltalk at:#ClockView. |
|
3861 |
||
3862 |
clock := clockViewClass in:v. |
|
8763 | 3863 |
clock beStopWatch. |
3864 |
||
3865 |
clock |
|
3866 |
origin:[ |
|
3867 |
|ext| |
|
3868 |
||
3869 |
ext := (v height) min:(v width). |
|
3870 |
(v extent - ext) // 2 |
|
3871 |
] |
|
3872 |
extent:[ |
|
3873 |
|ext| |
|
3874 |
||
3875 |
ext := (v height) min:(v width). |
|
3876 |
ext @ ext |
|
3877 |
]. |
|
3878 |
||
14804
3cd896cf9959
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14747
diff
changeset
|
3879 |
self addWindow:v named:'StopWatch%1' tabIcon:(ToolbarIconLibrary clock13x13Icon). |
8763 | 3880 |
! |
3881 |
||
3882 |
addTeaTimer |
|
10169 | 3883 |
"you think that is a useless gimmick ? |
3884 |
I use it in the office and as a wakeup clock timer" |
|
3885 |
||
9569 | 3886 |
|l dt tEnd dur answer confirmed confirmButton| |
8763 | 3887 |
|
3888 |
dt := LastTeaWaitTime ? (3*60). |
|
3889 |
answer := Dialog |
|
17308 | 3890 |
request:(resources string:'Delta-Time (seconds), Duration (n s/m/h) or End-Time (hh:mm:ss):') |
8763 | 3891 |
initialAnswer:(TimeDuration seconds:dt) printString. |
3892 |
answer isEmptyOrNil ifTrue:[^ self]. |
|
3893 |
||
3894 |
"/ allow 3 formats: |
|
3895 |
"/ hh:mm:ss -> endTime |
|
3896 |
"/ nnn s -> x seconds |
|
3897 |
"/ nnn m -> x minutes |
|
3898 |
"/ nnn h -> x hours |
|
3899 |
"/ nnn -> seconds |
|
3900 |
||
3901 |
tEnd := Time readFromString:answer onError:nil. |
|
3902 |
tEnd isNil ifTrue:[ |
|
3903 |
dur := TimeDuration readFromString:answer onError:nil. |
|
3904 |
dur isNil ifTrue:[ |
|
3905 |
dt := Number readFromString:answer onError:[^ self]. |
|
3906 |
LastTeaWaitTime := dt. |
|
3907 |
tEnd := Timestamp now addSeconds:dt. |
|
3908 |
] ifFalse:[ |
|
3909 |
dt := dur asSeconds. |
|
3910 |
tEnd := Timestamp now + dur. |
|
3911 |
]. |
|
3912 |
] ifFalse:[ |
|
9569 | 3913 |
tEnd < Time now ifTrue:[ |
17308 | 3914 |
(Dialog confirm:(resources string:'Tomorrow ?')) ifFalse:[^ self]. |
9569 | 3915 |
tEnd := tEnd asTimestamp addDays:1. |
3916 |
dt := tEnd - Timestamp now. |
|
3917 |
] ifFalse:[ |
|
3918 |
dt := tEnd - Time now. |
|
3919 |
tEnd := tEnd asTimestamp. |
|
3920 |
]. |
|
8763 | 3921 |
]. |
3922 |
||
3923 |
l := Label new. |
|
3924 |
l sizeFixed:true. |
|
17308 | 3925 |
l label:(resources string:'Waiting... [%1]' with:dt printString). |
8763 | 3926 |
l viewBackground:Color red. |
9569 | 3927 |
confirmButton := (Button label:'OK') action:[ confirmed := true. confirmButton beInvisible. ]. |
3928 |
confirmButton beInvisible. |
|
3929 |
l add:confirmButton. |
|
14804
3cd896cf9959
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14747
diff
changeset
|
3930 |
|
3cd896cf9959
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14747
diff
changeset
|
3931 |
self addWindow:l named:'TeaTimer%1' tabIcon:(ToolbarIconLibrary clock13x13Icon). |
8763 | 3932 |
|
3933 |
[ |
|
10169 | 3934 |
Error handle:[ |
14368 | 3935 |
self error:'check this, please'. |
8763 | 3936 |
#intentionallyLeftBlank |
3937 |
] do:[ |
|
14368 | 3938 |
|remaining wg waitTime| |
3939 |
||
3940 |
waitTime := TimeDuration fromSeconds:1. |
|
9569 | 3941 |
confirmed := false. |
11480 | 3942 |
[Timestamp now < tEnd ] whileTrue:[ |
14368 | 3943 |
remaining := (tEnd - Timestamp now) roundTo:waitTime. |
3944 |
l label:'Waiting... [', remaining printString, ']'. |
|
3945 |
Delay waitFor:waitTime. |
|
8763 | 3946 |
]. |
9569 | 3947 |
|
17307 | 3948 |
(tEnd - Timestamp now) > 10 minutes ifTrue:[ |
17308 | 3949 |
l label:(resources string:'Wake up !!'). |
17307 | 3950 |
] ifFalse:[ |
17308 | 3951 |
l label:(resources string:'TEA is ready !!'). |
17307 | 3952 |
]. |
12735
44e8ea95cd2f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12699
diff
changeset
|
3953 |
self window topView raiseDeiconified. |
9632 | 3954 |
"/ could have been removed in the meantime.... |
3955 |
(wg := confirmButton windowGroup) notNil ifTrue:[ |
|
3956 |
confirmButton beVisible. |
|
3957 |
wg repairDamage. |
|
3958 |
||
3959 |
[ confirmed ] whileFalse:[ |
|
12735
44e8ea95cd2f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12699
diff
changeset
|
3960 |
self window topView raiseDeiconified. |
9632 | 3961 |
3 timesRepeat:[ l beep. Delay waitForSeconds:0.4 ]. |
3962 |
Delay waitForSeconds:5. |
|
3963 |
]. |
|
3964 |
||
3965 |
l viewBackground:Color green. |
|
9569 | 3966 |
]. |
8763 | 3967 |
] |
3968 |
] fork. |
|
3969 |
||
9632 | 3970 |
"Modified: / 16-11-2010 / 14:54:05 / cg" |
10169 | 3971 |
"Modified (comment): / 05-07-2011 / 14:30:48 / cg" |
3972 |
! |
|
3973 |
||
3974 |
addTerminal |
|
3975 |
| v termView | |
|
3976 |
||
13906
e13d8ad35a46
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13901
diff
changeset
|
3977 |
(OperatingSystem isUNIXlike |
14457
75bcb6c122a7
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14446
diff
changeset
|
3978 |
"/ mhm - xterm embedding seems to no longer work; the default from user prefs is therefore false |
75bcb6c122a7
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14446
diff
changeset
|
3979 |
and:[UserPreferences current useXTermViewIfAvailable |
13906
e13d8ad35a46
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13901
diff
changeset
|
3980 |
and:[XTermView notNil |
e13d8ad35a46
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13901
diff
changeset
|
3981 |
and:[XTermView isAvailable]]]) ifTrue:[ |
10169 | 3982 |
v := termView := XTermView new |
3983 |
] ifFalse:[ |
|
14457
75bcb6c122a7
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14446
diff
changeset
|
3984 |
VT100TerminalView isNil ifTrue:[ |
75bcb6c122a7
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14446
diff
changeset
|
3985 |
Dialog warn:('Missing class: ' , 'VT100TerminalView' allBold). |
75bcb6c122a7
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14446
diff
changeset
|
3986 |
AbortOperationRequest raise |
75bcb6c122a7
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14446
diff
changeset
|
3987 |
]. |
10169 | 3988 |
v := (HVScrollableView for:VT100TerminalView). |
3989 |
termView := v scrolledView. |
|
3990 |
v autoHideScrollBars:false. |
|
3991 |
v horizontalMini:true. |
|
3992 |
"/ the startShell seems to realize the view, which is not allowed. |
|
3993 |
"/ do it later (after adding to myself) |
|
3994 |
"/ termView startShellIn: Filename currentDirectory asString. |
|
3995 |
]. |
|
3996 |
||
14804
3cd896cf9959
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14747
diff
changeset
|
3997 |
self addWindow:v named:'Terminal%1' tabIcon:(ToolbarIconLibrary console13x13Icon). |
10169 | 3998 |
|
3999 |
termView shellTerminateAction:[ termView cr; nextPutLine:'*** shell terminated ***' allBold; cr.]. |
|
4000 |
termView startShellIn: Filename currentDirectory asString. |
|
4001 |
||
4002 |
"Modified: / 09-12-2010 / 23:22:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4003 |
"Modified: / 05-07-2011 / 14:42:39 / cg" |
|
4004 |
! |
|
4005 |
||
4006 |
addWebBrowser |
|
4007 |
|view browser| |
|
4008 |
||
4009 |
browser := Tools::WebBrowserPage new. |
|
4010 |
browser toolBarVisibleHolder value:false. |
|
4011 |
view := ApplicationSubView new. |
|
4012 |
view client:browser spec:#windowSpec. |
|
13852 | 4013 |
self addWindow:view named:'Web Browser %1'. |
10169 | 4014 |
|
4015 |
"Created: / 10-06-2011 / 23:27:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4016 |
"Modified (format): / 05-07-2011 / 14:30:59 / cg" |
|
13852 | 4017 |
"Modified: / 10-05-2012 / 18:49:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8763 | 4018 |
! |
4019 |
||
4020 |
addWorkspaceVariable |
|
4021 |
|name selectedWorkspacesTextView selection| |
|
4022 |
||
4023 |
selectedWorkspacesTextView := self selectedWorkspacesTextView. |
|
4024 |
selectedWorkspacesTextView notNil ifTrue:[ |
|
4025 |
selection := selectedWorkspacesTextView selection. |
|
4026 |
]. |
|
4027 |
||
4028 |
name := Dialog |
|
4029 |
request:'Name of new Workspace Variable:' |
|
4030 |
initialAnswer:(selection ? '') asString string |
|
4031 |
okLabel:'Add' |
|
4032 |
title:'Enter Variable Name'. |
|
4033 |
name size == 0 ifTrue:[ |
|
4034 |
^ self |
|
4035 |
]. |
|
4036 |
Workspace addWorkspaceVariable:name. |
|
4037 |
||
4038 |
"Modified: / 24-11-2006 / 12:44:16 / cg" |
|
4039 |
! |
|
4040 |
||
4041 |
addWorkspaceVariableInspector |
|
4042 |
|v| |
|
4043 |
||
4044 |
v := self addInspectorOn:(Workspace workspaceVariables) basic:false suppressPseudoSlots:true. |
|
4045 |
v dereferenceValueHolders:true. |
|
4046 |
v fieldListLabel:'Name'. |
|
9085 | 4047 |
self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Workspace Variables'. |
10169 | 4048 |
! |
4049 |
||
17719 | 4050 |
addWorkspaceWithSameContents |
4051 |
|contents| |
|
4052 |
||
4053 |
contents := self selectedWorkspacesTextView contents. |
|
4054 |
self addWorkspace. |
|
4055 |
self selectedWorkspacesTextView contents:contents. |
|
4056 |
||
4057 |
"Created: / 22-10-2017 / 20:41:26 / cg" |
|
4058 |
! |
|
4059 |
||
10169 | 4060 |
menuAddBookmarkTo: folder |
4061 |
||
4062 |
| ws file | |
|
4063 |
||
4064 |
ws := self selectedWorkspace scrolledView. |
|
4065 |
ws isTextView ifTrue:[ |
|
4066 |
file := ws defaultFileNameForFileDialog. |
|
4067 |
file ifNotNil:[folder add: (Bookmark forFile: file)]. |
|
4068 |
folder model save. |
|
4069 |
] ifFalse:[ |
|
11480 | 4070 |
self shouldImplement |
10169 | 4071 |
] |
4072 |
||
4073 |
"Created: / 21-06-2011 / 08:56:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
8763 | 4074 |
! ! |
4075 |
||
4790 | 4076 |
!WorkspaceApplication methodsFor:'menu-actions-editing'! |
4077 |
||
4078 |
babelFishTranslate:fromToModeString |
|
17054 | 4079 |
"translate the selected text and paste it after the selection. |
19435 | 4080 |
Used to use babelFish, which is now obsolete, as that web service no longer exists (sigh). |
4081 |
So now we use google..." |
|
4082 |
||
4083 |
self selectedWorkspace babelFishTranslate:fromToModeString |
|
9653 | 4084 |
|
4085 |
"Modified: / 01-12-2010 / 12:24:34 / cg" |
|
4790 | 4086 |
! |
4087 |
||
7831 | 4088 |
changesBrowserOnText |
11713
3073bed82974
changed: #changesBrowserOnText
Claus Gittinger <cg@exept.de>
parents:
11654
diff
changeset
|
4089 |
(UserPreferences current changeSetBrowserClass) |
7831 | 4090 |
openOn:(ChangeSet fromStream:self selectedWorkspacesTextView contentsAsString readStream) |
4091 |
||
4092 |
"Created: / 27-08-2007 / 10:57:30 / cg" |
|
4093 |
! |
|
4094 |
||
10169 | 4095 |
editBookmarks |
4096 |
||
4097 |
BookmarkListEditor new |
|
4098 |
bookmarkList: self bookmarks; |
|
4099 |
open. |
|
4100 |
||
4101 |
"Created: / 20-06-2011 / 22:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4102 |
! |
|
4103 |
||
9695 | 4104 |
editModeInsert |
4105 |
self selectedWorkspace editModeInsert |
|
4106 |
||
4107 |
"Created: / 22-01-2011 / 11:51:12 / cg" |
|
4108 |
! |
|
4109 |
||
4110 |
editModeInsertAndSelect |
|
4111 |
self selectedWorkspace editModeInsertAndSelect |
|
4112 |
||
4113 |
"Created: / 22-01-2011 / 11:52:52 / cg" |
|
4114 |
! |
|
4115 |
||
4116 |
editModeOverwrite |
|
4117 |
self selectedWorkspace editModeOverwrite |
|
4118 |
||
4119 |
"Created: / 22-01-2011 / 11:52:15 / cg" |
|
4120 |
! |
|
4121 |
||
5261 | 4122 |
fileInText |
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4123 |
"filein the selected workspace's contents as if read from a file" |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4124 |
|
5261 | 4125 |
self selectedWorkspacesTextView contentsAsString readStream fileIn |
4126 |
! |
|
4127 |
||
4790 | 4128 |
filterText |
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4129 |
"a filterblock is asked for, which is applied to the |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4130 |
selected line range. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4131 |
Each line for which the filter evaluats to false is removed" |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4132 |
|
11496 | 4133 |
|template filterBlock newList oldList answer nDeleted deletedLines |
4134 |
prevLine nextLine line| |
|
4790 | 4135 |
|
17054 | 4136 |
template := self class filterTemplate. |
4790 | 4137 |
|
11496 | 4138 |
filterBlock := self askForFilterBlock:'Filter block (to remove lines):' |
4790 | 4139 |
template:template |
4140 |
rememberIn:#LastFilterBlockString. |
|
4141 |
filterBlock isNil ifTrue:[^ self]. |
|
4142 |
||
4143 |
oldList := self selectedWorkspacesTextView list. |
|
11496 | 4144 |
newList := StringCollection new. |
4145 |
deletedLines := OrderedCollection new. |
|
4146 |
||
4147 |
oldList notEmptyOrNil ifTrue:[ |
|
4148 |
line := nil. |
|
4149 |
nextLine := oldList at: 1. |
|
4150 |
1 to: oldList size do:[:lineNr | |
|
4151 |
prevLine := line. |
|
4152 |
line := nextLine. |
|
4153 |
nextLine := oldList at: lineNr + 1 ifAbsent: nil. |
|
4154 |
||
4155 |
(filterBlock |
|
4156 |
value:(line ? '') |
|
4157 |
value: lineNr |
|
4158 |
value: (prevLine ? '') |
|
4159 |
value: (nextLine ? '') |
|
4160 |
) ifTrue: [ |
|
4161 |
newList add: line |
|
4162 |
] ifFalse:[ |
|
4163 |
deletedLines add: line. |
|
4164 |
] |
|
4165 |
]. |
|
4166 |
||
4167 |
newList := newList collect:[:line | (line isString and:[line size == 0]) ifTrue:[nil] ifFalse:[line]]. |
|
4168 |
]. |
|
4169 |
||
4170 |
nDeleted := deletedLines size. |
|
4790 | 4171 |
nDeleted == 0 ifTrue:[ |
4172 |
self information:'No lines were deleted.'. |
|
4173 |
^ self |
|
4174 |
]. |
|
4175 |
||
11496 | 4176 |
answer := OptionBox |
4177 |
request:(resources |
|
4790 | 4178 |
string:'%1 lines remain (%2 deleted). Change text ?' |
4179 |
with:newList size |
|
4180 |
with:nDeleted) |
|
11496 | 4181 |
buttonLabels:#( 'Cancel' 'No, Show Deleted' 'Yes, but Show Deleted' 'Yes') |
4182 |
values:#(nil false yesAndShow true) |
|
4183 |
default:true. |
|
4790 | 4184 |
answer isNil ifTrue:[^ self]. |
11496 | 4185 |
(answer ~~ true) ifTrue:[ |
4790 | 4186 |
TextBox openOn:(deletedLines asStringCollection) title:'Filtered lines'. |
11496 | 4187 |
(answer == false) ifTrue:[ |
4188 |
^ self. |
|
4189 |
]. |
|
4790 | 4190 |
]. |
4191 |
||
4192 |
self selectedWorkspacesTextView list:newList. |
|
11496 | 4193 |
|
4194 |
"Modified: / 04-05-2012 / 16:03:32 / cg" |
|
4790 | 4195 |
! |
4196 |
||
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4197 |
generateText |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4198 |
"a generatorblock is asked for, which is evaluated to generate |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4199 |
lines onto an output stream. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4200 |
The generated text is inserted (or replaces the current selection)" |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4201 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4202 |
|template generatorBlock oldText outStream| |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4203 |
|
17054 | 4204 |
template := self class generatorTemplate. |
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4205 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4206 |
generatorBlock := self askForFilterBlock:'Generator block (to insert text):' |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4207 |
template:template |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4208 |
rememberIn:#LastGeneratorBlockString. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4209 |
generatorBlock isNil ifTrue:[^ self]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4210 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4211 |
oldText := self selectedWorkspacesTextView selection. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4212 |
outStream := '' writeStream. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4213 |
generatorBlock |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4214 |
value:outStream |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4215 |
value:oldText. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4216 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4217 |
self selectedWorkspacesTextView pasteOrReplace:(outStream contents). |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4218 |
! |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4219 |
|
4790 | 4220 |
googleSpellingSuggestion |
4221 |
self selectedWorkspacesTextView googleSpellingSuggestion |
|
4222 |
! |
|
4223 |
||
19402 | 4224 |
googleTranslate:fromToModeString |
4225 |
"translate the selected text and paste it after the selection." |
|
4226 |
||
4227 |
self selectedWorkspace googleTranslate:fromToModeString |
|
4228 |
! |
|
4229 |
||
8499 | 4230 |
indent |
9810 | 4231 |
self selectedWorkspacesTextView indentBy4. |
8499 | 4232 |
! |
4233 |
||
4790 | 4234 |
pasteLastDoIt |
4235 |
|s| |
|
4236 |
||
4237 |
s := self lastDoItsString. |
|
4238 |
s notNil ifTrue:[ |
|
4239 |
self paste:s |
|
4240 |
] |
|
8499 | 4241 |
! |
4242 |
||
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4243 |
processText |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4244 |
"a block is asked for, which is applied to each line of the selected line range. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4245 |
Each line is replaced by the corresponding output of the processing block" |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4246 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4247 |
|template filterBlock newList oldList answer nChanged changedLines flags| |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4248 |
|
17054 | 4249 |
template := self class textProcessorTemplate. |
4250 |
||
13917
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4251 |
filterBlock := self askForFilterBlock:'Processing block:' |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4252 |
template:template |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4253 |
rememberIn:#LastProcessingBlockString. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4254 |
filterBlock isNil ifTrue:[^ self]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4255 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4256 |
oldList := self selectedWorkspacesTextView list. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4257 |
oldList := oldList collect:[:lineOrNil | lineOrNil ? '']. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4258 |
newList := oldList collect:[:line | |newLine| |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4259 |
newLine := line. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4260 |
Error handle:[:ex | |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4261 |
] do:[ |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4262 |
newLine := filterBlock value:line |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4263 |
]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4264 |
newLine |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4265 |
]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4266 |
newList := newList collect:[:line | (line isString and:[line size == 0]) ifTrue:[nil] ifFalse:[line]]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4267 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4268 |
flags := (1 to:oldList size) collect:[:i | (oldList at:i) ~= (newList at:i)]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4269 |
flags := flags select:[:flag | flag]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4270 |
nChanged := flags size. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4271 |
nChanged == 0 ifTrue:[ |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4272 |
self information:'No lines were changed.'. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4273 |
^ self |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4274 |
]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4275 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4276 |
answer := Dialog confirmWithCancel:(resources |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4277 |
string:'%1 lines changed. Change text ?' |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4278 |
with:nChanged) |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4279 |
labels:#( 'Cancel' 'No, Show Changed' 'Yes'). |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4280 |
answer isNil ifTrue:[^ self]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4281 |
answer ifFalse:[ |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4282 |
changedLines := (1 to:oldList size) select:[:i | (oldList at:i) ~= (newList at:i)]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4283 |
changedLines := changedLines collect:[:i | (newList at:i)]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4284 |
TextBox openOn:(changedLines asStringCollection) title:'Changed lines'. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4285 |
^ self. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4286 |
]. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4287 |
|
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4288 |
self selectedWorkspacesTextView list:newList. |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4289 |
! |
2e1f7f77627e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13914
diff
changeset
|
4290 |
|
8499 | 4291 |
undent |
9810 | 4292 |
self selectedWorkspacesTextView undentBy4. |
4790 | 4293 |
! ! |
4294 |
||
4136 | 4295 |
!WorkspaceApplication methodsFor:'menu-dynamic'! |
4296 |
||
10169 | 4297 |
bookmarkMenu |
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4298 |
<resource: #programMenu > |
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4299 |
|
10169 | 4300 |
| menu item | |
10283 | 4301 |
|
18898 | 4302 |
menu := self bookmarks asMenuUsingBuilder: (BookmarkMenuBuilder new). |
10169 | 4303 |
menu hasItems ifTrue:[menu addSeparator]. |
4304 |
||
13432
1f561d84a826
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13413
diff
changeset
|
4305 |
item := MenuItem |
1f561d84a826
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13413
diff
changeset
|
4306 |
label:(resources string:'Add Bookmark') |
1f561d84a826
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13413
diff
changeset
|
4307 |
itemValue:#addBookmark |
1f561d84a826
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13413
diff
changeset
|
4308 |
enabled:[self canAddBookmark]. |
10169 | 4309 |
menu addItem: item. |
4310 |
||
4311 |
menu addSeparator. |
|
4312 |
||
13432
1f561d84a826
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13413
diff
changeset
|
4313 |
item := MenuItem |
1f561d84a826
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13413
diff
changeset
|
4314 |
label:(resources string:'Edit Bookmarks') |
1f561d84a826
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13413
diff
changeset
|
4315 |
itemValue:#editBookmarks. |
10169 | 4316 |
menu addItem: item. |
4317 |
^menu |
|
4318 |
||
4319 |
"Created: / 20-06-2011 / 22:21:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4320 |
"Modified: / 21-06-2011 / 08:05:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11787 | 4321 |
"Modified: / 09-09-2012 / 13:25:48 / cg" |
18898 | 4322 |
"Modified: / 13-07-2019 / 16:01:43 / Claus Gittinger" |
10169 | 4323 |
! |
4324 |
||
9695 | 4325 |
editModeInfoLabelMenu |
4326 |
^ self class editModeInfoLabelMenu |
|
4327 |
||
4328 |
"Created: / 22-01-2011 / 11:50:35 / cg" |
|
4329 |
! |
|
4330 |
||
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
4331 |
languageListMenuSlice |
17319 | 4332 |
"dynamically generate a slice containing the available |
16057 | 4333 |
programming languages" |
17319 | 4334 |
|
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4335 |
<resource: #programMenu > |
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4336 |
|
13852 | 4337 |
|m allLanguages | |
4338 |
||
18852 | 4339 |
allLanguages := ProgrammingLanguage allSortedByNameExcept:#isSmalltalk. |
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
4340 |
|
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
4341 |
m := Menu new. |
17319 | 4342 |
m addItem:((MenuItem |
13914
052e6eae550d
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13906
diff
changeset
|
4343 |
label:'Text' |
052e6eae550d
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13906
diff
changeset
|
4344 |
choice: #syntaxHolder |
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4345 |
choiceValue:nil) |
13914
052e6eae550d
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13906
diff
changeset
|
4346 |
itemValue:#syntaxChangedByUser). |
13852 | 4347 |
m addItem:((MenuItem |
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4348 |
label:'Smalltalk' |
13852 | 4349 |
choice:#syntaxHolder |
4350 |
choiceValue:SmalltalkLanguage instance) |
|
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4351 |
translateLabel:false; |
13852 | 4352 |
enabled: self canChangeLanguageHolder). |
9341
aa3c5825ec98
refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents:
9304
diff
changeset
|
4353 |
|
11235
9a0429235c45
changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents:
10786
diff
changeset
|
4354 |
"/ allLanguages notEmpty ifTrue:[ |
9a0429235c45
changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents:
10786
diff
changeset
|
4355 |
"/ m addItem:(MenuItem separator). |
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
4356 |
|
9304
6d9d835a55bf
changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents:
9301
diff
changeset
|
4357 |
allLanguages do:[:eachLanguage | |
13852 | 4358 |
"JV@2012-02-18: Add language only iff it supports |
4359 |
evaluation (most of then do, but some may not - |
|
4360 |
such as Java)" |
|
17319 | 4361 |
(eachLanguage isJava not |
13852 | 4362 |
"/ Java is funny - we don't have an evaluator for Java |
4363 |
"/ but we have to define evaluatorClass to return GroovyEvaluator |
|
4364 |
"/ to be able to inspect code in debugger/inspector. Hence this hack. |
|
4365 |
"/ We may need something like evaluatorClassForInspector/Debugger. |
|
4366 |
and:[eachLanguage evaluatorClass notNil |
|
16057 | 4367 |
and:[true "eachLanguage evaluatorClass canUnderstand: #evaluate:in:receiver:notifying:logged:ifFail:"] |
17319 | 4368 |
]) |
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4369 |
ifTrue:[ |
13852 | 4370 |
m addItem:((MenuItem |
4371 |
label:(eachLanguage name) |
|
4372 |
choice:#syntaxHolder |
|
4373 |
choiceValue:eachLanguage) |
|
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4374 |
translateLabel:false; |
13852 | 4375 |
enabled: self canChangeLanguageHolder). |
4376 |
]. |
|
9304
6d9d835a55bf
changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents:
9301
diff
changeset
|
4377 |
]. |
11235
9a0429235c45
changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents:
10786
diff
changeset
|
4378 |
"/ ]. |
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
4379 |
^ m |
11235
9a0429235c45
changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents:
10786
diff
changeset
|
4380 |
|
13852 | 4381 |
"Modified: / 04-02-2012 / 11:52:07 / cg" |
4382 |
"Modified: / 29-08-2013 / 12:18:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
18852 | 4383 |
"Modified: / 27-06-2019 / 12:36:39 / Claus Gittinger" |
9300
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
4384 |
! |
07364a10a823
syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents:
9166
diff
changeset
|
4385 |
|
8350 | 4386 |
makeRecentDoItsMenuFor:aSelector |
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4387 |
<resource: #programMenu > |
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4388 |
|
8350 | 4389 |
|doIts m cmdLabelLen| |
4390 |
||
4391 |
cmdLabelLen := 40. |
|
4392 |
||
4393 |
doIts := Workspace doItHistory. |
|
4394 |
doIts size > 0 ifTrue:[ |
|
4395 |
m := Menu new. |
|
4396 |
doIts do:[:doItEntry | |
|
4397 |
|lines label item| |
|
4398 |
||
4399 |
lines := doItEntry withoutLeadingSeparators asStringCollection. |
|
4400 |
label := lines first. |
|
4401 |
(label size > cmdLabelLen) ifTrue:[ |
|
4402 |
label := (label contractTo:cmdLabelLen) |
|
4403 |
]. |
|
4404 |
(lines size > 1) ifTrue:[ |
|
4405 |
label := label , ' [...]' |
|
4406 |
]. |
|
4407 |
label := '''' , label , ''''. |
|
4408 |
||
14594
5c29d5fd8235
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14457
diff
changeset
|
4409 |
item := MenuItem label:label itemValue:aSelector argument:doItEntry. |
8350 | 4410 |
m addItem:item. |
4411 |
]. |
|
11787 | 4412 |
m addSeparator. |
8350 | 4413 |
m addItem: (MenuItem new |
14594
5c29d5fd8235
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14457
diff
changeset
|
4414 |
label: (resources string:'Clear History') |
5c29d5fd8235
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14457
diff
changeset
|
4415 |
itemValue: #clearHistory |
5c29d5fd8235
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14457
diff
changeset
|
4416 |
translateLabel:false; |
5c29d5fd8235
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14457
diff
changeset
|
4417 |
activeHelpKey: #historyEmptyMenu ). |
8350 | 4418 |
]. |
4419 |
^ m |
|
11787 | 4420 |
|
4421 |
"Modified: / 09-09-2012 / 13:25:30 / cg" |
|
8350 | 4422 |
! |
4423 |
||
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4424 |
namespaceInfoLabelMenu |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4425 |
|m allNamespaces| |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4426 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4427 |
allNamespaces := NameSpace allNameSpaces asNewOrderedCollection. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4428 |
allNamespaces sort:[:a :b | a name < b name]. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4429 |
allNamespaces remove:Smalltalk. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4430 |
allNamespaces addFirst:Smalltalk. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4431 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4432 |
m := Menu new. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4433 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4434 |
allNamespaces do:[:eachNameSpace | |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4435 |
m addItem:((MenuItem |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4436 |
label:(eachNameSpace name) |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4437 |
choice: #namespaceHolder |
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4438 |
choiceValue:eachNameSpace) |
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4439 |
translateLabel:false; |
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4440 |
itemValue:#namespaceChangedByUser). |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4441 |
eachNameSpace == Smalltalk ifTrue:[ |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4442 |
m addSeparator |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4443 |
]. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4444 |
]. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4445 |
^ m |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4446 |
! |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4447 |
|
14635
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4448 |
namespaceInfoLabelMenuHolder |
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4449 |
^ [self namespaceInfoLabelMenu] |
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4450 |
! |
bed940a94253
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14594
diff
changeset
|
4451 |
|
4267 | 4452 |
pasteRecentDoItMenu |
4453 |
<resource: #programMenu > |
|
4454 |
||
4455 |
^ self recentDoItsMenuFor:#'paste:' |
|
4456 |
! |
|
4457 |
||
4458 |
recentDoItsMenuFor:aSelector |
|
4136 | 4459 |
<resource: #programMenu > |
4460 |
||
4461 |
^ [ |
|
8350 | 4462 |
self makeRecentDoItsMenuFor:aSelector |
4136 | 4463 |
]. |
4267 | 4464 |
! |
4465 |
||
4466 |
redoRecentDoItMenu |
|
4467 |
<resource: #programMenu > |
|
4468 |
||
4469 |
^ self recentDoItsMenuFor:#'pasteAndExecute:' |
|
4136 | 4470 |
! ! |
4471 |
||
3154 | 4472 |
!WorkspaceApplication methodsFor:'private'! |
4473 |
||
4031
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4474 |
askIfAnyModified:question yesButton:yesButtonText |
14818
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4475 |
|someModifiedWorkspace index label| |
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4476 |
|
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4477 |
someModifiedWorkspace := workspaces detect:[:aView | self isModifiedWorkspace:aView] |
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4478 |
ifNone:nil. |
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4479 |
someModifiedWorkspace isNil ifTrue:[^ true]. |
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4480 |
|
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4481 |
index := workspaces indexOf:someModifiedWorkspace. |
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4482 |
label := tabList at:index ifAbsent:'Edit Window'. |
4031
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4483 |
|
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4484 |
(Dialog |
14818
c76a3a590773
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14804
diff
changeset
|
4485 |
confirm:(resources stringWithCRs:question with:label) |
6636 | 4486 |
yesLabel:(resources string:yesButtonText) |
4487 |
noLabel:(resources string:'Cancel')) |
|
4031
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4488 |
ifTrue:[ |
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4489 |
"/ reset modified flag so question is asked only once |
6045 | 4490 |
workspaces |
4491 |
select:[:aView | (self isModifiedWorkspace:aView)] |
|
4492 |
thenDo:[:eachModifiedTextView | |
|
7662 | 4493 |
eachModifiedTextView |
4494 |
perform:#modified: with:false |
|
4495 |
ifNotUnderstood:[]. |
|
6045 | 4496 |
]. |
4031
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4497 |
^ true |
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4498 |
]. |
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4499 |
^ false |
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4500 |
! |
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4501 |
|
5852 | 4502 |
compilerClassForSyntaxName:syntax |
4503 |
syntax == #Smalltalk ifTrue:[ |
|
4504 |
^ Compiler |
|
4505 |
]. |
|
4506 |
syntax == #JavaScript ifTrue:[ |
|
4507 |
^ JavaScriptCompiler |
|
4508 |
]. |
|
4509 |
^ Compiler |
|
4510 |
! |
|
4511 |
||
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4512 |
compilerClassOf:aWorkspace |
17373 | 4513 |
^ [ |
15409
cfc502624aeb
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15392
diff
changeset
|
4514 |
"/ catch, because it could be a non-edit view there (VT100, TeaTimer etc.) |
17373 | 4515 |
aWorkspace compilerClass. |
4516 |
] on:MessageNotUnderstood do:[nil]. |
|
4517 |
||
4518 |
"Modified: / 08-02-2017 / 19:26:00 / stefan" |
|
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4519 |
! |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4520 |
|
6699 | 4521 |
createEvaluationWorkspace |
8292 | 4522 |
|ws l b box resultView environmentView panel workspaceVariables timeLabel| |
6699 | 4523 |
|
4524 |
workspaceVariables := Workspace workspaceVariables. |
|
4525 |
||
4526 |
panel := VariableVerticalPanel new. |
|
7541
957ae975e391
handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents:
7537
diff
changeset
|
4527 |
panel showHandle:true. |
6699 | 4528 |
|
4529 |
box := View new. |
|
4530 |
l := Label new. |
|
8292 | 4531 |
l label:(resources string:'Eval:'). |
6865 | 4532 |
l layout:((0.0@0.0 corner:0.5@0.0) asLayout bottomOffset:22). |
6699 | 4533 |
l adjust:#left. |
4534 |
box add:l. |
|
4535 |
||
4536 |
ws := HVScrollableView for:Workspace. |
|
7662 | 4537 |
ws scrolledView name:#'Workspace'. |
6699 | 4538 |
ws autoDefineVariables:#workspace. |
6865 | 4539 |
ws layout:((0.0@0.0 corner:1.0@1.0) asLayout topOffset:22; bottomOffset:-22). |
6699 | 4540 |
box add:ws. |
6865 | 4541 |
|
4542 |
b := Button new. |
|
4543 |
b label:'DoIt'. |
|
4544 |
b layout:((0.25@1.0 corner:0.5@1.0) asLayout topOffset:-22). |
|
4545 |
b adjust:#left. |
|
4546 |
b action:[ws doIt]. |
|
4547 |
box add:b. |
|
4548 |
||
4549 |
b := Button new. |
|
4550 |
b label:'InspectIt'. |
|
4551 |
b layout:((0.5@1.0 corner:0.75@1.0) asLayout topOffset:-22). |
|
4552 |
b adjust:#left. |
|
4553 |
b action:[ws inspectIt]. |
|
4554 |
box add:b. |
|
4555 |
||
4556 |
b := Button new. |
|
4557 |
b label:'BrowseIt'. |
|
4558 |
b layout:((0.75@1.0 corner:1.0@1.0) asLayout topOffset:-22). |
|
4559 |
b adjust:#left. |
|
4560 |
b action:[ws browseIt]. |
|
4561 |
box add:b. |
|
4562 |
||
6699 | 4563 |
panel add:box. |
4564 |
||
4565 |
box := View new. |
|
8292 | 4566 |
box add:(Label new label:(resources string:'Value:'); adjust:#left; layout:((0.0@0.0 corner:0.5@0.0) asLayout bottomOffset:22)). |
4567 |
box add:(timeLabel := Label new label:''; adjust:#right; layout:((0.5@0.0 corner:1.0@0.0) asLayout bottomOffset:22)). |
|
6699 | 4568 |
resultView := HVScrollableView for:TextCollector. |
4569 |
box add:(resultView layout:((0@0 corner:1.0@1.0) asLayout topOffset:22); yourself). |
|
4570 |
||
4571 |
panel add:box. |
|
4572 |
||
4573 |
box := View new. |
|
8292 | 4574 |
box add:(Label new label:(resources string:'Environment:'); adjust:#left; layout:((0.0@0.0 corner:1.0@0.0) asLayout bottomOffset:22)). |
6699 | 4575 |
environmentView := DictionaryInspectorView new. |
4576 |
environmentView suppressPseudoSlots:true. |
|
4577 |
environmentView inspect:workspaceVariables. |
|
4578 |
environmentView dereferenceValueHolders:true. |
|
4579 |
environmentView fieldListLabel:'Variable'. |
|
4580 |
box add:(environmentView layout:((0@0 corner:1.0@1.0) asLayout topOffset:22); yourself). |
|
4581 |
||
4582 |
panel add:box. |
|
4583 |
||
4584 |
"/ self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Eval'. |
|
4585 |
||
4586 |
ws doItAction:[:theCode | |
|
8292 | 4587 |
|t result resultString| |
6699 | 4588 |
|
8292 | 4589 |
t := TimeDuration toRun:[ |
4590 |
result := ws executeDoIt:theCode. |
|
4591 |
]. |
|
4592 |
timeLabel label:(resources string:'Exec. Time: %1' with:t printString). |
|
4593 |
||
6752 | 4594 |
resultString := [ |
4595 |
result storeString |
|
4596 |
] on:Error do:[ |
|
4597 |
result printString |
|
4598 |
]. |
|
4599 |
||
4600 |
resultView showCR:resultString. |
|
17014 | 4601 |
Workspace rememberResultAsWorkspaceVariable:result. |
6699 | 4602 |
environmentView doUpdate. |
4603 |
result. |
|
4604 |
]. |
|
6865 | 4605 |
panel relativeCorners:#(0.4 0.6 1.0). |
6699 | 4606 |
^ panel |
7541
957ae975e391
handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents:
7537
diff
changeset
|
4607 |
|
957ae975e391
handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents:
7537
diff
changeset
|
4608 |
"Modified: / 24-11-2006 / 11:06:33 / cg" |
6699 | 4609 |
! |
4610 |
||
5295
e3c5a7b20d9d
refactored (added abstract superclass)
Claus Gittinger <cg@exept.de>
parents:
5262
diff
changeset
|
4611 |
createWorkspace |
5547
65af7af97085
initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents:
5490
diff
changeset
|
4612 |
|ws| |
65af7af97085
initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents:
5490
diff
changeset
|
4613 |
|
10169 | 4614 |
ws := self createWorkspaceView. |
13852 | 4615 |
ws autoDefineVariables:self autoDefineVariables value. |
7931 | 4616 |
ws poolsConsideredInDoIts:poolsConsideredInDoIts. |
5547
65af7af97085
initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents:
5490
diff
changeset
|
4617 |
^ ws |
9746
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
4618 |
|
10169 | 4619 |
"Modified (format): / 05-07-2011 / 14:18:52 / cg" |
13852 | 4620 |
"Modified: / 18-03-2012 / 23:37:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3193 | 4621 |
! |
4622 |
||
10169 | 4623 |
createWorkspaceView |
11615
f9dfb7daa5e4
corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents:
11612
diff
changeset
|
4624 |
|ws language| |
10169 | 4625 |
|
4626 |
ws := self class createWorkspaceView. |
|
15294
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4627 |
|
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4628 |
ws codeAspect: SyntaxHighlighter codeAspectExpression. |
13852 | 4629 |
ws acceptAction:[:code | self menuSave ]. |
15294
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4630 |
|
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4631 |
"/ (ws respondsTo:#languageHolder:) ifTrue:[ |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4632 |
"/ ws languageHolder:self syntaxHolder |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4633 |
"/ ]. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4634 |
language := self syntaxHolder value ? Smalltalk programmingLanguage. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4635 |
language notNil ifTrue:[ |
11615
f9dfb7daa5e4
corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents:
11612
diff
changeset
|
4636 |
ws compilerClass:(language evaluatorClass). |
13581
75759c16ab7f
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13500
diff
changeset
|
4637 |
ws editedLanguage:language. |
11615
f9dfb7daa5e4
corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents:
11612
diff
changeset
|
4638 |
]. |
10169 | 4639 |
^ ws |
4640 |
||
11615
f9dfb7daa5e4
corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents:
11612
diff
changeset
|
4641 |
"Modified: / 19-07-2012 / 16:39:15 / cg" |
13852 | 4642 |
"Modified: / 21-08-2012 / 17:20:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10169 | 4643 |
! |
4644 |
||
15294
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4645 |
createWorkspaceViewForText |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4646 |
"creates a language unaware workspace" |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4647 |
|
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4648 |
|ws| |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4649 |
|
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4650 |
ws := self class createWorkspaceView. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4651 |
|
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4652 |
ws acceptAction:[:code | self menuSave ]. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4653 |
"/ (ws respondsTo:#languageHolder:) ifTrue:[ |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4654 |
"/ ws languageHolder:nil |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4655 |
"/ ]. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4656 |
ws compilerClass:(Smalltalk programmingLanguage). |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4657 |
ws editedLanguage:nil. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4658 |
ws codeAspect:nil. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4659 |
^ ws |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4660 |
! |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4661 |
|
10169 | 4662 |
isModifiedWorkspace:aView |
4031
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4663 |
|view| |
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4664 |
|
10169 | 4665 |
aView isNil ifTrue:[ |
4031
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4666 |
^ false |
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4667 |
]. |
10169 | 4668 |
view := self workspaceViewOfView:aView. |
4669 |
(view isNil |
|
4670 |
or:[ view modified not |
|
4671 |
or:[ view contentsWasSaved |
|
4672 |
or:[ view contents withoutSeparators isEmpty ]]]) |
|
4673 |
ifTrue:[ |
|
4674 |
^ false |
|
4675 |
]. |
|
4031
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4676 |
^ true |
10169 | 4677 |
|
4678 |
"Modified: / 03-06-2011 / 11:03:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4679 |
"Modified (format): / 05-07-2011 / 15:01:08 / cg" |
|
4031
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4680 |
! |
4ace4ff5fbbd
look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents:
3845
diff
changeset
|
4681 |
|
4267 | 4682 |
lastDoItsString |
4683 |
|history| |
|
3198 | 4684 |
|
4267 | 4685 |
history := Workspace doItHistory. |
4686 |
history size > 0 ifFalse:[ |
|
4687 |
self selectedWorkspacesTextView flash. |
|
4688 |
^ nil |
|
3198 | 4689 |
]. |
4267 | 4690 |
^ history first |
5852 | 4691 |
! |
4692 |
||
14724
74a5e633ef41
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14635
diff
changeset
|
4693 |
syntaxFromEvaluatorClass:aClass |
74a5e633ef41
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14635
diff
changeset
|
4694 |
"knowing the evaluator class, determine the syntax highlighter class" |
74a5e633ef41
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14635
diff
changeset
|
4695 |
|
74a5e633ef41
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14635
diff
changeset
|
4696 |
aClass notNil ifTrue:[ |
18852 | 4697 |
^ ProgrammingLanguage allDetect:[:lang | lang evaluatorClass = aClass] ifNone:[nil]. |
5852 | 4698 |
]. |
14724
74a5e633ef41
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
14635
diff
changeset
|
4699 |
"Unknown language - should not happen :-)" |
10169 | 4700 |
^ nil |
4701 |
||
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4702 |
"Created: / 26-04-2012 / 12:59:32 / cg" |
18852 | 4703 |
"Modified: / 27-06-2019 / 12:37:50 / Claus Gittinger" |
5852 | 4704 |
! |
4705 |
||
4706 |
workspaceSelectionChanged |
|
9695 | 4707 |
"attach line, col and mode holders to the current workspace window" |
4708 |
||
13852 | 4709 |
|compilerClass selectedWorkspace selectedWorkspaceApp | |
4710 |
||
4711 |
"JV@2012-05-10: Modified to better support complex application models as tabs" |
|
5852 | 4712 |
|
4713 |
super workspaceSelectionChanged. |
|
9695 | 4714 |
|
5855 | 4715 |
selectedWorkspace := self selectedWorkspace. |
13852 | 4716 |
selectedWorkspaceApp := self selectedWorkspaceApplication. |
4717 |
||
4718 |
(selectedWorkspace notNil and:[selectedWorkspace isScrollWrapper]) ifTrue:[ |
|
9746
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
4719 |
selectedWorkspace := selectedWorkspace scrolledView |
d7c05875edc0
initial language setting fixed
Claus Gittinger <cg@exept.de>
parents:
9745
diff
changeset
|
4720 |
]. |
13852 | 4721 |
|
13906
e13d8ad35a46
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13901
diff
changeset
|
4722 |
compilerClass := self compilerClassOf: selectedWorkspaceApp ? selectedWorkspace. |
13852 | 4723 |
self canChangeLanguageHolder value: |
4724 |
(selectedWorkspaceApp ? selectedWorkspace respondsTo: #compilerClass:). |
|
4725 |
||
4726 |
self syntaxHolder value:(self syntaxFromEvaluatorClass:compilerClass). |
|
4727 |
||
4728 |
(selectedWorkspace notNil and:[ selectedWorkspace scrolledView isTextView or:[selectedWorkspaceApp notNil] ]) ifTrue:[ |
|
15817
f6046130309e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15816
diff
changeset
|
4729 |
self cursorLineAndColumnLabelHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#cursorLineAndColumnLabelHolder ifNotUnderstood:nil ). |
13852 | 4730 |
self cursorLineHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#cursorLineHolder ifNotUnderstood:nil ). |
4731 |
self cursorColHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#cursorColHolder ifNotUnderstood:nil ). |
|
4732 |
self modeLabelHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#modeLabelHolder ifNotUnderstood:nil ). |
|
9695 | 4733 |
] ifFalse:[ |
15817
f6046130309e
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15816
diff
changeset
|
4734 |
self cursorLineAndColumnLabelHolder valueHolder:nil. |
9695 | 4735 |
self cursorLineHolder valueHolder:nil. |
4736 |
self cursorColHolder valueHolder:nil. |
|
4737 |
self modeLabelHolder valueHolder:nil. |
|
4738 |
]. |
|
4739 |
||
10169 | 4740 |
"Update toolbar" |
15409
cfc502624aeb
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15392
diff
changeset
|
4741 |
(selectedWorkspaceApp notNil |
cfc502624aeb
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15392
diff
changeset
|
4742 |
and:[ (selectedWorkspaceApp class respondsTo: #toolBarSpec) ]) ifTrue:[ |
cfc502624aeb
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15392
diff
changeset
|
4743 |
"/ client provides one |
cfc502624aeb
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15392
diff
changeset
|
4744 |
self toolBarView client: selectedWorkspaceApp spec: #toolBarSpec |
10169 | 4745 |
] ifFalse:[ |
15816
64d953f953a1
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15737
diff
changeset
|
4746 |
"/ I provide it |
15409
cfc502624aeb
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15392
diff
changeset
|
4747 |
self toolBarView client: self spec: #toolBarSpec builder: builder. |
10169 | 4748 |
] |
3154 | 4749 |
! ! |
4750 |
||
14747 | 4751 |
!WorkspaceApplication methodsFor:'special startup'! |
4752 |
||
4753 |
openSystemWorkspace |
|
15294
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4754 |
"create the tabs for the initial welcome system workspace" |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4755 |
|
14747 | 4756 |
|path needRemove font| |
4757 |
||
4758 |
needRemove := true. |
|
4759 |
||
4760 |
self allButOpen. |
|
4761 |
||
4762 |
(self builder componentAt:'NoteBook') |
|
4763 |
destroyTabAction:[:tabIndex| self removeWorkspace:tabIndex]. |
|
4764 |
||
4765 |
self window extent:640@400. |
|
4766 |
||
4767 |
path := (Smalltalk getSystemFileName:'README') ? '../../README'. |
|
4768 |
path := path asFilename. |
|
4769 |
path isReadable ifTrue:[ |
|
15294
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4770 |
self addWindow:(self createWorkspaceViewForText) named:'README' asFirst:false. |
14747 | 4771 |
self loadFile:path. |
4772 |
self removeWorkspace:1. "/ the original Workspace |
|
4773 |
self renameWorkspace:1 to:'LICENCE README'. |
|
4774 |
needRemove := false. |
|
4775 |
]. |
|
4776 |
||
4777 |
"/ path := (Smalltalk getSystemFileName:'doc/online/english/LICENCE_STX.html') ? '../../doc/online/english/LICENCE_STX.html'. |
|
4778 |
"/ path asFilename exists ifTrue:[ |
|
4779 |
"/ self addWindow:(licenceView := HVScrollableView for:HTMLDocumentView) named:'License' asFirst:false. |
|
4780 |
"/ licenceView homeDocument:'../../doc/online/english/LICENCE_STX.html'. |
|
4781 |
"/ licenceView updateLabelFlag:false. |
|
4782 |
"/ needRemove ifTrue:[self removeWorkspace:1]. "/ the original Workspace |
|
4783 |
"/ needRemove := false. |
|
4784 |
"/ ]. |
|
4785 |
||
18941 | 4786 |
device isX11Platform ifTrue:[ |
18825 | 4787 |
"/ font := Font family:'DejaVuSansMono' face:'medium' style:'roman' size:16 encoding:'iso10646-1'. |
4788 |
"/ font := font onDevice:device ifAbsent:nil. |
|
17014 | 4789 |
font isNil ifTrue:[ |
18825 | 4790 |
font := Font family:'FreeMono' face:'regular' style:'roman' size:12 encoding:'iso10646-1'. |
16966 | 4791 |
font := font onDevice:device ifAbsent:nil. |
16967 | 4792 |
font isNil ifTrue:[ |
18825 | 4793 |
font := Font family:'unifont' face:'medium' style:'roman' size:12 encoding:'iso10646-1'. |
16957 | 4794 |
font := font onDevice:device ifAbsent:nil. |
4795 |
font isNil ifTrue:[ |
|
17014 | 4796 |
font := Font family:'arial' face:'medium' style:'roman' size:12 encoding:'iso10646-1'. |
16957 | 4797 |
font := font onDevice:device ifAbsent:nil. |
18825 | 4798 |
font isNil ifTrue:[ |
4799 |
font := Font family:'courier' face:'regular' style:'roman' size:12 encoding:'iso10646-1'. |
|
4800 |
font := font onDevice:device ifAbsent:nil. |
|
4801 |
]. |
|
16957 | 4802 |
]. |
4803 |
]. |
|
14747 | 4804 |
]. |
4805 |
] ifFalse:[ |
|
4806 |
"/ font := Font family:'Arial Unicode MS' face:'medium' style:'roman' size:10 encoding:'ms-ansi'. |
|
4807 |
font := Font family:'arial' face:'medium' style:'roman' size:10 encoding:'ms-ansi'. |
|
16244 | 4808 |
font := font onDevice:device ifAbsent:nil. |
14747 | 4809 |
]. |
4810 |
||
4811 |
#( "/ file resourceKey title forcedEncoding type |
|
4812 |
('Hello_utf8.wsp' HELLO_UTF_FILE 'Hello' #'utf8' #text) |
|
4813 |
('Welcome.wsp' WELCOME_FILE 'This Release' nil #text) |
|
4814 |
"/ ('Setup.wsp' SETUP_FILE 'Setup' nil #text) |
|
4815 |
('Keyboard.wsp' KEYBOARD_FILE 'Keyboard' nil #text) |
|
4816 |
"/ ('GettingStarted.wsp' GETTING_STARTED_FILE 'Getting Started' nil #text) |
|
4817 |
('../../doc/online/english/GettingStarted.html' GETTING_STARTED_TML_FILE 'Getting Started' nil #html) |
|
4818 |
('../../doc/books/JoyOfST/IntroToST.html' INTRO_TO_ST_FILE 'Smalltalk Introduction' nil #html) |
|
4819 |
"/ if these are present, show them. |
|
15294
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4820 |
('Private.wsp' PRIVATE_FILE 'Private Workspace' nil #code) |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4821 |
('MyWorkspace.wsp' MYWORKSPACE_FILE 'My Workspace' nil #code) |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4822 |
('PackageLoading.wsp' PACKAGELOADING_FILE 'Packages' nil #code) |
14747 | 4823 |
) do:[:tuple | |
4824 |
|file resKey title forcedEncoding type pane encoding htmlView| |
|
4825 |
||
4826 |
file := tuple at:1. |
|
4827 |
resKey := tuple at:2. |
|
4828 |
file := self resources string:resKey default:file. |
|
4829 |
||
4830 |
title := tuple at:3. |
|
4831 |
forcedEncoding := tuple at:4. |
|
4832 |
type := tuple at:5. |
|
4833 |
||
4834 |
path := Smalltalk getSystemFileName:file. |
|
4835 |
(path notNil and:[path asFilename isReadable]) ifTrue:[ |
|
4836 |
type == #html ifTrue:[ |
|
4837 |
self addWindow:(htmlView := HVScrollableView for:HTMLDocumentView) named:title asFirst:false. |
|
4838 |
htmlView homeDocument:path. |
|
4839 |
htmlView infoHolder:self infoLabelHolder. |
|
4840 |
htmlView updateTopViewsTitleFlag:false. |
|
4841 |
] ifFalse:[ |
|
15294
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4842 |
type == #code ifTrue:[ |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4843 |
self addWindow:(pane := self createWorkspaceView) named:title asFirst:false. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4844 |
] ifFalse:[ |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4845 |
self addWindow:(pane := self createWorkspaceViewForText) named:title asFirst:false. |
4bd3f000c743
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15273
diff
changeset
|
4846 |
]. |
14747 | 4847 |
forcedEncoding notNil ifTrue:[ |
4848 |
encoding := forcedEncoding. |
|
4849 |
font notNil ifTrue:[ |
|
4850 |
pane font:font. |
|
4851 |
] |
|
4852 |
] ifFalse:[ |
|
4853 |
encoding := CharacterEncoder guessEncodingOfFile:path. |
|
4854 |
(encoding == #'iso8859-1' or:[encoding == #'ascii']) ifTrue:[ |
|
4855 |
encoding := nil |
|
4856 |
]. |
|
4857 |
]. |
|
4858 |
self loadFile:path encoding:encoding label:title. |
|
4859 |
]. |
|
4860 |
needRemove ifTrue:[self removeWorkspace:1]. "/ the original Workspace |
|
4861 |
needRemove := false. |
|
4862 |
]. |
|
4863 |
]. |
|
4864 |
self openWindow. |
|
4865 |
self selectedWorkspaceIndexHolder value:2. |
|
4866 |
||
4867 |
" |
|
4868 |
|ws b| |
|
4869 |
ws := self openSystemWorkspace. |
|
4870 |
ws addMyWorkspace. |
|
4871 |
ws selectedWorkspaceIndexHolder value:(ws workspaces size). |
|
4872 |
ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll. |
|
4873 |
ws selectedWorkspace |
|
4874 |
add:(b := Button label:'DoIt' action:[ws doIt. b destroy]) |
|
4875 |
" |
|
4876 |
" |
|
4877 |
|ws b| |
|
4878 |
ws := self new. |
|
4879 |
ws open. |
|
4880 |
ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll. |
|
4881 |
" |
|
4882 |
||
4883 |
"Modified: / 14-02-2010 / 23:02:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4884 |
"Modified: / 05-07-2011 / 15:34:40 / cg" |
|
18941 | 4885 |
"Modified: / 25-07-2019 / 12:32:46 / Claus Gittinger" |
14747 | 4886 |
! ! |
4887 |
||
7825 | 4888 |
!WorkspaceApplication methodsFor:'user actions'! |
4889 |
||
4890 |
infoVisibilityChanged |
|
4891 |
super infoVisibilityChanged. |
|
4892 |
UserPreferences current infoVisibleInWorkspace:(self infoVisibleHolder value) |
|
4893 |
||
4894 |
"Created: / 14-07-2007 / 16:46:58 / cg" |
|
4895 |
! |
|
4896 |
||
13643
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4897 |
namespaceChangedByUser |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4898 |
"remember as default for next new workspace" |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4899 |
|
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4900 |
LastNamespace := self namespaceHolder value. |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4901 |
! |
38d9fae397cd
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
13585
diff
changeset
|
4902 |
|
11483
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4903 |
syntaxChangedByUser |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4904 |
"remember as default for next new workspace" |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4905 |
LastLanguage := self syntaxHolder value. |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4906 |
|
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4907 |
"Created: / 26-04-2012 / 12:31:04 / cg" |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4908 |
! |
5f545a7d153a
fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents:
11481
diff
changeset
|
4909 |
|
7825 | 4910 |
toolBarVisibilityChanged |
4911 |
super toolBarVisibilityChanged. |
|
8499 | 4912 |
UserPreferences current toolbarVisibleInWorkspace:(self toolBarVisibleHolder value). |
4913 |
UserPreferences current editToolbarVisibleInWorkspace:(self editToolBarVisibleHolder value). |
|
7825 | 4914 |
|
4915 |
"Created: / 14-07-2007 / 16:45:31 / cg" |
|
4916 |
! ! |
|
4917 |
||
3154 | 4918 |
!WorkspaceApplication class methodsFor:'documentation'! |
4919 |
||
10318 | 4920 |
version |
15737
5f5dd0d93690
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15608
diff
changeset
|
4921 |
^ '$Header$' |
10318 | 4922 |
! |
4923 |
||
9059 | 4924 |
version_CVS |
15737
5f5dd0d93690
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15608
diff
changeset
|
4925 |
^ '$Header$' |
10394 | 4926 |
! |
4927 |
||
4928 |
version_SVN |
|
15737
5f5dd0d93690
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
15608
diff
changeset
|
4929 |
^ '$Id$' |
3154 | 4930 |
! ! |
12340
8332590c5a41
class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents:
12032
diff
changeset
|
4931 |