diff --git a/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java b/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java index eff93a9..66e6595 100644 --- a/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java +++ b/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java @@ -761,4 +761,150 @@ private static AceCompletionCallback wrapCompletionCallback(JavaScriptObject jsC return new AceCompletionCallbackImpl(jsCallback); } + + // http://ace.ajax.org/api/selection.html + + /** + * Move the cursor by. + */ + public native void moveCursorBy() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorBy(); + }-*/; + + /** + * Move the cursor down. + */ + public native void moveCursorDown() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorDown(); + }-*/; + + /** + * Move the cursor at the end of the file. + */ + public native void moveCursorFileEnd() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorFileEnd(); + }-*/; + + /** + * Move the cursor at the begining of the file. + */ + public native void moveCursorFileStart() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorFileStart(); + }-*/; + + /** + * Move the cursor left. + */ + public native void moveCursorLeft() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorLeft(); + }-*/; + + /** + * Move the cursor at the end of the line. + */ + public native void moveCursorLineEnd() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorLineEnd(); + }-*/; + + /** + * Move the cursor at the beginning of the line. + */ + public native void moveCursorLineStart() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorLineStart(); + }-*/; + + /** + * Move the cursor a long word left. + */ + public native void moveCursorLongWordLeft() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorLongWordLeft(); + }-*/; + + /** + * Move the cursor a long word right. + */ + public native void moveCursorLongWordRight() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorLongWordRight(); + }-*/; + + /** + * Move the cursor right. + */ + public native void moveCursorRight() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorRight(); + }-*/; + + /** + * Move the cursor a short word left. + */ + public native void moveCursorShortWordLeft() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorShortWordLeft(); + }-*/; + + /** + * Move the cursor a short word right. + */ + public native void moveCursorShortWordRight() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorShortWordRight(); + }-*/; + + /** + * Move the cursor to. + */ + public native void moveCursorTo() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorTo(); + }-*/; + + /** + * Move the cursor to position. + */ + public native void moveCursorToPosition() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorToPosition(); + }-*/; + + /** + * Move the cursor to screen. + */ + public native void moveCursorToScreen() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorToScreen(); + }-*/; + + /** + * Move the cursor up. + */ + public native void moveCursorUp() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorUp(); + }-*/; + + /** + * Move the cursor a word left. + */ + public native void moveCursorWordLeft() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorWordLeft(); + }-*/; + + /** + * Move the cursor a word right. + */ + public native void moveCursorWordRight() /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.selection.moveCursorWordRight(); + }-*/; } diff --git a/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditorMode.java b/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditorMode.java index 745a66f..509c718 100644 --- a/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditorMode.java +++ b/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditorMode.java @@ -44,10 +44,10 @@ public enum AceEditorMode { AUTOHOTKEY("autohotkey"), /** Batch file. */ BATCHFILE("batchfile"), - /** c9search */ - C9SEARCH("c9search"), /** C/C++. */ C_CPP("c_cpp"), + /** c9search */ + C9SEARCH("c9search"), /** Cirru, indentation-based grammar for languages. */ CIRRU("cirru"), /** Clojure. */ @@ -64,18 +64,20 @@ public enum AceEditorMode { CSS("css"), /* Curly. */ CURLY("curly"), + /** D. */ + D("d"), /** Dart. */ DART("Dart"), /** Diff. */ DIFF("diff"), /** Django. */ DJANGO("django"), - /** D. */ - D("d"), /** Docker files. */ DOCKERFILE("dockerfile"), /** Dot. */ DOT("dot"), + /** EIFFEL (object-oriented programming language). */ + EIFFEL("eiffel"), /** EJS (Embedded Javascript). */ EJS("ejs"), /** Erlang. */ @@ -84,8 +86,12 @@ public enum AceEditorMode { FORTH("forth"), /** FTL. */ FTL("ftl"), + /** GCODE (numerical control programming language).*/ + GCODE("gcode"), /** Gherkin: Business Readable, Domain Specific Language. */ GHERKIN("gherkin"), + /** GITIGNORE. */ + GITIGNORE("gitignore"), /** GLSL (OpenGL Shading Language). */ GLSL("glsl"), /** Go (http://golang.org/). */ @@ -107,19 +113,21 @@ public enum AceEditorMode { /** HTML (Ruby). */ HTML_RUBY("html_ruby"), /** Ini file. */ - INI("ini"), - /** JADE. */ - JADE("jade"), + INI("ini"), + /** Io file. */ + IO("io"), /** Jack. */ JACK("jack"), + /** JADE. */ + JADE("jade"), /** JAVA. */ JAVA("java"), /** Javascript. */ JAVASCRIPT("javascript"), - /** JSONiq, the JSON Query Language. */ - JSONIQ("jsoniq"), /** JSON. */ JSON("json"), + /** JSONiq, the JSON Query Language. */ + JSONIQ("jsoniq"), /** JSP, Java Server Pages. */ JSP("jsp"), /** JSX. */ @@ -154,10 +162,10 @@ public enum AceEditorMode { MATLAB("matlab"), /** Mel. */ MEL("mel"), - /** MUSHCode (High Rules). */ - MUSHCODE_HIGH_RULES("mushcode_high_rules"), /** MUSHCode. */ MUSHCODE("mushcode"), + /** MUSHCode (High Rules). */ + MUSHCODE_HIGH_RULES("mushcode_high_rules"), /** MySQL. */ MYSQL("mysql"), /** Nix. */ @@ -178,6 +186,8 @@ public enum AceEditorMode { PLAIN_TEXT("plain_text"), /** PowerShell. */ POWERSHELL("powershell"), + /** Praat. */ + PRAAT("praat"), /** Prolog. */ PROLOG("prolog"), /** Java properties file. */ @@ -186,12 +196,12 @@ public enum AceEditorMode { PROTOBUF("protobuf"), /** Python. */ PYTHON("python"), + /** R. */ + R("r"), /** RDoc (Ruby documentation). */ RDOC("rdoc"), /** RHTML. */ RHTML("rhtml"), - /** R. */ - R("r"), /** Ruby. */ RUBY("ruby"), /** Rust. */ @@ -232,6 +242,8 @@ public enum AceEditorMode { TEXT("text"), /** Textile. */ TEXTILE("textile"), + /** Tmsnippet. */ + TMSNIPPET("tmsnippet"), /** TOML. */ TOML("toml"), /** TWIG. */