|
2 | 2 | // Licensed under the MIT license. |
3 | 3 |
|
4 | 4 | import * as path from "path"; |
5 | | -import { commands, Diagnostic, Extension, ExtensionContext, extensions, languages, |
6 | | - Range, tasks, TextDocument, TextEditor, Uri, window, workspace } from "vscode"; |
| 5 | +import { |
| 6 | + commands, Diagnostic, Extension, ExtensionContext, extensions, languages, |
| 7 | + Range, tasks, TextDocument, TextEditor, Uri, window, workspace |
| 8 | +} from "vscode"; |
7 | 9 | import { dispose as disposeTelemetryWrapper, initializeFromJsonFile, instrumentOperation, instrumentOperationAsVsCodeCommand, sendInfo } from "vscode-extension-telemetry-wrapper"; |
8 | 10 | import { Commands, contextManager } from "../extension.bundle"; |
9 | 11 | import { BuildTaskProvider } from "./tasks/build/buildTaskProvider"; |
@@ -87,9 +89,13 @@ async function activateExtension(_operationId: string, context: ExtensionContext |
87 | 89 | setContextForDeprecatedTasks(); |
88 | 90 |
|
89 | 91 | // Register Copilot context providers after Java Language Server is ready |
| 92 | + const isPrereleaseBuild = context.extension.packageJSON.preview === true; |
| 93 | + if (!isPrereleaseBuild) { |
| 94 | + return; |
| 95 | + } |
90 | 96 | languageServerApiManager.ready().then((isReady) => { |
91 | 97 | const config = workspace.getConfiguration("vscode-java-dependency"); |
92 | | - const isSettingEnabled = config.get<boolean>("enableLspTools", true); |
| 98 | + const isSettingEnabled = config.get<boolean>("enableLspTools", false); |
93 | 99 | if (isReady && isSettingEnabled) { |
94 | 100 | registerJavaContextTools(context); |
95 | 101 | } |
|
0 commit comments