Skip to content

Commit a107764

Browse files
gselzerclaude
andcommitted
Serve the script language by its name, as code-lsp now asks
code-lsp's sessions ask for the LSP language named as the script's language, in lower case, so the plugin no longer declares the script language it serves separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d71733f commit a107764

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

‎src/main/java/org/scijava/plugins/scripting/appose/python/completion/ApposePythonServerPlugin.java‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
import org.scijava.code.lsp.ScriptDialect;
3838
import org.scijava.plugin.Parameter;
3939
import org.scijava.plugin.Plugin;
40-
import org.scijava.plugins.scripting.appose.python.ApposePythonScriptLanguage;
4140
import org.scijava.plugins.scripting.appose.python._internal.ResidentWorkerService;
42-
import org.scijava.script.ScriptLanguage;
4341

4442
/**
4543
* A {@link LanguageServerPlugin} for Appose-Python scripts, backed by
@@ -64,17 +62,11 @@ public class ApposePythonServerPlugin implements LanguageServerPlugin {
6462

6563
@Override
6664
public boolean supports(final String languageId) {
67-
// NB: Not "python", which this builds on. Without jedi, there is
68-
// nothing to serve.
65+
// NB: Appose-Python scripts too, by their language's name. Not "python",
66+
// which this builds on. Without jedi, there is nothing to serve.
6967
return "appose-python".equals(languageId) && jediOffered();
7068
}
7169

72-
@Override
73-
public boolean supports(final ScriptLanguage language) {
74-
// NB: Without jedi, there is nothing to serve.
75-
return language instanceof ApposePythonScriptLanguage && jediOffered();
76-
}
77-
7870
@Override
7971
public LanguageServer create(final String languageId,
8072
final Environment environment)

0 commit comments

Comments
 (0)