SetInspectorView.st
author Jan Vrany <jan.vrany@labware.com>
Tue, 09 Jun 2020 11:02:53 +0100
branchjv
changeset 19589 8f1c638e83cf
parent 18532 cccb41254edf
permissions -rw-r--r--
Fix "accept" action in `ChangeSetBrowser2` when using one-column layout
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2627
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     1
"
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     2
 COPYRIGHT (c) 1996 by Claus Gittinger / eXept Software AG
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     3
              All Rights Reserved
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     4
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     5
 This software is furnished under a license and may be used
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     6
 only in accordance with the terms of that license and with the
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     9
 other person.  No title to or ownership of the software is
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    10
 hereby transferred.
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    11
"
2717
dc997032a34e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2627
diff changeset
    12
"{ Package: 'stx:libtool' }"
dc997032a34e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2627
diff changeset
    13
15801
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
    14
"{ NameSpace: Smalltalk }"
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
    15
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    16
InspectorView subclass:#SetInspectorView
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:'keys'
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    20
	category:'Interface-Inspector'
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    21
!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    22
794
b4b902784e00 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    23
!SetInspectorView class methodsFor:'documentation'!
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    24
2627
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    25
copyright
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    26
"
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    27
 COPYRIGHT (c) 1996 by Claus Gittinger / eXept Software AG
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    28
              All Rights Reserved
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    29
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    30
 This software is furnished under a license and may be used
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    31
 only in accordance with the terms of that license and with the
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    33
 be provided or otherwise made available to, or used by, any
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    34
 other person.  No title to or ownership of the software is
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    35
 hereby transferred.
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    36
"
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    37
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    38
!
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    39
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    40
documentation
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    41
"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    42
    A modified inspector for Sets
510
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 370
diff changeset
    43
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 370
diff changeset
    44
    [author:]
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 370
diff changeset
    45
        Stefan Vogel
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    46
"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    47
!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    48
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    49
examples
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    50
"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    51
    #(a b c d e) asSet inspect
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    52
"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    53
! !
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    54
6491
d02c41c57d02 better menu
Claus Gittinger <cg@exept.de>
parents: 6324
diff changeset
    55
!SetInspectorView methodsFor:'menu'!
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    56
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    57
fieldMenu
1361
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
    58
    <resource: #programMenu >
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
    59
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    60
    |menu|
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    61
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    62
    menu := super fieldMenu.
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    63
    menu addLabels:#(
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    64
                       '-'
