#REFACTORING by cg
class: EditTextView
removed:
#compareWithClipboard
#compareWithFile
changed: #openFileBrowserOnFileNamed:
--- a/EditTextView.st Thu Aug 31 20:15:47 2017 +0200
+++ b/EditTextView.st Fri Sep 01 14:16:08 2017 +0200
@@ -6551,63 +6551,6 @@
"Modified: / 28-07-2007 / 13:27:21 / cg"
!
-compareWithClipboard
- "compare the selection against the clipboard contents"
-
- |t1 t2|
-
- t2 := self getClipboardText.
- t2 isEmptyOrNil ifTrue:[
- Dialog information:'Clipboard is empty.'.
- ^ self.
- ].
-
- self hasSelection ifTrue:[
- t1 := self selectionAsString.
- ] ifFalse:[
- t1 := self contents asString
- ].
- t1 := t1 string.
-
- t1 = t2 ifTrue:[
- Dialog information:'Strings are equal.'.
- ^ self.
- ].
- DiffTextView
- openOn:t1 label:'Editor'
- and:t2 label:'Clipboard'
-!
-
-compareWithFile
- "compare the selection or the whole text against the contents of a file"
-
- |fn t1 t2|
-
- fn := Dialog requestFileName:'Compare against file:' default:defaultFileNameForFileDialog.
- fn isEmptyOrNil ifTrue:[^ self].
-
- t2 := fn asFilename contentsOfEntireFile.
- t2 isEmptyOrNil ifTrue:[
- Dialog information:'File is empty.'.
- ^ self.
- ].
-
- self hasSelection ifTrue:[
- t1 := self selectionAsString.
- ] ifFalse:[
- t1 := self contents asString
- ].
- t1 := t1 string.
-
- t1 = t2 ifTrue:[
- Dialog information:'Same contents.'.
- ^ self.
- ].
- DiffTextView
- openOn:t1 label:'Editor'
- and:t2 label:'File'
-!
-
copySelection
"copy contents into smalltalk copybuffer.
Redefined to move the (currently hidden cursor) to the selection's end"
@@ -7211,9 +7154,9 @@
with:fn directory baseName allBold).
].
].
- UserPreferences fileBrowserClass openOn:fn
-
- "Modified: / 06-09-2012 / 14:47:22 / cg"
+ FileBrowser default openOn:fn
+
+ "Modified: / 01-09-2017 / 14:03:54 / cg"
!
openFileBrowserOnIt