author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 31 May 2018 10:52:50 +0100 | |
branch | jv |
changeset 4330 | 998eb03f0736 |
parent 3011 | 1997ff6e7e55 |
permissions | -rw-r--r-- |
1443 | 1 |
" |
2 |
COPYRIGHT (c) 2003 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 |
" |
|
12 |
||
1227 | 13 |
"{ Package: 'stx:libbasic3' }" |
14 |
||
15 |
"{ NameSpace: Packages }" |
|
16 |
||
1268 | 17 |
AbstractPackageNotebookApplication subclass:#PackageDetails |
18 |
instanceVariableNames:'' |
|
1227 | 19 |
classVariableNames:'' |
20 |
poolDictionaries:'' |
|
21 |
category:'Package-Application' |
|
22 |
! |
|
23 |
||
24 |
AbstractPackageDetails subclass:#Class |
|
25 |
instanceVariableNames:'classList selectedClassHolder categoryList selectedCategoryHolder |
|
1268 | 26 |
nonCriticalPrivateProcesses' |
1227 | 27 |
classVariableNames:'' |
28 |
poolDictionaries:'' |
|
29 |
privateIn:PackageDetails |
|
30 |
! |
|
31 |
||
1241 | 32 |
LabelAndIcon subclass:#ClassLabelAndIcon |
33 |
instanceVariableNames:'class' |
|
34 |
classVariableNames:'' |
|
35 |
poolDictionaries:'' |
|
36 |
privateIn:PackageDetails::Class |
|
37 |
! |
|
38 |
||
1227 | 39 |
AbstractPackageDetails subclass:#Comment |
40 |
instanceVariableNames:'commentTextHolder commentTextModifiedChannel |
|
41 |
commentTextAcceptChannel editTextView' |
|
42 |
classVariableNames:'' |
|
43 |
poolDictionaries:'' |
|
44 |
privateIn:PackageDetails |
|
45 |
! |
|
46 |
||
47 |
AbstractPackageDetails subclass:#LooseMethod |
|
48 |
instanceVariableNames:'methodSelectedHolder currentMethodSourceHolder methodList |
|
49 |
tableColumns' |
|
50 |
classVariableNames:'' |
|
51 |
poolDictionaries:'' |
|
52 |
privateIn:PackageDetails |
|
53 |
! |
|
54 |
||
55 |
Object subclass:#PackageDetailsRow |
|
56 |
instanceVariableNames:'model' |
|
57 |
classVariableNames:'' |
|
58 |
poolDictionaries:'' |
|
59 |
privateIn:PackageDetails::LooseMethod |
|
60 |
! |
|
61 |
||
62 |
AbstractPackageDetails subclass:#Prerequisites |
|
63 |
instanceVariableNames:'' |
|
64 |
classVariableNames:'' |
|
65 |
poolDictionaries:'' |
|
66 |
privateIn:PackageDetails |
|
67 |
! |
|
68 |
||
69 |
AbstractPackageDetails subclass:#Scripts |
|
70 |
instanceVariableNames:'' |
|
71 |
classVariableNames:'' |
|
72 |
poolDictionaries:'' |
|
73 |
privateIn:PackageDetails |
|
74 |
! |
|
75 |
||
1443 | 76 |
!PackageDetails class methodsFor:'documentation'! |
77 |
||
78 |
copyright |
|
79 |
" |
|
80 |
COPYRIGHT (c) 2003 by eXept Software AG |
|
81 |
All Rights Reserved |
|
82 |
||
83 |
This software is furnished under a license and may be used |
|
84 |
only in accordance with the terms of that license and with the |
|
85 |
inclusion of the above copyright notice. This software may not |
|
86 |
be provided or otherwise made available to, or used by, any |
|
87 |
other person. No title to or ownership of the software is |
|
88 |
hereby transferred. |
|
89 |
" |
|
90 |
! ! |
|
1227 | 91 |
|
92 |
!PackageDetails::Class class methodsFor:'constant values'! |
|
93 |
||
94 |
applicationName |
|
95 |
^ 'Classes' asSymbol |
|
96 |
! ! |
|
97 |
||
98 |
!PackageDetails::Class class methodsFor:'interface specs'! |
|
99 |
||
100 |
windowSpec |
|
101 |
"This resource specification was automatically generated |
|
102 |
by the UIPainter of ST/X." |
|
103 |
||
104 |
"Do not manually edit this!! If it is corrupted, |
|
105 |
the UIPainter may not be able to read the specification." |
|
106 |
||
107 |
" |
|
108 |
UIPainter new openOnClass:Packages::PackageDetails::Class andSelector:#windowSpec |
|
109 |
Packages::PackageDetails::Class new openInterface:#windowSpec |
|
110 |
Packages::PackageDetails::Class open |
|
111 |
" |
|
112 |
||
113 |
<resource: #canvas> |
|
114 |
||
115 |
^ |
|
116 |
#(#FullSpec |
|
117 |
#name: #windowSpec |
|
118 |
#window: |
|
119 |
#(#WindowSpec |
|
120 |
#label: 'Packages::PackageDetails::Class' |
|
121 |
#name: 'Packages::PackageDetails::Class' |
|
122 |
#visibilityChannel: #isVisible |
|
123 |
#min: #(#Point 10 10) |
|
124 |
#max: #(#Point 1024 768) |
|
125 |
#bounds: #(#Rectangle 29 59 329 359) |
|
126 |
#menu: #mainMenu |
|
127 |
) |
|
128 |
#component: |
|
129 |
#(#SpecCollection |
|
130 |
#collection: #( |
|
131 |
#(#VariableHorizontalPanelSpec |
|
132 |
#name: 'VariableHorizontalPanel1' |
|
133 |
#layout: #(#LayoutFrame 0 0 0 0 0 1 0 1) |
|
134 |
#component: |
|
135 |
#(#SpecCollection |
|
136 |
#collection: #( |
|
1241 | 137 |
#(#SequenceViewSpec |
138 |
#name: 'SelectionInListModelView2' |
|
1227 | 139 |
#model: #selectedCategoryHolder |
140 |
#hasHorizontalScrollBar: true |
|
141 |
#hasVerticalScrollBar: true |
|
1241 | 142 |
#isMultiSelect: true |
1227 | 143 |
#useIndex: false |
1241 | 144 |
#sequenceList: #categoryList |
1227 | 145 |
) |
1241 | 146 |
#(#SequenceViewSpec |
147 |
#name: 'SelectedClassView1' |
|
1227 | 148 |
#model: #selectedClassHolder |
149 |
#hasHorizontalScrollBar: true |
|
150 |
#hasVerticalScrollBar: true |
|
1241 | 151 |
#isMultiSelect: true |
1268 | 152 |
#doubleClickSelector: #browseClassWithIndexes: |
153 |
#useIndex: true |
|
1241 | 154 |
#sequenceList: #classList |
1227 | 155 |
) |
156 |
) |
|
157 |
||
158 |
) |
|
159 |
#handles: #(#Any 0.5 1.0) |
|
160 |
) |
|
161 |
) |
|
162 |
||
163 |
) |
|
164 |
) |
|
165 |
! ! |
|
166 |
||
167 |
!PackageDetails::Class class methodsFor:'menu specs'! |
|
168 |
||
169 |
mainMenu |
|
170 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
171 |
||
172 |
"Do not manually edit this!! If it is corrupted, |
|
173 |
the MenuEditor may not be able to read the specification." |
|
174 |
||
175 |
" |
|
176 |
MenuEditor new openOnClass:Packages::PackageDetails::Class andSelector:#mainMenu |
|
177 |
" |
|
178 |
||
179 |
<resource: #menu> |
|
180 |
||
181 |
^ #(#Menu |
|
182 |
#( |
|
183 |
#(#MenuItem |
|
184 |
#label: 'File' |
|
185 |
#translateLabel: true |
|
186 |
#submenu: |
|
187 |
#(#Menu |
|
188 |
#( |
|
189 |
#(#MenuItem |
|
190 |
#label: 'New' |
|
191 |
#translateLabel: true |
|
192 |
#value: #menuNew |
|
193 |
) |
|
194 |
#(#MenuItem |
|
195 |
#label: '-' |
|
196 |
) |
|
197 |
#(#MenuItem |
|
198 |
#label: 'Open...' |
|
199 |
#translateLabel: true |
|
200 |
#value: #menuOpen |
|
201 |
) |
|
202 |
#(#MenuItem |
|
203 |
#label: '-' |
|
204 |
) |
|
205 |
#(#MenuItem |
|
206 |
#label: 'Save' |
|
207 |
#translateLabel: true |
|
208 |
#value: #menuSave |
|
209 |
) |
|
210 |
#(#MenuItem |
|
211 |
#label: 'Save As...' |
|
212 |
#translateLabel: true |
|
213 |
#value: #menuSaveAs |
|
214 |
) |
|
215 |
#(#MenuItem |
|
216 |
#label: '-' |
|
217 |
) |
|
218 |
#(#MenuItem |
|
219 |
#label: 'Exit' |
|
220 |
#translateLabel: true |
|
221 |
#value: #closeRequest |
|
222 |
) |
|
223 |
) nil |
|
224 |
nil |
|
225 |
) |
|
226 |
) |
|
227 |
#(#MenuItem |
|
228 |
#label: 'Help' |
|
229 |
#translateLabel: true |
|
230 |
#startGroup: #right |
|
231 |
#submenu: |
|
232 |
#(#Menu |
|
233 |
#( |
|
234 |
#(#MenuItem |
|
235 |
#label: 'Documentation' |
|
236 |
#translateLabel: true |
|
237 |
#value: #openDocumentation |
|
238 |
) |
|
239 |
#(#MenuItem |
|
240 |
#label: '-' |
|
241 |
) |
|
242 |
#(#MenuItem |
|
243 |
#label: 'About this Application' |
|
244 |
#translateLabel: true |
|
245 |
#value: #openAboutThisApplication |
|
246 |
) |
|
247 |
) nil |
|
248 |
nil |
|
249 |
) |
|
250 |
) |
|
251 |
) nil |
|
252 |
nil |
|
253 |
) |
|
254 |
! ! |
|
255 |
||
256 |
!PackageDetails::Class class methodsFor:'plugIn spec'! |
|
257 |
||
258 |
aspectSelectors |
|
259 |
"This resource specification was automatically generated |
|
260 |
by the UIPainter of ST/X." |
|
261 |
||
262 |
"Do not manually edit this. If it is corrupted, |
|
263 |
the UIPainter may not be able to read the specification." |
|
264 |
||
265 |
"Return a description of exported aspects; |
|
266 |
these can be connected to aspects of an embedding application |
|
267 |
(if this app is embedded in a subCanvas)." |
|
268 |
||
269 |
^ #( |
|
270 |
#classList |
|
271 |
#selectedClassHolder |
|
272 |
). |
|
273 |
||
274 |
! ! |
|
275 |
||
1268 | 276 |
!PackageDetails::Class methodsFor:'accessing'! |
1241 | 277 |
|
1268 | 278 |
classListAt:idx |
279 |
^ self classList at:idx |
|
280 |
! |
|
1227 | 281 |
|
282 |
declareDependents |
|
283 |
super declareDependents |
|
284 |
! |
|
285 |
||
286 |
privateProcessesAt:aSymbol |
|
1268 | 287 |
^ (nonCriticalPrivateProcesses at:aSymbol ifAbsentPut:[[nil]fork]). |
1227 | 288 |
! |
289 |
||
290 |
privateProcessesAt:aSymbol put:aProcess |
|
1268 | 291 |
^ (nonCriticalPrivateProcesses at:aSymbol put:aProcess). |
1227 | 292 |
! ! |
293 |
||
1241 | 294 |
!PackageDetails::Class methodsFor:'adding'! |
295 |
||
296 |
addPrivateClassLabelAndIconForClass:aClass toClassList:aClassList level:aNumber |
|
297 |
aClass privateClasses do:[:aPrivateClass | |
|
298 |
aClassList add:(self newClassLabelAndIconWithClass:aPrivateClass). |
|
299 |
self addPrivateClassLabelAndIconForClass:aPrivateClass toClassList:aClassList level:(aNumber + 1). |
|
300 |
]. |
|
301 |
! |
|
302 |
||
303 |
putClassesNamesIn:aClassList fromPackages:collectionOfPackages inCategories:collectionOfCategoryNames |
|
304 |
| classesWithoutPrivateClasses| |
|
305 |
classesWithoutPrivateClasses := OrderedCollection new. |
|
306 |
collectionOfCategoryNames do:[:aCategoryName | |
|
307 |
collectionOfPackages do:[:aPackage | |
|
308 |
(aPackage classesInCategory:aCategoryName) |
|
309 |
do:[:aClass | aClass isPrivate ifFalse:[ |
|
310 |
classesWithoutPrivateClasses add:(self newClassLabelAndIconWithClass:aClass). |
|
311 |
]. |
|
312 |
]. |
|
313 |
]. |
|
314 |
]. |
|
315 |
classesWithoutPrivateClasses sort:[:x :y | |
|
316 |
x asString < y asString |
|
317 |
]. |
|
318 |
classesWithoutPrivateClasses do:[:aLableAndIcon | | aClass | |
|
319 |
aClass := aLableAndIcon classModel. |
|
320 |
aClassList add:aLableAndIcon. |
|
321 |
self addPrivateClassLabelAndIconForClass:aClass toClassList:aClassList level:1 |
|
322 |
]. |
|
323 |
! ! |
|
324 |
||
1227 | 325 |
!PackageDetails::Class methodsFor:'aspects'! |
326 |
||
327 |
categoryList |
|
328 |
"automatically generated by UIPainter ..." |
|
329 |
||
330 |
"*** the code below creates a default model when invoked." |
|
331 |
"*** (which may not be the one you wanted)" |
|
332 |
"*** Please change as required and accept it in the browser." |
|
333 |
"*** (and replace this comment by something more useful ;-)" |
|
334 |
||
335 |
categoryList isNil ifTrue:[ |
|
336 |
categoryList := List new. |
|
337 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
338 |
"/ categoryList addDependent:self. |
|
339 |
"/ categoryList onChangeSend:#categoryListChanged to:self. |
|
340 |
]. |
|
341 |
^ categoryList. |
|
342 |
! |
|
343 |
||
344 |
classList |
|
345 |
"automatically generated by UIPainter ..." |
|
346 |
||
347 |
"*** the code below creates a default model when invoked." |
|
348 |
"*** (which may not be the one you wanted)" |
|
349 |
"*** Please change as required and accept it in the browser." |
|
350 |
"*** (and replace this comment by something more useful ;-)" |
|
351 |
||
352 |
classList isNil ifTrue:[ |
|
353 |
classList := List new. |
|
354 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
355 |
"/ classList addDependent:self. |
|
356 |
"/ classList onChangeSend:#classListChanged to:self. |
|
357 |
]. |
|
358 |
^ classList. |
|
359 |
! |
|
360 |
||
361 |
selectedCategoryHolder |
|
362 |
"automatically generated by UIPainter ..." |
|
363 |
||
364 |
"*** the code below creates a default model when invoked." |
|
365 |
"*** (which may not be the one you wanted)" |
|
366 |
"*** Please change as required and accept it in the browser." |
|
367 |
"*** (and replace this comment by something more useful ;-)" |
|
368 |
||
369 |
selectedCategoryHolder isNil ifTrue:[ |
|
370 |
selectedCategoryHolder := ValueHolder new. |
|
371 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
372 |
selectedCategoryHolder addDependent:self. |
|
373 |
"/ selectedCategoryHolder onChangeSend:#selectedCategoryHolderChanged to:self. |
|
374 |
]. |
|
375 |
^ selectedCategoryHolder. |
|
376 |
! |
|
377 |
||
378 |
selectedClassHolder |
|
379 |
"automatically generated by UIPainter ..." |
|
380 |
||
381 |
"*** the code below creates a default model when invoked." |
|
382 |
"*** (which may not be the one you wanted)" |
|
383 |
"*** Please change as required and accept it in the browser." |
|
384 |
"*** (and replace this comment by something more useful ;-)" |
|
385 |
||
386 |
selectedClassHolder isNil ifTrue:[ |
|
387 |
selectedClassHolder := ValueHolder new. |
|
388 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
389 |
"/ selectedClassHolder addDependent:self. |
|
390 |
"/ selectedClassHolder onChangeSend:#selectedClassHolderChanged to:self. |
|
391 |
]. |
|
392 |
^ selectedClassHolder. |
|
393 |
! ! |
|
394 |
||
395 |
!PackageDetails::Class methodsFor:'aspects - exported'! |
|
396 |
||
397 |
classList:something |
|
398 |
"automatically generated by UIPainter ..." |
|
399 |
||
400 |
"This method is used when I am embedded as subApplication," |
|
401 |
"and the mainApp wants to connect its aspects to mine." |
|
402 |
||
403 |
"/ classList notNil ifTrue:[ |
|
404 |
"/ classList removeDependent:self. |
|
405 |
"/ ]. |
|
406 |
classList := something. |
|
407 |
"/ classList notNil ifTrue:[ |
|
408 |
"/ classList addDependent:self. |
|
409 |
"/ ]. |
|
410 |
^ self. |
|
411 |
! |
|
412 |
||
413 |
selectedClassHolder:something |
|
414 |
"automatically generated by UIPainter ..." |
|
415 |
||
416 |
"This method is used when I am embedded as subApplication," |
|
417 |
"and the mainApp wants to connect its aspects to mine." |
|
418 |
||
419 |
"/ selectedClassHolder notNil ifTrue:[ |
|
420 |
"/ selectedClassHolder removeDependent:self. |
|
421 |
"/ ]. |
|
422 |
selectedClassHolder := something. |
|
423 |
"/ selectedClassHolder notNil ifTrue:[ |
|
424 |
"/ selectedClassHolder addDependent:self. |
|
425 |
"/ ]. |
|
426 |
^ self. |
|
427 |
! ! |
|
428 |
||
1268 | 429 |
!PackageDetails::Class methodsFor:'browsing'! |
430 |
||
431 |
browseClassWithIndexes:aCollectionOfIndexes |
|
432 |
"An 'adapter method'. Calls #browserClass:. Is only used as there can be |
|
433 |
private classes with the same name and the selectionList cannot tell the difference |
|
434 |
otherwise." |
|
435 |
| classItems | |
|
436 |
classItems := aCollectionOfIndexes collect:[:idx | |
|
437 |
self classListAt:idx |
|
438 |
]. |
|
439 |
||
440 |
^ self browseClasses:classItems |
|
441 |
! |
|
442 |
||
443 |
browseClasses:aCollection |
|
444 |
| theClass | |
|
445 |
theClass := aCollection first classModel. |
|
446 |
(Smalltalk classNamed:(theClass name)) browse |
|
447 |
! ! |
|
448 |
||
1227 | 449 |
!PackageDetails::Class methodsFor:'change & update'! |
450 |
||
451 |
selectedCategoryChanged:aCollectionOfCategories |
|
1241 | 452 |
|
453 |
self withProcessNamed:#selectedCategoryChanged: do:[ |
|
1227 | 454 |
classList removeAll. |
1241 | 455 |
self |
456 |
putClassesNamesIn:classList |
|
1268 | 457 |
fromPackages:self packagesSelected |
1241 | 458 |
inCategories:aCollectionOfCategories. |
459 |
||
460 |
]. |
|
1227 | 461 |
! |
462 |
||
463 |
update:something with:aParameter from:changedObject |
|
464 |
||
465 |
changedObject == selectedCategoryHolder ifTrue:[ |
|
466 |
self selectedCategoryChanged:aParameter |
|
467 |
]. |
|
468 |
||
469 |
super update:something with:aParameter from:changedObject |
|
470 |
! |
|
471 |
||
472 |
updateWithPackages:packages |
|
473 |
| classCategoryNames | |
|
1268 | 474 |
packages size = 1 ifTrue:[ |
475 |
packages first ifNil:[ |
|
476 |
^ self. |
|
477 |
] |
|
1227 | 478 |
]. |
479 |
||
1268 | 480 |
self withProcessNamed:#updateWithPackages: do:[ |
481 |
classList removeAll. |
|
482 |
categoryList removeAll. |
|
483 |
classCategoryNames := Set new. |
|
484 |
packages do:[:aPackage | |
|
485 |
classCategoryNames addAll:aPackage classCategories |
|
486 |
]. |
|
487 |
||
488 |
categoryList addAll:classCategoryNames. |
|
489 |
categoryList sort:[:x :y | |
|
490 |
x < y |
|
491 |
]. |
|
1241 | 492 |
]. |
1227 | 493 |
"/ packages do:[:aPackage | |
494 |
"/ categoryList addAll:aPackage classCategories |
|
495 |
"/ ]. |
|
496 |
! ! |
|
497 |
||
1241 | 498 |
!PackageDetails::Class methodsFor:'factory'! |
499 |
||
500 |
labelAndIconClass |
|
501 |
^ ClassLabelAndIcon |
|
502 |
! |
|
503 |
||
504 |
newClassLabelAndIconWithClass:aClass |
|
505 |
"/ aClass isPrivate ifTrue:[self halt.]. |
|
506 |
^ self labelAndIconClass class:aClass |
|
507 |
! ! |
|
508 |
||
1227 | 509 |
!PackageDetails::Class methodsFor:'initialization & release'! |
510 |
||
511 |
closeDownViews |
|
512 |
"This is a hook method generated by the Browser. |
|
513 |
It will be invoked when your app/dialog-window is really closed. |
|
514 |
See also #closeDownViews, which is invoked before and may suppress the close |
|
515 |
or ask the user for confirmation." |
|
516 |
||
517 |
"/ change the code below as required ... |
|
518 |
"/ This should cleanup any leftover resources |
|
519 |
"/ (for example, temporary files) |
|
520 |
"/ super closeRequest will initiate the closeDown |
|
521 |
||
522 |
"/ add your code here |
|
523 |
||
524 |
"/ do not remove the one below ... |
|
525 |
^ super closeDownViews |
|
526 |
! |
|
527 |
||
528 |
closeRequest |
|
529 |
"This is a hook method generated by the Browser. |
|
530 |
It will be invoked when your app/dialog-window is about to be |
|
531 |
closed (this method has a chance to suppress the close). |
|
532 |
See also #closeDownViews, which is invoked when the close is really done." |
|
533 |
||
534 |
"/ change the code below as required ... |
|
535 |
"/ Closing can be suppressed, by simply returning. |
|
536 |
"/ The 'super closeRequest' at the end will initiate the real closeDown |
|
537 |
||
538 |
("self hasUnsavedChanges" true) ifTrue:[ |
|
539 |
(self confirm:(resources string:'Close without saving ?')) ifFalse:[ |
|
540 |
^ self |
|
541 |
] |
|
542 |
]. |
|
543 |
||
544 |
^ super closeRequest |
|
545 |
! |
|
546 |
||
547 |
initialize |
|
1268 | 548 |
nonCriticalPrivateProcesses := Dictionary new |
1227 | 549 |
! |
550 |
||
551 |
postBuildWith:aBuilder |
|
552 |
"This is a hook method generated by the Browser. |
|
553 |
It will be invoked during the initialization of your app/dialog, |
|
554 |
after all of the visual components have been built, |
|
555 |
but BEFORE the top window is made visible. |
|
556 |
Add any app-specific actions here (reading files, setting up values etc.) |
|
557 |
See also #postOpenWith:, which is invoked after opening." |
|
558 |
||
559 |
"/ add any code here ... |
|
560 |
||
561 |
^ super postBuildWith:aBuilder |
|
562 |
! |
|
563 |
||
564 |
postOpenWith:aBuilder |
|
565 |
"This is a hook method generated by the Browser. |
|
566 |
It will be invoked right after the applications window has been opened. |
|
567 |
Add any app-specific actions here (starting background processes etc.). |
|
568 |
See also #postBuildWith:, which is invoked before opening." |
|
569 |
||
570 |
"/ add any code here ... |
|
571 |
||
572 |
^ super postOpenWith:aBuilder |
|
573 |
! ! |
|
574 |
||
575 |
!PackageDetails::Class methodsFor:'menu actions'! |
|
576 |
||
577 |
menuNew |
|
578 |
"This method was generated by the Browser. |
|
579 |
It will be invoked when the menu-item 'new' is selected." |
|
580 |
||
581 |
"/ change below and add any actions as required here ... |
|
582 |
self warn:'no action for ''new'' available.'. |
|
583 |
! |
|
584 |
||
585 |
menuOpen |
|
586 |
"This method was generated by the Browser. |
|
587 |
It will be invoked when the menu-item 'open' is selected." |
|
588 |
||
589 |
"/ change below and add any actions as required here ... |
|
590 |
self warn:'no action for ''open'' available.'. |
|
591 |
! |
|
592 |
||
593 |
menuSave |
|
594 |
"This method was generated by the Browser. |
|
595 |
It will be invoked when the menu-item 'save' is selected." |
|
596 |
||
597 |
"/ change below and add any actions as required here ... |
|
598 |
self warn:'no action for ''save'' available.'. |
|
599 |
! |
|
600 |
||
601 |
menuSaveAs |
|
602 |
"This method was generated by the Browser. |
|
603 |
It will be invoked when the menu-item 'saveAs' is selected." |
|
604 |
||
605 |
"/ change below and add any actions as required here ... |
|
606 |
self warn:'no action for ''saveAs'' available.'. |
|
607 |
! |
|
608 |
||
609 |
openAboutThisApplication |
|
610 |
"This method was generated by the Browser. |
|
611 |
It will be invoked when the menu-item 'help-about' is selected." |
|
612 |
||
613 |
"/ could open a customized aboutBox here ... |
|
614 |
super openAboutThisApplication |
|
615 |
! |
|
616 |
||
617 |
openDocumentation |
|
618 |
"This method was generated by the Browser. |
|
619 |
It will be invoked when the menu-item 'help-documentation' is selected." |
|
620 |
||
621 |
"/ change below as required ... |
|
622 |
||
623 |
"/ to open an HTML viewer on some document (under 'doc/online/<language>/' ): |
|
624 |
HTMLDocumentView openFullOnDocumentationFile:'TOP.html'. |
|
625 |
||
626 |
"/ add application-specific help files under the 'doc/online/<language>/help/appName' |
|
627 |
"/ directory, and open a viewer with: |
|
628 |
"/ HTMLDocumentView openFullOnDocumentationFile:'help/<MyApplication>/TOP.html'. |
|
629 |
! ! |
|
630 |
||
1241 | 631 |
!PackageDetails::Class methodsFor:'process'! |
632 |
||
633 |
withProcessNamed:aName do:aBlock |
|
634 |
"stop unconditionally the process and replace with aBlock" |
|
635 |
(self privateProcessesAt:aName) terminate. |
|
636 |
self privateProcessesAt:aName put:aBlock fork. |
|
637 |
! ! |
|
638 |
||
1227 | 639 |
!PackageDetails::Class methodsFor:'queries'! |
640 |
||
641 |
validateCanChange:arg |
|
642 |
! ! |
|
643 |
||
1241 | 644 |
!PackageDetails::Class::ClassLabelAndIcon class methodsFor:'instance'! |
645 |
||
646 |
class:aClass |
|
647 |
^ (self basicNew) classModel:aClass; initialize |
|
648 |
! ! |
|
649 |
||
650 |
!PackageDetails::Class::ClassLabelAndIcon methodsFor:'accessing'! |
|
651 |
||
652 |
asString |
|
653 |
||
654 |
| aString | |
|
655 |
aString := String new. |
|
656 |
class isPrivate ifTrue:[ |
|
657 |
aString := ' '. |
|
658 |
self privateClassDepth timesRepeat:[ |
|
659 |
aString := aString , ' '. |
|
660 |
]. |
|
661 |
aString := aString , '::'. |
|
662 |
]. |
|
663 |
||
664 |
aString := aString, class shortName asString. |
|
665 |
||
666 |
^ aString |
|
667 |
! |
|
668 |
||
669 |
classModel |
|
670 |
"return the value of the instance variable 'class' (automatically generated)" |
|
671 |
||
672 |
^ class |
|
673 |
! |
|
674 |
||
675 |
classModel:something |
|
676 |
"set the value of the instance variable 'class' (automatically generated)" |
|
677 |
||
678 |
class := something. |
|
679 |
self string: self asString. |
|
680 |
! |
|
681 |
||
682 |
privateClassDepth |
|
683 |
| thisClass counter | |
|
684 |
thisClass := class. |
|
685 |
counter := 0. |
|
686 |
[thisClass isNameSpace] whileFalse:[ |
|
687 |
thisClass := thisClass owningClass. |
|
688 |
thisClass ifNil:[thisClass := Smalltalk]. |
|
689 |
counter := counter + 1. |
|
690 |
]. |
|
691 |
||
692 |
^ counter - 1 |
|
693 |
! ! |
|
694 |
||
1227 | 695 |
!PackageDetails::Comment class methodsFor:'constant values'! |
696 |
||
697 |
applicationName |
|
698 |
^ 'Comment' asSymbol |
|
699 |
! ! |
|
700 |
||
701 |
!PackageDetails::Comment class methodsFor:'interface specs'! |
|
702 |
||
703 |
windowSpec |
|
704 |
"This resource specification was automatically generated |
|
705 |
by the UIPainter of ST/X." |
|
706 |
||
707 |
"Do not manually edit this!! If it is corrupted, |
|
708 |
the UIPainter may not be able to read the specification." |
|
709 |
||
710 |
" |
|
711 |
UIPainter new openOnClass:Packages::PackageDetails::Comment andSelector:#windowSpec |
|
712 |
Packages::PackageDetails::Comment new openInterface:#windowSpec |
|
713 |
Packages::PackageDetails::Comment open |
|
714 |
" |
|
715 |
||
716 |
<resource: #canvas> |
|
717 |
||
718 |
^ |
|
719 |
#(#FullSpec |
|
720 |
#name: #windowSpec |
|
721 |
#window: |
|
722 |
#(#WindowSpec |
|
723 |
#label: 'Packages::PackageDetails::Comment' |
|
724 |
#name: 'Packages::PackageDetails::Comment' |
|
725 |
#min: #(#Point 10 10) |
|
726 |
#max: #(#Point 1024 768) |
|
727 |
#bounds: #(#Rectangle 29 59 329 359) |
|
728 |
) |
|
729 |
#component: |
|
730 |
#(#SpecCollection |
|
731 |
#collection: #( |
|
732 |
#(#TextEditorSpec |
|
733 |
#name: 'TextEditor1' |
|
734 |
#layout: #(#LayoutFrame 0 0 0 0 0 1 0 1) |
|
735 |
#model: #commentTextHolder |
|
736 |
#hasHorizontalScrollBar: true |
|
737 |
#hasVerticalScrollBar: true |
|
738 |
#modifiedChannel: #commentTextModifiedChannel |
|
739 |
#acceptCallBack: #commentAccepted: |
|
740 |
#postBuildCallback: #commentTextEditorCreated: |
|
741 |
) |
|
742 |
) |
|
743 |
||
744 |
) |
|
745 |
) |
|
746 |
! ! |
|
747 |
||
748 |
!PackageDetails::Comment methodsFor:'accessing'! |
|
749 |
||
750 |
declareDependents |
|
751 |
super declareDependents |
|
752 |
! ! |
|
753 |
||
754 |
!PackageDetails::Comment methodsFor:'aspects'! |
|
755 |
||
756 |
commentTextAcceptChannel |
|
757 |
"automatically generated by UIPainter ..." |
|
758 |
||
759 |
"*** the code below creates a default model when invoked." |
|
760 |
"*** (which may not be the one you wanted)" |
|
761 |
"*** Please change as required and accept it in the browser." |
|
762 |
"*** (and replace this comment by something more useful ;-)" |
|
763 |
||
764 |
commentTextAcceptChannel isNil ifTrue:[ |
|
765 |
commentTextAcceptChannel := TriggerValue new. |
|
766 |
]. |
|
767 |
^ commentTextAcceptChannel. |
|
768 |
! |
|
769 |
||
770 |
commentTextHolder |
|
771 |
"automatically generated by UIPainter ..." |
|
772 |
||
773 |
"*** the code below creates a default model when invoked." |
|
774 |
"*** (which may not be the one you wanted)" |
|
775 |
"*** Please change as required and accept it in the browser." |
|
776 |
"*** (and replace this comment by something more useful ;-)" |
|
777 |
||
778 |
commentTextHolder isNil ifTrue:[ |
|
779 |
commentTextHolder := '' asValue. |
|
780 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
781 |
"/ commentTextHolder addDependent:self. |
|
782 |
"/ commentTextHolder onChangeSend:#commentTextHolderChanged to:self. |
|
783 |
]. |
|
784 |
^ commentTextHolder. |
|
785 |
! |
|
786 |
||
787 |
commentTextModifiedChannel |
|
788 |
"automatically generated by UIPainter ..." |
|
789 |
||
790 |
"*** the code below creates a default model when invoked." |
|
791 |
"*** (which may not be the one you wanted)" |
|
792 |
"*** Please change as required and accept it in the browser." |
|
793 |
"*** (and replace this comment by something more useful ;-)" |
|
794 |
||
795 |
commentTextModifiedChannel isNil ifTrue:[ |
|
796 |
commentTextModifiedChannel := TriggerValue new. |
|
797 |
]. |
|
798 |
^ commentTextModifiedChannel. |
|
799 |
! ! |
|
800 |
||
801 |
!PackageDetails::Comment methodsFor:'callbacks'! |
|
802 |
||
803 |
commentAccepted:aStringCollection |
|
804 |
|packagesSelected| |
|
805 |
(packagesSelected := self packagesSelected) size > 1 ifTrue:[ |
|
806 |
Smalltalk beep. |
|
807 |
^ self. |
|
808 |
]. |
|
809 |
||
810 |
(self packagesNamed:self packagesSelected) first packageComment:aStringCollection asString. |
|
811 |
! |
|
812 |
||
813 |
commentTextEditorCreated:aScrolledViewWithTextEditor |
|
814 |
"do with the text editor widget as you will...." |
|
815 |
editTextView := aScrolledViewWithTextEditor scrolledView. |
|
816 |
||
817 |
! ! |
|
818 |
||
819 |
!PackageDetails::Comment methodsFor:'change & update'! |
|
820 |
||
1268 | 821 |
packagesSelectedHolderChanged:selectedPackages |
822 |
|packagesSelected selectedSinglePackage | |
|
823 |
||
824 |
packagesSelected := self packagesSelected. |
|
825 |
||
826 |
selectedPackages size == 1 ifTrue:[ |
|
827 |
selectedSinglePackage := selectedPackages first. |
|
828 |
^ commentTextHolder value: selectedSinglePackage packageComment. |
|
1227 | 829 |
]. |
1268 | 830 |
selectedPackages size == 0 ifTrue:[ |
831 |
^ commentTextHolder value:'No package selected' |
|
832 |
]. |
|
833 |
"selectedPackages size > 1 ifTrue:[" |
|
834 |
^ commentTextHolder value:'Cannot show more than one comment!!' |
|
835 |
"]." |
|
1227 | 836 |
! |
837 |
||
838 |
validateCanChange:arg |
|
839 |
! ! |
|
840 |
||
841 |
!PackageDetails::Comment methodsFor:'defaults'! |
|
842 |
||
843 |
commentForMultiplePackageSelect |
|
844 |
^ String new |
|
845 |
! ! |
|
846 |
||
847 |
!PackageDetails::Comment methodsFor:'initialization & release'! |
|
848 |
||
849 |
closeDownViews |
|
850 |
"This is a hook method generated by the Browser. |
|
851 |
It will be invoked when your app/dialog-window is really closed. |
|
852 |
See also #closeDownViews, which is invoked before and may suppress the close |
|
853 |
or ask the user for confirmation." |
|
854 |
||
855 |
"/ change the code below as required ... |
|
856 |
"/ This should cleanup any leftover resources |
|
857 |
"/ (for example, temporary files) |
|
858 |
"/ super closeRequest will initiate the closeDown |
|
859 |
||
860 |
"/ add your code here |
|
861 |
||
862 |
"/ do not remove the one below ... |
|
863 |
^ super closeDownViews |
|
864 |
! |
|
865 |
||
866 |
closeRequest |
|
867 |
"This is a hook method generated by the Browser. |
|
868 |
It will be invoked when your app/dialog-window is about to be |
|
869 |
closed (this method has a chance to suppress the close). |
|
870 |
See also #closeDownViews, which is invoked when the close is really done." |
|
871 |
||
872 |
"/ change the code below as required ... |
|
873 |
"/ Closing can be suppressed, by simply returning. |
|
874 |
"/ The 'super closeRequest' at the end will initiate the real closeDown |
|
875 |
||
876 |
("self hasUnsavedChanges" true) ifTrue:[ |
|
877 |
(self confirm:(resources string:'Close without saving ?')) ifFalse:[ |
|
878 |
^ self |
|
879 |
] |
|
880 |
]. |
|
881 |
||
882 |
^ super closeRequest |
|
883 |
! |
|
884 |
||
885 |
postBuildWith:aBuilder |
|
886 |
"This is a hook method generated by the Browser. |
|
887 |
It will be invoked during the initialization of your app/dialog, |
|
888 |
after all of the visual components have been built, |
|
889 |
but BEFORE the top window is made visible. |
|
890 |
Add any app-specific actions here (reading files, setting up values etc.) |
|
891 |
See also #postOpenWith:, which is invoked after opening." |
|
892 |
||
893 |
"/ add any code here ... |
|
894 |
||
895 |
^ super postBuildWith:aBuilder |
|
896 |
! |
|
897 |
||
898 |
postOpenWith:aBuilder |
|
899 |
"This is a hook method generated by the Browser. |
|
900 |
It will be invoked right after the applications window has been opened. |
|
901 |
Add any app-specific actions here (starting background processes etc.). |
|
902 |
See also #postBuildWith:, which is invoked before opening." |
|
903 |
||
904 |
"/ add any code here ... |
|
905 |
||
906 |
^ super postOpenWith:aBuilder |
|
907 |
! ! |
|
908 |
||
909 |
!PackageDetails::LooseMethod class methodsFor:'constant values'! |
|
910 |
||
911 |
applicationName |
|
912 |
^ 'Loose Method' asSymbol |
|
913 |
! ! |
|
914 |
||
915 |
!PackageDetails::LooseMethod class methodsFor:'interface specs'! |
|
916 |
||
917 |
windowSpec |
|
918 |
"This resource specification was automatically generated |
|
919 |
by the UIPainter of ST/X." |
|
920 |
||
921 |
"Do not manually edit this!! If it is corrupted, |
|
922 |
the UIPainter may not be able to read the specification." |
|
923 |
||
924 |
" |
|
925 |
UIPainter new openOnClass:Packages::PackageDetails::LooseMethod andSelector:#windowSpec |
|
926 |
Packages::PackageDetails::LooseMethod new openInterface:#windowSpec |
|
927 |
Packages::PackageDetails::LooseMethod open |
|
928 |
" |
|
929 |
||
930 |
<resource: #canvas> |
|
931 |
||
932 |
^ |
|
933 |
#(#FullSpec |
|
934 |
#name: #windowSpec |
|
935 |
#window: |
|
936 |
#(#WindowSpec |
|
937 |
#label: 'Packages::PackageDetails::LooseMethod' |
|
938 |
#name: 'Packages::PackageDetails::LooseMethod' |
|
939 |
#min: #(#Point 10 10) |
|
940 |
#max: #(#Point 1024 768) |
|
941 |
#bounds: #(#Rectangle 29 59 329 359) |
|
942 |
#menu: #mainMenu |
|
943 |
) |
|
944 |
#component: |
|
945 |
#(#SpecCollection |
|
946 |
#collection: #( |
|
947 |
#(#VariableVerticalPanelSpec |
|
948 |
#name: 'VariableVerticalPanel1' |
|
949 |
#layout: #(#LayoutFrame 0 0 0 0 0 1 0 1) |
|
950 |
#component: |
|
951 |
#(#SpecCollection |
|
952 |
#collection: #( |
|
953 |
#(#DataSetSpec |
|
954 |
#name: 'Table1' |
|
955 |
#model: #methodSelectedHolder |
|
956 |
#hasHorizontalScrollBar: true |
|
957 |
#hasVerticalScrollBar: true |
|
958 |
#dataList: #methodList |
|
959 |
#has3Dsepartors: false |
|
960 |
#columnHolder: #tableColumns |
|
961 |
#multipleSelectOk: true |
|
962 |
#verticalSpacing: 0 |
|
963 |
) |
|
964 |
#(#TextEditorSpec |
|
965 |
#name: 'SourceEditor' |
|
966 |
#model: #currentMethodSourceHolder |
|
967 |
#hasHorizontalScrollBar: true |
|
968 |
#hasVerticalScrollBar: true |
|
969 |
) |
|
970 |
) |
|
971 |
||
972 |
) |
|
973 |
#handles: #(#Any 0.5 1.0) |
|
974 |
) |
|
975 |
) |
|
976 |
||
977 |
) |
|
978 |
) |
|
979 |
! ! |
|
980 |
||
981 |
!PackageDetails::LooseMethod class methodsFor:'menu specs'! |
|
982 |
||
983 |
mainMenu |
|
984 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
985 |
||
986 |
"Do not manually edit this!! If it is corrupted, |
|
987 |
the MenuEditor may not be able to read the specification." |
|
988 |
||
989 |
" |
|
990 |
MenuEditor new openOnClass:Packages::PackageDetails::LooseMethod andSelector:#mainMenu |
|
991 |
" |
|
992 |
||
993 |
<resource: #menu> |
|
994 |
||
995 |
^ #(#Menu |
|
996 |
#( |
|
997 |
#(#MenuItem |
|
998 |
#label: 'File' |
|
999 |
#translateLabel: true |
|
1000 |
#submenu: |
|
1001 |
#(#Menu |
|
1002 |
#( |
|
1003 |
#(#MenuItem |
|
1004 |
#label: 'New' |
|
1005 |
#translateLabel: true |
|
1006 |
#value: #menuNew |
|
1007 |
) |
|
1008 |
#(#MenuItem |
|
1009 |
#label: '-' |
|
1010 |
) |
|
1011 |
#(#MenuItem |
|
1012 |
#label: 'Open...' |
|
1013 |
#translateLabel: true |
|
1014 |
#value: #menuOpen |
|
1015 |
) |
|
1016 |
#(#MenuItem |
|
1017 |
#label: '-' |
|
1018 |
) |
|
1019 |
#(#MenuItem |
|
1020 |
#label: 'Save' |
|
1021 |
#translateLabel: true |
|
1022 |
#value: #menuSave |
|
1023 |
) |
|
1024 |
#(#MenuItem |
|
1025 |
#label: 'Save As...' |
|
1026 |
#translateLabel: true |
|
1027 |
#value: #menuSaveAs |
|
1028 |
) |
|
1029 |
#(#MenuItem |
|
1030 |
#label: '-' |
|
1031 |
) |
|
1032 |
#(#MenuItem |
|
1033 |
#label: 'Exit' |
|
1034 |
#translateLabel: true |
|
1035 |
#value: #closeRequest |
|
1036 |
) |
|
1037 |
) nil |
|
1038 |
nil |
|
1039 |
) |
|
1040 |
) |
|
1041 |
#(#MenuItem |
|
1042 |
#label: 'Help' |
|
1043 |
#translateLabel: true |
|
1044 |
#startGroup: #right |
|
1045 |
#submenu: |
|
1046 |
#(#Menu |
|
1047 |
#( |
|
1048 |
#(#MenuItem |
|
1049 |
#label: 'Documentation' |
|
1050 |
#translateLabel: true |
|
1051 |
#value: #openDocumentation |
|
1052 |
) |
|
1053 |
#(#MenuItem |
|
1054 |
#label: '-' |
|
1055 |
) |
|
1056 |
#(#MenuItem |
|
1057 |
#label: 'About this Application' |
|
1058 |
#translateLabel: true |
|
1059 |
#value: #openAboutThisApplication |
|
1060 |
) |
|
1061 |
) nil |
|
1062 |
nil |
|
1063 |
) |
|
1064 |
) |
|
1065 |
) nil |
|
1066 |
nil |
|
1067 |
) |
|
1068 |
! ! |
|
1069 |
||
1070 |
!PackageDetails::LooseMethod class methodsFor:'tableColumns specs'! |
|
1071 |
||
1072 |
tableColumns |
|
1073 |
"This resource specification was automatically generated |
|
1074 |
by the DataSetBuilder of ST/X." |
|
1075 |
||
1076 |
"Do not manually edit this!! If it is corrupted, |
|
1077 |
the DataSetBuilder may not be able to read the specification." |
|
1078 |
||
1079 |
" |
|
1080 |
DataSetBuilder new openOnClass:Packages::PackageDetails::LooseMethod andSelector:#tableColumns |
|
1081 |
" |
|
1082 |
||
1083 |
<resource: #tableColumns> |
|
1084 |
||
1085 |
^#( |
|
1086 |
#(#DataSetColumnSpec |
|
1087 |
#label: '' |
|
1088 |
#id: 'Icon' |
|
1089 |
#labelButtonType: #Button |
|
1090 |
#model: #icon |
|
1091 |
#canSelect: false |
|
1092 |
#showRowSeparator: false |
|
1093 |
#showColSeparator: false |
|
1094 |
) |
|
1095 |
#(#DataSetColumnSpec |
|
1096 |
#label: 'Selector' |
|
1097 |
#id: 'Selector' |
|
1098 |
#labelAlignment: #left |
|
1099 |
#labelButtonType: #Button |
|
1100 |
#model: #selector |
|
1101 |
#canSelect: false |
|
1102 |
#showRowSeparator: false |
|
1103 |
#showColSeparator: false |
|
1104 |
) |
|
1105 |
#(#DataSetColumnSpec |
|
1106 |
#label: 'Class' |
|
1107 |
#id: 'Class' |
|
1108 |
#labelAlignment: #left |
|
1109 |
#labelButtonType: #Button |
|
1110 |
#model: #myClass |
|
1111 |
#canSelect: false |
|
1112 |
#showRowSeparator: false |
|
1113 |
#showColSeparator: false |
|
1114 |
) |
|
1115 |
#(#DataSetColumnSpec |
|
1116 |
#label: 'Package' |
|
1117 |
#id: 'Package' |
|
1118 |
#labelButtonType: #Button |
|
1119 |
#model: #myPackage |
|
1120 |
#canSelect: false |
|
1121 |
#showRowSeparator: false |
|
1122 |
#showColSeparator: false |
|
1123 |
) |
|
1124 |
) |
|
1125 |
! |
|
1126 |
||
1127 |
tableColumnsOld |
|
1128 |
"This resource specification was automatically generated |
|
1129 |
by the DataSetBuilder of ST/X." |
|
1130 |
||
1131 |
"Do not manually edit this!! If it is corrupted, |
|
1132 |
the DataSetBuilder may not be able to read the specification." |
|
1133 |
||
1134 |
" |
|
1135 |
DataSetBuilder new openOnClass:Packages::PackageDetails::LooseMethod andSelector:#tableColumns |
|
1136 |
" |
|
1137 |
||
1138 |
<resource: #tableColumns> |
|
1139 |
||
1140 |
^#( |
|
1141 |
#(#DataSetColumnSpec |
|
1142 |
#label: '' |
|
1143 |
#id: 'Icon' |
|
1144 |
#labelButtonType: #Button |
|
1145 |
#model: #icon |
|
1146 |
#canSelect: false |
|
1147 |
) |
|
1148 |
#(#DataSetColumnSpec |
|
1149 |
#label: 'Selector' |
|
1150 |
#id: 'Selector' |
|
1151 |
#labelAlignment: #left |
|
1152 |
#labelButtonType: #Button |
|
1153 |
#model: #selector |
|
1154 |
#canSelect: false |
|
1155 |
) |
|
1156 |
#(#DataSetColumnSpec |
|
1157 |
#label: 'Class' |
|
1158 |
#id: 'Class' |
|
1159 |
#labelAlignment: #left |
|
1160 |
#labelButtonType: #Button |
|
1161 |
#model: #myClass |
|
1162 |
#canSelect: false |
|
1163 |
) |
|
1164 |
#(#DataSetColumnSpec |
|
1165 |
#label: 'Package' |
|
1166 |
#id: 'Package' |
|
1167 |
#labelButtonType: #Button |
|
1168 |
#model: #myPackage |
|
1169 |
#canSelect: false |
|
1170 |
) |
|
1171 |
) |
|
1172 |
! ! |
|
1173 |
||
1174 |
!PackageDetails::LooseMethod methodsFor:'accessing'! |
|
1175 |
||
1176 |
currentMethodSource:aString |
|
1177 |
self currentMethodSourceHolder value:aString |
|
1178 |
! |
|
1179 |
||
1180 |
declareDependents |
|
1181 |
super declareDependents |
|
1182 |
! ! |
|
1183 |
||
1184 |
!PackageDetails::LooseMethod methodsFor:'aspects'! |
|
1185 |
||
1186 |
currentMethodSourceHolder |
|
1187 |
"automatically generated by UIPainter ..." |
|
1188 |
||
1189 |
"*** the code below creates a default model when invoked." |
|
1190 |
"*** (which may not be the one you wanted)" |
|
1191 |
"*** Please change as required and accept it in the browser." |
|
1192 |
"*** (and replace this comment by something more useful ;-)" |
|
1193 |
||
1194 |
currentMethodSourceHolder isNil ifTrue:[ |
|
1195 |
currentMethodSourceHolder := '' asValue. |
|
1196 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1197 |
"/ currentMethodSourceHolder addDependent:self. |
|
1198 |
"/ currentMethodSourceHolder onChangeSend:#currentMethodSourceHolderChanged to:self. |
|
1199 |
]. |
|
1200 |
^ currentMethodSourceHolder. |
|
1201 |
! |
|
1202 |
||
1203 |
methodList |
|
1204 |
"automatically generated by UIPainter ..." |
|
1205 |
||
1206 |
"*** the code below creates a default model when invoked." |
|
1207 |
"*** (which may not be the one you wanted)" |
|
1208 |
"*** Please change as required and accept it in the browser." |
|
1209 |
"*** (and replace this comment by something more useful ;-)" |
|
1210 |
||
1211 |
methodList isNil ifTrue:[ |
|
1212 |
methodList := List new. |
|
1213 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1214 |
"/ methodList addDependent:self. |
|
1215 |
"/ methodList onChangeSend:#methodListChanged to:self. |
|
1216 |
]. |
|
1217 |
^ methodList. |
|
1218 |
! |
|
1219 |
||
1220 |
methodSelectedHolder |
|
1221 |
"automatically generated by UIPainter ..." |
|
1222 |
||
1223 |
"*** the code below creates a default model when invoked." |
|
1224 |
"*** (which may not be the one you wanted)" |
|
1225 |
"*** Please change as required and accept it in the browser." |
|
1226 |
"*** (and replace this comment by something more useful ;-)" |
|
1227 |
||
1228 |
methodSelectedHolder isNil ifTrue:[ |
|
1229 |
methodSelectedHolder := ValueHolder new. |
|
1230 |
methodSelectedHolder onChangeEvaluate:[| methodSelectedHolderValue| |
|
1231 |
(methodSelectedHolderValue := methodSelectedHolder value) ifNotNil:[ |
|
1232 |
self currentMethodSourceChangedToIndex:methodSelectedHolderValue |
|
1233 |
]. |
|
1234 |
||
1235 |
] |
|
1236 |
]. |
|
1237 |
^ methodSelectedHolder. |
|
1238 |
! |
|
1239 |
||
1240 |
tableColumns |
|
1241 |
"automatically generated by UIPainter ..." |
|
1242 |
||
1243 |
"*** the code below creates a default model when invoked." |
|
1244 |
"*** (which may not be the one you wanted)" |
|
1245 |
"*** Please change as required and accept it in the browser." |
|
1246 |
"*** (and replace this comment by something more useful ;-)" |
|
1247 |
||
1248 |
tableColumns isNil ifTrue:[ |
|
1249 |
tableColumns := self class tableColumns asValue. |
|
1250 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1251 |
"/ tableColumns addDependent:self. |
|
1252 |
"/ tableColumns onChangeSend:#tableColumnsChanged to:self. |
|
1253 |
]. |
|
1254 |
^ tableColumns. |
|
1255 |
! ! |
|
1256 |
||
1257 |
!PackageDetails::LooseMethod methodsFor:'change & update'! |
|
1258 |
||
1259 |
currentMethodSourceChangedToIndex:aCollection |
|
1260 |
| currentPackageDetailsRow | |
|
1261 |
aCollection size > 1 ifTrue:[ |
|
1262 |
self currentMethodSource: self moreThanOneMethodCode. |
|
1263 |
^ self. |
|
1264 |
]. |
|
1265 |
currentPackageDetailsRow := (self methodList at:aCollection first). |
|
1266 |
self currentMethodSourceHolder value:(currentPackageDetailsRow model source). |
|
1267 |
! |
|
1268 |
||
1269 |
updateWithPackages:packages |
|
1270 |
| methodNames | |
|
1271 |
methodList removeAll. |
|
1272 |
currentMethodSourceHolder value:String new. |
|
1273 |
methodNames := OrderedCollection new. |
|
1274 |
||
1275 |
packages do:[:aPackage | |
|
1276 |
methodNames addAll:(aPackage looseMethods collect:[:aMethod| self newPackageDetailsRowWithModel:aMethod]). |
|
1277 |
]. |
|
1278 |
||
1279 |
methodList addAll:methodNames. |
|
1280 |
! |
|
1281 |
||
1282 |
validateCanChange:arg |
|
1283 |
! ! |
|
1284 |
||
1285 |
!PackageDetails::LooseMethod methodsFor:'defaults'! |
|
1286 |
||
1287 |
moreThanOneMethodCode |
|
1288 |
^ String new |
|
1289 |
! ! |
|
1290 |
||
1291 |
!PackageDetails::LooseMethod methodsFor:'factory'! |
|
1292 |
||
1293 |
newPackageDetailsRowWithModel:aModel |
|
1294 |
^ PackageDetailsRow new model: aModel |
|
1295 |
! ! |
|
1296 |
||
1297 |
!PackageDetails::LooseMethod methodsFor:'initialization & release'! |
|
1298 |
||
1299 |
closeDownViews |
|
1300 |
"This is a hook method generated by the Browser. |
|
1301 |
It will be invoked when your app/dialog-window is really closed. |
|
1302 |
See also #closeDownViews, which is invoked before and may suppress the close |
|
1303 |
or ask the user for confirmation." |
|
1304 |
||
1305 |
"/ change the code below as required ... |
|
1306 |
"/ This should cleanup any leftover resources |
|
1307 |
"/ (for example, temporary files) |
|
1308 |
"/ super closeRequest will initiate the closeDown |
|
1309 |
||
1310 |
"/ add your code here |
|
1311 |
||
1312 |
"/ do not remove the one below ... |
|
1313 |
^ super closeDownViews |
|
1314 |
! |
|
1315 |
||
1316 |
closeRequest |
|
1317 |
"This is a hook method generated by the Browser. |
|
1318 |
It will be invoked when your app/dialog-window is about to be |
|
1319 |
closed (this method has a chance to suppress the close). |
|
1320 |
See also #closeDownViews, which is invoked when the close is really done." |
|
1321 |
||
1322 |
"/ change the code below as required ... |
|
1323 |
"/ Closing can be suppressed, by simply returning. |
|
1324 |
"/ The 'super closeRequest' at the end will initiate the real closeDown |
|
1325 |
||
1326 |
("self hasUnsavedChanges" true) ifTrue:[ |
|
1327 |
(self confirm:(resources string:'Close without saving ?')) ifFalse:[ |
|
1328 |
^ self |
|
1329 |
] |
|
1330 |
]. |
|
1331 |
||
1332 |
^ super closeRequest |
|
1333 |
! |
|
1334 |
||
1335 |
postBuildWith:aBuilder |
|
1336 |
"This is a hook method generated by the Browser. |
|
1337 |
It will be invoked during the initialization of your app/dialog, |
|
1338 |
after all of the visual components have been built, |
|
1339 |
but BEFORE the top window is made visible. |
|
1340 |
Add any app-specific actions here (reading files, setting up values etc.) |
|
1341 |
See also #postOpenWith:, which is invoked after opening." |
|
1342 |
||
1343 |
"/ add any code here ... |
|
1344 |
^ super postBuildWith:aBuilder |
|
1345 |
! |
|
1346 |
||
1347 |
postOpenWith:aBuilder |
|
1348 |
"This is a hook method generated by the Browser. |
|
1349 |
It will be invoked right after the applications window has been opened. |
|
1350 |
Add any app-specific actions here (starting background processes etc.). |
|
1351 |
See also #postBuildWith:, which is invoked before opening." |
|
1352 |
||
1353 |
"/ add any code here ... |
|
1354 |
||
1355 |
^ super postOpenWith:aBuilder |
|
1356 |
! ! |
|
1357 |
||
1358 |
!PackageDetails::LooseMethod methodsFor:'menu actions'! |
|
1359 |
||
1360 |
menuNew |
|
1361 |
"This method was generated by the Browser. |
|
1362 |
It will be invoked when the menu-item 'new' is selected." |
|
1363 |
||
1364 |
"/ change below and add any actions as required here ... |
|
1365 |
self warn:'no action for ''new'' available.'. |
|
1366 |
! |
|
1367 |
||
1368 |
menuOpen |
|
1369 |
"This method was generated by the Browser. |
|
1370 |
It will be invoked when the menu-item 'open' is selected." |
|
1371 |
||
1372 |
"/ change below and add any actions as required here ... |
|
1373 |
self warn:'no action for ''open'' available.'. |
|
1374 |
! |
|
1375 |
||
1376 |
menuSave |
|
1377 |
"This method was generated by the Browser. |
|
1378 |
It will be invoked when the menu-item 'save' is selected." |
|
1379 |
||
1380 |
"/ change below and add any actions as required here ... |
|
1381 |
self warn:'no action for ''save'' available.'. |
|
1382 |
! |
|
1383 |
||
1384 |
menuSaveAs |
|
1385 |
"This method was generated by the Browser. |
|
1386 |
It will be invoked when the menu-item 'saveAs' is selected." |
|
1387 |
||
1388 |
"/ change below and add any actions as required here ... |
|
1389 |
self warn:'no action for ''saveAs'' available.'. |
|
1390 |
! |
|
1391 |
||
1392 |
openAboutThisApplication |
|
1393 |
"This method was generated by the Browser. |
|
1394 |
It will be invoked when the menu-item 'help-about' is selected." |
|
1395 |
||
1396 |
"/ could open a customized aboutBox here ... |
|
1397 |
super openAboutThisApplication |
|
1398 |
! |
|
1399 |
||
1400 |
openDocumentation |
|
1401 |
"This method was generated by the Browser. |
|
1402 |
It will be invoked when the menu-item 'help-documentation' is selected." |
|
1403 |
||
1404 |
"/ change below as required ... |
|
1405 |
||
1406 |
"/ to open an HTML viewer on some document (under 'doc/online/<language>/' ): |
|
1407 |
HTMLDocumentView openFullOnDocumentationFile:'TOP.html'. |
|
1408 |
||
1409 |
"/ add application-specific help files under the 'doc/online/<language>/help/appName' |
|
1410 |
"/ directory, and open a viewer with: |
|
1411 |
"/ HTMLDocumentView openFullOnDocumentationFile:'help/<MyApplication>/TOP.html'. |
|
1412 |
! ! |
|
1413 |
||
1414 |
!PackageDetails::LooseMethod::PackageDetailsRow methodsFor:'accessing'! |
|
1415 |
||
1416 |
icon |
|
1417 |
"automatically generated by DataSetBuilder ..." |
|
1418 |
||
1419 |
"get value" |
|
1420 |
||
1421 |
^ '' |
|
1422 |
! |
|
1423 |
||
1424 |
model |
|
1425 |
"return the value of the instance variable 'model' (automatically generated)" |
|
1426 |
||
1427 |
^ model |
|
1428 |
! |
|
1429 |
||
1430 |
model:arg |
|
1431 |
model:= arg. |
|
1432 |
! |
|
1433 |
||
1434 |
myClass |
|
1435 |
"automatically generated by DataSetBuilder ..." |
|
1436 |
||
1437 |
"get value" |
|
1438 |
||
1439 |
^ model mclass |
|
1440 |
! |
|
1441 |
||
1442 |
myPackage |
|
1443 |
"automatically generated by DataSetBuilder ..." |
|
1444 |
||
1445 |
"get value" |
|
1446 |
||
1447 |
^ model package |
|
1448 |
! |
|
1449 |
||
1450 |
selector |
|
1451 |
"automatically generated by DataSetBuilder ..." |
|
1452 |
||
1453 |
"get value" |
|
1454 |
||
1455 |
^ model selector |
|
1456 |
! ! |
|
1457 |
||
1458 |
!PackageDetails::Prerequisites class methodsFor:'constant values'! |
|
1459 |
||
1460 |
applicationName |
|
1461 |
^ 'Prerequisites' asSymbol |
|
1462 |
! ! |
|
1463 |
||
1464 |
!PackageDetails::Prerequisites class methodsFor:'interface specs'! |
|
1465 |
||
1466 |
windowSpec |
|
1467 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
1468 |
||
1469 |
"Do not manually edit this!! If it is corrupted, |
|
1470 |
the UIPainter may not be able to read the specification." |
|
1471 |
||
1472 |
" |
|
1473 |
UIPainter new openOnClass:Packages::PackageDetails::Prerequisites andSelector:#windowSpec |
|
1474 |
" |
|
1475 |
||
1476 |
<resource: #canvas> |
|
1477 |
||
1478 |
^ #(#FullSpec |
|
1479 |
#window: |
|
1480 |
#(#WindowSpec |
|
1481 |
#name: 'Packages::PackageDetails::Prerequisites' |
|
1482 |
#layout: #(#LayoutFrame 204 0 162 0 503 0 461 0) |
|
1483 |
#label: 'Packages::PackageDetails::Prerequisites' |
|
1484 |
#min: #(#Point 10 10) |
|
1485 |
#max: #(#Point 1024 768) |
|
1486 |
#bounds: #(#Rectangle 204 162 504 462) |
|
1487 |
#menu: #mainMenu |
|
1488 |
#usePreferredExtent: false |
|
1489 |
) |
|
1490 |
#component: |
|
1491 |
#(#SpecCollection |
|
1492 |
#collection: #() |
|
1493 |
) |
|
1494 |
) |
|
1495 |
! ! |
|
1496 |
||
1497 |
!PackageDetails::Prerequisites class methodsFor:'menu specs'! |
|
1498 |
||
1499 |
mainMenu |
|
1500 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
1501 |
||
1502 |
"Do not manually edit this!! If it is corrupted, |
|
1503 |
the MenuEditor may not be able to read the specification." |
|
1504 |
||
1505 |
" |
|
1506 |
MenuEditor new openOnClass:Packages::PackageDetails::Prerequisites andSelector:#mainMenu |
|
1507 |
" |
|
1508 |
||
1509 |
<resource: #menu> |
|
1510 |
||
1511 |
^ #(#Menu |
|
1512 |
#( |
|
1513 |
#(#MenuItem |
|
1514 |
#label: 'File' |
|
1515 |
#translateLabel: true |
|
1516 |
#submenu: |
|
1517 |
#(#Menu |
|
1518 |
#( |
|
1519 |
#(#MenuItem |
|
1520 |
#label: 'New' |
|
1521 |
#translateLabel: true |
|
1522 |
#value: #menuNew |
|
1523 |
) |
|
1524 |
#(#MenuItem |
|
1525 |
#label: '-' |
|
1526 |
) |
|
1527 |
#(#MenuItem |
|
1528 |
#label: 'Open...' |
|
1529 |
#translateLabel: true |
|
1530 |
#value: #menuOpen |
|
1531 |
) |
|
1532 |
#(#MenuItem |
|
1533 |
#label: '-' |
|
1534 |
) |
|
1535 |
#(#MenuItem |
|
1536 |
#label: 'Save' |
|
1537 |
#translateLabel: true |
|
1538 |
#value: #menuSave |
|
1539 |
) |
|
1540 |
#(#MenuItem |
|
1541 |
#label: 'Save As...' |
|
1542 |
#translateLabel: true |
|
1543 |
#value: #menuSaveAs |
|
1544 |
) |
|
1545 |
#(#MenuItem |
|
1546 |
#label: '-' |
|
1547 |
) |
|
1548 |
#(#MenuItem |
|
1549 |
#label: 'Exit' |
|
1550 |
#translateLabel: true |
|
1551 |
#value: #closeRequest |
|
1552 |
) |
|
1553 |
) nil |
|
1554 |
nil |
|
1555 |
) |
|
1556 |
) |
|
1557 |
#(#MenuItem |
|
1558 |
#label: 'Help' |
|
1559 |
#translateLabel: true |
|
1560 |
#startGroup: #right |
|
1561 |
#submenu: |
|
1562 |
#(#Menu |
|
1563 |
#( |
|
1564 |
#(#MenuItem |
|
1565 |
#label: 'Documentation' |
|
1566 |
#translateLabel: true |
|
1567 |
#value: #openDocumentation |
|
1568 |
) |
|
1569 |
#(#MenuItem |
|
1570 |
#label: '-' |
|
1571 |
) |
|
1572 |
#(#MenuItem |
|
1573 |
#label: 'About this Application' |
|
1574 |
#translateLabel: true |
|
1575 |
#value: #openAboutThisApplication |
|
1576 |
) |
|
1577 |
) nil |
|
1578 |
nil |
|
1579 |
) |
|
1580 |
) |
|
1581 |
) nil |
|
1582 |
nil |
|
1583 |
) |
|
1584 |
! ! |
|
1585 |
||
1586 |
!PackageDetails::Prerequisites methodsFor:'accessing'! |
|
1587 |
||
1588 |
declareDependents |
|
1589 |
super declareDependents |
|
1590 |
! ! |
|
1591 |
||
1592 |
!PackageDetails::Prerequisites methodsFor:'change & update'! |
|
1593 |
||
1594 |
packagesSelectedHolderChanged:aCollection |
|
1595 |
! |
|
1596 |
||
1597 |
validateCanChange:arg |
|
1598 |
! ! |
|
1599 |
||
1600 |
!PackageDetails::Prerequisites methodsFor:'initialization & release'! |
|
1601 |
||
1602 |
closeDownViews |
|
1603 |
"This is a hook method generated by the Browser. |
|
1604 |
It will be invoked when your app/dialog-window is really closed. |
|
1605 |
See also #closeDownViews, which is invoked before and may suppress the close |
|
1606 |
or ask the user for confirmation." |
|
1607 |
||
1608 |
"/ change the code below as required ... |
|
1609 |
"/ This should cleanup any leftover resources |
|
1610 |
"/ (for example, temporary files) |
|
1611 |
"/ super closeRequest will initiate the closeDown |
|
1612 |
||
1613 |
"/ add your code here |
|
1614 |
||
1615 |
"/ do not remove the one below ... |
|
1616 |
^ super closeDownViews |
|
1617 |
! |
|
1618 |
||
1619 |
closeRequest |
|
1620 |
"This is a hook method generated by the Browser. |
|
1621 |
It will be invoked when your app/dialog-window is about to be |
|
1622 |
closed (this method has a chance to suppress the close). |
|
1623 |
See also #closeDownViews, which is invoked when the close is really done." |
|
1624 |
||
1625 |
"/ change the code below as required ... |
|
1626 |
"/ Closing can be suppressed, by simply returning. |
|
1627 |
"/ The 'super closeRequest' at the end will initiate the real closeDown |
|
1628 |
||
1629 |
("self hasUnsavedChanges" true) ifTrue:[ |
|
1630 |
(self confirm:(resources string:'Close without saving ?')) ifFalse:[ |
|
1631 |
^ self |
|
1632 |
] |
|
1633 |
]. |
|
1634 |
||
1635 |
^ super closeRequest |
|
1636 |
! |
|
1637 |
||
1638 |
postBuildWith:aBuilder |
|
1639 |
"This is a hook method generated by the Browser. |
|
1640 |
It will be invoked during the initialization of your app/dialog, |
|
1641 |
after all of the visual components have been built, |
|
1642 |
but BEFORE the top window is made visible. |
|
1643 |
Add any app-specific actions here (reading files, setting up values etc.) |
|
1644 |
See also #postOpenWith:, which is invoked after opening." |
|
1645 |
||
1646 |
"/ add any code here ... |
|
1647 |
||
1648 |
^ super postBuildWith:aBuilder |
|
1649 |
! |
|
1650 |
||
1651 |
postOpenWith:aBuilder |
|
1652 |
"This is a hook method generated by the Browser. |
|
1653 |
It will be invoked right after the applications window has been opened. |
|
1654 |
Add any app-specific actions here (starting background processes etc.). |
|
1655 |
See also #postBuildWith:, which is invoked before opening." |
|
1656 |
||
1657 |
"/ add any code here ... |
|
1658 |
||
1659 |
^ super postOpenWith:aBuilder |
|
1660 |
! ! |
|
1661 |
||
1662 |
!PackageDetails::Prerequisites methodsFor:'menu actions'! |
|
1663 |
||
1664 |
menuNew |
|
1665 |
"This method was generated by the Browser. |
|
1666 |
It will be invoked when the menu-item 'new' is selected." |
|
1667 |
||
1668 |
"/ change below and add any actions as required here ... |
|
1669 |
self warn:'no action for ''new'' available.'. |
|
1670 |
! |
|
1671 |
||
1672 |
menuOpen |
|
1673 |
"This method was generated by the Browser. |
|
1674 |
It will be invoked when the menu-item 'open' is selected." |
|
1675 |
||
1676 |
"/ change below and add any actions as required here ... |
|
1677 |
self warn:'no action for ''open'' available.'. |
|
1678 |
! |
|
1679 |
||
1680 |
menuSave |
|
1681 |
"This method was generated by the Browser. |
|
1682 |
It will be invoked when the menu-item 'save' is selected." |
|
1683 |
||
1684 |
"/ change below and add any actions as required here ... |
|
1685 |
self warn:'no action for ''save'' available.'. |
|
1686 |
! |
|
1687 |
||
1688 |
menuSaveAs |
|
1689 |
"This method was generated by the Browser. |
|
1690 |
It will be invoked when the menu-item 'saveAs' is selected." |
|
1691 |
||
1692 |
"/ change below and add any actions as required here ... |
|
1693 |
self warn:'no action for ''saveAs'' available.'. |
|
1694 |
! |
|
1695 |
||
1696 |
openAboutThisApplication |
|
1697 |
"This method was generated by the Browser. |
|
1698 |
It will be invoked when the menu-item 'help-about' is selected." |
|
1699 |
||
1700 |
"/ could open a customized aboutBox here ... |
|
1701 |
super openAboutThisApplication |
|
1702 |
! |
|
1703 |
||
1704 |
openDocumentation |
|
1705 |
"This method was generated by the Browser. |
|
1706 |
It will be invoked when the menu-item 'help-documentation' is selected." |
|
1707 |
||
1708 |
"/ change below as required ... |
|
1709 |
||
1710 |
"/ to open an HTML viewer on some document (under 'doc/online/<language>/' ): |
|
1711 |
HTMLDocumentView openFullOnDocumentationFile:'TOP.html'. |
|
1712 |
||
1713 |
"/ add application-specific help files under the 'doc/online/<language>/help/appName' |
|
1714 |
"/ directory, and open a viewer with: |
|
1715 |
"/ HTMLDocumentView openFullOnDocumentationFile:'help/<MyApplication>/TOP.html'. |
|
1716 |
! ! |
|
1717 |
||
1718 |
!PackageDetails::Scripts class methodsFor:'constant values'! |
|
1719 |
||
1720 |
applicationName |
|
1721 |
^ 'Scripts' asSymbol |
|
1722 |
! ! |
|
1723 |
||
1724 |
!PackageDetails::Scripts class methodsFor:'interface specs'! |
|
1725 |
||
1726 |
windowSpec |
|
1727 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
1728 |
||
1729 |
"Do not manually edit this!! If it is corrupted, |
|
1730 |
the UIPainter may not be able to read the specification." |
|
1731 |
||
1732 |
" |
|
1733 |
UIPainter new openOnClass:Packages::PackageDetails::Scripts andSelector:#windowSpec |
|
1734 |
" |
|
1735 |
||
1736 |
<resource: #canvas> |
|
1737 |
||
1738 |
^ #(#FullSpec |
|
1739 |
#window: |
|
1740 |
#(#WindowSpec |
|
1741 |
#name: 'Packages::PackageDetails::Scripts' |
|
1742 |
#layout: #(#LayoutFrame 204 0 162 0 503 0 461 0) |
|
1743 |
#label: 'Packages::PackageDetails::Scripts' |
|
1744 |
#min: #(#Point 10 10) |
|
1745 |
#max: #(#Point 1024 768) |
|
1746 |
#bounds: #(#Rectangle 204 162 504 462) |
|
1747 |
#menu: #mainMenu |
|
1748 |
#usePreferredExtent: false |
|
1749 |
) |
|
1750 |
#component: |
|
1751 |
#(#SpecCollection |
|
1752 |
#collection: #() |
|
1753 |
) |
|
1754 |
) |
|
1755 |
! ! |
|
1756 |
||
1757 |
!PackageDetails::Scripts class methodsFor:'menu specs'! |
|
1758 |
||
1759 |
mainMenu |
|
1760 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
1761 |
||
1762 |
"Do not manually edit this!! If it is corrupted, |
|
1763 |
the MenuEditor may not be able to read the specification." |
|
1764 |
||
1765 |
" |
|
1766 |
MenuEditor new openOnClass:Packages::PackageDetails::Scripts andSelector:#mainMenu |
|
1767 |
" |
|
1768 |
||
1769 |
<resource: #menu> |
|
1770 |
||
1771 |
^ #(#Menu |
|
1772 |
#( |
|
1773 |
#(#MenuItem |
|
1774 |
#label: 'File' |
|
1775 |
#translateLabel: true |
|
1776 |
#submenu: |
|
1777 |
#(#Menu |
|
1778 |
#( |
|
1779 |
#(#MenuItem |
|
1780 |
#label: 'New' |
|
1781 |
#translateLabel: true |
|
1782 |
#value: #menuNew |
|
1783 |
) |
|
1784 |
#(#MenuItem |
|
1785 |
#label: '-' |
|
1786 |
) |
|
1787 |
#(#MenuItem |
|
1788 |
#label: 'Open...' |
|
1789 |
#translateLabel: true |
|
1790 |
#value: #menuOpen |
|
1791 |
) |
|
1792 |
#(#MenuItem |
|
1793 |
#label: '-' |
|
1794 |
) |
|
1795 |
#(#MenuItem |
|
1796 |
#label: 'Save' |
|
1797 |
#translateLabel: true |
|
1798 |
#value: #menuSave |
|
1799 |
) |
|
1800 |
#(#MenuItem |
|
1801 |
#label: 'Save As...' |
|
1802 |
#translateLabel: true |
|
1803 |
#value: #menuSaveAs |
|
1804 |
) |
|
1805 |
#(#MenuItem |
|
1806 |
#label: '-' |
|
1807 |
) |
|
1808 |
#(#MenuItem |
|
1809 |
#label: 'Exit' |
|
1810 |
#translateLabel: true |
|
1811 |
#value: #closeRequest |
|
1812 |
) |
|
1813 |
) nil |
|
1814 |
nil |
|
1815 |
) |
|
1816 |
) |
|
1817 |
#(#MenuItem |
|
1818 |
#label: 'Help' |
|
1819 |
#translateLabel: true |
|
1820 |
#startGroup: #right |
|
1821 |
#submenu: |
|
1822 |
#(#Menu |
|
1823 |
#( |
|
1824 |
#(#MenuItem |
|
1825 |
#label: 'Documentation' |
|
1826 |
#translateLabel: true |
|
1827 |
#value: #openDocumentation |
|
1828 |
) |
|
1829 |
#(#MenuItem |
|
1830 |
#label: '-' |
|
1831 |
) |
|
1832 |
#(#MenuItem |
|
1833 |
#label: 'About this Application' |
|
1834 |
#translateLabel: true |
|
1835 |
#value: #openAboutThisApplication |
|
1836 |
) |
|
1837 |
) nil |
|
1838 |
nil |
|
1839 |
) |
|
1840 |
) |
|
1841 |
) nil |
|
1842 |
nil |
|
1843 |
) |
|
1844 |
! ! |
|
1845 |
||
1846 |
!PackageDetails::Scripts methodsFor:'accessing'! |
|
1847 |
||
1848 |
declareDependents |
|
1849 |
super declareDependents |
|
1850 |
! ! |
|
1851 |
||
1852 |
!PackageDetails::Scripts methodsFor:'change & update'! |
|
1853 |
||
1854 |
packagesSelectedHolderChanged:aCollection |
|
1268 | 1855 |
self breakPoint:''. |
1227 | 1856 |
! |
1857 |
||
1858 |
validateCanChange:arg |
|
1859 |
! ! |
|
1860 |
||
1861 |
!PackageDetails::Scripts methodsFor:'initialization & release'! |
|
1862 |
||
1863 |
closeDownViews |
|
1864 |
"This is a hook method generated by the Browser. |
|
1865 |
It will be invoked when your app/dialog-window is really closed. |
|
1866 |
See also #closeDownViews, which is invoked before and may suppress the close |
|
1867 |
or ask the user for confirmation." |
|
1868 |
||
1869 |
"/ change the code below as required ... |
|
1870 |
"/ This should cleanup any leftover resources |
|
1871 |
"/ (for example, temporary files) |
|
1872 |
"/ super closeRequest will initiate the closeDown |
|
1873 |
||
1874 |
"/ add your code here |
|
1875 |
||
1876 |
"/ do not remove the one below ... |
|
1877 |
^ super closeDownViews |
|
1878 |
! |
|
1879 |
||
1880 |
closeRequest |
|
1881 |
"This is a hook method generated by the Browser. |
|
1882 |
It will be invoked when your app/dialog-window is about to be |
|
1883 |
closed (this method has a chance to suppress the close). |
|
1884 |
See also #closeDownViews, which is invoked when the close is really done." |
|
1885 |
||
1886 |
"/ change the code below as required ... |
|
1887 |
"/ Closing can be suppressed, by simply returning. |
|
1888 |
"/ The 'super closeRequest' at the end will initiate the real closeDown |
|
1889 |
||
1890 |
("self hasUnsavedChanges" true) ifTrue:[ |
|
1891 |
(self confirm:(resources string:'Close without saving ?')) ifFalse:[ |
|
1892 |
^ self |
|
1893 |
] |
|
1894 |
]. |
|
1895 |
||
1896 |
^ super closeRequest |
|
1897 |
! |
|
1898 |
||
1899 |
postBuildWith:aBuilder |
|
1900 |
"This is a hook method generated by the Browser. |
|
1901 |
It will be invoked during the initialization of your app/dialog, |
|
1902 |
after all of the visual components have been built, |
|
1903 |
but BEFORE the top window is made visible. |
|
1904 |
Add any app-specific actions here (reading files, setting up values etc.) |
|
1905 |
See also #postOpenWith:, which is invoked after opening." |
|
1906 |
||
1907 |
"/ add any code here ... |
|
1908 |
||
1909 |
^ super postBuildWith:aBuilder |
|
1910 |
! |
|
1911 |
||
1912 |
postOpenWith:aBuilder |
|
1913 |
"This is a hook method generated by the Browser. |
|
1914 |
It will be invoked right after the applications window has been opened. |
|
1915 |
Add any app-specific actions here (starting background processes etc.). |
|
1916 |
See also #postBuildWith:, which is invoked before opening." |
|
1917 |
||
1918 |
"/ add any code here ... |
|
1919 |
||
1920 |
^ super postOpenWith:aBuilder |
|
1921 |
! ! |
|
1922 |
||
1923 |
!PackageDetails::Scripts methodsFor:'menu actions'! |
|
1924 |
||
1925 |
menuNew |
|
1926 |
"This method was generated by the Browser. |
|
1927 |
It will be invoked when the menu-item 'new' is selected." |
|
1928 |
||
1929 |
"/ change below and add any actions as required here ... |
|
1930 |
self warn:'no action for ''new'' available.'. |
|
1931 |
! |
|
1932 |
||
1933 |
menuOpen |
|
1934 |
"This method was generated by the Browser. |
|
1935 |
It will be invoked when the menu-item 'open' is selected." |
|
1936 |
||
1937 |
"/ change below and add any actions as required here ... |
|
1938 |
self warn:'no action for ''open'' available.'. |
|
1939 |
! |
|
1940 |
||
1941 |
menuSave |
|
1942 |
"This method was generated by the Browser. |
|
1943 |
It will be invoked when the menu-item 'save' is selected." |
|
1944 |
||
1945 |
"/ change below and add any actions as required here ... |
|
1946 |
self warn:'no action for ''save'' available.'. |
|
1947 |
! |
|
1948 |
||
1949 |
menuSaveAs |
|
1950 |
"This method was generated by the Browser. |
|
1951 |
It will be invoked when the menu-item 'saveAs' is selected." |
|
1952 |
||
1953 |
"/ change below and add any actions as required here ... |
|
1954 |
self warn:'no action for ''saveAs'' available.'. |
|
1955 |
! |
|
1956 |
||
1957 |
openAboutThisApplication |
|
1958 |
"This method was generated by the Browser. |
|
1959 |
It will be invoked when the menu-item 'help-about' is selected." |
|
1960 |
||
1961 |
"/ could open a customized aboutBox here ... |
|
1962 |
super openAboutThisApplication |
|
1963 |
! |
|
1964 |
||
1965 |
openDocumentation |
|
1966 |
"This method was generated by the Browser. |
|
1967 |
It will be invoked when the menu-item 'help-documentation' is selected." |
|
1968 |
||
1969 |
"/ change below as required ... |
|
1970 |
||
1971 |
"/ to open an HTML viewer on some document (under 'doc/online/<language>/' ): |
|
1972 |
HTMLDocumentView openFullOnDocumentationFile:'TOP.html'. |
|
1973 |
||
1974 |
"/ add application-specific help files under the 'doc/online/<language>/help/appName' |
|
1975 |
"/ directory, and open a viewer with: |
|
1976 |
"/ HTMLDocumentView openFullOnDocumentationFile:'help/<MyApplication>/TOP.html'. |
|
1977 |
! ! |
|
1978 |
||
1979 |
!PackageDetails class methodsFor:'documentation'! |
|
1980 |
||
1981 |
version |
|
3011
1997ff6e7e55
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1443
diff
changeset
|
1982 |
^ '$Header: /var/local/cvs/stx/libbasic3/packages/PackageDetails.st,v 1.4 2006-01-10 09:25:03 cg Exp $' |
1227 | 1983 |
! ! |