3200
4889a13402db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2717
diff changeset
    65
                       'Remove element'
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    66
                   )
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    67
         selectors:#(
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    68
                       nil 
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    69
                       doRemoveKey
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    70
                   ).
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    71
2236
257f587ad7dc migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
    72
    (self keyIndexForLine:selectionIndex) isNil ifTrue:[
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    73
        menu disableAll:#(doRemoveKey)
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    74
    ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    75
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    76
    ^ menu
1361
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
    77
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
    78
    "Modified: / 29.10.1997 / 03:41:47 / cg"
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    79
! !
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    80
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    81
!SetInspectorView methodsFor:'private'!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    82
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    83
baseInspectedObjectClass
15801
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
    84
    (inspectedObject class inheritsFrom:Set) ifTrue:[
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
    85
        ^ Set
6324
29bf9ceffe8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
    86
    ].
15801
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
    87
    ^ Object
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    88
!
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    89
647
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    90
defaultLabel
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
    91
    ^ 'Contents'
647
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    92
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    93
    "
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    94
     (Set with:1 with:2 with:3) inspect
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    95
    "
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    96
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    97
    "Modified: 28.6.1996 / 16:05:42 / cg"
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    98
!
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    99
6943
ba2398a0e68f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
   100
derivedFields
11894
968f5c4e9b41 changed: #derivedFields
Claus Gittinger <cg@exept.de>
parents: 8526
diff changeset
   101
    ^ super derivedFields
968f5c4e9b41 changed: #derivedFields
Claus Gittinger <cg@exept.de>
parents: 8526
diff changeset
   102
"/
968f5c4e9b41 changed: #derivedFields
Claus Gittinger <cg@exept.de>
parents: 8526
diff changeset
   103
"/ size is already there
968f5c4e9b41 changed: #derivedFields
Claus Gittinger <cg@exept.de>
parents: 8526
diff changeset
   104
"/    ^ Dictionary new
968f5c4e9b41 changed: #derivedFields
Claus Gittinger <cg@exept.de>
parents: 8526
diff changeset
   105
"/        declareAllNewFrom:(super derivedFields ? #());
968f5c4e9b41 changed: #derivedFields
Claus Gittinger <cg@exept.de>
parents: 8526
diff changeset
   106
"/        add:('-size' -> [ object size ]);
968f5c4e9b41 changed: #derivedFields
Claus Gittinger <cg@exept.de>
parents: 8526
diff changeset
   107
"/        yourself
6943
ba2398a0e68f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
   108
7379
55d5b77c7136 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6943
diff changeset
   109
    "Modified: / 09-10-2006 / 12:27:21 / cg"
6943
ba2398a0e68f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
   110
!
ba2398a0e68f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
   111
3875
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   112
indexList 
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   113
    "return a list of indexes to show in the selectionList.
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   114
     Set hasMore to true, if a '...' entry should be added."
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   115
8526
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   116
    inspectedObject size > nShown ifTrue:[
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   117
        |coll|
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   118
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   119
        coll := (SortedCollection new:nShown) sortBlock:[:a :b | a displayString < b displayString].
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   120
        inspectedObject do:[:el |
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   121
            coll add:el.
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   122
            coll size >= nShown ifTrue:[ 
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   123
                hasMore := true.
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   124
                ^ coll
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   125
            ].
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   126
        ].
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   127
    ].
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   128
3875
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   129
    ^ inspectedObject asSortedCollection:[:a :b | a displayString < b displayString].
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   130
!
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   131
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   132
indexedFieldList 
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   133
    "return a list of indexed-variable names to show in the selectionList.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   134
     Set hasMore to true, if a '...' entry should be added."
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   135
3875
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   136
    keys := self indexList.
15801
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   137
    ^ keys collect:[:k | k displayString].
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   138
!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   139
12833
eaceca8a5fb0 menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 11894
diff changeset
   140
numIndexedFields
eaceca8a5fb0 menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 11894
diff changeset
   141
    ^ inspectedObject size
eaceca8a5fb0 menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 11894
diff changeset
   142
!
eaceca8a5fb0 menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 11894
diff changeset
   143
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   144
release 
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   145
    "release inspected object"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   146
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   147
    keys := nil.
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   148
    super release
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   149
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   150
    "Created: 9.2.1996 / 12:04:30 / stefan"
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   151
!
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   152
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   153
showAllIndexedVarsInFieldList
15801
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   154
    ^ true
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   155
! !
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   156
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   157
!SetInspectorView methodsFor:'queries'!
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   158
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   159
isIndexShown
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   160
    ^ false
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   161
! !
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   162
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   163
!SetInspectorView methodsFor:'user interaction'!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   164
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   165
doRemoveKey
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   166
    "remove selected item from keys"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   167
2192
c7bce869223c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2191
diff changeset
   168
    |key idx|
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   169
2236
257f587ad7dc migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   170
    idx := self keyIndexForLine:selectionIndex.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   171
    idx notNil ifTrue:[
2192
c7bce869223c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2191
diff changeset
   172
        key := keys at:idx.
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   173
        (inspectedObject includes:key) ifTrue:[
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   174
            listView cursor:(Cursor wait).
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   175
            inspectedObject remove:key.
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   176
            keys := nil.
2236
257f587ad7dc migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   177
            selectionIndex := selectedLine := nil.
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   178
            inspectedObject changed.
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   179
            listView cursor:(Cursor hand).
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   180
            self reinspect.
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   181
        ].
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   182
    ]
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   183
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   184
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   185
!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   186
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   187
indexedValueAtIndex:idx
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   188
    ^ keys at:idx
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   189
!
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   190
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   191
indexedValueAtKey:idx
15801
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   192
    ^ idx
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   193
!
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   194
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   195
valueAtLine:lineNr put:newValue
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   196
    "store newValue;
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   197
     For non-named instvars, we add the new value - ignoring the selection"
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   198
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   199
    |idx|
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   200
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   201
    idx := self instVarIndexForLine:selectionIndex.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   202
    idx notNil ifTrue:[
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   203
        inspectedObject instVarAt:idx put:newValue.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   204
    ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   205
        inspectedObject add:newValue.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   206
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   207
"/        inspectedObject changed.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   208
        self reinspect.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   209
    ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   210
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   211
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   212
! !
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   213
794
b4b902784e00 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   214
!SetInspectorView class methodsFor:'documentation'!
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   215
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   216
version
15801
693e2bc2b0e1 class: SetInspectorView
Stefan Vogel <sv@exept.de>
parents: 12833
diff changeset
   217
    ^ '$Header$'
12128
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   218
!
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   219
12431
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12401
diff changeset
   220
version_HG
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12401
diff changeset
   221
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12401
diff changeset
   222
    ^ '$Changeset: <not expanded> $'
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12401
diff changeset
   223
!
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12401
diff changeset
   224
12128
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   225
version_SVN
12308
5d9291c0fc27 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   226
    ^ '$Id: SetInspectorView.st 8074 2012-11-30 17:23:39Z vranyj1 $'
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   227
! !
12833
eaceca8a5fb0 menu fix: showMore/hasMore
Claus Gittinger <cg@exept.de>
parents: 11894
diff changeset
   228