class: InspectorView
authorClaus Gittinger <cg@exept.de>
Sat, 09 Mar 2013 13:50:33 +0100
changeset 12448 8495e3427e92
parent 12447 a35a8b2fe1f5
child 12449 feaef938f778
class: InspectorView added hooks to hide hash and messages in the fieldlist
InspectorView.st
--- a/InspectorView.st	Sat Mar 09 13:49:15 2013 +0100
+++ b/InspectorView.st	Sat Mar 09 13:50:33 2013 +0100
@@ -17,7 +17,7 @@
 		inspectHistory allowFollow isStandaloneInspector selectionIndex
 		object inspectedObjectHolder displayStringMessage
 		suppressPseudoSlots dereferenceValueHolders suppressHeadline
-		headLineLabel sortOrder'
+		headLineLabel sortOrder hideMessages hideHashes'
 	classVariableNames:'DefaultIcon IdDictionary NextSequentialID LastExtent
 		DefaultIntegerDisplayRadix ExpandArraysInAllLists'
 	poolDictionaries:''
@@ -799,6 +799,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"
@@ -1084,7 +1102,7 @@
     super initialize.
 
     displayStringMessage := #displayString.
-    hideReceiver := false.
+    hideReceiver := hideMessages := hideHashes := false.
     integerDisplayRadix := (DefaultIntegerDisplayRadix ? 10).
     sortOrder := #instvarOrder.
     allowFollow := false.
@@ -2840,12 +2858,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).
@@ -3098,6 +3122,11 @@
         ^ object
     ].
 
+    (line startsWith:'--- ') ifTrue:[
+        "/ info line, such as '--- classvariables from...'
+        ^ object
+    ].
+
     self error:'unknown special line'.
 
     "Created: / 31-10-2001 / 09:17:45 / cg"
@@ -3386,10 +3415,10 @@
 !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.297 2013-03-09 12:50:33 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.297 2013-03-09 12:50:33 cg Exp $'
 ! !