From 4d897fdbf0e7032a526cb4d57311f21332cfdd5e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 29 Jul 2026 16:45:34 -0400 Subject: [PATCH] [WIP] Project-only search scope See https://github.com/eclipse-jdtls/eclipse.jdt.ls/pull/3850, this is the client side changes needed to adopt that PR. Signed-off-by: David Thompson --- package.json | 6 ++++-- src/extension.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e36dc28da..a31fc8a99 100644 --- a/package.json +++ b/package.json @@ -1644,11 +1644,13 @@ "type": "string", "enum": [ "all", - "main" + "main", + "projectOnly" ], "enumDescriptions": [ "Search on all classpath entries including reference libraries and projects.", - "All classpath entries excluding test classpath entries." + "All classpath entries excluding test classpath entries.", + "Only search sources, tests, and referenced projects, excluding the JDK and referenced libraries from the search." ], "default": "all", "markdownDescription": "Specifies the scope which must be used for search operation like \n - Find Reference\n - Call Hierarchy\n - Workspace Symbols", diff --git a/src/extension.ts b/src/extension.ts index 8679e85e9..48a71c1dd 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -701,7 +701,7 @@ async function postExtensionStartInit( }); context.subscriptions.push(commands.registerCommand(Commands.CHANGE_JAVA_SEARCH_SCOPE, async () => { - const selection = await window.showQuickPick(["all", "main"], { + const selection = await window.showQuickPick(["all", "main", "projectOnly"], { canPickMany: false, placeHolder: `Current: ${workspace.getConfiguration().get("java.search.scope")}`, });