6 instanceVariableNames:'readOnly listOfModuleNames selectedModuleIndexHolder allModules |
6 instanceVariableNames:'readOnly listOfModuleNames selectedModuleIndexHolder allModules |
7 objectHandles showOthers showCObjects showBuiltIn showMethods |
7 objectHandles showOthers showCObjects showBuiltIn showMethods |
8 showClassLibs table1VisibleHolder table2VisibleHolder |
8 showClassLibs table1VisibleHolder table2VisibleHolder |
9 selectedInfoIndexHolder canBrowseSelectedModule |
9 selectedInfoIndexHolder canBrowseSelectedModule |
10 canUnloadSelectedModule classNamesShown classInfoShown |
10 canUnloadSelectedModule classNamesShown classInfoShown |
11 vmInfoShown canUnloadSelectedModulesPackage' |
11 vmInfoShown canUnloadSelectedModulesPackage |
|
12 canBrowseSelectedModulesExtensions' |
12 classVariableNames:'' |
13 classVariableNames:'' |
13 poolDictionaries:'' |
14 poolDictionaries:'' |
14 category:'Monitors-ST/X' |
15 category:'Monitors-ST/X' |
15 ! |
16 ! |
16 |
17 |
372 enabled: canBrowseSelectedModule |
373 enabled: canBrowseSelectedModule |
373 label: 'Browse' |
374 label: 'Browse' |
374 itemValue: browseModule |
375 itemValue: browseModule |
375 translateLabel: true |
376 translateLabel: true |
376 ) |
377 ) |
|
378 (MenuItem |
|
379 enabled: canBrowseSelectedModulesExtensions |
|
380 label: 'Browse Extensions' |
|
381 itemValue: browseModuleExtensions |
|
382 translateLabel: true |
|
383 ) |
377 (MenuItem |
384 (MenuItem |
378 enabled: canCopyClassNameList |
385 enabled: canCopyClassNameList |
379 label: 'Copy Version Info to Clipboard' |
386 label: 'Copy Version Info to Clipboard' |
380 itemValue: copyClassOrVMNameList |
387 itemValue: copyClassOrVMNameList |
381 translateLabel: true |
388 translateLabel: true |
428 enabled: canBrowseSelectedModule |
435 enabled: canBrowseSelectedModule |
429 label: 'Browse the Selected Module''s Classes' |
436 label: 'Browse the Selected Module''s Classes' |
430 itemValue: browseModule |
437 itemValue: browseModule |
431 translateLabel: true |
438 translateLabel: true |
432 isButton: true |
439 isButton: true |
433 labelImage: (ResourceRetriever ToolbarIconLibrary systemBrowser24x24Icon2) |
440 labelImage: (ResourceRetriever ToolbarIconLibrary startSystemBrowserIcon) |
|
441 ) |
|
442 (MenuItem |
|
443 enabled: canBrowseSelectedModulesExtensions |
|
444 label: 'Browse the Selected Module''s Extensions' |
|
445 itemValue: browseModuleExtensions |
|
446 translateLabel: true |
|
447 isButton: true |
|
448 labelImage: (ResourceRetriever ToolbarIconLibrary browseClassExtensionsIcon) |
434 ) |
449 ) |
435 ) |
450 ) |
436 nil |
451 nil |
437 nil |
452 nil |
438 ) |
453 ) |
530 ^ canBrowseSelectedModule. |
545 ^ canBrowseSelectedModule. |
531 |
546 |
532 "Modified: / 05-10-2007 / 10:51:39 / cg" |
547 "Modified: / 05-10-2007 / 10:51:39 / cg" |
533 ! |
548 ! |
534 |
549 |
|
550 canBrowseSelectedModulesExtensions |
|
551 canBrowseSelectedModulesExtensions isNil ifTrue:[ |
|
552 canBrowseSelectedModulesExtensions := false asValue |
|
553 ]. |
|
554 ^ canBrowseSelectedModulesExtensions. |
|
555 |
|
556 "Modified: / 05-10-2007 / 10:51:39 / cg" |
|
557 ! |
|
558 |
535 canCopyClassNameList |
559 canCopyClassNameList |
536 ^ [table1VisibleHolder value |
560 ^ [table1VisibleHolder value |
537 and:[classInfoShown notEmptyOrNil or:[vmInfoShown notEmptyOrNil] ]] |
561 and:[classInfoShown notEmptyOrNil or:[vmInfoShown notEmptyOrNil] ]] |
538 |
562 |
539 "Modified: / 05-10-2007 / 10:51:39 / cg" |
563 "Modified: / 05-10-2007 / 10:51:39 / cg" |
714 sel isNil ifTrue:[^ nil]. |
742 sel isNil ifTrue:[^ nil]. |
715 ^ objectHandles at:sel. |
743 ^ objectHandles at:sel. |
716 ! |
744 ! |
717 |
745 |
718 selectedModuleIndexChanged |
746 selectedModuleIndexChanged |
719 |module info| |
747 |module info canBrowse canUnload canBrowseExtensions| |
720 |
748 |
721 info := self selectedModuleInfo. |
749 info := self selectedModuleInfo. |
722 module := self selectedModule. |
750 module := self selectedModule. |
723 |
751 |
724 self canBrowseSelectedModule value:(info notNil and:[info ~~ #VM and:[module notNil]]). |
752 canBrowse := info notNil and:[info ~~ #VM and:[module notNil]]. |
725 self canUnloadSelectedModule value:(self readOnly not and:[info ~~ #VM and:[info notNil and:[info dynamic]]]). |
753 canUnload := info notNil and:[info ~~ #VM and:[info dynamic and:[self readOnly not]]]. |
|
754 canBrowseExtensions := canBrowse |
|
755 and:[ info classNames contains:[:nm | self isExtensionName:nm] ]. |
|
756 |
|
757 self canBrowseSelectedModule value:canBrowse. |
|
758 self canBrowseSelectedModulesExtensions value:canBrowseExtensions. |
|
759 self canUnloadSelectedModule value:canUnload. |
726 |
760 |
727 classNamesShown := nil. |
761 classNamesShown := nil. |
728 classInfoShown := nil. |
762 classInfoShown := nil. |
729 vmInfoShown := nil. |
763 vmInfoShown := nil. |
730 |
764 |
795 listEntry := InfoRow new. |
830 listEntry := InfoRow new. |
796 listEntry name:cName. |
831 listEntry name:cName. |
797 |
832 |
798 cls := Smalltalk classNamed:cName. |
833 cls := Smalltalk classNamed:cName. |
799 cls isNil ifTrue:[ |
834 cls isNil ifTrue:[ |
800 (cName endsWith:'_extensions') ifFalse:[ |
835 (self isExtensionName:cName) ifFalse:[ |
801 versionString := '(class removed)'. |
836 versionString := '(class removed)'. |
802 ] ifTrue:[ |
837 ] ifTrue:[ |
803 libraryDefinition notNil ifTrue:[ |
838 libraryDefinition notNil ifTrue:[ |
804 mgr := libraryDefinition sourceCodeManager. |
839 mgr := libraryDefinition sourceCodeManager. |
805 versionString := libraryDefinition perform:(mgr nameOfVersionMethodForExtensions) ifNotUnderstood:nil. |
840 versionString := libraryDefinition perform:(mgr nameOfVersionMethodForExtensions) ifNotUnderstood:nil. |
1015 ! ! |
1050 ! ! |
1016 |
1051 |
1017 !ObjectModuleInformation methodsFor:'menu actions'! |
1052 !ObjectModuleInformation methodsFor:'menu actions'! |
1018 |
1053 |
1019 browseClass |
1054 browseClass |
1020 |module info classNames selectedClassName selectedClass packageID methods| |
1055 |module info classNames selectedClassName selectedClass| |
1021 |
1056 |
1022 module := self selectedModule. |
1057 module := self selectedModule. |
1023 info := self selectedModuleInfo. |
1058 info := self selectedModuleInfo. |
1024 classNames := (self shownClassNamesFor:info) asSortedCollection. |
1059 classNames := (self shownClassNamesFor:info) asSortedCollection. |
1025 selectedClassName := classNames at:(self selectedInfoIndex). |
1060 selectedClassName := classNames at:(self selectedInfoIndex). |
1029 Smalltalk browseInClass:selectedClass. |
1064 Smalltalk browseInClass:selectedClass. |
1030 ^ self. |
1065 ^ self. |
1031 ]. |
1066 ]. |
1032 |
1067 |
1033 "/ clicked on an extensions-module ? |
1068 "/ clicked on an extensions-module ? |
1034 (selectedClassName endsWith:'_extensions') ifTrue:[ |
1069 (self isExtensionName:selectedClassName) ifTrue:[ |
1035 packageID := (selectedClassName copyWithoutLast:('_extensions' size)) asSymbol. |
1070 self browseModuleExtensions. |
1036 methods := Smalltalk allExtensionsForPackage:packageID. |
|
1037 (UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID). |
|
1038 ^ self. |
1071 ^ self. |
1039 ]. |
1072 ]. |
1040 self halt. |
1073 |
|
1074 self breakPoint:#cg. |
1041 ! |
1075 ! |
1042 |
1076 |
1043 browseModule |
1077 browseModule |
1044 |module classes| |
1078 |module classes| |
1045 |
1079 |
1046 module := self selectedModule. |
1080 module := self selectedModule. |
1047 classes := module classNames collect:[:nm | Smalltalk classNamed:nm]. |
1081 classes := module classNames collect:[:nm | Smalltalk classNamed:nm]. |
1048 UserPreferences systemBrowserClass |
1082 UserPreferences systemBrowserClass |
1049 browseClasses:classes |
1083 browseClasses:classes |
1050 label:(resources string:'Classes in %1' with:module libraryName) |
1084 label:(resources string:'Classes in %1' with:module libraryName) |
|
1085 ! |
|
1086 |
|
1087 browseModuleExtensions |
|
1088 |module name packageID methods| |
|
1089 |
|
1090 module := self selectedModule. |
|
1091 |
|
1092 name := module classNames detect:[:nm | self isExtensionName:nm]. |
|
1093 packageID := (name copyWithoutLast:('_extensions' size)) asSymbol. |
|
1094 methods := Smalltalk allExtensionsForPackage:packageID. |
|
1095 (UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID). |
1051 ! |
1096 ! |
1052 |
1097 |
1053 copyClassOrVMNameList |
1098 copyClassOrVMNameList |
1054 |text| |
1099 |text| |
1055 |
1100 |