ContextInspectorView.st
author claus
Tue, 28 Feb 1995 22:57:00 +0100
changeset 73 e332d9c71624
parent 57 36e13831b62d
child 98 e6fac698d6d9
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
     1
"
d904237f7c44 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
     3
	      All Rights Reserved
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
     4
d904237f7c44 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
d904237f7c44 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
d904237f7c44 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
d904237f7c44 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
d904237f7c44 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
d904237f7c44 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
d904237f7c44 Initial revision
claus
parents:
diff changeset
    11
"
d904237f7c44 Initial revision
claus
parents:
diff changeset
    12
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    13
'From Smalltalk/X, Version:2.10.4 on 28-feb-1995 at 2:11:55 am'!
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    14
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    15
InspectorView subclass:#ContextInspectorView
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    16
	 instanceVariableNames:'inspectedContext values names showingTemporaries'
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    17
	 classVariableNames:''
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    18
	 poolDictionaries:''
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    19
	 category:'Interface-Inspector'
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    20
!
d904237f7c44 Initial revision
claus
parents:
diff changeset
    21
d904237f7c44 Initial revision
claus
parents:
diff changeset
    22
ContextInspectorView comment:'
d904237f7c44 Initial revision
claus
parents:
diff changeset
    23
COPYRIGHT (c) 1993 by Claus Gittinger
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    24
	      All Rights Reserved
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    25
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    26
$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.9 1995-02-28 21:55:45 claus Exp $
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    27
'!
d904237f7c44 Initial revision
claus
parents:
diff changeset
    28
d904237f7c44 Initial revision
claus
parents:
diff changeset
    29
!ContextInspectorView class methodsFor:'documentation'!
d904237f7c44 Initial revision
claus
parents:
diff changeset
    30
d904237f7c44 Initial revision
claus
parents:
diff changeset
    31
copyright
d904237f7c44 Initial revision
claus
parents:
diff changeset
    32
"
d904237f7c44 Initial revision
claus
parents:
diff changeset
    33
 COPYRIGHT (c) 1993 by Claus Gittinger
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    34
	      All Rights Reserved
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    35
d904237f7c44 Initial revision
claus
parents:
diff changeset
    36
 This software is furnished under a license and may be used
d904237f7c44 Initial revision
claus
parents:
diff changeset
    37
 only in accordance with the terms of that license and with the
d904237f7c44 Initial revision
claus
parents:
diff changeset
    38
 inclusion of the above copyright notice.   This software may not
d904237f7c44 Initial revision
claus
parents:
diff changeset
    39
 be provided or otherwise made available to, or used by, any
d904237f7c44 Initial revision
claus
parents:
diff changeset
    40
 other person.  No title to or ownership of the software is
d904237f7c44 Initial revision
claus
parents:
diff changeset
    41
 hereby transferred.
d904237f7c44 Initial revision
claus
parents:
diff changeset
    42
"
d904237f7c44 Initial revision
claus
parents:
diff changeset
    43
!
d904237f7c44 Initial revision
claus
parents:
diff changeset
    44
d904237f7c44 Initial revision
claus
parents:
diff changeset
    45
version
d904237f7c44 Initial revision
claus
parents:
diff changeset
    46
"
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    47
$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.9 1995-02-28 21:55:45 claus Exp $
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    48
"
d904237f7c44 Initial revision
claus
parents:
diff changeset
    49
!
d904237f7c44 Initial revision
claus
parents:
diff changeset
    50
d904237f7c44 Initial revision
claus
parents:
diff changeset
    51
documentation
d904237f7c44 Initial revision
claus
parents:
diff changeset
    52
"
d904237f7c44 Initial revision
claus
parents:
diff changeset
    53
    a modified Inspector for Contexts (used in Debugger)
d904237f7c44 Initial revision
claus
parents:
diff changeset
    54
"
d904237f7c44 Initial revision
claus
parents:
diff changeset
    55
! !
d904237f7c44 Initial revision
claus
parents:
diff changeset
    56
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    57
!ContextInspectorView methodsFor:'private'!
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
    58
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    59
setDoitActionIn:aWorkspace for:aContext
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    60
    aWorkspace doItAction:[:theCode |
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    61
	Compiler evaluate:theCode
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    62
		       in:aContext
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    63
		 receiver:nil
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    64
		notifying:aWorkspace
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    65
		   logged:true 
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    66
		   ifFail:nil
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    67
    ]
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
    68
