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