DictionaryInspectorView.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 19 Jul 2017 09:42:32 +0200
branchjv
changeset 17619 edb119820fcb
parent 17461 83feab5a7b8d
child 18226 346376844040
permissions -rw-r--r--
Issue #154: Set window style using `#beToolWindow` to indicate that the minirunner window is kind of support tool rather than some X11 specific code (which does not work on Windows of course) See https://swing.fit.cvut.cz/projects/stx-jv/ticket/154
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     1
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
52
7b48409ae088 *** empty log message ***
claus
parents: 45
diff changeset
     3
	      All Rights Reserved
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     4
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    10
 hereby transferred.
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    11
"
2697
b4f4e431b71e browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 2647
diff changeset
    12
"{ Package: 'stx:libtool' }"
b4f4e431b71e browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 2647
diff changeset
    13
15681
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
    14
"{ NameSpace: Smalltalk }"
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
    15
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    16
InspectorView subclass:#DictionaryInspectorView
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    17
	instanceVariableNames:'keys hideClassVars hideClasses hideUnloadedClasses hideAliases
12624
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
    18
		hideNilValues hideLiteralValues hideColorsAndImages
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
    19
		hideSignalInstances'
361
d1c82e7aa149 handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    20
	classVariableNames:''
d1c82e7aa149 handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    21
	poolDictionaries:''
d1c82e7aa149 handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    22
	category:'Interface-Inspector'
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    23
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    24
957
ecbcb2c15ae8 show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
    25
!DictionaryInspectorView class methodsFor:'documentation'!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    26
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    27
copyright
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    28
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    29
 COPYRIGHT (c) 1993 by Claus Gittinger
52
7b48409ae088 *** empty log message ***
claus
parents: 45
diff changeset
    30
	      All Rights Reserved
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    31
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    32
 This software is furnished under a license and may be used
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    33
 only in accordance with the terms of that license and with the
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    35
 be provided or otherwise made available to, or used by, any
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    36
 other person.  No title to or ownership of the software is
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    37
 hereby transferred.
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    38
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    39
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    40
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    41
documentation
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    42
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    43
    a modified Inspector for Dictionaries
510
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 470
diff changeset
    44
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 470
diff changeset
    45
    [author:]
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 470
diff changeset
    46
        Claus Gittinger
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    47
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    48
! !
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    49
8024
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    50
!DictionaryInspectorView methodsFor:'event handling'!
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    51
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    52
keyPress:key x:x y:y
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    53
    "handle special keys"
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    54
12111
0da8cd378b6f class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 11815
diff changeset
    55
    <resource: #keyboard (#Delete #BackSpace #Insert)>
8024
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    56
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    57
    (key == #Delete or:[key == #BackSpace]) ifTrue:[
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    58
        self doRemoveKey.
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    59
        ^ self.
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    60
    ].
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    61
    (key == #Insert) ifTrue:[
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    62
        self doAddKey.
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    63
        ^ self.
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    64
    ].
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    65
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    66
    super keyPress:key x:x y:y
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    67
! !
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    68
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    69
!DictionaryInspectorView methodsFor:'initialization & release'!
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    70
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    71
initialize
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    72
    super initialize.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    73
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
    74
    listView multipleSelectOk:true.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
    75
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    76
    hideClassVars := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    77
    hideClasses := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    78
    hideUnloadedClasses := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    79
    hideAliases := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    80
    hideLiteralValues := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    81
    hideNilValues := false.
12624
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
    82
    hideColorsAndImages := false.
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
    83
    hideSignalInstances := false.
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    84
! !
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    85
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
    86
