<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Wohoo! Thanks Christoph :-)<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;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 15.12.2021 17:33:16 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Christoph Thiede uploaded a new version of Tools to project The Trunk:<br>http://source.squeak.org/trunk/Tools-ct.1088.mcz<br><br>==================== Summary ====================<br><br>Name: Tools-ct.1088<br>Author: ct<br>Time: 15 December 2021, 5:32:59.422981 pm<br>UUID: a9ceffaa-ef67-1b40-810a-10eb05924c75<br>Ancestors: Tools-mt.1087, Tools-ct.1057, Tools-ct.1086, Tools-ct.1067, Tools-ct.1063, Tools-ct.1066, Tools-ct.1062, Tools-ct.1044<br><br>Merges some recent fixes. Still a lot of open things to review, though. :-)<br><br>Tools-ct.1057:<br> Fixes minor bugs and regressions in ChangeSorters (brittle selection, button decorations).<br> <br> Revision: Update currentCompiledMethod in ChangeSorter >> #setContents.<br><br>Tools-ct.1086:<br> Workaround for missing updates of forms in inspectors.<br><br>Tools-ct.1067:<br> FileList: When adding a new file or directory that already exists, show a dialog intead of letting the primitive error passing.<br><br>Tools-ct.1063:<br> Fixes TextLinks to the comment, definition, or hierarchy of a class (available from the 'change emphasis' dialog, Cmd + 6).<br><br>Tools-ct.1066:<br> Updates well known processes in the process browser to make the changes from Tools-eem.1016 visible (see postscript).<br><br>Tools-ct.1062:<br> Fixes a bug in process browser when canceling the "change priority" dialog.<br> <br> Revision: Prefer Project uiManager over UIManager default also in sibling methods.<br><br>Tools-ct.1044:<br> Fixes styling in MessageSets when prettyPrint is turned on.<br><br>Note: For each merged patch, you can read up the full message and diff in the original inbox version. :-)<br><br>=============== Diff against Tools-mt.1087 ===============<br><br>Item was changed:<br> ----- Method: ChangeSorter>>currentSelector: (in category 'message list') -----<br> currentSelector: messageName<br> <br> currentSelector := messageName.<br> self changed: #currentSelector.<br> self setContents.<br>+ self contentsChanged.<br>+ self decorateButtons.!<br>- self contentsChanged.!<br><br>Item was changed:<br> ----- Method: ChangeSorter>>initialize (in category 'initialize') -----<br> initialize<br> super initialize.<br>+ self showChangeSet: ChangeSet current.!<br>- myChangeSet := ChangeSet current.!<br><br>Item was changed:<br> ----- Method: ChangeSorter>>setContents (in category 'code pane') -----<br> setContents<br> "return the source code that shows in the bottom pane"<br> <br> | sel class strm changeType | <br> self clearUserEditFlag.<br> contentsAreStyleable := false.<br>+ currentCompiledMethod := nil.<br> myChangeSet ifNil: [^ contents := String empty]. "should not happen but can"<br> currentClassName ifNil: [^ contents := myChangeSet preambleString ifNil: [String empty]].<br> class := self selectedClassOrMetaClass.<br> (sel := self selectedMessageName) == nil<br> ifFalse: [changeType := (myChangeSet atSelector: (sel := sel asSymbol) class: class).<br> changeType == #remove<br> ifTrue: [^ contents := 'Method has been removed (see versions)'].<br> changeType == #addedThenRemoved<br> ifTrue: [^ contents := 'Added then removed (see versions)'].<br> class ifNil: [^ contents := 'Method was added, but cannot be found!!'].<br> (class includesSelector: sel)<br> ifFalse: [^ contents := 'Method was added, but cannot be found!!'].<br> contentsAreStyleable := true.<br>+ currentCompiledMethod := class compiledMethodAt: sel.<br> contents := class sourceCodeAt: sel.<br> (#(prettyPrint prettyDiffs) includes: contentsSymbol) ifTrue:<br> [contents := class prettyPrinterClass<br> format: contents in: class notifying: nil].<br> self showingAnyKindOfDiffs ifTrue: [<br> contentsAreStyleable := false.<br> contents := self diffFromPriorSourceFor: contents].<br> ^ contents := contents asText makeSelectorBoldIn: class]<br> ifTrue: [strm := WriteStream on: (String new: 100).<br> (myChangeSet classChangeAt: (self withoutItemAnnotation: currentClassName)) do:<br> [:each |<br> each = #remove ifTrue: [strm nextPutAll: 'Entire class was removed.'; cr].<br> each = #addedThenRemoved ifTrue: [strm nextPutAll: 'Class was added then removed.'].<br> each = #rename ifTrue: [strm nextPutAll: 'Class name was changed.'; cr].<br> each = #add ifTrue: [strm nextPutAll: 'Class definition was added.'; cr].<br> each = #change ifTrue: [strm nextPutAll: 'Class definition was changed.'; cr].<br> each = #reorganize ifTrue: [strm nextPutAll: 'Class organization was changed.'; cr].<br> each = #comment ifTrue: [strm nextPutAll: 'New class comment.'; cr.<br> ]].<br> ^ contents := strm contents].!<br><br>Item was changed:<br> ----- Method: ChangeSorter>>updateIfNecessary (in category 'changeSet menu') -----<br> updateIfNecessary<br> "Recompute all of my panes."<br> <br> | newList |<br> self okToChange ifFalse: [^ self].<br>+ <br>- <br> myChangeSet ifNil: [^ self]. "Has been known to happen though shouldn't"<br> (myChangeSet isMoribund) ifTrue:<br> [self changed: #changeSetList.<br> ^ self showChangeSet: ChangeSet current].<br>+ <br>- <br> newList := self changeSetList.<br>+ <br>- <br> (priorChangeSetList == nil or: [priorChangeSetList ~= newList])<br> ifTrue:<br> [priorChangeSetList := newList.<br>+ self changed: #changeSetList].!<br>- self changed: #changeSetList].<br>- self showChangeSet: myChangeSet!<br><br>Item was changed:<br> ----- Method: FileList>>addNew:byEvaluating: (in category 'file menu action') -----<br> addNew: aString byEvaluating: aBlock<br> "A parameterization of earlier versions of #addNewDirectory and<br> #addNewFile. Fixes the bug in each that pushing the cancel button<br> in the FillInTheBlank dialog gave a walkback."<br> <br> | response newName index ending |<br> self okToChange ifFalse: [^ self].<br> (response := UIManager default<br> request: ('New {1} Name?' translated format: {aString translated})<br> initialAnswer: ('{1}Name' translated format: {aString translated}))<br> isEmpty ifTrue: [^ self].<br> newName := response asFileName.<br>+ (Cursor wait showWhile: [<br>+ directory fileOrDirectoryExists: newName])<br>+ ifTrue: [^ self inform: ('''{1}'' already exists' translated format: {newName})].<br> Cursor wait showWhile: [<br> aBlock value: newName].<br> self updateFileList.<br> index := list indexOf: newName.<br> index = 0 ifTrue: [ending := ') ',newName.<br> index := list findFirst: [:line | line endsWith: ending]].<br> self fileListIndex: index.<br> !<br><br>Item was changed:<br> ----- Method: FormInspector>>embedForm:inText: (in category 'support') -----<br> embedForm: aForm inText: stringOrText<br> <br>+ ^ stringOrText asText<br>+ , ((' (hash: {1})' translated format: {aForm bits hash})<br>+ flag: #workaround "ct: Currently, text equality ignores attributes. Add a hash of the form's bits to the text to ensure that it will be re-rendered in Morphic inspectors. In the long term, we should redefine Text >> #= instead. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2020-September/211358.html";<br>+ yourself)<br>+ , String cr<br>+ , (Text string: ' ' attribute:<br>- ^ stringOrText asText, String cr,<br>- (Text string: ' ' attribute:<br> (TextFontReference toFont: <br> (FormSetFont new<br> fromFormArray: (Array with: (aForm copy offset: 0@0))<br> asciiStart: Character space asInteger<br> ascent: aForm height)))!<br><br>Item was changed:<br> ----- Method: MessageSet>>aboutToStyle: (in category 'code pane') -----<br> aboutToStyle: aPluggableShoutMorphOrView<br> "This is a notification that aPluggableShoutMorphOrView is about to re-style its text.<br> Set the classOrMetaClass in aPluggableShoutMorphOrView, so that identifiers<br> will be resolved correctly.<br> Answer true to allow styling to proceed, or false to veto the styling"<br> <br> | selectedMessageName showingMethod |<br>+ self isModeStyleable ifFalse: [^false].<br>- self showingSource ifFalse: [^false].<br> selectedMessageName := self selectedMessageName.<br> showingMethod := (#(Comment Definition Hierarchy) includes: selectedMessageName) not.<br> "Hack!! setting classOrMetaClass: to nil allows doit or class definition colouring."<br> aPluggableShoutMorphOrView classOrMetaClass: (showingMethod ifTrue: [self selectedClassOrMetaClass]).<br> ^(#(Comment Hierarchy) includes: selectedMessageName) not!<br><br>Item was changed:<br> ----- Method: Model>>addItem: (in category '*Tools') -----<br> addItem: classAndMethod<br> "Open a browser directly on the given class and method<br> <br> Model new addItem: 'Model addItem:'<br> Model new addItem: 'Model>>addItem:'<br> "<br> <br> self flag: #mref. "classAndMethod is a String"<br> MessageSet <br> parse: classAndMethod <br> toClassAndSelector: [ :class :sel |<br> class ifNil: [^self].<br>+ sel = #Comment ifTrue: [^ Browser fullOnClassComment: class].<br>+ sel = #Definition ifTrue: [^ Browser newOnClass: class].<br>+ sel = #Hierarchy ifTrue: [^ HierarchyBrowser fullOnClass: class].<br> Browser newOnClass: class selector: sel<br> ]<br> <br> !<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>changePriority (in category 'process actions') -----<br> changePriority<br> | str newPriority nameAndRules |<br> nameAndRules := self nameAndRulesForSelectedProcess.<br>+ nameAndRules third ifFalse: [<br>+ ^ self inform: ('Nope, won''t change priority of {1}' translated format: {nameAndRules first})].<br>+ <br>+ str := Project uiManager<br>+ request: 'New priority' translated<br>+ initialAnswer: selectedProcess priority asString.<br>+ str isEmptyOrNil ifTrue: [^ self].<br>+ <br>- nameAndRules third<br>- ifFalse: [self inform: 'Nope, won''t change priority of ' , nameAndRules first.<br>- ^ self].<br>- str := UIManager default <br>- request: 'New priority' <br>- initialAnswer: selectedProcess priority asString.<br> newPriority := str asNumber asInteger.<br>+ newPriority ifNil: [^ self].<br>- newPriority<br>- ifNil: [^ self].<br> (newPriority < 1<br> or: [newPriority > Processor highestPriority])<br>+ ifTrue: [^ self inform: 'Bad priority' translated].<br>+ <br>- ifTrue: [self inform: 'Bad priority'.<br>- ^ self].<br> self class setProcess: selectedProcess toPriority: newPriority.<br>+ self updateProcessList.!<br>- self updateProcessList!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>findContext (in category 'process list') -----<br> findContext<br> | initialProcessIndex initialStackIndex found |<br> initialProcessIndex := self processListIndex.<br> initialStackIndex := self stackListIndex.<br>+ searchString := Project uiManager<br>+ request: 'Enter a string to search for in the process stack lists' translated<br>+ initialAnswer: searchString.<br>- searchString := UIManager default <br>- request: 'Enter a string to search for in the process stack lists'<br>- initialAnswer: searchString.<br> searchString isEmpty<br> ifTrue: [^ false].<br> self processListIndex: 1.<br> self stackListIndex: 1.<br> found := self nextContext.<br> found<br> ifFalse: [self processListIndex: initialProcessIndex.<br> self stackListIndex: initialStackIndex].<br> ^ found!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>messageTally (in category 'stack list') -----<br> messageTally<br> | secString secs |<br>+ secString := Project uiManager request: 'Profile for how many seconds?' translated initialAnswer: '4'.<br>- secString := UIManager default request: 'Profile for how many seconds?' initialAnswer: '4'.<br> secString isEmptyOrNil ifTrue: [^ self].<br> secs := secString asNumber asInteger.<br> (secs isNil or: [secs isZero])<br> ifTrue: [^ self].<br> [ TimeProfileBrowser spyOnProcess: selectedProcess forMilliseconds: secs * 1000 ] forkAt: selectedProcess priority + 1.!<br><br>Item was changed:<br> (PackageInfo named: 'Tools') postscript: 'Workspace allInstances do: [:workspace |<br> (workspace instVarNamed: #bindings)<br> removeKey: #''_fileDirectory'' ifAbsent: nil;<br> removeKey: #''_windowTitle'' ifAbsent: nil;<br>+ removeKey: #''_fileLineConversion'' ifAbsent: nil].<br>+ <br>+ ProcessBrowser registerWellKnownProcesses. "Tools-eem.1016"'!<br>- removeKey: #''_fileLineConversion'' ifAbsent: nil].'!<br><br><br></div></blockquote></div>