<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        <div>Hi Christoph.</div><div><br></div>ChangeSets can have both preamble and postscripts:<div><br></div><div><img id="88234c30-4d17-4b22-9d2c-5031ee29be4d" src="cid:dadff93f-59b7-40d2-b7b6-2dc34921704e" width="auto"></img><br></div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 16.02.2020 23:13:41 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div id="divtagdefaultwrapper" style="font-size: 12pt;color: #000000;font-family: Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi all! :-)</p>
<p><span style="font-size: 12pt"><br>
</span></p>
<p><span style="font-size: 12pt">After a long, long time of refactoring and being busy with other projects</span><span style="font-size: 12pt">, I'm excited to finally present you a second version of the refactored & completely refurbished inspectors! For
 the traceback: The first version I created last summer lead to </span><a href="http://forum.world.st/The-Inbox-Tools-ct-900-mcz-td5104860.html" class="OWAAutoLink" style="font-size: 12pt">Tools-ct.900</a><span style="font-size: 12pt"> which you gave me many
 helpful reviews for. Thanks to Marcel and Chris for all the time they spent in looking at the changes! Attached you find the files that form the second refactoring.</span></p>
<p><span style="font-size: 12pt"><br>
</span></p>
<p><span style="font-size: 12pt"><b>Details on how to load these into your image:</b></span></p>
<p><span style="font-size: 12pt">This time I decided against sending the proposals into the inbox, as, unfortunately, many packages are coupled to the inspector, such as Protocols, EToys, or Morphic (even though only one reference). It was thus easier to create
 a changeset. Due to the scriptless nature of changesets, please do the following:</span></p>
<p>
<ol style="margin-bottom: 0px; margin-top: 0px;">
<li><span style="font-size: 12pt"><b>File in Inspector-prerequisites.cs.</b> This is a subset of <span>Collections-ct.875 which must be loaded in two steps because the involved method #indexOf: is called during file in progress.</span></span></li><li><span style="font-size: 12pt"><span><b>File in Inspector.cs.</b> Confirm to create the two class pools automatically, sigh ...<span style="color: rgb(117, 123, 128);"></span></span></span></li><li><span style="font-size: 12pt"><span><span style="color: rgb(117, 123, 128);">Only i</span><span style="color: rgb(117, 123, 128);">n
</span><span style="color: rgb(117, 123, 128);">case you had any </span><span style="color: rgb(117, 123, 128);">inspectors opened</span><span style="color: rgb(117, 123, 128);">, you might get some nil errors. In this case, </span><b><span style="color: rgb(117, 123, 128);">r</span><span style="color: rgb(117, 123, 128);">un
 Inspector-postload.st</span></b><span style="color: rgb(117, 123, 128);"> and then restart the erroneous
</span><span style="color: rgb(117, 123, 128);">processes</span><span style="color: rgb(117, 123, 128);"> from the second context to fix these errors (if this should ever get into Trunk, we can automate this, of course, without displaying any errors to the
 user).</span></span></span></li></ol>
<div><br>
</div>
<div><b>Overview of the changes made against Tools-ct.900:</b></div>
<div>My original motivation for this refactoring was to eliminate the large number of hard-coded references to indices in the field list and make all the selection logic more reusable. This was mainly done in Tools-ct.900.</div>
<div>The primary suggestion I was told then was not to use a cryptic OrderedDictionary with case-dependent value meanings for describing the inspector fields, but rather a spec class. This was a very great idea, so now each field in an inspector is represented
 by an instance of <b>InspectorField.</b> IMHO this makes management and overall communication between an inspector and its component much easier. As an extra side effect after that change, it was super easy to implement
