<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Hi all.<div><br></div><div>Note that we have not so much UI-design possibilities for that "Warning window" at the moment. Something like this is not that simple at the moment:</div><div><br></div><div><img id="3c937b85-f3b2-4e43-a9a9-c606d3981e58" src="cid:17ff7780-a94a-4267-9bde-b784a2fb0fa2" width="auto"></img><br></div><div><br></div><div>For example, we cannot rely on DialogWindow >> #getUserResponse to "suspend" the control flow. Debugger itself is not that flexible at the moment.</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;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 22.11.2019 14:19:40 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
<img id="bad94983-1211-4ea7-b55e-dbd48637c7f5" src="cid:d29743b8-0a86-4696-aedf-9217820ebaaf" width="auto"></img><br><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 22.11.2019 14:11:37 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Marcel Taeumel uploaded a new version of Tools to project The Trunk:<br>http://source.squeak.org/trunk/Tools-mt.917.mcz<br><br>==================== Summary ====================<br><br>Name: Tools-mt.917<br>Author: mt<br>Time: 22 November 2019, 2:11:23.895303 pm<br>UUID: 7a9645dc-bdfb-f949-b322-05f1162c7f9a<br>Ancestors: Tools-ct.916, Tools-ct.902, Tools-ct.904<br><br>Merges Tools-ct.916, Tools-ct.902, Tools-ct.904. <br><br>Changes #handleWarning: text to a different style and to use the new #suppressWarnings interface in Warning.<br><br>=============== Diff against Tools-ct.916 ===============<br><br>Item was changed:<br> ----- Method: Inspector class>>openOn: (in category 'instance creation') -----<br> openOn: anObject<br> "Create and schedule an instance of me on the model, anInspector. "<br> <br>+ ^ self openOn: anObject withLabel: anObject defaultLabelForInspector!<br>- ^ self openOn: anObject withEvalPane: true!<br><br>Item was removed:<br>- ----- Method: Inspector class>>openOn:withEvalPane: (in category 'instance creation') -----<br>- openOn: anObject withEvalPane: withEval <br>- "Create and schedule an instance of me on the model, anInspector. "<br>- <br>- ^ self openOn: anObject withEvalPane: withEval withLabel: anObject defaultLabelForInspector!<br><br>Item was removed:<br>- ----- Method: Inspector class>>openOn:withEvalPane:withLabel: (in category 'instance creation') -----<br>- openOn: anObject withEvalPane: withEval withLabel: label<br>- ^ToolBuilder open: (self inspect: anObject) label: label!<br><br>Item was added:<br>+ ----- Method: Inspector class>>openOn:withLabel: (in category 'instance creation') -----<br>+ openOn: anObject withLabel: label<br>+ <br>+ ^ ToolBuilder open: (self inspect: anObject) label: label!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>browseContext (in category 'stack list') -----<br> browseContext<br>+ ToolSet browseMethod: selectedContext method!<br>- selectedContext<br>- ifNil: [^ self].<br>- ToolSet browse: self selectedClass selector: self selectedSelector!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>changePriority (in category 'process actions') -----<br> changePriority<br> | str newPriority nameAndRules |<br>- selectedProcess ifNil: [^ self].<br> nameAndRules := self nameAndRulesForSelectedProcess.<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<br> ifNil: [^ self].<br> (newPriority <><br> or: [newPriority > Processor highestPriority])<br> ifTrue: [self inform: 'Bad priority'.<br> ^ self].<br> self class setProcess: selectedProcess toPriority: newPriority.<br> self updateProcessList!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>chasePointers (in category 'process actions') -----<br> chasePointers<br> | saved |<br>- selectedProcess ifNil: [^ self].<br> saved := selectedProcess.<br> [selectedProcess := nil.<br> (Smalltalk includesKey: #PointerFinder)<br> ifTrue: [PointerFinder on: saved]<br> ifFalse: [self inspectPointers]]<br> ensure: [selectedProcess := saved]!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>debugProcess (in category 'process actions') -----<br> debugProcess<br> | nameAndRules |<br>- selectedProcess ifNil: [^ self].<br> nameAndRules := self nameAndRulesForSelectedProcess.<br> nameAndRules third<br> ifFalse: [self inform: 'Nope, won''t debug ' , nameAndRules first.<br> ^ self].<br> self class debugProcess: selectedProcess.!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>exploreContext (in category 'stack list') -----<br> exploreContext<br>+ selectedContext explore!<br>- selectedContext ifNotNil: #explore!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>exploreProcess (in category 'process list') -----<br> exploreProcess<br>+ selectedProcess explore!<br>- selectedProcess ifNotNil: #explore!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>exploreReceiver (in category 'stack list') -----<br> exploreReceiver<br>+ selectedContext receiver explore!<br>- selectedContext ifNotNil: [<br>- selectedContext receiver explore]!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>inspectContext (in category 'stack list') -----<br> inspectContext<br>+ selectedContext inspect!<br>- selectedContext ifNotNil: #inspect!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>inspectPointers (in category 'process actions') -----<br> inspectPointers<br> | tc pointers |<br>- selectedProcess ifNil: [^ self].<br> tc := thisContext.<br> pointers := PointerFinder<br> pointersTo: selectedProcess<br> except: { <br> self processList.<br> tc.<br> self}.<br> pointers isEmpty ifTrue: [^ self].<br> OrderedCollectionInspector <br> openOn: pointers<br>- withEvalPane: false<br> withLabel: 'Objects pointing to ' , selectedProcess browserPrintString!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>inspectProcess (in category 'process list') -----<br> inspectProcess<br>+ selectedProcess inspect!<br>- selectedProcess ifNotNil: #inspect!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>inspectReceiver (in category 'stack list') -----<br> inspectReceiver<br>+ selectedContext receiver inspect!<br>- selectedContext ifNotNil: [<br>- selectedContext receiver inspect]!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>messageTally (in category 'stack list') -----<br> messageTally<br> | secString secs |<br>- selectedProcess ifNil: [^ self].<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> ----- Method: ProcessBrowser>>processListKey:from: (in category 'process list') -----<br>+ processListKey: aKey from: aView<br>+ <br>+ aKey<br>+ caseOf: {<br>+ [$f] -> [^ self findContext].<br>+ [$g] -> [^ self nextContext].<br>+ [$a] -> [^ self toggleAutoUpdate].<br>+ [$u] -> [^ self updateProcessList] }<br>+ otherwise: [].<br>+ selectedProcess ifNil: [^ self changed: #flash].<br>+ ^ aKey<br>+ caseOf: {<br>+ [$i] -> [self inspectProcess].<br>+ [$I] -> [self exploreProcess].<br>+ [$c] -> [self chasePointers].<br>+ [$P] -> [self inspectPointers].<br>+ [$t] -> [self terminateProcess].<br>+ [$r] -> [self resumeProcess].<br>+ [$s] -> [self suspendProcess].<br>+ [$d] -> [self debugProcess].<br>+ [$p] -> [self changePriority].<br>+ [$m] -> [self messageTally].<br>+ [$S] -> [self signalSemaphore].<br>+ [$k] -> [self moreStack]}<br>+ otherwise: [self arrowKey: aKey from: aView]!<br>- processListKey: aKey from: aView <br>- ^ aKey caseOf: {<br>- [$i] -> [self inspectProcess].<br>- [$I] -> [self exploreProcess].<br>- [$c] -> [self chasePointers].<br>- [$P] -> [self inspectPointers].<br>- [$t] -> [self terminateProcess].<br>- [$r] -> [self resumeProcess].<br>- [$s] -> [self suspendProcess].<br>- [$d] -> [self debugProcess].<br>- [$p] -> [self changePriority].<br>- [$m] -> [self messageTally].<br>- [$f] -> [self findContext].<br>- [$g] -> [self nextContext].<br>- [$a] -> [self toggleAutoUpdate].<br>- [$u] -> [self updateProcessList].<br>- [$S] -> [self signalSemaphore].<br>- [$k] -> [self moreStack]}<br>- otherwise: [self arrowKey: aKey from: aView]!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>resumeProcess (in category 'process actions') -----<br> resumeProcess<br>- selectedProcess ifNil: [^ self].<br> self class resumeProcess: selectedProcess.<br> self updateProcessList!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>signalSemaphore (in category 'process actions') -----<br> signalSemaphore<br>- selectedProcess ifNil: [^ self].<br> (selectedProcess suspendingList isKindOf: Semaphore)<br> ifFalse: [^ self].<br> [selectedProcess suspendingList signal] fork.<br> (Delay forMilliseconds: 300) wait.<br> "Hate to make the UI wait, but it's convenient..."<br> self updateProcessList!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>stackListKey:from: (in category 'views') -----<br>+ stackListKey: aKey from: aView<br>+ <br>+ selectedContext ifNil: [^ self changed: #flash].<br>+ ^ aKey<br>+ caseOf: {<br>+ [$c] -> [self inspectContext].<br>+ [$C] -> [self exploreContext].<br>+ [$i] -> [self inspectReceiver].<br>+ [$I] -> [self exploreReceiver].<br>+ [$b] -> [self browseContext]}<br>+ otherwise: [self arrowKey: aKey from: aView]!<br>- stackListKey: aKey from: aView <br>- ^ aKey caseOf: {<br>- [$c] -> [self inspectContext].<br>- [$C] -> [self exploreContext].<br>- [$i] -> [self inspectReceiver].<br>- [$I] -> [self exploreReceiver].<br>- [$b] -> [self browseContext]}<br>- otherwise: [self arrowKey: aKey from: aView]!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>suspendProcess (in category 'process actions') -----<br> suspendProcess<br> | nameAndRules |<br>- selectedProcess ifNil: [^ self].<br> selectedProcess isSuspended<br> ifTrue: [^ self].<br> nameAndRules := self nameAndRulesForSelectedProcess.<br> nameAndRules second<br> ifFalse: [self inform: 'Nope, won''t suspend ' , nameAndRules first.<br> ^ self].<br> self class suspendProcess: selectedProcess.<br> self updateProcessList!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>terminateProcess (in category 'process actions') -----<br> terminateProcess<br> | nameAndRules |<br>- selectedProcess ifNil: [^ self].<br> nameAndRules := self nameAndRulesForSelectedProcess.<br> nameAndRules second<br> ifFalse: [self inform: 'Nope, won''t kill ' , nameAndRules first.<br> ^ self].<br> self class terminateProcess: selectedProcess. <br> self updateProcessList!<br><br>Item was changed:<br> ----- Method: StandardToolSet class>>handleWarning: (in category 'debugging - handlers') -----<br> handleWarning: aWarning<br> "Double dispatch. Let the active process take care of that warning, which usually calls back here to #debugProcess:..."<br> <br>+ | message |<br>+ message := '{1}\\{2}' withCRs asText format: {<br>+ "First, show the actual text of this warning."<br>+ aWarning messageText.<br>+ "Second, append some helpful information that apply to all kinds of warnings."<br>+ ('{1} {2}' asText format: {<br>+ 'Select "Proceed" to continue or close this window to cancel the operation.' translated.<br>+ 'If you do not want to be interrupted anymore, you can {1} this kind of warning. You can also {2}, which resets such warnings on the next image startup.' translated asText format: {<br>+ "Provide clickable text links so that the user can directly suppress warnings."<br>+ 'always suppress' asText<br>+ addAttribute: (PluggableTextAttribute evalBlock: [<br>+ aWarning class suppressWarnings.<br>+ self inform: ('All ''{1}'' warnings will be suppressed.' translated format: {aWarning class name})]).<br>+ 'suppress temporarily' asText<br>+ addAttribute: (PluggableTextAttribute evalBlock: [<br>+ aWarning class suppressAndResetOnStartUp.<br>+ self inform: ('All ''{1}'' warnings will be suppressed\and reset on the next image startup.' withCRs translated format: {aWarning class name})])}.<br>+ }) addAttribute: (<br>+ "Show this helpful information in a smaller font."<br>+ TextFontReference toFont: Preferences standardButtonFont)}.<br>+ <br> ^ Processor activeProcess<br> debug: aWarning signalerContext<br> title: 'Warning' translated<br> full: false<br>+ contents: message!<br>- contents: aWarning messageText , '\\Select Proceed to continue, or close this window to cancel the operation.' withCRs translated!<br><br>Item was changed:<br> ----- Method: StandardToolSet class>>inspect:label: (in category 'inspecting') -----<br> inspect: anObject label: aString<br> "Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides."<br>+ ^ anObject inspectorClass openOn: anObject withLabel: aString!<br>- ^ anObject inspectorClass openOn: anObject withEvalPane: true withLabel: aString!<br><br><br></div></blockquote></div></div></blockquote></div>