class: InspectorView
authorClaus Gittinger <cg@exept.de>
Tue, 05 May 2015 13:14:36 +0200
changeset 15613 00f739f2e1ef
parent 15612 8c9467f951db
child 15614 de6d6fe7464d
class: InspectorView added: #iconForValueClass: #imageFor_collectionHolder #imageFor_numberHolder changed: #iconForValue: #imageFor_floats
InspectorView.st
--- a/InspectorView.st	Tue May 05 13:06:23 2015 +0200
+++ b/InspectorView.st	Tue May 05 13:14:36 2015 +0200
@@ -475,6 +475,29 @@
         ]
 !
 
+imageFor_collectionHolder
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self imageFor_collectionHolder inspect
+     ImageEditor openOnClass:self andSelector:#imageFor_collectionHolder
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:'InspectorView imageFor_collectionHolder'
+        ifAbsentPut:[(Depth8Image new) width:16; height:16; bits:(ByteArray fromPackedString:'
+C@0LC@ HB@ HB@ HC@0LC@0LC@0HB@ HB@ HB@0LC@0LC@ HB@ HB@ HB@ HB@0LC@0HB@ 0M#P4M#@HB@ LC@0LB@ 2ACL3L3LDL  HC@0LC@ 2ACL3L3L4
+MPP2B@0LC@0HM P3L3L3MCTDK0 LC@0LBCPDL3L3MCT5AB8HC@0LC@ 4ACLDMSPDK0P.B@0LC@0HM P5MST5K28DK0 LC@0LBCHDMST5K"81AB4HC@0LC@ H
+L P.K"81AB4HB@0LC@0HB@ 2K28.K24HB@ LC@0LB@ HB@ HB@ HB@ HC@0LC@0LB@ HB@ HB@ LC@0LC@0LC@ HB@ HB@ HC@0LC@@a') ; colorMapFromArray:#[0 0 0 74 74 0 94 99 0 240 240 240 255 255 255 132 132 0 143 148 0 142 131 128 226 226 226 151 156 0 107 107 0 87 90 0 60 59 55 230 230 230 206 173 99 156 131 74 206 165 66 115 82 16 255 181 16 189 132 0 132 99 16 206 149 0 198 181 123 255 181 49 222 156 0 99 75 0 239 173 0 255 181 0 148 107 0 140 115 49 198 173 123 255 173 0 90 66 0 132 91 0 206 182 99 156 115 0 198 141 0 74 50 0 255 189 16 214 148 0 90 57 0 189 140 0 107 74 0 206 148 16 214 156 8 156 74 99 115 16 49 140 49 74 198 123 148 90 0 33 218 112 214 255 0 255 208 32 144 199 21 133 186 85 211]; mask:((ImageMask new) width:16; height:16; bits:(ByteArray fromPackedString:'<@?0C<@C1>OO<=?;7?/_>=?;7?/_><?31>O@@?@O<@<b') ; yourself); yourself]
+!
+
 imageFor_collections
     <resource: #image>
     "This resource specification was automatically generated
@@ -651,38 +674,26 @@
 !
 
 imageFor_floats
-    <resource: #image>
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
+
     "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
+
     "
      self imageFor_floats inspect
      ImageEditor openOnClass:self andSelector:#imageFor_floats
-     Icon flushCachedIcons"
-    
-    ^ Icon constantNamed:'InspectorView class imageFor_floats'
-        ifAbsentPut:[
-            (Depth8Image new)
-                width:16;
-                height:16;
-                photometric:(#palette);
-                bitsPerSample:(#[ 8 ]);
-                samplesPerPixel:(1);
-                bits:(ByteArray 
-                            fromPackedString:'
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:'InspectorView imageFor_floats'
+        ifAbsentPut:[(Depth8Image new) width:16; height:16; bits:(ByteArray fromPackedString:'
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6LD5MLCX@@@@@@@@@@@ADRTEAOC-FQ@@@@@@@@@A@MT 2BS\;
-Q$U@@@@@@@@@LD!!HBP%HRTX>M@@@@@@@@D4<RC\IS#MFP4H@@@@@@@AMNS$9BSUCP3)B@@@@@@@@LCL3R0%EP4)GLP@@@@@@@D@>O $IBS8IQ2<@@@@@@@@@
-K$1LP$]GQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
-                colorMapFromArray:#[ 226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 0 231 4 0 132 0 0 156 5 139 142 128 52 255 49 0 181 6 161 255 140 0 222 4 33 255 37 0 74 0 0 99 5 0 107 0 0 148 5 0 189 0 0 90 3 8 255 12 16 255 24 0 173 6 206 173 99 156 131 74 206 165 66 115 82 16 255 181 16 189 132 0 132 99 16 206 149 0 198 181 123 255 181 49 255 189 33 222 156 0 99 75 0 239 173 0 255 181 0 255 181 140 148 107 0 140 115 49 198 173 123 255 173 0 90 66 0 132 91 0 206 182 99 156 115 0 198 141 0 74 50 0 255 189 16 214 148 0 90 57 0 189 140 0 107 74 0 206 148 16 214 156 8 ];
-                mask:((ImageMask new)
-                            width:16;
-                            height:16;
-                            bits:(ByteArray 
-                                        fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b');
-                            yourself);
-                yourself
-        ]
+Q$U@@@@@@@@@LD!!HBP%HRTX>M@@@@@@@@D4<RC\IS#MFP4H@@@@@@@AMNS$9BSUCP3)B@@@@@@@@LCL3R0%EBP%GLP@@@@@@@D@>O $IQP$IQ2<@@@@@@@@@
+K$1LP$]GQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 0 231 4 0 132 0 0 156 5 139 142 128 52 255 49 0 181 6 161 255 140 0 222 4 33 255 37 0 74 0 0 99 5 0 107 0 0 148 5 0 189 0 0 90 3 8 255 12 16 255 24 0 173 6 206 173 99 156 131 74 206 165 66 115 82 16 255 181 16 189 132 0 132 99 16 206 149 0 198 181 123 255 181 49 255 189 33 222 156 0 99 75 0 239 173 0 255 181 0 255 181 140 148 107 0 140 115 49 198 173 123 255 173 0 90 66 0 132 91 0 206 182 99 156 115 0 198 141 0 74 50 0 255 189 16 214 148 0 90 57 0 189 140 0 107 74 0 206 148 16 214 156 8]; mask:((ImageMask new) width:16; height:16; bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself]
 !
 
 imageFor_fractions
@@ -866,6 +877,29 @@
         ]
 !
 
+imageFor_numberHolder
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self imageFor_numberHolder inspect
+     ImageEditor openOnClass:self andSelector:#imageFor_numberHolder
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:'InspectorView imageFor_numberHolder'
+        ifAbsentPut:[(Depth8Image new) width:16; height:16; bits:(ByteArray fromPackedString:'
+C@0LC@ HB@ HB@ HC@0LC@0LC@0HB@ HB@ HB@0LC@0LC@ HB@ HB@ HB@ HB@0LC@0HB@ VDB,+DAXHB@ LC@0LB@ "I1<_F1($H  HC@0LC@ ^ERXRAA\Z
+IBL^B@0LC@0HDBX&A@P&I2P\E@ LC@0LBB,[I!!\DKAL$HR@HC@0LC@ +FA XAAT!!HQ$ B@0LC@0HDALSJPP#HR %DP LC@0LBA8\G@PDAA0(IP<HC@0LC@ H
+C"(*HBT%IQ4HB@0LC@0HB@ ^DR@ DP<HB@ LC@0LB@ HB@ HB@ HB@ HC@0LC@0LB@ HB@ HB@ LC@0LC@0LC@ HB@ HB@ HC@0LC@@a') ; colorMapFromArray:#[0 0 0 74 74 0 94 99 0 240 240 240 255 255 255 132 132 0 143 148 0 142 131 128 226 226 226 151 156 0 107 107 0 87 90 0 60 59 55 230 230 230 206 173 99 156 131 74 206 165 66 115 82 16 255 181 16 189 132 0 132 99 16 206 149 0 198 181 123 255 181 49 222 156 0 99 75 0 239 173 0 255 181 0 148 107 0 140 115 49 198 173 123 255 173 0 90 66 0 132 91 0 206 182 99 156 115 0 198 141 0 74 50 0 255 189 16 214 148 0 90 57 0 189 140 0 107 74 0 206 148 16 214 156 8]; mask:((ImageMask new) width:16; height:16; bits:(ByteArray fromPackedString:'<@?0C<@C1>OO<=?;7?/_>=?;7?/_><?31>O@@?@O<@<b') ; yourself); yourself]
+!
+
 imageFor_others
     <resource: #image>
     "This resource specification was automatically generated
@@ -1118,67 +1152,126 @@
     anObject isNil ifTrue:[
         ^ self imageFor_nil
     ].
-    anObject isLazyValue ifTrue:[
-        ^ self imageFor_others
-    ].
-    anObject isNumber ifTrue:[
-        anObject isInteger ifTrue:[
-            ^ self imageFor_integers
-        ].
-        anObject isFloat ifTrue:[
-            ^ self imageFor_floats
-        ].
-        anObject isFraction ifTrue:[
-            ^ self imageFor_fractions
-        ].
-    ].
-    anObject isCollection ifTrue:[
-        anObject isString ifTrue:[
-            anObject isSymbol ifTrue:[
-                ^ self imageFor_symbols
-            ].
-            ^ self imageFor_strings
-        ].
-        (anObject isDictionary) ifTrue:[
-            ^ self imageFor_dictionaries
-        ].
-        (anObject isArray) ifTrue:[
-            ^ self imageFor_arrays
-        ].
-        (anObject isSequenceable) ifTrue:[
-            ^ self imageFor_sequenceableCollections
-        ].
-        ^ self imageFor_collections
-    ].
     anObject == true ifTrue:[
         ^ self imageFor_true
     ].
     anObject == false ifTrue:[
         ^ self imageFor_false
     ].
-    anObject isCharacter ifTrue:[
-        ^ self imageFor_characters
-    ].
-    anObject isBehavior ifTrue:[
-        ^ self imageFor_classes
-    ].
-    anObject isColor ifTrue:[
-        ^ self imageFor_colors
-    ].
-    anObject isValueModel ifTrue:[
-        Error handle:[:ex |
-        ] do:[
-            value := anObject value.
-            value == true ifTrue:[^ self imageFor_trueHolder].
-            value == false ifTrue:[^ self imageFor_falseHolder].
-            value == nil ifTrue:[^ self imageFor_nilHolder].
-            ^ self imageFor_othersHolder
+    anObject isLazyValue ifFalse:[
+        anObject isNumber ifTrue:[
+            anObject isInteger ifTrue:[
+                ^ self imageFor_integers
+            ].
+            anObject isFraction ifTrue:[
+                ^ self imageFor_fractions
+            ].
+            ^ self imageFor_floats
+        ].
+        anObject isCollection ifTrue:[
+            anObject isString ifTrue:[
+                anObject isSymbol ifTrue:[
+                    ^ self imageFor_symbols
+                ].
+                ^ self imageFor_strings
+            ].
+            (anObject isDictionary) ifTrue:[
+                ^ self imageFor_dictionaries
+            ].
+            (anObject isArray) ifTrue:[
+                ^ self imageFor_arrays
+            ].
+            (anObject isSequenceable) ifTrue:[
+                ^ self imageFor_sequenceableCollections
+            ].
+            ^ self imageFor_collections
+        ].
+        anObject isCharacter ifTrue:[
+            ^ self imageFor_characters
+        ].
+        anObject isBehavior ifTrue:[
+            ^ self imageFor_classes
+        ].
+        anObject isColor ifTrue:[
+            ^ self imageFor_colors
+        ].
+        anObject isValueModel ifTrue:[
+            "/ this may be problemantic, if #value has a side effect...
+            Error handle:[:ex |
+            ] do:[
+                value := anObject value.
+                value == true ifTrue:[^ self imageFor_trueHolder].
+                value == false ifTrue:[^ self imageFor_falseHolder].
+                value == nil ifTrue:[^ self imageFor_nilHolder].
+                value isNumber ifTrue:[^ self imageFor_numberHolder].
+                value isCollection ifTrue:[^ self imageFor_collectionHolder].
+                ^ self imageFor_othersHolder
+            ].
         ].
     ].
 
     ^ self imageFor_others
 
     "Created: / 16-05-2012 / 17:58:20 / cg"
+!
+
+iconForValueClass: aClass
+    "this is useful if we do not want to or cannot access the value itself easily;
+     For example as a helper for bridge objects"
+
+    aClass == UndefinedObject ifTrue:[
+        ^ self imageFor_nil
+    ].
+    aClass == True ifTrue:[
+        ^ self imageFor_true
+    ].
+    aClass == False ifTrue:[
+        ^ self imageFor_false
+    ].
+    ((aClass == Future) or:[aClass == Lazy]) ifTrue:[
+        ^ self imageFor_others
+    ].
+    (aClass includesBehavior:Integer) ifTrue:[
+        ^ self imageFor_integers
+    ].                 
+    (aClass includesBehavior:Fraction) ifTrue:[
+        ^ self imageFor_fractions
+    ].
+    (aClass includesBehavior:LimitedPrecisionReal) ifTrue:[
+        ^ self imageFor_floats
+    ].
+    (aClass includesBehavior:Collection) ifTrue:[
+        (aClass includesBehavior:CharacterArray) ifTrue:[
+            (aClass includesBehavior:Symbol) ifTrue:[
+                ^ self imageFor_symbols
+            ].
+            ^ self imageFor_strings
+        ].
+        (aClass includesBehavior:Dictionary) ifTrue:[
+            ^ self imageFor_dictionaries
+        ].
+        (aClass includesBehavior:SequenceableCollection) ifTrue:[
+            (aClass includesBehavior:Array) ifTrue:[
+                ^ self imageFor_arrays
+            ].
+            ^ self imageFor_sequenceableCollections
+        ].
+        ^ self imageFor_collections
+    ].
+
+    (aClass == Character) ifTrue:[
+        ^ self imageFor_characters
+    ].
+    (aClass includesBehavior: Behavior) ifTrue:[
+        ^ self imageFor_classes
+    ].
+    (aClass includesBehavior: Color) ifTrue:[
+        ^ self imageFor_colors
+    ].
+    (aClass includesBehavior: ValueModel) ifTrue:[
+        ^ self imageFor_othersHolder
+    ].
+    ^ self imageFor_others
 ! !
 
 !InspectorView class methodsFor:'queries-plugin'!
@@ -3993,10 +4086,10 @@
 !InspectorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.342 2015-05-04 07:21:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.343 2015-05-05 11:14:36 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.342 2015-05-04 07:21:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.343 2015-05-05 11:14:36 cg Exp $'
 ! !