author | Claus Gittinger <cg@exept.de> |
Tue, 29 Nov 2011 11:21:54 +0100 | |
changeset 10912 | a90f6de79d36 |
parent 10902 | 361a19675c61 |
child 11984 | c1a35991c494 |
child 12123 | 4bde08cebd48 |
permissions | -rw-r--r-- |
10398 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
10337 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
AbstractSettingsApplication subclass:#CodeView2SettingsAppl |
|
10398 | 17 |
instanceVariableNames:'useCodeView2InTools useCodeView2InDebugger useCodeView2InBrowser |
10524 | 18 |
useCodeView2InToolEnabled useCodeView2InWorkspace |
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
19 |
codeView2AutoIndent codeView2ShowAcceptCancel' |
10337 | 20 |
classVariableNames:'' |
21 |
poolDictionaries:'' |
|
22 |
category:'Interface-CodeView' |
|
23 |
! |
|
24 |
||
10398 | 25 |
!CodeView2SettingsAppl class methodsFor:'documentation'! |
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! ! |
|
10337 | 40 |
|
10902 | 41 |
!CodeView2SettingsAppl class methodsFor:'image specs'! |
42 |
||
43 |
defaultIcon |
|
44 |
"This resource specification was automatically generated |
|
45 |
by the ImageEditor of ST/X." |
|
46 |
||
47 |
"Do not manually edit this!! If it is corrupted, |
|
48 |
the ImageEditor may not be able to read the specification." |
|
49 |
||
50 |
" |
|
51 |
self defaultIcon inspect |
|
52 |
ImageEditor openOnClass:self andSelector:#defaultIcon |
|
53 |
Icon flushCachedIcons |
|
54 |
" |
|
55 |
||
56 |
<resource: #image> |
|
57 |
||
58 |
^Icon |
|
59 |
constantNamed:'Tools::CodeView2SettingsAppl class defaultIcon' |
|
60 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
61 |
*****************+.************(.8"H"H"H"J(@**";UUU%UUUU@@^+.;.;-VUUUU@@]:.;.;.5YUUUT@A7**";Y&Y&Y&X@]7^**K-UUVUU@@]7\Z*( |
|
62 |
.5UUYU@@]7\R**"EUUU%T@A7]1J**HY&Y&XC]7\Q&**(!!UUU(3M7\Y&***"EUUU#L3L2QJ***HY&Z#L3L6)D***(!!&Y*L3L6Z$R***"EUUP3M&ZEQJ***HUU |
|
63 |
RRY(UUUD***("*)J*****$R***"J)J******QJ***HUUUZUUUUUD***TQDQDQDQDQDR***************(b') ; colorMapFromArray:#[240 160 80 192 80 0 64 0 0 240 208 160 0 0 0 240 240 240 192 192 192 240 128 0 208 208 208 48 48 48 160 160 160 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@C@@@G??LG??<_??<_??<G??<G??<G??<G??<G??8G??0G??0G??0G??0G??0G??0G??0G??0G??0O??0@@@@') ; yourself); yourself] |
|
64 |
! ! |
|
65 |
||
10337 | 66 |
!CodeView2SettingsAppl class methodsFor:'interface specs'! |
67 |
||
68 |
windowSpec |
|
69 |
"This resource specification was automatically generated |
|
70 |
by the UIPainter of ST/X." |
|
71 |
||
72 |
"Do not manually edit this!! If it is corrupted, |
|
73 |
the UIPainter may not be able to read the specification." |
|
74 |
||
75 |
" |
|
76 |
UIPainter new openOnClass:Tools::CodeView2SettingsAppl andSelector:#windowSpec |
|
77 |
Tools::CodeView2SettingsAppl new openInterface:#windowSpec |
|
78 |
Tools::CodeView2SettingsAppl open |
|
79 |
" |
|
80 |
||
81 |
<resource: #canvas> |
|
82 |
||
83 |
^ |
|
84 |
#(FullSpec |
|
85 |
name: windowSpec |
|
86 |
window: |
|
87 |
(WindowSpec |
|
88 |
label: 'Code Editor Settings' |
|
89 |
name: 'Code Editor Settings' |
|
90 |
min: (Point 10 10) |
|
10902 | 91 |
bounds: (Rectangle 0 0 585 273) |
10337 | 92 |
) |
93 |
component: |
|
94 |
(SpecCollection |
|
95 |
collection: ( |
|
96 |
(VerticalPanelViewSpec |
|
97 |
name: 'VBox' |
|
98 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
99 |
horizontalLayout: fit |
|
100 |
verticalLayout: top |
|
101 |
horizontalSpace: 3 |
|
102 |
verticalSpace: 3 |
|
103 |
component: |
|
104 |
(SpecCollection |
|
105 |
collection: ( |
|
106 |
(FramedBoxSpec |
|
10902 | 107 |
label: 'Tool Support' |
108 |
name: 'ToolSupport' |
|
109 |
labelPosition: topLeft |
|
110 |
translateLabel: true |
|
111 |
component: |
|
112 |
(SpecCollection |
|
113 |
collection: ( |
|
114 |
(VerticalPanelViewSpec |
|
115 |
name: 'ToolSupportCheckBox' |
|
116 |
layout: (LayoutFrame 0 0 0 0 0 1 116 0) |
|
117 |
horizontalLayout: fit |
|
118 |
verticalLayout: top |
|
119 |
horizontalSpace: 3 |
|
120 |
verticalSpace: 3 |
|
121 |
component: |
|
122 |
(SpecCollection |
|
123 |
collection: ( |
|
124 |
(CheckBoxSpec |
|
125 |
label: 'Use Advanced Code Editor in All Tools (where supported)' |
|
126 |
name: 'CheckBox1' |
|
127 |
model: useCodeView2InTools |
|
128 |
translateLabel: true |
|
129 |
extent: (Point 551 25) |
|
130 |
) |
|
131 |
(DividerSpec |
|
132 |
name: 'Separator1' |
|
133 |
extent: (Point 551 4) |
|
134 |
) |
|
135 |
(CheckBoxSpec |
|
136 |
label: 'Use Advanced Code Editor in Class Browser' |
|
137 |
name: 'CheckBox2' |
|
138 |
enableChannel: useCodeView2InToolEnabled |
|
139 |
model: useCodeView2InBrowser |
|
140 |
translateLabel: true |
|
141 |
extent: (Point 551 25) |
|
142 |
) |
|
143 |
(CheckBoxSpec |
|
144 |
label: 'Use Advanced Code Editor in Debugger (experimental)' |
|
145 |
name: 'CheckBox3' |
|
146 |
enableChannel: useCodeView2InToolEnabled |
|
147 |
model: useCodeView2InDebugger |
|
148 |
translateLabel: true |
|
149 |
extent: (Point 551 25) |
|
150 |
) |
|
151 |
(CheckBoxSpec |
|
152 |
label: 'Use Advanced Code Editor in Workspace' |
|
153 |
name: 'CheckBox4' |
|
154 |
enableChannel: useCodeView2InToolEnabled |
|
155 |
model: useCodeView2InWorkspace |
|
156 |
translateLabel: true |
|
157 |
extent: (Point 551 25) |
|
158 |
) |
|
159 |
) |
|
160 |
||
161 |
) |
|
162 |
useDynamicPreferredHeight: true |
|
163 |
usePreferredHeight: true |
|
164 |
) |
|
165 |
) |
|
166 |
||
167 |
) |
|
168 |
extent: (Point 585 143) |
|
169 |
) |
|
170 |
(FramedBoxSpec |
|
10524 | 171 |
label: 'Edit Support' |
172 |
name: 'EditSupport' |
|
173 |
labelPosition: topLeft |
|
174 |
translateLabel: true |
|
175 |
component: |
|
176 |
(SpecCollection |
|
177 |
collection: ( |
|
178 |
(VerticalPanelViewSpec |
|
179 |
name: 'VerticalPanel1' |
|
180 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
181 |
horizontalLayout: fit |
|
182 |
verticalLayout: top |
|
183 |
horizontalSpace: 3 |
|
184 |
verticalSpace: 3 |
|
185 |
component: |
|
186 |
(SpecCollection |
|
187 |
collection: ( |
|
188 |
(CheckBoxSpec |
|
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
189 |
label: 'Show Accept/Cancel Buttons in Gutter' |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
190 |
name: 'CheckBox6' |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
191 |
model: codeView2ShowAcceptCancel |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
192 |
translateLabel: true |
10902 | 193 |
extent: (Point 551 25) |
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
194 |
) |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
195 |
(CheckBoxSpec |
10902 | 196 |
label: 'Auto Indent (experimental, not yet recommended)' |
10524 | 197 |
name: 'CheckBox5' |
198 |
model: codeView2AutoIndent |
|
199 |
translateLabel: true |
|
10902 | 200 |
extent: (Point 551 25) |
10524 | 201 |
) |
202 |
) |
|
203 |
||
204 |
) |
|
205 |
) |
|
206 |
) |
|
207 |
||
208 |
) |
|
10902 | 209 |
extent: (Point 585 77) |
10337 | 210 |
) |
211 |
) |
|
212 |
||
213 |
) |
|
214 |
) |
|
215 |
) |
|
216 |
||
217 |
) |
|
218 |
) |
|
219 |
! ! |
|
220 |
||
221 |
!CodeView2SettingsAppl methodsFor:'aspects'! |
|
222 |
||
10524 | 223 |
codeView2AutoIndent |
224 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
225 |
||
226 |
codeView2AutoIndent isNil ifTrue:[ |
|
227 |
codeView2AutoIndent := ValueHolder new. |
|
228 |
codeView2AutoIndent onChangeSend:#updateModifiedChannel to:self |
|
229 |
||
230 |
]. |
|
231 |
^ codeView2AutoIndent |
|
232 |
||
233 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
234 |
"Created: / 07-08-2011 / 12:52:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
235 |
! |
|
236 |
||
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
237 |
codeView2ShowAcceptCancel |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
238 |
"return/create the 'codeView2ShowAcceptCancel' value holder (automatically generated)" |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
239 |
|
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
240 |
codeView2ShowAcceptCancel isNil ifTrue:[ |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
241 |
codeView2ShowAcceptCancel := ValueHolder new. |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
242 |
codeView2ShowAcceptCancel onChangeSend:#updateModifiedChannel to:self |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
243 |
]. |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
244 |
^ codeView2ShowAcceptCancel |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
245 |
|
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
246 |
"Modified: / 10-10-2011 / 16:43:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
247 |
! |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
248 |
|
10398 | 249 |
useCodeView2InBrowser |
250 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
251 |
||
252 |
useCodeView2InBrowser isNil ifTrue:[ |
|
253 |
useCodeView2InBrowser := ValueHolder new. |
|
254 |
useCodeView2InBrowser onChangeSend:#updateModifiedChannel to:self |
|
255 |
||
256 |
]. |
|
257 |
^ useCodeView2InBrowser |
|
258 |
||
259 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
260 |
"Created: / 26-07-2011 / 10:30:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
261 |
! |
|
262 |
||
263 |
useCodeView2InDebugger |
|
264 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
265 |
||
266 |
useCodeView2InDebugger isNil ifTrue:[ |
|
267 |
useCodeView2InDebugger := ValueHolder new. |
|
268 |
useCodeView2InDebugger onChangeSend:#updateModifiedChannel to:self |
|
269 |
||
270 |
]. |
|
271 |
^ useCodeView2InDebugger |
|
272 |
||
273 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
274 |
"Created: / 26-07-2011 / 10:30:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
275 |
! |
|
276 |
||
10337 | 277 |
useCodeView2InTools |
278 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
279 |
||
280 |
useCodeView2InTools isNil ifTrue:[ |
|
281 |
useCodeView2InTools := ValueHolder new. |
|
282 |
useCodeView2InTools onChangeSend:#updateModifiedChannel to:self |
|
283 |
||
284 |
]. |
|
285 |
^ useCodeView2InTools |
|
286 |
||
287 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10398 | 288 |
! |
289 |
||
290 |
useCodeView2InWorkspace |
|
291 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
292 |
||
293 |
useCodeView2InWorkspace isNil ifTrue:[ |
|
294 |
useCodeView2InWorkspace := ValueHolder new. |
|
295 |
useCodeView2InWorkspace onChangeSend:#updateModifiedChannel to:self |
|
296 |
||
297 |
]. |
|
298 |
^ useCodeView2InWorkspace |
|
299 |
||
300 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
301 |
"Created: / 26-07-2011 / 10:31:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
302 |
! ! |
|
303 |
||
304 |
!CodeView2SettingsAppl methodsFor:'aspects-enablement'! |
|
305 |
||
306 |
useCodeView2InToolEnabled |
|
307 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
308 |
||
309 |
useCodeView2InToolEnabled isNil ifTrue:[ |
|
310 |
useCodeView2InToolEnabled := |
|
10902 | 311 |
(AspectAdaptor forAspect: #not) |
312 |
subjectChannel: self useCodeView2InTools |
|
10398 | 313 |
]. |
314 |
^ useCodeView2InToolEnabled |
|
315 |
||
316 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
317 |
"Created: / 26-07-2011 / 10:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10902 | 318 |
"Modified (format): / 25-11-2011 / 15:11:55 / cg" |
10337 | 319 |
! ! |
320 |
||
321 |
!CodeView2SettingsAppl methodsFor:'protocol'! |
|
322 |
||
323 |
basicAspects |
|
10398 | 324 |
^#( |
325 |
#useCodeView2InTools |
|
326 |
#useCodeView2InBrowser |
|
327 |
#useCodeView2InDebugger |
|
328 |
#useCodeView2InWorkspace |
|
10524 | 329 |
"/Editing support |
330 |
#codeView2AutoIndent |
|
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
331 |
#codeView2ShowAcceptCancel |
10398 | 332 |
) |
333 |
||
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
334 |
"Modified: / 10-10-2011 / 16:43:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10337 | 335 |
! |
336 |
||
337 |
basicReadSettings |
|
338 |
self readAspects:self basicAspects from:currentUserPrefs. |
|
339 |
||
340 |
"Modified: / 19-07-2011 / 17:11:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
341 |
! |
|
342 |
||
343 |
basicSaveSettings |
|
344 |
||
345 |
self writeAspects:self basicAspects to:currentUserPrefs. |
|
346 |
||
10398 | 347 |
"Modified: / 26-07-2011 / 10:43:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10337 | 348 |
! |
349 |
||
350 |
helpFilename |
|
351 |
"subclasses must return the relative name of a helpFile |
|
352 |
in the doc/online/<language>/help directory. |
|
353 |
Or nil, if no help is available." |
|
354 |
||
355 |
^ nil"for now" |
|
356 |
||
357 |
"Modified: / 19-07-2011 / 16:55:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
358 |
! ! |
|
359 |
||
360 |
!CodeView2SettingsAppl methodsFor:'queries'! |
|
361 |
||
362 |
hasUnsavedChanges |
|
10902 | 363 |
^ self |
10337 | 364 |
hasChangedAspectIn: self basicAspects |
10902 | 365 |
asComparedTo:currentUserPrefs |
10337 | 366 |
|
367 |
"Modified: / 19-07-2011 / 17:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10902 | 368 |
"Modified (format): / 25-11-2011 / 15:25:16 / cg" |
10337 | 369 |
! ! |
370 |
||
371 |
!CodeView2SettingsAppl class methodsFor:'documentation'! |
|
372 |
||
373 |
version |
|
10902 | 374 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2SettingsAppl.st,v 1.5 2011-11-25 14:38:55 cg Exp $' |
10337 | 375 |
! |
376 |
||
377 |
version_CVS |
|
10902 | 378 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2SettingsAppl.st,v 1.5 2011-11-25 14:38:55 cg Exp $' |
10398 | 379 |
! |
380 |
||
381 |
version_SVN |
|
382 |
^ '§Id§' |
|
10337 | 383 |
! ! |