'From Cuis 2.6 of 10 August 2010 [latest update: #540] on 29 August 2010 at 9:04:41 am'!
!classDefinition: #ContextInspector category: #'Tools-Inspector'!
Inspector subclass: #ContextInspector
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Tools-Inspector'!

!ContextInspector methodsFor: 'accessing' stamp: 'ar 8/19/2010 12:24'!
fieldList
	"Answer the base field list plus an abbreviated list of indices."

	^ self baseFieldList , (object tempNames collect:[:t| '[',t,']'])! !

!ContextInspector methodsFor: 'accessing' stamp: 'ar 8/19/2010 12:21'!
selection
	"The receiver has a list of variables of its inspected object.
	One of these is selected. Answer the value of the selected variable."
	| basicIndex |
	selectionIndex = 0 ifTrue: [^ ''].
	selectionIndex = 1 ifTrue: [^ object].
	selectionIndex = 2 ifTrue: [^ object longPrintStringLimitedTo: 20000].
	(selectionIndex - 2) <= object class instSize
		ifTrue: [^ object instVarAt: selectionIndex - 2].
	basicIndex := selectionIndex - 2 - object class instSize.
	^object debuggerMap namedTempAt: basicIndex in: object
! !


!MethodContext methodsFor: '*Tools-Inspector' stamp: 'ar 8/19/2010 12:16'!
inspectorClass
	"Answer the class of the inspector to be used on the receiver.  Called by inspect; 
	use basicInspect to get a normal (less useful) type of inspector."

	^ ContextInspector! !

