author | Claus Gittinger <cg@exept.de> |
Tue, 08 Nov 2011 16:44:00 +0100 | |
changeset 10853 | 2c561fd68036 |
parent 10794 | 854c6d72f257 |
child 10902 | 361a19675c61 |
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 |
|
41 |
!CodeView2SettingsAppl class methodsFor:'interface specs'! |
|
42 |
||
43 |
windowSpec |
|
44 |
"This resource specification was automatically generated |
|
45 |
by the UIPainter of ST/X." |
|
46 |
||
47 |
"Do not manually edit this!! If it is corrupted, |
|
48 |
the UIPainter may not be able to read the specification." |
|
49 |
||
50 |
" |
|
51 |
UIPainter new openOnClass:Tools::CodeView2SettingsAppl andSelector:#windowSpec |
|
52 |
Tools::CodeView2SettingsAppl new openInterface:#windowSpec |
|
53 |
Tools::CodeView2SettingsAppl open |
|
54 |
" |
|
55 |
||
56 |
<resource: #canvas> |
|
57 |
||
58 |
^ |
|
59 |
#(FullSpec |
|
60 |
name: windowSpec |
|
61 |
window: |
|
62 |
(WindowSpec |
|
63 |
label: 'Code Editor Settings' |
|
64 |
name: 'Code Editor Settings' |
|
65 |
min: (Point 10 10) |
|
66 |
bounds: (Rectangle 0 0 576 300) |
|
67 |
) |
|
68 |
component: |
|
69 |
(SpecCollection |
|
70 |
collection: ( |
|
71 |
(VerticalPanelViewSpec |
|
72 |
name: 'VBox' |
|
73 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
74 |
horizontalLayout: fit |
|
75 |
verticalLayout: top |
|
76 |
horizontalSpace: 3 |
|
77 |
verticalSpace: 3 |
|
78 |
component: |
|
79 |
(SpecCollection |
|
80 |
collection: ( |
|
81 |
(FramedBoxSpec |
|
10524 | 82 |
label: 'Edit Support' |
83 |
name: 'EditSupport' |
|
84 |
labelPosition: topLeft |
|
85 |
translateLabel: true |
|
86 |
component: |
|
87 |
(SpecCollection |
|
88 |
collection: ( |
|
89 |
(VerticalPanelViewSpec |
|
90 |
name: 'VerticalPanel1' |
|
91 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
92 |
horizontalLayout: fit |
|
93 |
verticalLayout: top |
|
94 |
horizontalSpace: 3 |
|
95 |
verticalSpace: 3 |
|
96 |
component: |
|
97 |
(SpecCollection |
|
98 |
collection: ( |
|
99 |
(CheckBoxSpec |
|
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
100 |
label: 'Show Accept/Cancel Buttons in Gutter' |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
101 |
name: 'CheckBox6' |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
102 |
model: codeView2ShowAcceptCancel |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
103 |
translateLabel: true |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
104 |
extent: (Point 540 22) |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
105 |
) |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
106 |
(CheckBoxSpec |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
107 |
label: 'Auto Indent (EXPERIMENTAL, NOT YET RECCOMENDED)' |
10524 | 108 |
name: 'CheckBox5' |
109 |
model: codeView2AutoIndent |
|
110 |
translateLabel: true |
|
111 |
extent: (Point 540 22) |
|
112 |
) |
|
113 |
) |
|
114 |
||
115 |
) |
|
116 |
) |
|
117 |
) |
|
118 |
||
119 |
) |
|
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
120 |
extent: (Point 576 90) |
10524 | 121 |
) |
122 |
(FramedBoxSpec |
|
10337 | 123 |
label: 'Tool Support' |
124 |
name: 'ToolSupport' |
|
125 |
labelPosition: topLeft |
|
126 |
translateLabel: true |
|
127 |
component: |
|
128 |
(SpecCollection |
|
129 |
collection: ( |
|
130 |
(VerticalPanelViewSpec |
|
131 |
name: 'ToolSupportCheckBox' |
|
10398 | 132 |
layout: (LayoutFrame 0 0 0 0 0 1 104 0) |
10337 | 133 |
horizontalLayout: fit |
134 |
verticalLayout: top |
|
135 |
horizontalSpace: 3 |
|
136 |
verticalSpace: 3 |
|
137 |
component: |
|
138 |
(SpecCollection |
|
139 |
collection: ( |
|
140 |
(CheckBoxSpec |
|
141 |
label: 'Use Advanced Code Editor in All Tools (when supported)' |
|
142 |
name: 'CheckBox1' |
|
143 |
model: useCodeView2InTools |
|
144 |
translateLabel: true |
|
145 |
extent: (Point 540 22) |
|
146 |
) |
|
10398 | 147 |
(DividerSpec |
148 |
name: 'Separator1' |
|
149 |
extent: (Point 540 4) |
|
150 |
) |
|
151 |
(CheckBoxSpec |
|
152 |
label: 'Use Advanced Code Editor in Class Browser' |
|
153 |
name: 'CheckBox2' |
|
154 |
enableChannel: useCodeView2InToolEnabled |
|
155 |
model: useCodeView2InBrowser |
|
156 |
translateLabel: true |
|
157 |
extent: (Point 540 22) |
|
158 |
) |
|
159 |
(CheckBoxSpec |
|
160 |
label: 'Use Advanced Code Editor in Debugger (HIGHLY EXPERIMENTAL!!!!!!)' |
|
161 |
name: 'CheckBox3' |
|
162 |
enableChannel: useCodeView2InToolEnabled |
|
163 |
model: useCodeView2InDebugger |
|
164 |
translateLabel: true |
|
165 |
extent: (Point 540 22) |
|
166 |
) |
|
167 |
(CheckBoxSpec |
|
168 |
label: 'Use Advanced Code Editor in Workspace' |
|
169 |
name: 'CheckBox4' |
|
170 |
enableChannel: useCodeView2InToolEnabled |
|
171 |
model: useCodeView2InWorkspace |
|
172 |
translateLabel: true |
|
173 |
extent: (Point 540 22) |
|
174 |
) |
|
10337 | 175 |
) |
176 |
||
177 |
) |
|
178 |
useDynamicPreferredHeight: true |
|
179 |
usePreferredHeight: true |
|
180 |
) |
|
181 |
) |
|
182 |
||
183 |
) |
|
10398 | 184 |
extent: (Point 590 154) |
10337 | 185 |
useDynamicPreferredHeight: true |
186 |
useDynamicPreferredWidth: true |
|
187 |
usePreferredHeight: true |
|
188 |
usePreferredWidth: true |
|
189 |
) |
|
190 |
) |
|
191 |
||
192 |
) |
|
193 |
) |
|
194 |
) |
|
195 |
||
196 |
) |
|
197 |
) |
|
10398 | 198 |
|
10337 | 199 |
! ! |
200 |
||
201 |
!CodeView2SettingsAppl methodsFor:'aspects'! |
|
202 |
||
10524 | 203 |
codeView2AutoIndent |
204 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
205 |
||
206 |
codeView2AutoIndent isNil ifTrue:[ |
|
207 |
codeView2AutoIndent := ValueHolder new. |
|
208 |
codeView2AutoIndent onChangeSend:#updateModifiedChannel to:self |
|
209 |
||
210 |
]. |
|
211 |
^ codeView2AutoIndent |
|
212 |
||
213 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
214 |
"Created: / 07-08-2011 / 12:52:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
215 |
! |
|
216 |
||
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
217 |
codeView2ShowAcceptCancel |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
218 |
"return/create the 'codeView2ShowAcceptCancel' value holder (automatically generated)" |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
219 |
|
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
220 |
codeView2ShowAcceptCancel isNil ifTrue:[ |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
221 |
codeView2ShowAcceptCancel := ValueHolder new. |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
222 |
codeView2ShowAcceptCancel onChangeSend:#updateModifiedChannel to:self |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
223 |
]. |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
224 |
^ codeView2ShowAcceptCancel |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
225 |
|
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
226 |
"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
|
227 |
! |
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
228 |
|
10398 | 229 |
useCodeView2InBrowser |
230 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
231 |
||
232 |
useCodeView2InBrowser isNil ifTrue:[ |
|
233 |
useCodeView2InBrowser := ValueHolder new. |
|
234 |
useCodeView2InBrowser onChangeSend:#updateModifiedChannel to:self |
|
235 |
||
236 |
]. |
|
237 |
^ useCodeView2InBrowser |
|
238 |
||
239 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
240 |
"Created: / 26-07-2011 / 10:30:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
241 |
! |
|
242 |
||
243 |
useCodeView2InDebugger |
|
244 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
245 |
||
246 |
useCodeView2InDebugger isNil ifTrue:[ |
|
247 |
useCodeView2InDebugger := ValueHolder new. |
|
248 |
useCodeView2InDebugger onChangeSend:#updateModifiedChannel to:self |
|
249 |
||
250 |
]. |
|
251 |
^ useCodeView2InDebugger |
|
252 |
||
253 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
254 |
"Created: / 26-07-2011 / 10:30:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
255 |
! |
|
256 |
||
10337 | 257 |
useCodeView2InTools |
258 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
259 |
||
260 |
useCodeView2InTools isNil ifTrue:[ |
|
261 |
useCodeView2InTools := ValueHolder new. |
|
262 |
useCodeView2InTools onChangeSend:#updateModifiedChannel to:self |
|
263 |
||
264 |
]. |
|
265 |
^ useCodeView2InTools |
|
266 |
||
267 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10398 | 268 |
! |
269 |
||
270 |
useCodeView2InWorkspace |
|
271 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
272 |
||
273 |
useCodeView2InWorkspace isNil ifTrue:[ |
|
274 |
useCodeView2InWorkspace := ValueHolder new. |
|
275 |
useCodeView2InWorkspace onChangeSend:#updateModifiedChannel to:self |
|
276 |
||
277 |
]. |
|
278 |
^ useCodeView2InWorkspace |
|
279 |
||
280 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
281 |
"Created: / 26-07-2011 / 10:31:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
282 |
! ! |
|
283 |
||
284 |
!CodeView2SettingsAppl methodsFor:'aspects-enablement'! |
|
285 |
||
286 |
useCodeView2InToolEnabled |
|
287 |
"return/create the 'useCodeView2InTools' value holder (automatically generated)" |
|
288 |
||
289 |
useCodeView2InToolEnabled isNil ifTrue:[ |
|
290 |
useCodeView2InToolEnabled := |
|
291 |
(AspectAdaptor forAspect: #not) subjectChannel: |
|
292 |
self useCodeView2InTools |
|
293 |
||
294 |
||
295 |
]. |
|
296 |
^ useCodeView2InToolEnabled |
|
297 |
||
298 |
"Modified: / 11-03-2010 / 10:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
299 |
"Created: / 26-07-2011 / 10:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10337 | 300 |
! ! |
301 |
||
302 |
!CodeView2SettingsAppl methodsFor:'protocol'! |
|
303 |
||
304 |
basicAspects |
|
10398 | 305 |
^#( |
306 |
#useCodeView2InTools |
|
307 |
#useCodeView2InBrowser |
|
308 |
#useCodeView2InDebugger |
|
309 |
#useCodeView2InWorkspace |
|
10524 | 310 |
"/Editing support |
311 |
#codeView2AutoIndent |
|
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
312 |
#codeView2ShowAcceptCancel |
10398 | 313 |
) |
314 |
||
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
315 |
"Modified: / 10-10-2011 / 16:43:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10337 | 316 |
! |
317 |
||
318 |
basicReadSettings |
|
319 |
self readAspects:self basicAspects from:currentUserPrefs. |
|
320 |
||
321 |
"Modified: / 19-07-2011 / 17:11:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
322 |
! |
|
323 |
||
324 |
basicSaveSettings |
|
325 |
||
326 |
self writeAspects:self basicAspects to:currentUserPrefs. |
|
327 |
||
10398 | 328 |
"Modified: / 26-07-2011 / 10:43:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10337 | 329 |
! |
330 |
||
331 |
helpFilename |
|
332 |
"subclasses must return the relative name of a helpFile |
|
333 |
in the doc/online/<language>/help directory. |
|
334 |
Or nil, if no help is available." |
|
335 |
||
336 |
^ nil"for now" |
|
337 |
||
338 |
"Modified: / 19-07-2011 / 16:55:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
339 |
! ! |
|
340 |
||
341 |
!CodeView2SettingsAppl methodsFor:'queries'! |
|
342 |
||
343 |
hasUnsavedChanges |
|
344 |
||
345 |
(self |
|
346 |
hasChangedAspectIn: self basicAspects |
|
347 |
asComparedTo:currentUserPrefs) ifTrue:[^ true]. |
|
348 |
^ false. |
|
349 |
||
350 |
"Modified: / 19-07-2011 / 17:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
351 |
! ! |
|
352 |
||
353 |
!CodeView2SettingsAppl class methodsFor:'documentation'! |
|
354 |
||
355 |
version |
|
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
356 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2SettingsAppl.st,v 1.4 2011-10-10 15:52:24 vrany Exp $' |
10337 | 357 |
! |
358 |
||
359 |
version_CVS |
|
10794
854c6d72f257
Added checkbox to control default accept/cancel bar visibility
vrany
parents:
10524
diff
changeset
|
360 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2SettingsAppl.st,v 1.4 2011-10-10 15:52:24 vrany Exp $' |
10398 | 361 |
! |
362 |
||
363 |
version_SVN |
|
364 |
^ '§Id§' |
|
10337 | 365 |
! ! |