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