mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 09:10:30 -04:00
Merge from vscode 8a997f7321ae6612fc0e6eb3eac4f358a6233bfb
This commit is contained in:
@@ -49,6 +49,7 @@ import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editor
|
||||
import { IPreferencesService, ISearchResult, ISettingsEditorModel, ISettingsEditorOptions, SettingsEditorOptions, SettingValueType } from 'vs/workbench/services/preferences/common/preferences';
|
||||
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';
|
||||
|
||||
function createGroupIterator(group: SettingsTreeGroupElement): Iterator<ITreeElement<SettingsTreeGroupChild>> {
|
||||
const groupsIt = Iterator.fromArray(group.children);
|
||||
@@ -456,7 +457,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
|
||||
const actionBar = this._register(new ActionBar(this.controlsElement, {
|
||||
animated: false,
|
||||
actionViewItemProvider: (action: Action) => { return undefined; }
|
||||
actionViewItemProvider: (_action) => { return undefined; }
|
||||
}));
|
||||
|
||||
actionBar.push([clearInputAction], { label: false, icon: true });
|
||||
@@ -890,8 +891,8 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
private render(token: CancellationToken): Promise<any> {
|
||||
if (this.input) {
|
||||
return this.input.resolve()
|
||||
.then((model: Settings2EditorModel) => {
|
||||
if (token.isCancellationRequested) {
|
||||
.then((model: IEditorModel | null) => {
|
||||
if (token.isCancellationRequested || !(model instanceof Settings2EditorModel)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ import { ExcludeSettingWidget, IListChangeEvent, IListDataItem, ListSettingWidge
|
||||
import { SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU } from 'vs/workbench/contrib/preferences/common/preferences';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { ISetting, ISettingsGroup, SettingValueType } from 'vs/workbench/services/preferences/common/preferences';
|
||||
import { IUserDataSyncEnablementService } from 'vs/platform/userDataSync/common/userDataSync';
|
||||
|
||||
const $ = DOM.$;
|
||||
|
||||
@@ -1191,7 +1192,7 @@ export class SettingTreeRenderers {
|
||||
@IInstantiationService private readonly _instantiationService: IInstantiationService,
|
||||
@IContextMenuService private readonly _contextMenuService: IContextMenuService,
|
||||
@IContextViewService private readonly _contextViewService: IContextViewService,
|
||||
@IConfigurationService private readonly _configService: IConfigurationService,
|
||||
@IUserDataSyncEnablementService private readonly _userDataSyncEnablementService: IUserDataSyncEnablementService,
|
||||
) {
|
||||
this.settingActions = [
|
||||
new Action('settings.resetSetting', localize('resetSettingLabel', "Reset Setting"), undefined, undefined, (context: SettingsTreeSettingElement) => {
|
||||
@@ -1235,7 +1236,7 @@ export class SettingTreeRenderers {
|
||||
}
|
||||
|
||||
private getActionsForSetting(setting: ISetting): IAction[] {
|
||||
const enableSync = this._configService.getValue<boolean>('sync.enable');
|
||||
const enableSync = this._userDataSyncEnablementService.isEnabled();
|
||||
return enableSync ?
|
||||
[this._instantiationService.createInstance(StopSyncingSettingAction, setting)] :
|
||||
[];
|
||||
|
||||
Reference in New Issue
Block a user