<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Tim --<div class="mb_sig"></div>
                                        <div><br></div><div>This introduced a regression, which I now fixed via Tools-mt.1165.</div><div><br></div><div>Yes, the name "MessageSet" indicates a Set semantic. However, tools in the past have relied on the sort order. We must preserve that. I added a simple "Does it have indentation?" test to assume pre-defined sort order.</div><div><br></div><div>Best,</div><div>Marcel</div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 26.10.2020 01:52:56 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">tim Rowledge uploaded a new version of Tools to project The Trunk:<br>http://source.squeak.org/trunk/Tools-tpr.1008.mcz<br><br>==================== Summary ====================<br><br>Name: Tools-tpr.1008<br>Author: tpr<br>Time: 25 October 2020, 5:52:09.007789 pm<br>UUID: 2ebe15ce-0c25-4b8d-b993-f1c51203dee5<br>Ancestors: Tools-tpr.1003, Tools-mt.1007<br><br>Rework the window label handing of MessageSet/Trace to be a bit more accurate, and to work within the normal style of labels.<br><br>Instead of assuming the size of the list passed to the MessageSet/Trace is correct, derive it from the post-processing list. We process the list to remove duplicates, which e.g. the #allUnimplementedCalls method produces.<br><br>This required adding an instvar to M-Set, removing one from M-Trace, setting the new one properly, dumping some dodgy code that used to half-assedly derive the old one, use the proper #changed: #windowTitle to, y'know, change the title, and some faffing with the messageList.<br><br>As a result we are better placed to make further improvements if/when we develop a way to correctly hightlight multi-part keywords (or indeed, multiple messages) within a single method, which would greatly improve many browsers.<br><br>This benefits from being accompanied by the single-method change in the System-tpr.1181 package<br><br>=============== Diff against Tools-mt.1007 ===============<br><br>Item was changed:<br>  CodeHolder subclass: #MessageSet<br>+     instanceVariableNames: 'growable messageList messageListFormatted autoSelectString messageListIndex editSelection windowLabel'<br>-       instanceVariableNames: 'growable messageList messageListFormatted autoSelectString messageListIndex editSelection'<br>    classVariableNames: 'UseUnifiedMessageLabels'<br>         poolDictionaries: ''<br>          category: 'Tools-Browser'!<br>  <br>  !MessageSet commentStamp: '<historical>' prior: 0!<br>  I represent a query path of the retrieval result of making a query about methods in the system. The result is a set of methods, denoted by a message selector and the class in which the method was found. As a StringHolder, the string I represent is the source code of the currently selected method. I am typically viewed in a Message Set Browser consisting of a MessageListView and a BrowserCodeView.!<br><br>Item was changed:<br>  ----- Method: MessageSet class>>openMessageList:name:autoSelect: (in category 'instance creation') -----<br>  openMessageList: messageList name: labelString autoSelect: autoSelectString<br>          "Open a system view for a MessageSet on messageList. <br>+   The labelString is passed to the model to use as a base label, depending on the selection state"<br>-         1/24/96 sw: the there-are-no msg now supplied by my sender"<br>  <br>         | messageSet |<br>        messageSet := self messageList: messageList.<br>+         messageSet<br>+           autoSelectString: autoSelectString;<br>+          setInitialLabel: labelString.<br>+        ^ToolBuilder open: messageSet!<br>-       messageSet autoSelectString: autoSelectString.<br>-       ^ToolBuilder open: messageSet label: labelString!<br><br>Item was changed:<br>  ----- Method: MessageSet>>adjustWindowTitleAfterFiltering (in category 'private') -----<br>  adjustWindowTitleAfterFiltering<br>+   "Set the title of the receiver's window, if any, to reflect the just-completed filtering. Avoid re-doing it if fitering is re-done"<br>-        "Set the title of the receiver's window, if any, to reflect the just-completed filtering"<br>  <br>+      (windowLabel endsWith: 'Filtered') <br>+          ifFalse: [windowLabel := windowLabel , ' Filtered'.<br>+                  self changed: #windowTitle]!<br>-         | aWindow existingLabel newLabel |<br>- <br>-       (aWindow := self containingWindow) ifNil: [^ self].<br>-  (existingLabel := aWindow label) isEmptyOrNil ifTrue: [^ self].<br>-      (((existingLabel size < 3) or: [existingLabel last ~~ $]]) or: [(existingLabel at: (existingLabel size - 1)) isDigit not]) ifTrue: [^ self].<br>-      existingLabel size to: 1 by: -1 do:<br>-          [:anIndex | ((existingLabel at: anIndex) == $[) ifTrue:<br>-                      [newLabel := (existingLabel copyFrom: 1 to: anIndex),<br>-                                'Filtered: ',<br>-                                messageList size printString,<br>-                                ']'.<br>-                         ^ aWindow setLabel: newLabel]]<br>-                       <br>- <br>- !<br><br>Item was changed:<br>  ----- Method: MessageSet>>initializeMessageList: (in category 'private') -----<br>  initializeMessageList: anArray<br>      "Initialize my messageList from the given list of MethodReference or string objects.  NB: special handling for uniclasses.<br>        Do /not/ replace the elements of anArray if they are already MethodReferences, so as to allow users to construct richer systems, such as differencers between existing and edited versions of code."<br>+   messageList := Set new.<br>-      messageList := OrderedCollection new.<br>         anArray do:<br>           [:each | each isMethodReference<br>+                      ifTrue: [messageList add: each]<br>-                      ifTrue: [messageList addLast: each]<br>                   ifFalse:<br>                              [ MessageSet<br>                                          parse: each <br>                                          toClassAndSelector:<br>+                                          [ : class : sel | class ifNotNil: [ messageList add: (MethodReference class: class selector: sel) ] ] ] ].<br>+   messageList := messageList asOrderedCollection sort. <br>-                                                [ : class : sel | class ifNotNil: [ messageList addLast: (MethodReference class: class selector: sel) ] ] ] ].<br>        "Unify labels if wanted."<br>   self class useUnifiedMessageLabels ifTrue:<br>            [ messageList withIndexDo: <br>                   [ : each : index | | cls |<br>                    cls := each actualClass.<br>                      each stringVersion:<br>                           (self indentionPrefixOfSize: (self indentionsIn: each stringVersion))<br>                                 , (cls<br>                                        ifNil: [each asString] <br>                                       ifNotNil: <br>                                            [cls isUniClass<br>                                                       ifTrue: [cls typicalInstanceName, ' ', each selector]<br>                                                         ifFalse:<br>                                                              [ cls name , ' ' , each selector , ' {'<br>                                                               , ((cls organization categoryOfElement: each selector) ifNil: ['']) , '}'<br>                                                             , ' {', cls category, '}' ] ]) ] ].<br>   messageListIndex := messageList isEmpty ifTrue: [0] ifFalse: [1].<br>     contents := String empty!<br><br>Item was changed:<br>  ----- Method: MessageSet>>messageListIndex: (in category 'message list') -----<br>  messageListIndex: anInteger <br>+       "Set the index of the selected item to be anInteger.<br>+    Update the message list morph, the text edit morph and the assorted buttons"<br>-    "Set the index of the selected item to be anInteger."<br>  <br>   messageListIndex := anInteger.<br>        contents := <br>                  messageListIndex ~= 0<br>                         ifTrue: [self selectedMessage]<br>                        ifFalse: [''].<br>        self changed: #messageListIndex.         "update my selection"<br>      self editSelection: #editMessage.<br>     self contentsChanged.<br>         (messageListIndex ~= 0 and: [ autoSelectString notNil and: [ self contents notEmpty ] ]) ifTrue: [ self changed: #autoSelect ].<br>       self decorateButtons<br>  !<br><br>Item was added:<br>+ ----- Method: MessageSet>>setInitialLabel: (in category 'accessing') -----<br>+ setInitialLabel: aString<br>+         "set the base label for the window, as returned by #windowTitle"<br>+ <br>+       windowLabel := aString!<br><br>Item was added:<br>+ ----- Method: MessageSet>>windowTitle (in category 'user interface') -----<br>+ windowTitle<br>+        "just return the basic label for now"<br>+ <br>+  ^windowLabel!<br><br>Item was changed:<br>  MessageSet subclass: #MessageTrace<br>+     instanceVariableNames: 'autoSelectStrings messageSelections anchorIndex'<br>-     instanceVariableNames: 'autoSelectStrings messageSelections anchorIndex defaultSelectString'<br>          classVariableNames: ''<br>        poolDictionaries: ''<br>          category: 'Tools-Browser'!<br>  <br>  !MessageTrace commentStamp: 'cmm 3/2/2010 20:26' prior: 0!<br>  A MessageTrace is a MessageSet allowing efficient sender/implementor message following.  With implementors indented below, and senders outdended above, message flow is succinctly expressed, hierarchically.<br>  <br>  My autoSelectStrings and messageSelections are Arrays of Booleans, parallel to my messageList.  Each boolean indicates whether that message is selected.  Each autoSelectStrings indicates which string should be highlighted in the code for each method in my messageList.!<br><br>Item was changed:<br>  ----- Method: MessageTrace>>browseAllImplementorsOf: (in category 'actions') -----<br>  browseAllImplementorsOf: selectorSymbol<br>        | selectorToBrowse |<br>          selectorToBrowse := self selection <br>           ifNil: [ selectorSymbol ] <br>+           ifNotNil: [ self getImplementorNamed: selectorSymbol asSymbol "since we can get passed literals"].<br>-                 ifNotNil: [ self getImplementorNamed: selectorSymbol ].<br>       (self hasUnacceptedEdits or: [ Preferences traceMessages not ])<br>               ifTrue: [ super browseAllImplementorsOf: selectorToBrowse ]<br>           ifFalse: [ self addChildMethodsNamed: selectorToBrowse ]<br>  !<br><br>Item was changed:<br>  ----- Method: MessageTrace>>initializeMessageList: (in category 'private initializing') -----<br>  initializeMessageList: anArray<br>-  messageSelections := (Array new: anArray size withAll: false) asOrderedCollection.<br>    super initializeMessageList: anArray.<br>+        messageSelections := (Array new: messageList size withAll: false) asOrderedCollection.<br>        self <br>                 messageAt: messageListIndex<br>           beSelected: true.<br>     "autoSelectStrings is initialized right after this method, in autoSelectString:"<br>  !<br><br>Item was changed:<br>  ----- Method: MessageTrace>>messageListIndex: (in category 'actions') -----<br>  messageListIndex: anInteger<br>+     "Set the index of the selected item to be anInteger.<br>+    Find the relevant auto select string to use, do my superclass' work and update the window title"<br>+ <br>     autoSelectStrings ifNotEmpty: <br>                [ autoSelectString :=<br>                         anInteger = 0<br>+                                ifTrue: [ "clear the autoSelectString"<br>+                                     String empty ]<br>+                               ifFalse: [autoSelectStrings at: anInteger]<br>+           ].<br>+ <br>+       anInteger > 0 ifTrue: [ self<br>+                              messageAt: anInteger<br>+                                 beSelected: true<br>+                     ].<br>+   super messageListIndex: anInteger.<br>+   self changed: #windowTitle<br>-                           ifTrue:<br>-                                      [ defaultSelectString ifNotNil: [:default| self containingWindow setLabel: default].<br>-                                         "clear the autoSelectString"<br>-                                       '' ]<br>-                                 ifFalse:<br>-                                     [ messageListIndex := anInteger.  <br>-                                   "setting the window label, below, can't wait for this.."<br>-                                   self containingWindow setLabel: (self windowLabelAt: anInteger).<br>-                                     "work out the string to ask the text view to pre-select. We should do better than this; after all the debugger does"<br>-                                       (autoSelectStrings at: anInteger)] ].<br>-        anInteger > 0 ifTrue:<br>-             [ self<br>-                       messageAt: anInteger<br>-                         beSelected: true ].<br>-  super messageListIndex: anInteger<br>  !<br><br>Item was changed:<br>  ----- Method: MessageTrace>>windowLabelAt: (in category 'private accessing') -----<br>  windowLabelAt: anInteger<br>+  "return a suitable window label when there is an actual list item selected; work out what it should be based upon the array of autoSelectStrings or the current selection"<br>  <br>+     ^(autoSelectStrings at: anInteger)<br>+           ifNil: [ 'Implementors of ',<br>-         | str |<br>-      defaultSelectString ifNil:<br>-           [defaultSelectString := self containingWindow label].<br>-        ^(str := autoSelectStrings at: anInteger)<br>-            ifNil:<br>-                       [ 'Implementors of ',<br>                                 (self class<br>                                   parse: self selection<br>+                                        toClassAndSelector: [ :class :selector | selector ])<br>+                         ]<br>+            ifNotNil: [:str|  'Senders of ', str ]<br>-                                       toClassAndSelector: [ :class :selector | selector ]) ]<br>-               ifNotNil:<br>-                    [ 'Senders of ', str ]<br>  !<br><br>Item was added:<br>+ ----- Method: MessageTrace>>windowTitle (in category 'building') -----<br>+ windowTitle<br>+        "set the window label to suit the selection state;<br>+      if no selection, use saved widow label and add the number of items in the messageList<br>+        if something is selected, use the relevant string provided by windowLabelAt: which considers the index"<br>+ <br>+     ^messageListIndex = 0<br>+                ifTrue:[String streamContents: [:str| str nextPutAll: windowLabel;<br>+                                                                                   space;<br>+                                                                                       nextPut: $[;<br>+                                                                                         nextPutAll: messageList size asString;<br>+                                                                                       nextPut: $]<br>+                                                                          ]<br>+                            ]<br>+            ifFalse: [self windowLabelAt: messageListIndex]!<br><br><br></historical></div></blockquote></div>