DictionaryInspectorView.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 08 Feb 2013 08:51:42 +0100
branchjv
changeset 12406 1fbd331e4489
parent 12401 4714b9640528
parent 12405 76f9a872362b
child 12431 9f0c59c742d5
permissions -rw-r--r--
Merged bf820ac5dfc8 and 76f9a872362b
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
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    14
InspectorView subclass:#DictionaryInspectorView
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    15
	instanceVariableNames:'keys hideClassVars hideClasses hideUnloadedClasses hideAliases
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    16
		hideNilValues hideLiteralValues'
361
d1c82e7aa149 handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    17
	classVariableNames:''
d1c82e7aa149 handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    18
	poolDictionaries:''
d1c82e7aa149 handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    19
	category:'Interface-Inspector'
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    20
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    21
957
ecbcb2c15ae8 show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
    22
!DictionaryInspectorView class methodsFor:'documentation'!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    23
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    24
copyright
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    25
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    26
 COPYRIGHT (c) 1993 by Claus Gittinger
52
7b48409ae088 *** empty log message ***
claus
parents: 45
diff changeset
    27
	      All Rights Reserved
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    28
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    29
 This software is furnished under a license and may be used
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    34
 hereby transferred.
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    35
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    36
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    37
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    38
documentation
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    39
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    40
    a modified Inspector for Dictionaries
510
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 470
diff changeset
    41
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 470
diff changeset
    42
    [author:]
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 470
diff changeset
    43
        Claus Gittinger
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    44
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    45
! !
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    46
12405
76f9a872362b Merged 3efd83b86c07 and 1206aff1f11 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12296 12111
diff changeset
    47
8024
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    48
!DictionaryInspectorView methodsFor:'event handling'!
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    49
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    50
keyPress:key x:x y:y
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    51
    "handle special keys"
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    52
12111
0da8cd378b6f class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 11815
diff changeset
    53
    <resource: #keyboard (#Delete #BackSpace #Insert)>
8024
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    54
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    55
    (key == #Delete or:[key == #BackSpace]) ifTrue:[
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    56
        self doRemoveKey.
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    57
        ^ self.
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    58
    ].
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    59
    (key == #Insert) ifTrue:[
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    60
        self doAddKey.
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    61
        ^ self.
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    62
    ].
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    63
2eec1213d292 Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents: 7946
diff changeset
    64
    super keyPress:key x:x y:y
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
12405
76f9a872362b Merged 3efd83b86c07 and 1206aff1f11 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12296 12111
diff changeset
    67
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    68
!DictionaryInspectorView methodsFor:'initialization & release'!
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    69
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    70
initialize
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    71
    super initialize.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    72
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
    73
    listView multipleSelectOk:true.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
    74
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    75
    hideClassVars := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    76
    hideClasses := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    77
    hideUnloadedClasses := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    78
    hideAliases := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    79
    hideLiteralValues := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    80
    hideNilValues := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    81
! !
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
    82
12405
76f9a872362b Merged 3efd83b86c07 and 1206aff1f11 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12296 12111
diff changeset
    83
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
    84
!DictionaryInspectorView methodsFor:'menu'!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    85
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    86
fieldMenu
1361
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    87
    <resource: #programMenu >
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    88
9379
4fec8657865c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9376
diff changeset
    89
    |items m selIdx|
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    90
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2298
diff changeset
    91
    inspectedObject isNameSpace ifTrue:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
    92
        items := #(
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    93
                       ('Copy Key'             doCopyKey      )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    94
                       ('-')
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    95
                       ('Inspect'              doInspect      )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    96
                       ('Inspect Key'          doInspectKey   )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
    97
                       ('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
    98
             ).
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
    99
    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
   100
        items := items , #(
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   101
                       ('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
   102
                ).
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   103
    ].
