mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
#95209 Move to final API
This commit is contained in:
@@ -387,7 +387,6 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
|
||||
const that = this;
|
||||
return Object.freeze<vscode.ExtensionContext>({
|
||||
globalState,
|
||||
get syncedGlobalState() { checkProposedApiEnabled(extensionDescription); return globalState; },
|
||||
workspaceState,
|
||||
subscriptions: [],
|
||||
get extensionUri() { return extensionDescription.extensionLocation; },
|
||||
|
||||
@@ -7,7 +7,6 @@ import type * as vscode from 'vscode';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ExtHostStorage } from 'vs/workbench/api/common/extHostStorage';
|
||||
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||
import { checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions';
|
||||
|
||||
export class ExtensionMemento implements vscode.Memento {
|
||||
|
||||
@@ -64,12 +63,8 @@ export class ExtensionGlobalMemento extends ExtensionMemento {
|
||||
|
||||
private readonly _extension: IExtensionDescription;
|
||||
|
||||
private _syncedKeys: string[] = [];
|
||||
get syncedKeys(): ReadonlyArray<string> { return Object.freeze(this._syncedKeys); }
|
||||
set syncedKeys(syncKeys: ReadonlyArray<string>) {
|
||||
checkProposedApiEnabled(this._extension);
|
||||
this._syncedKeys = [...syncKeys];
|
||||
this._storage.registerExtensionStorageKeysToSync({ id: this._id, version: this._extension.version }, this._syncedKeys);
|
||||
setKeysForSync(keys: string[]): void {
|
||||
this._storage.registerExtensionStorageKeysToSync({ id: this._id, version: this._extension.version }, keys);
|
||||
}
|
||||
|
||||
constructor(extensionDescription: IExtensionDescription, storage: ExtHostStorage) {
|
||||
|
||||
Reference in New Issue
Block a user