DictionaryInspectorView.st
changeset 7942 fce54ed1ef8b
parent 7805 a2d82b06d71b
child 7946 f12034f5b24a
equal deleted inserted replaced
7941:c8d90d772c3c 7942:fce54ed1ef8b
   132                    ('-')
   132                    ('-')
   133                    ('Update'     doUpdate  )
   133                    ('Update'     doUpdate  )
   134                       ).
   134                       ).
   135 
   135 
   136     m := PopUpMenu itemList:items resources:resources.
   136     m := PopUpMenu itemList:items resources:resources.
       
   137 
       
   138     (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
       
   139         m disableAll:#( doAddKey doRemoveKey )
       
   140     ].
   137 
   141 
   138     selectionIndex isNil ifTrue:[
   142     selectionIndex isNil ifTrue:[
   139         m disableAll:#(doInspect doInspectKey doBasicInspect doNewInspect
   143         m disableAll:#(doInspect doInspectKey doBasicInspect doNewInspect
   140                        doRemoveKey doStartMonitor doStopMonitor doCopyKey
   144                        doRemoveKey doStartMonitor doStopMonitor doCopyKey
   141                       )
   145                       )
   287 
   291 
   288 indexList
   292 indexList
   289     "return a list of indexes to show in the selectionList.
   293     "return a list of indexes to show in the selectionList.
   290      Set hasMore to true, if a '...' entry should be added."
   294      Set hasMore to true, if a '...' entry should be added."
   291 
   295 
   292     inspectedObject isNameSpace ifTrue:[
   296     (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
   293         ^ self indexListForNameSpace.
   297         ^ self indexListForNameSpace.
   294     ].
   298     ].
   295 
   299 
   296     "/ do not use 'inspectedObjectkeys',
   300     "/ do not use 'inspectedObjectkeys',
   297     "/ since Sets cannot hold nils (which are now valid keys)
   301     "/ since Sets cannot hold nils (which are now valid keys)
   373 
   377 
   374 instVarIndexForLine:lineNr
   378 instVarIndexForLine:lineNr
   375     "helper - return the index for a named instVar;
   379     "helper - return the index for a named instVar;
   376      nil, if self or a keyed instvar is selected."
   380      nil, if self or a keyed instvar is selected."
   377 
   381 
   378     inspectedObject isNameSpace ifTrue:[
   382     (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
   379         ^ nil
   383         ^ nil
   380     ].
   384     ].
   381     ^ super instVarIndexForLine:lineNr
   385     ^ super instVarIndexForLine:lineNr
   382 !
   386 !
   383 
   387 
   384 keyIndexForLine:lineNr
   388 keyIndexForLine:lineNr
   385     "helper - return the index of the key-list"
   389     "helper - return the index of the key-list"
   386 
   390 
   387     |firstRealIndex idx line|
   391     |firstRealIndex idx line|
   388 
   392 
   389     inspectedObject isNameSpace ifTrue:[
   393     (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
   390         (self hasSelfEntry
   394         (self hasSelfEntry
   391         and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[
   395         and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[
   392             ^ nil "/ self selected
   396             ^ nil "/ self selected
   393         ].
   397         ].
   394         firstRealIndex := 1.
   398         firstRealIndex := 1.
   405 !
   409 !
   406 
   410 
   407 namedFieldList 
   411 namedFieldList 
   408     "return a list of instVar names to show in the selectionList."
   412     "return a list of instVar names to show in the selectionList."
   409 
   413 
   410     inspectedObject isNameSpace ifTrue:[
   414     (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
   411         "/ empty ...
   415         "/ empty ...
   412         ^ OrderedCollection new
   416         ^ OrderedCollection new
   413     ].
   417     ].
   414     ^ super namedFieldList
   418     ^ super namedFieldList
   415 
       
   416 !
   419 !
   417 
   420 
   418 release 
   421 release 
   419     "release inspected object"
   422     "release inspected object"
   420 
   423 
   452 ! !
   455 ! !
   453 
   456 
   454 !DictionaryInspectorView class methodsFor:'documentation'!
   457 !DictionaryInspectorView class methodsFor:'documentation'!
   455 
   458 
   456 version
   459 version
   457     ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.60 2007-05-29 17:32:18 cg Exp $'
   460     ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.61 2008-01-25 10:28:29 cg Exp $'
   458 ! !
   461 ! !