Tools__VariableList.st
changeset 16500 34f9ad93c51c
parent 16192 107ef924f078
child 16537 bfe8be86fde5
equal deleted inserted replaced
16499:5bea69ee0e19 16500:34f9ad93c51c
   662                         |entry|
   662                         |entry|
   663                         nameList addFirst: (entry := self listEntryForClass: cls name: varName info: info).
   663                         nameList addFirst: (entry := self listEntryForClass: cls name: varName info: info).
   664                         classShown ifFalse:[ entry classShown:classShown ].
   664                         classShown ifFalse:[ entry classShown:classShown ].
   665                     ].
   665                     ].
   666                     sortByName ifFalse:[
   666                     sortByName ifFalse:[
   667                         nameList addFirst:(("'----- ' , "cls nameInBrowser" , ' -----'") asText colorizeAllWith: Color gray).
   667                         nameList addFirst:(("'----- ' , "cls nameInBrowser" , ' -----'") withColor: Color gray).
   668                     ]
   668                     ]
   669                 ].
   669                 ].
   670             ].
   670             ].
   671         ].
   671         ].
   672     ].
   672     ].
   812 label
   812 label
   813 
   813 
   814     label isNil ifTrue:[
   814     label isNil ifTrue:[
   815         label := name.
   815         label := name.
   816         type notNil ifTrue:[
   816         type notNil ifTrue:[
   817             label := (label , ' ' ,  (type displayString colorizeAllWith: Color brown))
   817             label := (label , ' ' ,  (type displayString withColor: Color brown))
   818         ] ifFalse:[
   818         ] ifFalse:[
   819             "/ Hack for Java classes to display field type
   819             "/ Hack for Java classes to display field type
   820             class theNonMetaclass isJavaClass ifTrue:[
   820             class theNonMetaclass isJavaClass ifTrue:[
   821                 | field |
   821                 | field |
   822                 field := class theNonMetaclass lookupFieldFor:name static: (class isMetaclass) onlyPublic: false.
   822                 field := class theNonMetaclass lookupFieldFor:name static: (class isMetaclass) onlyPublic: false.
   823                 field notNil ifTrue:[
   823                 field notNil ifTrue:[
   824                     label := label asText , 
   824                     label := label asText , 
   825                             ' ' , 
   825                             ' ' , 
   826                                 (('< ' , (JavaMethod fieldTypeFromStream: (field descriptor readStream) in: class theNonMetaclass javaPackage) , ' >')
   826                                 (('< ' , (JavaMethod fieldTypeFromStream: (field descriptor readStream) in: class theNonMetaclass javaPackage) , ' >')
   827                                         asText colorizeAllWith: Color brown).
   827                                         withColor: Color brown).
   828                 ].
   828                 ].
   829             ].    
   829             ].    
   830         ].
   830         ].
   831     ].
   831     ].
   832     ^label
   832     ^label
   838 labelWithClass
   838 labelWithClass
   839     |l|
   839     |l|
   840 
   840 
   841     l := self label.
   841     l := self label.
   842     class notNil ifTrue:[
   842     class notNil ifTrue:[
   843         ^ label,' (' ,(class nameWithoutPrefix colorizeAllWith: Color gray),')' 
   843         ^ label,' (' ,(class nameWithoutPrefix withColor: Color gray),')' 
   844     ].
   844     ].
   845     ^label
   845     ^label
   846 !
   846 !
   847 
   847 
   848 name
   848 name