c94c232ef91e do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents: 8973
diff changeset
   104
    items := items , #(
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   105
                       ('-')
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   106
                       ('Owners'               showOwners     )
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   107
                       ('Ref Chains'           showReferences )
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   108
                       ('References to Global' showKeyReferences )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   109
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   110
                       ('Browse'               browse         )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   111
                       ('-')
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   112
                       ('Add Key...'           doAddKey       )
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   113
                       ('Remove Key'           doRemoveKey    )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   114
                       ('-')
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   115
                   ).
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   116
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   117
        hideClassVars == true ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   118
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   119
                           ('Show ClassVars'   doShowClassVars )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   120
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   121
        ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   122
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   123
                           ('Hide ClassVars'   doHideClassVars )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   124
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   125
        ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   126
        hideClasses == true ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   127
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   128
                           ('Show Classes'     doShowClasses )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   129
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   130
        ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   131
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   132
                           ('Hide Classes'     doHideClasses )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   133
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   134
        ].
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   135
        hideUnloadedClasses == true ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   136
            items := items , #(
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   137
                           ('Show Unloaded Classes'     doShowUnloadedClasses )
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   138
                       ).
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   139
        ] ifFalse:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   140
            items := items , #(
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   141
                           ('Hide UnloadedClasses'     doHideUnloadedClasses )
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   142
                       ).
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   143
        ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   144
        hideAliases == true ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   145
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   146
                           ('Show Aliases'     doShowAliases )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   147
                       ).
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   148
        ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   149
            items := items , #(
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   150
                           ('Hide Aliases'     doHideAliases )
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   151
                       ).
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   152
        ].
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   153
        hideLiteralValues == true ifTrue:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   154
            items := items , #(
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   155
                           ('Show Literal Values'  doShowLiteralValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   156
                       ).
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   157
        ] ifFalse:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   158
            items := items , #(
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   159
                           ('Hide Literal Values'  doHideLiteralValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   160
                       ).
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   161
        ].
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   162
        hideNilValues == true ifTrue:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   163
            items := items , #(
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   164
                           ('Show Nil Values'  doShowNilValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   165
                       ).
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   166
        ] ifFalse:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   167
            items := items , #(
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   168
                           ('Hide Nil Values'  doHideNilValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   169
                       ).
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   170
        ].
45
950b84ba89e6 *** empty log message ***
claus
parents: 36
diff changeset
   171
    ] ifFalse:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   172
        items := #(
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   173
                       ('Copy Key'             doCopyKey      )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   174
                       ('-')
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   175
                       ('Inspect'              doInspect      )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   176
                       ('Inspect Key'          doInspectKey   )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   177
                       ('BasicInspect'         doBasicInspect )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   178
                       ('Inspect Hierarchical' doNewInspect   )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   179
                       ('-')
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   180
                       ('Owners'               showOwners     )
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   181
                       ('Ref Chains'           showReferences )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   182
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   183
                       ('Browse'                       browse                 )
7805
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   184
                       ('Browse Class Hierarchy'       browseClassHierarchy   )
a2d82b06d71b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7373
diff changeset
   185
                       ('Browse Full Class Protocol'   browseFullClassProtocol)
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   186
                       ('-')
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   187
                       ('Add Key...'           doAddKey       )
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   188
                       ('Remove Key'           doRemoveKey    )
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   189
                   ).
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   190
    ].
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   191
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   192
    monitorProcess isNil ifTrue:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   193
        items := items , #(
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   194
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   195
                       ('Start Monitor'    doStartMonitor )
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   196
                          ).
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   197
    ] ifFalse:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   198
        items := items , #(
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   199
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   200
                       ('Stop Monitor'     doStopMonitor  )
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   201
                          ).
45
950b84ba89e6 *** empty log message ***
claus
parents: 36
diff changeset
   202
    ].
