Merge from vscode 93309f060778f6480a7d2a13913e6e7c624e9bc7

This commit is contained in:
ADS Merger
2020-03-26 07:08:23 +00:00
parent 685e0ccf7e
commit f5134198e2
87 changed files with 942 additions and 631 deletions

View File

@@ -50,6 +50,7 @@ import { IPreferencesService, ISearchResult, ISettingsEditorModel, ISettingsEdit
import { SettingsEditor2Input } from 'vs/workbench/services/preferences/common/preferencesEditorInput';
import { Settings2EditorModel } from 'vs/workbench/services/preferences/common/preferencesModels';
import { IEditorModel } from 'vs/platform/editor/common/editor';
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
function createGroupIterator(group: SettingsTreeGroupElement): Iterator<ITreeElement<SettingsTreeGroupChild>> {
const groupsIt = Iterator.fromArray(group.children);
@@ -70,6 +71,7 @@ interface IFocusEventFromScroll extends KeyboardEvent {
fromScroll: true;
}
const SETTINGS_AUTOSAVE_NOTIFIED_KEY = 'hasNotifiedOfSettingsAutosave';
const SETTINGS_EDITOR_STATE_KEY = 'settingsEditorState';
export class SettingsEditor2 extends BaseEditor {
@@ -160,7 +162,8 @@ export class SettingsEditor2 extends BaseEditor {
@IStorageService private readonly storageService: IStorageService,
@INotificationService private readonly notificationService: INotificationService,
@IEditorGroupsService protected editorGroupService: IEditorGroupsService,
@IKeybindingService private readonly keybindingService: IKeybindingService
@IKeybindingService private readonly keybindingService: IKeybindingService,
@IStorageKeysSyncRegistryService storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
) {
super(SettingsEditor2.ID, telemetryService, themeService, storageService);
this.delayedFilterLogging = new Delayer<void>(1000);
@@ -186,6 +189,8 @@ export class SettingsEditor2 extends BaseEditor {
this.onConfigUpdate(e.affectedKeys);
}
}));
storageKeysSyncRegistryService.registerStorageKey({ key: SETTINGS_AUTOSAVE_NOTIFIED_KEY, version: 1 });
}
get minimumWidth(): number { return 375; }
@@ -712,8 +717,8 @@ export class SettingsEditor2 extends BaseEditor {
}
private notifyNoSaveNeeded() {
if (!this.storageService.getBoolean('hasNotifiedOfSettingsAutosave', StorageScope.GLOBAL, false)) {
this.storageService.store('hasNotifiedOfSettingsAutosave', true, StorageScope.GLOBAL);
if (!this.storageService.getBoolean(SETTINGS_AUTOSAVE_NOTIFIED_KEY, StorageScope.GLOBAL, false)) {
this.storageService.store(SETTINGS_AUTOSAVE_NOTIFIED_KEY, true, StorageScope.GLOBAL);
this.notificationService.info(localize('settingsNoSaveNeeded', "Your changes are automatically saved as you edit."));
}
}