!DictionaryInspectorView methodsFor:'menu'!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    87
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    88
fieldMenu
1361
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    89
    <resource: #programMenu >
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    90
9379
4fec8657865c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9376
diff changeset
    91
    |items m selIdx|
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    92
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2298
diff changeset
    93
    inspectedObject isNameSpace ifTrue:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
    94
        items := #(
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    95
                       ('Copy Key'             doCopyKey      )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    96
                       ('-')
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    97
                       ('Inspect'              doInspect      )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    98
                       ('Inspect Key'          doInspectKey   )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    99
                       ('BasicInspect'         doBasicInspect )
9350
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   100
             ).
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   101
    NewInspector::NewInspectorView notNil ifTrue:[
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   102
        items := items , #(
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   103
                       ('Inspect Hierarchical'         #doNewInspect           )
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   104
                ).
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   105
    ].
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   106
    items := items , #(
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   107
                       ('-')
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   108
                       ('Owners'               showOwners     )
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   109
                       ('Ref Chains'           showReferences )
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   110
                       ('References to Global' showKeyReferences )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   111
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   112
                       ('Browse'               browse         )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   113
                       ('-')
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   114
                       ('Add Key...'           doAddKey       )
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   115
                       ('Remove Key'           doRemoveKey    )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   116
                       ('-')
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   117
                   ).
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   118
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   119
        hideClassVars == true ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   120
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   121
                           ('Show ClassVars'   doShowClassVars )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   122
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   123
        ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   124
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   125
                           ('Hide ClassVars'   doHideClassVars )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   126
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   127
        ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   128
        hideClasses == true ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   129
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   130
                           ('Show Classes'     doShowClasses )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   131
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   132
        ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   133
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   134
                           ('Hide Classes'     doHideClasses )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   135
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   136
        ].
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   137
        hideUnloadedClasses == true ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   138
            items := items , #(
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   139
                           ('Show Unloaded Classes'     doShowUnloadedClasses )
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   140
                       ).
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   141
        ] ifFalse:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   142
            items := items , #(
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   143
                           ('Hide UnloadedClasses'     doHideUnloadedClasses )
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   144
                       ).
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   145
        ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   146
        hideAliases == true ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   147
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   148
                           ('Show Aliases'     doShowAliases )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   149
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   150
        ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   151
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   152
                           ('Hide Aliases'     doHideAliases )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   153
                       ).
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   154
        ].
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   155
        hideLiteralValues == true ifTrue:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   156
            items := items , #(
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   157
                           ('Show Literal Values'  doShowLiteralValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   158
                       ).
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   159
        ] ifFalse:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   160
            items := items , #(
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   161
                           ('Hide Literal Values'  doHideLiteralValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   162
                       ).
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   163
        ].
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   164
        hideNilValues == true ifTrue:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   165
            items := items , #(
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   166
                           ('Show Nil Values'  doShowNilValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   167
                       ).
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   168
        ] ifFalse:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   169
            items := items , #(
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   170
                           ('Hide Nil Values'  doHideNilValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   171
                       ).
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   172
        ].
12624
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   173
        hideColorsAndImages == true ifTrue:[
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   174
            items := items , #(
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   175
                           ('Show Colors and Images'  doShowColorsAndImages )
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   176
                       ).
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   177
        ] ifFalse:[
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   178
            items := items , #(
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   179
                           ('Hide Colors and Images'  doHideColorsAndImages )
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   180
                       ).
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   181
        ].
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   182
        hideSignalInstances == true ifTrue:[
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   183
            items := items , #(
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   184
                           ('Show Signals'  doShowSignalInstances )
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   185
                       ).
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   186
        ] ifFalse:[
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   187
            items := items , #(
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   188
                           ('Hide Signals'  doHideSignalInstances )
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   189
                       ).
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   190
        ].
45
950b84ba89e6 *** empty log message ***
claus
parents: 36
diff changeset
   191
    ] ifFalse:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   192
        items := #(
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   193
                       ('Copy Key'             doCopyKey      )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   194
                       ('-')
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   195
                       ('Inspect'              doInspect      )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   196
                       ('Inspect Key'          doInspectKey   )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   197
                       ('BasicInspect'         doBasicInspect )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   198
                       ('Inspect Hierarchical' doNewInspect   )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   199
                       ('-')
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   200
                       ('Owners'               showOwners     )
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   201
                       ('Ref Chains'           showReferences )
