DictionaryInspectorView.st
branchjv
changeset 12254 b1237f76f501
parent 12128 a7ff7d66ee85
child 12258 c25935799d7b
equal deleted inserted replaced
12253:6d3eedcdb4c1 12254:b1237f76f501
   516 
   516 
   517 indexedFieldList 
   517 indexedFieldList 
   518     "return a list of indexed-variable names to show in the selectionList.
   518     "return a list of indexed-variable names to show in the selectionList.
   519      Set hasMore to true, if a '...' entry should be added."
   519      Set hasMore to true, if a '...' entry should be added."
   520 
   520 
   521     |keys|
   521     |indexList keyList|
   522 
   522 
   523     keys := self indexList.
   523     indexList := self indexList.
   524     ^ keys 
   524     keyList := indexList 
   525         collect:[:k | 
   525         collect:[:k | 
   526             k isSymbol 
   526             k isSymbol 
   527                 ifTrue:[
   527                 ifTrue:[ k printString] 
   528                     k printString] 
   528                 ifFalse:[ k displayString]
   529                 ifFalse:[
   529         ].
   530                     k displayString]].
   530 
       
   531     ^ keyList
       
   532         keysAndValuesCollect:[:idx :nm |
       
   533             self listEntryForName:nm value:(object at:(indexList at:idx))
       
   534         ].
       
   535     ^ keyList
       
   536 
       
   537     "Modified: / 16-05-2012 / 19:07:57 / cg"
   531 !
   538 !
   532 
   539 
   533 instVarIndexForLine:lineNr
   540 instVarIndexForLine:lineNr
   534     "helper - return the index for a named instVar;
   541     "helper - return the index for a named instVar;
   535      nil, if self or a keyed instvar is selected."
   542      nil, if self or a keyed instvar is selected."
   550         and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[
   557         and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[
   551             ^ nil "/ self selected
   558             ^ nil "/ self selected
   552         ].
   559         ].
   553         firstRealIndex := 1.
   560         firstRealIndex := 1.
   554         idx := lineNr.
   561         idx := lineNr.
   555         [line := listView at:firstRealIndex. 
   562         [line := self listEntryAt:firstRealIndex. 
   556          (line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[
   563          (line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[
   557             firstRealIndex := firstRealIndex + 1.
   564             firstRealIndex := firstRealIndex + 1.
   558             idx := idx - 1.
   565             idx := idx - 1.
   559         ].
   566         ].
   560 
   567 
   561         ^ idx   
   568         ^ idx   
   562     ].
   569     ].
   563     ^ super keyIndexForLine:lineNr
   570     ^ super keyIndexForLine:lineNr
       
   571 
       
   572     "Modified: / 16-05-2012 / 17:56:01 / cg"
   564 !
   573 !
   565 
   574 
   566 namedFieldList 
   575 namedFieldList 
   567     "return a list of instVar names to show in the selectionList."
   576     "return a list of instVar names to show in the selectionList."
   568 
   577 
   646 ! !
   655 ! !
   647 
   656 
   648 !DictionaryInspectorView class methodsFor:'documentation'!
   657 !DictionaryInspectorView class methodsFor:'documentation'!
   649 
   658 
   650 version
   659 version
   651     ^ '$Id: DictionaryInspectorView.st 7854 2012-01-30 17:49:41Z vranyj1 $'
   660     ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.76 2012/05/16 17:08:54 cg Exp $'
   652 !
   661 !
   653 
   662 
   654 version_CVS
   663 version_CVS
   655     ^ '§Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.74 2011/05/10 06:15:04 cg Exp §'
   664     ^ '§Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.76 2012/05/16 17:08:54 cg Exp §'
   656 !
   665 !
   657 
   666 
   658 version_SVN
   667 version_SVN
   659     ^ '$Id: DictionaryInspectorView.st 7854 2012-01-30 17:49:41Z vranyj1 $'
   668     ^ '$Id: DictionaryInspectorView.st 8007 2012-06-05 14:49:00Z vranyj1 $'
   660 ! !
   669 ! !