cg@2181: "{ Package: 'stx:libtool2' }" cg@2181: cg@2181: "{ NameSpace: Tools }" cg@2181: cg@2184: ToolApplicationModel subclass:#ObjectModuleInformation cg@2184: instanceVariableNames:'readOnly listOfModuleNames selectedModuleIndexHolder allModules cg@2183: objectHandles showOthers showCObjects showBuiltIn showMethods cg@2253: showClassLibs table1VisibleHolder table2VisibleHolder cg@2253: selectedInfoIndexHolder canBrowseSelectedModule cg@2253: canUnloadSelectedModule classNamesShown classInfoShown cg@2253: vmInfoShown' cg@2181: classVariableNames:'' cg@2181: poolDictionaries:'' cg@2181: category:'Monitors-ST/X' cg@2181: ! cg@2181: cg@2181: Object subclass:#InfoRow cg@2183: instanceVariableNames:'name version date value' cg@2181: classVariableNames:'' cg@2181: poolDictionaries:'' cg@2181: privateIn:ObjectModuleInformation cg@2181: ! cg@2181: cg@2181: !ObjectModuleInformation class methodsFor:'documentation'! cg@2181: cg@2181: documentation cg@2181: " cg@2181: Shows the modules (dll's) of ST/X. cg@2181: Both builtIn modules, and dynamically loaded modules are listed. cg@2181: cg@2181: [author:] cg@2253: Claus Gittinger cg@2181: " cg@2181: ! cg@2181: cg@2181: examples cg@2181: " cg@2181: Starting the application: cg@2181: [exBegin] cg@2181: ObjectModuleInformation open cg@2181: cg@2181: [exEnd] cg@2181: " cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation class methodsFor:'info'! cg@2181: cg@2181: defaultLabel cg@2183: ^ 'Object Module Info' cg@2181: cg@2181: "Created: / 05-10-2007 / 11:56:59 / cg" cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation class methodsFor:'interface specs'! cg@2181: cg@2181: windowSpec cg@2181: "This resource specification was automatically generated cg@2181: by the UIPainter of ST/X." cg@2181: cg@2181: "Do not manually edit this!! If it is corrupted, cg@2181: the UIPainter may not be able to read the specification." cg@2181: cg@2181: " cg@2183: UIPainter new openOnClass:Tools::ObjectModuleInformation andSelector:#windowSpec cg@2183: Tools::ObjectModuleInformation new openInterface:#windowSpec cg@2183: Tools::ObjectModuleInformation open cg@2181: " cg@2181: cg@2181: cg@2181: cg@2181: ^ cg@2181: #(FullSpec cg@2181: name: windowSpec cg@2181: window: cg@2181: (WindowSpec cg@2181: label: 'ST/X Module & Version Information' cg@2181: name: 'ST/X Module & Version Information' cg@2181: min: (Point 0 0) cg@2181: bounds: (Rectangle 0 0 505 567) cg@2181: menu: mainMenu cg@2181: ) cg@2181: component: cg@2181: (SpecCollection cg@2181: collection: ( cg@2181: (MenuPanelSpec cg@2181: name: 'ToolBar1' cg@2181: layout: (LayoutFrame 0 0 0 0 0 1 30 0) cg@2181: menu: toolbarMenu cg@2181: textDefault: true cg@2181: ) cg@2181: (VariableVerticalPanelSpec cg@2181: name: 'VariableVerticalPanel1' cg@2181: layout: (LayoutFrame 0 0 30 0 0 1 0 1) cg@2181: component: cg@2181: (SpecCollection cg@2181: collection: ( cg@2181: (SequenceViewSpec cg@2181: name: 'List1' cg@2181: model: selectedModuleIndexHolder cg@2253: menu: moduleMenu cg@2181: hasHorizontalScrollBar: true cg@2181: hasVerticalScrollBar: true cg@2181: useIndex: true cg@2181: sequenceList: listOfModuleNames cg@2181: ) cg@2181: (ViewSpec cg@2181: name: 'Box1' cg@2181: component: cg@2181: (SpecCollection cg@2181: collection: ( cg@2181: (LabelSpec cg@2181: name: 'Label1' cg@2181: layout: (LayoutFrame 0 0 0 0 0 1 30 0) cg@2181: translateLabel: true cg@2181: labelChannel: middleLabelHolder cg@2181: adjust: left cg@2181: ) cg@2181: (DataSetSpec cg@2181: name: 'Table1' cg@2181: layout: (LayoutFrame 0 0 30 0 0 1 0 1) cg@2183: visibilityChannel: table1VisibleHolder cg@2181: model: selectedInfoIndexHolder cg@2253: menu: moduleItemMenu cg@2181: hasHorizontalScrollBar: true cg@2181: hasVerticalScrollBar: true cg@2183: dataList: infoTable1ListHolder cg@2181: columnHolder: tableColumns cg@2181: separatorOneDColor: (Color 66.999313344015 66.999313344015 66.999313344015) cg@2181: ) cg@2183: (DataSetSpec cg@2183: name: 'Table2' cg@2183: layout: (LayoutFrame 0 0 30 0 0 1 0 1) cg@2183: initiallyInvisible: true cg@2183: visibilityChannel: table2VisibleHolder cg@2183: model: selectedInfoIndexHolder cg@2183: hasHorizontalScrollBar: true cg@2183: hasVerticalScrollBar: true cg@2183: dataList: infoTable2ListHolder cg@2183: columnHolder: tableColumnsForSingleInfo cg@2183: separatorOneDColor: (Color 66.999313344015 66.999313344015 66.999313344015) cg@2183: ) cg@2181: ) cg@2181: cg@2181: ) cg@2181: ) cg@2181: ) cg@2181: cg@2181: ) cg@2181: handles: (Any 0.35195530726257 1.0) cg@2181: ) cg@2181: ) cg@2181: cg@2181: ) cg@2181: ) cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation class methodsFor:'menu specs'! cg@2181: cg@2181: mainMenu cg@2181: "This resource specification was automatically generated cg@2181: by the MenuEditor of ST/X." cg@2181: cg@2181: "Do not manually edit this!! If it is corrupted, cg@2181: the MenuEditor may not be able to read the specification." cg@2181: cg@2181: " cg@2183: MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#mainMenu cg@2183: (Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation mainMenu)) startUp cg@2181: " cg@2181: cg@2181: cg@2181: cg@2181: ^ cg@2181: #(Menu cg@2181: ( cg@2181: (MenuItem cg@2181: label: 'File' cg@2181: translateLabel: true cg@2181: submenu: cg@2181: (Menu cg@2181: ( cg@2181: (MenuItem cg@2181: label: 'Exit' cg@2181: itemValue: closeRequest cg@2181: translateLabel: true cg@2181: ) cg@2181: ) cg@2181: nil cg@2181: nil cg@2181: ) cg@2181: ) cg@2181: (MenuItem cg@2181: label: 'View' cg@2181: translateLabel: true cg@2181: submenu: cg@2181: (Menu cg@2181: ( cg@2181: (MenuItem cg@2181: label: 'Builtin' cg@2181: translateLabel: true cg@2183: hideMenuOnActivated: false cg@2181: indication: showBuiltIn cg@2181: ) cg@2181: (MenuItem cg@2181: label: 'Class Libraries' cg@2181: translateLabel: true cg@2183: hideMenuOnActivated: false cg@2181: indication: showClassLibs cg@2181: ) cg@2181: (MenuItem cg@2181: label: 'Methods' cg@2181: translateLabel: true cg@2183: hideMenuOnActivated: false cg@2181: indication: showMethods cg@2181: ) cg@2181: (MenuItem cg@2181: label: 'C-Objects' cg@2181: translateLabel: true cg@2183: hideMenuOnActivated: false cg@2181: indication: showCObjects cg@2181: ) cg@2181: (MenuItem cg@2181: label: 'Others' cg@2181: translateLabel: true cg@2183: hideMenuOnActivated: false cg@2181: indication: showOthers cg@2181: ) cg@2403: (MenuItem cg@2403: label: '-' cg@2403: ) cg@2403: (MenuItem cg@2403: label: 'Update' cg@2403: itemValue: menuUpdateModuleList cg@2403: translateLabel: true cg@2403: ) cg@2181: ) cg@2181: nil cg@2181: nil cg@2181: ) cg@2181: ) cg@2181: (MenuItem cg@2181: label: 'Module' cg@2181: translateLabel: true cg@2181: submenu: cg@2181: (Menu cg@2181: ( cg@2403: (MenuItem cg@2403: enabled: canBrowseSelectedModule cg@2403: label: 'Browse' cg@2403: itemValue: browseModule cg@2403: translateLabel: true cg@2403: ) cg@2403: (MenuItem cg@2253: enabled: canCopyClassNameList cg@2253: label: 'Copy Version Info to Clipboard' cg@2253: itemValue: copyClassOrVMNameList cg@2253: translateLabel: true cg@2253: ) cg@2181: (MenuItem cg@2253: label: '-' cg@2253: ) cg@2253: (MenuItem cg@2253: enabled: canUnloadSelectedModule cg@2181: label: 'Unload' cg@2403: itemValue: unloadSelectedModule cg@2181: translateLabel: true cg@2181: ) cg@2403: (MenuItem cg@2403: enabled: canUnloadSelectedModule cg@2403: label: 'Remove Classes && Unload' cg@2403: itemValue: unloadSelectedModuleAndRemoveClasses cg@2403: translateLabel: true cg@2403: ) cg@2181: ) cg@2181: nil cg@2181: nil cg@2181: ) cg@2181: ) cg@2181: (MenuItem cg@2181: label: 'Help' cg@2181: translateLabel: true cg@2181: startGroup: conditionalRight cg@2181: submenu: cg@2181: (Menu cg@2181: ( cg@2181: (MenuItem cg@2181: label: 'Documentation' cg@2181: itemValue: openDocumentation cg@2181: translateLabel: true cg@2181: ) cg@2181: (MenuItem cg@2181: label: '-' cg@2181: ) cg@2181: (MenuItem cg@2181: label: 'About this Application...' cg@2181: itemValue: openAboutThisApplication cg@2181: translateLabel: true cg@2181: ) cg@2181: ) cg@2181: nil cg@2181: nil cg@2181: ) cg@2181: ) cg@2181: ) cg@2181: nil cg@2181: nil cg@2181: ) cg@2253: ! cg@2253: cg@2253: moduleItemMenu cg@2253: "This resource specification was automatically generated cg@2253: by the MenuEditor of ST/X." cg@2253: cg@2253: "Do not manually edit this!! If it is corrupted, cg@2253: the MenuEditor may not be able to read the specification." cg@2253: cg@2253: " cg@2253: MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#moduleItemMenu cg@2253: (Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation moduleItemMenu)) startUp cg@2253: " cg@2253: cg@2253: cg@2253: cg@2253: ^ cg@2253: #(Menu cg@2253: ( cg@2253: (MenuItem cg@2253: enabled: canBrowseSelectedClass cg@2253: label: 'Browse' cg@2253: itemValue: browseClass cg@2253: translateLabel: true cg@2253: ) cg@2253: (MenuItem cg@2253: label: '-' cg@2253: ) cg@2253: (MenuItem cg@2253: enabled: canCopyClassNameList cg@2253: label: 'Copy Version Info to Clipboard' cg@2253: itemValue: copyClassOrVMNameList cg@2253: translateLabel: true cg@2253: ) cg@2253: ) cg@2253: nil cg@2253: nil cg@2253: ) cg@2253: ! cg@2253: cg@2253: moduleMenu cg@2253: "This resource specification was automatically generated cg@2253: by the MenuEditor of ST/X." cg@2253: cg@2253: "Do not manually edit this!! If it is corrupted, cg@2253: the MenuEditor may not be able to read the specification." cg@2253: cg@2253: " cg@2253: MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#moduleMenu cg@2253: (Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation moduleMenu)) startUp cg@2253: " cg@2253: cg@2253: cg@2253: cg@2253: ^ cg@2253: #(Menu cg@2253: ( cg@2253: (MenuItem cg@2253: enabled: canBrowseSelectedModule cg@2253: label: 'Browse' cg@2253: itemValue: browseModule cg@2253: translateLabel: true cg@2253: ) cg@2253: (MenuItem cg@2253: enabled: canCopyClassNameList cg@2253: label: 'Copy Version Info to Clipboard' cg@2253: itemValue: copyClassOrVMNameList cg@2253: translateLabel: true cg@2253: ) cg@2253: (MenuItem cg@2253: label: '-' cg@2253: ) cg@2253: (MenuItem cg@2253: enabled: canUnloadSelectedModule cg@2253: label: 'Remove Classes && Unload' cg@2253: itemValue: unloadSelectedModuleAndRemoveClasses cg@2253: translateLabel: true cg@2253: ) cg@2253: (MenuItem cg@2253: enabled: canUnloadSelectedModule cg@2253: label: 'Unload' cg@2253: itemValue: unloadSelectedModule cg@2253: translateLabel: true cg@2253: ) cg@2253: ) cg@2253: nil cg@2253: nil cg@2253: ) cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation class methodsFor:'tableColumns specs'! cg@2181: cg@2181: tableColumns cg@2181: "This resource specification was automatically generated cg@2181: by the DataSetBuilder of ST/X." cg@2181: cg@2181: "Do not manually edit this!! If it is corrupted, cg@2181: the DataSetBuilder may not be able to read the specification." cg@2181: cg@2181: " cg@2181: DataSetBuilder new openOnClass:ObjectModuleInformation andSelector:#tableColumns cg@2181: " cg@2181: cg@2181: cg@2181: cg@2181: ^#( cg@2181: (DataSetColumnSpec cg@2181: label: 'Name' cg@2181: activeHelpKey: '' cg@2181: labelButtonType: Button cg@2181: width: 0.5 cg@2181: model: name cg@2181: canSelect: false cg@2181: ) cg@2181: (DataSetColumnSpec cg@2181: label: 'Version' cg@2181: activeHelpKey: '' cg@2181: labelButtonType: Button cg@2181: model: version cg@2181: canSelect: false cg@2181: ) cg@2181: (DataSetColumnSpec cg@2181: label: 'Date' cg@2181: activeHelpKey: '' cg@2181: labelButtonType: Button cg@2181: model: date cg@2181: canSelect: false cg@2181: ) cg@2181: ) cg@2181: cg@2183: ! cg@2183: cg@2183: tableColumnsForSingleInfo cg@2183: "This resource specification was automatically generated cg@2183: by the DataSetBuilder of ST/X." cg@2183: cg@2183: "Do not manually edit this!! If it is corrupted, cg@2183: the DataSetBuilder may not be able to read the specification." cg@2183: cg@2183: " cg@2183: DataSetBuilder new openOnClass:Tools::ObjectModuleInformation andSelector:#tableColumnsForSingleInfo cg@2183: " cg@2183: cg@2183: cg@2183: cg@2183: ^#( cg@2183: (DataSetColumnSpec cg@2183: label: '' cg@2183: activeHelpKey: '' cg@2183: labelButtonType: None cg@2183: width: 0.3 cg@2183: model: name cg@2183: canSelect: false cg@2183: ) cg@2183: (DataSetColumnSpec cg@2183: label: '' cg@2183: activeHelpKey: '' cg@2183: labelButtonType: None cg@2183: model: value cg@2183: canSelect: false cg@2183: ) cg@2183: ) cg@2183: cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation methodsFor:'aspects'! cg@2181: cg@2253: canBrowseSelectedClass cg@2253: ^ [classNamesShown notEmptyOrNil cg@2253: and:[ self selectedInfoIndex notNil cg@2253: and:[ self selectedInfoIndex ~~ 0 ]]] cg@2253: cg@2253: "Modified: / 05-10-2007 / 10:51:39 / cg" cg@2253: ! cg@2253: cg@2253: canBrowseSelectedModule cg@2253: canBrowseSelectedModule isNil ifTrue:[ cg@2253: canBrowseSelectedModule := false asValue cg@2253: ]. cg@2253: ^ canBrowseSelectedModule. cg@2253: cg@2253: "Modified: / 05-10-2007 / 10:51:39 / cg" cg@2253: ! cg@2253: cg@2253: canCopyClassNameList cg@2253: ^ [table1VisibleHolder value cg@2253: and:[classInfoShown notEmptyOrNil or:[vmInfoShown notEmptyOrNil] ]] cg@2253: cg@2253: "Modified: / 05-10-2007 / 10:51:39 / cg" cg@2253: ! cg@2253: cg@2253: canUnloadSelectedModule cg@2253: canUnloadSelectedModule isNil ifTrue:[ cg@2253: canUnloadSelectedModule := false asValue cg@2253: ]. cg@2253: ^ canUnloadSelectedModule. cg@2253: cg@2253: "Modified: / 05-10-2007 / 10:51:39 / cg" cg@2253: ! cg@2253: cg@2183: infoTable1ListHolder cg@2183: ^ builder valueAspectFor:#'infoTable1ListHolder' initialValue:#() cg@2181: cg@2183: "Created: / 05-10-2007 / 12:48:06 / cg" cg@2183: ! cg@2183: cg@2183: infoTable2ListHolder cg@2183: ^ builder valueAspectFor:#'infoTable2ListHolder' initialValue:#() cg@2183: cg@2183: "Created: / 05-10-2007 / 12:48:10 / cg" cg@2181: ! cg@2181: cg@2181: listOfModuleNames cg@2181: listOfModuleNames isNil ifTrue:[ cg@2181: listOfModuleNames := List new. cg@2181: ]. cg@2181: ^ listOfModuleNames. cg@2181: cg@2181: "Modified: / 05-10-2007 / 10:49:19 / cg" cg@2181: ! cg@2181: cg@2181: middleLabelHolder cg@2181: ^ builder valueAspectFor:#'middleLabelHolder' initialValue:'' cg@2181: cg@2181: "Created: / 05-10-2007 / 11:05:08 / cg" cg@2181: ! cg@2181: cg@2184: notReadOnly cg@2184: ^ self readOnly not cg@2184: cg@2184: "Created: / 05-10-2007 / 13:06:00 / cg" cg@2184: ! cg@2184: cg@2184: readOnly cg@2184: ^ readOnly ? false cg@2184: cg@2184: "Created: / 05-10-2007 / 13:05:51 / cg" cg@2184: ! cg@2184: cg@2253: readOnly:aBoolean cg@2253: readOnly := aBoolean cg@2253: cg@2253: "Created: / 05-10-2007 / 13:05:51 / cg" cg@2253: ! cg@2253: cg@2253: selectedInfoIndex cg@2253: |sel| cg@2253: cg@2253: sel := self selectedInfoIndexHolder value. cg@2253: ^ sel cg@2253: ! cg@2253: cg@2253: selectedInfoIndexHolder cg@2253: selectedInfoIndexHolder isNil ifTrue:[ cg@2253: selectedInfoIndexHolder := ValueHolder new. cg@2253: selectedInfoIndexHolder onChangeSend:#selectedInfoIndexChanged to:self. cg@2253: ]. cg@2253: ^ selectedInfoIndexHolder. cg@2253: cg@2253: "Modified: / 05-10-2007 / 10:51:39 / cg" cg@2253: ! cg@2253: cg@2253: selectedModuleIndex cg@2253: |sel| cg@2253: cg@2253: sel := self selectedModuleIndexHolder value. cg@2253: ^ sel cg@2253: ! cg@2253: cg@2181: selectedModuleIndexHolder cg@2181: selectedModuleIndexHolder isNil ifTrue:[ cg@2181: selectedModuleIndexHolder := ValueHolder new. cg@2181: selectedModuleIndexHolder onChangeSend:#selectedModuleIndexChanged to:self. cg@2181: ]. cg@2181: ^ selectedModuleIndexHolder. cg@2181: cg@2181: "Modified: / 05-10-2007 / 10:51:39 / cg" cg@2181: ! cg@2181: cg@2181: showBuiltIn cg@2183: showBuiltIn isNil ifTrue:[ cg@2183: showBuiltIn := true asValue. cg@2183: showBuiltIn onChangeSend:#filterChanged to:self. cg@2183: ]. cg@2183: ^ showBuiltIn cg@2181: cg@2183: "Modified: / 05-10-2007 / 12:43:23 / cg" cg@2181: ! cg@2181: cg@2181: showCObjects cg@2183: showCObjects isNil ifTrue:[ cg@2183: showCObjects := true asValue. cg@2183: showCObjects onChangeSend:#filterChanged to:self. cg@2183: ]. cg@2183: ^ showCObjects cg@2181: cg@2183: "Modified: / 05-10-2007 / 12:43:16 / cg" cg@2181: ! cg@2181: cg@2181: showClassLibs cg@2183: showClassLibs isNil ifTrue:[ cg@2183: showClassLibs := true asValue. cg@2183: showClassLibs onChangeSend:#filterChanged to:self. cg@2183: ]. cg@2183: ^ showClassLibs cg@2181: cg@2183: "Modified: / 05-10-2007 / 12:43:10 / cg" cg@2181: ! cg@2181: cg@2181: showMethods cg@2183: showMethods isNil ifTrue:[ cg@2183: showMethods := true asValue. cg@2183: showMethods onChangeSend:#filterChanged to:self. cg@2183: ]. cg@2183: ^ showMethods cg@2181: cg@2183: "Modified: / 05-10-2007 / 12:43:02 / cg" cg@2181: ! cg@2181: cg@2181: showOthers cg@2183: showOthers isNil ifTrue:[ cg@2183: showOthers := true asValue. cg@2183: showOthers onChangeSend:#filterChanged to:self. cg@2183: ]. cg@2183: ^ showOthers cg@2183: cg@2183: "Modified: / 05-10-2007 / 12:42:54 / cg" cg@2183: ! cg@2181: cg@2183: table1VisibleHolder cg@2183: table1VisibleHolder isNil ifTrue:[ cg@2183: table1VisibleHolder := true asValue. cg@2183: ]. cg@2183: ^ table1VisibleHolder. cg@2183: cg@2183: "Modified: / 05-10-2007 / 12:53:05 / cg" cg@2183: ! cg@2183: cg@2183: table2VisibleHolder cg@2183: table2VisibleHolder isNil ifTrue:[ cg@2183: table2VisibleHolder := false asValue. cg@2183: ]. cg@2183: ^ table2VisibleHolder. cg@2183: cg@2183: "Modified: / 05-10-2007 / 12:53:14 / cg" cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation methodsFor:'change & update'! cg@2181: cg@2253: selectedInfoIndexChanged cg@2253: ! cg@2253: cg@2253: selectedModule cg@2253: |sel| cg@2253: cg@2253: sel := self selectedModuleIndex. cg@2253: sel isNil ifTrue:[^ nil]. cg@2253: ^ objectHandles at:sel. cg@2253: ! cg@2181: cg@2253: selectedModuleIndexChanged cg@2253: |module info| cg@2253: cg@2253: info := self selectedModuleInfo. cg@2253: module := self selectedModule. cg@2253: cg@2253: self canBrowseSelectedModule value:(info notNil and:[info ~~ #VM and:[module notNil]]). cg@2343: self canUnloadSelectedModule value:(self readOnly not and:[info ~~ #VM and:[info notNil and:[info dynamic]]]). cg@2253: cg@2253: classNamesShown := nil. cg@2253: classInfoShown := nil. cg@2253: vmInfoShown := nil. cg@2181: cg@2181: info isNil ifTrue:[ cg@2181: "/ selected a method, cObject or unknown cg@2253: self showInfoForNonClassLib:(self selectedModuleIndex). cg@2181: ^ self. cg@2181: ]. cg@2181: info == #VM ifTrue:[ cg@2181: "/ selected the pseudo entry for the VM itself cg@2181: self showInfoForVM. cg@2181: ^ self. cg@2181: ]. cg@2181: "/ selected a class-library package cg@2181: self showInfoForClassLib:info. cg@2181: cg@2183: "Modified: / 05-10-2007 / 12:56:13 / cg" cg@2181: ! cg@2181: cg@2253: selectedModuleInfo cg@2253: |sel info| cg@2253: cg@2253: sel := self selectedModuleIndex. cg@2253: sel notNil ifTrue:[ cg@2253: (self showClassLibs value or:[self showBuiltIn value]) ifTrue:[ cg@2253: info := allModules at:sel ifAbsent:nil. cg@2253: ]. cg@2253: ]. cg@2253: ^ info cg@2253: ! cg@2253: cg@2181: showInfoForClassLib:info cg@2181: "/ selected a package; fill bottom list with class-info cg@2181: cg@2402: |rows| cg@2181: cg@2181: self middleLabelHolder value:'Contains Modules:'. cg@2181: cg@2402: classNamesShown := self shownClassNamesFor:info. cg@2181: cg@2402: rows := classNamesShown collect:[:cName | cg@2181: |cls entry rev listEntry revisionInfo| cg@2181: cg@2181: listEntry := InfoRow new. cg@2181: listEntry name:cName. cg@2181: cg@2181: cls := Smalltalk classNamed:cName. cg@2181: cls isNil ifTrue:[ cg@2183: (cName endsWith:'_extensions') ifFalse:[ cg@2183: listEntry version:'(class removed)'. cg@2183: ] cg@2181: ] ifFalse:[ cg@2181: rev := cls binaryRevision. cg@2181: rev notNil ifTrue:[ cg@2181: cls isLoaded ifFalse:[ cg@2181: entry := '(stub for: ' , rev. cg@2181: ] ifTrue:[ cg@2181: entry :='(bin: ' , rev. cg@2181: ]. cg@2181: cls revision ~= rev ifTrue:[ cg@2181: entry := entry , ' / src: ' , (cls revision printString) cg@2181: ]. cg@2181: entry := entry , ')'. cg@2181: listEntry version:entry cg@2181: ] ifFalse:[ cg@2181: cls revision notNil ifTrue:[ cg@2181: listEntry version:'(overloaded by: ' , cls revision , ')' cg@2181: ] cg@2181: ]. cg@2181: revisionInfo := cls revisionInfo. cg@2181: revisionInfo notNil ifTrue:[ cg@2181: listEntry date:(revisionInfo at:#date) cg@2181: ]. cg@2181: ]. cg@2181: listEntry cg@2181: ]. cg@2181: cg@2253: classInfoShown := rows. cg@2253: cg@2183: self infoTable1ListHolder value:rows. cg@2183: self table1VisibleHolder value:true. cg@2183: self table2VisibleHolder value:false. cg@2181: cg@2183: "Modified: / 05-10-2007 / 13:03:56 / cg" cg@2181: ! cg@2181: cg@2181: showInfoForNonClassLib:sel cg@2181: "/ selected a method, cObject or unknown cg@2181: cg@2183: |module fileName list entry| cg@2181: cg@2253: sel isNil ifTrue:[ cg@2253: self table1VisibleHolder value:false. cg@2253: self table2VisibleHolder value:false. cg@2253: ^ self. cg@2253: ]. cg@2253: cg@2181: module := objectHandles at:sel. cg@2181: fileName := module pathName. cg@2181: cg@2181: module isMethodHandle ifTrue:[ cg@2181: |method nm entry1 entry2 entry3| cg@2181: cg@2183: self middleLabelHolder value:'Compiled Method:'. cg@2181: cg@2181: (method := module method) isNil ifTrue:[ cg@2181: nm := '** removed **'. cg@2181: ] ifFalse:[ cg@2181: "/ menu := PopUpMenu cg@2181: "/ labels:#('Inspect' 'Browse') cg@2181: "/ selectors:#(inspect browse). cg@2181: "/ menu actionAt:#inspect put:[ method inspect ]. cg@2181: "/ menu actionAt:#browse put:[ |who| cg@2181: "/ who := method who. cg@2181: "/ UserPreferences systemBrowserClass cg@2181: "/ openInClass:(who methodClass) cg@2181: "/ selector:(who methodSelector) cg@2181: "/ ]. cg@2181: "/ listView1 middleButtonMenu:menu. cg@2181: cg@2181: nm := (method whoString) asText emphasizeAllWith:(#color->Color blue). cg@2181: ]. cg@2181: entry1 := InfoRow new. cg@2183: entry1 name:'Compiled method'; value:nm. cg@2181: cg@2181: entry2 := InfoRow new. cg@2183: entry2 name:'Path'; value:fileName. cg@2181: cg@2181: entry3 := InfoRow new. cg@2183: entry3 name:'Address'; value:('(16r) ' , (method code address hexPrintString leftPaddedTo:8 with:$0)). cg@2181: cg@2183: self infoTable2ListHolder value:(Array with:entry1 with:entry2 with:entry3). cg@2183: self table1VisibleHolder value:false. cg@2183: self table2VisibleHolder value:true. cg@2181: ^ self. cg@2181: ]. cg@2181: cg@2181: (module isFunctionObjectHandle cg@2181: and:[module functions notEmpty]) ifTrue:[ cg@2183: self middleLabelHolder value:'Functions:'. cg@2181: cg@2181: "/ menu := PopUpMenu cg@2181: "/ labels:#('Inspect') cg@2181: "/ selectors:#(inspect). cg@2181: "/ menu actionAt:#inspect put:[ module functions inspect ]. cg@2181: "/ listView1 middleButtonMenu:menu. cg@2181: "/ cg@2181: list := (module functions select:[:f | f notNil]) cg@2181: collect:[:f | |entry| cg@2181: entry := InfoRow new. cg@2181: entry name:(f name asText emphasizeAllWith:(#color->Color blue)). cg@2183: entry value:('address: (16r) ' , (f code address hexPrintString leftPaddedTo:8 with:$0)). cg@2181: entry cg@2181: ]. cg@2183: self infoTable2ListHolder value:list. cg@2183: self table1VisibleHolder value:false. cg@2183: self table2VisibleHolder value:true. cg@2181: ^ self. cg@2181: ]. cg@2181: cg@2181: entry := InfoRow new. cg@2181: entry name:'Unknown'. cg@2183: self infoTable2ListHolder value:(Array with:entry). cg@2183: self table1VisibleHolder value:false. cg@2183: self table2VisibleHolder value:true. cg@2181: cg@2183: "Modified: / 05-10-2007 / 13:01:33 / cg" cg@2181: ! cg@2181: cg@2181: showInfoForVM cg@2181: "/ show file versions in lower view. cg@2181: cg@2181: |l| cg@2181: cg@2181: self middleLabelHolder value:'Contains Modules:'. cg@2181: cg@2181: l := (ObjectMemory getVMIdentificationStrings). cg@2181: l := l select:[:entry | entry includesString:'$Header']. cg@2181: l := l select:[:entry | entry includesString:',v']. cg@2181: l := l collect:[:entry | cg@2181: |i1 i2 file revision date listEntry| cg@2181: cg@2181: listEntry := InfoRow new. cg@2181: cg@2181: i1 := entry indexOfSubCollection:'librun'. cg@2181: i1 ~~ 0 ifTrue:[ cg@2181: i2 := entry indexOfSubCollection:',v' startingAt:i1. cg@2181: i2 ~~ 0 ifTrue:[ cg@2181: file := entry copyFrom:i1+7 to:(i2-1). cg@2181: listEntry name:file. cg@2181: cg@2181: i1 := i2+3. cg@2181: i2 := entry indexOfSeparatorStartingAt:i1. cg@2181: revision := entry copyFrom:i1 to:(i2-1). cg@2181: listEntry version:revision. cg@2181: cg@2181: i1 := i2+1. cg@2181: i2 := entry indexOfSeparatorStartingAt:i1. cg@2181: date := entry copyFrom:i1 to:(i2-1). cg@2181: listEntry date:date. cg@2181: ]. cg@2181: ]. cg@2181: listEntry. cg@2181: ]. cg@2253: cg@2253: vmInfoShown := l. cg@2183: self infoTable1ListHolder value:l. cg@2183: self table1VisibleHolder value:true. cg@2183: self table2VisibleHolder value:false. cg@2181: cg@2181: "/ readOnly ifFalse:[ cg@2181: "/ unloadButton disable. cg@2181: "/ unloadAndRemoveButton disable. cg@2181: "/ ] cg@2181: cg@2183: "Modified: / 05-10-2007 / 12:53:44 / cg" cg@2402: ! cg@2402: cg@2402: shownClassNamesFor:info cg@2402: "/ selected a package; fill bottom list with class-info cg@2402: cg@2402: |classNames| cg@2402: cg@2402: classNames := info classNames asSortedCollection. cg@2402: ^ classNames cg@2402: select:[:cName | cg@2402: |cls| cg@2402: cg@2402: cls := Smalltalk classNamed:cName. cg@2402: cls isNil ifTrue:[ cg@2402: true "a removed class" cg@2402: ] ifFalse:[ cg@2402: cls isPrivate not cg@2402: ]. cg@2402: ]. cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation methodsFor:'initialization'! cg@2181: cg@2181: postBuildWith:aBuilder cg@2181: |canDoIt| cg@2181: cg@2181: super postBuildWith:aBuilder. cg@2181: cg@2181: canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. cg@2181: self showBuiltIn value:canDoIt. cg@2181: self showCObjects value:canDoIt. cg@2181: self showClassLibs value:canDoIt. cg@2181: self showMethods value:canDoIt. cg@2181: self showOthers value:canDoIt. cg@2181: cg@2181: self updateModuleList cg@2181: cg@2181: "Created: / 05-10-2007 / 10:50:27 / cg" cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation methodsFor:'menu actions'! cg@2181: cg@2253: browseClass cg@2402: |module info classNames selectedClassName selectedClass packageID methods| cg@2253: cg@2253: module := self selectedModule. cg@2253: info := self selectedModuleInfo. cg@2402: classNames := (self shownClassNamesFor:info) asSortedCollection. cg@2253: selectedClassName := classNames at:(self selectedInfoIndex). cg@2253: selectedClass := Smalltalk classNamed:selectedClassName. cg@2253: cg@2402: selectedClass notNil ifTrue:[ cg@2402: Smalltalk browseInClass:selectedClass. cg@2402: ^ self. cg@2402: ]. cg@2402: cg@2402: "/ clicked on an extensions-module ? cg@2402: (selectedClassName endsWith:'_extensions') ifTrue:[ cg@2402: packageID := (selectedClassName copyWithoutLast:('_extensions' size)) asSymbol. cg@2402: methods := Smalltalk allExtensionsForPackage:packageID. cg@2402: (UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID). cg@2402: ]. cg@2402: self halt. cg@2253: ! cg@2253: cg@2253: browseModule cg@2253: |module classes| cg@2253: cg@2253: module := self selectedModule. cg@2253: classes := module classNames collect:[:nm | Smalltalk classNamed:nm]. cg@2253: UserPreferences systemBrowserClass cg@2253: browseClasses:classes cg@2253: label:(resources string:'Classes in %1' with:module libraryName) cg@2253: ! cg@2253: cg@2253: copyClassOrVMNameList cg@2253: |text| cg@2253: cg@2253: text := ((classInfoShown ? vmInfoShown)collect:[:eachRow | eachRow infoString]) asStringCollection asString. cg@2253: self window setClipboardText:text. cg@2253: ! cg@2253: cg@2403: menuUpdateModuleList cg@2403: self updateModuleList cg@2403: cg@2403: "Modified: / 05-10-2007 / 13:11:45 / cg" cg@2403: ! cg@2403: cg@2181: openDocumentation cg@2184: self openHTMLDocument: 'tools/misc/TOP.html#MODULEINFO' cg@2181: cg@2184: "Modified: / 05-10-2007 / 13:11:45 / cg" cg@2253: ! cg@2253: cg@2254: unloadSelectedModule cg@2254: self unloadSelectedModuleRemoveClasses:false cg@2253: ! cg@2253: cg@2254: unloadSelectedModuleAndRemoveClasses cg@2254: self unloadSelectedModuleRemoveClasses:true cg@2253: ! cg@2253: cg@2254: unloadSelectedModuleRemoveClasses:doRemoveClasses cg@2253: self withWaitCursorDo:[ cg@2253: |info idx handle pathName| cg@2253: cg@2253: info := self selectedModuleInfo. cg@2254: handle := objectHandles at:(self selectedModuleIndex). cg@2253: self selectedModuleIndexHolder value:nil. cg@2253: cg@2253: info isNil ifTrue:[ cg@2253: "/ selected a method cg@2253: "/ idx := idx - allModules size. cg@2253: pathName := handle pathName. cg@2253: ] ifFalse:[ cg@2253: "/ selected a package cg@2253: pathName := info pathName. cg@2253: ]. cg@2253: pathName notNil ifTrue:[ cg@2253: doRemoveClasses ifTrue:[ cg@2253: ObjectFileLoader unloadObjectFileAndRemoveClasses:pathName. cg@2253: ] ifFalse:[ cg@2253: ObjectFileLoader unloadObjectFile:pathName. cg@2253: ] cg@2253: ]. cg@2253: self updateModuleList. cg@2253: ] cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation methodsFor:'private'! cg@2181: cg@2183: filterChanged cg@2183: self updateModuleList cg@2183: cg@2183: "Created: / 05-10-2007 / 12:43:36 / cg" cg@2183: ! cg@2183: cg@2181: updateModuleList cg@2181: |showClassLibs showBuiltIn showMethods showCObjects showOthers cg@2181: listOfModuleNames allObjects handles| cg@2181: cg@2181: showClassLibs := self showClassLibs value. cg@2181: showBuiltIn := self showBuiltIn value. cg@2181: showMethods := self showMethods value. cg@2181: showCObjects := self showCObjects value. cg@2181: showOthers := self showOthers value. cg@2181: cg@2181: listOfModuleNames := OrderedCollection new. cg@2181: handles := OrderedCollection new. cg@2181: cg@2181: allObjects := ObjectFileLoader loadedObjectHandles. cg@2181: cg@2181: (showClassLibs or:[showBuiltIn]) ifTrue:[ cg@2181: |moduleNames| cg@2181: cg@2181: allModules := ObjectMemory binaryModuleInfo asOrderedCollection. cg@2181: (showBuiltIn and:[showClassLibs]) ifFalse:[ cg@2181: allModules := allModules select: cg@2181: [:i | cg@2181: |wantToSee| cg@2181: cg@2181: wantToSee := i dynamic. cg@2181: showBuiltIn ifTrue:[ cg@2181: wantToSee := wantToSee not cg@2181: ]. cg@2181: wantToSee cg@2181: ] cg@2181: ]. cg@2181: cg@2181: "/ sorting by reverse id brings newest ones to the top (a side effect) cg@2181: allModules sort:[:a :b | (a id) > (b id)]. cg@2181: moduleNames := allModules collect:[:entry | entry name]. cg@2181: listOfModuleNames addAll:moduleNames. cg@2181: handles addAll:allModules. cg@2181: ]. cg@2181: cg@2181: showMethods ifTrue:[ cg@2181: |methodObjects methodNames| cg@2181: cg@2181: methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. cg@2181: methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ cg@2181: 'compiled method - removed' " , ' (in ' , mH pathName , ')' " cg@2181: ] ifFalse:[ cg@2181: 'compiled method ' , mH method whoString " , ' (in ' , mH pathName , ')' " cg@2181: ]. cg@2181: ]. cg@2181: listOfModuleNames addAll:methodNames. cg@2181: handles addAll:methodObjects. cg@2181: ]. cg@2181: cg@2181: showCObjects ifTrue:[ cg@2181: |cObjects cObjectNames| cg@2181: cg@2181: cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray. cg@2181: cObjectNames := cObjects collect:[:entry | entry pathName]. cg@2181: listOfModuleNames addAll:cObjectNames. cg@2181: handles addAll:cObjects. cg@2181: ]. cg@2181: cg@2181: showOthers ifTrue:[ cg@2181: |otherObjects otherObjectNames| cg@2181: cg@2181: otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle cg@2181: or:[h isMethodHandle cg@2181: or:[h isClassLibHandle]]) not]) asArray. cg@2181: otherObjectNames := otherObjects collect:[:entry | entry pathName]. cg@2181: listOfModuleNames addAll:otherObjectNames. cg@2181: handles addAll:otherObjects. cg@2181: ]. cg@2181: cg@2181: showBuiltIn ifTrue:[ cg@2181: listOfModuleNames addFirst:'VM'. cg@2181: handles addFirst:#VM. cg@2181: allModules addFirst:#VM. cg@2181: ]. cg@2181: cg@2181: self listOfModuleNames contents:listOfModuleNames. cg@2183: objectHandles := handles. cg@2181: cg@2183: "Modified: / 05-10-2007 / 12:45:37 / cg" cg@2181: ! ! cg@2181: cg@2181: !ObjectModuleInformation::InfoRow methodsFor:'accessing'! cg@2181: cg@2181: date cg@2181: ^ date cg@2181: ! cg@2181: cg@2181: date:something cg@2181: date := something. cg@2181: ! cg@2181: cg@2181: name cg@2181: ^ name cg@2181: ! cg@2181: cg@2181: name:something cg@2181: name := something. cg@2181: ! cg@2181: cg@2181: name:nameArg version:versionArg date:dateArg cg@2181: name := nameArg. cg@2181: version := versionArg. cg@2181: date := dateArg. cg@2181: ! cg@2181: cg@2183: value cg@2183: ^ value cg@2183: ! cg@2183: cg@2183: value:something cg@2183: value := something. cg@2183: ! cg@2183: cg@2181: version cg@2181: ^ version cg@2181: ! cg@2181: cg@2181: version:something cg@2181: version := something. cg@2181: ! ! cg@2181: cg@2253: !ObjectModuleInformation::InfoRow methodsFor:'info'! cg@2253: cg@2253: infoString cg@2253: ^ name , ' ', (version ? '-') , ' ', (date ? '-') printString cg@2253: ! ! cg@2253: cg@2181: !ObjectModuleInformation class methodsFor:'documentation'! cg@2181: cg@2181: version cg@2181: ^ '$Header$' cg@2181: ! !