public class ScriptDirectiveScriptProcessor extends DirectiveScriptProcessor
ScriptProcessor which parses the #@script directive.
The syntax is:
#@script(key1=value1, key2=value2, ...)
Supported keys include:
name - The name of the script.label - The human-readable label to use (e.g., in the menu
structure).description - A longer description of the script (e.g., for use
as a tool tip).menuPath - Abbreviated menu path defining where the script is
shown in the menu structure. Use greater than sign (>) as a
separator.menuRoot - String identifier naming the menu to which this script
belongs.iconPath - Path to the plugin's icon (e.g., shown in the menu
structure).priority - Priority of the script. Larger values are higher
priority. Value can be written as a double constant, or as one of the
following convenient shorthands: first, extremely-high,
very-high, high, normal, low,
very-low, extremely-low, last.headless - Provides a "hint" as to whether the script would
behave correctly in a headless context. Do not specify
headless = true unless the script refrains from using any UI-specific
features (e.g., AWT or Swing calls).
Any other key-value pairs encountered are stored as properties via the
BasicDetails.set(String, String) method.
See also the @Plugin annotation, which mostly lines up with this list
of attributes.
Here are a few examples:
#@script(name = "extra-functions")#@script(headless = true)#@script(menuPath = "Image > Import > Text...")| Constructor and Description |
|---|
ScriptDirectiveScriptProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
process(String directive,
Map<String,Object> attrs,
String theRest)
Processes the given directive.
|
as, asList, begin, info, is, processclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendprotected String process(String directive, Map<String,Object> attrs, String theRest)
DirectiveScriptProcessorprocess in class DirectiveScriptProcessorCopyright © 2015–2022 SciJava. All rights reserved.