SetInspectorView.st
branchjv
changeset 15808 e6815b0469a1
parent 13170 c9b815af5777
parent 15801 693e2bc2b0e1
child 18532 cccb41254edf
equal deleted inserted replaced
15807:7ae2e31c60db 15808:e6815b0469a1
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1996 by Claus Gittinger / eXept Software AG
     4  COPYRIGHT (c) 1996 by Claus Gittinger / eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
     8  be provided or otherwise made available to, or used by, any
    10  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
    11  other person.  No title to or ownership of the software is
    10  hereby transferred.
    12  hereby transferred.
    11 "
    13 "
    12 "{ Package: 'stx:libtool' }"
    14 "{ Package: 'stx:libtool' }"
       
    15 
       
    16 "{ NameSpace: Smalltalk }"
    13 
    17 
    14 InspectorView subclass:#SetInspectorView
    18 InspectorView subclass:#SetInspectorView
    15 	instanceVariableNames:'keys'
    19 	instanceVariableNames:'keys'
    16 	classVariableNames:''
    20 	classVariableNames:''
    17 	poolDictionaries:''
    21 	poolDictionaries:''
    77 ! !
    81 ! !
    78 
    82 
    79 !SetInspectorView methodsFor:'private'!
    83 !SetInspectorView methodsFor:'private'!
    80 
    84 
    81 baseInspectedObjectClass
    85 baseInspectedObjectClass
    82     (inspectedObject class inheritsFrom:Set) ifFalse:[
    86     (inspectedObject class inheritsFrom:Set) ifTrue:[
    83         ^ Object
    87         ^ Set
    84     ].
    88     ].
    85     ^ Set
    89     ^ Object
    86 !
    90 !
    87 
    91 
    88 defaultLabel
    92 defaultLabel
    89     ^ 'Contents'
    93     ^ 'Contents'
    90 
    94 
   130 indexedFieldList 
   134 indexedFieldList 
   131     "return a list of indexed-variable names to show in the selectionList.
   135     "return a list of indexed-variable names to show in the selectionList.
   132      Set hasMore to true, if a '...' entry should be added."
   136      Set hasMore to true, if a '...' entry should be added."
   133 
   137 
   134     keys := self indexList.
   138     keys := self indexList.
   135     ^ keys collect:[:k | k isSymbol ifTrue:[
   139     ^ keys collect:[:k | k displayString].
   136                              k printString
       
   137                          ] ifFalse:[
       
   138                              k displayString
       
   139                          ]
       
   140                    ].
       
   141 !
   140 !
   142 
   141 
   143 numIndexedFields
   142 numIndexedFields
   144     ^ inspectedObject size
   143     ^ inspectedObject size
   145 !
   144 !
   152 
   151 
   153     "Created: 9.2.1996 / 12:04:30 / stefan"
   152     "Created: 9.2.1996 / 12:04:30 / stefan"
   154 !
   153 !
   155 
   154 
   156 showAllIndexedVarsInFieldList
   155 showAllIndexedVarsInFieldList
       
   156     ^ true
       
   157 ! !
       
   158 
       
   159 !SetInspectorView methodsFor:'queries'!
       
   160 
       
   161 isIndexShown
   157     ^ false
   162     ^ false
   158 ! !
   163 ! !
   159 
   164 
   160 !SetInspectorView methodsFor:'user interaction'!
   165 !SetInspectorView methodsFor:'user interaction'!
   161 
   166 
   184 indexedValueAtIndex:idx
   189 indexedValueAtIndex:idx
   185     ^ keys at:idx
   190     ^ keys at:idx
   186 !
   191 !
   187 
   192 
   188 indexedValueAtKey:idx
   193 indexedValueAtKey:idx
   189     ^ keys at:idx
   194     ^ idx
   190 !
   195 !
   191 
   196 
   192 valueAtLine:lineNr put:newValue
   197 valueAtLine:lineNr put:newValue
   193     "store newValue;
   198     "store newValue;
   194      For non-named instvars, we add the new value - ignoring the selection"
   199      For non-named instvars, we add the new value - ignoring the selection"
   209 ! !
   214 ! !
   210 
   215 
   211 !SetInspectorView class methodsFor:'documentation'!
   216 !SetInspectorView class methodsFor:'documentation'!
   212 
   217 
   213 version
   218 version
   214     ^ '$Header: /cvs/stx/stx/libtool/SetInspectorView.st,v 1.27 2013-06-04 13:02:54 cg Exp $'
   219     ^ '$Header$'
   215 !
   220 !
   216 
   221 
   217 version_HG
   222 version_HG
   218 
   223 
   219     ^ '$Changeset: <not expanded> $'
   224     ^ '$Changeset: <not expanded> $'