item selection index fixed.
authorClaus Gittinger <cg@exept.de>
Sat, 06 Sep 2008 13:16:08 +0200
changeset 2402 5db801ca0e35
parent 2401 a8bee3470347
child 2403 11c5c82a852c
item selection index fixed. +browse-methods.
Tools__ObjectModuleInformation.st
--- a/Tools__ObjectModuleInformation.st	Sat Sep 06 12:42:44 2008 +0200
+++ b/Tools__ObjectModuleInformation.st	Sat Sep 06 13:16:08 2008 +0200
@@ -701,25 +701,13 @@
 showInfoForClassLib:info
     "/ selected a package; fill bottom list with class-info
 
-    |classNames rows|
+    |rows|
 
     self middleLabelHolder value:'Contains Modules:'.
 
-    classNames := info classNames asSortedCollection.
-    classNames := classNames select:[:cName |
-                    |cls|
+    classNamesShown := self shownClassNamesFor:info.
 
-                    cls := Smalltalk classNamed:cName.
-                    cls isNil ifTrue:[
-                        true "a removed class"
-                    ] ifFalse:[
-                        cls isPrivate not
-                    ].
-                  ].
-
-    classNamesShown := classNames.
-
-    rows := classNames collect:[:cName |
+    rows := classNamesShown collect:[:cName |
                     |cls entry rev listEntry revisionInfo|
 
                     listEntry := InfoRow new.
@@ -895,6 +883,25 @@
 "/    ]
 
     "Modified: / 05-10-2007 / 12:53:44 / cg"
+!
+
+shownClassNamesFor:info
+    "/ selected a package; fill bottom list with class-info
+
+    |classNames|
+
+    classNames := info classNames asSortedCollection.
+    ^ classNames 
+        select:[:cName |
+            |cls|
+
+            cls := Smalltalk classNamed:cName.
+            cls isNil ifTrue:[
+                true "a removed class"
+            ] ifFalse:[
+                cls isPrivate not
+            ].
+        ].
 ! !
 
 !ObjectModuleInformation methodsFor:'initialization'!
@@ -919,16 +926,26 @@
 !ObjectModuleInformation methodsFor:'menu actions'!
 
 browseClass
-    |module info classNames selectedClassName selectedClass|
+    |module info classNames selectedClassName selectedClass packageID methods|
 
     module := self selectedModule.
     info := self selectedModuleInfo.
-    classNames := info classNames asSortedCollection.
+    classNames := (self shownClassNamesFor:info) asSortedCollection.
     selectedClassName := classNames at:(self selectedInfoIndex).
     selectedClass := Smalltalk classNamed:selectedClassName.
 
-    UserPreferences systemBrowserClass 
-        openInClass:selectedClass
+    selectedClass notNil ifTrue:[
+        Smalltalk browseInClass:selectedClass.
+        ^ self.
+    ].
+
+    "/ clicked on an extensions-module ?
+    (selectedClassName endsWith:'_extensions') ifTrue:[
+        packageID := (selectedClassName copyWithoutLast:('_extensions' size)) asSymbol.
+        methods := Smalltalk allExtensionsForPackage:packageID.
+        (UserPreferences browserClass) browseMethods:methods title:('Extensions for ',packageID).
+    ].
+self halt.
 !
 
 browseModule