From 74117605cf3c187f071a2615c34797558b88e234 Mon Sep 17 00:00:00 2001 From: Ed Manero Date: Thu, 25 Jun 2015 15:35:35 -0700 Subject: [PATCH] Add method to enable/disable a worker for the current session. --- .../src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 814b52c..ed841d3 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 @@ -164,6 +164,16 @@ public native void setModeByName(String shortModeName) /*-{ editor.getSession().setMode(new TheMode()); }-*/; + /** + * Enable a worker for the current session. + * + * @param userWorker true to enable a worker otherwise false + */ + public native void setUseWorker(boolean useWorker) /*-{ + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.getSession().setUseWorker(useWorker); + }-*/; + /** * Register a handler for change events generated by the editor. *