Tools__ObjectModuleInformation.st
changeset 2763 c36ead4db5bc
parent 2739 8efd89a9863d
child 2773 a3e5bbb440f4
equal deleted inserted replaced
2762:0c66aa3bfdff 2763:c36ead4db5bc
   264                   enabled: canBrowseSelectedModulesExtensions
   264                   enabled: canBrowseSelectedModulesExtensions
   265                   label: 'Browse Extensions'
   265                   label: 'Browse Extensions'
   266                   itemValue: browseModuleExtensions
   266                   itemValue: browseModuleExtensions
   267                   translateLabel: true
   267                   translateLabel: true
   268                 )
   268                 )
       
   269              (MenuItem
       
   270                 enabled: canBrowseSelectedModulesProjectDefinition
       
   271                 label: 'Browse ProjectDefinition'
       
   272                 itemValue: browseModulesProjectDefinition
       
   273                 translateLabel: true
       
   274               )
   269          (MenuItem
   275          (MenuItem
   270             label: 'Find a Class...'
   276             label: 'Find a Class...'
   271             itemValue: findClass
   277             itemValue: findClass
   272             translateLabel: true
   278             translateLabel: true
   273           )
   279           )
   408           )
   414           )
   409          (MenuItem
   415          (MenuItem
   410             enabled: canBrowseSelectedModulesExtensions
   416             enabled: canBrowseSelectedModulesExtensions
   411             label: 'Browse Extensions'
   417             label: 'Browse Extensions'
   412             itemValue: browseModuleExtensions
   418             itemValue: browseModuleExtensions
       
   419             translateLabel: true
       
   420           )
       
   421          (MenuItem
       
   422             enabled: canBrowseSelectedModulesProjectDefinition
       
   423             label: 'Browse ProjectDefinition'
       
   424             itemValue: browseModulesProjectDefinition
   413             translateLabel: true
   425             translateLabel: true
   414           )
   426           )
   415          (MenuItem
   427          (MenuItem
   416             label: 'Find a Class...'
   428             label: 'Find a Class...'
   417             itemValue: findClass
   429             itemValue: findClass
   609         canBrowseSelectedModulesExtensions := false asValue
   621         canBrowseSelectedModulesExtensions := false asValue
   610     ].
   622     ].
   611     ^ canBrowseSelectedModulesExtensions.
   623     ^ canBrowseSelectedModulesExtensions.
   612 
   624 
   613     "Modified: / 05-10-2007 / 10:51:39 / cg"
   625     "Modified: / 05-10-2007 / 10:51:39 / cg"
       
   626 !
       
   627 
       
   628 canBrowseSelectedModulesProjectDefinition
       
   629     ^ [ self projectDefinitionClassOfSelectedModule notNil ]
   614 !
   630 !
   615 
   631 
   616 canCopyClassNameList
   632 canCopyClassNameList
   617     ^ [table1VisibleHolder value 
   633     ^ [table1VisibleHolder value 
   618     and:[classInfoShown notEmptyOrNil or:[vmInfoShown notEmptyOrNil] ]]
   634     and:[classInfoShown notEmptyOrNil or:[vmInfoShown notEmptyOrNil] ]]
  1200     packageID := (name copyWithoutLast:('_extensions' size)) asSymbol.
  1216     packageID := (name copyWithoutLast:('_extensions' size)) asSymbol.
  1201     methods := Smalltalk allExtensionsForPackage:packageID.
  1217     methods := Smalltalk allExtensionsForPackage:packageID.
  1202     (UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID).
  1218     (UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID).
  1203 !
  1219 !
  1204 
  1220 
       
  1221 browseModulesProjectDefinition
       
  1222     |projectDefinitionClass|
       
  1223 
       
  1224     projectDefinitionClass := self projectDefinitionClassOfSelectedModule.
       
  1225     projectDefinitionClass notNil ifTrue:[
       
  1226         (UserPreferences browserClass) openInClass:projectDefinitionClass class
       
  1227     ].
       
  1228 !
       
  1229 
  1205 copyClassOrVMNameList
  1230 copyClassOrVMNameList
  1206     |text|
  1231     |text|
  1207 
  1232 
  1208     text := ((classInfoShown ? vmInfoShown)collect:[:eachRow | eachRow infoString]) asStringCollection asString.
  1233     text := ((classInfoShown ? vmInfoShown)collect:[:eachRow | eachRow infoString]) asStringCollection asString.
  1209     self window setClipboardText:text.
  1234     self window setClipboardText:text.
  1358     self updateModuleList
  1383     self updateModuleList
  1359 
  1384 
  1360     "Created: / 05-10-2007 / 12:43:36 / cg"
  1385     "Created: / 05-10-2007 / 12:43:36 / cg"
  1361 !
  1386 !
  1362 
  1387 
       
  1388 projectDefinitionClassOfSelectedModule
       
  1389     |info packageID projectDefinitionClass|
       
  1390 
       
  1391     info := self selectedModuleInfo.
       
  1392     info isNil ifTrue:[^ nil].
       
  1393 
       
  1394     info classNames 
       
  1395         detect:[:nm | 
       
  1396             |cls|
       
  1397 
       
  1398             cls := Smalltalk at:nm. 
       
  1399             cls notNil ifTrue:[
       
  1400                 packageID := cls package.
       
  1401                 true
       
  1402             ] ifFalse:[
       
  1403                 false
       
  1404             ]
       
  1405         ]
       
  1406         ifNone:[^ nil].
       
  1407 
       
  1408     projectDefinitionClass := packageID asPackageId projectDefinitionClass.
       
  1409     ^ projectDefinitionClass
       
  1410 !
       
  1411 
  1363 updateModuleList
  1412 updateModuleList
  1364     |showClassLibs showBuiltIn showMethods showCObjects showOthers
  1413     |showClassLibs showBuiltIn showMethods showCObjects showOthers
  1365      listOfModuleNames allObjects handles methodObjects |
  1414      listOfModuleNames allObjects handles methodObjects |
  1366 
  1415 
  1367     showClassLibs := self showClassLibs value.
  1416     showClassLibs := self showClassLibs value.