Package org.omegat.gui.scripting
Class ScriptingWindow
java.lang.Object
org.omegat.gui.scripting.ScriptingWindow
Scripting window
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContent(Component content) voidCancel the currently running script, if any.voidorg.omegat.gui.scripting.ScriptingWindow.ScriptWorkercreateScriptWorker(String scriptString, ScriptItem scriptItem, Map<String, Object> additionalBindings) voiddispose()voidexecuteScript(ScriptItem scriptItem) voidexecuteScript(ScriptItem scriptItem, Map<String, Object> bindings) voidexecuteScript(ScriptItem scriptItem, Map<String, Object> bindings, boolean cancelQueue) voidexecuteScripts(List<ScriptItem> scriptItems) voidexecuteScripts(List<ScriptItem> scriptItems, Map<String, Object> bindings) voidexecuteScripts(List<ScriptItem> scriptItems, Map<String, Object> bindings, boolean cancelQueue) Execute scripts sequentially to make sure they don't interrupt each other.
-
Constructor Details
-
ScriptingWindow
public ScriptingWindow() -
ScriptingWindow
-
-
Method Details
-
getParent
-
addContent
-
dispose
public void dispose() -
getScriptsFolder
-
executeScript
-
executeScript
-
executeScript
-
executeScripts
public void executeScripts(List<ScriptItem> scriptItems, Map<String, Object> bindings, boolean cancelQueue) Execute scripts sequentially to make sure they don't interrupt each other.- Parameters:
scriptItems- List of script to execute.bindings- Additional bindings to pass to the executed script.cancelQueue- If true, the run queue is cleared before running the scripts.
-
executeScripts
-
executeScripts
-
createScriptWorker
public org.omegat.gui.scripting.ScriptingWindow.ScriptWorker createScriptWorker(String scriptString, ScriptItem scriptItem, Map<String, Object> additionalBindings) -
cancelCurrentScript
public void cancelCurrentScript()Cancel the currently running script, if any.Note! Canceling the worker does not do anything in and of itself. The running script must poll for interruption with e.g.
Thread.interrupted(). -
cancelScriptQueue
public void cancelScriptQueue() -
getSelectedText
-