12598
8dcaa0fcccc1 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12111
diff changeset
   202
                       ('Ref Chains to Key'    showReferencesToKey )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   203
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   204
                       ('Browse'                       browse                 )
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   205
                       ('Browse Class Hierarchy'       browseClassHierarchy   )
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   206
                       ('Browse Full Class Protocol'   browseFullClassProtocol)
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   207
                       ('-')
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   208
                       ('Add Key...'           doAddKey       )
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   209
                       ('Remove Key'           doRemoveKey    )
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   210
                   ).
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   211
    ].
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   212
12834
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   213
    (hasMore) ifTrue:[
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   214
        items := items , #(                                  
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   215
                      ('-')
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   216
                      ('Show More'                   showMore               )
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   217
                   ).
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   218
        (inspectedObject size > (nShown * 2)) ifTrue:[
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   219
            items := items , #(
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   220
                        ('Show All'                     #showAll                )
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   221
                          )
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   222
        ].
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   223
    ].
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   224
    monitorProcess isNil ifTrue:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   225
        items := items , #(
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   226
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   227
                       ('Start Monitor'    doStartMonitor )
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   228
                          ).
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   229
    ] ifFalse:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   230
        items := items , #(
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   231
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   232
                       ('Stop Monitor'     doStopMonitor  )
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   233
                          ).
45
950b84ba89e6 *** empty log message ***
claus
parents: 36
diff changeset
   234
    ].
950b84ba89e6 *** empty log message ***
claus
parents: 36
diff changeset
   235
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   236
    items := items , (self sortOrderItems).
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   237
    items := items , #(
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   238
                   ('-')
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   239
                   ('Update'     doUpdate  )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   240
                      ).
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   241
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   242
    m := PopUpMenu itemList:items resources:resources.
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   243
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   244
    (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
8973
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   245
        m disableAll:#( doAddKey )
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   246
    ].
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   247
    (inspectedObject isSharedPool) ifTrue:[
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   248
        m disableAll:#( doRemoveKey )
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   249
    ].
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   250
9379
4fec8657865c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9376
diff changeset
   251
    (selIdx := self theSingleSelectionIndex) isNil ifTrue:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   252
        m disableAll:#(doInspect doInspectKey doBasicInspect doNewInspect
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   253
                       doStartMonitor doStopMonitor doCopyKey 
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   254
                       showKeyReferences showReferences showOwners browse
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   255
                      ).
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   256
        selectionIndex isEmptyOrNil ifTrue:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   257
            "/ allowed for multi-select
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   258
            m disableAll:#( doRemoveKey )
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   259
        ]
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   260
    ] ifFalse:[
9379
4fec8657865c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9376
diff changeset
   261
        (self keyIndexForLine:selIdx) isNil ifTrue:[
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   262
            m disableAll:#(doInspectKey doRemoveKey doCopyKey)
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   263
        ]
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   264
    ].
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   265
    hideLiteralValues == true ifTrue:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   266
        m disableAll:#( doShowNilValues doHideNilValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   267
    ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   268
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   269
    ^ m.
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   270
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   271
    "Modified: / 26-09-2012 / 13:20:59 / cg"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
   272
