public class ScriptingWindow
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_SCRIPTS_DIR |
protected ScriptsMonitor |
monitor |
protected static int |
NUMBERS_OF_QUICK_SCRIPTS |
Constructor and Description |
---|
ScriptingWindow() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildSetsMenu(javax.swing.JMenuBar mb) |
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() |
public static final java.lang.String DEFAULT_SCRIPTS_DIR
protected static final int NUMBERS_OF_QUICK_SCRIPTS
protected ScriptsMonitor monitor
public static void loadPlugins()
public static void unloadPlugins()
public void executeScript(ScriptItem scriptItem)
public void executeScript(ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.Object> bindings)
public void executeScript(ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.Object> bindings, boolean cancelQueue)
public void executeScripts(java.util.List<ScriptItem> scriptItems, java.util.Map<java.lang.String,java.lang.Object> bindings, boolean cancelQueue)
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.public void executeScripts(java.util.List<ScriptItem> scriptItems)
public void executeScripts(java.util.List<ScriptItem> scriptItems, java.util.Map<java.lang.String,java.lang.Object> bindings)
public org.omegat.gui.scripting.ScriptingWindow.ScriptWorker createScriptWorker(java.lang.String scriptString, ScriptItem scriptItem, java.util.Map<java.lang.String,java.lang.Object> additionalBindings)
public void cancelCurrentScript()
Note! Canceling the worker does not do anything in and of itself.
The running script must poll for interruption with e.g.
Thread.interrupted()
.
public void cancelScriptQueue()
public java.lang.String getSelectedText()
protected void buildSetsMenu(javax.swing.JMenuBar mb)