tools/JavaMapInspectorView.st
branchcvs_MAIN
changeset 3895 eb9b49155bf8
parent 3412 df11bb428463
child 3934 90cddd72f9df
equal deleted inserted replaced
3894:fd7498845be2 3895:eb9b49155bf8
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "{ Package: 'stx:libjava/tools' }"
     3 "{ Package: 'stx:libjava/tools' }"
       
     4 
       
     5 "{ NameSpace: Smalltalk }"
     2 
     6 
     3 DictionaryInspectorView subclass:#JavaMapInspectorView
     7 DictionaryInspectorView subclass:#JavaMapInspectorView
     4 	instanceVariableNames:''
     8 	instanceVariableNames:''
     5 	classVariableNames:''
     9 	classVariableNames:''
     6 	poolDictionaries:''
    10 	poolDictionaries:''
    34     "Created: / 04-12-2011 / 17:49:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    38     "Created: / 04-12-2011 / 17:49:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    35 ! !
    39 ! !
    36 
    40 
    37 !JavaMapInspectorView methodsFor:'private'!
    41 !JavaMapInspectorView methodsFor:'private'!
    38 
    42 
    39 allNumericKeys
       
    40 
       
    41     ^false "for now"
       
    42 
       
    43     "Created: / 04-12-2011 / 17:38:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    44 !
       
    45 
       
    46 baseInspectedObjectClass
    43 baseInspectedObjectClass
    47 
    44 
    48     | cls |
    45     | cls |
    49     cls := inspectedObject class.
    46     cls := inspectedObject class.
    50     [ cls binaryName startsWith: 'java/util/' ] whileFalse:[
    47     [ cls binaryName startsWith: 'java/util/' ] whileFalse:[
    54 
    51 
    55     "Created: / 04-12-2011 / 17:02:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    52     "Created: / 04-12-2011 / 17:02:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    56     "Modified: / 25-07-2014 / 09:39:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    53     "Modified: / 25-07-2014 / 09:39:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    57 !
    54 !
    58 
    55 
       
    56 hasAllNumericKeys
       
    57 
       
    58     ^false "for now"
       
    59 
       
    60     "Created: / 03-04-2019 / 08:23:59 / Claus Gittinger"
       
    61 !
       
    62 
    59 indexList
    63 indexList
    60     "return a list of indexes to show in the selectionList.
    64     "return a list of indexes to show in the selectionList.
    61      Set hasMore to true, if a '...' entry should be added."
    65      Set hasMore to true, if a '...' entry should be added."
    62 
    66 
    63     | sortBlockForKeys allShown iterator |
    67     | sortBlockForKeys allShown iterator |
    64 
    68 
    65     allShown := (inspectedObject perform: #'size()I') <= nShown.
    69     allShown := (inspectedObject perform: #'size()I') <= nShown.
    66 
    70 
    67     (allShown and:[self allNumericKeys]) ifTrue:[
    71     (allShown and:[self hasAllNumericKeys]) ifTrue:[
    68         sortBlockForKeys := [:a :b | a < b].
    72         sortBlockForKeys := [:a :b | a < b].
    69     ] ifFalse:[
    73     ] ifFalse:[
    70         sortBlockForKeys := [:a :b | a displayString < b displayString].
    74         sortBlockForKeys := [:a :b | a displayString < b displayString].
    71     ].
    75     ].
    72 
    76 
    83     ].
    87     ].
    84     ^ keys
    88     ^ keys
    85 
    89 
    86     "Modified: / 10-05-2011 / 08:14:59 / cg"
    90     "Modified: / 10-05-2011 / 08:14:59 / cg"
    87     "Created: / 04-12-2011 / 17:38:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    91     "Created: / 04-12-2011 / 17:38:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    92     "Modified: / 03-04-2019 / 08:24:11 / Claus Gittinger"
    88 !
    93 !
    89 
    94 
    90 valueForSpecialLine:line
    95 valueForSpecialLine:line
    91 
    96 
    92     line string = '-size' ifTrue:[
    97     line string = '-size' ifTrue:[
   129 ! !
   134 ! !
   130 
   135 
   131 !JavaMapInspectorView class methodsFor:'documentation'!
   136 !JavaMapInspectorView class methodsFor:'documentation'!
   132 
   137 
   133 version_CVS
   138 version_CVS
   134     ^ '$Header: /cvs/stx/stx/libjava/tools/JavaMapInspectorView.st,v 1.5 2015-03-20 13:29:52 vrany Exp $'
   139     ^ '$Header$'
   135 !
   140 !
   136 
   141 
   137 version_HG
   142 version_HG
   138 
   143 
   139     ^ '$Changeset: <not expanded> $'
   144     ^ '$Changeset: <not expanded> $'
   140 !
   145 !
   141 
   146 
   142 version_SVN
   147 version_SVN
   143     ^ 'Id'
   148     ^ '$Id$'
   144 ! !
   149 ! !
   145 
   150