InspectorView.st
branchjv
changeset 12459 7899fe07efd7
parent 12431 9f0c59c742d5
parent 12457 db4080187675
child 12517 3a904476a8d2
--- a/InspectorView.st	Thu Mar 07 11:10:05 2013 +0000
+++ b/InspectorView.st	Wed Mar 13 01:04:29 2013 +0000
@@ -13,13 +13,13 @@
 
 SimpleView subclass:#InspectorView
 	instanceVariableNames:'listView labelView workspace inspectedObject selectedLine nShown
-		hasMore monitorProcess hideReceiver integerDisplayRadix
-		inspectHistory allowFollow isStandaloneInspector selectionIndex
-		object inspectedObjectHolder displayStringMessage
-		suppressPseudoSlots dereferenceValueHolders suppressHeadline
-		headLineLabel sortOrder'
+                hasMore monitorProcess hideReceiver integerDisplayRadix
+                inspectHistory allowFollow isStandaloneInspector selectionIndex
+                object inspectedObjectHolder displayStringMessage
+                suppressPseudoSlots dereferenceValueHolders suppressHeadline
+                headLineLabel sortOrder hideMessages hideHashes'
 	classVariableNames:'DefaultIcon IdDictionary NextSequentialID LastExtent
-		DefaultIntegerDisplayRadix ExpandArraysInAllLists'
+                DefaultIntegerDisplayRadix ExpandArraysInAllLists'
 	poolDictionaries:''
 	category:'Interface-Inspector'
 !
@@ -103,6 +103,7 @@
 "
 ! !
 
+
 !InspectorView class methodsFor:'instance creation'!
 
 for:anObject
@@ -202,6 +203,7 @@
     ^ self openOn:anObject
 ! !
 
+
 !InspectorView class methodsFor:'common label support'!
 
 commonLabelFor:anObject
@@ -278,6 +280,7 @@
     "Created: / 15-07-2011 / 16:20:06 / cg"
 ! !
 
+
 !InspectorView class methodsFor:'defaults'!
 
 defaultExtent
@@ -355,6 +358,7 @@
     "Created: / 23-10-2007 / 19:10:02 / cg"
 ! !
 
+
 !InspectorView class methodsFor:'image specs'!
 
 imageFor_arrays
@@ -752,6 +756,7 @@
 M#L3NBH"H#\@@@@@@@@@@@@-JS 8JSH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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 98 255 0 75 198 0 25 74 0 57 156 0 34 99 0 92 206 16 60 132 16 31 74 0 79 206 0 128 131 142 88 231 0 70 189 0 38 90 0 148 198 123 57 115 16 92 239 0 103 255 8 76 189 0 154 198 123 85 214 0 53 132 0 106 255 0 138 255 49 107 156 74 44 115 0 119 206 66 85 222 0 142 206 99 68 139 33 33 90 0 57 148 0 135 206 99]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself]
 ! !
 
+
 !InspectorView class methodsFor:'queries-plugin'!
 
 aspectSelectors
@@ -760,6 +765,7 @@
     "Modified: / 10.2.2000 / 12:25:28 / cg"
 ! !
 
+
 !InspectorView methodsFor:'accessing'!
 
 allowFollow:aBoolean
@@ -799,6 +805,24 @@
     "Created: / 21-01-2011 / 12:07:13 / cg"
 !
 
+hideHashes:aBoolean
+    "hide/show the hash-entries in the field list;
+     This can be hidden for end-user applications"
+
+    hideHashes := aBoolean
+
+    "Created: 28.6.1996 / 15:08:32 / cg"
+!
+
+hideMessages:aBoolean
+    "hide/show the messages-entries in the field list;
+     This can be hidden for end-user applications"
+
+    hideMessages := aBoolean
+
+    "Created: 28.6.1996 / 15:08:32 / cg"
+!
+
 hideReceiver:aBoolean
     "hide/show the self-entry for the inspected object;
      This is hidden for context inspectors in the debugger"
@@ -937,6 +961,7 @@
     ^ workspace
 ! !
 
+
 !InspectorView methodsFor:'accessing-channels'!
 
 inspectedObjectHolder
@@ -962,6 +987,7 @@
     "Created: / 10.2.2000 / 13:34:53 / cg"
 ! !
 
+
 !InspectorView methodsFor:'change & update'!
 
 update:something with:aParameter from:changedObject
@@ -977,8 +1003,8 @@
         ]
     ].
 
-    changedObject == object ifTrue:[
-        self inspect:(object value)
+    changedObject == inspectedObjectHolder ifTrue:[
+        self inspect:(inspectedObjectHolder value)
     ].
 
     super update:something with:aParameter from:changedObject
@@ -987,6 +1013,7 @@
     "Modified: / 10.2.2000 / 13:48:18 / cg"
 ! !
 
+
 !InspectorView methodsFor:'drag & drop'!
 
 getDisplayObjects
@@ -1005,6 +1032,7 @@
     "Modified: / 18-09-2006 / 21:11:31 / cg"
 ! !
 
+
 !InspectorView methodsFor:'event handling'!
 
 doubleClickOnLine:lineNr
@@ -1062,6 +1090,7 @@
     ].
 ! !
 
