author | Claus Gittinger <cg@exept.de> |
Wed, 11 Jan 2012 15:42:50 +0100 | |
changeset 930 | b783c5a2078a |
parent 927 | 99a7de38fdc3 |
child 931 | d7780349128d |
permissions | -rw-r--r-- |
635 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
26 |
"{ Package: 'stx:libsvn' }" |
|
27 |
||
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
AbstractSettingsApplication subclass:#ConfigurationApp |
|
923 | 31 |
instanceVariableNames:'currentProfileHolder availableProfilesHolder svnConfigurations2 |
32 |
svnCurrentConfiguration configurationSelectedHolder |
|
33 |
newConfigurationCount' |
|
34 |
classVariableNames:'' |
|
35 |
poolDictionaries:'' |
|
36 |
category:'SVN-UI-Configuration' |
|
635 | 37 |
! |
38 |
||
39 |
!ConfigurationApp class methodsFor:'documentation'! |
|
40 |
||
41 |
copyright |
|
42 |
" |
|
43 |
Copyright (c) 2007-2010 Jan Vrany |
|
44 |
Copyright (c) 2009-2010 eXept Software AG |
|
45 |
||
46 |
Permission is hereby granted, free of charge, to any person |
|
47 |
obtaining a copy of this software and associated documentation |
|
48 |
files (the 'Software'), to deal in the Software without |
|
49 |
restriction, including without limitation the rights to use, |
|
50 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
51 |
copies of the Software, and to permit persons to whom the |
|
52 |
Software is furnished to do so, subject to the following |
|
53 |
conditions: |
|
54 |
||
55 |
The above copyright notice and this permission notice shall be |
|
56 |
included in all copies or substantial portions of the Software. |
|
57 |
||
58 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
59 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
60 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
61 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
62 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
63 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
64 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
65 |
OTHER DEALINGS IN THE SOFTWARE. |
|
66 |
||
67 |
" |
|
68 |
! ! |
|
69 |
||
70 |
!ConfigurationApp class methodsFor:'help specs'! |
|
71 |
||
72 |
flyByHelpSpec |
|
73 |
||
74 |
<resource: #help> |
|
75 |
||
76 |
^self helpSpec |
|
77 |
||
78 |
"Created: / 26-05-2008 / 14:25:31 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
79 |
! |
|
80 |
||
81 |
helpSpec |
|
82 |
"This resource specification was automatically generated |
|
83 |
by the UIHelpTool of ST/X." |
|
84 |
||
85 |
"Do not manually edit this!! If it is corrupted, |
|
86 |
the UIHelpTool may not be able to read the specification." |
|
87 |
||
88 |
" |
|
89 |
UIHelpTool openOnClass:SVN::SettingsApp |
|
90 |
" |
|
91 |
||
92 |
<resource: #help> |
|
93 |
||
94 |
^ super helpSpec addPairsFrom:#( |
|
95 |
||
930 | 96 |
#shownInBrowserMenus |
97 |
'If checked, the Systembrowser includes operations for me in its SCM menus.' |
|
98 |
||
635 | 99 |
#Package |
100 |
'' |
|
101 |
||
102 |
) |
|
103 |
||
104 |
"Modified: / 26-05-2008 / 14:24:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
930 | 105 |
"Modified: / 11-01-2012 / 15:42:09 / cg" |
635 | 106 |
! ! |
107 |
||
108 |
!ConfigurationApp class methodsFor:'image specs'! |
|
109 |
||
110 |
defaultIcon |
|
111 |
||
112 |
^SVN::IconLibrary svn_wizban2 magnifiedTo: 24@24 |
|
113 |
||
114 |
"Created: / 26-05-2008 / 14:55:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
115 |
! |
|
116 |
||
117 |
svnIcon |
|
118 |
^ IconLibrary svn_wizban |
|
119 |
||
120 |
"Created: / 24-05-2008 / 01:44:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
121 |
! ! |
|
122 |
||
123 |
!ConfigurationApp class methodsFor:'interface opening'! |
|
124 |
||
125 |
open |
|
126 |
||
127 |
| settingsApp | |
|
128 |
||
129 |
settingsApp := SettingsDialog new. |
|
130 |
settingsApp addApplClass:self fullName |
|
131 |
withName:'Subversion'. |
|
132 |
settingsApp showRoot: false. |
|
133 |
settingsApp selectedItem value: |
|
134 |
(settingsApp applicationList root children anyOne). |
|
135 |
settingsApp open. |
|
136 |
||
137 |
"Created: / 26-05-2008 / 12:17:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
138 |
"Modified: / 27-02-2010 / 17:07:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
139 |
! ! |
|
140 |
||
141 |
!ConfigurationApp class methodsFor:'interface specs'! |
|
142 |
||
143 |
basicTabSpec |
|
144 |
"This resource specification was automatically generated |
|
145 |
by the UIPainter of ST/X." |
|
146 |
||
147 |
"Do not manually edit this!! If it is corrupted, |
|
148 |
the UIPainter may not be able to read the specification." |
|
149 |
||
150 |
" |
|
151 |
UIPainter new openOnClass:SVN::ConfigurationApp andSelector:#basicTabSpec |
|
152 |
SVN::ConfigurationApp new openInterface:#basicTabSpec |
|
153 |
" |
|
154 |
||
155 |
<resource: #canvas> |
|
156 |
||
157 |
^ |
|
158 |
#(FullSpec |
|
159 |
name: basicTabSpec |
|
160 |
window: |
|
161 |
(WindowSpec |
|
162 |
label: 'Basic Settings' |
|
163 |
name: 'Basic Settings' |
|
164 |
bounds: (Rectangle 0 0 611 309) |
|
165 |
) |
|
166 |
component: |
|
167 |
(SpecCollection |
|
168 |
collection: ( |
|
169 |
(VerticalPanelViewSpec |
|
170 |
name: 'GeneralSettingsPanel' |
|
171 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
172 |
horizontalLayout: fit |
|
173 |
verticalLayout: top |
|
174 |
horizontalSpace: 3 |
|
175 |
verticalSpace: 3 |
|
176 |
component: |
|
177 |
(SpecCollection |
|
178 |
collection: ( |
|
179 |
(MultiColumnPanelViewSpec |
|
180 |
name: 'Grid' |
|
181 |
horizontalLayout: fit |
|
182 |
verticalLayout: top |
|
183 |
columnWidths: |
|
184 |
(OrderedCollection |
|
185 |
0.25 0.7 |
|
186 |
) |
|
187 |
component: |
|
188 |
(SpecCollection |
|
189 |
collection: ( |
|
190 |
(LabelSpec |
|
191 |
label: 'Working Copy:' |
|
192 |
name: 'WorkingCopyBaseLabel' |
|
193 |
translateLabel: true |
|
194 |
adjust: leftRight |
|
195 |
extent: (Point 154 25) |
|
196 |
) |
|
197 |
(FilenameInputFieldSpec |
|
198 |
name: 'WorkingCopyBase' |
|
199 |
enableChannel: svnEnabled |
|
200 |
model: workingCopyBaseAspect |
|
201 |
modifiedChannel: modifiedChannel |
|
202 |
acceptOnPointerLeave: false |
|
203 |
extent: (Point 454 25) |
|
204 |
viewClassName: 'FilenameWidgetWithHistory' |
|
205 |
postBuildCallback: postBuildWorkingCopyField: |
|
206 |
) |
|
207 |
) |
|
208 |
||
209 |
) |
|
210 |
useDefaultExtent: true |
|
211 |
) |
|
212 |
(DividerSpec |
|
213 |
name: 'Separator' |
|
214 |
extent: (Point 611 5) |
|
215 |
) |
|
216 |
(CheckBoxSpec |
|
217 |
label: 'Verbose (Traces svn commands to Transcript)' |
|
218 |
name: 'Verbose' |
|
219 |
enableChannel: svnEnabled |
|
220 |
model: svnVerbose |
|
221 |
translateLabel: true |
|
222 |
useDefaultExtent: true |
|
223 |
) |
|
224 |
) |
|
225 |
||
226 |
) |
|
227 |
) |
|
228 |
) |
|
229 |
||
230 |
) |
|
231 |
) |
|
232 |
! |
|
233 |
||
234 |
profilesTabSpec |
|
235 |
"This resource specification was automatically generated |
|
236 |
by the UIPainter of ST/X." |
|
237 |
||
238 |
"Do not manually edit this!! If it is corrupted, |
|
239 |
the UIPainter may not be able to read the specification." |
|
240 |
||
241 |
" |
|
242 |
UIPainter new openOnClass:SVN::ConfigurationApp andSelector:#profilesTabSpec |
|
243 |
SVN::ConfigurationApp new openInterface:#profilesTabSpec |
|
244 |
" |
|
245 |
||
246 |
<resource: #canvas> |
|
247 |
||
248 |
^ |
|
249 |
#(FullSpec |
|
250 |
name: profilesTabSpec |
|
251 |
window: |
|
252 |
(WindowSpec |
|
253 |
label: 'Profiles' |
|
254 |
name: 'Profiles' |
|
255 |
min: (Point 10 10) |
|
256 |
bounds: (Rectangle 0 0 782 552) |
|
257 |
) |
|
258 |
component: |
|
259 |
(SpecCollection |
|
260 |
collection: ( |
|
261 |
(LabelSpec |
|
262 |
label: 'Current profile:' |
|
263 |
name: 'CurrentProfileLabel' |
|
264 |
layout: (LayoutFrame 0 0 0 0 102 0 30 0) |
|
265 |
translateLabel: true |
|
266 |
adjust: leftRight |
|
267 |
useDynamicPreferredWidth: true |
|
268 |
usePreferredWidth: true |
|
269 |
) |
|
270 |
(ComboListSpec |
|
271 |
name: 'CurrentConfiguration' |
|
272 |
layout: (LayoutFrame 103 0 3 0 0 1 28 0) |
|
273 |
model: svnCurrentConfiguration |
|
274 |
comboList: svnConfigurations2 |
|
275 |
useIndex: false |
|
276 |
) |
|
277 |
(DividerSpec |
|
278 |
name: 'Separator1' |
|
279 |
layout: (LayoutFrame 0 0 30 0 0 1 35 0) |
|
280 |
) |
|
281 |
(LabelSpec |
|
282 |
label: 'Available profiles:' |
|
283 |
name: 'AvailableProfiles' |
|
284 |
layout: (LayoutFrame 0 0 35 0 0 1 65 0) |
|
285 |
translateLabel: true |
|
286 |
adjust: left |
|
287 |
) |
|
288 |
(SelectionInListModelViewSpec |
|
289 |
name: 'ProfileList' |
|
290 |
layout: (LayoutFrame 0 0 65 0 -100 1 0 1) |
|
291 |
model: selectedProfileIndexHolder |
|
292 |
hasHorizontalScrollBar: true |
|
293 |
hasVerticalScrollBar: true |
|
294 |
listModel: svnConfigurations2 |
|
295 |
highlightMode: line |
|
296 |
doubleClickSelector: doConfigurationEdit |
|
297 |
) |
|
298 |
(VerticalPanelViewSpec |
|
299 |
name: 'Buttons1' |
|
300 |
layout: (LayoutFrame -95 1 65 0 0 1 0 0.7) |
|
301 |
horizontalLayout: fit |
|
302 |
verticalLayout: top |
|
303 |
horizontalSpace: 5 |
|
304 |
verticalSpace: 3 |
|
305 |
component: |
|
306 |
(SpecCollection |
|
307 |
collection: ( |
|
308 |
(ActionButtonSpec |
|
309 |
label: 'Add' |
|
310 |
name: 'ButtonAdd' |
|
311 |
translateLabel: true |
|
312 |
model: doConfigurationAdd |
|
313 |
extent: (Point 95 22) |
|
314 |
) |
|
315 |
(ActionButtonSpec |
|
316 |
label: 'Remove' |
|
317 |
name: 'ButtonRemove' |
|
318 |
translateLabel: true |
|
319 |
model: doConfigurationRemove |
|
320 |
enableChannel: configurationSelectedHolder |
|
321 |
extent: (Point 95 22) |
|
322 |
) |
|
323 |
(ActionButtonSpec |
|
324 |
label: 'Edit' |
|
325 |
name: 'ButtonEdit' |
|
326 |
translateLabel: true |
|
327 |
model: doConfigurationEdit |
|
328 |
enableChannel: configurationSelectedHolder |
|
329 |
extent: (Point 95 22) |
|
330 |
) |
|
331 |
) |
|
332 |
||
333 |
) |
|
334 |
) |
|
335 |
(VerticalPanelViewSpec |
|
336 |
name: 'Buttons2' |
|
337 |
layout: (LayoutFrame -95 1 0 0.7 0 1 0 1) |
|
338 |
horizontalLayout: fit |
|
339 |
verticalLayout: bottom |
|
340 |
horizontalSpace: 5 |
|
341 |
verticalSpace: 3 |
|
342 |
component: |
|
343 |
(SpecCollection |
|
344 |
collection: ( |
|
345 |
(ActionButtonSpec |
|
346 |
label: 'Export' |
|
347 |
name: 'Button2' |
|
348 |
translateLabel: true |
|
349 |
model: doConfigurationExport |
|
350 |
enableChannel: configurationSelectedHolder |
|
351 |
extent: (Point 95 22) |
|
352 |
) |
|
353 |
(ActionButtonSpec |
|
354 |
label: 'Import' |
|
355 |
name: 'Button3' |
|
356 |
translateLabel: true |
|
357 |
model: doConfigurationImport |
|
358 |
extent: (Point 95 22) |
|
359 |
) |
|
360 |
) |
|
361 |
||
362 |
) |
|
363 |
) |
|
364 |
) |
|
365 |
||
366 |
) |
|
367 |
) |
|
368 |
! |
|
369 |
||
370 |
windowSpec |
|
371 |
"This resource specification was automatically generated |
|
372 |
by the UIPainter of ST/X." |
|
373 |
||
374 |
"Do not manually edit this!! If it is corrupted, |
|
375 |
the UIPainter may not be able to read the specification." |
|
376 |
||
377 |
" |
|
378 |
UIPainter new openOnClass:SVN::ConfigurationApp andSelector:#windowSpec |
|
379 |
SVN::ConfigurationApp new openInterface:#windowSpec |
|
380 |
SVN::ConfigurationApp open |
|
381 |
" |
|
382 |
||
383 |
<resource: #canvas> |
|
384 |
||
385 |
^ |
|
386 |
#(FullSpec |
|
387 |
name: windowSpec |
|
388 |
window: |
|
389 |
(WindowSpec |
|
390 |
label: 'SubVersion Settings' |
|
391 |
name: 'SubVersion Settings' |
|
392 |
min: (Point 10 10) |
|
393 |
bounds: (Rectangle 0 0 695 627) |
|
394 |
) |
|
395 |
component: |
|
396 |
(SpecCollection |
|
397 |
collection: ( |
|
398 |
(LabelSpec |
|
399 |
label: ' Subversion Settings' |
|
400 |
name: 'SubVersionSettingsTitle' |
|
401 |
layout: (LayoutFrame 0 0 0 0 0 1 66 0) |
|
402 |
style: (FontDescription helvetica medium roman 18 #'iso10646-1') |
|
403 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
404 |
translateLabel: true |
|
405 |
adjust: left |
|
406 |
) |
|
407 |
(LabelSpec |
|
408 |
label: 'Icon' |
|
409 |
name: 'SubVersionIcon' |
|
410 |
layout: (LayoutFrame -75 1 0 0 0 1 66 0) |
|
411 |
hasCharacterOrientedLabel: false |
|
412 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
413 |
translateLabel: true |
|
414 |
labelChannel: svnIcon |
|
415 |
) |
|
416 |
(VerticalPanelViewSpec |
|
417 |
name: 'Controls' |
|
418 |
layout: (LayoutFrame 0 0 70 0 0 1 0 1) |
|
419 |
horizontalLayout: fit |
|
420 |
verticalLayout: topFit |
|
421 |
horizontalSpace: 3 |
|
422 |
verticalSpace: 3 |
|
423 |
component: |
|
424 |
(SpecCollection |
|
425 |
collection: ( |
|
426 |
(HorizontalPanelViewSpec |
|
427 |
name: 'SVNEnabledAndResetPanel' |
|
428 |
horizontalLayout: rightSpaceFit |
|
429 |
verticalLayout: fit |
|
430 |
horizontalSpace: 0 |
|
431 |
verticalSpace: 3 |
|
432 |
component: |
|
433 |
(SpecCollection |
|
434 |
collection: ( |
|
435 |
(CheckBoxSpec |
|
436 |
label: 'Enable SubVersion Manager' |
|
437 |
name: 'Enabled' |
|
438 |
model: svnEnabled |
|
439 |
translateLabel: true |
|
440 |
extent: (Point 521 30) |
|
930 | 441 |
activeHelpKey: shownInBrowserMenus |
635 | 442 |
) |
443 |
(ActionButtonSpec |
|
444 |
label: 'Reset cached repositories' |
|
445 |
name: 'ResetCachedRepositoriesButton' |
|
446 |
translateLabel: true |
|
447 |
model: resetCachedRepositories |
|
448 |
enableChannel: svnEnabled |
|
449 |
extent: (Point 175 30) |
|
450 |
) |
|
451 |
) |
|
452 |
||
453 |
) |
|
454 |
extent: (Point 695 30) |
|
455 |
) |
|
456 |
(NoteBookViewSpec |
|
457 |
name: 'NoteBook' |
|
458 |
menu: tabList |
|
459 |
useDefaultExtent: true |
|
460 |
) |
|
461 |
) |
|
462 |
||
463 |
) |
|
464 |
) |
|
465 |
) |
|
466 |
||
467 |
) |
|
468 |
) |
|
930 | 469 |
|
470 |
"Modified (format): / 11-01-2012 / 15:42:32 / cg" |
|
635 | 471 |
! ! |
472 |
||
473 |
!ConfigurationApp class methodsFor:'list specs'! |
|
474 |
||
475 |
tabList |
|
476 |
"This resource specification was automatically generated |
|
477 |
by the TabListEditor of ST/X." |
|
478 |
||
479 |
"Do not manually edit this!! If it is corrupted, |
|
480 |
the TabListEditor may not be able to read the specification." |
|
481 |
||
482 |
" |
|
483 |
TabListEditor new openOnClass: self andSelector:#tabList |
|
484 |
" |
|
485 |
||
486 |
<resource: #tabList> |
|
487 |
||
488 |
^ #( |
|
489 |
(TabItem |
|
490 |
label: 'Profiles' |
|
491 |
minorKey: profilesTabSpec |
|
492 |
createNewBuilder: false |
|
493 |
) |
|
494 |
(TabItem |
|
495 |
label: 'Settings' |
|
496 |
minorKey: basicTabSpec |
|
497 |
createNewBuilder: false |
|
498 |
) |
|
499 |
) |
|
500 |
||
501 |
collect:[:aTab| TabItem new fromLiteralArrayEncoding:aTab ] |
|
502 |
! ! |
|
503 |
||
504 |
!ConfigurationApp class methodsFor:'queries'! |
|
505 |
||
506 |
managerTypeName |
|
507 |
||
508 |
^SVNSourceCodeManager managerTypeName |
|
509 |
||
510 |
"Created: / 07-07-2011 / 23:13:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
511 |
! ! |
|
512 |
||
513 |
!ConfigurationApp class methodsFor:'tableColumns specs'! |
|
514 |
||
515 |
configurationListColumns |
|
516 |
"This resource specification was automatically generated |
|
517 |
by the DataSetBuilder of ST/X." |
|
518 |
||
519 |
"Do not manually edit this!! If it is corrupted, |
|
520 |
the DataSetBuilder may not be able to read the specification." |
|
521 |
||
522 |
" |
|
523 |
DataSetBuilder new openOnClass:SVN::SettingsApp andSelector:#configurationListColumns |
|
524 |
" |
|
525 |
||
526 |
<resource: #tableColumns> |
|
527 |
||
528 |
^#( |
|
529 |
(DataSetColumnSpec |
|
530 |
activeHelpKey: '' |
|
531 |
labelButtonType: Button |
|
532 |
rendererType: rowSelector |
|
533 |
showRowSeparator: false |
|
534 |
showColSeparator: false |
|
535 |
) |
|
536 |
(DataSetColumnSpec |
|
537 |
label: 'Package' |
|
538 |
labelAlignment: left |
|
539 |
activeHelpKey: '' |
|
540 |
labelButtonType: Button |
|
541 |
model: package |
|
542 |
canSelect: false |
|
543 |
showRowSeparator: false |
|
544 |
showColSeparator: false |
|
545 |
) |
|
546 |
(DataSetColumnSpec |
|
547 |
label: 'URL' |
|
548 |
labelAlignment: left |
|
549 |
activeHelpKey: '' |
|
550 |
labelButtonType: Button |
|
551 |
model: urlString |
|
552 |
canSelect: false |
|
553 |
showRowSeparator: false |
|
554 |
showColSeparator: false |
|
555 |
) |
|
556 |
) |
|
557 |
||
558 |
"Modified: / 16-08-2009 / 17:28:28 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
559 |
! ! |
|
560 |
||
561 |
!ConfigurationApp methodsFor:'accessing'! |
|
562 |
||
563 |
repositoryConfiguration |
|
564 |
||
789
241a6bd83db1
comment/format in: #repositoryConfiguration
Claus Gittinger <cg@exept.de>
parents:
635
diff
changeset
|
565 |
^ self repositoryConfigurationAspect value |
635 | 566 |
|
567 |
"Created: / 26-05-2008 / 12:04:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
789
241a6bd83db1
comment/format in: #repositoryConfiguration
Claus Gittinger <cg@exept.de>
parents:
635
diff
changeset
|
568 |
"Modified (format): / 19-08-2011 / 12:57:10 / cg" |
635 | 569 |
! |
570 |
||
571 |
repositoryConfiguration: anObject |
|
572 |
||
573 |
self repositoryConfigurationAspect value: anObject |
|
574 |
||
575 |
"Created: / 26-05-2008 / 12:12:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
576 |
! |
|
577 |
||
578 |
repositoryConfigurationList |
|
579 |
||
580 |
^self repositoryConfigurationListAspect value |
|
581 |
||
582 |
"Created: / 26-05-2008 / 12:05:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
583 |
! |
|
584 |
||
585 |
repositoryManager |
|
586 |
||
587 |
^RepositoryManager current |
|
588 |
||
589 |
"Created: / 26-05-2008 / 10:46:30 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
590 |
! |
|
591 |
||
592 |
selectedConfiguration |
|
593 |
||
594 |
| index config | |
|
595 |
(index := self selectedProfileIndexHolder value) ifNil:[^self]. |
|
596 |
config := self svnConfigurations2 value at: index. |
|
597 |
^config |
|
598 |
||
599 |
"Created: / 25-03-2010 / 16:44:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
600 |
! |
|
601 |
||
602 |
workingCopyBase |
|
603 |
||
604 |
^self workingCopyBaseAspect value |
|
605 |
||
606 |
"Created: / 26-05-2008 / 13:15:22 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
607 |
! ! |
|
608 |
||
609 |
!ConfigurationApp methodsFor:'actions'! |
|
610 |
||
611 |
doConfigurationAdd |
|
612 |
<resource: #uiCallback> |
|
613 |
|config| |
|
614 |
||
615 |
config := SVN::Configuration new. |
|
616 |
config name:((newConfigurationCount == 0) |
|
617 |
ifTrue:[ '<new profile>' ] |
|
618 |
ifFalse:[ '<new profile %1>' bindWith:newConfigurationCount ]). |
|
619 |
(self doConfigurationEdit:config) ifTrue:[ |
|
620 |
self doConfigurationAdd:config. |
|
621 |
newConfigurationCount := newConfigurationCount + 1. |
|
622 |
]. |
|
623 |
||
624 |
"Modified: / 26-03-2010 / 20:34:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
625 |
! |
|
626 |
||
627 |
doConfigurationAdd:config |
|
628 |
self svnConfigurations2 |
|
629 |
value:(self svnConfigurations2 value copyWith:config). |
|
630 |
self selectedProfileIndexHolder value:self svnConfigurations2 value size. |
|
631 |
self updateModifiedChannel. |
|
632 |
||
633 |
"Modified: / 26-03-2010 / 20:38:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
634 |
! |
|
635 |
||
636 |
doConfigurationEdit |
|
637 |
||
638 |
| config | |
|
639 |
||
640 |
(config := self selectedConfiguration) ifNil:[^self]. |
|
641 |
self doConfigurationEdit: config. |
|
642 |
||
643 |
"Modified: / 25-03-2010 / 16:45:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
644 |
! |
|
645 |
||
646 |
doConfigurationEdit: config |
|
647 |
||
648 |
^(ConfigurationDialog openOn: config) |
|
649 |
ifTrue: |
|
790 | 650 |
[self svnCurrentConfiguration value: |
651 |
(svnConfigurations2 value |
|
652 |
detect:[:c|c name = self svnCurrentConfiguration value name]). |
|
635 | 653 |
self updateModifiedChannel. |
654 |
true] |
|
655 |
ifFalse: |
|
656 |
[false] |
|
657 |
||
658 |
"Created: / 25-03-2010 / 08:28:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
790 | 659 |
"Modified: / 19-08-2011 / 12:04:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
635 | 660 |
! |
661 |
||
662 |
doConfigurationExport |
|
663 |
||
664 |
| config name s | |
|
665 |
config := self selectedConfiguration. |
|
666 |
name := (Smalltalk::Dialog |
|
667 |
requestFileName:'Enter a filename' |
|
668 |
default: (config name) , '.rc' |
|
669 |
ifFail:[^self]) asFilename. |
|
670 |
[s := name writeStream. |
|
671 |
config literalArrayEncoding storeOn: s] |
|
672 |
ensure:[s close]. |
|
673 |
||
674 |
"Modified: / 26-03-2010 / 20:22:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
675 |
! |
|
676 |
||
677 |
doConfigurationImport |
|
678 |
||
679 |
| config name | |
|
680 |
config := self selectedConfiguration. |
|
681 |
name := (Smalltalk::Dialog |
|
682 |
requestFileName:'Enter a filename' |
|
683 |
pattern: '*.rc'). |
|
684 |
name isNilOrEmptyCollection ifTrue:[^self]. |
|
685 |
name := name asFilename. |
|
686 |
[ |
|
687 |
config := Compiler evaluate: name contents asString. |
|
688 |
config := config decodeAsLiteralArray. |
|
689 |
(config isKindOf: SVN::Configuration) ifFalse: |
|
690 |
[self error:'File does not contain serialized SVN configuration']. |
|
691 |
self doConfigurationAdd: config. |
|
692 |
] on: Smalltalk::Error do: |
|
693 |
[:ex| |
|
694 |
Smalltalk::Dialog warn: |
|
695 |
('Failed to read profile from %1' bindWith: name asString). |
|
696 |
ex pass. |
|
697 |
] |
|
698 |
||
699 |
"Modified: / 26-03-2010 / 20:36:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
700 |
! |
|
701 |
||
702 |
doConfigurationRemove |
|
703 |
||
704 |
| config | |
|
705 |
||
706 |
(config := self selectedConfiguration) ifNil:[^self]. |
|
707 |
self svnConfigurations2 value: (self svnConfigurations2 value copyWithout: config). |
|
708 |
self updateModifiedChannel. |
|
709 |
||
710 |
"Modified: / 26-03-2010 / 20:39:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
711 |
! |
|
712 |
||
713 |
postBuildWorkingCopyField: aView |
|
714 |
||
715 |
aView |
|
716 |
directoriesOnly: true; |
|
717 |
historyList: Smalltalk packagePath |
|
718 |
||
719 |
"Modified: / 27-11-2009 / 13:02:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
720 |
! |
|
721 |
||
722 |
resetCachedRepositories |
|
723 |
||
724 |
RepositoryManager reset |
|
725 |
||
726 |
"Created: / 20-03-2009 / 10:30:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
727 |
"Modified: / 02-04-2009 / 22:53:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
728 |
! ! |
|
729 |
||
730 |
!ConfigurationApp methodsFor:'aspects'! |
|
731 |
||
732 |
aspects |
|
733 |
^ #( #svnEnabled #svnVerbose svnCurrentConfiguration) |
|
734 |
||
735 |
"Modified: / 31-03-2011 / 14:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
736 |
! |
|
737 |
||
738 |
configurationSelectedHolder |
|
739 |
"return/create the valueHolder 'repositorySelectedHolder'" |
|
740 |
||
741 |
configurationSelectedHolder isNil ifTrue:[ |
|
742 |
configurationSelectedHolder := |
|
743 |
BlockValue |
|
744 |
with:[:model|model value notNil and:[model value ~= 0]] |
|
745 |
argument: self selectedProfileIndexHolder |
|
746 |
]. |
|
747 |
^ configurationSelectedHolder |
|
748 |
||
749 |
"Created: / 25-03-2010 / 08:27:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
750 |
! |
|
751 |
||
752 |
selectedProfileIndexHolder |
|
753 |
||
754 |
|holder| |
|
755 |
||
756 |
(holder := builder bindingAt:#selectedProfileIndexHolder) isNil ifTrue:[ |
|
757 |
holder := ValueHolder new. |
|
758 |
builder aspectAt:#selectedProfileIndexHolder put:holder. |
|
759 |
]. |
|
760 |
^ holder. |
|
761 |
||
762 |
"Created: / 09-03-2010 / 13:30:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
763 |
! |
|
764 |
||
765 |
svnConfigurations2 |
|
766 |
<resource: #uiAspect> |
|
767 |
||
768 |
"automatically generated by UIPainter ..." |
|
769 |
||
770 |
"*** the code below creates a default model when invoked." |
|
771 |
"*** (which may not be the one you wanted)" |
|
772 |
"*** Please change as required and accept it in the browser." |
|
773 |
"*** (and replace this comment by something more useful ;-)" |
|
774 |
||
775 |
svnConfigurations2 isNil ifTrue:[ |
|
776 |
svnConfigurations2 := ValueHolder new. |
|
777 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
778 |
"/ svnConfigurations2 addDependent:self. |
|
779 |
"/ svnConfigurations2 onChangeSend:#svnConfigurations2Changed to:self. |
|
780 |
]. |
|
781 |
^ svnConfigurations2. |
|
782 |
! |
|
783 |
||
784 |
svnCurrentConfiguration |
|
785 |
^self settingsAspectFor: #svnCurrentConfiguration |
|
786 |
||
787 |
"Modified: / 31-03-2011 / 14:01:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
788 |
! |
|
789 |
||
790 |
svnEnabled |
|
791 |
||
792 |
^self settingsAspectFor: #svnEnabled |
|
793 |
||
794 |
"Created: / 25-05-2009 / 18:48:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
795 |
! |
|
796 |
||
797 |
svnIcon |
|
798 |
||
799 |
^self class svnIcon |
|
800 |
||
801 |
"Created: / 24-05-2008 / 01:44:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
802 |
! |
|
803 |
||
804 |
svnVerbose |
|
805 |
||
806 |
^self settingsAspectFor: #svnVerbose |
|
807 |
||
808 |
"Created: / 25-05-2009 / 19:10:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
809 |
! |
|
810 |
||
811 |
tabList |
|
812 |
"Generated by the TabListEditor" |
|
813 |
||
814 |
|list| |
|
815 |
||
816 |
(list := builder bindingAt:#tabList) isNil ifTrue:[ |
|
817 |
builder aspectAt:#tabList put:(list := self class tabList). |
|
818 |
]. |
|
819 |
^ list |
|
820 |
! |
|
821 |
||
822 |
workingCopyBaseAspect |
|
823 |
||
824 |
|holder| |
|
825 |
||
826 |
(holder := builder bindingAt:#workingCopyBaseAspect) ifNil:[ |
|
827 |
holder := self repositoryManager workingCopyBase asValue. |
|
828 |
holder onChangeSend:#updateModifiedChannel to:self. |
|
829 |
builder aspectAt:#workingCopyBaseAspect put: holder |
|
830 |
]. |
|
831 |
^ holder. |
|
832 |
||
833 |
"Created: / 26-05-2008 / 10:41:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
834 |
"Modified: / 25-05-2009 / 18:50:26 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
835 |
! ! |
|
836 |
||
837 |
!ConfigurationApp methodsFor:'helpers'! |
|
838 |
||
839 |
settingsAspectFor: settingName |
|
840 |
||
841 |
|holder| |
|
842 |
||
843 |
self createBuilder. |
|
844 |
||
927 | 845 |
(holder := builder bindingAt:settingName) isNil ifTrue:[ |
846 |
holder := (currentUserPrefs perform: settingName asSymbol) asValue. |
|
847 |
holder onChangeSend:#updateModifiedChannel to:self. |
|
848 |
builder aspectAt:settingName put:holder |
|
635 | 849 |
]. |
850 |
^ holder. |
|
851 |
||
852 |
"Created: / 25-05-2009 / 18:43:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
927 | 853 |
"Modified: / 22-12-2011 / 15:13:37 / cg" |
635 | 854 |
! ! |
855 |
||
856 |
!ConfigurationApp methodsFor:'initialization'! |
|
857 |
||
858 |
initialize |
|
859 |
||
860 |
super initialize. |
|
861 |
newConfigurationCount := 1. |
|
862 |
||
863 |
"Created: / 25-03-2010 / 08:31:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
864 |
! ! |
|
865 |
||
866 |
!ConfigurationApp methodsFor:'protocol'! |
|
867 |
||
868 |
basicReadSettings |
|
869 |
||
870 |
| confs | |
|
871 |
||
872 |
self readAspects: self aspects from:currentUserPrefs. |
|
873 |
self svnConfigurations2 value: (confs := SVN::Configuration configurations deepCopy asList). |
|
874 |
||
875 |
"Created: / 19-04-2008 / 09:42:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
876 |
"Modified: / 25-05-2009 / 19:05:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
877 |
"Modified: / 31-03-2011 / 14:17:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
878 |
! |
|
879 |
||
880 |
basicSaveSettings |
|
881 |
||
882 |
self writeAspects: self aspects to:currentUserPrefs. |
|
883 |
SVN::Configuration configurations: self svnConfigurations2 value. |
|
884 |
self resetCachedRepositories |
|
885 |
||
886 |
"Created: / 19-04-2008 / 09:42:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
887 |
"Modified: / 25-05-2009 / 19:06:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
888 |
"Modified: / 31-03-2011 / 14:11:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
889 |
! |
|
890 |
||
891 |
helpFilename |
|
927 | 892 |
"return the name of a helpFile in the doc/online/<language>/help directory. |
635 | 893 |
Or nil, if no help is available." |
894 |
||
927 | 895 |
^ 'Launcher/svnSetup.html' |
635 | 896 |
|
897 |
"Created: / 19-04-2008 / 09:42:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
898 |
"Modified: / 26-05-2008 / 13:12:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
927 | 899 |
"Modified: / 22-12-2011 / 14:02:05 / cg" |
635 | 900 |
! ! |
901 |
||
902 |
!ConfigurationApp methodsFor:'queries'! |
|
903 |
||
904 |
hasUnsavedChanges |
|
790 | 905 |
|
906 |
SVN::Configuration configurations asArray = svnConfigurations2 value asArray |
|
907 |
ifFalse:[^true]. |
|
923 | 908 |
^ self |
909 |
hasChangedAspectIn:self aspects |
|
910 |
asComparedTo:currentUserPrefs |
|
635 | 911 |
|
912 |
"Created: / 28-05-2008 / 07:33:26 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
913 |
"Modified: / 19-08-2009 / 12:07:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
790 | 914 |
"Modified: / 19-08-2011 / 11:48:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
923 | 915 |
"Modified: / 25-11-2011 / 15:25:06 / cg" |
635 | 916 |
! ! |
917 |
||
918 |
!ConfigurationApp class methodsFor:'documentation'! |
|
919 |
||
920 |
version |
|
921 |
^ '$Header$' |
|
790 | 922 |
|
635 | 923 |
! |
924 |
||
925 |
version_CVS |
|
926 |
^ '$Header$' |
|
790 | 927 |
|
635 | 928 |
! |
929 |
||
930 |
version_SVN |
|
891
a4f5e33dc88b
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
790
diff
changeset
|
931 |
|
a4f5e33dc88b
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
790
diff
changeset
|
932 |
^ '§Id: SVN__ConfigurationApp.st 372 2011-09-29 10:47:58Z vranyj1 §' |
635 | 933 |
! ! |