Remove obsolete 'sts/project' service support
This commit is contained in:
@@ -16,7 +16,6 @@ import { log } from 'util';
|
||||
import { tmpdir } from 'os';
|
||||
import { JVM, findJvm, findJdk } from '@pivotal-tools/jvm-launch-utils';
|
||||
import { registerClasspathService } from './classpath';
|
||||
import { registerProjectService } from './project';
|
||||
import { registerJavadocService } from './javadoc';
|
||||
|
||||
let p2c = P2C.createConverter();
|
||||
@@ -228,7 +227,6 @@ function setupLanguageClient(context: VSCode.ExtensionContext, createServer: Ser
|
||||
}
|
||||
return { applied: true};
|
||||
});
|
||||
registerProjectService(client);
|
||||
registerClasspathService(client);
|
||||
registerJavadocService(client);
|
||||
return client;
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
import * as VSCode from 'vscode';
|
||||
import { LanguageClient, RequestType } from 'vscode-languageclient';
|
||||
|
||||
export function registerProjectService(client : LanguageClient) : void {
|
||||
let projectRequest = new RequestType<string, ProjectResponse, void, void>("sts/project");
|
||||
|
||||
client.onRequest(projectRequest, (uri: string) => {
|
||||
return executeProjectCommand(uri);
|
||||
});
|
||||
}
|
||||
|
||||
async function executeProjectCommand(resourceUri : string) : Promise<ProjectResponse> {
|
||||
return <ProjectResponse> (await VSCode.commands.executeCommand("java.execute.workspaceCommand", "sts.java.resolveProject", resourceUri));
|
||||
}
|
||||
|
||||
interface ProjectResponse {
|
||||
name: string,
|
||||
uri : string
|
||||
}
|
||||
Reference in New Issue
Block a user