[Pkg] The Trunk: ST80-cmm.176.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Feb 3 16:15:18 UTC 2015


Chris Muller uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-cmm.176.mcz

==================== Summary ====================

Name: ST80-cmm.176
Author: cmm
Time: 3 February 2015, 10:14:55.973 am
UUID: fa91361a-ca79-4c9a-8106-be54f2d641bd
Ancestors: ST80-bf.175

- Present the comparison to clipboard text from the context of paste-modification, since that is what the user is determining whether to do with the clipboard contents.

=============== Diff against ST80-bf.175 ===============

Item was changed:
  ----- Method: ParagraphEditor>>compareToClipboard (in category 'menu messages') -----
  compareToClipboard
+ 	"If any text is selected, present the modifications that would be made to it if the clipboard contents were pasted over it.  If no text is selected, present the differences betwen the entire pane's contents and the clipboard text."
+ 	| subjectText proposedText |
+ 	subjectText := self selection string ifEmpty: [ paragraph text string ].
+ 	proposedText := self clipboardText string.
+ 	subjectText = proposedText ifTrue: [^ self inform: 'Exact match'].
+ 	(StringHolder new 
+ 		textContents:
+ 			(TextDiffBuilder
+ 				buildDisplayPatchFrom: subjectText 
+ 				to: proposedText)) openLabel: 'Differences with Clipboard Text'!
- 	"Check to see if whether the receiver's text is the same as the text currently on the clipboard, and inform the user."
- 	| s1 s2 |
- 	s1 := self clipboardText string.
- 	s2 := paragraph text string.
- 	s1 = s2 ifTrue: [^ self inform: 'Exact match'].
- 
- 	(StringHolder new textContents:
- 		(TextDiffBuilder buildDisplayPatchFrom: s1 to: s2))
- 		openLabel: 'Comparison to Clipboard Text'!



More information about the Packages mailing list