author | fm |
Mon, 19 Oct 2009 14:22:15 +0200 | |
changeset 406 | 76cf69a06c75 |
parent 301 | 0f8d1839ca4e |
child 605 | d5ede6f61bc5 |
permissions | -rw-r--r-- |
406 | 1 |
"{ Package: 'stx:libsvn' }" |
86 | 2 |
|
3 |
"{ NameSpace: SVN }" |
|
4 |
||
5 |
Wizard subclass:#CommitWizard |
|
6 |
instanceVariableNames:'workingCopyHolder warningHolder' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'SVN-UI-Dialogs' |
|
10 |
! |
|
11 |
||
252 | 12 |
WizardPane subclass:#MessagePane |
86 | 13 |
instanceVariableNames:'messageTextView' |
14 |
classVariableNames:'Messages' |
|
15 |
poolDictionaries:'' |
|
16 |
privateIn:CommitWizard |
|
17 |
! |
|
18 |
||
252 | 19 |
WizardPane subclass:#WorkingCopyStatusPane |
86 | 20 |
instanceVariableNames:'initialized' |
21 |
classVariableNames:'' |
|
22 |
poolDictionaries:'' |
|
23 |
privateIn:CommitWizard |
|
24 |
! |
|
25 |
||
26 |
||
27 |
!CommitWizard class methodsFor:'instance creation'! |
|
28 |
||
29 |
on: aWorkingCopy |
|
30 |
||
31 |
^self new |
|
32 |
workingCopy: aWorkingCopy; |
|
33 |
yourself |
|
34 |
||
35 |
"Created: / 11-04-2008 / 11:47:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
36 |
! ! |
|
37 |
||
38 |
!CommitWizard class methodsFor:'interface opening'! |
|
39 |
||
40 |
openOn: aWorkingCopy |
|
41 |
||
42 |
^(self on: aWorkingCopy) open |
|
43 |
||
44 |
"Created: / 11-04-2008 / 11:47:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
45 |
! ! |
|
46 |
||
47 |
!CommitWizard class methodsFor:'interface specs'! |
|
48 |
||
49 |
contentSpec |
|
50 |
"This resource specification was automatically generated |
|
51 |
by the UIPainter of ST/X." |
|
52 |
||
53 |
"Do not manually edit this!! If it is corrupted, |
|
54 |
the UIPainter may not be able to read the specification." |
|
55 |
||
56 |
" |
|
57 |
UIPainter new openOnClass:SVN::CommitWizard andSelector:#contentSpec |
|
58 |
SVN::CommitWizard new openInterface:#contentSpec |
|
59 |
" |
|
60 |
||
61 |
<resource: #canvas> |
|
62 |
||
63 |
^ |
|
64 |
#(FullSpec |
|
65 |
name: contentSpec |
|
66 |
window: |
|
67 |
(WindowSpec |
|
68 |
label: 'Content' |
|
69 |
name: 'Content' |
|
70 |
min: (Point 10 10) |
|
71 |
bounds: (Rectangle 0 0 300 300) |
|
72 |
) |
|
73 |
component: |
|
74 |
(SpecCollection |
|
75 |
collection: ( |
|
76 |
(SubCanvasSpec |
|
77 |
name: 'WizardPane' |
|
78 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
79 |
hasHorizontalScrollBar: false |
|
80 |
hasVerticalScrollBar: false |
|
81 |
miniScrollerHorizontal: false |
|
82 |
clientHolder: paneHolder |
|
83 |
createNewBuilder: false |
|
84 |
) |
|
85 |
(LabelSpec |
|
86 |
label: 'Label' |
|
87 |
name: 'WarningHolder' |
|
88 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
89 |
translateLabel: true |
|
90 |
labelChannel: warningHolder |
|
91 |
adjust: left |
|
92 |
) |
|
93 |
) |
|
94 |
||
95 |
) |
|
96 |
) |
|
97 |
! ! |
|
98 |
||
99 |
!CommitWizard methodsFor:'accessing'! |
|
100 |
||
101 |
acceptButtonTitle |
|
102 |
||
103 |
^'Commit' |
|
104 |
||
105 |
"Created: / 13-04-2008 / 11:08:06 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
106 |
! |
|
107 |
||
108 |
defaultTitle |
|
109 |
^ 'Commit ' |
|
110 |
||
111 |
"Created: / 03-10-2008 / 13:58:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
112 |
"Modified: / 28-10-2008 / 09:14:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
113 |
! |
|
114 |
||
115 |
firstPane |
|
116 |
||
117 |
^WorkingCopyStatusPane new |
|
118 |
||
119 |
"Created: / 20-03-2009 / 13:51:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
120 |
! |
|
121 |
||
122 |
message |
|
123 |
||
124 |
^self pane value message |
|
125 |
||
126 |
"Created: / 21-03-2009 / 10:51:52 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
127 |
! |
|
128 |
||
129 |
repository |
|
130 |
^ workingCopyHolder value repository |
|
131 |
||
132 |
"Created: / 31-03-2008 / 15:54:04 / janfrog" |
|
133 |
"Modified: / 31-03-2008 / 18:52:26 / janfrog" |
|
134 |
! |
|
135 |
||
136 |
workingCopy |
|
137 |
||
138 |
^self modelHolder value workingCopy |
|
139 |
||
140 |
"Created: / 24-06-2009 / 15:55:28 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
141 |
! ! |
|
142 |
||
143 |
!CommitWizard methodsFor:'actions'! |
|
144 |
||
145 |
doAccept |
|
146 |
||
147 |
self showProgressWhile: |
|
148 |
[self canDoAccept: false. |
|
149 |
MessagePane messages |
|
150 |
at: self task package |
|
151 |
put: self message. |
|
152 |
self task |
|
153 |
message: self message; |
|
154 |
doCommit. |
|
155 |
MessagePane messages |
|
156 |
removeKey: self task package |
|
157 |
ifAbsent:[]. |
|
158 |
self accept value: true] |
|
159 |
||
160 |
"Created: / 01-04-2008 / 18:59:12 / janfrog" |
|
161 |
"Modified: / 19-08-2009 / 14:26:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
162 |
! |
|
163 |
||
164 |
doCancel |
|
165 |
||
166 |
MessagePane messages |
|
167 |
at: self task package |
|
168 |
put: self message. |
|
169 |
super doCancel |
|
170 |
||
171 |
"Created: / 27-05-2009 / 13:38:06 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
172 |
! ! |
|
173 |
||
174 |
!CommitWizard methodsFor:'aspects'! |
|
175 |
||
176 |
moveToTitleAspect |
|
177 |
||
178 |
^[ 'Move to package ', self workingCopy package ] |
|
179 |
||
180 |
"Created: / 31-03-2008 / 21:58:14 / janfrog" |
|
181 |
! |
|
182 |
||
183 |
warningHolder |
|
184 |
"return/create the 'warningHolder' value holder (automatically generated)" |
|
185 |
||
186 |
warningHolder isNil ifTrue:[ |
|
187 |
warningHolder := ValueHolder new. |
|
188 |
]. |
|
189 |
^ warningHolder |
|
190 |
! ! |
|
191 |
||
192 |
!CommitWizard methodsFor:'change & update'! |
|
193 |
||
194 |
updateWarning |
|
195 |
||
196 |
| packageClasses packageExtensions noProjectClasses noProjectExtensions warning | |
|
197 |
packageClasses := self workingCopy packageClasses. |
|
198 |
packageExtensions := self workingCopy packageExtensions. |
|
199 |
noProjectClasses := ProjectDefinition searchForClassesWithProject: Project noProjectID. |
|
200 |
noProjectExtensions := ProjectDefinition searchForExtensionsWithProject: Project noProjectID. |
|
201 |
||
202 |
noProjectExtensions := noProjectExtensions select: |
|
203 |
[:mth|packageClasses includes: mth mclass]. |
|
204 |
||
205 |
warning := noProjectExtensions isEmpty |
|
206 |
ifTrue: |
|
207 |
[nil] |
|
208 |
ifFalse: |
|
209 |
[LabelAndIcon |
|
210 |
label:'Some classes/methods in __NoProject__ may belong to ', self workingCopy package |
|
211 |
icon: ToolbarIconLibrary warn32x32Icon]. |
|
212 |
||
213 |
self warningHolder value: warning. |
|
214 |
||
215 |
"Created: / 24-06-2009 / 15:52:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
216 |
! ! |
|
217 |
||
218 |
!CommitWizard methodsFor:'hooks'! |
|
219 |
||
220 |
commonPostOpen |
|
221 |
||
222 |
self updateWarning |
|
223 |
||
224 |
"Created: / 24-06-2009 / 16:01:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
225 |
! ! |
|
226 |
||
227 |
!CommitWizard::MessagePane class methodsFor:'accessing'! |
|
228 |
||
229 |
messages |
|
230 |
||
231 |
Messages ifNil:[Messages := Dictionary new]. |
|
232 |
^Messages |
|
233 |
||
234 |
"Created: / 27-05-2009 / 13:33:57 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
235 |
! ! |
|
236 |
||
237 |
!CommitWizard::MessagePane class methodsFor:'documentation'! |
|
238 |
||
239 |
version_SVN |
|
301
0f8d1839ca4e
update #version_SVN with § as keyword expansion character
fm
parents:
252
diff
changeset
|
240 |
^'§Id: SVN__CommitWizard.st 110 2009-08-19 13:21:10Z vranyj1 §' |
86 | 241 |
! ! |
242 |
||
243 |
!CommitWizard::MessagePane class methodsFor:'interface specs'! |
|
244 |
||
245 |
windowSpec |
|
246 |
"This resource specification was automatically generated |
|
247 |
by the UIPainter of ST/X." |
|
248 |
||
249 |
"Do not manually edit this!! If it is corrupted, |
|
250 |
the UIPainter may not be able to read the specification." |
|
251 |
||
252 |
" |
|
253 |
UIPainter new openOnClass:SVN::CommitWizard::MessagePane andSelector:#windowSpec |
|
254 |
SVN::CommitWizard::MessagePane new openInterface:#windowSpec |
|
255 |
SVN::CommitWizard::MessagePane open |
|
256 |
" |
|
257 |
||
258 |
<resource: #canvas> |
|
259 |
||
260 |
^ |
|
261 |
#(FullSpec |
|
262 |
name: windowSpec |
|
263 |
window: |
|
264 |
(WindowSpec |
|
265 |
label: 'Commit Message' |
|
266 |
name: 'Commit Message' |
|
267 |
min: (Point 10 10) |
|
268 |
bounds: (Rectangle 0 0 300 300) |
|
269 |
) |
|
270 |
component: |
|
271 |
(SpecCollection |
|
272 |
collection: ( |
|
273 |
(LabelSpec |
|
274 |
label: 'Commit message:' |
|
275 |
name: 'MessageLabel' |
|
276 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
277 |
translateLabel: true |
|
278 |
adjust: left |
|
279 |
) |
|
280 |
(TextEditorSpec |
|
281 |
name: 'MessageText' |
|
282 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
283 |
hasHorizontalScrollBar: true |
|
284 |
hasVerticalScrollBar: true |
|
285 |
modifiedChannel: modifiedChannel |
|
286 |
hasKeyboardFocusInitially: false |
|
287 |
viewClassName: '' |
|
288 |
postBuildCallback: postBuildMessageTextView: |
|
289 |
) |
|
290 |
) |
|
291 |
||
292 |
) |
|
293 |
) |
|
294 |
||
295 |
"Modified: / 24-03-2009 / 20:29:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
296 |
! ! |
|
297 |
||
298 |
!CommitWizard::MessagePane methodsFor:'accessing'! |
|
299 |
||
300 |
message |
|
301 |
||
302 |
^messageTextView |
|
303 |
ifNotNil:[messageTextView contents] |
|
304 |
ifNil:[nil] |
|
305 |
||
306 |
"Created: / 31-03-2008 / 21:06:28 / janfrog" |
|
307 |
"Modified: / 09-04-2009 / 08:50:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
308 |
! |
|
309 |
||
310 |
message: aString |
|
311 |
||
312 |
^messageTextView contents: aString |
|
313 |
||
314 |
"Created: / 08-04-2009 / 23:27:09 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
315 |
! ! |
|
316 |
||
317 |
!CommitWizard::MessagePane methodsFor:'aspect'! |
|
318 |
||
319 |
messageModifiedChannel |
|
320 |
||
321 |
^[:modified|self updateDoAcceptButton] |
|
322 |
||
323 |
"Created: / 24-03-2009 / 20:08:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
324 |
! |
|
325 |
||
326 |
modifiedChannel |
|
327 |
||
328 |
^nil asValue |
|
329 |
onChangeSend: #updateButtons to: self; |
|
330 |
yourself |
|
331 |
||
332 |
"Created: / 24-03-2009 / 20:29:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
333 |
! ! |
|
334 |
||
335 |
!CommitWizard::MessagePane methodsFor:'hooks'! |
|
336 |
||
337 |
postBuildMessageTextView: aView |
|
338 |
||
339 |
messageTextView := aView scrolledView. |
|
340 |
self message: |
|
341 |
(self class messages |
|
342 |
at: self task package |
|
343 |
ifAbsent:['']) |
|
344 |
||
345 |
"Created: / 31-03-2008 / 21:05:03 / janfrog" |
|
346 |
"Modified: / 27-05-2009 / 13:35:25 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
347 |
! ! |
|
348 |
||
349 |
!CommitWizard::MessagePane methodsFor:'private'! |
|
350 |
||
351 |
createNext |
|
352 |
"Superclass SVN::Wizard::Pane says that I am responsible to implement this method" |
|
353 |
||
354 |
self shouldImplement |
|
355 |
! ! |
|
356 |
||
357 |
!CommitWizard::MessagePane methodsFor:'queries'! |
|
358 |
||
359 |
canDoAccept |
|
360 |
||
361 |
^self message isNilOrEmptyCollection not |
|
362 |
||
363 |
"Modified: / 02-04-2009 / 16:28:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
364 |
! |
|
365 |
||
366 |
canGoNext |
|
367 |
"Superclass SVN::Wizard::Pane says that I am responsible to implement this method" |
|
368 |
||
369 |
^false |
|
370 |
||
371 |
"Modified: / 02-04-2009 / 16:29:33 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
372 |
! ! |
|
373 |
||
374 |
!CommitWizard::WorkingCopyStatusPane class methodsFor:'documentation'! |
|
375 |
||
376 |
version_SVN |
|
301
0f8d1839ca4e
update #version_SVN with § as keyword expansion character
fm
parents:
252
diff
changeset
|
377 |
^'§Id: SVN__CommitWizard.st 110 2009-08-19 13:21:10Z vranyj1 §' |
86 | 378 |
! ! |
379 |
||
380 |
!CommitWizard::WorkingCopyStatusPane class methodsFor:'interface specs'! |
|
381 |
||
382 |
windowSpec |
|
383 |
"This resource specification was automatically generated |
|
384 |
by the UIPainter of ST/X." |
|
385 |
||
386 |
"Do not manually edit this!! If it is corrupted, |
|
387 |
the UIPainter may not be able to read the specification." |
|
388 |
||
389 |
" |
|
390 |
UIPainter new openOnClass:SVN::CommitWizard::WorkingCopyStatusPane andSelector:#windowSpec |
|
391 |
SVN::CommitWizard::WorkingCopyStatusPane new openInterface:#windowSpec |
|
392 |
SVN::CommitWizard::WorkingCopyStatusPane open |
|
393 |
" |
|
394 |
||
395 |
<resource: #canvas> |
|
396 |
||
397 |
^ |
|
398 |
#(FullSpec |
|
399 |
name: windowSpec |
|
400 |
window: |
|
401 |
(WindowSpec |
|
402 |
label: 'Working copy status' |
|
403 |
name: 'Working copy status' |
|
404 |
min: (Point 10 10) |
|
405 |
bounds: (Rectangle 0 0 564 366) |
|
406 |
) |
|
407 |
component: |
|
408 |
(SpecCollection |
|
409 |
collection: ( |
|
410 |
(LabelSpec |
|
411 |
label: ' Working copy status' |
|
412 |
name: 'PaneLabel' |
|
413 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
414 |
translateLabel: true |
|
415 |
adjust: left |
|
416 |
) |
|
417 |
(SubCanvasSpec |
|
418 |
name: 'WorkingCopyStatus' |
|
419 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
420 |
hasHorizontalScrollBar: false |
|
421 |
hasVerticalScrollBar: false |
|
422 |
majorKey: #'SVN::WorkingCopyBrowser' |
|
423 |
minorKey: windowSpec |
|
424 |
subAspectHolders: |
|
425 |
(Array |
|
426 |
||
427 |
(SubChannelInfoSpec |
|
428 |
subAspect: model |
|
429 |
aspect: workingCopyAspect |
|
430 |
) |
|
431 |
) |
|
432 |
createNewApplication: true |
|
433 |
createNewBuilder: true |
|
434 |
) |
|
435 |
) |
|
436 |
||
437 |
) |
|
438 |
) |
|
439 |
! ! |
|
440 |
||
441 |
!CommitWizard::WorkingCopyStatusPane methodsFor:'accessing'! |
|
442 |
||
443 |
message |
|
444 |
||
445 |
^'' |
|
446 |
||
447 |
"Created: / 02-06-2009 / 13:36:48 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
448 |
! ! |
|
449 |
||
450 |
!CommitWizard::WorkingCopyStatusPane methodsFor:'actions'! |
|
451 |
||
452 |
enter |
|
453 |
||
454 |
initialized == true ifFalse: |
|
455 |
[self showProgressWhile: |
|
456 |
[self task |
|
457 |
doUpdateWorkingCopy]. |
|
458 |
initialized := true]. |
|
459 |
||
460 |
"Created: / 02-04-2009 / 17:10:57 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
461 |
"Modified: / 09-04-2009 / 09:06:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
462 |
! ! |
|
463 |
||
464 |
!CommitWizard::WorkingCopyStatusPane methodsFor:'aspects'! |
|
465 |
||
466 |
workingCopyAspect |
|
467 |
||
468 |
^(AspectAdaptor forAspect: #workingCopy) |
|
469 |
subjectChannel: self masterApplication modelHolder |
|
470 |
||
471 |
"Created: / 23-03-2009 / 11:53:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
472 |
! ! |
|
473 |
||
474 |
!CommitWizard::WorkingCopyStatusPane methodsFor:'private'! |
|
475 |
||
476 |
createNext |
|
477 |
^ SVN::CommitWizard::MessagePane new |
|
478 |
||
479 |
"Created: / 21-03-2009 / 12:24:33 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
480 |
! ! |
|
481 |
||
482 |
!CommitWizard::WorkingCopyStatusPane methodsFor:'queries'! |
|
483 |
||
484 |
canDoAccept |
|
485 |
||
486 |
^false |
|
487 |
||
488 |
"Modified: / 02-04-2009 / 16:28:23 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
489 |
! |
|
490 |
||
491 |
canGoNext |
|
492 |
||
493 |
^true |
|
494 |
||
495 |
"Modified: / 20-03-2009 / 13:53:26 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
496 |
! ! |
|
497 |
||
498 |
!CommitWizard class methodsFor:'documentation'! |
|
499 |
||
500 |
version |
|
501 |
^ '$Header$' |
|
213 | 502 |
! |
503 |
||
504 |
version_CVS |
|
505 |
^ '$Header$' |
|
506 |
! |
|
507 |
||
508 |
version_SVN |
|
301
0f8d1839ca4e
update #version_SVN with § as keyword expansion character
fm
parents:
252
diff
changeset
|
509 |
^'§Id: SVN__CommitWizard.st 110 2009-08-19 13:21:10Z vranyj1 §' |
86 | 510 |
! ! |