Package org.omegat.gui.scripting
Class ScriptingWindow
- java.lang.Object
-
- org.omegat.gui.scripting.ScriptingWindow
-
public class ScriptingWindow extends java.lang.Object
Scripting window
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_SCRIPTS_DIR
-
Constructor Summary
Constructors Constructor Description ScriptingWindow()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelCurrentScript()
Cancel the currently running script, if any.void
cancelScriptQueue()
org.omegat.gui.scripting.ScriptingWindow.ScriptWorker
createScriptWorker(java.lang.String scriptString, ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.Object> additionalBindings)
void
executeScript(ScriptItem scriptItem)
void
executeScript(ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.Object> bindings)
void
executeScript(ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.Object> bindings, boolean cancelQueue)
void
executeScripts(java.util.List<ScriptItem> scriptItems)
void
executeScripts(java.util.List<ScriptItem> scriptItems, java.util.Map<java.lang.String,java.lang.Object> bindings)
void
executeScripts(java.util.List<ScriptItem> scriptItems, java.util.Map<java.lang.String,java.lang.Object> bindings, boolean cancelQueue)
Execute scripts sequentially to make sure they don't interrupt each other.java.lang.String
getSelectedText()
static void
loadPlugins()
static void
unloadPlugins()
-
-
-
Field Detail
-
DEFAULT_SCRIPTS_DIR
public static final java.lang.String DEFAULT_SCRIPTS_DIR
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadPlugins
public static void loadPlugins()
-
unloadPlugins
public static void unloadPlugins()
-
executeScript
public void executeScript(ScriptItem scriptItem)
-
executeScript
public void executeScript(ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.Object> bindings)
-
executeScript
public void executeScript(ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.Object> bindings, boolean cancelQueue)
-
executeScripts
public void executeScripts(java.util.List<ScriptItem> scriptItems, java.util.Map<java.lang.String,java.lang.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
public void executeScripts(java.util.List<ScriptItem> scriptItems)
-
executeScripts
public void executeScripts(java.util.List<ScriptItem> scriptItems, java.util.Map<java.lang.String,java.lang.Object> bindings)
-
createScriptWorker
public org.omegat.gui.scripting.ScriptingWindow.ScriptWorker createScriptWorker(java.lang.String scriptString, ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.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
public java.lang.String getSelectedText()
-
-