MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / constructor

Method constructor

src/core/Debug.ts:17–41  ·  view source on GitHub ↗
(private graph: Graph)

Source from the content-addressed store, hash-verified

15 active: boolean;
16
17 constructor(private graph: Graph) {
18 this.graph.extensionContext.subscriptions.push(this);
19
20 this.evaluateSetting = this.evaluateSetting.bind(this);
21 this.logBranchTypes = this.logBranchTypes.bind(this);
22 this.active = true;
23
24 switch (this.graph.extensionContext.extensionMode) {
25 // Development mode. Always enable.
26 case ExtensionMode.Development:
27 this.enableDebugLog();
28 break;
29 // Test mode. Always disable.
30 case ExtensionMode.Test:
31 this.disableDebugLog();
32 break;
33 // Production mode. Enable based on user setting.
34 case ExtensionMode.Production:
35 this.evaluateSetting();
36 this.disposableConfiguration = workspace.onDidChangeConfiguration(
37 this.evaluateSetting
38 );
39 break;
40 }
41 }
42
43 init() {}
44

Callers

nothing calls this directly

Calls 3

enableDebugLogMethod · 0.95
disableDebugLogMethod · 0.95
evaluateSettingMethod · 0.95

Tested by

no test coverage detected