@@ -52,8 +52,8 @@ export function activate(context: ExtensionContext): Thenable<ExtensionAPI> {
|
||||
],
|
||||
checkjvm: (context: ExtensionContext, jvm: commons.JVM) => {
|
||||
let version = jvm.getMajorVersion();
|
||||
if (version < 17) {
|
||||
throw Error(`Spring Tools Language Server requires Java 17 or higher to be launched. Current Java version is ${version}`);
|
||||
if (version < 21) {
|
||||
throw Error(`Spring Tools Language Server requires Java 21 or higher to be launched. Current Java version is ${version}`);
|
||||
}
|
||||
|
||||
if (!jvm.isJdk()) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Event } from "vscode";
|
||||
import { Event, Uri } from "vscode";
|
||||
import { LanguageClient } from "vscode-languageclient/node";
|
||||
import { LiveProcess } from "./notification";
|
||||
import {Location} from "vscode-languageclient";
|
||||
@@ -109,6 +109,7 @@ interface InjectionPoint {
|
||||
|
||||
interface SpringIndex {
|
||||
readonly beans: (params: BeansParams) => Promise<Bean[]>;
|
||||
readonly getBeans: (uri: Uri) => Promise<Bean[]>;
|
||||
readonly onSpringIndexUpdated: Event<void>;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,9 @@ export class ApiManager {
|
||||
return await commands.executeCommand(COMMAND_LIVEDATA_REFRESH_METRICS, query);
|
||||
}
|
||||
|
||||
const COMMAND_BEANS = "sts/spring-boot/beans";
|
||||
const getBeans: (Uri) => Promise<Bean[]> = async (projectUri: Uri) => await commands.executeCommand(COMMAND_BEANS, projectUri.toString());
|
||||
|
||||
client.onNotification(LiveProcessConnectedNotification.type, (process: LiveProcess) => this.onDidLiveProcessConnectEmitter.fire(process));
|
||||
client.onNotification(LiveProcessDisconnectedNotification.type, (process: LiveProcess) => this.onDidLiveProcessDisconnectEmitter.fire(process));
|
||||
client.onNotification(LiveProcessUpdatedNotification.type, (process: LiveProcess) => this.onDidLiveProcessUpdateEmitter.fire(process));
|
||||
@@ -70,7 +73,8 @@ export class ApiManager {
|
||||
|
||||
const getSpringIndex = () => ({
|
||||
onSpringIndexUpdated,
|
||||
beans
|
||||
beans,
|
||||
getBeans
|
||||
})
|
||||
|
||||
this.api = {
|
||||
|
||||
Reference in New Issue
Block a user