'From Squeak3.7beta of ''1 April 2004'' [latest update: #5923] on 27 May 2004 at 5:32:45 pm'! "Change Set: InspectorExplorerFixes-rhi Date: 27 May 2004 Author: Robert Hirschfeld Inspector did not react appropriately and ObjectExplorer not at all to command keys indicated in their respective menus..."! !Inspector methodsFor: 'menu commands' stamp: 'rhi 5/27/2004 17:00'! fieldListMenu: aMenu "Arm the supplied menu with items for the field-list of the receiver" Smalltalk isMorphic ifTrue: [aMenu addStayUpItemSpecial]. aMenu addList: #( ('inspect (i)' inspectSelection) ('explore (I)' exploreSelection)). self addCollectionItemsTo: aMenu. aMenu addList: #( - ('method refs to this inst var' referencesToSelection) ('methods storing into this inst var' defsOfSelection) ('objects pointing to this value' objectReferencesToSelection) ('chase pointers' chasePointers) - ('browse full (b)' browseMethodFull) ('browse class' browseClass) ('browse hierarchy (h)' classHierarchy) ('browse protocol (p)' browseFullProtocol) - ('inst var refs...' browseInstVarRefs) ('inst var defs...' browseInstVarDefs) ('class var refs...' classVarRefs) ('class variables' browseClassVariables) ('class refs (N)' browseClassRefs) - ('copy name (c)' copyName) ('basic inspect' inspectBasic)). Smalltalk isMorphic ifTrue: [aMenu addList: #( - ('tile for this value (t)' tearOffTile) ('viewer for this value (v)' viewerForValue))]. ^ aMenu " - ('alias for this value' aliasForValue) ('watcher for this slot' watcherForSlot)" ! ! !Inspector methodsFor: 'menu commands' stamp: 'rhi 5/27/2004 17:09'! inspectorKey: aChar from: view "Respond to a Command key issued while the cursor is over my field list" aChar == $i ifTrue: [^ self selection inspect]. aChar == $I ifTrue: [^ self selection explore]. aChar == $b ifTrue: [^ self browseMethodFull]. aChar == $h ifTrue: [^ self classHierarchy]. aChar == $c ifTrue: [^ self copyName]. aChar == $p ifTrue: [^ self browseFullProtocol]. aChar == $N ifTrue: [^ self browseClassRefs]. aChar == $t ifTrue: [^ self tearOffTile]. aChar == $v ifTrue: [^ self viewerForValue]. ^ self arrowKey: aChar from: view! ! !ObjectExplorer methodsFor: 'accessing' stamp: 'rhi 5/27/2004 17:05'! explorerFor: anObject | window listMorph | rootObject _ anObject. window _ (SystemWindow labelled: self label) model: self. window addMorph: (listMorph _ SimpleHierarchicalListMorph on: self list: #getList selected: #getCurrentSelection changeSelected: #noteNewSelection: menu: #genericMenu: keystroke: #explorerKey:from:) frame: (0@0 corner: 1@0.8). window addMorph: ((PluggableTextMorph on: self text: #trash accept: #trash: readSelection: #contentsSelection menu: #codePaneMenu:shifted:) askBeforeDiscardingEdits: false) frame: (0@0.8 corner: 1@1). listMorph autoDeselect: false. ^ window! ! !ObjectExplorer methodsFor: 'menus' stamp: 'rhi 5/27/2004 17:27'! explorerKey: aChar from: view "Similar to #genericMenu:..." | insideObject parentObject | currentSelection ifNotNil: [ insideObject _ self object. parentObject _ self parentObject. inspector ifNil: [inspector _ Inspector new]. inspector inspect: parentObject; object: insideObject. aChar == $i ifTrue: [^ self inspectSelection]. aChar == $I ifTrue: [^ self exploreSelection]. aChar == $b ifTrue: [^ inspector browseMethodFull]. aChar == $h ifTrue: [^ inspector classHierarchy]. aChar == $c ifTrue: [^ inspector copyName]. aChar == $p ifTrue: [^ inspector browseFullProtocol]. aChar == $N ifTrue: [^ inspector browseClassRefs]. aChar == $t ifTrue: [^ inspector tearOffTile]. aChar == $v ifTrue: [^ inspector viewerForValue]]. ^ self arrowKey: aChar from: view! !