-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
- Loading branch information
1 parent
21eb200
commit d451cd2
Showing
7 changed files
with
105 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
import { ExtensionContext } from "vscode"; | ||
import * as vscode from "vscode"; | ||
import { initialize } from "./util/localize"; | ||
import { activate as telemetryActivate, deactivate as telemetryDeactivate, reporter } from "./telemetry"; | ||
|
||
export function activate(context: vscode.ExtensionContext): void { | ||
performance.mark("extension-start"); | ||
telemetryActivate(context); | ||
|
||
export function activate(ctx: ExtensionContext): void { | ||
initialize().then(() => { | ||
import("./ecl/main").then(({ activate }) => activate(ctx)); | ||
import("./notebook/main").then(({ activate }) => activate(ctx)); | ||
import("./kel/main").then(({ activate }) => activate(ctx)); | ||
import("./dashy/main").then(({ activate }) => activate(ctx)); | ||
return Promise.all([ | ||
import("./ecl/main").then(({ activate }) => activate(context)), | ||
import("./notebook/main").then(({ activate }) => activate(context)), | ||
import("./kel/main").then(({ activate }) => activate(context)), | ||
import("./dashy/main").then(({ activate }) => activate(context)) | ||
]); | ||
}).then(() => { | ||
reporter.sendTelemetryEvent("initialized"); | ||
}); | ||
} | ||
|
||
export function deactivate(): void { | ||
telemetryDeactivate(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as vscode from "vscode"; | ||
import TelemetryReporter from "@vscode/extension-telemetry"; | ||
|
||
class MyTelemetryReporter extends TelemetryReporter { | ||
|
||
dispose(): Promise<any> { | ||
reporter.sendTelemetryEvent("MyTelemetryReporter.dispose"); | ||
return super.dispose(); | ||
} | ||
} | ||
|
||
// telemetry reporter | ||
export let reporter: TelemetryReporter; | ||
|
||
export function activate(context: vscode.ExtensionContext) { | ||
const extPackageJSON = context.extension.packageJSON; | ||
reporter = new MyTelemetryReporter("hpcc-systems.ecl", extPackageJSON.version, "b785b2bb-e170-421b-8bd8-baaf895fe88b"); | ||
context.subscriptions.push(reporter); | ||
|
||
reporter.sendTelemetryEvent("activate"); | ||
} | ||
|
||
export function deactivate(): void { | ||
reporter.sendTelemetryEvent("deactivate"); | ||
|
||
reporter.dispose(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.