<div dir="ltr">Hmm. <div>I seems when you click explore/ inspect the current selection you "jump up" a level and then you lose the inspector/ explorer for the object you had in the previous tool.</div><div><br></div><div>Eg:</div><div>Inspect a object. </div><div>Select it's instance variable</div><div>Click Explore</div><div>A explorer for the instance variable opens</div><div>You can't go back to original object</div><div class="gmail_extra"><br></div><div class="gmail_extra">Karl</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 12, 2015 at 6:27 PM, karl ramberg <span dir="ltr"><<a href="mailto:karlramberg@gmail.com" target="_blank">karlramberg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>You are making really nice enhancements :-)</div><div><br></div><div><div>BTW : Could we preserve the selection in the list as well ? </div><div>Or are the list models too different for it to make sense ?</div><div>First level selection should probably work...</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Karl</div></font></span><div><div class="h5"><div><br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 12, 2015 at 4:56 PM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Marcel Taeumel uploaded a new version of Tools to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tools-mt.582.mcz" target="_blank">http://source.squeak.org/trunk/Tools-mt.582.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-mt.582<br>
Author: mt<br>
Time: 12 April 2015, 4:56:27.909 pm<br>
UUID: 3ad55be5-74b1-f84f-98d1-b1cf671476d2<br>
Ancestors: Tools-mt.581<br>
<br>
Preserve expressions that were entered in the code pane in inspector/explorer when switching between those tools.<br>
<br>
=============== Diff against Tools-mt.581 ===============<br>
<br>
Item was changed:<br>
StringHolder subclass: #Inspector<br>
+ instanceVariableNames: 'object selectionIndex timeOfLastListUpdate selectionUpdateTime context expression'<br>
- instanceVariableNames: 'object selectionIndex timeOfLastListUpdate selectionUpdateTime context'<br>
classVariableNames: ''<br>
poolDictionaries: ''<br>
category: 'Tools-Inspector'!<br>
<br>
!Inspector commentStamp: '<historical>' prior: 0!<br>
I represent a query path into the internal representation of an object. As a StringHolder, the string I represent is the value of the currently selected variable of the observed object.!<br>
<br>
Item was changed:<br>
----- Method: Inspector>>buildCodePaneWith: (in category 'toolbuilder') -----<br>
buildCodePaneWith: builder<br>
| textSpec |<br>
textSpec := builder pluggableTextSpec new.<br>
textSpec<br>
model: self;<br>
+ getText: #expression;<br>
+ editText: #expression:;<br>
- getText: #trash;<br>
- setText: #trash:;<br>
help: #helpText;<br>
selection: #contentsSelection;<br>
menu: #codePaneMenu:shifted:;<br>
askBeforeDiscardingEdits: false.<br>
^textSpec!<br>
<br>
Item was changed:<br>
----- Method: Inspector>>exploreObject (in category 'toolbuilder') -----<br>
exploreObject<br>
"Switch to an explorer tool."<br>
<br>
+ | window model |<br>
+ window := self object explore.<br>
+ model := window model.<br>
+<br>
+ model setExpression: self expression.<br>
+ window bounds: self containingWindow bounds.<br>
- self object explore<br>
- bounds: self containingWindow bounds.<br>
self changed: #close.!<br>
<br>
Item was added:<br>
+ ----- Method: Inspector>>expression (in category 'accessing') -----<br>
+ expression<br>
+<br>
+ ^ expression ifNil: ['']!<br>
<br>
Item was added:<br>
+ ----- Method: Inspector>>expression: (in category 'accessing') -----<br>
+ expression: aString<br>
+<br>
+ expression := aString.!<br>
<br>
Item was added:<br>
+ ----- Method: Inspector>>setExpression: (in category 'code') -----<br>
+ setExpression: aString<br>
+<br>
+ self expression: aString.<br>
+ self changed: #expression.!<br>
<br>
Item was changed:<br>
AbstractHierarchicalList subclass: #ObjectExplorer<br>
+ instanceVariableNames: 'root currentParent inspector monitorList expression'<br>
- instanceVariableNames: 'root currentParent inspector monitorList'<br>
classVariableNames: ''<br>
poolDictionaries: ''<br>
category: 'Tools-Explorer'!<br>
<br>
!ObjectExplorer commentStamp: '<historical>' prior: 0!<br>
ObjectExplorer provides a hierarchical alternative to #inspect. Simply evaluate an expression like:<br>
<br>
World explore<br>
<br>
and enjoy.!<br>
<br>
Item was changed:<br>
----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder') -----<br>
buildWith: builder<br>
<br>
| windowSpec treeSpec textSpec buttonSpec buttonOffset |<br>
windowSpec := builder pluggableWindowSpec new.<br>
windowSpec<br>
model: self;<br>
children: OrderedCollection new;<br>
label: #label;<br>
extent: self initialExtent.<br>
<br>
treeSpec := builder pluggableTreeSpec new.<br>
treeSpec<br>
model: self;<br>
nodeClass: self class nodeClass;<br>
roots: #getList;<br>
keyPress: #explorerKey:from:event:;<br>
getSelected: #currentSelection;<br>
setSelected: #currentSelection:;<br>
setSelectedParent: #currentParent:;<br>
menu: #genericMenu:;<br>
autoDeselect: false;<br>
columns: (ObjectExplorerWrapper showContentsInColumns<br>
ifTrue: [{<br>
[:listMorph | (listMorph filteredItems collect: [:item |<br>
item preferredWidthOfColumn: 1]) max].<br>
nil "take all the space"}]);<br>
frame: (0@0 corner: 1@0.75).<br>
windowSpec children add: treeSpec.<br>
<br>
buttonOffset := (Preferences standardButtonFont widthOfString: 'inspect') * 3/2.<br>
<br>
textSpec := builder pluggableTextSpec new.<br>
textSpec<br>
model: self;<br>
+ getText: #expression;<br>
+ editText: #expression:;<br>
menu: #codePaneMenu:shifted:;<br>
help: 'Evaluate expressions for the current tree selection...' translated;<br>
frame: (LayoutFrame fractions: (0@0.75 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)).<br>
windowSpec children add: textSpec.<br>
<br>
buttonSpec := builder pluggableButtonSpec new<br>
model: self;<br>
label: 'inspect';<br>
action: #inspectObject;<br>
help: 'Switch to an inspector tool';<br>
frame: (LayoutFrame fractions: (1@0.75 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)).<br>
windowSpec children add: buttonSpec.<br>
<br>
[^ builder build: windowSpec]<br>
ensure: [self changed: #expandRootsRequested]!<br>
<br>
Item was added:<br>
+ ----- Method: ObjectExplorer>>expression (in category 'accessing') -----<br>
+ expression<br>
+<br>
+ ^ expression!<br>
<br>
Item was added:<br>
+ ----- Method: ObjectExplorer>>expression: (in category 'accessing') -----<br>
+ expression: aString<br>
+<br>
+ expression := aString.!<br>
<br>
Item was changed:<br>
----- Method: ObjectExplorer>>inspectObject (in category 'toolbuilder') -----<br>
inspectObject<br>
"Switch to an inspector tool."<br>
<br>
+ | window model |<br>
+ window := self object inspect.<br>
+ model := window model.<br>
+<br>
+ model setExpression: self expression.<br>
+ window bounds: self containingWindow bounds.<br>
- self object inspect<br>
- bounds: self containingWindow bounds.<br>
self changed: #close.!<br>
<br>
Item was added:<br>
+ ----- Method: ObjectExplorer>>setExpression: (in category 'accessing - other') -----<br>
+ setExpression: aString<br>
+<br>
+ self expression: aString.<br>
+ self changed: #expression.!<br>
<br>
<br>
</blockquote></div><br></div></div></div></div></div></div>
</blockquote></div><br></div></div>