!
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
    69
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    70
valueAtLine:lineNr
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    71
    "helper - return the value of the selected entry"
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    72
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    73
    ^ values at:lineNr.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    74
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    75
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    76
!
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    77
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    78
fieldList
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    79
    ^ names
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
    80
! !
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
    81
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    82
!ContextInspectorView methodsFor:'accessing'!
d904237f7c44 Initial revision
claus
parents:
diff changeset
    83
d904237f7c44 Initial revision
claus
parents:
diff changeset
    84
inspect:con
d904237f7c44 Initial revision
claus
parents:
diff changeset
    85
    "set the context to be inspected"
d904237f7c44 Initial revision
claus
parents:
diff changeset
    86
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    87
    |aList homeContext method homeNames rec sel implementorClass 
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
    88
     argNames varNames tmpNames m|
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    89
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    90
    hasMore := false.
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    91
    inspectedObject := nil.
d904237f7c44 Initial revision
claus
parents:
diff changeset
    92
    inspectedContext := con.
49
6fe62433cfa3 *** empty log message ***
claus
parents: 45
diff changeset
    93
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    94
    con isNil ifTrue:[
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    95
	names := nil.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    96
	values := nil.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
    97
	listView list:nil. 
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    98
	^ self
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
    99
    ].
d904237f7c44 Initial revision
claus
parents:
diff changeset
   100
56
d0cb937cbcaa *** empty log message ***
claus
parents: 55
diff changeset
   101
"/    realized ifFalse:[^ self].
d0cb937cbcaa *** empty log message ***
claus
parents: 55
diff changeset
   102
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   103
    homeContext := con methodHome.
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   104
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   105
    homeContext isNil ifTrue:[
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   106
	"its a cheap blocks context"
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   107
	rec := con receiver.
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   108
	sel := con selector.
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   109
	homeNames := OrderedCollection new.
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   110
    ] ifFalse:[
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   111
	rec := homeContext receiver.
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   112
	sel := homeContext selector.
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   113
55
abfd613f95d9 *** empty log message ***
claus
parents: 51
diff changeset
   114
	implementorClass := homeContext methodClass.
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   115
	implementorClass notNil ifTrue:[
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   116
	    method := implementorClass compiledMethodAt:sel.
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   117
	    method notNil ifTrue:[
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   118
		method isWrapped ifTrue:[
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   119
		    m := method originalMethod.
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   120
		    m notNil ifTrue:[
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   121
			method := m.
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   122
		    ]
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   123
		].
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   124
	    ].
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   125
	    method notNil ifTrue:[
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   126
		method source notNil ifTrue:[
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   127
		    homeNames := method methodArgAndVarNames.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   128
		]
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   129
	    ]
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   130
	].
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   131
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   132
	"
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   133
	 create dummy names for method vars (if there is no source available)
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   134
	"
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   135
	homeNames isNil ifTrue:[
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   136
	    homeNames := OrderedCollection new.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   137
	    1 to:homeContext numArgs do:[:index |
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   138
		homeNames add:('mArg' , index printString)
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   139
	    ].
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   140
	    1 to:homeContext nvars do:[:index |
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   141
		homeNames add:('mVar' , index printString)
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   142
	    ].
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   143
	    showingTemporaries ifTrue:[
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   144
		1 to:homeContext ntemp do:[:index |
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   145
		    homeNames add:('mTmp' , index printString)
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   146
		]
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   147
	    ]
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   148
	].
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   149
    ].
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   150
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   151
    "
d904237f7c44 Initial revision
claus
parents:
diff changeset
   152
     stupid: should find the block via the contexts
d904237f7c44 Initial revision
claus
parents:
diff changeset
   153
     method-home and put real names in here
d904237f7c44 Initial revision
claus
parents:
diff changeset
   154
    "
