Open mickaelistria opened 12 months ago
@snjeza is there a way to configure JDT-LS to unfilter some types? Could we add a listener to JDT-UI prefs and send the right didChangeConfiguraiton ?
@mickaelistria Java LS uses the java.completion.filteredTypes
property. You can check the following patch
diff --git a/com.redhat.eclipseide.jdtlsclient/src/com/redhat/eclipseide/jdtlsclient/InProcessJDTLSConnectionProvider.java b/com.redhat.eclipseide.jdtlsclient/src/com/redhat/eclipseide/jdtlsclient/InProcessJDTLSConnectionProvider.java
index 3af627d..03dbe36 100644
--- a/com.redhat.eclipseide.jdtlsclient/src/com/redhat/eclipseide/jdtlsclient/InProcessJDTLSConnectionProvider.java
+++ b/com.redhat.eclipseide.jdtlsclient/src/com/redhat/eclipseide/jdtlsclient/InProcessJDTLSConnectionProvider.java
@@ -59,7 +59,7 @@ public class InProcessJDTLSConnectionProvider implements StreamConnectionProvide
clientInputStream = Channels.newInputStream(serverOutputToClientInput.source());
clientOutputStream = Channels.newOutputStream(clientOutputToServerInput.sink());
listener = launcher.startListening();
- server.connectClient((JavaLanguageClient)launcher.getRemoteProxy());
+ server.connectClient(launcher.getRemoteProxy());
// Store the output streams so we can close them to clean up. The corresponding input
// streams should automatically receive an EOF and close.
@@ -107,7 +107,9 @@ public class InProcessJDTLSConnectionProvider implements StreamConnectionProvide
"implementationsCodeLens", Map.of( //
"enabled", false), //
"referencesCodeLens", Map.of( //
- "enabled", false))),
+ "enabled", false),
+ "completion", Map.of( //
+ "filteredTypes", List.of("java.awt.*")))),
"extendedClientCapabilities", Map.of(
"classFileContentsSupport", true, //
// We want JDT-LS to keep the IDocument intact on change, as they're
Let's make sure issue is not already fixed in snapshots first.
Steps to reproduce
From a fresh installation and clean workspace:
--add-exports jdk.compiler/com.sun.source.tree
com.sun.*
is not filtered (uncheck it)com.sun.source.tree.CompilationUnitTr
CompilationUnitTree
is suggestedI tried
I expected:
CompilationUnitTree
But got: nothing
Here is some relevant log output form (
<workspace>/.metadata/.log
)Tested under this environment:
Community