Tools__VariableList.st
branchjv
changeset 13491 b3afe831ff0a
parent 13391 43eaa1c36082
parent 13458 842c7f563bd5
child 13530 2269bce1636d
--- a/Tools__VariableList.st	Mon Sep 02 13:53:47 2013 +0100
+++ b/Tools__VariableList.st	Wed Sep 04 11:33:19 2013 +0100
@@ -536,13 +536,14 @@
      sortByName classesAlreadyProcessed hasSmallSense smallSenseManager info |
 
     classHolder isNil ifTrue:[
-	"/ testing
-	^ #()
+        "/ testing
+        ^ #()
     ].
 
-    hasSmallSense := ConfigurableFeatures includesFeature:'SmallSenseEnabled'.
+    hasSmallSense := (ConfigurableFeatures includesFeature:'SmallSenseEnabled')
+                        and:[(Smalltalk at: #'SmallSense::Manager') notNil].
     hasSmallSense ifTrue:[
-	smallSenseManager := (Smalltalk at: #'SmallSense::Manager') instance.
+        smallSenseManager := (Smalltalk at: #'SmallSense::Manager') instance.
     ].
 
     showingClassVars := self showClassVarsInVariableList value == true.
@@ -552,13 +553,13 @@
     classes := classHolder value.
     (numClasses := classes size) == 0 ifTrue:[^ #() ].
     numClasses > 1 ifTrue:[
-	"/ multiple classes - see if there is a common subclass ...
-	commonSubclass := self commonSubClassIn:classes.
-	commonSubclass notNil ifTrue:[
-	    "/ yes - treat like a single class
-	    classes := Array with:(commonSubclass).
-	    numClasses := 1.
-	].
+        "/ multiple classes - see if there is a common subclass ...
+        commonSubclass := self commonSubClassIn:classes.
+        commonSubclass notNil ifTrue:[
+            "/ yes - treat like a single class
+            classes := Array with:(commonSubclass).
+            numClasses := 1.
+        ].
 "/        commonSuperclass := Behavior commonSuperclassOf:classes.
 "/        commonSuperclass notNil ifTrue:[
 "/            "/ yes - treat like a single class
@@ -568,86 +569,85 @@
     ].
 
     numClasses > 1 ifTrue:[
-	"/ multiple classes - sort alphabetically ...
-	"/ unless there is a common subclass ...
-	nameList := Set new.
-	classesAlreadyProcessed := IdentitySet new.
-	classes do:[:eachClass |
-	    |class|
+        "/ multiple classes - sort alphabetically ...
+        "/ unless there is a common subclass ...
+        nameList := Set new.
+        classesAlreadyProcessed := IdentitySet new.
+        classes do:[:eachClass |
+            |class|
 
-	   class := eachClass.
+           class := eachClass.
 "/            showingClassVars ifTrue:[
 "/                class := class theNonMetaclass
 "/            ].
 
-	    hasSmallSense ifTrue:[
-		info := smallSenseManager infoForClassOrNil: class.
-	    ].
+            hasSmallSense ifTrue:[
+                info := smallSenseManager infoForClassOrNil: class.
+            ].
 
-	    (classesAlreadyProcessed includes:class) ifFalse:[
-		showingClassVars ifTrue:[
-		    self showingInheritedClassVars ifTrue:[
-			class theNonMetaclass withAllSuperclassesDo:[:cls|
-			    hasSmallSense ifTrue:[
-				info := smallSenseManager infoForClassOrNil: cls.
-			    ].
-			    (classesAlreadyProcessed includes:cls) ifFalse:[
-				nameList addAll:
-				   (cls classVarNames collect:[:nm|self listEntryForClass: cls name: nm info: info]).
-				classesAlreadyProcessed add:cls.
-			    ]
-			]
-		    ] ifFalse:[
-			nameList addAll:
-			    (class classVarNames collect:[:nm|self listEntryForClass: class name: nm info: info ])
-		    ]
-		] ifFalse:[
-		    class withAllSuperclassesDo:[:cls|
-			(classesAlreadyProcessed includes:cls) ifFalse:[
-			    nameList addAll:
-				    (cls instVarNames collect:[:nm|self listEntryForClass: cls name: nm info: info ]).
-			    classesAlreadyProcessed add:cls.
-			]
-		    ]
-		]
-	    ]
-	].
-	nameList := nameList asOrderedCollection.
+            (classesAlreadyProcessed includes:class) ifFalse:[
+                showingClassVars ifTrue:[
+                    self showingInheritedClassVars ifTrue:[
+                        class theNonMetaclass withAllSuperclassesDo:[:cls|
+                            hasSmallSense ifTrue:[
+                                info := smallSenseManager infoForClassOrNil: cls.
+                            ].
+                            (classesAlreadyProcessed includes:cls) ifFalse:[
+                                nameList addAll:
+                                   (cls classVarNames collect:[:nm|self listEntryForClass: cls name: nm info: info]).
+                                classesAlreadyProcessed add:cls.
+                            ]
+                        ]
+                    ] ifFalse:[
+                        nameList addAll:
+                            (class classVarNames collect:[:nm|self listEntryForClass: class name: nm info: info ])
+                    ]
+                ] ifFalse:[
+                    class withAllSuperclassesDo:[:cls|
+                        (classesAlreadyProcessed includes:cls) ifFalse:[
+                            nameList addAll:
+                                    (cls instVarNames collect:[:nm|self listEntryForClass: cls name: nm info: info ]).
+                            classesAlreadyProcessed add:cls.
+                        ]
+                    ]
+                ]
+            ]
+        ].
+        nameList := nameList asOrderedCollection.
     ] ifFalse:[
-	"/ only a single class - sort by inheritance
-	class := classes first.
+        "/ only a single class - sort by inheritance
+        class := classes first.
 
-	nameList := OrderedCollection new.
-	class notNil ifTrue:[
-	    showingClassVars ifTrue:[
-		class := class theNonMetaclass
-	    ].
-	    class withAllSuperclassesDo:[:cls|
-		|varNames|
+        nameList := OrderedCollection new.
+        class notNil ifTrue:[
+            showingClassVars ifTrue:[
+                class := class theNonMetaclass
+            ].
+            class withAllSuperclassesDo:[:cls|
+                |varNames|
 
-		(hasSmallSense and:[showingClassVars not]) ifTrue:[
-		    info := smallSenseManager infoForClassOrNil: cls.
-		].
-		varNames := showingClassVars ifTrue:[ cls classVarNames ] ifFalse:[ cls instVarNames ].
-		varNames copy reverse do:[:varName|
-		    nameList addFirst: (self listEntryForClass: cls name: varName info: info).
-		].
-		sortByName ifFalse:[
-		    nameList addFirst:(("'----- ' , "cls nameInBrowser" , ' -----'") asText colorizeAllWith: Color gray).
-		]
-	    ].
-	].
+                (hasSmallSense and:[showingClassVars not]) ifTrue:[
+                    info := smallSenseManager infoForClassOrNil: cls.
+                ].
+                varNames := showingClassVars ifTrue:[ cls classVarNames ] ifFalse:[ cls instVarNames ].
+                varNames copy reverse do:[:varName|
+                    nameList addFirst: (self listEntryForClass: cls name: varName info: info).
+                ].
+                sortByName ifFalse:[
+                    nameList addFirst:(("'----- ' , "cls nameInBrowser" , ' -----'") asText colorizeAllWith: Color gray).
+                ]
+            ].
+        ].
     ].
 
     (numClasses > 1 or:[sortByName]) ifTrue:[
-	nameList := nameList asSortedCollection:[:a :b|a name < b name].
+        nameList := nameList asSortedCollection:[:a :b|a name < b name].
     ].
     ^ nameList
 
     "Created: / 05-02-2000 / 13:42:11 / cg"
     "Modified: / 08-08-2011 / 16:20:58 / cg"
-    "Modified: / 27-11-2011 / 17:29:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (comment): / 16-12-2011 / 01:27:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 02-09-2013 / 13:13:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 postBuildWith:aBuilder
@@ -864,7 +864,7 @@
 !VariableList class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__VariableList.st,v 1.22 2013-08-27 12:57:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__VariableList.st,v 1.24 2013-09-02 12:14:09 vrany Exp $'
 !
 
 version_HG
@@ -875,3 +875,4 @@
 version_SVN
     ^ '$Id: Tools__VariableList.st 8083 2013-01-14 11:48:37Z vranyj1 $'
 ! !
+