950b84ba89e6 *** empty log message ***
claus
parents: 36
diff changeset
   203
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   204
    items := items , (self sortOrderItems).
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   205
    items := items , #(
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   206
                   ('-')
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   207
                   ('Update'     doUpdate  )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   208
                      ).
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   209
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   210
    m := PopUpMenu itemList:items resources:resources.
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   211
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   212
    (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
8973
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   213
        m disableAll:#( doAddKey )
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   214
    ].
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   215
    (inspectedObject isSharedPool) ifTrue:[
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   216
        m disableAll:#( doRemoveKey )
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   217
    ].
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   218
9379
4fec8657865c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9376
diff changeset
   219
    (selIdx := self theSingleSelectionIndex) isNil ifTrue:[
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   220
        m disableAll:#(doInspect doInspectKey doBasicInspect doNewInspect
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   221
                       doStartMonitor doStopMonitor doCopyKey 
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   222
                       showKeyReferences showReferences showOwners browse
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   223
                      ).
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   224
        selectionIndex isEmptyOrNil ifTrue:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   225
            "/ allowed for multi-select
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   226
            m disableAll:#( doRemoveKey )
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   227
        ]
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   228
    ] ifFalse:[
9379
4fec8657865c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9376
diff changeset
   229
        (self keyIndexForLine:selIdx) isNil ifTrue:[
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   230
            m disableAll:#(doInspectKey doRemoveKey doCopyKey)
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   231
        ]
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   232
    ].
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   233
    hideLiteralValues == true ifTrue:[
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   234
        m disableAll:#( doShowNilValues doHideNilValues )
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   235
    ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   236
1665
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   237
    ^ m.
7e3fc40e26ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1361
diff changeset
   238
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   239
    "Modified: / 26-09-2012 / 13:20:59 / cg"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
   240
! !
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   241
12405
76f9a872362b Merged 3efd83b86c07 and 1206aff1f11 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12296 12111
diff changeset
   242
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   243
!DictionaryInspectorView methodsFor:'menu actions'!
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   244
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   245
browse
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   246
    |cls|
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   247
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   248
    cls := self selection class theNonMetaclass.
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   249
"/    cls isNameSpace ifTrue:[
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   250
"/        self halt.
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   251
"/    ].
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   252
    cls browserClass openInClass:cls selector:nil
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   253
!
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   254
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   255
doAddKey
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   256
    "add a key"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   257
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   258
    |keyName key val l|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   259
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   260
    keyName := Dialog request:'Key to add (storeString):' initialAnswer:''.
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   261
    keyName notEmptyOrNil ifTrue:[
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   262
        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
   263
        (inspectedObject includesKey:key) ifFalse:[
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   264
            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
   265
            val notNil ifTrue:[
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   266
                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
   267
            ].
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   268
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   269
            inspectedObject at:key put:val.
2236
257f587ad7dc migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2215
diff changeset
   270
            selectionIndex := selectedLine := nil.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   271
            inspectedObject changed.
2213
d6e6c41db3ef keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents: 2212
diff changeset
   272
            l := listView firstLineShown.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   273
            self reinspect. "force list update"
2213
d6e6c41db3ef keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents: 2212
diff changeset
   274
            listView scrollToLine:l
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   275
        ]
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   276
    ]
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   277
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   278
    "Modified: / 01-07-2010 / 10:53:25 / cg"
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   279
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   280
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   281
doHideAliases
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   282
    hideAliases := true.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   283
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   284
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   285
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   286
doHideClassVars
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   287
    hideClassVars := true.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   288
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   289
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   290
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   291
doHideClasses
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   292
    hideClasses := true.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   293
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   294
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   295
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   296
doHideLiteralValues
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   297
    hideLiteralValues := true.
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   298
    self reinspect
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   299
!
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   300
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   301
doHideNilValues
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   302
    hideNilValues := true.
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   303
    self reinspect
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   304
!
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   305
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   306
doHideUnloadedClasses
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   307
    hideUnloadedClasses := true.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   308
    self reinspect
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   309
!
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   310
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   311
doInspectKey
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   312
    "inspect selected items key"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   313
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   314
    |key|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   315
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   316
    key := self selectedKey.
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   317
    key notNil ifTrue:[
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   318
        key inspect
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   319
    ]
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   320
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   321
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   322
doRemoveKey
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   323
    "remove selected item from keys"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   324
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   325
    |l|
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   326
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   327
    listView withWaitCursorDo:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   328
        self selectedKeys do:[:key |
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   329
            (inspectedObject includesKey:key) ifTrue:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   330
                inspectedObject removeKey:key
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   331
            ]
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   332
        ].
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   333
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   334
        keys := nil.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   335
        selectionIndex := selectedLine := nil.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   336
        inspectedObject changed.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   337
    ].
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   338
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   339
    l := listView firstLineShown.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   340
    self reinspect. "force list update"
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   341
    listView scrollToLine:l.
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   342
!
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   343
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   344
doShowAliases
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   345
    hideAliases := false.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   346
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   347
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   348
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   349
doShowClassVars
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   350
    hideClassVars := false.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   351
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   352
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   353
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   354
doShowClasses
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   355
    hideClasses := false.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   356
    self reinspect
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   357
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   358
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   359
doShowLiteralValues
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   360
    hideLiteralValues := false.
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   361
    self reinspect
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   362
!
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   363
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   364
doShowNilValues
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   365
    hideNilValues := false.
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   366
    self reinspect
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   367
!
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   368
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   369
doShowUnloadedClasses
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   370
    hideUnloadedClasses := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   371
    self reinspect
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   372
!
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   373
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   374
showKeyReferences
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   375
    "show users of selected key (i.e. global).
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   376
     Only useful when inspecting smalltalk"
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   377
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   378
    |key|
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   379
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   380
    key := self selectedKey.
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   381
    key notNil ifTrue:[
2274
a225b0d4dce7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   382
        self topView withWaitCursorDo:[
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   383
            UserPreferences systemBrowserClass browseReferendsOf:(key asSymbol)
1740
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   384
        ].
5dd8db18c0cf added show references
Claus Gittinger <cg@exept.de>
parents: 1665
diff changeset
   385
    ]
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   386
! !
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   387
12405
76f9a872362b Merged 3efd83b86c07 and 1206aff1f11 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12296 12111
diff changeset
   388
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   389
!DictionaryInspectorView methodsFor:'private'!
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   390
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   391
allNumericKeys
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   392
    inspectedObject keysDo:[:k | k isNumber ifFalse:[^ false]].
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   393
    ^ true
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   394
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   395
    "Created: / 10-05-2011 / 08:05:45 / cg"
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   396
!
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   397
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   398
baseInspectedObjectClass
2297
a881c775d42f Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   399
2298
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   400
    (inspectedObject isMemberOf:Dictionary) ifFalse:[
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   401
        (inspectedObject class inheritsFrom:Dictionary) ifFalse:[
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   402
            "this is true for e.g. MethodDictionary"
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   403
            ^ Object
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   404
        ]
2297
a881c775d42f Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   405
    ].
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   406
    ^ Dictionary
