Skip to content

Commit 8812ccc

Browse files
authored
Send telemetry when adding source paths (#1204)
* Send telemetry when adding source paths Signed-off-by: sheche <[email protected]>
1 parent dfa9462 commit 8812ccc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/debugCodeLensProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import * as _ from "lodash";
55
import * as path from "path";
66
import * as vscode from "vscode";
7-
import { instrumentOperationAsVsCodeCommand } from "vscode-extension-telemetry-wrapper";
7+
import { instrumentOperationAsVsCodeCommand, sendInfo } from "vscode-extension-telemetry-wrapper";
88

99
import { JAVA_LANGID } from "./constants";
1010
import { initializeHoverProvider } from "./hoverProvider";
@@ -214,11 +214,13 @@ async function addToClasspath(uri: vscode.Uri): Promise<boolean> {
214214
if (parentPath === parentUri.fsPath) {
215215
parentPath = path.basename(parentFsPath);
216216
}
217+
sendInfo("", {operationName: "notOnClasspath"});
217218
const ans = await vscode.window.showWarningMessage(`The file ${fileName} isn't on the classpath, the runtime may throw class not found error. `
218219
+ `Do you want to add the parent folder "${parentPath}" to Java source path?`, "Add to Source Path", "Skip");
219220
if (ans === "Skip") {
220221
return true;
221222
} else if (ans === "Add to Source Path") {
223+
sendInfo("", {operationName: "addToSourcePath"});
222224
vscode.commands.executeCommand("java.project.addToSourcePath.command", parentUri);
223225
}
224226

0 commit comments

Comments
 (0)