<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p><img size="70473" id="x_img729163" tabindex="0" style="max-width:99.9%" src="cid:23717c7d-e38c-4ef9-b852-51c42943885d"><br>
</p>
<div id="x_Signature">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Sonntag, 10. November 2019 16:06:26<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Morphic-ct.1586.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">A new version of Morphic was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Morphic-ct.1586.mcz">http://source.squeak.org/inbox/Morphic-ct.1586.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-ct.1586<br>
Author: ct<br>
Time: 10 November 2019, 4:06:17.228559 pm<br>
UUID: d752eb23-2116-0945-b043-aff08fed94fd<br>
Ancestors: Morphic-mt.1584<br>
<br>
Proposal: Style printIt results as a pluggable link that can be clicked to inspect the result.<br>
<br>
To enable this behavior, this commit also extends #insertAndSelect:at: to allow for inserting both strings and texts.<br>
<br>
=============== Diff against Morphic-mt.1584 ===============<br>
<br>
Item was changed:<br>
----- Method: PluggableTextMorph>>printIt (in category 'menu commands') -----<br>
printIt<br>
| oldEditor |<br>
textMorph editor selectFrom: selectionInterval first to: selectionInterval last;<br>
model: model. "For, eg, evaluateSelection"<br>
textMorph handleEdit: [(oldEditor := textMorph editor) evaluateSelectionAndDo:<br>
[:result |<br>
selectionInterval := oldEditor selectionInterval.<br>
textMorph installEditorToReplace: oldEditor.<br>
+ textMorph handleEdit: [ oldEditor afterSelectionInsertAndSelect:<br>
+ (oldEditor printTextFor: result)].<br>
- textMorph handleEdit: [oldEditor afterSelectionInsertAndSelect: result printString].<br>
selectionInterval := oldEditor selectionInterval.<br>
<br>
textMorph editor selectFrom: selectionInterval first to: selectionInterval last.<br>
self scrollSelectionIntoView]]!<br>
<br>
Item was changed:<br>
----- Method: TextEditor>>afterSelectionInsertAndSelect: (in category 'new selection') -----<br>
+ afterSelectionInsertAndSelect: aStringOrText<br>
- afterSelectionInsertAndSelect: aString<br>
<br>
+ self insertAndSelect: aStringOrText at: self stopIndex !<br>
- self insertAndSelect: aString at: self stopIndex !<br>
<br>
Item was changed:<br>
----- Method: TextEditor>>insertAndSelect:at: (in category 'new selection') -----<br>
+ insertAndSelect: aStringOrText at: anInteger<br>
- insertAndSelect: aString at: anInteger<br>
<br>
+ aStringOrText isString ifTrue: [<br>
+ ^ self<br>
+ insertAndSelect: (Text string: aStringOrText attributes: emphasisHere)<br>
+ at: anInteger].<br>
- self closeTypeIn.<br>
<br>
+ self closeTypeIn.<br>
self selectInvisiblyFrom: anInteger to: anInteger - 1.<br>
self openTypeIn.<br>
<br>
self<br>
replace: self selectionInterval<br>
+ with: (Text string: ' ' attributes: emphasisHere), aStringOrText<br>
- with: (Text string: (' ', aString) attributes: emphasisHere)<br>
and: [].<br>
- <br>
self closeTypeIn.!<br>
<br>
Item was changed:<br>
----- Method: TextEditor>>printIt (in category 'do-its') -----<br>
printIt<br>
<br>
self evaluateSelectionAndDo: [:result |<br>
(model respondsTo: #printIt:result:)<br>
ifTrue: [model<br>
perform: #printIt:result:<br>
with: self selection<br>
with: result]<br>
+ ifFalse: [self afterSelectionInsertAndSelect: (self printTextFor: result)]]!<br>
- ifFalse: [self afterSelectionInsertAndSelect: result printString]]!<br>
<br>
Item was added:<br>
+ ----- Method: TextEditor>>printTextFor: (in category 'do-its') -----<br>
+ printTextFor: anObject<br>
+ <br>
+ ^ Text<br>
+ string: anObject printString<br>
+ attributes: {PluggableTextAttribute evalBlock: [anObject inspect]}!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>