2297
a881c775d42f Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   407
a881c775d42f Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   408
    "Modified: / 23.7.1999 / 10:39:11 / stefan"
2298
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   409
4cff11435fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2297
diff changeset
   410
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   411
!
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
   412
649
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   413
defaultLabel
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3874
diff changeset
   414
    ^ 'Keys'
649
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   415
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   416
    "Created: 28.6.1996 / 19:46:51 / cg"
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   417
!
11d4cbff1092 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
   418
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   419
indexList
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   420
    "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
   421
     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
   422
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   423
    |sortBlockForKeys allShown|
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   424
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   425
    allShown := inspectedObject size <= nShown.
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   426
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   427
    (allShown and:[self allNumericKeys]) ifTrue:[
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   428
        sortBlockForKeys := [:a :b | a < b].
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   429
    ] ifFalse:[
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   430
        sortBlockForKeys := [:a :b | a displayString < b displayString].
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   431
    ].
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   432
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   433
    (inspectedObject isNameSpace 
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   434
    or:[inspectedObject isSharedPool]) ifTrue:[
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   435
        ^ self indexListForNameSpace.
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   436
    ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   437
8527
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   438
    "/ do not use 'inspectedObject keys',
2647
888a03260cf0 be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents: 2645
diff changeset
   439
    "/ since Sets cannot hold nils (which are now valid keys)
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   440
    allShown ifFalse:[
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   441
        keys := (SortedCollection new:nShown) sortBlock:sortBlockForKeys.
8527
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   442
        inspectedObject keysDo:[:k | 
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   443
            keys add:k.
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   444
            keys size >= nShown ifTrue:[ 
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   445
                hasMore := true.
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   446
                ^ keys
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   447
            ].
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   448
        ].
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   449
    ].
1f78e8ddae80 also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 8470
diff changeset
   450
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   451
    keys := OrderedCollection new.
2647
888a03260cf0 be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents: 2645
diff changeset
   452
    inspectedObject keysDo:[:k | keys add:k].
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   453
    keys := keys asSortedCollection:sortBlockForKeys.
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   454
    ^ keys
9926
d683250942f9 added: #allNumericKeys
Claus Gittinger <cg@exept.de>
parents: 9505
diff changeset
   455
9927
aa0e12d67765 changed: #indexList
Claus Gittinger <cg@exept.de>
parents: 9926
diff changeset
   456
    "Modified: / 10-05-2011 / 08:14:59 / cg"
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   457
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   458
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   459
indexListForNameSpace
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   460
    "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
   461
     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
   462
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   463
    keys := SortedCollection new:1000.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   464
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   465
    inspectedObject keysDo:[:k |
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   466
        |hidden i o|
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   467
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   468
        hidden := false.
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   469
        hideClassVars == true ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   470
            (i := k lastIndexOf:$:) ~~ 0 ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   471
                (i > 1 and:[(k at:i-1) ~~ $:]) ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   472
                    hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   473
                ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   474
            ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   475
        ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   476
        (hidden not and:[hideNilValues == true]) ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   477
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   478
            o isNil ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   479
                hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   480
            ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   481
        ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   482
        (hidden not and:[hideClasses == true]) ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   483
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   484
            o isBehavior ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   485
                inspectedObject == Smalltalk ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   486
                    o name == k ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   487
                        hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   488
                    ]
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   489
                ] ifFalse:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   490
                    o nameWithoutNameSpacePrefix = k ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   491
                        hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   492
                    ]
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   493
                ]
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   494
            ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   495
        ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   496
        (hidden not and:[hideAliases == true]) ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   497
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   498
            o isBehavior ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   499
                inspectedObject == Smalltalk ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   500
                    o name ~~ k ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   501
                        hidden := true
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   502
                    ]
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   503
                ] ifFalse:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   504
                    o nameWithoutNameSpacePrefix ~= k ifTrue:[
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   505
                        hidden := true
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   506
                    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   507
                ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   508
            ].
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   509
        ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   510
        (hidden not and:[hideLiteralValues == true]) ifTrue:[
8470
2bec16caeefb changed #indexListForNameSpace
Claus Gittinger <cg@exept.de>
parents: 8403
diff changeset
   511
self breakPoint:#cg.
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   512
            o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ].
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   513
            o isLiteral ifTrue:[
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   514
                hidden := true
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   515
            ].
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   516
        ].
