Move Extension Context
This commit is contained in:
parent
7a5df9f387
commit
907fa71394
4 changed files with 21 additions and 6 deletions
17
src/common/extension-state.ts
Normal file
17
src/common/extension-state.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { ExtensionContext, Memento } from "vscode";
|
||||
|
||||
export class ExtensionState {
|
||||
private static _context: ExtensionContext;
|
||||
|
||||
static get global(): Memento {
|
||||
return this._context.globalState;
|
||||
}
|
||||
|
||||
static get workspace(): Memento {
|
||||
return this._context.workspaceState;
|
||||
}
|
||||
|
||||
static configure(context: ExtensionContext): void {
|
||||
this._context = context;
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1,2 @@
|
|||
export * from "./create-document-selector";
|
||||
export * from "./extension-state";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue