Package org.scijava.script.process
Class ScriptDirectiveScriptProcessor
- java.lang.Object
-
- org.scijava.script.process.DirectiveScriptProcessor
-
- org.scijava.script.process.ScriptDirectiveScriptProcessor
-
- All Implemented Interfaces:
SciJavaPlugin,ScriptProcessor
public class ScriptDirectiveScriptProcessor extends DirectiveScriptProcessor
AScriptProcessorwhich parses the#@scriptdirective.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 adoubleconstant, 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 specifyheadless = trueunless 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 @
Pluginannotation, 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...")
- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description ScriptDirectiveScriptProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stringprocess(String directive, Map<String,Object> attrs, String theRest)Processes the given directive.-
Methods inherited from class org.scijava.script.process.DirectiveScriptProcessor
as, asList, begin, info, is, process
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.script.process.ScriptProcessor
end
-
-
-
-
Method Detail
-
process
protected String process(String directive, Map<String,Object> attrs, String theRest)
Description copied from class:DirectiveScriptProcessorProcesses the given directive.- Specified by:
processin classDirectiveScriptProcessor
-
-