NewSystemBrowser.st
changeset 9546 f28ed3386f64
parent 9541 a0881b0914ab
child 9549 ee9ddddf9d0e
--- a/NewSystemBrowser.st	Thu Aug 12 15:53:28 2010 +0200
+++ b/NewSystemBrowser.st	Sat Aug 14 12:06:29 2010 +0200
@@ -15985,78 +15985,6 @@
     "Modified: / 17-08-2006 / 16:47:34 / cg"
 !
 
-showClassAspect:codeAspect forClass:aClass
-    |theNonMetaclass|
-
-    theNonMetaclass := aClass theNonMetaclass.
-    codeAspect == #classComment ifTrue:[
-        self showClassComment:theNonMetaclass.
-        ^ self.
-    ].
-    codeAspect == #classHierarchy ifTrue:[
-        self showClassHierarchy:theNonMetaclass.
-        ^ self.
-    ].
-
-    ((codeAspect == #primitiveDefinitions)
-    or:[ (codeAspect == #primitiveFunctions)
-    or:[ (codeAspect == #primitiveVariables) ]]) ifTrue:[
-        self showClassPrimitive:codeAspect class:aClass theNonMetaclass.
-        ^ self.
-    ].
-    self setAcceptActionForClass.
-    self showClassDefinition:aClass.
-!
-
-showClassVarInfoFor:var in:aClass value:val
-    |text valText lines|
-
-    text := '%1 (%2) : %3'.
-    val isNumber ifTrue:[
-        text := '%1 (%2) : %3 (%4)'.
-        valText := val printString.
-    ] ifFalse:[
-        val isLiteral ifTrue:[
-            text := '%1 (%2) : %4'.
-            lines := val storeString asCollectionOfLines.
-            valText := lines first contractTo:30.
-            valText := valText copy.
-            valText replaceAllForWhich:[:ch | ch isControlCharacter] with:$?.
-            lines size > 1 ifTrue:[
-                valText := valText , '...'.
-            ].
-        ] ifFalse:[
-            val isCollection ifTrue:[
-                text := '%1 (%2) : %3 (%4)'.
-                valText := val isEmpty
-                            ifTrue:['empty']
-                            ifFalse:['size: ' , val size printString].
-            ] ifFalse:[
-                val isBehavior ifTrue:[
-                    (val isSubclassOf:Error) ifTrue:[
-                        text := '%1 (%2) : %4 (an Error subclass)'.
-                        valText := val name.
-                    ] ifFalse:[
-                        (val isSubclassOf:Exception) ifTrue:[
-                            text := '%1 (%2) : %4 (an Exception subclass)'.
-                            valText := val name.
-                        ] ifFalse:[
-                            text := '%1 (%2) : %4'.
-                            valText := val name.
-                        ]
-                    ]
-                ]
-            ]
-        ].
-    ].
-    text := text
-                bindWith:var allBold
-                with:(aClass name)
-                with:(val class nameWithArticle)
-                with:valText.
-    self showInfo:text.
-!
-
 update:something with:aParameter from:changedObject
     |codeView mthd codeAspect isForAspect|
 
@@ -37685,6 +37613,29 @@
     ]
 !
 
+showClassAspect:codeAspect forClass:aClass
+    |theNonMetaclass|
+
+    theNonMetaclass := aClass theNonMetaclass.
+    codeAspect == #classComment ifTrue:[
+        self showClassComment:theNonMetaclass.
+        ^ self.
+    ].
+    codeAspect == #classHierarchy ifTrue:[
+        self showClassHierarchy:theNonMetaclass.
+        ^ self.
+    ].
+
+    ((codeAspect == #primitiveDefinitions)
+    or:[ (codeAspect == #primitiveFunctions)
+    or:[ (codeAspect == #primitiveVariables) ]]) ifTrue:[
+        self showClassPrimitive:codeAspect class:aClass theNonMetaclass.
+        ^ self.
+    ].
+    self setAcceptActionForClass.
+    self showClassDefinition:aClass.
+!
+
 showClassComment:aClass
     |code codeView|
 
@@ -37716,6 +37667,7 @@
     self setAcceptActionForClass.
 
     aClass isNil ifTrue:[ ^ self ].
+    (aClass isClass or:[aClass isMetaclass]) ifFalse:[ ^ self ].
 
     definition := self classDefinitionStringFor:aClass.
 
@@ -37748,7 +37700,7 @@
     ].
     self updatePackageInfoForClass:aClass.
 
-    "Modified: / 15.11.2001 / 18:20:43 / cg"
+    "Modified: / 14-08-2010 / 12:05:08 / cg"
 !
 
 showClassDocumentation
@@ -37836,6 +37788,55 @@
     self showClassPrimitive:#primitiveVariables class:aClass
 !
 
+showClassVarInfoFor:var in:aClass value:val
+    |text valText lines|
+
+    text := '%1 (%2) : %3'.
+    val isNumber ifTrue:[
+        text := '%1 (%2) : %3 (%4)'.
+        valText := val printString.
+    ] ifFalse:[
+        val isLiteral ifTrue:[
+            text := '%1 (%2) : %4'.
+            lines := val storeString asCollectionOfLines.
+            valText := lines first contractTo:30.
+            valText := valText copy.
+            valText replaceAllForWhich:[:ch | ch isControlCharacter] with:$?.
+            lines size > 1 ifTrue:[
+                valText := valText , '...'.
+            ].
+        ] ifFalse:[
+            val isCollection ifTrue:[
+                text := '%1 (%2) : %3 (%4)'.
+                valText := val isEmpty
+                            ifTrue:['empty']
+                            ifFalse:['size: ' , val size printString].
+            ] ifFalse:[
+                val isBehavior ifTrue:[
+                    (val isSubclassOf:Error) ifTrue:[
+                        text := '%1 (%2) : %4 (an Error subclass)'.
+                        valText := val name.
+                    ] ifFalse:[
+                        (val isSubclassOf:Exception) ifTrue:[
+                            text := '%1 (%2) : %4 (an Exception subclass)'.
+                            valText := val name.
+                        ] ifFalse:[
+                            text := '%1 (%2) : %4'.
+                            valText := val name.
+                        ]
+                    ]
+                ]
+            ]
+        ].
+    ].
+    text := text
+                bindWith:var allBold
+                with:(aClass name)
+                with:(val class nameWithArticle)
+                with:valText.
+    self showInfo:text.
+!
+
 showCode:aString
     self showCode:aString scrollToTop:true
 
@@ -38083,7 +38084,7 @@
 updatePackageInfoForClass:aClass
     |packageLabel loadInfo revisionInfo revision lastUser|
 
-    aClass notNil ifTrue:[
+    (aClass notNil and:[aClass isClass or:[aClass isMetaclass]]) ifTrue:[
         "/ packageLabel := 'Base: ' , (aClass package ? '?').
         packageLabel := (aClass package ? '?') allBold.
 
@@ -38108,7 +38109,7 @@
     ].
     navigationState packageLabelHolder value:packageLabel.
 
-    "Modified: / 22-09-2006 / 17:02:40 / cg"
+    "Modified: / 14-08-2010 / 12:04:39 / cg"
 !
 
 updatePackageInfoForMethod:aMethod
@@ -44572,11 +44573,11 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1475 2010-08-11 12:33:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1476 2010-08-14 10:06:29 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1475 2010-08-11 12:33:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1476 2010-08-14 10:06:29 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!