<b>custom fields,</b> which can be created live by the user to observe and manipulate a non-trivial aspect of the inspectee. Here are some impressions:</div>
<div><br>
</div>
<div>
<table cellspacing="0" role="table" class="ms-rteTable-default" style="border-collapse:collapse; border: 1px solid rgb(198, 198, 198);">
<tbody>
<tr>
<td class="ms-rteTable-default" style="border-collapse: collapse; border: 1px solid rgb(198, 198, 198); width: 120px;">
Finally syntax errors inside the inspector pane:<br>
<img size="0" id="img268803" style="user-select: none;" aria-expanded="false" tabindex="0" aria-haspopup="true" aria-owns="_ariaId_224" aria-flowto="_ariaId_224" height="274" width="372"></img><br>
</td>
<td class="ms-rteTable-default" style="border-collapse: collapse; border: 1px solid rgb(198, 198, 198); width: 120px;">
Custom fields:<br>
<img size="45224" id="img379081" style="user-select: none;" aria-expanded="false" tabindex="0" aria-haspopup="true" aria-owns="_ariaId_242" aria-flowto="_ariaId_242" height="387" width="576"></img><br>
</td>
<td class="ms-rteTable-default" style="border-collapse: collapse; border: 1px solid rgb(198, 198, 198); width: 120px;">
Shout styling of the field titles:<br>
<img size="48624" id="img71431" style="user-select: none;" aria-expanded="false" tabindex="0" aria-haspopup="true" aria-owns="_ariaId_228" aria-flowto="_ariaId_228" height="392" width="561"></img><br>
</td>
<td class="ms-rteTable-default" style="border-collapse: collapse; border: 1px solid rgb(198, 198, 198); width: 120px;">
Dragging (custom) fields from one inspector to another (experimental):<br>
<img size="34597" id="img758807" style="user-select: none;" aria-expanded="false" tabindex="0" aria-haspopup="true" aria-owns="_ariaId_232" aria-flowto="_ariaId_232" height="269" width="748"></img></td>
</tr>
</tbody>
</table>
<br>
</div>
<div>Furthermore, I added a test suite for all inspector classes in the Trunk.</div>
<div><br>
</div>
<div>Here is a detailed changelog (still against Tools-ct.900, so to say a diff-diff):</div>
<div>
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li><span class="md-plain md-expand" style="font-size: 12pt;box-sizing: border-box">Introduce InspectorField (OOP
</span><span data-content="heart" class="md-emoji" style="font-size: 12pt;box-sizing: border-box">❤️</span><span class="md-plain" style="font-size: 12pt;box-sizing: border-box">)</span></li><li><span style="font-size: 12pt">Add support for </span><span style="font-size: 12pt"></span><span style="font-size: 12pt">c</span><span style="font-size: 12pt">ustom fields</span></li><li><span style="font-size: 12pt">Loads of refactoring, in order to beautify and deduplicate inspector classes, and to make it easier to create new inspector subclasses:</span>
<ul>
<li><span style="font-size: 12pt">Introduce </span><span style="font-size: 12pt">streaming
</span><span style="font-size: 12pt">pattern for building the field </span><span style="font-size: 12pt">list</span></li><li><span style="font-size: 12pt"></span>Deduplicate + merge inspector operations on collections (CollectionInspector), allow modifying all kinds of collections</li><li>
<div>Use ContextInspector by default for inspecting contexts</div>
</li><li>
<div><span style="font-size: 12pt">Deduplicate + merge menus, make all promised shortcuts work everywhere</span></div>
</li></ul>
</li><li><span style="font-size: 12pt">New inspector subclass: ClassInspector</span></li><li><span style="font-size: 12pt"></span>Deprecate several obsoleted selectors
<ul>
<li><span style="font-size: 12pt">drop support for #defaultIntegerBaseInDebugger</span></li></ul>
</li><li><span style="font-size: 12pt">Revise constructors – #openOn: does not use #inspectorClass, but #inspect: does</span></li><li>
<p class="md-end-block md-p" style="font-size: 12pt;box-sizing: border-box;line-height: inherit;margin-right: 0px;margin-bottom: 0.5rem;margin-left: 0px;display: inline !important">
<span class="md-plain" style="box-sizing: border-box;">Don’t abuse #initialize:</span></p>
<ul>
<li>
<p class="md-end-block md-p" style="font-size: 12pt;box-sizing: border-box;line-height: inherit;margin-right: 0px;margin-bottom: 0.5rem;margin-left: 0px;display: inline !important">
<span class="md-plain" style="box-sizing: border-box;">now, </span></p>
<span style="font-size: 12pt">#object: exchanges the inspectee</span></li><li><span style="font-size: 12pt">#inspect: may also exchange the inspector</span></li></ul>
</li><li><span style="font-size: 12pt">Improve documentation</span><br>
</li><li><span style="font-size: 12pt">Improve error detection</span><br>
</li><li><span style="font-size: 12pt">Revise stepping/updating mechanism</span><br>
<ul>
<li><span style="font-size: 12pt">#update now updates field list as well (useful for observing a collection, for example)</span></li><li><span style="font-size: 12pt">Please report any performance issues!</span></li></ul>
</li><li>
<p class="md-end-block md-p" style="font-size: 12pt;box-sizing: border-box;line-height: inherit;margin-right: 0px;margin-bottom: 0.5rem;margin-left: 0px;display: inline !important">
<span class="md-plain" style="box-sizing: border-box;">Automatically restore latest selected slot name, use #codeChangedElsewhere</span></p>
<ul>
<li><b>Open Problem:</b> How can we distinguish between both text fields?</li><li>
<p class="md-end-block md-p" style="font-size: 12pt;box-sizing: border-box;line-height: inherit;margin-right: 0px;margin-bottom: 0.5rem;margin-left: 0px;display: inline !important">
<span class="md-plain" style="box-sizing: border-box;"><span>Disable removal of contents that were typed into debugger's inspectors via #<span>restore...InspectorState (*)</span></span><br>
</span></p>
</li></ul>
</li><li><span style="font-size: 12pt">Recategorize extension methods</span><br>
</li><li><span style="font-size: 12pt">Use Shout styler for displaying field list, also </span>respect UI theme changes</li><li><span style="font-size: 12pt">Improve multilingual support</span></li><li><span style="font-size: 12pt">Move #inspectElement as extension method into Object</span></li><li><span style="font-size: 12pt">Allow modification of CompiledMethods</span></li><li><span style="font-size: 12pt">Revise InspectorBrowser: Treat Inspector & Browser equally and use decomposition instead of subclassing</span></li><li><span style="font-size: 12pt">Adds a test suite for all kinds of inspectors</span></li><li><span style="font-size: 12pt">Feature: exchange inspectee by accepting an object in the #self slot</span></li><li><span style="font-size: 12pt">chasePointers and explorePointers are no longer miss-overridden in Inspector but directly called on selectionOrObject</span></li><li><span style="font-size: 12pt">Debuggers respect #inspectorClass for the receiver inspector</span></li></ul>
<br>
</div>
<div><b>Open todos/questions/topics of discussion:</b></div>
<div>Oh, just do the following:</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>
<div>self systemNavigation</div>
</div>
<div>
<div><span style="white-space:pre"></span>browseMessageList: [ (PackageInfo named: 'Tools') methods select: [:method |</div>
</div>
<div>
<div><span style="white-space:pre"></span>({method actualClass category. method actualClass whichCategoryIncludesSelector: method selector} anySatisfy: [:cat | '*inspect*' match: cat asLowercase])</div>
</div>
<div>
<div><span style="white-space:pre"></span>and: [#(breakpoint flag) includes: (method actualClass toolIconSelector: method selector)]]]</div>
</div>
<div>
<div><span style="white-space:pre"></span>name: 'Flags in Inspector'.</div>
</div>
</blockquote>
<div>:-)</div>
<div><br>
</div>
<div>Further questions:</div>
<div>
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li>(*) Can we find any better solution for <span>#restore...InspectorState? Personally, I find it kind of annoying when I enter something into a debugger inspector, switch to another context and loose that command for the moment.
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;font-size: 16px">
Not to be confused with the selectedFieldName memory, which is very useful. </span>I would rather like to revert this particular change. Or alternatively, to make a preference for it :-)</span></li><li><span>The current solution for inspector text fields uses #<span>askBeforeDiscardingEdits: which is safer than before, but it asks too often when changing the selection. How can we fix this?</span></span></li><li><span><span>A possible design issue: At the moment, InspectorField does not know about its inspector, it's extrinsic for all relevant operations. This keeps them a bit more decoupled, and makes it possible to use the same field for multiple inspectors (you
 can try this out via drag'n'drop while holding shift). On the other hand, one might argue that the number of parametrized messages in InspectorField might be too high. Unless you give me some new perspectives, I would tend to keep the current design.</span></span></li></ul>
<div><br>
</div>
</div>
<div><b>What's next?</b></div>
<div>I will appreciate every single feedback of y'all. I really depend on it! Just file in the changeset and tell me any potential problems. For a detailed code review, you can simply send me a follow-up changeset. We can also set up a git repository or so
 if you think this scales better. I'm looking forward to your review!</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0, 0, 0);font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
</div></blockquote>
                                        </div></body>