Start Boot LS if classpath of any project has spring

This commit is contained in:
aboyko
2022-11-10 15:48:43 -05:00
parent 6a9969d3ff
commit df0d85cef7
19 changed files with 499 additions and 32 deletions

View File

@@ -385,27 +385,25 @@ function setupLanguageClient(context: VSCode.ExtensionContext, createServer: Ser
codeLensListanableSetting.onDidChangeValue(() => toggleHighlightCodeLens())
}
return client.start().then(() => {
client.onNotification(highlightNotification, (params: HighlightParams) => {
highlightService.handle(params);
if (codeLensListanableSetting && codeLensListanableSetting.value) {
codelensService.handle(params);
}
});
client.onRequest(moveCursorRequest, (params: MoveCursorParams) => {
for (let editor of VSCode.window.visibleTextEditors) {
if (editor.document.uri.toString() == params.uri) {
let cursor = p2c.asPosition(params.position);
let selection : VSCode.Selection = new VSCode.Selection(cursor, cursor);
editor.selections = [ selection ];
}
}
return { applied: true};
});
registerClasspathService(client);
registerJavaDataService(client);
return client;
client.onNotification(highlightNotification, (params: HighlightParams) => {
highlightService.handle(params);
if (codeLensListanableSetting && codeLensListanableSetting.value) {
codelensService.handle(params);
}
});
client.onRequest(moveCursorRequest, (params: MoveCursorParams) => {
for (let editor of VSCode.window.visibleTextEditors) {
if (editor.document.uri.toString() == params.uri) {
let cursor = p2c.asPosition(params.position);
let selection: VSCode.Selection = new VSCode.Selection(cursor, cursor);
editor.selections = [selection];
}
}
return {applied: true};
});
registerClasspathService(client);
registerJavaDataService(client);
return Promise.resolve(client);
}
interface MoveCursorParams {