DictionaryInspectorView.st
changeset 9502 49a0c6fc64b4
parent 9379 4fec8657865c
child 9505 f7d4e16c1259
equal deleted inserted replaced
9501:707fe892a63e 9502:49a0c6fc64b4
   104                        ('Ref Chains'           showReferences )
   104                        ('Ref Chains'           showReferences )
   105                        ('References to Global' showKeyReferences )
   105                        ('References to Global' showKeyReferences )
   106                        ('-')
   106                        ('-')
   107                        ('Browse'               browse         )
   107                        ('Browse'               browse         )
   108                        ('-')
   108                        ('-')
   109                        ('Add Key'              doAddKey       )
   109                        ('Add Key...'           doAddKey       )
   110                        ('Remove Key'           doRemoveKey    )
   110                        ('Remove Key'           doRemoveKey    )
   111                        ('-')
   111                        ('-')
   112                    ).
   112                    ).
   113 
   113 
   114         hideClassVars == true ifTrue:[
   114         hideClassVars == true ifTrue:[
   179                        ('-')
   179                        ('-')
   180                        ('Browse'                       browse                 )
   180                        ('Browse'                       browse                 )
   181                        ('Browse Class Hierarchy'       browseClassHierarchy   )
   181                        ('Browse Class Hierarchy'       browseClassHierarchy   )
   182                        ('Browse Full Class Protocol'   browseFullClassProtocol)
   182                        ('Browse Full Class Protocol'   browseFullClassProtocol)
   183                        ('-')
   183                        ('-')
   184                        ('Add Key'              doAddKey       )
   184                        ('Add Key...'           doAddKey       )
   185                        ('Remove Key'           doRemoveKey    )
   185                        ('Remove Key'           doRemoveKey    )
   186                    ).
   186                    ).
   187     ].
   187     ].
   188 
   188 
   189     monitorProcess isNil ifTrue:[
   189     monitorProcess isNil ifTrue:[
   230         m disableAll:#( doShowNilValues doHideNilValues )
   230         m disableAll:#( doShowNilValues doHideNilValues )
   231     ].
   231     ].
   232 
   232 
   233     ^ m.
   233     ^ m.
   234 
   234 
   235     "Modified: / 29-05-2007 / 19:33:43 / cg"
   235     "Modified: / 01-07-2010 / 10:53:08 / cg"
   236 ! !
   236 ! !
   237 
   237 
   238 !DictionaryInspectorView methodsFor:'menu actions'!
   238 !DictionaryInspectorView methodsFor:'menu actions'!
   239 
   239 
   240 browse
   240 browse
   251     "add a key"
   251     "add a key"
   252 
   252 
   253     |keyName key val l|
   253     |keyName key val l|
   254 
   254 
   255     keyName := Dialog request:'Key to add (storeString):' initialAnswer:''.
   255     keyName := Dialog request:'Key to add (storeString):' initialAnswer:''.
   256     keyName notEmpty ifTrue:[
   256     keyName notEmptyOrNil ifTrue:[
   257         key := Object readFrom:keyName onError:[ self information:'Bad input.'. ^ self].
   257         key := Object readFrom:keyName onError:[ self information:'Bad input.'. ^ self].
   258         (inspectedObject includesKey:key) ifFalse:[
   258         (inspectedObject includesKey:key) ifFalse:[
   259             val := Dialog request:'Value to add (storeString):' initialAnswer:''.
   259             val := Dialog request:'Value to add (storeString):' initialAnswer:''.
   260             val notNil ifTrue:[
   260             val notNil ifTrue:[
   261                 val := Object readFrom:val onError:[ self information:'Bad input.'. ^ self].
   261                 val := Object readFrom:val onError:[ self information:'Bad input.'. ^ self].
   267             l := listView firstLineShown.
   267             l := listView firstLineShown.
   268             self reinspect. "force list update"
   268             self reinspect. "force list update"
   269             listView scrollToLine:l
   269             listView scrollToLine:l
   270         ]
   270         ]
   271     ]
   271     ]
       
   272 
       
   273     "Modified: / 01-07-2010 / 10:53:25 / cg"
   272 !
   274 !
   273 
   275 
   274 doHideAliases
   276 doHideAliases
   275     hideAliases := true.
   277     hideAliases := true.
   276     self reinspect
   278     self reinspect
   579 
   581 
   580     |selIdx|
   582     |selIdx|
   581 
   583 
   582     selIdx := self theSingleSelectionIndex.
   584     selIdx := self theSingleSelectionIndex.
   583     selIdx notNil ifTrue:[
   585     selIdx notNil ifTrue:[
   584         ^ self selectedKey
   586         ^ Array with:self selectedKey
   585     ].
   587     ].
   586     ^ (selectionIndex ? #()) 
   588     ^ (selectionIndex ? #()) 
   587         collect:[:eachSelectionIndex |
   589         collect:[:eachSelectionIndex |
   588             |idx|
   590             |idx|
   589 
   591 
   591             idx notNil 
   593             idx notNil 
   592                 ifTrue:[ (keys at:idx) ]
   594                 ifTrue:[ (keys at:idx) ]
   593                 ifFalse:[ nil ]
   595                 ifFalse:[ nil ]
   594         ]
   596         ]
   595         thenSelect:[:each | each notNil].
   597         thenSelect:[:each | each notNil].
       
   598 
       
   599     "Modified: / 01-07-2010 / 10:54:31 / cg"
   596 ! !
   600 ! !
   597 
   601 
   598 !DictionaryInspectorView methodsFor:'user interaction'!
   602 !DictionaryInspectorView methodsFor:'user interaction'!
   599 
   603 
   600 indexedValueAtIndex:idx
   604 indexedValueAtIndex:idx
   613 ! !
   617 ! !
   614 
   618 
   615 !DictionaryInspectorView class methodsFor:'documentation'!
   619 !DictionaryInspectorView class methodsFor:'documentation'!
   616 
   620 
   617 version
   621 version
   618     ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.70 2010-03-09 09:39:50 cg Exp $'
   622     ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.71 2010-07-01 08:54:52 cg Exp $'
   619 !
   623 !
   620 
   624 
   621 version_CVS
   625 version_CVS
   622     ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.70 2010-03-09 09:39:50 cg Exp $'
   626     ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.71 2010-07-01 08:54:52 cg Exp $'
   623 ! !
   627 ! !