! !
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   273
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   274
!DictionaryInspectorView methodsFor:'menu actions'!
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   275
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   276
browse
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   277
    |cls|
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   278
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   279
    cls := self selection class theNonMetaclass.
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   280
"/    cls isNameSpace ifTrue:[
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   281
"/        self halt.
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   282
"/    ].
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   283
    cls browserClass openInClass:cls selector:nil
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   284
!
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   285
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   286
doAddKey
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   287
    "add a key"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   288
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   289
    |keyName key val l|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   290
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   291
    keyName := Dialog request:'Key to add (storeString):' initialAnswer:''.
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   292
    keyName notEmptyOrNil ifTrue:[
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   293
        key := Object readFrom:keyName onError:[ self information:'Bad input.'. ^ self].
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   294
        (inspectedObject includesKey:key) ifFalse:[
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   295
            val := Dialog request:'Value to add (storeString):' initialAnswer:''.
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   296
            val notNil ifTrue:[
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   297
                val := Object readFrom:val onError:[ self information:'Bad input.'. ^ self].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   298
            ].
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   299
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   300
            inspectedObject at:key put:val.
2236
257f587ad7dc migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2215
diff changeset
   301
            selectionIndex := selectedLine := nil.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   302
            inspectedObject changed.
2213
d6e6c41db3ef keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents: 2212
diff changeset
   303
            l := listView firstLineShown.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   304
            self reinspect. "force list update"
2213
d6e6c41db3ef keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents: 2212
diff changeset
   305
            listView scrollToLine:l
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   306
        ]
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   307
    ]
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   308
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   309
    "Modified: / 01-07-2010 / 10:53:25 / cg"
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   310
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   311
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   312
doHideAliases
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   313
    hideAliases := true.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   314
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   315
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   316
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   317
doHideClassVars
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   318
    hideClassVars := true.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   319
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   320
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   321
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   322
doHideClasses
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   323
    hideClasses := true.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   324
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   325
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   326
12624
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   327
doHideColorsAndImages
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   328
    hideColorsAndImages := true.
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   329
    self reinspect
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   330
!
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   331
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   332
doHideLiteralValues
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   333
    hideLiteralValues := true.
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   334
    self reinspect
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   335
!
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   336
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   337
doHideNilValues
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   338
    hideNilValues := true.
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   339
    self reinspect
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   340
!
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   341
12624
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   342
doHideSignalInstances
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   343
    hideSignalInstances := true.
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   344
    self reinspect
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   345
!
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   346
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   347
doHideUnloadedClasses
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   348
    hideUnloadedClasses := true.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   349
    self reinspect
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   350
!
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   351
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   352
doInspectKey
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   353
    "inspect selected items key"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   354
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   355
    |key|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   356
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   357
    key := self selectedKey.
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   358
    key notNil ifTrue:[
14261
89fca378e089 class: DictionaryInspectorView
Stefan Vogel <sv@exept.de>
parents: 13624
diff changeset
   359
        self inspectNext:key.
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   360
    ]
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   361
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   362
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   363
doRemoveKey
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   364
    "remove selected item from keys"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   365
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   366
    |l|
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   367
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   368
    listView withWaitCursorDo:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   369
        self selectedKeys do:[:key |
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   370
            (inspectedObject includesKey:key) ifTrue:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   371
                inspectedObject removeKey:key
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   372
            ]
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   373
        ].
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   374
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   375
        keys := nil.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   376
        selectionIndex := selectedLine := nil.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   377
        inspectedObject changed.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   378
    ].
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   379
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   380
    l := listView firstLineShown.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   381
    self reinspect. "force list update"
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   382
    listView scrollToLine:l.
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   383
!
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   384
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   385
doShowAliases
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   386
    hideAliases := false.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   387
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   388
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   389
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   390
doShowClassVars
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   391
    hideClassVars := false.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   392
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   393
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   394
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   395
doShowClasses
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   396
    hideClasses := false.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   397
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   398
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   399
12624
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   400
doShowColorsAndImages
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   401
    hideColorsAndImages := false.
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   402
    self reinspect
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   403
!
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   404
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   405
doShowLiteralValues
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   406
    hideLiteralValues := false.
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   407
    self reinspect
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   408
!
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   409
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   410
doShowNilValues
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   411
    hideNilValues := false.
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   412
    self reinspect
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   413
!
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   414
12624
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   415
doShowSignalInstances
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   416
    hideSignalInstances := false.
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   417
    self reinspect
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   418
!
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   419
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   420
doShowUnloadedClasses
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   421
    hideUnloadedClasses := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   422
    self reinspect
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   423
!
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   424
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   425
showKeyReferences
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   426
    "show users of selected key (i.e. global).
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   427
     Only useful when inspecting smalltalk"
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   428
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   429
    |key|
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   430
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   431
    key := self selectedKey.
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   432
    key notNil ifTrue:[
2274
a225b0d4dce7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   433
        self topView withWaitCursorDo:[
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   434
            UserPreferences systemBrowserClass browseReferendsOf:(key asSymbol)
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   435
        ].
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   436
    ]
