author | Claus Gittinger <cg@exept.de> |
Mon, 12 Oct 2009 20:19:23 +0200 | |
changeset 2617 | 060a35c37056 |
parent 2616 | 01e597429c47 |
child 2618 | 441ede629ea8 |
permissions | -rw-r--r-- |
2181 | 1 |
"{ Package: 'stx:libtool2' }" |
2 |
||
3 |
"{ NameSpace: Tools }" |
|
4 |
||
2184 | 5 |
ToolApplicationModel subclass:#ObjectModuleInformation |
6 |
instanceVariableNames:'readOnly listOfModuleNames selectedModuleIndexHolder allModules |
|
2183 | 7 |
objectHandles showOthers showCObjects showBuiltIn showMethods |
2253 | 8 |
showClassLibs table1VisibleHolder table2VisibleHolder |
9 |
selectedInfoIndexHolder canBrowseSelectedModule |
|
10 |
canUnloadSelectedModule classNamesShown classInfoShown |
|
2616 | 11 |
vmInfoShown canUnloadSelectedModulesPackage' |
2181 | 12 |
classVariableNames:'' |
13 |
poolDictionaries:'' |
|
14 |
category:'Monitors-ST/X' |
|
15 |
! |
|
16 |
||
17 |
Object subclass:#InfoRow |
|
2183 | 18 |
instanceVariableNames:'name version date value' |
2181 | 19 |
classVariableNames:'' |
20 |
poolDictionaries:'' |
|
21 |
privateIn:ObjectModuleInformation |
|
22 |
! |
|
23 |
||
24 |
!ObjectModuleInformation class methodsFor:'documentation'! |
|
25 |
||
26 |
documentation |
|
27 |
" |
|
28 |
Shows the modules (dll's) of ST/X. |
|
29 |
Both builtIn modules, and dynamically loaded modules are listed. |
|
30 |
||
31 |
[author:] |
|
2253 | 32 |
Claus Gittinger |
2181 | 33 |
" |
34 |
! |
|
35 |
||
36 |
examples |
|
37 |
" |
|
38 |
Starting the application: |
|
39 |
[exBegin] |
|
40 |
ObjectModuleInformation open |
|
41 |
||
42 |
[exEnd] |
|
43 |
" |
|
44 |
! ! |
|
45 |
||
46 |
!ObjectModuleInformation class methodsFor:'info'! |
|
47 |
||
48 |
defaultLabel |
|
2183 | 49 |
^ 'Object Module Info' |
2181 | 50 |
|
51 |
"Created: / 05-10-2007 / 11:56:59 / cg" |
|
52 |
! ! |
|
53 |
||
54 |
!ObjectModuleInformation class methodsFor:'interface specs'! |
|
55 |
||
56 |
windowSpec |
|
57 |
"This resource specification was automatically generated |
|
58 |
by the UIPainter of ST/X." |
|
59 |
||
60 |
"Do not manually edit this!! If it is corrupted, |
|
61 |
the UIPainter may not be able to read the specification." |
|
62 |
||
63 |
" |
|
2183 | 64 |
UIPainter new openOnClass:Tools::ObjectModuleInformation andSelector:#windowSpec |
65 |
Tools::ObjectModuleInformation new openInterface:#windowSpec |
|
66 |
Tools::ObjectModuleInformation open |
|
2181 | 67 |
" |
68 |
||
69 |
<resource: #canvas> |
|
70 |
||
71 |
^ |
|
72 |
#(FullSpec |
|
73 |
name: windowSpec |
|
74 |
window: |
|
75 |
(WindowSpec |
|
76 |
label: 'ST/X Module & Version Information' |
|
77 |
name: 'ST/X Module & Version Information' |
|
78 |
min: (Point 0 0) |
|
79 |
bounds: (Rectangle 0 0 505 567) |
|
80 |
menu: mainMenu |
|
81 |
) |
|
82 |
component: |
|
83 |
(SpecCollection |
|
84 |
collection: ( |
|
85 |
(MenuPanelSpec |
|
86 |
name: 'ToolBar1' |
|
2616 | 87 |
layout: (LayoutFrame 0 0 0 0 0 1 40 0) |
2181 | 88 |
menu: toolbarMenu |
89 |
textDefault: true |
|
90 |
) |
|
91 |
(VariableVerticalPanelSpec |
|
92 |
name: 'VariableVerticalPanel1' |
|
2616 | 93 |
layout: (LayoutFrame 0 0 40 0 0 1 0 1) |
2181 | 94 |
component: |
95 |
(SpecCollection |
|
96 |
collection: ( |
|
97 |
(SequenceViewSpec |
|
98 |
name: 'List1' |
|
99 |
model: selectedModuleIndexHolder |
|
2253 | 100 |
menu: moduleMenu |
2181 | 101 |
hasHorizontalScrollBar: true |
102 |
hasVerticalScrollBar: true |
|
103 |
useIndex: true |
|
104 |
sequenceList: listOfModuleNames |
|
105 |
) |
|
106 |
(ViewSpec |
|
107 |
name: 'Box1' |
|
108 |
component: |
|
109 |
(SpecCollection |
|
110 |
collection: ( |
|
111 |
(LabelSpec |
|
112 |
name: 'Label1' |
|
113 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
114 |
translateLabel: true |
|
115 |
labelChannel: middleLabelHolder |
|
116 |
adjust: left |
|
117 |
) |
|
118 |
(DataSetSpec |
|
119 |
name: 'Table1' |
|
120 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
2183 | 121 |
visibilityChannel: table1VisibleHolder |
2181 | 122 |
model: selectedInfoIndexHolder |
2253 | 123 |
menu: moduleItemMenu |
2181 | 124 |
hasHorizontalScrollBar: true |
125 |
hasVerticalScrollBar: true |
|
2183 | 126 |
dataList: infoTable1ListHolder |
2181 | 127 |
columnHolder: tableColumns |
128 |
separatorOneDColor: (Color 66.999313344015 66.999313344015 66.999313344015) |
|
129 |
) |
|
2183 | 130 |
(DataSetSpec |
131 |
name: 'Table2' |
|
132 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
133 |
initiallyInvisible: true |
|
134 |
visibilityChannel: table2VisibleHolder |
|
135 |
model: selectedInfoIndexHolder |
|
136 |
hasHorizontalScrollBar: true |
|
137 |
hasVerticalScrollBar: true |
|
138 |
dataList: infoTable2ListHolder |
|
139 |
columnHolder: tableColumnsForSingleInfo |
|
140 |
separatorOneDColor: (Color 66.999313344015 66.999313344015 66.999313344015) |
|
141 |
) |
|
2181 | 142 |
) |
143 |
||
144 |
) |
|
145 |
) |
|
146 |
) |
|
147 |
||
148 |
) |
|
149 |
handles: (Any 0.35195530726257 1.0) |
|
150 |
) |
|
151 |
) |
|
152 |
||
153 |
) |
|
154 |
) |
|
155 |
! ! |
|
156 |
||
157 |
!ObjectModuleInformation class methodsFor:'menu specs'! |
|
158 |
||
159 |
mainMenu |
|
160 |
"This resource specification was automatically generated |
|
161 |
by the MenuEditor of ST/X." |
|
162 |
||
163 |
"Do not manually edit this!! If it is corrupted, |
|
164 |
the MenuEditor may not be able to read the specification." |
|
165 |
||
166 |
" |
|
2183 | 167 |
MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#mainMenu |
168 |
(Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation mainMenu)) startUp |
|
2181 | 169 |
" |
170 |
||
171 |
<resource: #menu> |
|
172 |
||
173 |
^ |
|
174 |
#(Menu |
|
175 |
( |
|
176 |
(MenuItem |
|
177 |
label: 'File' |
|
178 |
translateLabel: true |
|
179 |
submenu: |
|
180 |
(Menu |
|
181 |
( |
|
182 |
(MenuItem |
|
183 |
label: 'Exit' |
|
184 |
itemValue: closeRequest |
|
185 |
translateLabel: true |
|
186 |
) |
|
187 |
) |
|
188 |
nil |
|
189 |
nil |
|
190 |
) |
|
191 |
) |
|
192 |
(MenuItem |
|
193 |
label: 'View' |
|
194 |
translateLabel: true |
|
195 |
submenu: |
|
196 |
(Menu |
|
197 |
( |
|
198 |
(MenuItem |
|
199 |
label: 'Builtin' |
|
200 |
translateLabel: true |
|
2183 | 201 |
hideMenuOnActivated: false |
2181 | 202 |
indication: showBuiltIn |
203 |
) |
|
204 |
(MenuItem |
|
205 |
label: 'Class Libraries' |
|
206 |
translateLabel: true |
|
2183 | 207 |
hideMenuOnActivated: false |
2181 | 208 |
indication: showClassLibs |
209 |
) |
|
210 |
(MenuItem |
|
211 |
label: 'Methods' |
|
212 |
translateLabel: true |
|
2183 | 213 |
hideMenuOnActivated: false |
2181 | 214 |
indication: showMethods |
215 |
) |
|
216 |
(MenuItem |
|
217 |
label: 'C-Objects' |
|
218 |
translateLabel: true |
|
2183 | 219 |
hideMenuOnActivated: false |
2181 | 220 |
indication: showCObjects |
221 |
) |
|
222 |
(MenuItem |
|
223 |
label: 'Others' |
|
224 |
translateLabel: true |
|
2183 | 225 |
hideMenuOnActivated: false |
2181 | 226 |
indication: showOthers |
227 |
) |
|
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
228 |
(MenuItem |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
229 |
label: '-' |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
230 |
) |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
231 |
(MenuItem |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
232 |
label: 'Update' |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
233 |
itemValue: menuUpdateModuleList |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
234 |
translateLabel: true |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
235 |
) |
2181 | 236 |
) |
237 |
nil |
|
238 |
nil |
|
239 |
) |
|
240 |
) |
|
241 |
(MenuItem |
|
242 |
label: 'Module' |
|
243 |
translateLabel: true |
|
244 |
submenu: |
|
245 |
(Menu |
|
246 |
( |
|
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
247 |
(MenuItem |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
248 |
enabled: canBrowseSelectedModule |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
249 |
label: 'Browse' |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
250 |
itemValue: browseModule |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
251 |
translateLabel: true |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
252 |
) |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
253 |
(MenuItem |
2253 | 254 |
enabled: canCopyClassNameList |
255 |
label: 'Copy Version Info to Clipboard' |
|
256 |
itemValue: copyClassOrVMNameList |
|
257 |
translateLabel: true |
|
258 |
) |
|
2181 | 259 |
(MenuItem |
2253 | 260 |
label: '-' |
261 |
) |
|
262 |
(MenuItem |
|
2616 | 263 |
enabled: canUnloadSelectedModulesPackage |
264 |
label: 'Unload Package' |
|
265 |
itemValue: unloadSelectedModulesPackage |
|
2181 | 266 |
translateLabel: true |
267 |
) |
|
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
268 |
(MenuItem |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
269 |
enabled: canUnloadSelectedModule |
2616 | 270 |
label: 'Remove Classes && Unload DLL' |
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
271 |
itemValue: unloadSelectedModuleAndRemoveClasses |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
272 |
translateLabel: true |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
273 |
) |
2616 | 274 |
(MenuItem |
275 |
enabled: canUnloadSelectedModule |
|
276 |
label: 'Unload DLL' |
|
277 |
itemValue: unloadSelectedModule |
|
278 |
translateLabel: true |
|
279 |
) |
|
2181 | 280 |
) |
281 |
nil |
|
282 |
nil |
|
283 |
) |
|
284 |
) |
|
285 |
(MenuItem |
|
286 |
label: 'Help' |
|
287 |
translateLabel: true |
|
288 |
startGroup: conditionalRight |
|
289 |
submenu: |
|
290 |
(Menu |
|
291 |
( |
|
292 |
(MenuItem |
|
293 |
label: 'Documentation' |
|
294 |
itemValue: openDocumentation |
|
295 |
translateLabel: true |
|
296 |
) |
|
297 |
(MenuItem |
|
298 |
label: '-' |
|
299 |
) |
|
300 |
(MenuItem |
|
301 |
label: 'About this Application...' |
|
302 |
itemValue: openAboutThisApplication |
|
303 |
translateLabel: true |
|
304 |
) |
|
305 |
) |
|
306 |
nil |
|
307 |
nil |
|
308 |
) |
|
309 |
) |
|
310 |
) |
|
311 |
nil |
|
312 |
nil |
|
313 |
) |
|
2253 | 314 |
! |
315 |
||
316 |
moduleItemMenu |
|
317 |
"This resource specification was automatically generated |
|
318 |
by the MenuEditor of ST/X." |
|
319 |
||
320 |
"Do not manually edit this!! If it is corrupted, |
|
321 |
the MenuEditor may not be able to read the specification." |
|
322 |
||
323 |
" |
|
324 |
MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#moduleItemMenu |
|
325 |
(Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation moduleItemMenu)) startUp |
|
326 |
" |
|
327 |
||
328 |
<resource: #menu> |
|
329 |
||
330 |
^ |
|
331 |
#(Menu |
|
332 |
( |
|
333 |
(MenuItem |
|
334 |
enabled: canBrowseSelectedClass |
|
335 |
label: 'Browse' |
|
336 |
itemValue: browseClass |
|
337 |
translateLabel: true |
|
338 |
) |
|
339 |
(MenuItem |
|
340 |
label: '-' |
|
341 |
) |
|
342 |
(MenuItem |
|
343 |
enabled: canCopyClassNameList |
|
344 |
label: 'Copy Version Info to Clipboard' |
|
345 |
itemValue: copyClassOrVMNameList |
|
346 |
translateLabel: true |
|
347 |
) |
|
348 |
) |
|
349 |
nil |
|
350 |
nil |
|
351 |
) |
|
352 |
! |
|
353 |
||
354 |
moduleMenu |
|
355 |
"This resource specification was automatically generated |
|
356 |
by the MenuEditor of ST/X." |
|
357 |
||
358 |
"Do not manually edit this!! If it is corrupted, |
|
359 |
the MenuEditor may not be able to read the specification." |
|
360 |
||
361 |
" |
|
362 |
MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#moduleMenu |
|
363 |
(Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation moduleMenu)) startUp |
|
364 |
" |
|
365 |
||
366 |
<resource: #menu> |
|
367 |
||
368 |
^ |
|
369 |
#(Menu |
|
370 |
( |
|
371 |
(MenuItem |
|
372 |
enabled: canBrowseSelectedModule |
|
373 |
label: 'Browse' |
|
374 |
itemValue: browseModule |
|
375 |
translateLabel: true |
|
376 |
) |
|
377 |
(MenuItem |
|
378 |
enabled: canCopyClassNameList |
|
379 |
label: 'Copy Version Info to Clipboard' |
|
380 |
itemValue: copyClassOrVMNameList |
|
381 |
translateLabel: true |
|
382 |
) |
|
383 |
(MenuItem |
|
384 |
label: '-' |
|
385 |
) |
|
386 |
(MenuItem |
|
2616 | 387 |
enabled: canUnloadSelectedModulesPackage |
388 |
label: 'Unload Package' |
|
389 |
itemValue: unloadSelectedModulesPackage |
|
390 |
translateLabel: true |
|
391 |
) |
|
392 |
(MenuItem |
|
2253 | 393 |
enabled: canUnloadSelectedModule |
2616 | 394 |
label: 'Remove Classes && Unload DLL' |
2253 | 395 |
itemValue: unloadSelectedModuleAndRemoveClasses |
396 |
translateLabel: true |
|
397 |
) |
|
398 |
(MenuItem |
|
399 |
enabled: canUnloadSelectedModule |
|
2616 | 400 |
label: 'Unload DLL' |
2253 | 401 |
itemValue: unloadSelectedModule |
402 |
translateLabel: true |
|
403 |
) |
|
404 |
) |
|
405 |
nil |
|
406 |
nil |
|
407 |
) |
|
2616 | 408 |
! |
409 |
||
410 |
toolbarMenu |
|
411 |
"This resource specification was automatically generated |
|
412 |
by the MenuEditor of ST/X." |
|
413 |
||
414 |
"Do not manually edit this!! If it is corrupted, |
|
415 |
the MenuEditor may not be able to read the specification." |
|
416 |
||
417 |
" |
|
418 |
MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#toolbarMenu |
|
419 |
(Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation toolbarMenu)) startUp |
|
420 |
" |
|
421 |
||
422 |
<resource: #menu> |
|
423 |
||
424 |
^ |
|
425 |
#(Menu |
|
426 |
( |
|
427 |
(MenuItem |
|
428 |
enabled: canBrowseSelectedModule |
|
2617 | 429 |
label: 'Browse the Selected Module''s Classes' |
2616 | 430 |
itemValue: browseModule |
431 |
translateLabel: true |
|
432 |
isButton: true |
|
433 |
labelImage: (ResourceRetriever ToolbarIconLibrary systemBrowser24x24Icon2) |
|
434 |
) |
|
435 |
) |
|
436 |
nil |
|
437 |
nil |
|
438 |
) |
|
2181 | 439 |
! ! |
440 |
||
441 |
!ObjectModuleInformation class methodsFor:'tableColumns specs'! |
|
442 |
||
443 |
tableColumns |
|
444 |
"This resource specification was automatically generated |
|
445 |
by the DataSetBuilder of ST/X." |
|
446 |
||
447 |
"Do not manually edit this!! If it is corrupted, |
|
448 |
the DataSetBuilder may not be able to read the specification." |
|
449 |
||
450 |
" |
|
451 |
DataSetBuilder new openOnClass:ObjectModuleInformation andSelector:#tableColumns |
|
452 |
" |
|
453 |
||
454 |
<resource: #tableColumns> |
|
455 |
||
456 |
^#( |
|
457 |
(DataSetColumnSpec |
|
458 |
label: 'Name' |
|
459 |
activeHelpKey: '' |
|
460 |
labelButtonType: Button |
|
461 |
width: 0.5 |
|
462 |
model: name |
|
463 |
canSelect: false |
|
464 |
) |
|
465 |
(DataSetColumnSpec |
|
466 |
label: 'Version' |
|
467 |
activeHelpKey: '' |
|
468 |
labelButtonType: Button |
|
469 |
model: version |
|
470 |
canSelect: false |
|
471 |
) |
|
472 |
(DataSetColumnSpec |
|
473 |
label: 'Date' |
|
474 |
activeHelpKey: '' |
|
475 |
labelButtonType: Button |
|
476 |
model: date |
|
477 |
canSelect: false |
|
478 |
) |
|
479 |
) |
|
480 |
||
2183 | 481 |
! |
482 |
||
483 |
tableColumnsForSingleInfo |
|
484 |
"This resource specification was automatically generated |
|
485 |
by the DataSetBuilder of ST/X." |
|
486 |
||
487 |
"Do not manually edit this!! If it is corrupted, |
|
488 |
the DataSetBuilder may not be able to read the specification." |
|
489 |
||
490 |
" |
|
491 |
DataSetBuilder new openOnClass:Tools::ObjectModuleInformation andSelector:#tableColumnsForSingleInfo |
|
492 |
" |
|
493 |
||
494 |
<resource: #tableColumns> |
|
495 |
||
496 |
^#( |
|
497 |
(DataSetColumnSpec |
|
498 |
label: '' |
|
499 |
activeHelpKey: '' |
|
500 |
labelButtonType: None |
|
501 |
width: 0.3 |
|
502 |
model: name |
|
503 |
canSelect: false |
|
504 |
) |
|
505 |
(DataSetColumnSpec |
|
506 |
label: '' |
|
507 |
activeHelpKey: '' |
|
508 |
labelButtonType: None |
|
509 |
model: value |
|
510 |
canSelect: false |
|
511 |
) |
|
512 |
) |
|
513 |
||
2181 | 514 |
! ! |
515 |
||
516 |
!ObjectModuleInformation methodsFor:'aspects'! |
|
517 |
||
2253 | 518 |
canBrowseSelectedClass |
519 |
^ [classNamesShown notEmptyOrNil |
|
520 |
and:[ self selectedInfoIndex notNil |
|
521 |
and:[ self selectedInfoIndex ~~ 0 ]]] |
|
522 |
||
523 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
524 |
! |
|
525 |
||
526 |
canBrowseSelectedModule |
|
527 |
canBrowseSelectedModule isNil ifTrue:[ |
|
528 |
canBrowseSelectedModule := false asValue |
|
529 |
]. |
|
530 |
^ canBrowseSelectedModule. |
|
531 |
||
532 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
533 |
! |
|
534 |
||
535 |
canCopyClassNameList |
|
536 |
^ [table1VisibleHolder value |
|
537 |
and:[classInfoShown notEmptyOrNil or:[vmInfoShown notEmptyOrNil] ]] |
|
538 |
||
539 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
540 |
! |
|
541 |
||
542 |
canUnloadSelectedModule |
|
543 |
canUnloadSelectedModule isNil ifTrue:[ |
|
544 |
canUnloadSelectedModule := false asValue |
|
545 |
]. |
|
546 |
^ canUnloadSelectedModule. |
|
547 |
||
548 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
549 |
! |
|
550 |
||
2616 | 551 |
canUnloadSelectedModulesPackage |
552 |
canUnloadSelectedModulesPackage isNil ifTrue:[ |
|
553 |
canUnloadSelectedModulesPackage := false asValue |
|
554 |
]. |
|
555 |
^ canUnloadSelectedModulesPackage. |
|
556 |
! |
|
557 |
||
2183 | 558 |
infoTable1ListHolder |
559 |
^ builder valueAspectFor:#'infoTable1ListHolder' initialValue:#() |
|
2181 | 560 |
|
2183 | 561 |
"Created: / 05-10-2007 / 12:48:06 / cg" |
562 |
! |
|
563 |
||
564 |
infoTable2ListHolder |
|
565 |
^ builder valueAspectFor:#'infoTable2ListHolder' initialValue:#() |
|
566 |
||
567 |
"Created: / 05-10-2007 / 12:48:10 / cg" |
|
2181 | 568 |
! |
569 |
||
570 |
listOfModuleNames |
|
571 |
listOfModuleNames isNil ifTrue:[ |
|
572 |
listOfModuleNames := List new. |
|
573 |
]. |
|
574 |
^ listOfModuleNames. |
|
575 |
||
576 |
"Modified: / 05-10-2007 / 10:49:19 / cg" |
|
577 |
! |
|
578 |
||
579 |
middleLabelHolder |
|
580 |
^ builder valueAspectFor:#'middleLabelHolder' initialValue:'' |
|
581 |
||
582 |
"Created: / 05-10-2007 / 11:05:08 / cg" |
|
583 |
! |
|
584 |
||
2184 | 585 |
notReadOnly |
586 |
^ self readOnly not |
|
587 |
||
588 |
"Created: / 05-10-2007 / 13:06:00 / cg" |
|
589 |
! |
|
590 |
||
591 |
readOnly |
|
592 |
^ readOnly ? false |
|
593 |
||
594 |
"Created: / 05-10-2007 / 13:05:51 / cg" |
|
595 |
! |
|
596 |
||
2253 | 597 |
readOnly:aBoolean |
598 |
readOnly := aBoolean |
|
599 |
||
600 |
"Created: / 05-10-2007 / 13:05:51 / cg" |
|
601 |
! |
|
602 |
||
603 |
selectedInfoIndex |
|
604 |
|sel| |
|
605 |
||
606 |
sel := self selectedInfoIndexHolder value. |
|
607 |
^ sel |
|
608 |
! |
|
609 |
||
610 |
selectedInfoIndexHolder |
|
611 |
selectedInfoIndexHolder isNil ifTrue:[ |
|
612 |
selectedInfoIndexHolder := ValueHolder new. |
|
613 |
selectedInfoIndexHolder onChangeSend:#selectedInfoIndexChanged to:self. |
|
614 |
]. |
|
615 |
^ selectedInfoIndexHolder. |
|
616 |
||
617 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
618 |
! |
|
619 |
||
620 |
selectedModuleIndex |
|
621 |
|sel| |
|
622 |
||
623 |
sel := self selectedModuleIndexHolder value. |
|
624 |
^ sel |
|
625 |
! |
|
626 |
||
2181 | 627 |
selectedModuleIndexHolder |
628 |
selectedModuleIndexHolder isNil ifTrue:[ |
|
629 |
selectedModuleIndexHolder := ValueHolder new. |
|
630 |
selectedModuleIndexHolder onChangeSend:#selectedModuleIndexChanged to:self. |
|
631 |
]. |
|
632 |
^ selectedModuleIndexHolder. |
|
633 |
||
634 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
635 |
! |
|
636 |
||
637 |
showBuiltIn |
|
2183 | 638 |
showBuiltIn isNil ifTrue:[ |
639 |
showBuiltIn := true asValue. |
|
640 |
showBuiltIn onChangeSend:#filterChanged to:self. |
|
641 |
]. |
|
642 |
^ showBuiltIn |
|
2181 | 643 |
|
2183 | 644 |
"Modified: / 05-10-2007 / 12:43:23 / cg" |
2181 | 645 |
! |
646 |
||
647 |
showCObjects |
|
2183 | 648 |
showCObjects isNil ifTrue:[ |
649 |
showCObjects := true asValue. |
|
650 |
showCObjects onChangeSend:#filterChanged to:self. |
|
651 |
]. |
|
652 |
^ showCObjects |
|
2181 | 653 |
|
2183 | 654 |
"Modified: / 05-10-2007 / 12:43:16 / cg" |
2181 | 655 |
! |
656 |
||
657 |
showClassLibs |
|
2183 | 658 |
showClassLibs isNil ifTrue:[ |
659 |
showClassLibs := true asValue. |
|
660 |
showClassLibs onChangeSend:#filterChanged to:self. |
|
661 |
]. |
|
662 |
^ showClassLibs |
|
2181 | 663 |
|
2183 | 664 |
"Modified: / 05-10-2007 / 12:43:10 / cg" |
2181 | 665 |
! |
666 |
||
667 |
showMethods |
|
2183 | 668 |
showMethods isNil ifTrue:[ |
669 |
showMethods := true asValue. |
|
670 |
showMethods onChangeSend:#filterChanged to:self. |
|
671 |
]. |
|
672 |
^ showMethods |
|
2181 | 673 |
|
2183 | 674 |
"Modified: / 05-10-2007 / 12:43:02 / cg" |
2181 | 675 |
! |
676 |
||
677 |
showOthers |
|
2183 | 678 |
showOthers isNil ifTrue:[ |
679 |
showOthers := true asValue. |
|
680 |
showOthers onChangeSend:#filterChanged to:self. |
|
681 |
]. |
|
682 |
^ showOthers |
|
683 |
||
684 |
"Modified: / 05-10-2007 / 12:42:54 / cg" |
|
685 |
! |
|
2181 | 686 |
|
2183 | 687 |
table1VisibleHolder |
688 |
table1VisibleHolder isNil ifTrue:[ |
|
689 |
table1VisibleHolder := true asValue. |
|
690 |
]. |
|
691 |
^ table1VisibleHolder. |
|
692 |
||
693 |
"Modified: / 05-10-2007 / 12:53:05 / cg" |
|
694 |
! |
|
695 |
||
696 |
table2VisibleHolder |
|
697 |
table2VisibleHolder isNil ifTrue:[ |
|
698 |
table2VisibleHolder := false asValue. |
|
699 |
]. |
|
700 |
^ table2VisibleHolder. |
|
701 |
||
702 |
"Modified: / 05-10-2007 / 12:53:14 / cg" |
|
2181 | 703 |
! ! |
704 |
||
705 |
!ObjectModuleInformation methodsFor:'change & update'! |
|
706 |
||
2253 | 707 |
selectedInfoIndexChanged |
708 |
! |
|
709 |
||
710 |
selectedModule |
|
711 |
|sel| |
|
712 |
||
713 |
sel := self selectedModuleIndex. |
|
714 |
sel isNil ifTrue:[^ nil]. |
|
715 |
^ objectHandles at:sel. |
|
716 |
! |
|
2181 | 717 |
|
2253 | 718 |
selectedModuleIndexChanged |
719 |
|module info| |
|
720 |
||
721 |
info := self selectedModuleInfo. |
|
722 |
module := self selectedModule. |
|
723 |
||
724 |
self canBrowseSelectedModule value:(info notNil and:[info ~~ #VM and:[module notNil]]). |
|
2343
20eee34c4c8b
changed #selectedModuleIndexChanged
Claus Gittinger <cg@exept.de>
parents:
2254
diff
changeset
|
725 |
self canUnloadSelectedModule value:(self readOnly not and:[info ~~ #VM and:[info notNil and:[info dynamic]]]). |
2253 | 726 |
|
727 |
classNamesShown := nil. |
|
728 |
classInfoShown := nil. |
|
729 |
vmInfoShown := nil. |
|
2181 | 730 |
|
731 |
info isNil ifTrue:[ |
|
732 |
"/ selected a method, cObject or unknown |
|
2253 | 733 |
self showInfoForNonClassLib:(self selectedModuleIndex). |
2181 | 734 |
^ self. |
735 |
]. |
|
736 |
info == #VM ifTrue:[ |
|
737 |
"/ selected the pseudo entry for the VM itself |
|
738 |
self showInfoForVM. |
|
739 |
^ self. |
|
740 |
]. |
|
741 |
"/ selected a class-library package |
|
742 |
self showInfoForClassLib:info. |
|
743 |
||
2183 | 744 |
"Modified: / 05-10-2007 / 12:56:13 / cg" |
2181 | 745 |
! |
746 |
||
2253 | 747 |
selectedModuleInfo |
748 |
|sel info| |
|
749 |
||
750 |
sel := self selectedModuleIndex. |
|
751 |
sel notNil ifTrue:[ |
|
752 |
(self showClassLibs value or:[self showBuiltIn value]) ifTrue:[ |
|
753 |
info := allModules at:sel ifAbsent:nil. |
|
754 |
]. |
|
755 |
]. |
|
756 |
^ info |
|
757 |
! |
|
758 |
||
2181 | 759 |
showInfoForClassLib:info |
2616 | 760 |
" selected a lib-package; fill bottom list with class-info " |
761 |
||
762 |
|rows libraryName defClassName libraryDefinition mgr defClassNames| |
|
763 |
||
764 |
self middleLabelHolder value:'Contains Components:'. |
|
765 |
||
766 |
"/ try to figure out, what the definitionClass is inside that module. |
|
767 |
"/ in the future, we should always find one there, however, old libs or |
|
768 |
"/ special libraries (hand built) might be without a projectDefinition. |
|
769 |
defClassNames := (info classNames ? #()) |
|
770 |
select:[:nm | |
|
771 |
|cls| |
|
772 |
cls := Smalltalk classNamed:nm. |
|
773 |
cls isBehavior and:[ cls isProjectDefinition ]]. |
|
2181 | 774 |
|
2616 | 775 |
defClassNames size == 1 ifTrue:[ |
776 |
libraryName := defClassNames first |
|
777 |
] ifFalse:[ |
|
778 |
"/ fallback - some heuristics... |
|
779 |
libraryName := info libraryName. |
|
780 |
(libraryName notNil and:[ libraryName startsWith:'lib' ]) ifTrue:[ |
|
781 |
defClassName := libraryName copyFrom:4 |
|
782 |
] ifFalse:[ |
|
783 |
self halt. |
|
784 |
]. |
|
785 |
]. |
|
786 |
defClassName notNil ifTrue:[ |
|
787 |
libraryDefinition := Smalltalk classNamed:defClassName. |
|
788 |
]. |
|
2181 | 789 |
|
2402 | 790 |
classNamesShown := self shownClassNamesFor:info. |
2181 | 791 |
|
2402 | 792 |
rows := classNamesShown collect:[:cName | |
2616 | 793 |
|cls entry rev listEntry revisionInfo versionString dateString| |
2181 | 794 |
|
795 |
listEntry := InfoRow new. |
|
796 |
listEntry name:cName. |
|
797 |
||
798 |
cls := Smalltalk classNamed:cName. |
|
799 |
cls isNil ifTrue:[ |
|
2183 | 800 |
(cName endsWith:'_extensions') ifFalse:[ |
2616 | 801 |
versionString := '(class removed)'. |
802 |
] ifTrue:[ |
|
803 |
libraryDefinition notNil ifTrue:[ |
|
804 |
mgr := libraryDefinition sourceCodeManager. |
|
805 |
versionString := libraryDefinition perform:(mgr nameOfVersionMethodForExtensions) ifNotUnderstood:nil. |
|
806 |
versionString notNil ifTrue:[ |
|
807 |
versionString := '(bin: ',(mgr revisionInfoFromString:versionString) revision,')'. |
|
808 |
] |
|
809 |
]. |
|
810 |
]. |
|
2181 | 811 |
] ifFalse:[ |
812 |
rev := cls binaryRevision. |
|
813 |
rev notNil ifTrue:[ |
|
814 |
cls isLoaded ifFalse:[ |
|
815 |
entry := '(stub for: ' , rev. |
|
816 |
] ifTrue:[ |
|
817 |
entry :='(bin: ' , rev. |
|
818 |
]. |
|
819 |
cls revision ~= rev ifTrue:[ |
|
820 |
entry := entry , ' / src: ' , (cls revision printString) |
|
821 |
]. |
|
822 |
entry := entry , ')'. |
|
2616 | 823 |
versionString := entry |
2181 | 824 |
] ifFalse:[ |
2616 | 825 |
cls revision notNil ifTrue:[ |
826 |
versionString := '(overloaded by: ' , cls revision , ')' |
|
827 |
] |
|
2181 | 828 |
]. |
829 |
revisionInfo := cls revisionInfo. |
|
830 |
revisionInfo notNil ifTrue:[ |
|
2616 | 831 |
dateString := (revisionInfo at:#date) |
2181 | 832 |
]. |
833 |
]. |
|
2616 | 834 |
listEntry version:versionString. |
835 |
listEntry date:dateString |
|
2181 | 836 |
]. |
837 |
||
2253 | 838 |
classInfoShown := rows. |
839 |
||
2183 | 840 |
self infoTable1ListHolder value:rows. |
841 |
self table1VisibleHolder value:true. |
|
842 |
self table2VisibleHolder value:false. |
|
2181 | 843 |
|
2183 | 844 |
"Modified: / 05-10-2007 / 13:03:56 / cg" |
2181 | 845 |
! |
846 |
||
847 |
showInfoForNonClassLib:sel |
|
2616 | 848 |
" selected a method, cObject or unknown " |
2181 | 849 |
|
2183 | 850 |
|module fileName list entry| |
2181 | 851 |
|
2253 | 852 |
sel isNil ifTrue:[ |
853 |
self table1VisibleHolder value:false. |
|
854 |
self table2VisibleHolder value:false. |
|
855 |
^ self. |
|
856 |
]. |
|
857 |
||
2181 | 858 |
module := objectHandles at:sel. |
859 |
fileName := module pathName. |
|
860 |
||
861 |
module isMethodHandle ifTrue:[ |
|
862 |
|method nm entry1 entry2 entry3| |
|
863 |
||
2183 | 864 |
self middleLabelHolder value:'Compiled Method:'. |
2181 | 865 |
|
866 |
(method := module method) isNil ifTrue:[ |
|
867 |
nm := '** removed **'. |
|
868 |
] ifFalse:[ |
|
869 |
"/ menu := PopUpMenu |
|
870 |
"/ labels:#('Inspect' 'Browse') |
|
871 |
"/ selectors:#(inspect browse). |
|
872 |
"/ menu actionAt:#inspect put:[ method inspect ]. |
|
873 |
"/ menu actionAt:#browse put:[ |who| |
|
874 |
"/ who := method who. |
|
875 |
"/ UserPreferences systemBrowserClass |
|
876 |
"/ openInClass:(who methodClass) |
|
877 |
"/ selector:(who methodSelector) |
|
878 |
"/ ]. |
|
879 |
"/ listView1 middleButtonMenu:menu. |
|
880 |
||
881 |
nm := (method whoString) asText emphasizeAllWith:(#color->Color blue). |
|
882 |
]. |
|
883 |
entry1 := InfoRow new. |
|
2183 | 884 |
entry1 name:'Compiled method'; value:nm. |
2181 | 885 |
|
886 |
entry2 := InfoRow new. |
|
2183 | 887 |
entry2 name:'Path'; value:fileName. |
2181 | 888 |
|
889 |
entry3 := InfoRow new. |
|
2183 | 890 |
entry3 name:'Address'; value:('(16r) ' , (method code address hexPrintString leftPaddedTo:8 with:$0)). |
2181 | 891 |
|
2183 | 892 |
self infoTable2ListHolder value:(Array with:entry1 with:entry2 with:entry3). |
893 |
self table1VisibleHolder value:false. |
|
894 |
self table2VisibleHolder value:true. |
|
2181 | 895 |
^ self. |
896 |
]. |
|
897 |
||
898 |
(module isFunctionObjectHandle |
|
899 |
and:[module functions notEmpty]) ifTrue:[ |
|
2183 | 900 |
self middleLabelHolder value:'Functions:'. |
2181 | 901 |
|
902 |
"/ menu := PopUpMenu |
|
903 |
"/ labels:#('Inspect') |
|
904 |
"/ selectors:#(inspect). |
|
905 |
"/ menu actionAt:#inspect put:[ module functions inspect ]. |
|
906 |
"/ listView1 middleButtonMenu:menu. |
|
907 |
"/ |
|
908 |
list := (module functions select:[:f | f notNil]) |
|
909 |
collect:[:f | |entry| |
|
910 |
entry := InfoRow new. |
|
911 |
entry name:(f name asText emphasizeAllWith:(#color->Color blue)). |
|
2183 | 912 |
entry value:('address: (16r) ' , (f code address hexPrintString leftPaddedTo:8 with:$0)). |
2181 | 913 |
entry |
914 |
]. |
|
2183 | 915 |
self infoTable2ListHolder value:list. |
916 |
self table1VisibleHolder value:false. |
|
917 |
self table2VisibleHolder value:true. |
|
2181 | 918 |
^ self. |
919 |
]. |
|
920 |
||
921 |
entry := InfoRow new. |
|
922 |
entry name:'Unknown'. |
|
2183 | 923 |
self infoTable2ListHolder value:(Array with:entry). |
924 |
self table1VisibleHolder value:false. |
|
925 |
self table2VisibleHolder value:true. |
|
2181 | 926 |
|
2183 | 927 |
"Modified: / 05-10-2007 / 13:01:33 / cg" |
2181 | 928 |
! |
929 |
||
930 |
showInfoForVM |
|
2616 | 931 |
" show file versions of vm info in lower view. " |
2181 | 932 |
|
933 |
|l| |
|
934 |
||
2616 | 935 |
self middleLabelHolder value:'Contains Components:'. |
2181 | 936 |
|
937 |
l := (ObjectMemory getVMIdentificationStrings). |
|
938 |
l := l select:[:entry | entry includesString:'$Header']. |
|
939 |
l := l select:[:entry | entry includesString:',v']. |
|
940 |
l := l collect:[:entry | |
|
941 |
|i1 i2 file revision date listEntry| |
|
942 |
||
943 |
listEntry := InfoRow new. |
|
944 |
||
945 |
i1 := entry indexOfSubCollection:'librun'. |
|
946 |
i1 ~~ 0 ifTrue:[ |
|
947 |
i2 := entry indexOfSubCollection:',v' startingAt:i1. |
|
948 |
i2 ~~ 0 ifTrue:[ |
|
949 |
file := entry copyFrom:i1+7 to:(i2-1). |
|
950 |
listEntry name:file. |
|
951 |
||
952 |
i1 := i2+3. |
|
953 |
i2 := entry indexOfSeparatorStartingAt:i1. |
|
954 |
revision := entry copyFrom:i1 to:(i2-1). |
|
955 |
listEntry version:revision. |
|
956 |
||
957 |
i1 := i2+1. |
|
958 |
i2 := entry indexOfSeparatorStartingAt:i1. |
|
959 |
date := entry copyFrom:i1 to:(i2-1). |
|
960 |
listEntry date:date. |
|
961 |
]. |
|
962 |
]. |
|
963 |
listEntry. |
|
964 |
]. |
|
2253 | 965 |
|
966 |
vmInfoShown := l. |
|
2183 | 967 |
self infoTable1ListHolder value:l. |
968 |
self table1VisibleHolder value:true. |
|
969 |
self table2VisibleHolder value:false. |
|
2181 | 970 |
|
971 |
"/ readOnly ifFalse:[ |
|
972 |
"/ unloadButton disable. |
|
973 |
"/ unloadAndRemoveButton disable. |
|
974 |
"/ ] |
|
975 |
||
2183 | 976 |
"Modified: / 05-10-2007 / 12:53:44 / cg" |
2402 | 977 |
! |
978 |
||
979 |
shownClassNamesFor:info |
|
980 |
"/ selected a package; fill bottom list with class-info |
|
981 |
||
982 |
|classNames| |
|
983 |
||
984 |
classNames := info classNames asSortedCollection. |
|
985 |
^ classNames |
|
986 |
select:[:cName | |
|
987 |
|cls| |
|
988 |
||
989 |
cls := Smalltalk classNamed:cName. |
|
990 |
cls isNil ifTrue:[ |
|
991 |
true "a removed class" |
|
992 |
] ifFalse:[ |
|
993 |
cls isPrivate not |
|
994 |
]. |
|
995 |
]. |
|
2181 | 996 |
! ! |
997 |
||
998 |
!ObjectModuleInformation methodsFor:'initialization'! |
|
999 |
||
1000 |
postBuildWith:aBuilder |
|
1001 |
|canDoIt| |
|
1002 |
||
1003 |
super postBuildWith:aBuilder. |
|
1004 |
||
1005 |
canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
|
1006 |
self showBuiltIn value:canDoIt. |
|
1007 |
self showCObjects value:canDoIt. |
|
1008 |
self showClassLibs value:canDoIt. |
|
1009 |
self showMethods value:canDoIt. |
|
1010 |
self showOthers value:canDoIt. |
|
1011 |
||
1012 |
self updateModuleList |
|
1013 |
||
1014 |
"Created: / 05-10-2007 / 10:50:27 / cg" |
|
1015 |
! ! |
|
1016 |
||
1017 |
!ObjectModuleInformation methodsFor:'menu actions'! |
|
1018 |
||
2253 | 1019 |
browseClass |
2402 | 1020 |
|module info classNames selectedClassName selectedClass packageID methods| |
2253 | 1021 |
|
1022 |
module := self selectedModule. |
|
1023 |
info := self selectedModuleInfo. |
|
2402 | 1024 |
classNames := (self shownClassNamesFor:info) asSortedCollection. |
2253 | 1025 |
selectedClassName := classNames at:(self selectedInfoIndex). |
1026 |
selectedClass := Smalltalk classNamed:selectedClassName. |
|
1027 |
||
2402 | 1028 |
selectedClass notNil ifTrue:[ |
1029 |
Smalltalk browseInClass:selectedClass. |
|
1030 |
^ self. |
|
1031 |
]. |
|
1032 |
||
1033 |
"/ clicked on an extensions-module ? |
|
1034 |
(selectedClassName endsWith:'_extensions') ifTrue:[ |
|
1035 |
packageID := (selectedClassName copyWithoutLast:('_extensions' size)) asSymbol. |
|
1036 |
methods := Smalltalk allExtensionsForPackage:packageID. |
|
1037 |
(UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID). |
|
2616 | 1038 |
^ self. |
2402 | 1039 |
]. |
1040 |
self halt. |
|
2253 | 1041 |
! |
1042 |
||
1043 |
browseModule |
|
1044 |
|module classes| |
|
1045 |
||
1046 |
module := self selectedModule. |
|
1047 |
classes := module classNames collect:[:nm | Smalltalk classNamed:nm]. |
|
1048 |
UserPreferences systemBrowserClass |
|
1049 |
browseClasses:classes |
|
1050 |
label:(resources string:'Classes in %1' with:module libraryName) |
|
1051 |
! |
|
1052 |
||
1053 |
copyClassOrVMNameList |
|
1054 |
|text| |
|
1055 |
||
1056 |
text := ((classInfoShown ? vmInfoShown)collect:[:eachRow | eachRow infoString]) asStringCollection asString. |
|
1057 |
self window setClipboardText:text. |
|
1058 |
! |
|
1059 |
||
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1060 |
menuUpdateModuleList |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1061 |
self updateModuleList |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1062 |
|
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1063 |
"Modified: / 05-10-2007 / 13:11:45 / cg" |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1064 |
! |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1065 |
|
2181 | 1066 |
openDocumentation |
2184 | 1067 |
self openHTMLDocument: 'tools/misc/TOP.html#MODULEINFO' |
2181 | 1068 |
|
2184 | 1069 |
"Modified: / 05-10-2007 / 13:11:45 / cg" |
2253 | 1070 |
! |
1071 |
||
2254 | 1072 |
unloadSelectedModule |
1073 |
self unloadSelectedModuleRemoveClasses:false |
|
2253 | 1074 |
! |
1075 |
||
2254 | 1076 |
unloadSelectedModuleAndRemoveClasses |
1077 |
self unloadSelectedModuleRemoveClasses:true |
|
2253 | 1078 |
! |
1079 |
||
2254 | 1080 |
unloadSelectedModuleRemoveClasses:doRemoveClasses |
2616 | 1081 |
(Dialog |
1082 |
confirm:'This is a possibly dangerous operation, as the DLL is unloaded without caring for |
|
1083 |
proper package-deinstallation procedures. Please only use this in repair situations and when the |
|
1084 |
regular unloadPackage operation fails. |
|
1085 |
||
1086 |
Continue ?') |
|
1087 |
ifFalse:[ |
|
1088 |
^ self |
|
1089 |
]. |
|
1090 |
||
2253 | 1091 |
self withWaitCursorDo:[ |
1092 |
|info idx handle pathName| |
|
1093 |
||
1094 |
info := self selectedModuleInfo. |
|
2254 | 1095 |
handle := objectHandles at:(self selectedModuleIndex). |
2253 | 1096 |
self selectedModuleIndexHolder value:nil. |
1097 |
||
1098 |
info isNil ifTrue:[ |
|
1099 |
"/ selected a method |
|
1100 |
"/ idx := idx - allModules size. |
|
1101 |
pathName := handle pathName. |
|
1102 |
] ifFalse:[ |
|
1103 |
"/ selected a package |
|
1104 |
pathName := info pathName. |
|
1105 |
]. |
|
1106 |
pathName notNil ifTrue:[ |
|
1107 |
doRemoveClasses ifTrue:[ |
|
1108 |
ObjectFileLoader unloadObjectFileAndRemoveClasses:pathName. |
|
1109 |
] ifFalse:[ |
|
1110 |
ObjectFileLoader unloadObjectFile:pathName. |
|
1111 |
] |
|
1112 |
]. |
|
1113 |
self updateModuleList. |
|
1114 |
] |
|
2181 | 1115 |
! ! |
1116 |
||
1117 |
!ObjectModuleInformation methodsFor:'private'! |
|
1118 |
||
2183 | 1119 |
filterChanged |
1120 |
self updateModuleList |
|
1121 |
||
1122 |
"Created: / 05-10-2007 / 12:43:36 / cg" |
|
1123 |
! |
|
1124 |
||
2181 | 1125 |
updateModuleList |
1126 |
|showClassLibs showBuiltIn showMethods showCObjects showOthers |
|
1127 |
listOfModuleNames allObjects handles| |
|
1128 |
||
1129 |
showClassLibs := self showClassLibs value. |
|
1130 |
showBuiltIn := self showBuiltIn value. |
|
1131 |
showMethods := self showMethods value. |
|
1132 |
showCObjects := self showCObjects value. |
|
1133 |
showOthers := self showOthers value. |
|
1134 |
||
1135 |
listOfModuleNames := OrderedCollection new. |
|
1136 |
handles := OrderedCollection new. |
|
1137 |
||
1138 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
1139 |
||
1140 |
(showClassLibs or:[showBuiltIn]) ifTrue:[ |
|
1141 |
|moduleNames| |
|
1142 |
||
1143 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
|
1144 |
(showBuiltIn and:[showClassLibs]) ifFalse:[ |
|
1145 |
allModules := allModules select: |
|
1146 |
[:i | |
|
1147 |
|wantToSee| |
|
1148 |
||
1149 |
wantToSee := i dynamic. |
|
1150 |
showBuiltIn ifTrue:[ |
|
1151 |
wantToSee := wantToSee not |
|
1152 |
]. |
|
1153 |
wantToSee |
|
1154 |
] |
|
1155 |
]. |
|
1156 |
||
1157 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
|
1158 |
allModules sort:[:a :b | (a id) > (b id)]. |
|
1159 |
moduleNames := allModules collect:[:entry | entry name]. |
|
1160 |
listOfModuleNames addAll:moduleNames. |
|
1161 |
handles addAll:allModules. |
|
1162 |
]. |
|
1163 |
||
1164 |
showMethods ifTrue:[ |
|
1165 |
|methodObjects methodNames| |
|
1166 |
||
1167 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
|
1168 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
|
1169 |
'compiled method - removed' " , ' (in ' , mH pathName , ')' " |
|
1170 |
] ifFalse:[ |
|
1171 |
'compiled method ' , mH method whoString " , ' (in ' , mH pathName , ')' " |
|
1172 |
]. |
|
1173 |
]. |
|
1174 |
listOfModuleNames addAll:methodNames. |
|
1175 |
handles addAll:methodObjects. |
|
1176 |
]. |
|
1177 |
||
1178 |
showCObjects ifTrue:[ |
|
1179 |
|cObjects cObjectNames| |
|
1180 |
||
1181 |
cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray. |
|
1182 |
cObjectNames := cObjects collect:[:entry | entry pathName]. |
|
1183 |
listOfModuleNames addAll:cObjectNames. |
|
1184 |
handles addAll:cObjects. |
|
1185 |
]. |
|
1186 |
||
1187 |
showOthers ifTrue:[ |
|
1188 |
|otherObjects otherObjectNames| |
|
1189 |
||
1190 |
otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle |
|
1191 |
or:[h isMethodHandle |
|
1192 |
or:[h isClassLibHandle]]) not]) asArray. |
|
1193 |
otherObjectNames := otherObjects collect:[:entry | entry pathName]. |
|
1194 |
listOfModuleNames addAll:otherObjectNames. |
|
1195 |
handles addAll:otherObjects. |
|
1196 |
]. |
|
93db2a1edbe6
initial checkin
Claus Gittinger < |