author | Claus Gittinger <cg@exept.de> |
Mon, 11 Mar 2013 20:07:35 +0100 | |
changeset 2970 | 6d37e90dab00 |
parent 2957 | 299bc0925dab |
child 2977 | 2f7cc2452dd7 |
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 |
2619 | 12 |
canBrowseSelectedModulesExtensions canUnloadSelectedDLL' |
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 |
|
2619 | 200 |
label: 'Dynamically Loaded ClassLibraries Only' |
2842 | 201 |
itemValue: showOnlyDynamicallyLoadedClassLibraries |
2619 | 202 |
translateLabel: true |
203 |
hideMenuOnActivated: false |
|
204 |
) |
|
205 |
(MenuItem |
|
206 |
label: '-' |
|
207 |
) |
|
208 |
(MenuItem |
|
2181 | 209 |
label: 'Builtin' |
210 |
translateLabel: true |
|
2183 | 211 |
hideMenuOnActivated: false |
2181 | 212 |
indication: showBuiltIn |
213 |
) |
|
214 |
(MenuItem |
|
215 |
label: 'Class Libraries' |
|
216 |
translateLabel: true |
|
2183 | 217 |
hideMenuOnActivated: false |
2181 | 218 |
indication: showClassLibs |
219 |
) |
|
220 |
(MenuItem |
|
221 |
label: 'Methods' |
|
222 |
translateLabel: true |
|
2183 | 223 |
hideMenuOnActivated: false |
2181 | 224 |
indication: showMethods |
225 |
) |
|
226 |
(MenuItem |
|
227 |
label: 'C-Objects' |
|
228 |
translateLabel: true |
|
2183 | 229 |
hideMenuOnActivated: false |
2181 | 230 |
indication: showCObjects |
231 |
) |
|
232 |
(MenuItem |
|
233 |
label: 'Others' |
|
234 |
translateLabel: true |
|
2183 | 235 |
hideMenuOnActivated: false |
2181 | 236 |
indication: showOthers |
237 |
) |
|
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
238 |
(MenuItem |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
239 |
label: '-' |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
240 |
) |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
241 |
(MenuItem |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
242 |
label: 'Update' |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
243 |
itemValue: menuUpdateModuleList |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
244 |
translateLabel: true |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
245 |
) |
2181 | 246 |
) |
247 |
nil |
|
248 |
nil |
|
249 |
) |
|
250 |
) |
|
251 |
(MenuItem |
|
252 |
label: 'Module' |
|
253 |
translateLabel: true |
|
254 |
submenu: |
|
255 |
(Menu |
|
256 |
( |
|
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
257 |
(MenuItem |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
258 |
enabled: canBrowseSelectedModule |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
259 |
label: 'Browse' |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
260 |
itemValue: browseModule |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
261 |
translateLabel: true |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
262 |
) |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
263 |
(MenuItem |
2619 | 264 |
enabled: canBrowseSelectedModulesExtensions |
265 |
label: 'Browse Extensions' |
|
266 |
itemValue: browseModuleExtensions |
|
267 |
translateLabel: true |
|
268 |
) |
|
2842 | 269 |
(MenuItem |
270 |
enabled: canBrowseSelectedModulesProjectDefinition |
|
271 |
label: 'Browse ProjectDefinition' |
|
272 |
itemValue: browseModulesProjectDefinition |
|
273 |
translateLabel: true |
|
274 |
) |
|
275 |
(MenuItem |
|
276 |
label: 'Find a Class...' |
|
277 |
itemValue: findClass |
|
278 |
translateLabel: true |
|
279 |
) |
|
2619 | 280 |
(MenuItem |
281 |
label: '-' |
|
282 |
) |
|
283 |
(MenuItem |
|
2253 | 284 |
enabled: canCopyClassNameList |
285 |
label: 'Copy Version Info to Clipboard' |
|
286 |
itemValue: copyClassOrVMNameList |
|
287 |
translateLabel: true |
|
288 |
) |
|
2181 | 289 |
(MenuItem |
2253 | 290 |
label: '-' |
291 |
) |
|
292 |
(MenuItem |
|
2619 | 293 |
label: 'Load Package...' |
294 |
itemValue: loadPackage |
|
295 |
translateLabel: true |
|
296 |
) |
|
297 |
(MenuItem |
|
298 |
label: '-' |
|
299 |
) |
|
300 |
(MenuItem |
|
2616 | 301 |
enabled: canUnloadSelectedModulesPackage |
2619 | 302 |
label: 'Unload Package...' |
2616 | 303 |
itemValue: unloadSelectedModulesPackage |
2181 | 304 |
translateLabel: true |
305 |
) |
|
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
306 |
(MenuItem |
2619 | 307 |
enabled: canUnloadSelectedDLL |
308 |
label: 'Remove Classes && Unload DLL...' |
|
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
309 |
itemValue: unloadSelectedModuleAndRemoveClasses |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
310 |
translateLabel: true |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
311 |
) |
2616 | 312 |
(MenuItem |
313 |
enabled: canUnloadSelectedModule |
|
2619 | 314 |
label: 'Unload DLL...' |
2616 | 315 |
itemValue: unloadSelectedModule |
316 |
translateLabel: true |
|
317 |
) |
|
2842 | 318 |
(MenuItem |
319 |
label: 'Inspect' |
|
320 |
itemValue: inspectSelectedObject |
|
321 |
translateLabel: true |
|
322 |
) |
|
323 |
(MenuItem |
|
324 |
label: '-' |
|
325 |
) |
|
326 |
(MenuItem |
|
327 |
label: 'Update' |
|
328 |
itemValue: menuUpdateModuleList |
|
329 |
translateLabel: true |
|
330 |
) |
|
2181 | 331 |
) |
332 |
nil |
|
333 |
nil |
|
334 |
) |
|
335 |
) |
|
336 |
(MenuItem |
|
337 |
label: 'Help' |
|
338 |
translateLabel: true |
|
339 |
startGroup: conditionalRight |
|
340 |
submenu: |
|
341 |
(Menu |
|
342 |
( |
|
343 |
(MenuItem |
|
344 |
label: 'Documentation' |
|
345 |
itemValue: openDocumentation |
|
346 |
translateLabel: true |
|
347 |
) |
|
348 |
(MenuItem |
|
349 |
label: '-' |
|
350 |
) |
|
351 |
(MenuItem |
|
352 |
label: 'About this Application...' |
|
353 |
itemValue: openAboutThisApplication |
|
354 |
translateLabel: true |
|
355 |
) |
|
356 |
) |
|
357 |
nil |
|
358 |
nil |
|
359 |
) |
|
360 |
) |
|
361 |
) |
|
362 |
nil |
|
363 |
nil |
|
364 |
) |
|
2253 | 365 |
! |
366 |
||
367 |
moduleItemMenu |
|
368 |
"This resource specification was automatically generated |
|
369 |
by the MenuEditor of ST/X." |
|
370 |
||
371 |
"Do not manually edit this!! If it is corrupted, |
|
372 |
the MenuEditor may not be able to read the specification." |
|
373 |
||
374 |
" |
|
375 |
MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#moduleItemMenu |
|
376 |
(Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation moduleItemMenu)) startUp |
|
377 |
" |
|
378 |
||
379 |
<resource: #menu> |
|
380 |
||
381 |
^ |
|
382 |
#(Menu |
|
383 |
( |
|
2842 | 384 |
(MenuItem |
2253 | 385 |
enabled: canBrowseSelectedClass |
386 |
label: 'Browse' |
|
387 |
itemValue: browseClass |
|
388 |
translateLabel: true |
|
389 |
) |
|
2842 | 390 |
(MenuItem |
2253 | 391 |
label: '-' |
392 |
) |
|
2842 | 393 |
(MenuItem |
2253 | 394 |
enabled: canCopyClassNameList |
395 |
label: 'Copy Version Info to Clipboard' |
|
396 |
itemValue: copyClassOrVMNameList |
|
397 |
translateLabel: true |
|
398 |
) |
|
399 |
) |
|
400 |
nil |
|
401 |
nil |
|
402 |
) |
|
403 |
! |
|
404 |
||
405 |
moduleMenu |
|
406 |
"This resource specification was automatically generated |
|
407 |
by the MenuEditor of ST/X." |
|
408 |
||
409 |
"Do not manually edit this!! If it is corrupted, |
|
410 |
the MenuEditor may not be able to read the specification." |
|
411 |
||
412 |
" |
|
413 |
MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#moduleMenu |
|
414 |
(Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation moduleMenu)) startUp |
|
415 |
" |
|
416 |
||
417 |
<resource: #menu> |
|
418 |
||
419 |
^ |
|
420 |
#(Menu |
|
421 |
( |
|
422 |
(MenuItem |
|
423 |
enabled: canBrowseSelectedModule |
|
424 |
label: 'Browse' |
|
425 |
itemValue: browseModule |
|
426 |
translateLabel: true |
|
427 |
) |
|
2618 | 428 |
(MenuItem |
429 |
enabled: canBrowseSelectedModulesExtensions |
|
430 |
label: 'Browse Extensions' |
|
431 |
itemValue: browseModuleExtensions |
|
432 |
translateLabel: true |
|
433 |
) |
|
2619 | 434 |
(MenuItem |
2763 | 435 |
enabled: canBrowseSelectedModulesProjectDefinition |
436 |
label: 'Browse ProjectDefinition' |
|
437 |
itemValue: browseModulesProjectDefinition |
|
438 |
translateLabel: true |
|
439 |
) |
|
440 |
(MenuItem |
|
2623 | 441 |
label: 'Find a Class...' |
442 |
itemValue: findClass |
|
443 |
translateLabel: true |
|
444 |
) |
|
445 |
(MenuItem |
|
2619 | 446 |
label: '-' |
447 |
) |
|
448 |
(MenuItem |
|
2253 | 449 |
enabled: canCopyClassNameList |
450 |
label: 'Copy Version Info to Clipboard' |
|
451 |
itemValue: copyClassOrVMNameList |
|
452 |
translateLabel: true |
|
453 |
) |
|
454 |
(MenuItem |
|
455 |
label: '-' |
|
456 |
) |
|
457 |
(MenuItem |
|
2616 | 458 |
enabled: canUnloadSelectedModulesPackage |
2619 | 459 |
label: 'Unload Package...' |
2616 | 460 |
itemValue: unloadSelectedModulesPackage |
461 |
translateLabel: true |
|
462 |
) |
|
463 |
(MenuItem |
|
2253 | 464 |
enabled: canUnloadSelectedModule |
2619 | 465 |
label: 'Remove Classes && Unload DLL...' |
2253 | 466 |
itemValue: unloadSelectedModuleAndRemoveClasses |
467 |
translateLabel: true |
|
468 |
) |
|
469 |
(MenuItem |
|
2619 | 470 |
enabled: canUnloadSelectedDLL |
471 |
label: 'Unload DLL...' |
|
2253 | 472 |
itemValue: unloadSelectedModule |
473 |
translateLabel: true |
|
474 |
) |
|
2619 | 475 |
(MenuItem |
2842 | 476 |
label: 'Inspect' |
477 |
itemValue: inspectSelectedObject |
|
478 |
translateLabel: true |
|
479 |
) |
|
480 |
(MenuItem |
|
2619 | 481 |
label: '-' |
482 |
) |
|
483 |
(MenuItem |
|
484 |
label: 'Update' |
|
485 |
itemValue: menuUpdateModuleList |
|
486 |
translateLabel: true |
|
487 |
) |
|
2253 | 488 |
) |
489 |
nil |
|
490 |
nil |
|
491 |
) |
|
2616 | 492 |
! |
493 |
||
494 |
toolbarMenu |
|
495 |
"This resource specification was automatically generated |
|
496 |
by the MenuEditor of ST/X." |
|
497 |
||
498 |
"Do not manually edit this!! If it is corrupted, |
|
499 |
the MenuEditor may not be able to read the specification." |
|
500 |
||
501 |
" |
|
502 |
MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#toolbarMenu |
|
503 |
(Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation toolbarMenu)) startUp |
|
504 |
" |
|
505 |
||
506 |
<resource: #menu> |
|
507 |
||
508 |
^ |
|
509 |
#(Menu |
|
510 |
( |
|
511 |
(MenuItem |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
512 |
label: 'Update' |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
513 |
itemValue: menuUpdateModuleList |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
514 |
translateLabel: true |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
515 |
isButton: true |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
516 |
labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon) |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
517 |
) |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
518 |
(MenuItem |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
519 |
label: '-' |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
520 |
) |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
521 |
(MenuItem |
2616 | 522 |
enabled: canBrowseSelectedModule |
2617 | 523 |
label: 'Browse the Selected Module''s Classes' |
2616 | 524 |
itemValue: browseModule |
525 |
translateLabel: true |
|
526 |
isButton: true |
|
2618 | 527 |
labelImage: (ResourceRetriever ToolbarIconLibrary startSystemBrowserIcon) |
528 |
) |
|
529 |
(MenuItem |
|
530 |
enabled: canBrowseSelectedModulesExtensions |
|
531 |
label: 'Browse the Selected Module''s Extensions' |
|
532 |
itemValue: browseModuleExtensions |
|
533 |
translateLabel: true |
|
534 |
isButton: true |
|
535 |
labelImage: (ResourceRetriever ToolbarIconLibrary browseClassExtensionsIcon) |
|
2616 | 536 |
) |
537 |
) |
|
538 |
nil |
|
539 |
nil |
|
540 |
) |
|
2181 | 541 |
! ! |
542 |
||
543 |
!ObjectModuleInformation class methodsFor:'tableColumns specs'! |
|
544 |
||
545 |
tableColumns |
|
546 |
"This resource specification was automatically generated |
|
547 |
by the DataSetBuilder of ST/X." |
|
548 |
||
549 |
"Do not manually edit this!! If it is corrupted, |
|
550 |
the DataSetBuilder may not be able to read the specification." |
|
551 |
||
552 |
" |
|
553 |
DataSetBuilder new openOnClass:ObjectModuleInformation andSelector:#tableColumns |
|
554 |
" |
|
555 |
||
556 |
<resource: #tableColumns> |
|
557 |
||
558 |
^#( |
|
559 |
(DataSetColumnSpec |
|
560 |
label: 'Name' |
|
561 |
activeHelpKey: '' |
|
562 |
labelButtonType: Button |
|
563 |
width: 0.5 |
|
564 |
model: name |
|
565 |
canSelect: false |
|
566 |
) |
|
567 |
(DataSetColumnSpec |
|
568 |
label: 'Version' |
|
569 |
activeHelpKey: '' |
|
570 |
labelButtonType: Button |
|
571 |
model: version |
|
572 |
canSelect: false |
|
573 |
) |
|
574 |
(DataSetColumnSpec |
|
575 |
label: 'Date' |
|
576 |
activeHelpKey: '' |
|
577 |
labelButtonType: Button |
|
578 |
model: date |
|
579 |
canSelect: false |
|
580 |
) |
|
581 |
) |
|
582 |
||
2183 | 583 |
! |
584 |
||
585 |
tableColumnsForSingleInfo |
|
586 |
"This resource specification was automatically generated |
|
587 |
by the DataSetBuilder of ST/X." |
|
588 |
||
589 |
"Do not manually edit this!! If it is corrupted, |
|
590 |
the DataSetBuilder may not be able to read the specification." |
|
591 |
||
592 |
" |
|
593 |
DataSetBuilder new openOnClass:Tools::ObjectModuleInformation andSelector:#tableColumnsForSingleInfo |
|
594 |
" |
|
595 |
||
596 |
<resource: #tableColumns> |
|
597 |
||
598 |
^#( |
|
599 |
(DataSetColumnSpec |
|
600 |
label: '' |
|
601 |
activeHelpKey: '' |
|
602 |
labelButtonType: None |
|
603 |
width: 0.3 |
|
604 |
model: name |
|
605 |
canSelect: false |
|
606 |
) |
|
607 |
(DataSetColumnSpec |
|
608 |
label: '' |
|
609 |
activeHelpKey: '' |
|
610 |
labelButtonType: None |
|
611 |
model: value |
|
612 |
canSelect: false |
|
613 |
) |
|
614 |
) |
|
615 |
||
2181 | 616 |
! ! |
617 |
||
618 |
!ObjectModuleInformation methodsFor:'aspects'! |
|
619 |
||
2253 | 620 |
canBrowseSelectedClass |
621 |
^ [classNamesShown notEmptyOrNil |
|
622 |
and:[ self selectedInfoIndex notNil |
|
623 |
and:[ self selectedInfoIndex ~~ 0 ]]] |
|
624 |
||
625 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
626 |
! |
|
627 |
||
628 |
canBrowseSelectedModule |
|
629 |
canBrowseSelectedModule isNil ifTrue:[ |
|
630 |
canBrowseSelectedModule := false asValue |
|
631 |
]. |
|
632 |
^ canBrowseSelectedModule. |
|
633 |
||
634 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
635 |
! |
|
636 |
||
2618 | 637 |
canBrowseSelectedModulesExtensions |
638 |
canBrowseSelectedModulesExtensions isNil ifTrue:[ |
|
639 |
canBrowseSelectedModulesExtensions := false asValue |
|
640 |
]. |
|
641 |
^ canBrowseSelectedModulesExtensions. |
|
642 |
||
643 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
644 |
! |
|
645 |
||
2763 | 646 |
canBrowseSelectedModulesProjectDefinition |
647 |
^ [ self projectDefinitionClassOfSelectedModule notNil ] |
|
648 |
! |
|
649 |
||
2253 | 650 |
canCopyClassNameList |
651 |
^ [table1VisibleHolder value |
|
652 |
and:[classInfoShown notEmptyOrNil or:[vmInfoShown notEmptyOrNil] ]] |
|
653 |
||
654 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
655 |
! |
|
656 |
||
2619 | 657 |
canUnloadSelectedDLL |
658 |
canUnloadSelectedDLL isNil ifTrue:[ |
|
659 |
canUnloadSelectedDLL := false asValue |
|
660 |
]. |
|
661 |
^ canUnloadSelectedDLL. |
|
662 |
||
663 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
664 |
! |
|
665 |
||
2253 | 666 |
canUnloadSelectedModule |
667 |
canUnloadSelectedModule isNil ifTrue:[ |
|
668 |
canUnloadSelectedModule := false asValue |
|
669 |
]. |
|
670 |
^ canUnloadSelectedModule. |
|
671 |
||
672 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
673 |
! |
|
674 |
||
2616 | 675 |
canUnloadSelectedModulesPackage |
676 |
canUnloadSelectedModulesPackage isNil ifTrue:[ |
|
677 |
canUnloadSelectedModulesPackage := false asValue |
|
678 |
]. |
|
679 |
^ canUnloadSelectedModulesPackage. |
|
680 |
! |
|
681 |
||
2183 | 682 |
infoTable1ListHolder |
683 |
^ builder valueAspectFor:#'infoTable1ListHolder' initialValue:#() |
|
2181 | 684 |
|
2183 | 685 |
"Created: / 05-10-2007 / 12:48:06 / cg" |
686 |
! |
|
687 |
||
688 |
infoTable2ListHolder |
|
689 |
^ builder valueAspectFor:#'infoTable2ListHolder' initialValue:#() |
|
690 |
||
691 |
"Created: / 05-10-2007 / 12:48:10 / cg" |
|
2181 | 692 |
! |
693 |
||
694 |
listOfModuleNames |
|
695 |
listOfModuleNames isNil ifTrue:[ |
|
696 |
listOfModuleNames := List new. |
|
697 |
]. |
|
698 |
^ listOfModuleNames. |
|
699 |
||
700 |
"Modified: / 05-10-2007 / 10:49:19 / cg" |
|
701 |
! |
|
702 |
||
703 |
middleLabelHolder |
|
704 |
^ builder valueAspectFor:#'middleLabelHolder' initialValue:'' |
|
705 |
||
706 |
"Created: / 05-10-2007 / 11:05:08 / cg" |
|
707 |
! |
|
708 |
||
2184 | 709 |
notReadOnly |
710 |
^ self readOnly not |
|
711 |
||
712 |
"Created: / 05-10-2007 / 13:06:00 / cg" |
|
713 |
! |
|
714 |
||
715 |
readOnly |
|
716 |
^ readOnly ? false |
|
717 |
||
718 |
"Created: / 05-10-2007 / 13:05:51 / cg" |
|
719 |
! |
|
720 |
||
2253 | 721 |
readOnly:aBoolean |
722 |
readOnly := aBoolean |
|
723 |
||
724 |
"Created: / 05-10-2007 / 13:05:51 / cg" |
|
725 |
! |
|
726 |
||
727 |
selectedInfoIndex |
|
728 |
|sel| |
|
729 |
||
730 |
sel := self selectedInfoIndexHolder value. |
|
731 |
^ sel |
|
732 |
! |
|
733 |
||
734 |
selectedInfoIndexHolder |
|
735 |
selectedInfoIndexHolder isNil ifTrue:[ |
|
736 |
selectedInfoIndexHolder := ValueHolder new. |
|
737 |
selectedInfoIndexHolder onChangeSend:#selectedInfoIndexChanged to:self. |
|
738 |
]. |
|
739 |
^ selectedInfoIndexHolder. |
|
740 |
||
741 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
742 |
! |
|
743 |
||
744 |
selectedModuleIndex |
|
745 |
|sel| |
|
746 |
||
747 |
sel := self selectedModuleIndexHolder value. |
|
748 |
^ sel |
|
749 |
! |
|
750 |
||
2181 | 751 |
selectedModuleIndexHolder |
752 |
selectedModuleIndexHolder isNil ifTrue:[ |
|
753 |
selectedModuleIndexHolder := ValueHolder new. |
|
754 |
selectedModuleIndexHolder onChangeSend:#selectedModuleIndexChanged to:self. |
|
755 |
]. |
|
756 |
^ selectedModuleIndexHolder. |
|
757 |
||
758 |
"Modified: / 05-10-2007 / 10:51:39 / cg" |
|
759 |
! |
|
760 |
||
761 |
showBuiltIn |
|
2183 | 762 |
showBuiltIn isNil ifTrue:[ |
763 |
showBuiltIn := true asValue. |
|
764 |
showBuiltIn onChangeSend:#filterChanged to:self. |
|
765 |
]. |
|
766 |
^ showBuiltIn |
|
2181 | 767 |
|
2183 | 768 |
"Modified: / 05-10-2007 / 12:43:23 / cg" |
2181 | 769 |
! |
770 |
||
771 |
showCObjects |
|
2183 | 772 |
showCObjects isNil ifTrue:[ |
773 |
showCObjects := true asValue. |
|
774 |
showCObjects onChangeSend:#filterChanged to:self. |
|
775 |
]. |
|
776 |
^ showCObjects |
|
2181 | 777 |
|
2183 | 778 |
"Modified: / 05-10-2007 / 12:43:16 / cg" |
2181 | 779 |
! |
780 |
||
781 |
showClassLibs |
|
2183 | 782 |
showClassLibs isNil ifTrue:[ |
783 |
showClassLibs := true asValue. |
|
784 |
showClassLibs onChangeSend:#filterChanged to:self. |
|
785 |
]. |
|
786 |
^ showClassLibs |
|
2181 | 787 |
|
2183 | 788 |
"Modified: / 05-10-2007 / 12:43:10 / cg" |
2181 | 789 |
! |
790 |
||
791 |
showMethods |
|
2183 | 792 |
showMethods isNil ifTrue:[ |
793 |
showMethods := true asValue. |
|
794 |
showMethods onChangeSend:#filterChanged to:self. |
|
795 |
]. |
|
796 |
^ showMethods |
|
2181 | 797 |
|
2183 | 798 |
"Modified: / 05-10-2007 / 12:43:02 / cg" |
2181 | 799 |
! |
800 |
||
2619 | 801 |
showOnlyDynamicallyLoadedClassLibraries |
802 |
self showBuiltIn value:false withoutNotifying:self. |
|
803 |
self showCObjects value:false withoutNotifying:self. |
|
804 |
self showMethods value:false withoutNotifying:self. |
|
805 |
self showOthers value:false withoutNotifying:self. |
|
806 |
self showClassLibs value:true withoutNotifying:self. |
|
807 |
self filterChanged. |
|
808 |
! |
|
809 |
||
2181 | 810 |
showOthers |
2183 | 811 |
showOthers isNil ifTrue:[ |
812 |
showOthers := true asValue. |
|
813 |
showOthers onChangeSend:#filterChanged to:self. |
|
814 |
]. |
|
815 |
^ showOthers |
|
816 |
||
817 |
"Modified: / 05-10-2007 / 12:42:54 / cg" |
|
818 |
! |
|
2181 | 819 |
|
2183 | 820 |
table1VisibleHolder |
821 |
table1VisibleHolder isNil ifTrue:[ |
|
822 |
table1VisibleHolder := true asValue. |
|
823 |
]. |
|
824 |
^ table1VisibleHolder. |
|
825 |
||
826 |
"Modified: / 05-10-2007 / 12:53:05 / cg" |
|
827 |
! |
|
828 |
||
829 |
table2VisibleHolder |
|
830 |
table2VisibleHolder isNil ifTrue:[ |
|
831 |
table2VisibleHolder := false asValue. |
|
832 |
]. |
|
833 |
^ table2VisibleHolder. |
|
834 |
||
835 |
"Modified: / 05-10-2007 / 12:53:14 / cg" |
|
2181 | 836 |
! ! |
837 |
||
838 |
!ObjectModuleInformation methodsFor:'change & update'! |
|
839 |
||
2618 | 840 |
isExtensionName:nm |
841 |
^ (nm endsWith:'_extensions') |
|
842 |
! |
|
843 |
||
2253 | 844 |
selectedInfoIndexChanged |
845 |
! |
|
846 |
||
847 |
selectedModule |
|
848 |
|sel| |
|
849 |
||
850 |
sel := self selectedModuleIndex. |
|
851 |
sel isNil ifTrue:[^ nil]. |
|
852 |
^ objectHandles at:sel. |
|
853 |
! |
|
2181 | 854 |
|
2253 | 855 |
selectedModuleIndexChanged |
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
856 |
| info | |
2253 | 857 |
|
858 |
info := self selectedModuleInfo. |
|
859 |
||
2619 | 860 |
self canBrowseSelectedModule value:false. |
861 |
self canBrowseSelectedModulesExtensions value:false. |
|
862 |
self canUnloadSelectedDLL value:false. |
|
863 |
self canUnloadSelectedModule value:false. |
|
864 |
self canUnloadSelectedModulesPackage value:false. |
|
2253 | 865 |
|
866 |
classNamesShown := nil. |
|
867 |
classInfoShown := nil. |
|
868 |
vmInfoShown := nil. |
|
2181 | 869 |
|
870 |
info isNil ifTrue:[ |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
871 |
"/ selected a cObject or unknown |
2253 | 872 |
self showInfoForNonClassLib:(self selectedModuleIndex). |
2181 | 873 |
^ self. |
874 |
]. |
|
875 |
info == #VM ifTrue:[ |
|
876 |
"/ selected the pseudo entry for the VM itself |
|
877 |
self showInfoForVM. |
|
878 |
^ self. |
|
879 |
]. |
|
2618 | 880 |
|
2181 | 881 |
"/ selected a class-library package |
882 |
self showInfoForClassLib:info. |
|
883 |
||
2183 | 884 |
"Modified: / 05-10-2007 / 12:56:13 / cg" |
2181 | 885 |
! |
886 |
||
2253 | 887 |
selectedModuleInfo |
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
888 |
|sel| |
2253 | 889 |
|
890 |
sel := self selectedModuleIndex. |
|
891 |
sel notNil ifTrue:[ |
|
892 |
(self showClassLibs value or:[self showBuiltIn value]) ifTrue:[ |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
893 |
^ allModules at:sel ifAbsent:nil. |
2253 | 894 |
]. |
895 |
]. |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
896 |
^ nil |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
897 |
! |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
898 |
|
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
899 |
selectedObjectHandle |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
900 |
|sel| |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
901 |
|
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
902 |
sel := self selectedModuleIndex. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
903 |
sel isNil ifTrue:[^ nil]. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
904 |
^ objectHandles at:sel. |
2253 | 905 |
! |
906 |
||
2181 | 907 |
showInfoForClassLib:info |
2788 | 908 |
"selected a lib-package; fill bottom list with class-info" |
909 |
||
910 |
|rows projectDefinitionClass mgr canUnload canUnloadPackage| |
|
2616 | 911 |
|
2788 | 912 |
self middleLabelHolder value:'Components:'. |
913 |
||
914 |
projectDefinitionClass := self selectedModulesProjectDefinitionClass. |
|
2619 | 915 |
|
916 |
self canBrowseSelectedModule value:true. |
|
917 |
||
918 |
self canBrowseSelectedModulesExtensions |
|
919 |
value:(info classNames contains:[:nm | self isExtensionName:nm]). |
|
920 |
||
921 |
canUnload := info dynamic and:[self readOnly not]. |
|
922 |
self canUnloadSelectedModule value:canUnload. |
|
2788 | 923 |
canUnloadPackage := canUnload |
924 |
and:[projectDefinitionClass notNil |
|
925 |
and:[projectDefinitionClass projectIsLoaded]]. |
|
2619 | 926 |
self canUnloadSelectedModulesPackage value:canUnloadPackage. |
2616 | 927 |
|
2181 | 928 |
|
2402 | 929 |
classNamesShown := self shownClassNamesFor:info. |
2788 | 930 |
rows := classNamesShown collect:[:eachClassName | |
2860
5788b9c7c19b
changed: #showInfoForClassLib:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
931 |
|cls entry rev binRev listEntry revisionInfo versionString dateString| |
2181 | 932 |
|
933 |
listEntry := InfoRow new. |
|
2788 | 934 |
listEntry name:eachClassName. |
2181 | 935 |
|
2788 | 936 |
cls := Smalltalk classNamed:eachClassName. |
2181 | 937 |
cls isNil ifTrue:[ |
2788 | 938 |
(self isExtensionName:eachClassName) ifTrue:[ |
939 |
projectDefinitionClass notNil ifTrue:[ |
|
2957
299bc0925dab
class: Tools::ObjectModuleInformation
Claus Gittinger <cg@exept.de>
parents:
2860
diff
changeset
|
940 |
mgr := projectDefinitionClass sourceCodeManager ? SourceCodeManager ? CVSSourceCodeManager. |
2788 | 941 |
versionString := projectDefinitionClass perform:(mgr nameOfVersionMethodForExtensions) ifNotUnderstood:nil. |
2616 | 942 |
versionString notNil ifTrue:[ |
943 |
versionString := '(bin: ',(mgr revisionInfoFromString:versionString) revision,')'. |
|
944 |
] |
|
945 |
]. |
|
2788 | 946 |
] ifFalse:[ |
947 |
versionString := '(class removed)'. |
|
2616 | 948 |
]. |
2181 | 949 |
] ifFalse:[ |
2860
5788b9c7c19b
changed: #showInfoForClassLib:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
950 |
binRev := cls binaryRevision. |
5788b9c7c19b
changed: #showInfoForClassLib:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
951 |
binRev notNil ifTrue:[ |
2788 | 952 |
cls isLoaded ifTrue:[ |
2860
5788b9c7c19b
changed: #showInfoForClassLib:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
953 |
entry :='(bin: ' , binRev. |
2788 | 954 |
] ifFalse:[ |
2860
5788b9c7c19b
changed: #showInfoForClassLib:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
955 |
entry := '(stub for: ' , binRev. |
2181 | 956 |
]. |
2860
5788b9c7c19b
changed: #showInfoForClassLib:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
957 |
(rev := cls revision) ~= binRev ifTrue:[ |
5788b9c7c19b
changed: #showInfoForClassLib:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
958 |
entry := entry , ' / src: ' , (rev printString) |
2181 | 959 |
]. |
960 |
entry := entry , ')'. |
|
2616 | 961 |
versionString := entry |
2181 | 962 |
] ifFalse:[ |
2616 | 963 |
cls revision notNil ifTrue:[ |
964 |
versionString := '(overloaded by: ' , cls revision , ')' |
|
965 |
] |
|
2181 | 966 |
]. |
967 |
revisionInfo := cls revisionInfo. |
|
968 |
revisionInfo notNil ifTrue:[ |
|
2788 | 969 |
dateString := revisionInfo at:#date. |
2181 | 970 |
]. |
971 |
]. |
|
2616 | 972 |
listEntry version:versionString. |
2788 | 973 |
listEntry date:dateString. |
2181 | 974 |
]. |
975 |
||
2253 | 976 |
classInfoShown := rows. |
977 |
||
2183 | 978 |
self infoTable1ListHolder value:rows. |
979 |
self table1VisibleHolder value:true. |
|
980 |
self table2VisibleHolder value:false. |
|
2181 | 981 |
|
2860
5788b9c7c19b
changed: #showInfoForClassLib:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
982 |
"Modified: / 29-09-2011 / 15:40:42 / cg" |
2181 | 983 |
! |
984 |
||
985 |
showInfoForNonClassLib:sel |
|
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
986 |
"selected a method, cObject or unknown" |
2181 | 987 |
|
2787
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
988 |
|module fileName list newEntry| |
2181 | 989 |
|
2253 | 990 |
sel isNil ifTrue:[ |
991 |
self table1VisibleHolder value:false. |
|
992 |
self table2VisibleHolder value:false. |
|
993 |
^ self. |
|
994 |
]. |
|
995 |
||
2181 | 996 |
module := objectHandles at:sel. |
997 |
fileName := module pathName. |
|
998 |
||
2739 | 999 |
self canUnloadSelectedDLL value:true. |
1000 |
||
2181 | 1001 |
module isMethodHandle ifTrue:[ |
2787
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1002 |
|method nm entries| |
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1003 |
|
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1004 |
self canUnloadSelectedModule value:self readOnly not. |
2181 | 1005 |
|
2183 | 1006 |
self middleLabelHolder value:'Compiled Method:'. |
2181 | 1007 |
|
1008 |
(method := module method) isNil ifTrue:[ |
|
1009 |
nm := '** removed **'. |
|
1010 |
] ifFalse:[ |
|
2619 | 1011 |
self canBrowseSelectedModule value:true. |
2181 | 1012 |
"/ menu := PopUpMenu |
1013 |
"/ labels:#('Inspect' 'Browse') |
|
1014 |
"/ selectors:#(inspect browse). |
|
1015 |
"/ menu actionAt:#inspect put:[ method inspect ]. |
|
1016 |
"/ menu actionAt:#browse put:[ |who| |
|
1017 |
"/ who := method who. |
|
1018 |
"/ UserPreferences systemBrowserClass |
|
1019 |
"/ openInClass:(who methodClass) |
|
1020 |
"/ selector:(who methodSelector) |
|
1021 |
"/ ]. |
|
1022 |
"/ listView1 middleButtonMenu:menu. |
|
1023 |
||
2658
c284507a1279
changed: #showInfoForNonClassLib:
Claus Gittinger <cg@exept.de>
parents:
2624
diff
changeset
|
1024 |
nm := (method whoString) colorizeAllWith:Color blue. |
2181 | 1025 |
]. |
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1026 |
entries := OrderedCollection new. |
2787
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1027 |
newEntry := InfoRow new. |
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1028 |
newEntry name:'Compiled method'; value:nm. |
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1029 |
entries add:newEntry. |
2181 | 1030 |
|
2787
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1031 |
newEntry := InfoRow new. |
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1032 |
newEntry name:'Path'; value:fileName. |
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1033 |
entries add:newEntry. |
2181 | 1034 |
|
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1035 |
(method notNil and:[method code notNil]) ifTrue:[ |
2787
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1036 |
newEntry := InfoRow new. |
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1037 |
newEntry name:'Address'; value:('(16r) ' , (method code address hexPrintString leftPaddedTo:8 with:$0)). |
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1038 |
entries add:newEntry. |
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1039 |
]. |
2181 | 1040 |
|
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1041 |
self infoTable2ListHolder value:entries. |
2183 | 1042 |
self table1VisibleHolder value:false. |
1043 |
self table2VisibleHolder value:true. |
|
2181 | 1044 |
^ self. |
1045 |
]. |
|
1046 |
||
1047 |
(module isFunctionObjectHandle |
|
1048 |
and:[module functions notEmpty]) ifTrue:[ |
|
2183 | 1049 |
self middleLabelHolder value:'Functions:'. |
2181 | 1050 |
|
1051 |
"/ menu := PopUpMenu |
|
1052 |
"/ labels:#('Inspect') |
|
1053 |
"/ selectors:#(inspect). |
|
1054 |
"/ menu actionAt:#inspect put:[ module functions inspect ]. |
|
1055 |
"/ listView1 middleButtonMenu:menu. |
|
1056 |
"/ |
|
1057 |
list := (module functions select:[:f | f notNil]) |
|
1058 |
collect:[:f | |entry| |
|
1059 |
entry := InfoRow new. |
|
2658
c284507a1279
changed: #showInfoForNonClassLib:
Claus Gittinger <cg@exept.de>
parents:
2624
diff
changeset
|
1060 |
entry name:(f name colorizeAllWith:Color blue). |
2183 | 1061 |
entry value:('address: (16r) ' , (f code address hexPrintString leftPaddedTo:8 with:$0)). |
2181 | 1062 |
entry |
1063 |
]. |
|
2183 | 1064 |
self infoTable2ListHolder value:list. |
1065 |
self table1VisibleHolder value:false. |
|
1066 |
self table2VisibleHolder value:true. |
|
2181 | 1067 |
^ self. |
1068 |
]. |
|
1069 |
||
2787
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1070 |
newEntry := InfoRow new. |
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1071 |
newEntry name:'Unknown'. |
21778700b5a4
Fix stc compilation bug (method var and inlined block var with same name)
Stefan Vogel <sv@exept.de>
parents:
2778
diff
changeset
|
1072 |
self infoTable2ListHolder value:(Array with:newEntry). |
2183 | 1073 |
self table1VisibleHolder value:false. |
1074 |
self table2VisibleHolder value:true. |
|
2181 | 1075 |
|
2183 | 1076 |
"Modified: / 05-10-2007 / 13:01:33 / cg" |
2181 | 1077 |
! |
1078 |
||
1079 |
showInfoForVM |
|
2788 | 1080 |
"show file versions of vm info in lower view." |
2181 | 1081 |
|
1082 |
|l| |
|
1083 |
||
2619 | 1084 |
self canBrowseSelectedModule value:false. |
2788 | 1085 |
self middleLabelHolder value:'VM Components:'. |
2181 | 1086 |
|
2788 | 1087 |
l := ObjectMemory getVMIdentificationStrings |
1088 |
select:[:entry | (entry includesString:'$Header') |
|
1089 |
and:[entry includesString:',v']] |
|
1090 |
thenCollect:[:entry | |
|
1091 |
|i1 i2 file revision date listEntry| |
|
2181 | 1092 |
|
2788 | 1093 |
listEntry := InfoRow new. |
2181 | 1094 |
|
2788 | 1095 |
i1 := entry indexOfSubCollection:'librun'. |
1096 |
i1 ~~ 0 ifTrue:[ |
|
1097 |
i2 := entry indexOfSubCollection:',v' startingAt:i1. |
|
1098 |
i2 ~~ 0 ifTrue:[ |
|
1099 |
file := entry copyFrom:i1+7 to:(i2-1). |
|
1100 |
listEntry name:file. |
|
2181 | 1101 |
|
2788 | 1102 |
i1 := i2+3. |
1103 |
i2 := entry indexOfSeparatorStartingAt:i1. |
|
1104 |
revision := entry copyFrom:i1 to:(i2-1). |
|
1105 |
listEntry version:revision. |
|
2181 | 1106 |
|
2788 | 1107 |
i1 := i2+1. |
1108 |
i2 := entry indexOfSeparatorStartingAt:i1. |
|
1109 |
date := entry copyFrom:i1 to:(i2-1). |
|
1110 |
listEntry date:date. |
|
1111 |
]. |
|
1112 |
]. |
|
1113 |
listEntry. |
|
2181 | 1114 |
]. |
2253 | 1115 |
|
1116 |
vmInfoShown := l. |
|
2183 | 1117 |
self infoTable1ListHolder value:l. |
1118 |
self table1VisibleHolder value:true. |
|
1119 |
self table2VisibleHolder value:false. |
|
2181 | 1120 |
|
1121 |
"/ readOnly ifFalse:[ |
|
1122 |
"/ unloadButton disable. |
|
1123 |
"/ unloadAndRemoveButton disable. |
|
1124 |
"/ ] |
|
1125 |
||
2183 | 1126 |
"Modified: / 05-10-2007 / 12:53:44 / cg" |
2402 | 1127 |
! |
1128 |
||
1129 |
shownClassNamesFor:info |
|
1130 |
"/ selected a package; fill bottom list with class-info |
|
1131 |
||
1132 |
|classNames| |
|
1133 |
||
1134 |
classNames := info classNames asSortedCollection. |
|
1135 |
^ classNames |
|
1136 |
select:[:cName | |
|
1137 |
|cls| |
|
1138 |
||
1139 |
cls := Smalltalk classNamed:cName. |
|
1140 |
cls isNil ifTrue:[ |
|
1141 |
true "a removed class" |
|
1142 |
] ifFalse:[ |
|
1143 |
cls isPrivate not |
|
1144 |
]. |
|
1145 |
]. |
|
2181 | 1146 |
! ! |
1147 |
||
1148 |
!ObjectModuleInformation methodsFor:'initialization'! |
|
1149 |
||
1150 |
postBuildWith:aBuilder |
|
1151 |
|canDoIt| |
|
1152 |
||
1153 |
super postBuildWith:aBuilder. |
|
1154 |
||
1155 |
canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
|
1156 |
self showBuiltIn value:canDoIt. |
|
1157 |
self showCObjects value:canDoIt. |
|
1158 |
self showClassLibs value:canDoIt. |
|
1159 |
self showMethods value:canDoIt. |
|
1160 |
self showOthers value:canDoIt. |
|
1161 |
||
1162 |
self updateModuleList |
|
1163 |
||
1164 |
"Created: / 05-10-2007 / 10:50:27 / cg" |
|
1165 |
! ! |
|
1166 |
||
1167 |
!ObjectModuleInformation methodsFor:'menu actions'! |
|
1168 |
||
2253 | 1169 |
browseClass |
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1170 |
|info classNames selectedClassName selectedClass| |
2253 | 1171 |
|
1172 |
info := self selectedModuleInfo. |
|
2402 | 1173 |
classNames := (self shownClassNamesFor:info) asSortedCollection. |
2253 | 1174 |
selectedClassName := classNames at:(self selectedInfoIndex). |
1175 |
selectedClass := Smalltalk classNamed:selectedClassName. |
|
1176 |
||
2402 | 1177 |
selectedClass notNil ifTrue:[ |
1178 |
Smalltalk browseInClass:selectedClass. |
|
1179 |
^ self. |
|
1180 |
]. |
|
1181 |
||
1182 |
"/ clicked on an extensions-module ? |
|
2618 | 1183 |
(self isExtensionName:selectedClassName) ifTrue:[ |
1184 |
self browseModuleExtensions. |
|
2616 | 1185 |
^ self. |
2402 | 1186 |
]. |
2618 | 1187 |
|
1188 |
self breakPoint:#cg. |
|
2253 | 1189 |
! |
1190 |
||
1191 |
browseModule |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1192 |
|moduleInfoOrHandle classes method| |
2253 | 1193 |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1194 |
moduleInfoOrHandle := self selectedObjectHandle. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1195 |
"/ what a hack |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1196 |
(moduleInfoOrHandle isKindOf: ObjectMemory::BinaryModuleDescriptor) ifTrue:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1197 |
classes := moduleInfoOrHandle classNames collect:[:nm | Smalltalk classNamed:nm]. |
2619 | 1198 |
UserPreferences systemBrowserClass |
1199 |
browseClasses:classes |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1200 |
label:(resources string:'Classes in %1' with:moduleInfoOrHandle libraryName) |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1201 |
] ifFalse:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1202 |
moduleInfoOrHandle isMethodHandle ifTrue:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1203 |
method := moduleInfoOrHandle method. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1204 |
(method notNil and:[method mclass notNil]) ifFalse:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1205 |
Dialog information:'The method has been redefined/removed'. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1206 |
^ self. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1207 |
]. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1208 |
UserPreferences systemBrowserClass |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1209 |
openInMethod:method |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1210 |
] |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1211 |
]. |
2253 | 1212 |
! |
1213 |
||
2618 | 1214 |
browseModuleExtensions |
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1215 |
|info name packageID methods| |
2618 | 1216 |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1217 |
info := self selectedModuleInfo. |
2618 | 1218 |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1219 |
name := info classNames detect:[:nm | self isExtensionName:nm]. |
2618 | 1220 |
packageID := (name copyWithoutLast:('_extensions' size)) asSymbol. |
1221 |
methods := Smalltalk allExtensionsForPackage:packageID. |
|
1222 |
(UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID). |
|
1223 |
! |
|
1224 |
||
2763 | 1225 |
browseModulesProjectDefinition |
1226 |
|projectDefinitionClass| |
|
1227 |
||
1228 |
projectDefinitionClass := self projectDefinitionClassOfSelectedModule. |
|
1229 |
projectDefinitionClass notNil ifTrue:[ |
|
1230 |
(UserPreferences browserClass) openInClass:projectDefinitionClass class |
|
1231 |
]. |
|
1232 |
! |
|
1233 |
||
2253 | 1234 |
copyClassOrVMNameList |
1235 |
|text| |
|
1236 |
||
1237 |
text := ((classInfoShown ? vmInfoShown)collect:[:eachRow | eachRow infoString]) asStringCollection asString. |
|
1238 |
self window setClipboardText:text. |
|
1239 |
! |
|
1240 |
||
2623 | 1241 |
findClass |
1242 |
|class moduleIndex classNamesShown classIndex| |
|
1243 |
||
1244 |
class := Dialog requestClass:'Classname (Tab for completion):'. |
|
1245 |
class isEmptyOrNil ifTrue:[^ self]. |
|
1246 |
||
1247 |
moduleIndex := allModules findFirst:[:module | module isSymbol not and:[module classNames includes:class name]]. |
|
1248 |
moduleIndex == 0 ifTrue:[ |
|
1249 |
Dialog information:'Class is not contained in a loaded or builtIn package.'. |
|
1250 |
^ self |
|
1251 |
]. |
|
1252 |
self selectedModuleIndexHolder value:moduleIndex. |
|
1253 |
||
1254 |
classNamesShown := self shownClassNamesFor:(self selectedModuleInfo). |
|
1255 |
classIndex := classNamesShown indexOf:class name. |
|
1256 |
self selectedInfoIndexHolder value:classIndex. |
|
1257 |
||
1258 |
"/ module := allModules at:moduleIndex. |
|
1259 |
"/ info := self selectedModuleInfo. |
|
1260 |
"/ classNames := (self shownClassNamesFor:info) asSortedCollection. |
|
1261 |
"/ selectedClassName := classNames at:(self selectedInfoIndex). |
|
1262 |
"/ selectedClass := Smalltalk classNamed:selectedClassName. |
|
1263 |
"/ |
|
1264 |
"/ selectedClass notNil ifTrue:[ |
|
1265 |
"/ Smalltalk browseInClass:selectedClass. |
|
1266 |
"/ ^ self. |
|
1267 |
"/ ]. |
|
1268 |
"/ |
|
1269 |
"/ "/ clicked on an extensions-module ? |
|
1270 |
"/ (self isExtensionName:selectedClassName) ifTrue:[ |
|
1271 |
"/ self browseModuleExtensions. |
|
1272 |
"/ ^ self. |
|
1273 |
"/ ]. |
|
1274 |
"/ |
|
1275 |
"/ self breakPoint:#cg. |
|
1276 |
! |
|
1277 |
||
2842 | 1278 |
inspectSelectedObject |
1279 |
self selectedObjectHandle inspect. |
|
1280 |
! |
|
1281 |
||
2619 | 1282 |
loadPackage |
1283 |
|package ok| |
|
1284 |
||
1285 |
package := Dialog request:'Name of Package (module:directory)'. |
|
1286 |
package isEmptyOrNil ifTrue:[^ self]. |
|
1287 |
self withWaitCursorDo:[ |
|
1288 |
ok := Smalltalk loadPackage:package. |
|
1289 |
]. |
|
1290 |
ok ifFalse:[ |
|
1291 |
Dialog information:'Package not loaded' |
|
1292 |
]. |
|
1293 |
self updateModuleList |
|
1294 |
! |
|
1295 |
||
2403
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1296 |
menuUpdateModuleList |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1297 |
self updateModuleList |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1298 |
|
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1299 |
"Modified: / 05-10-2007 / 13:11:45 / cg" |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1300 |
! |
11c5c82a852c
changed #menuUpdateModuleList
Claus Gittinger <cg@exept.de>
parents:
2402
diff
changeset
|
1301 |
|
2181 | 1302 |
openDocumentation |
2184 | 1303 |
self openHTMLDocument: 'tools/misc/TOP.html#MODULEINFO' |
2181 | 1304 |
|
2184 | 1305 |
"Modified: / 05-10-2007 / 13:11:45 / cg" |
2253 | 1306 |
! |
1307 |
||
2619 | 1308 |
selectedModulesProjectDefinitionClass |
2788 | 1309 |
"try to figure out, what the definitionClass is inside that module. |
1310 |
in the future, we should always find one there, however, old libs or |
|
1311 |
special libraries (hand built) might be without a projectDefinition." |
|
1312 |
||
1313 |
|info classNames definitionClasses libraryName| |
|
2619 | 1314 |
|
1315 |
info := self selectedModuleInfo. |
|
1316 |
classNames := (self shownClassNamesFor:info) asSortedCollection. |
|
2788 | 1317 |
definitionClasses := classNames ? #() |
1318 |
collect:[:nm | Smalltalk classNamed:nm] |
|
1319 |
thenSelect:[:cls | cls isProjectDefinition]. |
|
1320 |
||
2619 | 1321 |
definitionClasses size == 1 ifTrue:[ |
1322 |
^ definitionClasses first |
|
2788 | 1323 |
] ifFalse:[ |
1324 |
"/ 0 or more definition classes - fall back - some heuristics... |
|
1325 |
libraryName := info libraryName. "maybe something like 'libstx_libbasic'" |
|
1326 |
(libraryName notNil and:[ libraryName startsWith:'lib' ]) ifTrue:[ |
|
1327 |
^ Smalltalk classNamed:(libraryName copyFrom:4). |
|
1328 |
]. |
|
2619 | 1329 |
]. |
2788 | 1330 |
|
2619 | 1331 |
^ nil |
1332 |
! |
|
1333 |
||
2254 | 1334 |
unloadSelectedModule |
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1335 |
self unloadSelectedModuleRemoveConnectedObjects:false |
2253 | 1336 |
! |
1337 |
||
2254 | 1338 |
unloadSelectedModuleAndRemoveClasses |
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1339 |
self unloadSelectedModuleRemoveConnectedObjects:true |
2253 | 1340 |
! |
1341 |
||
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1342 |
unloadSelectedModuleRemoveConnectedObjects:doRemoveClasses |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1343 |
|module handle| |
2739 | 1344 |
|
1345 |
module := allModules at:self selectedModuleIndex ifAbsent:nil. |
|
1346 |
module notNil ifTrue:[ |
|
1347 |
(Dialog |
|
1348 |
confirm:'This is a possibly dangerous operation, as the DLL is unloaded without caring for |
|
2619 | 1349 |
proper package-deinstallation procedures. Please use this only in repair situations and when the |
2616 | 1350 |
regular unloadPackage operation fails. |
1351 |
||
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1352 |
Continue ?') |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1353 |
ifFalse:[ ^ self ]. |
2616 | 1354 |
]. |
2778 | 1355 |
handle := module handle. |
2773
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1356 |
handle notNil ifTrue:[ |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1357 |
self |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1358 |
withWaitCursorDo:[ |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1359 |
self selectedModuleIndexHolder value:nil. |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1360 |
doRemoveClasses ifTrue:[ |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1361 |
handle removeConnectedObjects. |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1362 |
]. |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1363 |
handle unload. |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1364 |
self updateModuleList. |
a3e5bbb440f4
added: #unloadSelectedModuleRemoveConnectedObjects:
Stefan Vogel <sv@exept.de>
parents:
2763
diff
changeset
|
1365 |
]. |
2253 | 1366 |
] |
2619 | 1367 |
! |
1368 |
||
1369 |
unloadSelectedModulesPackage |
|
1370 |
|definitionClass| |
|
1371 |
||
1372 |
definitionClass := self selectedModulesProjectDefinitionClass. |
|
1373 |
definitionClass isNil ifTrue:[^ self]. |
|
1374 |
||
1375 |
(Dialog |
|
1376 |
confirm:(resources stringWithCRs:'About to unload the package\\ %1\\Continue' with:definitionClass package allBold)) |
|
1377 |
ifFalse:[ |
|
1378 |
^ self |
|
1379 |
]. |
|
1380 |
Smalltalk unloadPackage:definitionClass package. |
|
2181 | 1381 |
! ! |
1382 |
||
1383 |
!ObjectModuleInformation methodsFor:'private'! |
|
1384 |
||
2183 | 1385 |
filterChanged |
1386 |
self updateModuleList |
|
1387 |
||
1388 |
"Created: / 05-10-2007 / 12:43:36 / cg" |
|
1389 |
! |
|
1390 |
||
2763 | 1391 |
projectDefinitionClassOfSelectedModule |
1392 |
|info packageID projectDefinitionClass| |
|
1393 |
||
1394 |
info := self selectedModuleInfo. |
|
1395 |
info isNil ifTrue:[^ nil]. |
|
1396 |
||
1397 |
info classNames |
|
1398 |
detect:[:nm | |
|
1399 |
|cls| |
|
1400 |
||
1401 |
cls := Smalltalk at:nm. |
|
1402 |
cls notNil ifTrue:[ |
|
1403 |
packageID := cls package. |
|
1404 |
true |
|
1405 |
] ifFalse:[ |
|
1406 |
false |
|
1407 |
] |
|
1408 |
] |
|
1409 |
ifNone:[^ nil]. |
|
1410 |
||
1411 |
projectDefinitionClass := packageID asPackageId projectDefinitionClass. |
|
1412 |
^ projectDefinitionClass |
|
1413 |
! |
|
1414 |
||
2181 | 1415 |
updateModuleList |
1416 |
|showClassLibs showBuiltIn showMethods showCObjects showOthers |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1417 |
listOfModuleNames allObjects handles methodObjects | |
2181 | 1418 |
|
1419 |
showClassLibs := self showClassLibs value. |
|
1420 |
showBuiltIn := self showBuiltIn value. |
|
1421 |
showMethods := self showMethods value. |
|
1422 |
showCObjects := self showCObjects value. |
|
1423 |
showOthers := self showOthers value. |
|
1424 |
||
1425 |
listOfModuleNames := OrderedCollection new. |
|
1426 |
handles := OrderedCollection new. |
|
1427 |
||
1428 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1429 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
2181 | 1430 |
|
1431 |
(showClassLibs or:[showBuiltIn]) ifTrue:[ |
|
1432 |
|moduleNames| |
|
1433 |
||
1434 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1435 |
allModules := allModules select: |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1436 |
[:i | |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1437 |
|wantToSee| |
2181 | 1438 |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1439 |
wantToSee := false. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1440 |
i dynamic ifTrue:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1441 |
showClassLibs ifTrue:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1442 |
i isSingleMethod ifFalse:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1443 |
wantToSee := true |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1444 |
]. |
2181 | 1445 |
]. |
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1446 |
] ifFalse:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1447 |
showBuiltIn ifTrue:[ |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1448 |
wantToSee := true |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1449 |
]. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1450 |
]. |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1451 |
wantToSee |
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1452 |
]. |
2181 | 1453 |
|
1454 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
|
2623 | 1455 |
allModules sort:[:a :b | (a name) < (b name)]. |
2181 | 1456 |
moduleNames := allModules collect:[:entry | entry name]. |
1457 |
listOfModuleNames addAll:moduleNames. |
|
1458 |
handles addAll:allModules. |
|
1459 |
]. |
|
1460 |
||
1461 |
showMethods ifTrue:[ |
|
2620
fccbd77a9409
added: #selectedObjectHandle
Claus Gittinger <cg@exept.de>
parents:
2619
diff
changeset
|
1462 |
|methodNames| |
2181 | 1463 |
|
1464 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
|
1465 |
'compiled method - removed' " , ' (in ' , mH pathName , ')' " |
|
1466 |
] ifFalse:[ |
|
1467 |
'compiled method ' , mH method whoString " , ' (in ' , mH pathName , ')' " |
|
1468 |
]. |
|
1469 |
]. |
|
1470 |
listOfModuleNames addAll:methodNames. |
|
1471 |
handles addAll:methodObjects. |
|
1472 |
]. |
|
1473 |
||
1474 |
showCObjects ifTrue:[ |
|
1475 |
|cObjects cObjectNames| |
|
1476 |
||
1477 |
cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray. |
|
1478 |
cObjectNames := cObjects collect:[:entry | entry pathName]. |
|
1479 |
listOfModuleNames addAll:cObjectNames. |
|
1480 |
handles addAll:cObjects. |
|
1481 |
]. |
|
1482 |
||
1483 |
showOthers ifTrue:[ |
|
1484 |
|otherObjects otherObjectNames| |
|
1485 |
||
1486 |
otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle |
|
1487 |
or:[h isMethodHandle |
|
1488 |
or:[h isClassLibHandle]]) not]) asArray. |
|
1489 |
otherObjectNames := otherObjects collect:[:entry | entry pathName]. |
|
1490 |
listOfModuleNames addAll:otherObjectNames. |
|
1491 |
handles addAll:otherObjects. |
|
1492 |
]. |
|
1493 |
||
1494 |
showBuiltIn ifTrue:[ |
|
1495 |
listOfModuleNames addFirst:'VM'. |
|
1496 |
handles addFirst:#VM. |
|
1497 |
allModules addFirst:#VM. |
|
1498 |
]. |
|
1499 |
||
1500 |
self listOfModuleNames contents:listOfModuleNames. |
|
2183 | 1501 |
objectHandles := handles. |
2619 | 1502 |
self selectedModuleIndexChanged. |
2181 | 1503 |
|
2183 | 1504 |
"Modified: / 05-10-2007 / 12:45:37 / cg" |
2181 | 1505 |
! ! |
1506 |
||
1507 |
!ObjectModuleInformation::InfoRow methodsFor:'accessing'! |
|
1508 |
||
1509 |
date |
|
1510 |
^ date |
|
1511 |
! |
|
1512 |
||
1513 |
date:something |
|
1514 |
date := something. |
|
1515 |
! |
|
1516 |
||
1517 |
name |
|
1518 |
^ name |
|
1519 |
! |
|
1520 |
||
1521 |
name:something |
|
1522 |
name := something. |
|
1523 |
! |
|
1524 |
||
1525 |
name:nameArg version:versionArg date:dateArg |
|
1526 |
name := nameArg. |
|
1527 |
version := versionArg. |
|
1528 |
date := dateArg. |
|
1529 |
! |
|
1530 |
||
2183 | 1531 |
value |
1532 |
^ value |
|
1533 |
! |
|
1534 |
||
1535 |
value:something |
|
1536 |
value := something. |
|
1537 |
! |
|
1538 |
||
2181 | 1539 |
version |
1540 |
^ version |
|
1541 |
! |
|
1542 |
||
1543 |
version:something |
|
1544 |
version := something. |
|
1545 |
! ! |
|
1546 |
||
2253 | 1547 |
!ObjectModuleInformation::InfoRow methodsFor:'info'! |
1548 |
||
1549 |
infoString |
|
1550 |
^ name , ' ', (version ? '-') , ' ', (date ? '-') printString |
|
1551 |
! ! |
|
1552 |
||
2181 | 1553 |
!ObjectModuleInformation class methodsFor:'documentation'! |
1554 |
||
1555 |
version |
|
1556 |
^ '$Header$' |
|
2616 | 1557 |
! |
1558 |
||
1559 |
version_CVS |
|
1560 |
^ '$Header$' |
|
2181 | 1561 |
! ! |
2957
299bc0925dab
class: Tools::ObjectModuleInformation
Claus Gittinger <cg@exept.de>
parents:
2860
diff
changeset
|
1562 |