--- a/InspectorView.st Wed Oct 07 08:07:02 2015 +0100
+++ b/InspectorView.st Sat Oct 10 06:57:42 2015 +0200
@@ -2869,6 +2869,9 @@
(sel startsWith:'-all inst vars') ifTrue:[
^ self stringWithAllInstVarValues
].
+ (sel startsWith:'-all class vars') ifTrue:[
+ ^ self stringWithAllClassVarValues
+ ].
(sel startsWith:'-all indexed vars') ifTrue:[
^ self stringWithAllIndexedVarValues
].
@@ -2945,6 +2948,45 @@
"Created: / 13-06-2012 / 12:50:26 / cg"
!
+stringWithAllClassVarValues
+ ^ self stringWithAllClassVarValuesFor:object level:0
+!
+
+stringWithAllClassVarValuesFor:anObject level:lvl
+ |s names maxLen|
+
+ s := CharacterWriteStream on:''.
+ names := anObject allClassVarNames.
+ true "sortOrder == #alphabetical" ifTrue:[
+ names := names copy sort
+ ].
+ maxLen := (names collect:[:eachName | eachName size]) max.
+ names do:[:eachClassVarName |
+ |val valString|
+
+ IsDebuggingQuery answer:true do:[
+ val := (anObject whichClassDefinesClassVar:eachClassVarName asSymbol) classVarAt:eachClassVarName.
+ ].
+ s spaces:lvl.
+ s nextPutAll:((eachClassVarName , ' ') paddedTo:maxLen+1 with:$.).
+ s nextPutAll:' : '.
+
+ ((ExpandArraysInAllLists == true) and:[val isSequenceable and:[ val class isPointers] ]) ifTrue:[
+ s cr.
+ self appendDisplayStringForElementsOf:val indent:lvl pad:maxLen+1+1 to:s.
+ ] ifFalse:[
+ valString := self basicDisplayStringForValue:val.
+ (valString includes:Character cr) ifTrue:[
+ valString := valString copyTo:(valString indexOf:Character cr)-1.
+ valString := valString , '...'.
+ ].
+ s nextPutAll:valString.
+ s cr.
+ ].
+ ].
+ ^ s contents
+!
+
stringWithAllIndexedVarValues
|nIdx s names maxLen varString padLeft|
@@ -3577,6 +3619,9 @@
list add:'-' , 'dependents' allItalic, (self valueStringInListEntryForValue:object dependents size).
].
].
+ object isClass ifTrue:[
+ list add:'-' , 'all class vars' allItalic.
+ ].
cls instSize > 0 ifTrue:[
list add:'-' , 'all inst vars' allItalic.
].