12598
8dcaa0fcccc1 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12111
diff changeset
   437
!
8dcaa0fcccc1 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12111
diff changeset
   438
8dcaa0fcccc1 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12111
diff changeset
   439
showReferencesToKey
8dcaa0fcccc1 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12111
diff changeset
   440
    self selectedKey class hasImmediateInstances ifTrue:[
8dcaa0fcccc1 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12111
diff changeset
   441
        ^ self warn:'Sorry - cannot show references to immediate objects'
8dcaa0fcccc1 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12111
diff changeset
   442
    ].
8dcaa0fcccc1 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12111
diff changeset
   443
    ObjectMemory displayRefChainTo:(self selectedKey)
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   444
! !
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   445
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   446
!DictionaryInspectorView methodsFor:'private'!
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   447
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   448
allNumericKeys
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   449
    inspectedObject keysDo:[:k | k isNumber ifFalse:[^ false]].
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   450
    ^ true
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   451
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   452
    "Created: / 10-05-2011 / 08:05:45 / cg"
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   453
!
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   454
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   455
baseInspectedObjectClass
2297
a881c775d42f Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   456
2298
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   457
    (inspectedObject isMemberOf:Dictionary) ifFalse:[
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   458
        (inspectedObject class inheritsFrom:Dictionary) ifFalse:[
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   459
            "this is true for e.g. MethodDictionary"
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   460
            ^ Object
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   461
        ]
2297
a881c775d42f Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   462
    ].
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   463
    ^ Dictionary
2297
a881c775d42f Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   464
a881c775d42f Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   465
    "Modified: / 23.7.1999 / 10:39:11 / stefan"
2298
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   466
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   467
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   468
!
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   469
649
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   470
defaultLabel
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3874
diff changeset
   471
    ^ 'Keys'
649
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   472
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   473
    "Created: 28.6.1996 / 19:46:51 / cg"
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   474
!
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   475
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   476
indexList
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   477
    "return a list of indexes to show in the selectionList.
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   478
     Set hasMore to true, if a '...' entry should be added."
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   479
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   480
    |sortBlockForKeys allShown|
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   481
13624
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   482
    (inspectedObject isNameSpace 
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   483
    or:[inspectedObject isSharedPool]) ifTrue:[
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   484
        ^ self indexListForNameSpace.
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   485
    ].
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   486
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   487
    allShown := inspectedObject size <= nShown.
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   488
15681
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   489
    inspectedObject isOrdered ifFalse:[
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   490
        (allShown and:[self allNumericKeys]) ifTrue:[
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   491
            sortBlockForKeys := [:a :b | a < b].
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   492
        ] ifFalse:[
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   493
            sortBlockForKeys := [:a :b | a displayString < b displayString].
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   494
        ].
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   495
    ].
15681
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   496
    
8527
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   497
    "/ do not use 'inspectedObject keys',
2647
888a03260cf0 be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents: 2645
diff changeset
   498
    "/ since Sets cannot hold nils (which are now valid keys)
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   499
    allShown ifFalse:[
15681
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   500
        inspectedObject isOrdered ifFalse:[
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   501
            keys := (SortedCollection new:nShown) sortBlock:sortBlockForKeys.
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   502
        ] ifTrue:[
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   503
            keys := OrderedCollection new:nShown
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   504
        ].
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   505
        
8527
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   506
        inspectedObject keysDo:[:k | 
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   507
            keys add:k.
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   508
            keys size >= nShown ifTrue:[ 
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   509
                hasMore := true.
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   510
                ^ keys
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   511
            ].
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   512
        ].
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   513
    ].
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   514
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   515
    keys := OrderedCollection new.
