14 "{ NameSpace: Tools }" |
14 "{ NameSpace: Tools }" |
15 |
15 |
16 AbstractSettingsApplication subclass:#CodeView2SettingsAppl |
16 AbstractSettingsApplication subclass:#CodeView2SettingsAppl |
17 instanceVariableNames:'useCodeView2InTools useCodeView2InDebugger useCodeView2InBrowser |
17 instanceVariableNames:'useCodeView2InTools useCodeView2InDebugger useCodeView2InBrowser |
18 useCodeView2InToolEnabled useCodeView2InWorkspace |
18 useCodeView2InToolEnabled useCodeView2InWorkspace |
19 codeView2AutoIndent codeView2ShowAcceptCancel' |
19 codeView2AutoIndent' |
20 classVariableNames:'' |
20 classVariableNames:'' |
21 poolDictionaries:'' |
21 poolDictionaries:'' |
22 category:'Interface-CodeView' |
22 category:'Interface-CodeView' |
23 ! |
23 ! |
24 |
24 |
34 inclusion of the above copyright notice. This software may not |
34 inclusion of the above copyright notice. This software may not |
35 be provided or otherwise made available to, or used by, any |
35 be provided or otherwise made available to, or used by, any |
36 other person. No title to or ownership of the software is |
36 other person. No title to or ownership of the software is |
37 hereby transferred. |
37 hereby transferred. |
38 " |
38 " |
39 ! ! |
|
40 |
|
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 ! ! |
39 ! ! |
65 |
40 |
66 !CodeView2SettingsAppl class methodsFor:'interface specs'! |
41 !CodeView2SettingsAppl class methodsFor:'interface specs'! |
67 |
42 |
68 windowSpec |
43 windowSpec |
101 horizontalSpace: 3 |
76 horizontalSpace: 3 |
102 verticalSpace: 3 |
77 verticalSpace: 3 |
103 component: |
78 component: |
104 (SpecCollection |
79 (SpecCollection |
105 collection: ( |
80 collection: ( |
106 (FramedBoxSpec |
|
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 |
81 (FramedBoxSpec |
171 label: 'Edit Support' |
82 label: 'Edit Support' |
172 name: 'EditSupport' |
83 name: 'EditSupport' |
173 labelPosition: topLeft |
84 labelPosition: topLeft |
174 translateLabel: true |
85 translateLabel: true |
184 verticalSpace: 3 |
95 verticalSpace: 3 |
185 component: |
96 component: |
186 (SpecCollection |
97 (SpecCollection |
187 collection: ( |
98 collection: ( |
188 (CheckBoxSpec |
99 (CheckBoxSpec |
189 label: 'Show Accept/Cancel Buttons in Gutter' |
100 label: 'Auto Indent' |
190 name: 'CheckBox6' |
|
191 model: codeView2ShowAcceptCancel |
|
192 translateLabel: true |
|
193 extent: (Point 551 25) |
|
194 ) |
|
195 (CheckBoxSpec |
|
196 label: 'Auto Indent (experimental, not yet recommended)' |
|
197 name: 'CheckBox5' |
101 name: 'CheckBox5' |
198 model: codeView2AutoIndent |
102 model: codeView2AutoIndent |
199 translateLabel: true |
103 translateLabel: true |
200 extent: (Point 551 25) |
104 extent: (Point 540 22) |
201 ) |
105 ) |
202 ) |
106 ) |
203 |
107 |
204 ) |
108 ) |
205 ) |
109 ) |
206 ) |
110 ) |
207 |
111 |
208 ) |
112 ) |
209 extent: (Point 585 77) |
113 extent: (Point 576 59) |
|
114 ) |
|
115 (FramedBoxSpec |
|
116 label: 'Tool Support' |
|
117 name: 'ToolSupport' |
|
118 labelPosition: topLeft |
|
119 translateLabel: true |
|
120 component: |
|
121 (SpecCollection |
|
122 collection: ( |
|
123 (VerticalPanelViewSpec |
|
124 name: 'ToolSupportCheckBox' |
|
125 layout: (LayoutFrame 0 0 0 0 0 1 104 0) |
|
126 horizontalLayout: fit |
|
127 verticalLayout: top |
|
128 horizontalSpace: 3 |
|
129 verticalSpace: 3 |
|
130 component: |
|
131 (SpecCollection |
|
132 collection: ( |
|
133 (CheckBoxSpec |
|
134 label: 'Use Advanced Code Editor in All Tools (when supported)' |
|
135 name: 'CheckBox1' |
|
136 model: useCodeView2InTools |
|
137 translateLabel: true |
|
138 extent: (Point 540 22) |
|
139 ) |
|
140 (DividerSpec |
|
141 name: 'Separator1' |
|
142 extent: (Point 540 4) |
|
143 ) |
|
144 (CheckBoxSpec |
|
145 label: 'Use Advanced Code Editor in Class Browser' |
|
146 name: 'CheckBox2' |
|
147 enableChannel: useCodeView2InToolEnabled |
|
148 model: useCodeView2InBrowser |
|
149 translateLabel: true |
|
150 extent: (Point 540 22) |
|
151 ) |
|
152 (CheckBoxSpec |
|
153 label: 'Use Advanced Code Editor in Debugger (HIGHLY EXPERIMENTAL!!!!!!)' |
|
154 name: 'CheckBox3' |
|
155 enableChannel: useCodeView2InToolEnabled |
|
156 model: useCodeView2InDebugger |
|
157 translateLabel: true |
|
158 extent: (Point 540 22) |
|
159 ) |
|
160 (CheckBoxSpec |
|
161 label: 'Use Advanced Code Editor in Workspace' |
|
162 name: 'CheckBox4' |
|
163 enableChannel: useCodeView2InToolEnabled |
|
164 model: useCodeView2InWorkspace |
|
165 translateLabel: true |
|
166 extent: (Point 540 22) |
|
167 ) |
|
168 ) |
|
169 |
|
170 ) |
|
171 useDynamicPreferredHeight: true |
|
172 usePreferredHeight: true |
|
173 ) |
|
174 ) |
|
175 |
|
176 ) |
|
177 extent: (Point 590 154) |
|
178 useDynamicPreferredHeight: true |
|
179 useDynamicPreferredWidth: true |
|
180 usePreferredHeight: true |
|
181 usePreferredWidth: true |
210 ) |
182 ) |
211 ) |
183 ) |
212 |
184 |
213 ) |
185 ) |
214 ) |
186 ) |
215 ) |
187 ) |
216 |
188 |
217 ) |
189 ) |
218 ) |
190 ) |
|
191 |
219 ! ! |
192 ! ! |
220 |
193 |
221 !CodeView2SettingsAppl methodsFor:'aspects'! |
194 !CodeView2SettingsAppl methodsFor:'aspects'! |
222 |
195 |
223 codeView2AutoIndent |
196 codeView2AutoIndent |
232 |
205 |
233 "Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
206 "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>" |
207 "Created: / 07-08-2011 / 12:52:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
235 ! |
208 ! |
236 |
209 |
237 codeView2ShowAcceptCancel |
|
238 "return/create the 'codeView2ShowAcceptCancel' value holder (automatically generated)" |
|
239 |
|
240 codeView2ShowAcceptCancel isNil ifTrue:[ |
|
241 codeView2ShowAcceptCancel := ValueHolder new. |
|
242 codeView2ShowAcceptCancel onChangeSend:#updateModifiedChannel to:self |
|
243 ]. |
|
244 ^ codeView2ShowAcceptCancel |
|
245 |
|
246 "Modified: / 10-10-2011 / 16:43:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
247 ! |
|
248 |
|
249 useCodeView2InBrowser |
210 useCodeView2InBrowser |
250 "return/create the 'useCodeView2InTools' value holder (automatically generated)" |
211 "return/create the 'useCodeView2InTools' value holder (automatically generated)" |
251 |
212 |
252 useCodeView2InBrowser isNil ifTrue:[ |
213 useCodeView2InBrowser isNil ifTrue:[ |
253 useCodeView2InBrowser := ValueHolder new. |
214 useCodeView2InBrowser := ValueHolder new. |
306 useCodeView2InToolEnabled |
267 useCodeView2InToolEnabled |
307 "return/create the 'useCodeView2InTools' value holder (automatically generated)" |
268 "return/create the 'useCodeView2InTools' value holder (automatically generated)" |
308 |
269 |
309 useCodeView2InToolEnabled isNil ifTrue:[ |
270 useCodeView2InToolEnabled isNil ifTrue:[ |
310 useCodeView2InToolEnabled := |
271 useCodeView2InToolEnabled := |
311 (AspectAdaptor forAspect: #not) |
272 (AspectAdaptor forAspect: #not) subjectChannel: |
312 subjectChannel: self useCodeView2InTools |
273 self useCodeView2InTools |
|
274 |
|
275 |
313 ]. |
276 ]. |
314 ^ useCodeView2InToolEnabled |
277 ^ useCodeView2InToolEnabled |
315 |
278 |
316 "Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
279 "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>" |
280 "Created: / 26-07-2011 / 10:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
318 "Modified (format): / 25-11-2011 / 15:11:55 / cg" |
|
319 ! ! |
281 ! ! |
320 |
282 |
321 !CodeView2SettingsAppl methodsFor:'protocol'! |
283 !CodeView2SettingsAppl methodsFor:'protocol'! |
322 |
284 |
323 basicAspects |
285 basicAspects |
326 #useCodeView2InBrowser |
288 #useCodeView2InBrowser |
327 #useCodeView2InDebugger |
289 #useCodeView2InDebugger |
328 #useCodeView2InWorkspace |
290 #useCodeView2InWorkspace |
329 "/Editing support |
291 "/Editing support |
330 #codeView2AutoIndent |
292 #codeView2AutoIndent |
331 #codeView2ShowAcceptCancel |
|
332 ) |
293 ) |
333 |
294 |
334 "Modified: / 10-10-2011 / 16:43:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
295 "Modified: / 07-08-2011 / 12:48:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
335 ! |
296 ! |
336 |
297 |
337 basicReadSettings |
298 basicReadSettings |
338 self readAspects:self basicAspects from:currentUserPrefs. |
299 self readAspects:self basicAspects from:currentUserPrefs. |
339 |
300 |
358 ! ! |
319 ! ! |
359 |
320 |
360 !CodeView2SettingsAppl methodsFor:'queries'! |
321 !CodeView2SettingsAppl methodsFor:'queries'! |
361 |
322 |
362 hasUnsavedChanges |
323 hasUnsavedChanges |
363 ^ self |
324 |
|
325 (self |
364 hasChangedAspectIn: self basicAspects |
326 hasChangedAspectIn: self basicAspects |
365 asComparedTo:currentUserPrefs |
327 asComparedTo:currentUserPrefs) ifTrue:[^ true]. |
|
328 ^ false. |
366 |
329 |
367 "Modified: / 19-07-2011 / 17:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
330 "Modified: / 19-07-2011 / 17:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
368 "Modified (format): / 25-11-2011 / 15:25:16 / cg" |
|
369 ! ! |
331 ! ! |
370 |
332 |
371 !CodeView2SettingsAppl class methodsFor:'documentation'! |
333 !CodeView2SettingsAppl class methodsFor:'documentation'! |
372 |
334 |
373 version |
335 version |
374 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2SettingsAppl.st,v 1.5 2011-11-25 14:38:55 cg Exp $' |
336 ^ '$Id: Tools__CodeView2SettingsAppl.st 7810 2011-08-12 14:54:02Z vranyj1 $' |
375 ! |
337 ! |
376 |
338 |
377 version_CVS |
339 version_CVS |
378 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2SettingsAppl.st,v 1.5 2011-11-25 14:38:55 cg Exp $' |
340 ^ '§Header: /cvs/stx/stx/libtool/Tools__CodeView2SettingsAppl.st,v 1.3 2011/08/07 11:59:11 vrany Exp §' |
379 ! |
341 ! |
380 |
342 |
381 version_SVN |
343 version_SVN |
382 ^ '§Id§' |
344 ^ '$Id: Tools__CodeView2SettingsAppl.st 7810 2011-08-12 14:54:02Z vranyj1 $' |
383 ! ! |
345 ! ! |