MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / activate

Function activate

packages/vscode-extension/extension.js:13–39  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

11const DEFAULT_SERVICE_URL = "http://127.0.0.1:4310";
12
13function activate(context) {
14 outputChannel = vscode.window.createOutputChannel("SimDeck");
15
16 context.subscriptions.push(
17 outputChannel,
18 vscode.commands.registerCommand("simdeck.openSimulatorView", async () => {
19 try {
20 const serverUrl = await resolveSimulatorUrl(context);
21 openSimulatorPanel(serverUrl);
22 } catch (error) {
23 const message = error instanceof Error ? error.message : String(error);
24 outputChannel.appendLine(message);
25 outputChannel.show(true);
26 void vscode.window.showErrorMessage(message);
27 }
28 }),
29 vscode.commands.registerCommand("simdeck.stopServer", async () => {
30 await stopProjectService(context);
31 await vscode.window.showInformationMessage(
32 "Stopped the SimDeck project service.",
33 );
34 }),
35 vscode.commands.registerCommand("simdeck.showOutput", () => {
36 outputChannel.show(true);
37 }),
38 );
39}
40
41function deactivate() {}
42

Callers

nothing calls this directly

Calls 3

resolveSimulatorUrlFunction · 0.85
openSimulatorPanelFunction · 0.85
stopProjectServiceFunction · 0.85

Tested by

no test coverage detected