2647
888a03260cf0 be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents: 2645
diff changeset
   516
    inspectedObject keysDo:[:k | keys add:k].
15681
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   517
    inspectedObject isOrdered ifFalse:[
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   518
        keys := keys asSortedCollection:sortBlockForKeys.
45a2a17c583e class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14951
diff changeset
   519
    ].    
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   520
    ^ keys
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   521
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   522
    "Modified: / 10-05-2011 / 08:14:59 / cg"
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   523
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   524
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   525
indexListForNameSpace
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   526
    "return a list of indexes to show in the selectionList.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   527
     Set hasMore to true, if a '...' entry should be added."
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   528
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   529
    keys := SortedCollection new:1000.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   530
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   531
    inspectedObject keysDo:[:k |
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   532
        |hidden i o|
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   533
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   534
        hidden := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   535
        hideClassVars == true ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   536
            (i := k lastIndexOf:$:) ~~ 0 ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   537
                (i > 1 and:[(k at:i-1) ~~ $:]) ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   538
                    hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   539
                ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   540
            ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   541
        ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   542
        (hidden not and:[hideNilValues == true]) ifTrue:[
14951
c620388aa2e2 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14678
diff changeset
   543
            o isNil ifTrue:[ 
c620388aa2e2 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14678
diff changeset
   544
                o := inspectedObject at:k ifAbsent:nil. 
c620388aa2e2 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14678
diff changeset
   545
                o isNil ifTrue:[
c620388aa2e2 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14678
diff changeset
   546
                    hidden := true
c620388aa2e2 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 14678
diff changeset
   547
                ].
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   548
            ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   549
        ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   550
        (hidden not and:[hideClasses == true]) ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   551
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   552
            o isBehavior ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   553
                inspectedObject == Smalltalk ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   554
                    o name == k ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   555
                        hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   556
                    ]
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   557
                ] ifFalse:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   558
                    o nameWithoutNameSpacePrefix = k ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   559
                        hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   560
                    ]
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   561
                ]
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   562
            ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   563
        ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   564
        (hidden not and:[hideAliases == true]) ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   565
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   566
            o isBehavior ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   567
                inspectedObject == Smalltalk ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   568
                    o name ~~ k ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   569
                        hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   570
                    ]
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   571
                ] ifFalse:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   572
                    o nameWithoutNameSpacePrefix ~= k ifTrue:[
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   573
                        hidden := true
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   574
                    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   575
                ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   576
            ].
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   577
        ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   578
        (hidden not and:[hideLiteralValues == true]) ifTrue:[
8470
2bec16caeefb changed #indexListForNameSpace
Claus Gittinger <cg@exept.de>
parents: 8403
diff changeset
   579
self breakPoint:#cg.
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   580
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   581
            o isLiteral ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   582
                hidden := true
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   583
            ].
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   584
        ].
