1 package org.vaadin.aceeditor.client;
2
3
4 import org.vaadin.aceeditor.client.GwtTextDiff.Diff;
5 import org.vaadin.aceeditor.client.GwtTextDiff.Patch;
6
7 import com.google.gwt.core.client.JavaScriptObject;
8 import com.google.gwt.core.client.JsArray;
9
10 public class DiffMatchPatchJSNI extends JavaScriptObject {
11
12 protected DiffMatchPatchJSNI() {
13 }
14
15 native final static public DiffMatchPatchJSNI newInstance()
16
17 ;
18
19 native final public JsArray<Diff> diff_main(String text1, String text2)
20
21 ;
22
23 native final public int match_main(String text, String pattern, int loc)
24
25 ;
26
27 native final public String patch_apply(JsArray<Patch> patches, String text)
28
29 ;
30
31 native final public JsArray<Patch> patch_fromText(String text)
32
33 ;
34
35 native final public String patch_toText(JsArray<Patch> patches)
36
37 ;
38
39 native final public int diff_xIndex(JsArray<Diff> diffs, int pos)
40
41 ;
42
43 native final public int diff_xIndex_patches(JsArray<Patch> patches, int pos)
44
45
46
47
48 ;
49
50 native final public JsArray<Patch> patch_make_diff_main(String text1, String text2)
51
52 ;
53
54 native final public JsArray<Patch> patch_make(String text1, String text2)
55
56 ;
57
58 native final public void setMatch_Threshold(double d)
59
60 ;
61
62 native final public void setPatch_Margin(int m)
63
64 ;
65
66 native final public void setMatch_Distance(int m)
67
68 ;
69
70 native final public void setDiff_EditCost(int c)
71
72 ;
73
74
75 }