+
 !InspectorView methodsFor:'initialization & release'!
 
 destroy
@@ -1084,7 +1113,7 @@
     super initialize.
 
     displayStringMessage := #displayString.
-    hideReceiver := false.
+    hideReceiver := hideMessages := hideHashes := false.
     integerDisplayRadix := (DefaultIntegerDisplayRadix ? 10).
     sortOrder := #instvarOrder.
     allowFollow := false.
@@ -1221,6 +1250,7 @@
     ].
 ! !
 
+
 !InspectorView methodsFor:'menu'!
 
 fieldMenu
@@ -1555,6 +1585,7 @@
     "Created: / 20-07-2012 / 10:47:53 / cg"
 ! !
 
+
 !InspectorView methodsFor:'menu actions'!
 
 browse
@@ -2029,6 +2060,7 @@
     "Modified: / 6.2.2000 / 13:47:37 / cg"
 ! !
 
+
 !InspectorView methodsFor:'presentation'!
 
 appendDisplayStringForElementsOf:val indent:lvl pad:padding to:aStream
@@ -2382,6 +2414,7 @@
     "Created: / 13-06-2012 / 12:04:31 / cg"
 ! !
 
+
 !InspectorView methodsFor:'private'!
 
 baseInspectedObjectClass
@@ -2841,12 +2874,18 @@
     cls := object class.
 
     list := OrderedCollection new.
-    list add:'-' , 'self' allItalic.
-    list add:'-' , 'local messages' allItalic.
-    "/ list add:'-' , 'inherited messages' allItalic.
-    list add:'-' , 'all messages' allItalic.
-    list add:'-' , 'hash' allItalic.
-    list add:'-' , 'identityHash' allItalic.
+    self hasSelfEntry ifTrue:[
+        list add:'-' , 'self' allItalic.
+    ].
+    hideMessages ifFalse:[
+        list add:'-' , 'local messages' allItalic.
+        "/ list add:'-' , 'inherited messages' allItalic.
+        list add:'-' , 'all messages' allItalic.
+    ].
+    hideHashes ifFalse:[
+        list add:'-' , 'hash' allItalic.
+        list add:'-' , 'identityHash' allItalic.
+    ].
 
     withIndexed ifTrue:[
         list add:'-' , 'basicSize' allItalic, (self valueStringInListEntryForValue:object basicSize).
@@ -2878,7 +2917,7 @@
 !
 
 setAcceptAction
-    "set the codeViews accept action"
+    "set the codeView's accept action"
 
     |idx acceptAction sel|
 
@@ -2938,14 +2977,14 @@
                     logged:true 
                     ifFail:nil
             ] ifFalse:[
-                'objects class provides no evaluator'
+                'object''s class provides no evaluator'
             ]
         ].
 
-    object class evaluatorClass isNil ifTrue:[
-        workspace doItAction:nil.
-        workspace acceptAction:nil.
-    ]
+"/    object class evaluatorClass isNil ifTrue:[
+"/        workspace doItAction:nil.
+"/        workspace acceptAction:nil.
+"/    ]
 
     "Modified: 1.8.1997 / 21:47:09 / cg"
 !
@@ -3099,12 +3138,18 @@
         ^ object
     ].
 
+    (line startsWith:'--- ') ifTrue:[
+        "/ info line, such as '--- classvariables from...'
+        ^ object
+    ].
+
     self error:'unknown special line'.
 
     "Created: / 31-10-2001 / 09:17:45 / cg"
     "Modified: / 06-06-2012 / 11:57:54 / cg"
 ! !
 
+
 !InspectorView methodsFor:'queries'!
 
 canInspect:anObject
@@ -3169,6 +3214,7 @@
     ^ suppressPseudoSlots ? false
 ! !
 
+
 !InspectorView methodsFor:'selection'!
 
 selection:lineNr
@@ -3224,6 +3270,7 @@
     "Modified: / 28-10-2012 / 11:03:04 / cg"
 ! !
 
+
 !InspectorView methodsFor:'user interaction'!
 
 doAccept:theText
@@ -3374,6 +3421,7 @@
     "Created: / 16-11-2001 / 13:48:51 / cg"
 ! !
 
+
 !InspectorView methodsFor:'workspace protocol'!
 
 modified:aBoolean
@@ -3384,14 +3432,15 @@
     workspace saveAs:file doAppend:doAppend
 ! !
 
+
 !InspectorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.296 2013-01-15 16:33:23 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.298 2013-03-11 17:00:59 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.296 2013-01-15 16:33:23 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.298 2013-03-11 17:00:59 cg Exp $'
 !
 
 version_HG