404
405
protected emitDidChangeValue(scope: StorageScope, event: IStorageChangeEvent): void {
407
>
408
>
// Specially handle `TARGET_KEY`
409
>
if (key === TARGET_KEY) {
410
>
411
>
// Clear our cached version which is now out of date
412
>
switch (scope) {
413
>
case StorageScope.APPLICATION_SHARED:
414
this._applicationSharedKeyTargets = undefined;
415
break;
417
this._applicationKeyTargets = undefined;
418
break;
420
this._profileKeyTargets = undefined;
421
break;
423
this._workspaceKeyTargets = undefined;
424
break;
426
>
427
>
// Emit as `didChangeTarget` event
428
>
this._onDidChangeTarget.fire({ scope });
429
>
}
430
>
431
>
// Emit any other key to outside
432
>
else {
433
>
this._onDidChangeValue.fire({ scope, key, target: this.getKeyTargets(scope)[key], external });
434
>
}
435
>
}
436
437
protected emitWillSaveState(reason: WillSaveStateReason): void {