8000 show deprecation popup every time command is run · MHKCoder/vscode-arduino@92b9f6c · GitHub
[go: up one dir, main page]

Skip to content

Commit 92b9f6c

Browse files
show deprecation popup every time command is run
1 parent b77146c commit 92b9f6c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/extension.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ import * as Logger from "./logger/logger";
2828
import { SerialMonitor } from "./serialmonitor/serialMonitor";
2929
const usbDetectorModule = impor("./serialmonitor/usbDetector") as typeof import ("./serialmonitor/usbDetector");
3030

31-
export async function activate(context: vscode.ExtensionContext) {
32-
await vscode.window.showWarningMessage("The Arduino extension is deprecated. Please view our README for more information.", "View README").then((selection) => {
31+
export function showDeprecatedPopup(): void {
32+
vscode.window.showWarningMessage("The Arduino extension is deprecated. Please view our README for more information.", "View README").then((selection) => {
3333
if (selection === "View README") {
3434
vscode.commands.executeCommand("vscode.open", vscode.Uri.parse("https://github.com/microsoft/vscode-arduino/blob/main/README.md"));
3535
}
3636
});
37+
}
38+
39+
export async function activate(context: vscode.ExtensionContext) {
40+
showDeprecatedPopup();
3741
Logger.configure(context);
3842
arduinoActivatorModule.default.context = context;
3943
const activeGuid = uuidModule().replace(/-/g, "");
@@ -55,6 +59,7 @@ export async function activate(context: vscode.ExtensionContext) {
5559
context.subscriptions.push(deviceContext);
5660

5761
const commandExecution = async (command: string, commandBody: (...args: any[]) => any, args: any, getUserData?: () => any) => {
62+
showDeprecatedPopup();
5863
const guid = uuidModule().replace(/-/g, "");
5964
Logger.traceUserData(`start-command-` + command, { correlationId: guid });
6065
const timer1 = new Logger.Timer();

0 commit comments

Comments
 (0)
0