|
TextDocument object
Prototype for TextDocument objects SyntaxTo create a TextDocument do this:
var parameters = new Document.Parameters ( );
var doc = new Document (parameters, "view"); Parametersnone. Use Document constructor. Property Ofnone. Implemented InECMerge 2.1 DescriptionTextDocument objects are the documents which do text
comparisons and edition. They provide ways to modify text and
give information about loaded comparisons and files.
Properties
Properties of information[side]
MethodsExamplesExample 1.Check that a document is a text document, and displays the number of conflicts
if (doc instanceof TextDocument)
See Also
Method transactionSyntaxfunction transaction ( f ) Parametersf. Function. f is executed within an edition transaction. Method OfTextDocument object. Implemented InECMerge 2.1 DescriptionThis function is used when you want to call many times "set_text" on a TextDocument.Content or solve many conflicts (through resolution macros) and have all the commands undone at once. ExamplesExample 1.Appends many times a text to the current view:
function append_text (content, text)
See Also
Method differencesSyntaxfunction differences ( couple )
Parameterscouple. Side Couple string. Couple for which the differences are requested. In 2-way, only "left-right" is legal. Method OfTextDocument object. Implemented InECMerge 2.1 DescriptionReturns a Array of differences describing the left side in the given couple was modified with respect to the other side of the couple. ExamplesExample 1.Displays a message box telling whether the two sides are identical or not:
var doc = current_frame.coordinator.document;
See Also
|
|||||||||||||