12624
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   585
        (hidden not and:[hideColorsAndImages == true]) ifTrue:[
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   586
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   587
            (o isColor or:[o isImageOrForm or:[o class == Cursor]]) ifTrue:[
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   588
                hidden := true
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   589
            ].
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   590
        ].
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   591
        (hidden not and:[hideSignalInstances == true]) ifTrue:[
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   592
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   593
            (o isException or:[o isKindOf:Signal]) ifTrue:[
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   594
                hidden := true
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   595
            ].
fd12279a7888 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12598
diff changeset
   596
        ].
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   597
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   598
        hidden ifFalse:[keys add:k]
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   599
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   600
    ^ keys
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   601
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   602
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   603
indexedFieldList 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   604
    "return a list of indexed-variable names to show in the selectionList.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   605
     Set hasMore to true, if a '...' entry should be added."
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   606
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   607
    |indexList keyList|
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   608
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   609
    indexList := self indexList.
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   610
    keyList := indexList 
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   611
        collect:[:k | 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   612
            k isSymbol 
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   613
                ifTrue:[ k printString] 
13624
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   614
                ifFalse:[
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   615
                    k isInteger 
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   616
                        ifTrue:[ self basicDisplayStringForValue:k ]
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   617
                        ifFalse:[ k displayString ]
b59ab4a6247d class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 13576
diff changeset
   618
                ]
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   619
        ].
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   620
16547
9aa2c069111c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 15878
diff changeset
   621
    sortOrder == SortOrderAlphabetical ifTrue:[
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   622
        keyList sort:[:a :b | a string < b string].
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   623
    ].
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   624
    ^ keyList
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   625
        keysAndValuesCollect:[:idx :nm |
14678
079d9fc7384d Fix in DictionaryInspectorView>>#indexedFieldList: use #indexedValueAtKey: instead of object #at:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14261
diff changeset
   626
            self listEntryForName:nm value:(self indexedValueAtKey:(indexList at:idx))
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   627
        ].
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   628
    "/ ^ keyList
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   629
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   630
    "Modified: / 26-09-2012 / 13:22:08 / cg"
14678
079d9fc7384d Fix in DictionaryInspectorView>>#indexedFieldList: use #indexedValueAtKey: instead of object #at:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14261
diff changeset
   631
    "Modified: / 25-07-2014 / 09:44:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   632
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   633
15877
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   634
indexedValueAtKey:key
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   635
    object isWeakCollection ifTrue:[
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   636
        "keys may vanish"
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   637
        ^ object at:key ifAbsent:[].
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   638
    ].
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   639
    ^ object at:key
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   640
!
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   641
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   642
instVarIndexForLine:lineNr
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   643
    "helper - return the index for a named instVar;
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   644
     nil, if self or a keyed instvar is selected."
