|
Class: DiffListUtility
Object
|
+--DiffListUtility
- Package:
- stx:libtool
- Category:
- Views-Text
- Version:
- rev:
1.17
date: 2021/12/29 17:28:12
- user: cg
- file: DiffListUtility.st directory: libtool
- module: stx stc-classLibrary: libtool
a utility to encapsulate access to the diff command
(may also be a facade to a smalltalk-diff algorithm, eventually)
[instance variables:]
[class variables:]
copyrightCOPYRIGHT (c) 2009 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
defaults
-
diffCommand
-
return the diff-command (with argument placeHolders).
By default, diff is used with windows, diff -b with Unix.
You can change this via the diffCommandTemplate
-
diffCommandTemplate: aCommandTemplateString
-
set the diff-command template
private
-
saveForDiff: text on: stream
-
i := line indexOf:Character return.
utilities
-
diffListFor: text1 and: text2
-
execute DiffCommand to get a list of diffs.
Usage example(s):
self
diffListFor:#(
'hello world'
'line1'
'line3'
'line4'
)
and: #(
'Hello World'
'line1'
'line2'
'line3'
)
|
|