7946
f12034f5b24a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7942
diff changeset
   517
8403
7f6e4d9aab97 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8024
diff changeset
   518
        hidden ifFalse:[keys add:k]
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   519
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   520
    ^ keys
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   521
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   522
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   523
indexedFieldList 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   524
    "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
   525
     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
   526
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   527
    |indexList keyList|
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   528
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   529
    indexList := self indexList.
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   530
    keyList := indexList 
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   531
        collect:[:k | 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   532
            k isSymbol 
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   533
                ifTrue:[ k printString] 
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   534
                ifFalse:[ k displayString]
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   535
        ].
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   536
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   537
    sortOrder == #alphabetical ifTrue:[
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   538
        keyList sort:[:a :b | a string < b string].
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   539
    ].
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   540
    ^ keyList
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   541
        keysAndValuesCollect:[:idx :nm |
12258
c25935799d7b Small refactoring to ease subclassing and customization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12254
diff changeset
   542
            self listEntryForName:nm value:(self indexedValueAtIndex:idx)
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   543
        ].
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   544
    "/ ^ keyList
11516
8fd04d15008b changed: #indexedFieldList
Claus Gittinger <cg@exept.de>
parents: 11512
diff changeset
   545
11815
bb38b22a951d changed:
Claus Gittinger <cg@exept.de>
parents: 11516
diff changeset
   546
    "Modified: / 26-09-2012 / 13:22:08 / cg"
