*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 17 Jul 2006 13:29:58 +0200
changeset 6823 40d460dee8df
parent 6822 9fb2809394b8
child 6824 51b6aff41891
*** empty log message ***
InspectorView.st
--- a/InspectorView.st	Fri Jul 14 17:11:34 2006 +0200
+++ b/InspectorView.st	Mon Jul 17 13:29:58 2006 +0200
@@ -971,6 +971,14 @@
     "Modified: 28.6.1996 / 16:04:53 / cg"
 !
 
+derivedFields
+    ^ [object inspectorExtraAttributes]
+                on: MessageNotUnderstood
+                do: [:ex | ex return: Array new]
+
+    "Created: / 17-07-2006 / 11:02:32 / cg"
+!
+
 displayStringForValue:someValue 
     "return the values displayString"
 
@@ -1038,40 +1046,50 @@
     "return a list of names to show in the selectionList.
      Leave hasMore as true, if a '...' entry should be added."
 
-    |aList cls indexedList|
+    |derivedFieldList namedFieldList fieldList cls indexedList|
 
     inspectedObject isNil ifTrue:[
         ^ self hasSelfEntry ifFalse:[ #() ] ifTrue:[ #('-self') ]
     ].
 
-    cls := inspectedObject class.
-
     self topView withWaitCursorDo:[
-        aList := self namedFieldList.
+        namedFieldList := self namedFieldList.
         indexedList := self indexedFieldList.
 
         self hasSelfEntry ifTrue:[
             self suppressPseudoSlots ifFalse:[
-                (indexedList notNil and:[self showAllIndexedVarsInFieldList]) ifTrue:[
-                    aList addFirst:'-all indexed vars'.
+                derivedFieldList := OrderedCollection new.
+                derivedFieldList add:'-self'.
+                derivedFieldList add:'-hash'.
+                derivedFieldList add:'-identityHash'.
+
+                cls := inspectedObject class.
+
+                cls hasImmediateInstances ifFalse:[
+                    derivedFieldList add:'-dependents'.
                 ].
                 cls instSize > 0 ifTrue:[
-                    aList addFirst:'-all inst vars'.
+                    derivedFieldList add:'-all inst vars'.
+                ].
+                (indexedList notNil and:[self showAllIndexedVarsInFieldList]) ifTrue:[
+                    derivedFieldList add:'-all indexed vars'.
                 ].
-                cls hasImmediateInstances ifFalse:[
-                    aList addFirst:'-dependents'.
-                ].
-                aList addFirst:'-identityHash'.
-                aList addFirst:'-hash'.
-                aList addFirst:'-self'.
+
+                self derivedFields 
+                    do:[:eachKeyValuePair| 
+                        derivedFieldList add:('-',eachKeyValuePair key)
+                    ].
             ].
         ].
 
-        indexedList notNil ifTrue:[aList addAll:indexedList].
+        fieldList := OrderedCollection new.
+        derivedFieldList notNil ifTrue:[fieldList addAll:derivedFieldList].
+        namedFieldList notNil ifTrue:[fieldList addAll:namedFieldList].
+        indexedList notNil ifTrue:[fieldList addAll:indexedList].
     ].
-    ^ aList
+    ^ fieldList
 
-    "Modified: / 31.10.2001 / 09:14:10 / cg"
+    "Modified: / 17-07-2006 / 11:15:58 / cg"
 !
 
 hasSelfEntry
@@ -1497,6 +1515,13 @@
 !
 
 valueForSpecialLine:line
+    |fieldEntry|
+
+    fieldEntry := self derivedFields detect:[:entry| ('-',entry key)=line] ifNone:nil.
+    fieldEntry notNil ifTrue:[
+        ^ fieldEntry value
+    ].
+
     (line startsWith:'-self') ifTrue:[
         ^ inspectedObject
     ].
@@ -1533,7 +1558,8 @@
 
     self error:'unknown special line'.
 
-    "Created: / 31.10.2001 / 09:17:45 / cg"
+    "Created: / 31-10-2001 / 09:17:45 / cg"
+    "Modified: / 17-07-2006 / 11:09:05 / cg"
 ! !
 
 !InspectorView methodsFor:'queries'!
@@ -1794,5 +1820,5 @@
 !InspectorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.160 2006-01-24 16:27:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.161 2006-07-17 11:29:58 cg Exp $'
 ! !