2189
db73912a0b4c show named instvars (except those of Dictionary)
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   645
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   646
    (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   647
        ^ nil
957
ecbcb2c15ae8 show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   648
    ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   649
    ^ super instVarIndexForLine:lineNr
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   650
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   651
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   652
keyIndexForLine:lineNr
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   653
    "helper - return the index of the key-list"
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   654
5421
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 4269
diff changeset
   655
    |firstRealIndex idx line|
4100
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   656
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   657
    (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3874
diff changeset
   658
        (self hasSelfEntry
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   659
        and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   660
            ^ nil "/ self selected
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   661
        ].
4100
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   662
        firstRealIndex := 1.
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   663
        idx := lineNr.
11512
beaaefe35ca1 nice name list
Claus Gittinger <cg@exept.de>
parents: 9927
diff changeset
   664
        [line := self listEntryAt:firstRealIndex. 
5421
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 4269
diff changeset
   665
         (line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[
4100
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   666
            firstRealIndex := firstRealIndex + 1.
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   667
            idx := idx - 1.
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3874
diff changeset
   668
        ].
4100
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   669
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   670
        ^ idx   
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   671
    ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   672
    ^ super keyIndexForLine:lineNr
11512
beaaefe35ca1 nice name list
Claus Gittinger <cg@exept.de>
parents: 9927
diff changeset
   673
beaaefe35ca1 nice name list
Claus Gittinger <cg@exept.de>
parents: 9927
diff changeset
   674
    "Modified: / 16-05-2012 / 17:56:01 / cg"
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   675
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   676
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   677
namedFieldList 
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   678
    "return a list of instVar names to show in the selectionList."
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   679
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   680
    (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   681
        "/ empty ...
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   682
        ^ OrderedCollection new
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   683
    ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   684
    ^ super namedFieldList
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   685
!
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   686
12834
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   687
numIndexedFields
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   688
    ^ inspectedObject size
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   689
!
daf3c6ecec6d menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 12624
diff changeset
   690
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   691
release 
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   692
    "release inspected object"
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   693
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   694
    keys := nil.
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   695
    super release
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   696
!
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   697
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   698
selectedKey
13576
3fd34524bbb9 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12834
diff changeset
   699
    "selected item's key or nil. But only if exactly one item is selected"
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   700
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   701
    |selIdx idx|
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   702
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   703
    selIdx := self theSingleSelectionIndex.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   704
    selIdx notNil ifTrue:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   705
        idx := self keyIndexForLine:selIdx.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   706
        idx notNil ifTrue:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   707
            ^ (keys at:idx)
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   708
        ].
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   709
    ].
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   710
    ^ nil.
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   711
!
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   712
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   713
selectedKeys
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   714
    "selected keys or empty"
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   715
13576
3fd34524bbb9 class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 12834
diff changeset
   716
    ^ (listView selection ? #()) 
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   717
        collect:[:eachSelectionIndex |
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   718
            |idx|
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   719
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   720
            idx := self keyIndexForLine:eachSelectionIndex.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   721
            idx notNil 
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   722
                ifTrue:[ (keys at:idx) ]
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   723
                ifFalse:[ nil ]
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   724
        ]
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   725
        thenSelect:[:each | each notNil].
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   726
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   727
    "Modified: / 01-07-2010 / 10:54:31 / cg"
9505
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   728
!
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   729
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   730
selection:lineNrCollection
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   731
    "redefined because of multiselect"
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   732
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   733
    lineNrCollection isEmptyOrNil ifTrue:[
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   734
        self showSelection:nil
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   735
    ] ifFalse:[
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   736
        self showSelection:lineNrCollection first
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   737
    ].
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   738
! !
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   739
17461
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   740
!DictionaryInspectorView methodsFor:'queries'!
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   741
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   742
selectedKeyName
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   743
    | key |
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   744
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   745
    "/ Issue #125. Keys of a dictionary could be arbitrary objects and
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   746
    "/ their print strings may contain spaces. Therefore, the super 
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   747
    "/ implementation won't work properly as it cuts-off the string after
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   748
    "/ a space (in belief that after first space there's always a inspector-
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   749
    "/ added value detail.
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   750
    "/
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   751
    "/ See https://swing.fit.cvut.cz/projects/stx-jv/ticket/125
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   752
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   753
    key := self selectedKey.
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   754
    key notNil ifTrue:[ ^ key printString ].
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   755
    ^ super selectedKeyName
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   756
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   757
    "Created: / 12-03-2017 / 20:34:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   758
! !
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   759
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   760
!DictionaryInspectorView methodsFor:'user interaction'!
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   761
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   762
indexedValueAtIndex:idx
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   763
    |key|
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   764
15878
9df06bebe9e9 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15877
diff changeset
   765
    key := keys at:idx ifAbsent:[^ nil].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   766
    ^ inspectedObject at:key ifAbsent:nil.
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   767
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   768
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   769
indexedValueAtIndex:idx put:newValue
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   770
    |key|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   771
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   772
    key := keys at:idx.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   773
    inspectedObject at:key put:newValue.
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   774
! !
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   775
957
ecbcb2c15ae8 show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   776
!DictionaryInspectorView class methodsFor:'documentation'!
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   777
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   778
version
15877
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   779
    ^ '$Header$'
8973
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   780
!
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   781
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   782
version_CVS
15877
9e23be012748 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 15681
diff changeset
   783
    ^ '$Header$'
17461
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   784
!
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   785
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   786
version_HG
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   787
83feab5a7b8d Issue #125: Fixed `#selectedKeyName` in `DictionaryInspectorView` to correctly return selected key's printString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16572
diff changeset
   788
    ^ '$Changeset: <not expanded> $'
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   789
! !
12111
0da8cd378b6f class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 11815
diff changeset
   790