12258
c25935799d7b Small refactoring to ease subclassing and customization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12254
diff changeset
   547
    "Modified: / 06-07-2012 / 10:36:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   548
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   549
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   550
instVarIndexForLine:lineNr
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   551
    "helper - return the index for a named instVar;
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   552
     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
   553
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   554
    (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   555
        ^ nil
957
ecbcb2c15ae8 show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   556
    ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   557
    ^ super instVarIndexForLine:lineNr
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   558
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   559
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   560
keyIndexForLine:lineNr
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   561
    "helper - return the index of the key-list"
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   562
5421
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 4269
diff changeset
   563
    |firstRealIndex idx line|
4100
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   564
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   565
    (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3874
diff changeset
   566
        (self hasSelfEntry
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   567
        and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   568
            ^ nil "/ self selected
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   569
        ].
4100
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   570
        firstRealIndex := 1.
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   571
        idx := lineNr.
11512
beaaefe35ca1 nice name list
Claus Gittinger <cg@exept.de>
parents: 9927
diff changeset
   572
        [line := self listEntryAt:firstRealIndex. 
5421
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 4269
diff changeset
   573
         (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
   574
            firstRealIndex := firstRealIndex + 1.
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   575
            idx := idx - 1.
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3874
diff changeset
   576
        ].
4100
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   577
d515e0e48272 suppressed pseudo vars fix
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   578
        ^ idx   
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   579
    ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   580
    ^ super keyIndexForLine:lineNr
11512
beaaefe35ca1 nice name list
Claus Gittinger <cg@exept.de>
parents: 9927
diff changeset
   581
beaaefe35ca1 nice name list
Claus Gittinger <cg@exept.de>
parents: 9927
diff changeset
   582
    "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
   583
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   584
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   585
namedFieldList 
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   586
    "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
   587
7942
fce54ed1ef8b sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7805
diff changeset
   588
    (inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   589
        "/ empty ...
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   590
        ^ OrderedCollection new
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   591
    ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   592
    ^ super namedFieldList
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   593
!
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   594
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   595
release 
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   596
    "release inspected object"
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   597
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   598
    keys := nil.
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   599
    super release
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   600
!
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   601
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   602
selectedKey
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   603
    "selected items key or nil"
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   604
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   605
    |selIdx idx|
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   606
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   607
    selIdx := self theSingleSelectionIndex.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   608
    selIdx notNil ifTrue:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   609
        idx := self keyIndexForLine:selIdx.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   610
        idx notNil ifTrue:[
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   611
            ^ (keys at:idx)
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   612
        ].
4269
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   613
    ].
b5d1e481db7a refactored
Claus Gittinger <cg@exept.de>
parents: 4100
diff changeset
   614
    ^ nil.
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   615
!
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   616
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   617
selectedKeys
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   618
    "selected keys or empty"
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   619
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   620
    |selIdx|
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   621
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   622
    selIdx := self theSingleSelectionIndex.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   623
    selIdx notNil ifTrue:[
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   624
        ^ Array with:self selectedKey
9376
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   625
    ].
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   626
    ^ (selectionIndex ? #()) 
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   627
        collect:[:eachSelectionIndex |
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   628
            |idx|
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   629
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   630
            idx := self keyIndexForLine:eachSelectionIndex.
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   631
            idx notNil 
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   632
                ifTrue:[ (keys at:idx) ]
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   633
                ifFalse:[ nil ]
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   634
        ]
8312c2e767ea allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents: 9350
diff changeset
   635
        thenSelect:[:each | each notNil].
9502
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   636
49a0c6fc64b4 comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents: 9379
diff changeset
   637
    "Modified: / 01-07-2010 / 10:54:31 / cg"
9505
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   638
!
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   639
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   640
selection:lineNrCollection
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   641
    "redefined because of multiselect"
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   642
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   643
    lineNrCollection isEmptyOrNil ifTrue:[
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   644
        self showSelection:nil
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   645
    ] ifFalse:[
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   646
        self showSelection:lineNrCollection first
f7d4e16c1259 added: #selection:
Stefan Vogel <sv@exept.de>
parents: 9502
diff changeset
   647
    ].
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   648
! !
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   649
12405
76f9a872362b Merged 3efd83b86c07 and 1206aff1f11 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12296 12111
diff changeset
   650
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   651
!DictionaryInspectorView methodsFor:'user interaction'!
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   652
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   653
indexedValueAtIndex:idx
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   654
    |key|
470
5bb60cb688c8 category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   655
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   656
    key := keys at:idx.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   657
    ^ inspectedObject at:key ifAbsent:nil.
2190
12158a4f0d9c care for last change when accepting
Claus Gittinger <cg@exept.de>
parents: 2189
diff changeset
   658
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   659
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   660
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   661
indexedValueAtIndex:idx put:newValue
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   662
    |key|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   663
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   664
    key := keys at:idx.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   665
    inspectedObject at:key put:newValue.
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   666
! !
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   667
12405
76f9a872362b Merged 3efd83b86c07 and 1206aff1f11 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12296 12111
diff changeset
   668
957
ecbcb2c15ae8 show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   669
!DictionaryInspectorView class methodsFor:'documentation'!
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   670
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   671
version
12111
0da8cd378b6f class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 11815
diff changeset
   672
    ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.78 2013-01-17 10:48:34 cg Exp $'
8973
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   673
!
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   674
76f40edc89d3 changed: #fieldMenu
Claus Gittinger <cg@exept.de>
parents: 8527
diff changeset
   675
version_CVS
12111
0da8cd378b6f class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 11815
diff changeset
   676
    ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.78 2013-01-17 10:48:34 cg Exp $'
12128
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   677
!
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   678
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   679
version_SVN
12296
6921627a8c27 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12258
diff changeset
   680
    ^ '$Id: DictionaryInspectorView.st 8059 2012-09-27 20:08:20Z vranyj1 $'
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   681
! !
12111
0da8cd378b6f class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents: 11815
diff changeset
   682