Skip to content, Skip to search


Script Templates

372 bytes removed, 16:40, 22 November 2019
no edit summary
The [[Script Editor]] will automatically search the <code>script-templates</code> directory and register any discovered scripts as templates. For example, a [[Maven|Mavenized]] project could add a sample script in <code>src/main/resources/script-templates</code> and it would be packaged into the appropriate location of the resultant <code>.jar</code>.
The templates need to be put into a subdirectory corresponding with the correct script language name. So a <code>FFT.rb</code> script would need to be but into the `script-templates/Ruby/` directory to be available under the {{bc | Templates | Ruby}} menu. This is required so that templates are made available only when the corresponding script language is available.
For examples of how the existing templates are structured and distributed, take a look at the [ <code>imagej-legacy</code> project] (which maintains the script templates that were previously shipped with Fiji's script editor) as well as the [ <code>imagej-scripting</code> project].
Bureaucrat, emailconfirmed, incoming, administrator, uploaders, widget editor