d904237f7c44 Initial revision
claus
parents:
diff changeset
   155
    con isBlockContext ifTrue:[
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   156
	names := OrderedCollection new.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   157
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   158
	argNames := (1 to:(con numArgs)) collect:[:i | 'arg' , i printString].
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   159
	names addAll:argNames.
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   160
	varNames := (1 to:(con nvars)) collect:[:i | 'var' , i printString].
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   161
	names addAll:varNames.
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   162
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   163
	showingTemporaries ifTrue:[
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   164
	    tmpNames := (1 to:(con ntemp)) collect:[:i | 'tmp' , i printString].
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   165
	    names addAll:tmpNames.
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   166
	].
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   167
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   168
	names addAll:homeNames.
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   169
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   170
	values := Array withAll:(con argsAndVars).
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   171
	(showingTemporaries and:[con ntemp ~~ 0]) ifTrue:[
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   172
	    values := values , con temporaries
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   173
	].
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   174
	homeContext notNil ifTrue:[
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   175
	    values := values , homeContext argsAndVars.
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   176
	    (showingTemporaries and:[homeContext ntemp ~~ 0])ifTrue:[
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   177
		values := values , homeContext temporaries
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   178
	    ].
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   179
	].
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   180
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   181
    ] ifFalse:[
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   182
	names := homeNames.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   183
	values := homeContext argsAndVars
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   184
    ].
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   185
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   186
    listView list:names. 
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   187
d904237f7c44 Initial revision
claus
parents:
diff changeset
   188
    workspace contents:nil.
d904237f7c44 Initial revision
claus
parents:
diff changeset
   189
    self setDoitActionIn:workspace for:con.
d904237f7c44 Initial revision
claus
parents:
diff changeset
   190
!
d904237f7c44 Initial revision
claus
parents:
diff changeset
   191
d904237f7c44 Initial revision
claus
parents:
diff changeset
   192
release
d904237f7c44 Initial revision
claus
parents:
diff changeset
   193
    "release inspected object"
d904237f7c44 Initial revision
claus
parents:
diff changeset
   194
d904237f7c44 Initial revision
claus
parents:
diff changeset
   195
    inspectedContext := nil.
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   196
    names := values := nil.
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   197
    super release
d904237f7c44 Initial revision
claus
parents:
diff changeset
   198
! !
d904237f7c44 Initial revision
claus
parents:
diff changeset
   199
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   200
!ContextInspectorView methodsFor:'user actions'!
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   201
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   202
showSelection:lineNr
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   203
    "user clicked on an entry - show value in workspace"
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   204
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   205
    workspace replace:(values at:lineNr) displayString.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   206
    selectedLine := lineNr
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   207
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   208
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   209
!
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   210
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   211
showTemporaries
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   212
    showingTemporaries := true.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   213
    self inspect:inspectedContext
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   214
!
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   215
d904237f7c44 Initial revision
claus
parents:
diff changeset
   216
doAccept:theText
d904237f7c44 Initial revision
claus
parents:
diff changeset
   217
    |value|
d904237f7c44 Initial revision
claus
parents:
diff changeset
   218
d904237f7c44 Initial revision
claus
parents:
diff changeset
   219
    selectedLine notNil ifTrue:[
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   220
	value := Compiler evaluate:theText
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   221
			  receiver:inspectedObject 
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   222
			 notifying:workspace.
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   223
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   224
	"yes, you can do that with a context"
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   225
	inspectedContext at:selectedLine put:value.
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   226
    ].
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   227
!
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   228
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   229
hideTemporaries
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   230
    showingTemporaries := false.
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   231
    self inspect:inspectedContext
34
d904237f7c44 Initial revision
claus
parents:
diff changeset
   232
! !
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   233
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   234
!ContextInspectorView methodsFor:'initialization'!
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 49
diff changeset
   235
73
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   236
initialize
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   237
    super initialize.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   238
    showingTemporaries := false.
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   239
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   240
!
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   241
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   242
fieldMenu
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   243
    |labels selectors|
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   244
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   245
    showingTemporaries ifFalse:[
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   246
	labels := #(
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   247
		     'inspect'
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   248
		     'basicInspect'
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   249
		     '-'
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   250
		     'show temporaries'
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   251
		   ).
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   252
	selectors := #(
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   253
		     doInspect
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   254
		     doBasicInspect
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   255
		     nil
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   256
		     showTemporaries
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   257
		   )
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   258
    ] ifTrue:[
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   259
	labels := #(
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   260
		     'inspect'
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   261
		     'basicInspect'
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   262
		     '-'
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   263
		     'hide temporaries'
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   264
		   ).
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   265
	selectors := #(
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   266
		     doInspect
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   267
		     doBasicInspect
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   268
		     nil
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   269
		     hideTemporaries
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   270
		   )
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   271
    ].
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   272
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   273
    ^ PopUpMenu
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   274
	  labels:(resources array:labels)
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   275
	  selectors:selectors
e332d9c71624 *** empty log message ***
claus
parents: 57
diff changeset
   276
! !