Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9127d72
Provide toolkit-agnostic Jython code completion
ctrueden Jun 22, 2026
13fc87e
WIP
ctrueden Oct 3, 2026
ab92f5e
Remove snapshot dependency
gselzer Oct 3, 2026
234b531
Grab inherited methods/fields
gselzer Oct 4, 2026
8e9bb15
WIP: AI-generated overloaded params
gselzer Oct 4, 2026
11af6c8
Provide signature help
gselzer Oct 6, 2026
3c5e85c
Type script parameters via a JythonDialect
gselzer Oct 6, 2026
b196a8b
Add a Python language server's completions, via Java stubs
gselzer Oct 6, 2026
471da32
Serve Jython as in-process language servers
gselzer Oct 7, 2026
0dff39e
Move off scijava-code-api, now removed
gselzer Oct 7, 2026
f6f905b
Ask the language servers through script sessions in tests
gselzer Oct 7, 2026
8f2a521
Follow code-lsp's packages by purpose
gselzer Oct 8, 2026
0549b23
Test signature order, not fit
gselzer Oct 8, 2026
c6d7a8a
Combine Jython's analysis and jedi in one server
gselzer Oct 8, 2026
d834ee4
Unify Environment's search paths and classpath
gselzer Oct 9, 2026
ac29871
Serve plain Python: sessions declare the parameters
gselzer Oct 9, 2026
d8e691c
Declare parameters with the types Jython converts them to
gselzer Oct 9, 2026
0d9662a
Name what the declarations import, so it is not completed
gselzer Oct 9, 2026
0e68053
Follow ScriptDialect and ScriptDocument into code-lsp's core package
gselzer Oct 9, 2026
d5654a0
Gather completion into its package; get jedi from code-lsp-jedi
gselzer Oct 15, 2026
23a34c1
Serve the script language by its name, as code-lsp now asks
gselzer Oct 16, 2026
133ff25
Offer only a Jython dialect: the server moves to code-lsp-jython
gselzer Oct 16, 2026
411b6c9
Test only the dialect: the server's tests move to code-lsp-jython
gselzer Oct 16, 2026
0c7f6ae
Follow scijava-code-lsp's rename of runtimeType to parameterType
gselzer Oct 16, 2026
0ba46b7
Follow scijava-code-lsp's ScriptDialect.header
gselzer Oct 16, 2026
ff9f203
Need scijava-code-lsp-jython only to test
gselzer Oct 16, 2026
049c8e7
Follow scijava-code-lsp: sessions are made with the service
gselzer Oct 20, 2026
7e40e5c
Test completion with scijava-code-lsp-jython's jedi
gselzer Oct 21, 2026
b170de3
Declare a live interpreter's variables by their values
gselzer Oct 23, 2026
4c62c91
POM: say when scijava-common 2.101.0 needn't be pinned
gselzer Oct 23, 2026
c7942be
Implement ScriptDialect.outputLanguage, formerly languageId
gselzer Nov 12, 2026
b2c6fb0
Follow scijava-code-lsp's rename to scijava-lsp
gselzer Nov 17, 2026
cca60e9
Purge mentions of scijava-lsp-jedi, long gone
gselzer Nov 18, 2026
d48c24e
Bump JVM version to 11
gselzer Nov 19, 2026
102ece7
Remove SNAPSHOT dependencies
gselzer Nov 19, 2026
48925b7
Add .idea folder to .gitignore
gselzer Nov 19, 2026
9e4d841
Bump workflows to 11
gselzer Nov 19, 2026
b7afdd6
Modularize project
gselzer Nov 23, 2026
dcfa951
Update license headers
gselzer Nov 23, 2026
1ba3b03
Clean up README
gselzer Nov 24, 2026
794e1f1
Clean up JythonDialectTest
gselzer Nov 24, 2026
125ac79
Silence expected NoSuchType warnings in tests
ctrueden Nov 25, 2026
a260e6b
Update license copyright year range for 2026
ctrueden Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v5
with:
java-version: '8'
java-version: '11'
distribution: 'zulu'
cache: 'maven'
- name: Set up CI environment
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
/.idea/
/.project
/.settings/
/.idea/
/target
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2008 - 2023, SciJava developers.
Copyright (c) 2008 - 2026, SciJava developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ platform, see the
[Scripting](https://github.com/scijava/scijava-common/wiki/Scripting) page on
the SciJava Common wiki.

See also:
## Code completion

The Script Editor completes code in Jython scripts with
`scijava-lsp-jython`'s language server. The `JythonDialect` plugin is used
to convert SciJava scripts into text that language server can understand.

## See also:
* [Jython Scripting](http://wiki.imagej.net/Jython_Scripting)
on the ImageJ wiki.
65 changes: 64 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>scripting-jython</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>

<name>SciJava Scripting: Jython</name>
<description>JSR-223-compliant Jython scripting language plugin.</description>
Expand Down Expand Up @@ -54,6 +54,11 @@
<url>https://imagej.net/people/hinerm</url>
<properties><id>hinerm</id></properties>
</contributor>
<contributor>
<name>Gabriel Selzer</name>
<url>https://imagej.net/people/gselzer</url>
<properties><id>gselzer</id></properties>
</contributor>
</contributors>

<mailingLists>
Expand Down Expand Up @@ -84,6 +89,16 @@
<properties>
<scijava.jvm.version>8</scijava.jvm.version>
<package-name>org.scijava.plugins.scripting.jython</package-name>
<surefire.useModulePath>false</surefire.useModulePath>

<!-- TEMP: Remove once pom-scijava manages scijava-common 2.101.0. -->
<scijava-common.version>2.101.0</scijava-common.version>
<scijava-lsp.version>0.1.0</scijava-lsp.version>
<scijava-lsp-jython.version>0.1.0</scijava-lsp-jython.version>
<!-- NB: As Fiji ships, for scijava-lsp (lsp4j); newer than pom-scijava 34's. -->
<gson.version>2.14.0</gson.version>

<scijava.jvm.version>11</scijava.jvm.version>

<license.licenseName>bsd_2</license.licenseName>
<license.copyrightOwners>SciJava developers.</license.copyrightOwners>
Expand All @@ -99,6 +114,18 @@
<groupId>org.scijava</groupId>
<artifactId>scijava-common</artifactId>
</dependency>
<dependency>
<groupId>org.scijava</groupId>
<artifactId>scijava-lsp</artifactId>
<version>${scijava-lsp.version}</version>
</dependency>
<dependency>
<groupId>org.scijava</groupId>
<artifactId>scijava-lsp-jython</artifactId>
<version>${scijava-lsp-jython.version}</version>
<!-- NB: For integration tests; applications choose their servers. -->
<scope>test</scope>
</dependency>

<!-- Third-party dependencies -->
<dependency>
Expand All @@ -113,4 +140,40 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!--
NB: Tests run on the classpath since we use scijava-common's tests JAR.
That JAR shares the org.scijava module name with scijava-common itself, so
it cannot be resolved on the module path.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!--
NB: In module mode, javac does not discover annotation processors
on the module path, so the @Plugin indexer must be declared here.
-->
<annotationProcessorPaths>
<path>
<groupId>org.scijava</groupId>
<artifactId>scijava-common</artifactId>
<version>${scijava-common.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<executions>
<execution>
<id>default-testCompile</id>
<configuration>
<useModulePath>false</useModulePath>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
45 changes: 45 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* #%L
* JSR-223-compliant Jython scripting language plugin.
* %%
* Copyright (C) 2008 - 2026 SciJava developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* #L%
*/

module org.scijava.plugins.scripting.jython {
exports org.scijava.plugins.scripting.jython;
exports org.scijava.plugins.scripting.jython.completion;

// NB: SciJava instantiates @Plugin classes reflectively.
opens org.scijava.plugins.scripting.jython to org.scijava;
opens org.scijava.plugins.scripting.jython.completion to org.scijava;

requires transitive java.scripting;
requires transitive org.scijava;

Check warning on line 39 in src/main/java/module-info.java

View workflow job for this annotation

GitHub Actions / build

requires transitive directive for an automatic module
requires transitive org.scijava.lsp;
requires org.python.jython2;

provides javax.script.ScriptEngineFactory with
org.scijava.plugins.scripting.jython.JythonScriptLanguage;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* JSR-223-compliant Jython scripting language plugin.
* %%
* Copyright (C) 2008 - 2023 SciJava developers.
* Copyright (C) 2008 - 2026 SciJava developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down
Loading