forked from microsoft/vscode-java-pack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvscode.api.ts
More file actions
60 lines (52 loc) · 1.27 KB
/
Copy pathvscode.api.ts
File metadata and controls
60 lines (52 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
declare function acquireVsCodeApi(): any;
const vscode = acquireVsCodeApi();
export function udpateJavaHome(javaHome: string) {
vscode.postMessage({
command: "updateJavaHome",
javaHome
});
}
export function updateRuntimePath(sourceLevel: string, runtimePath: string) {
vscode.postMessage({
command: "updateRuntimePath",
sourceLevel,
runtimePath
});
}
export function setDefaultRuntime(runtimePath: string, majorVersion: number) {
vscode.postMessage({
command: "setDefaultRuntime",
runtimePath,
majorVersion
});
}
export function openBuildScript(rootUri: string, scriptFile: string) {
vscode.postMessage({
command: "openBuildScript",
rootUri,
scriptFile
});
}
export function onWillListRuntimes() {
vscode.postMessage({
command: "onWillListRuntimes"
});
}
export function onWillBrowseForJDK() {
vscode.postMessage({
command: "onWillBrowseForJDK"
});
}
export function onWillRunCommandFromWebview(webview: string, identifier: string, command: string, args?: any[]) {
vscode.postMessage({
command: "onWillRunCommandFromWebview",
wrappedArgs: {
webview,
identifier,
command,
args
}
});
}