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