(private graph: Graph)
| 35 | private maxSnippetMtimeMs: number = -1; |
| 36 | |
| 37 | constructor(private graph: Graph) { |
| 38 | this.updateUserSnippetsPath(); |
| 39 | |
| 40 | this.updateUserSnippets = this.updateUserSnippets.bind(this); |
| 41 | this.registerThirdPartySnippets = |
| 42 | this.registerThirdPartySnippets.bind(this); |
| 43 | |
| 44 | const timer = setInterval( |
| 45 | this.updateUserSnippets, |
| 46 | SNIPPET_DIR_REFRESH_INTERVAL_MS |
| 47 | ); |
| 48 | |
| 49 | graph.extensionContext.subscriptions.push( |
| 50 | workspace.onDidChangeConfiguration(() => { |
| 51 | if (this.updateUserSnippetsPath()) { |
| 52 | this.updateUserSnippets(); |
| 53 | } |
| 54 | }), |
| 55 | { |
| 56 | dispose() { |
| 57 | clearInterval(timer); |
| 58 | }, |
| 59 | } |
| 60 | ); |
| 61 | } |
| 62 | |
| 63 | async init() { |
| 64 | const extensionPath = this.graph.extensionContext.extensionPath; |
nothing calls this directly
no test coverage detected