mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 09:10:30 -04:00
Merge from vscode 718331d6f3ebd1b571530ab499edb266ddd493d5
This commit is contained in:
@@ -42,7 +42,7 @@ import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { editorBackground, errorForeground, focusBorder, foreground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { attachButtonStyler, attachInputBoxStyler, attachSelectBoxStyler, attachStyler } from 'vs/platform/theme/common/styler';
|
||||
import { ICssStyleCollector, ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||
import { getIgnoredSettings } from 'vs/platform/userDataSync/common/settingsSync';
|
||||
import { getIgnoredSettings } from 'vs/platform/userDataSync/common/settingsMerge';
|
||||
import { ITOCEntry } from 'vs/workbench/contrib/preferences/browser/settingsLayout';
|
||||
import { ISettingsEditorViewState, settingKeyToDisplayFormat, SettingsTreeElement, SettingsTreeGroupChild, SettingsTreeGroupElement, SettingsTreeNewExtensionsElement, SettingsTreeSettingElement } from 'vs/workbench/contrib/preferences/browser/settingsTreeModels';
|
||||
import { ExcludeSettingWidget, IListChangeEvent, IListDataItem, ListSettingWidget, settingsHeaderForeground, settingsNumberInputBackground, settingsNumberInputBorder, settingsNumberInputForeground, settingsSelectBackground, settingsSelectBorder, settingsSelectForeground, settingsSelectListBorder, settingsTextInputBackground, settingsTextInputBorder, settingsTextInputForeground } from 'vs/workbench/contrib/preferences/browser/settingsWidgets';
|
||||
@@ -1190,7 +1190,8 @@ export class SettingTreeRenderers {
|
||||
constructor(
|
||||
@IInstantiationService private readonly _instantiationService: IInstantiationService,
|
||||
@IContextMenuService private readonly _contextMenuService: IContextMenuService,
|
||||
@IContextViewService private readonly _contextViewService: IContextViewService
|
||||
@IContextViewService private readonly _contextViewService: IContextViewService,
|
||||
@IConfigurationService private readonly _configService: IConfigurationService,
|
||||
) {
|
||||
this.settingActions = [
|
||||
new Action('settings.resetSetting', localize('resetSettingLabel', "Reset Setting"), undefined, undefined, (context: SettingsTreeSettingElement) => {
|
||||
@@ -1205,7 +1206,7 @@ export class SettingTreeRenderers {
|
||||
this._instantiationService.createInstance(CopySettingAsJSONAction),
|
||||
];
|
||||
|
||||
const actionFactory = (setting: ISetting) => [this._instantiationService.createInstance(StopSyncingSettingAction, setting)];
|
||||
const actionFactory = (setting: ISetting) => this.getActionsForSetting(setting);
|
||||
const settingRenderers = [
|
||||
this._instantiationService.createInstance(SettingBoolRenderer, this.settingActions, actionFactory),
|
||||
this._instantiationService.createInstance(SettingNumberRenderer, this.settingActions, actionFactory),
|
||||
@@ -1233,6 +1234,13 @@ export class SettingTreeRenderers {
|
||||
];
|
||||
}
|
||||
|
||||
private getActionsForSetting(setting: ISetting): IAction[] {
|
||||
const enableSync = this._configService.getValue<boolean>('sync.enable');
|
||||
return enableSync ?
|
||||
[this._instantiationService.createInstance(StopSyncingSettingAction, setting)] :
|
||||
[];
|
||||
}
|
||||
|
||||
cancelSuggesters() {
|
||||
this._contextViewService.hideContextView();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user