Tools__ObjectModuleInformation.st
author Claus Gittinger <cg@exept.de>
Sat, 21 Jul 2012 18:58:03 +0200
changeset 2898 c7f6c498df6a
parent 2860 5788b9c7c19b
child 2957 299bc0925dab
permissions -rw-r--r--
category of:15 methods
     1 "{ Package: 'stx:libtool2' }"
     2 
     3 "{ NameSpace: Tools }"
     4 
     5 ToolApplicationModel subclass:#ObjectModuleInformation
     6 	instanceVariableNames:'readOnly listOfModuleNames selectedModuleIndexHolder allModules
     7 		objectHandles showOthers showCObjects showBuiltIn showMethods
     8 		showClassLibs table1VisibleHolder table2VisibleHolder
     9 		selectedInfoIndexHolder canBrowseSelectedModule
    10 		canUnloadSelectedModule classNamesShown classInfoShown
    11 		vmInfoShown canUnloadSelectedModulesPackage
    12 		canBrowseSelectedModulesExtensions canUnloadSelectedDLL'
    13 	classVariableNames:''
    14 	poolDictionaries:''
    15 	category:'Monitors-ST/X'
    16 !
    17 
    18 Object subclass:#InfoRow
    19 	instanceVariableNames:'name version date value'
    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:]
    33         Claus Gittinger
    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
    50     ^ 'Object Module Info'
    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     "
    65      UIPainter new openOnClass:Tools::ObjectModuleInformation andSelector:#windowSpec
    66      Tools::ObjectModuleInformation new openInterface:#windowSpec
    67      Tools::ObjectModuleInformation open
    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'
    88               layout: (LayoutFrame 0 0 0 0 0 1 40 0)
    89               menu: toolbarMenu
    90               textDefault: true
    91             )
    92            (VariableVerticalPanelSpec
    93               name: 'VariableVerticalPanel1'
    94               layout: (LayoutFrame 0 0 40 0 0 1 0 1)
    95               component: 
    96              (SpecCollection
    97                 collection: (
    98                  (SequenceViewSpec
    99                     name: 'List1'
   100                     model: selectedModuleIndexHolder
   101                     menu: moduleMenu
   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)
   122                           visibilityChannel: table1VisibleHolder
   123                           model: selectedInfoIndexHolder
   124                           menu: moduleItemMenu
   125                           hasHorizontalScrollBar: true
   126                           hasVerticalScrollBar: true
   127                           dataList: infoTable1ListHolder
   128                           columnHolder: tableColumns
   129                           separatorOneDColor: (Color 66.999313344015 66.999313344015 66.999313344015)
   130                         )
   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                         )
   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     "
   168      MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#mainMenu
   169      (Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation mainMenu)) startUp
   170     "
   171 
   172     <resource: #menu>
   173 
   174     ^ 
   175      #(Menu
   176         (
   177          (MenuItem
   178             label: 'File'
   179             translateLabel: true
   180             submenu: 
   181            (Menu
   182               (
   183                (MenuItem
   184                   label: 'Exit'
   185                   itemValue: closeRequest
   186                   translateLabel: true
   187                 )
   188                )
   189               nil
   190               nil
   191             )
   192           )
   193          (MenuItem
   194             label: 'View'
   195             translateLabel: true
   196             submenu: 
   197            (Menu
   198               (
   199                (MenuItem
   200                   label: 'Dynamically Loaded ClassLibraries Only'
   201                   itemValue: showOnlyDynamicallyLoadedClassLibraries
   202                   translateLabel: true
   203                   hideMenuOnActivated: false
   204                 )
   205                (MenuItem
   206                   label: '-'
   207                 )
   208                (MenuItem
   209                   label: 'Builtin'
   210                   translateLabel: true
   211                   hideMenuOnActivated: false
   212                   indication: showBuiltIn
   213                 )
   214                (MenuItem
   215                   label: 'Class Libraries'
   216                   translateLabel: true
   217                   hideMenuOnActivated: false
   218                   indication: showClassLibs
   219                 )
   220                (MenuItem
   221                   label: 'Methods'
   222                   translateLabel: true
   223                   hideMenuOnActivated: false
   224                   indication: showMethods
   225                 )
   226                (MenuItem
   227                   label: 'C-Objects'
   228                   translateLabel: true
   229                   hideMenuOnActivated: false
   230                   indication: showCObjects
   231                 )
   232                (MenuItem
   233                   label: 'Others'
   234                   translateLabel: true
   235                   hideMenuOnActivated: false
   236                   indication: showOthers
   237                 )
   238                (MenuItem
   239                   label: '-'
   240                 )
   241                (MenuItem
   242                   label: 'Update'
   243                   itemValue: menuUpdateModuleList
   244                   translateLabel: true
   245                 )
   246                )
   247               nil
   248               nil
   249             )
   250           )
   251          (MenuItem
   252             label: 'Module'
   253             translateLabel: true
   254             submenu: 
   255            (Menu
   256               (
   257                (MenuItem
   258                   enabled: canBrowseSelectedModule
   259                   label: 'Browse'
   260                   itemValue: browseModule
   261                   translateLabel: true
   262                 )
   263                (MenuItem
   264                   enabled: canBrowseSelectedModulesExtensions
   265                   label: 'Browse Extensions'
   266                   itemValue: browseModuleExtensions
   267                   translateLabel: true
   268                 )
   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                 )
   280                (MenuItem
   281                   label: '-'
   282                 )
   283                (MenuItem
   284                   enabled: canCopyClassNameList
   285                   label: 'Copy Version Info to Clipboard'
   286                   itemValue: copyClassOrVMNameList
   287                   translateLabel: true
   288                 )
   289                (MenuItem
   290                   label: '-'
   291                 )
   292                (MenuItem
   293                   label: 'Load Package...'
   294                   itemValue: loadPackage
   295                   translateLabel: true
   296                 )
   297                (MenuItem
   298                   label: '-'
   299                 )
   300                (MenuItem
   301                   enabled: canUnloadSelectedModulesPackage
   302                   label: 'Unload Package...'
   303                   itemValue: unloadSelectedModulesPackage
   304                   translateLabel: true
   305                 )
   306                (MenuItem
   307                   enabled: canUnloadSelectedDLL
   308                   label: 'Remove Classes && Unload DLL...'
   309                   itemValue: unloadSelectedModuleAndRemoveClasses
   310                   translateLabel: true
   311                 )
   312                (MenuItem
   313                   enabled: canUnloadSelectedModule
   314                   label: 'Unload DLL...'
   315                   itemValue: unloadSelectedModule
   316                   translateLabel: true
   317                 )
   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                 )
   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       )
   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         (
   384          (MenuItem
   385             enabled: canBrowseSelectedClass
   386             label: 'Browse'
   387             itemValue: browseClass
   388             translateLabel: true
   389           )
   390          (MenuItem
   391             label: '-'
   392           )
   393          (MenuItem
   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           )
   428          (MenuItem
   429             enabled: canBrowseSelectedModulesExtensions
   430             label: 'Browse Extensions'
   431             itemValue: browseModuleExtensions
   432             translateLabel: true
   433           )
   434          (MenuItem
   435             enabled: canBrowseSelectedModulesProjectDefinition
   436             label: 'Browse ProjectDefinition'
   437             itemValue: browseModulesProjectDefinition
   438             translateLabel: true
   439           )
   440          (MenuItem
   441             label: 'Find a Class...'
   442             itemValue: findClass
   443             translateLabel: true
   444           )
   445          (MenuItem
   446             label: '-'
   447           )
   448          (MenuItem
   449             enabled: canCopyClassNameList
   450             label: 'Copy Version Info to Clipboard'
   451             itemValue: copyClassOrVMNameList
   452             translateLabel: true
   453           )
   454          (MenuItem
   455             label: '-'
   456           )
   457          (MenuItem
   458             enabled: canUnloadSelectedModulesPackage
   459             label: 'Unload Package...'
   460             itemValue: unloadSelectedModulesPackage
   461             translateLabel: true
   462           )
   463          (MenuItem
   464             enabled: canUnloadSelectedModule
   465             label: 'Remove Classes && Unload DLL...'
   466             itemValue: unloadSelectedModuleAndRemoveClasses
   467             translateLabel: true
   468           )
   469          (MenuItem
   470             enabled: canUnloadSelectedDLL
   471             label: 'Unload DLL...'
   472             itemValue: unloadSelectedModule
   473             translateLabel: true
   474           )
   475          (MenuItem
   476             label: 'Inspect'
   477             itemValue: inspectSelectedObject
   478             translateLabel: true
   479           )
   480          (MenuItem
   481             label: '-'
   482           )
   483          (MenuItem
   484             label: 'Update'
   485             itemValue: menuUpdateModuleList
   486             translateLabel: true
   487           )
   488          )
   489         nil
   490         nil
   491       )
   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
   512             label: 'Update'
   513             itemValue: menuUpdateModuleList
   514             translateLabel: true
   515             isButton: true
   516             labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon)
   517           )
   518          (MenuItem
   519             label: '-'
   520           )
   521          (MenuItem
   522             enabled: canBrowseSelectedModule
   523             label: 'Browse the Selected Module''s Classes'
   524             itemValue: browseModule
   525             translateLabel: true
   526             isButton: true
   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)
   536           )
   537          )
   538         nil
   539         nil
   540       )
   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     
   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     
   616 ! !
   617 
   618 !ObjectModuleInformation methodsFor:'aspects'!
   619 
   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 
   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 
   646 canBrowseSelectedModulesProjectDefinition
   647     ^ [ self projectDefinitionClassOfSelectedModule notNil ]
   648 !
   649 
   650 canCopyClassNameList
   651     ^ [table1VisibleHolder value 
   652     and:[classInfoShown notEmptyOrNil or:[vmInfoShown notEmptyOrNil] ]]
   653 
   654     "Modified: / 05-10-2007 / 10:51:39 / cg"
   655 !
   656 
   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 
   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 
   675 canUnloadSelectedModulesPackage
   676     canUnloadSelectedModulesPackage isNil ifTrue:[
   677         canUnloadSelectedModulesPackage := false asValue
   678     ].
   679     ^ canUnloadSelectedModulesPackage.
   680 !
   681 
   682 infoTable1ListHolder
   683     ^ builder valueAspectFor:#'infoTable1ListHolder' initialValue:#()
   684 
   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"
   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 
   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 
   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 
   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
   762     showBuiltIn isNil ifTrue:[
   763         showBuiltIn := true asValue.
   764         showBuiltIn onChangeSend:#filterChanged to:self.
   765     ].
   766     ^ showBuiltIn
   767 
   768     "Modified: / 05-10-2007 / 12:43:23 / cg"
   769 !
   770 
   771 showCObjects
   772     showCObjects isNil ifTrue:[
   773         showCObjects := true asValue.
   774         showCObjects onChangeSend:#filterChanged to:self.
   775     ].
   776     ^ showCObjects
   777 
   778     "Modified: / 05-10-2007 / 12:43:16 / cg"
   779 !
   780 
   781 showClassLibs
   782     showClassLibs isNil ifTrue:[
   783         showClassLibs := true asValue.
   784         showClassLibs onChangeSend:#filterChanged to:self.
   785     ].
   786     ^ showClassLibs
   787 
   788     "Modified: / 05-10-2007 / 12:43:10 / cg"
   789 !
   790 
   791 showMethods
   792     showMethods isNil ifTrue:[
   793         showMethods := true asValue.
   794         showMethods onChangeSend:#filterChanged to:self.
   795     ].
   796     ^ showMethods
   797 
   798     "Modified: / 05-10-2007 / 12:43:02 / cg"
   799 !
   800 
   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 
   810 showOthers
   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 !
   819 
   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"
   836 ! !
   837 
   838 !ObjectModuleInformation methodsFor:'change & update'!
   839 
   840 isExtensionName:nm
   841     ^ (nm endsWith:'_extensions')
   842 !
   843 
   844 selectedInfoIndexChanged
   845 !
   846 
   847 selectedModule
   848     |sel|
   849 
   850     sel := self selectedModuleIndex.
   851     sel isNil ifTrue:[^ nil].
   852     ^ objectHandles at:sel.
   853 !
   854 
   855 selectedModuleIndexChanged
   856     | info |
   857 
   858     info := self selectedModuleInfo.
   859 
   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.
   865 
   866     classNamesShown := nil.
   867     classInfoShown := nil.
   868     vmInfoShown := nil.
   869 
   870     info isNil ifTrue:[
   871         "/ selected a cObject or unknown
   872         self showInfoForNonClassLib:(self selectedModuleIndex).
   873         ^ self.
   874     ].
   875     info == #VM ifTrue:[
   876         "/ selected the pseudo entry for the VM itself
   877         self showInfoForVM.
   878         ^ self.
   879     ].
   880 
   881     "/ selected a class-library package
   882     self showInfoForClassLib:info.
   883 
   884     "Modified: / 05-10-2007 / 12:56:13 / cg"
   885 !
   886 
   887 selectedModuleInfo
   888     |sel|
   889 
   890     sel := self selectedModuleIndex.
   891     sel notNil ifTrue:[
   892         (self showClassLibs value or:[self showBuiltIn value]) ifTrue:[
   893             ^ allModules at:sel ifAbsent:nil.
   894         ].
   895     ].
   896     ^ nil
   897 !
   898 
   899 selectedObjectHandle
   900     |sel|
   901 
   902     sel := self selectedModuleIndex.
   903     sel isNil ifTrue:[^ nil].
   904     ^ objectHandles at:sel.
   905 !
   906 
   907 showInfoForClassLib:info
   908     "selected a lib-package; fill bottom list with class-info"
   909 
   910     |rows projectDefinitionClass mgr canUnload canUnloadPackage|
   911 
   912     self middleLabelHolder value:'Components:'.
   913 
   914     projectDefinitionClass := self selectedModulesProjectDefinitionClass.
   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.
   923     canUnloadPackage := canUnload 
   924                 and:[projectDefinitionClass notNil
   925                 and:[projectDefinitionClass projectIsLoaded]].
   926     self canUnloadSelectedModulesPackage value:canUnloadPackage.
   927 
   928 
   929     classNamesShown := self shownClassNamesFor:info.
   930     rows := classNamesShown collect:[:eachClassName |
   931                     |cls entry rev binRev listEntry revisionInfo versionString dateString|
   932 
   933                     listEntry := InfoRow new.
   934                     listEntry name:eachClassName.
   935 
   936                     cls := Smalltalk classNamed:eachClassName.
   937                     cls isNil ifTrue:[
   938                         (self isExtensionName:eachClassName) ifTrue:[
   939                             projectDefinitionClass notNil ifTrue:[
   940                                 mgr := projectDefinitionClass sourceCodeManager.
   941                                 versionString := projectDefinitionClass perform:(mgr nameOfVersionMethodForExtensions) ifNotUnderstood:nil.
   942                                 versionString notNil ifTrue:[
   943                                     versionString := '(bin: ',(mgr revisionInfoFromString:versionString) revision,')'.
   944                                 ]
   945                             ].
   946                         ] ifFalse:[
   947                             versionString := '(class removed)'.
   948                         ].
   949                     ] ifFalse:[
   950                         binRev := cls binaryRevision.
   951                         binRev notNil ifTrue:[
   952                             cls isLoaded ifTrue:[
   953                                 entry :='(bin: ' , binRev.
   954                             ] ifFalse:[
   955                                 entry := '(stub for: ' , binRev.
   956                             ].    
   957                             (rev := cls revision) ~= binRev ifTrue:[
   958                                 entry := entry , ' / src: ' , (rev printString)
   959                             ].
   960                             entry := entry , ')'.
   961                             versionString := entry
   962                         ] ifFalse:[
   963                             cls revision notNil ifTrue:[
   964                                 versionString := '(overloaded by: ' , cls revision , ')' 
   965                             ]
   966                         ].
   967                         revisionInfo := cls revisionInfo.
   968                         revisionInfo notNil ifTrue:[
   969                             dateString := revisionInfo at:#date.
   970                         ].
   971                     ].
   972                     listEntry version:versionString.
   973                     listEntry date:dateString.
   974                   ].
   975 
   976     classInfoShown := rows.
   977 
   978     self infoTable1ListHolder value:rows.
   979     self table1VisibleHolder value:true.
   980     self table2VisibleHolder value:false.
   981 
   982     "Modified: / 29-09-2011 / 15:40:42 / cg"
   983 !
   984 
   985 showInfoForNonClassLib:sel
   986     "selected a method, cObject or unknown"
   987 
   988     |module fileName list newEntry|
   989 
   990     sel isNil ifTrue:[
   991         self table1VisibleHolder value:false.
   992         self table2VisibleHolder value:false.
   993         ^ self.
   994     ].
   995 
   996     module := objectHandles at:sel.
   997     fileName := module pathName.
   998 
   999     self canUnloadSelectedDLL value:true.
  1000 
  1001     module isMethodHandle ifTrue:[
  1002         |method nm entries|
  1003 
  1004         self canUnloadSelectedModule value:self readOnly not.
  1005 
  1006         self middleLabelHolder value:'Compiled Method:'.
  1007 
  1008         (method := module method) isNil ifTrue:[
  1009             nm := '** removed **'.
  1010         ] ifFalse:[
  1011             self canBrowseSelectedModule value:true.
  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 
  1024             nm := (method whoString) colorizeAllWith:Color blue.
  1025         ].
  1026         entries := OrderedCollection new.
  1027         newEntry := InfoRow new.
  1028         newEntry name:'Compiled method'; value:nm.
  1029         entries add:newEntry.
  1030 
  1031         newEntry := InfoRow new.
  1032         newEntry name:'Path'; value:fileName.
  1033         entries add:newEntry.
  1034 
  1035         (method notNil and:[method code notNil]) ifTrue:[
  1036             newEntry := InfoRow new.
  1037             newEntry name:'Address'; value:('(16r) ' , (method code address hexPrintString leftPaddedTo:8 with:$0)).
  1038             entries add:newEntry.
  1039         ].
  1040 
  1041         self infoTable2ListHolder value:entries.
  1042         self table1VisibleHolder value:false.
  1043         self table2VisibleHolder value:true.
  1044         ^ self.
  1045     ].
  1046 
  1047     (module isFunctionObjectHandle 
  1048     and:[module functions notEmpty]) ifTrue:[
  1049         self middleLabelHolder value:'Functions:'.
  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.
  1060                                         entry name:(f name colorizeAllWith:Color blue).
  1061                                         entry value:('address: (16r) ' , (f code address hexPrintString leftPaddedTo:8 with:$0)).
  1062                                         entry
  1063                                 ].
  1064         self infoTable2ListHolder value:list.
  1065         self table1VisibleHolder value:false.
  1066         self table2VisibleHolder value:true.
  1067         ^ self.
  1068     ].
  1069 
  1070     newEntry := InfoRow new.
  1071     newEntry name:'Unknown'.
  1072     self infoTable2ListHolder value:(Array with:newEntry).
  1073     self table1VisibleHolder value:false.
  1074     self table2VisibleHolder value:true.
  1075 
  1076     "Modified: / 05-10-2007 / 13:01:33 / cg"
  1077 !
  1078 
  1079 showInfoForVM
  1080     "show file versions of vm info in lower view."
  1081 
  1082     |l|
  1083 
  1084     self canBrowseSelectedModule value:false.
  1085     self middleLabelHolder value:'VM Components:'.
  1086 
  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|
  1092 
  1093                 listEntry := InfoRow new.
  1094 
  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.
  1101 
  1102                         i1 := i2+3.
  1103                         i2 := entry indexOfSeparatorStartingAt:i1.
  1104                         revision := entry copyFrom:i1 to:(i2-1).
  1105                         listEntry version:revision.
  1106 
  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.
  1114             ].
  1115 
  1116     vmInfoShown := l.
  1117     self infoTable1ListHolder value:l.
  1118     self table1VisibleHolder value:true.
  1119     self table2VisibleHolder value:false.
  1120 
  1121 "/    readOnly ifFalse:[
  1122 "/        unloadButton disable.
  1123 "/        unloadAndRemoveButton disable.
  1124 "/    ]
  1125 
  1126     "Modified: / 05-10-2007 / 12:53:44 / cg"
  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         ].
  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 
  1169 browseClass
  1170     |info classNames selectedClassName selectedClass|
  1171 
  1172     info := self selectedModuleInfo.
  1173     classNames := (self shownClassNamesFor:info) asSortedCollection.
  1174     selectedClassName := classNames at:(self selectedInfoIndex).
  1175     selectedClass := Smalltalk classNamed:selectedClassName.
  1176 
  1177     selectedClass notNil ifTrue:[
  1178         Smalltalk browseInClass:selectedClass.
  1179         ^ self.
  1180     ].
  1181 
  1182     "/ clicked on an extensions-module ?
  1183     (self isExtensionName:selectedClassName) ifTrue:[
  1184         self browseModuleExtensions.
  1185         ^ self.
  1186     ].
  1187 
  1188     self breakPoint:#cg.
  1189 !
  1190 
  1191 browseModule
  1192     |moduleInfoOrHandle classes method|
  1193 
  1194     moduleInfoOrHandle := self selectedObjectHandle.
  1195     "/ what a hack
  1196     (moduleInfoOrHandle isKindOf: ObjectMemory::BinaryModuleDescriptor) ifTrue:[
  1197         classes := moduleInfoOrHandle classNames collect:[:nm | Smalltalk classNamed:nm].
  1198         UserPreferences systemBrowserClass 
  1199             browseClasses:classes
  1200             label:(resources string:'Classes in %1' with:moduleInfoOrHandle libraryName)
  1201     ] ifFalse:[
  1202         moduleInfoOrHandle isMethodHandle ifTrue:[
  1203             method := moduleInfoOrHandle method.
  1204             (method notNil and:[method mclass notNil]) ifFalse:[
  1205                 Dialog information:'The method has been redefined/removed'.
  1206                 ^ self.
  1207             ].
  1208             UserPreferences systemBrowserClass 
  1209                 openInMethod:method
  1210         ]
  1211     ].
  1212 !
  1213 
  1214 browseModuleExtensions
  1215     |info name packageID methods|
  1216 
  1217     info := self selectedModuleInfo.
  1218 
  1219     name := info classNames detect:[:nm | self isExtensionName:nm].
  1220     packageID := (name copyWithoutLast:('_extensions' size)) asSymbol.
  1221     methods := Smalltalk allExtensionsForPackage:packageID.
  1222     (UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID).
  1223 !
  1224 
  1225 browseModulesProjectDefinition
  1226     |projectDefinitionClass|
  1227 
  1228     projectDefinitionClass := self projectDefinitionClassOfSelectedModule.
  1229     projectDefinitionClass notNil ifTrue:[
  1230         (UserPreferences browserClass) openInClass:projectDefinitionClass class
  1231     ].
  1232 !
  1233 
  1234 copyClassOrVMNameList
  1235     |text|
  1236 
  1237     text := ((classInfoShown ? vmInfoShown)collect:[:eachRow | eachRow infoString]) asStringCollection asString.
  1238     self window setClipboardText:text.
  1239 !
  1240 
  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 
  1278 inspectSelectedObject
  1279     self selectedObjectHandle inspect.
  1280 !
  1281 
  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 
  1296 menuUpdateModuleList
  1297     self updateModuleList
  1298 
  1299     "Modified: / 05-10-2007 / 13:11:45 / cg"
  1300 !
  1301 
  1302 openDocumentation
  1303     self openHTMLDocument: 'tools/misc/TOP.html#MODULEINFO'
  1304 
  1305     "Modified: / 05-10-2007 / 13:11:45 / cg"
  1306 !
  1307 
  1308 selectedModulesProjectDefinitionClass
  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|
  1314 
  1315     info := self selectedModuleInfo.
  1316     classNames := (self shownClassNamesFor:info) asSortedCollection.
  1317     definitionClasses := classNames ? #()
  1318                                 collect:[:nm | Smalltalk classNamed:nm]
  1319                                 thenSelect:[:cls | cls isProjectDefinition].
  1320 
  1321     definitionClasses size == 1 ifTrue:[
  1322         ^ definitionClasses first
  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         ].
  1329     ].
  1330 
  1331     ^ nil
  1332 !
  1333 
  1334 unloadSelectedModule
  1335     self unloadSelectedModuleRemoveConnectedObjects:false
  1336 !
  1337 
  1338 unloadSelectedModuleAndRemoveClasses
  1339     self unloadSelectedModuleRemoveConnectedObjects:true
  1340 !
  1341 
  1342 unloadSelectedModuleRemoveConnectedObjects:doRemoveClasses 
  1343     |module handle|
  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 
  1349 proper package-deinstallation procedures. Please use this only in repair situations and when the 
  1350 regular unloadPackage operation fails.
  1351 
  1352 Continue ?') 
  1353                 ifFalse:[ ^ self ].
  1354     ].
  1355     handle := module handle.
  1356     handle notNil ifTrue:[
  1357         self 
  1358             withWaitCursorDo:[
  1359                 self selectedModuleIndexHolder value:nil.
  1360                 doRemoveClasses ifTrue:[
  1361                     handle removeConnectedObjects.
  1362                 ].
  1363                 handle unload.
  1364                 self updateModuleList.
  1365             ].
  1366     ]
  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.
  1381 ! !
  1382 
  1383 !ObjectModuleInformation methodsFor:'private'!
  1384 
  1385 filterChanged
  1386     self updateModuleList
  1387 
  1388     "Created: / 05-10-2007 / 12:43:36 / cg"
  1389 !
  1390 
  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 
  1415 updateModuleList
  1416     |showClassLibs showBuiltIn showMethods showCObjects showOthers
  1417      listOfModuleNames allObjects handles methodObjects |
  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.
  1429     methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
  1430 
  1431     (showClassLibs or:[showBuiltIn]) ifTrue:[
  1432         |moduleNames|
  1433 
  1434         allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
  1435         allModules := allModules select:
  1436                                     [:i |
  1437                                         |wantToSee|
  1438 
  1439                                         wantToSee := false.
  1440                                         i dynamic ifTrue:[
  1441                                             showClassLibs ifTrue:[
  1442                                                 i isSingleMethod ifFalse:[
  1443                                                     wantToSee := true
  1444                                                 ].
  1445                                             ].
  1446                                         ] ifFalse:[
  1447                                             showBuiltIn ifTrue:[
  1448                                                 wantToSee := true
  1449                                             ].
  1450                                         ].
  1451                                         wantToSee
  1452                                     ].
  1453 
  1454         "/ sorting by reverse id brings newest ones to the top (a side effect)
  1455         allModules sort:[:a :b | (a name) < (b name)].
  1456         moduleNames := allModules collect:[:entry | entry name].
  1457         listOfModuleNames addAll:moduleNames.
  1458         handles addAll:allModules.
  1459     ].
  1460 
  1461     showMethods ifTrue:[
  1462         |methodNames|
  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.
  1501     objectHandles := handles.
  1502     self selectedModuleIndexChanged.
  1503 
  1504     "Modified: / 05-10-2007 / 12:45:37 / cg"
  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 
  1531 value
  1532     ^ value
  1533 !
  1534 
  1535 value:something
  1536     value := something.
  1537 !
  1538 
  1539 version
  1540     ^ version
  1541 !
  1542 
  1543 version:something
  1544     version := something.
  1545 ! !
  1546 
  1547 !ObjectModuleInformation::InfoRow methodsFor:'info'!
  1548 
  1549 infoString
  1550     ^ name , ' ', (version ? '-') , ' ', (date ? '-') printString
  1551 ! !
  1552 
  1553 !ObjectModuleInformation class methodsFor:'documentation'!
  1554 
  1555 version
  1556     ^ '$Header$'
  1557 !
  1558 
  1559 version_CVS
  1560     ^ '$Header$'
  1561 ! !