explain shared pool variables
authorClaus Gittinger <cg@exept.de>
Mon, 11 Jun 2007 13:05:36 +0200
changeset 2037 003d9b5a2788
parent 2036 989b8836fc32
child 2038 ae0f419831c8
explain shared pool variables
Explainer.st
--- a/Explainer.st	Mon Jun 04 22:25:56 2007 +0200
+++ b/Explainer.st	Mon Jun 11 13:05:36 2007 +0200
@@ -449,8 +449,9 @@
      message selector. I.e. the explanation should be context sensitive.
      Also, there could be much more detailed explanations."
 
-    ^ self
-        explain:someText in:source forClass:aClass short:false
+    ^ self explain:someText in:source forClass:aClass short:false
+
+    "Modified: / 07-06-2007 / 11:34:05 / cg"
 !
 
 explain:someText in:source forClass:aClass short:shortText
@@ -563,6 +564,7 @@
         ^ stringText , ' (' , valString , ').'
     ].
 
+    "private classes"
     c := aClass theNonMetaclass.
     c privateClasses do:[:pClass |
         (pClass name = string 
@@ -575,6 +577,18 @@
         ].
     ].
 
+    aClass theNonMetaclass sharedPools do:[:eachPoolName |
+        |sharedPool|
+
+        sharedPool := Smalltalk classNamed:eachPoolName.
+        sharedPool notNil ifTrue:[
+            (sharedPool includesKey:string asSymbol) ifTrue:[
+                ^ string :=  stringText , ' is a pool variable (in ',sharedPool name,')'.
+            ].
+        ].
+    ].
+
+    "namespace & global variables"
     (spc := aClass nameSpace) notNil ifTrue:[
         sym := (spc name , '::' , string) asSymbolIfInterned.
         sym notNil ifTrue:[
@@ -632,7 +646,7 @@
 
     "Created: / 03-12-1995 / 12:47:37 / cg"
     "Modified: / 16-04-1997 / 12:46:11 / stefan"
-    "Modified: / 06-03-2007 / 14:01:28 / cg"
+    "Modified: / 07-06-2007 / 11:45:22 / cg"
 !
 
 explainGlobal:string inClass:aClass short:shortText
@@ -1236,5 +1250,5 @@
 !Explainer class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Explainer.st,v 1.84 2007-04-07 21:43:00 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Explainer.st,v 1.85 2007-06-11 11:05:36 cg Exp $'
 ! !