This library provides a JSR-223-compliant scripting plugin for the Jython language.
It is implemented as a ScriptLanguage plugin for the SciJava
Common platform, which means that
in addition to being usable directly as a javax.script.ScriptEngineFactory,
it also provides some functionality on top, such as the ability to generate
lines of script code based on SciJava events.
The Script Editor completes code in Jython scripts: Java classes, their
members and constructors (with their overloads), imports, the script's #@
parameters and, in a live interpreter, its variables. This is Jython's own
completion, which knows Java exactly, by scijava-lsp-jython's language
server; this plugin shows it the scripts as plain Jython (JythonDialect),
their parameters declared.
A Python language server (ty, offered by scijava-lsp-ty, which runs it
in a small environment of its own, built the first time it is needed) adds
its completions too: for Python modules, and for Java classes, from Python
type stubs (.pyi) of the Java packages the script imports, written in
the background to ~/.cache/scijava/jython-stubs (or
-Dscijava.jython.stubs=<dir>). The server analyzes the script as CPython
(Jython's standard library is Python 2's, but mostly the same); so it is
asked for completions only, not for problems.
For a complete list of scripting languages available as part of the SciJava platform, see the Scripting page on the SciJava Common wiki.
See also:
- Jython Scripting on the ImageJ wiki.