Added JDT command for getting Java project

Also added a JDT Project cache in the Spring Boot LS
This commit is contained in:
nsingh
2018-03-09 12:05:31 -08:00
parent a305e2ce53
commit 591adec33d
13 changed files with 527 additions and 59 deletions

View File

@@ -1,31 +0,0 @@
'use strict';
import * as VSCode from 'vscode';
import { LanguageClient, RequestType } from 'vscode-languageclient';
export function registerClasspathService(client : LanguageClient) : void {
let classpathRequest = new RequestType<ClasspathParams, ClasspathResponse, void, void>("sts/classpath");
client.onRequest(classpathRequest, async (params: ClasspathParams) => {
return await executeClasspathCommand(params.resourceUri);
});
}
async function executeClasspathCommand(resourceUri : string) : Promise<ClasspathResponse> {
return <ClasspathResponse> (await VSCode.commands.executeCommand("java.execute.workspaceCommand", "sts.java.resolveClasspath", resourceUri));
}
interface ClasspathResponse {
entries: ClasspathEntry[],
defaultOutputFolder : string
}
interface ClasspathParams {
resourceUri: string
}
interface ClasspathEntry {
kind : string,
path : string
}