mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 0fde6619172c9f04c41f2e816479e432cc974b8b (#5199)
This commit is contained in:
@@ -159,6 +159,11 @@ export const tocData: ITOCEntry = {
|
||||
id: 'features/comments',
|
||||
label: localize('comments', "Comments"),
|
||||
settings: ['comments.*']
|
||||
},
|
||||
{
|
||||
id: 'features/remote',
|
||||
label: localize('remote', "Remote"),
|
||||
settings: ['remote.*']
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -418,14 +418,14 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
.then(() => {
|
||||
const remoteAuthority = environmentService.configuration.remoteAuthority;
|
||||
const hostLabel = labelService.getHostLabel(REMOTE_HOST_SCHEME, remoteAuthority) || remoteAuthority;
|
||||
const label = nls.localize('openRemoteSettings', "Open User Settings ({0})", hostLabel);
|
||||
const label = nls.localize('openRemoteSettings', "Open Remote Settings ({0})", hostLabel);
|
||||
CommandsRegistry.registerCommand(OpenRemoteSettingsAction.ID, serviceAccessor => {
|
||||
serviceAccessor.get(IInstantiationService).createInstance(OpenRemoteSettingsAction, OpenRemoteSettingsAction.ID, label).run();
|
||||
});
|
||||
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||
command: {
|
||||
id: OpenRemoteSettingsAction.ID,
|
||||
title: { value: label, original: `Preferences: Open User Settings (${hostLabel})` },
|
||||
title: { value: label, original: `Preferences: Open Remote Settings (${hostLabel})` },
|
||||
category: nls.localize('preferencesCategory', "Preferences")
|
||||
},
|
||||
when: RemoteAuthorityContext.notEqualsTo('')
|
||||
|
||||
@@ -205,7 +205,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
this.updateStyles();
|
||||
}
|
||||
|
||||
setInput(input: SettingsEditor2Input, options: SettingsEditorOptions, token: CancellationToken): Promise<void> {
|
||||
setInput(input: SettingsEditor2Input, options: SettingsEditorOptions | null, token: CancellationToken): Promise<void> {
|
||||
this.inSettingsEditorContextKey.set(true);
|
||||
return super.setInput(input, options, token)
|
||||
.then(() => new Promise(process.nextTick)) // Force setInput to be async
|
||||
@@ -213,10 +213,10 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
return this.render(token);
|
||||
})
|
||||
.then(() => {
|
||||
options = options || SettingsEditorOptions.create({});
|
||||
|
||||
if (!this.viewState.settingsTarget) {
|
||||
if (!options) {
|
||||
options = SettingsEditorOptions.create({ target: ConfigurationTarget.USER_LOCAL });
|
||||
} else if (!options.target) {
|
||||
if (!options.target) {
|
||||
options.target = ConfigurationTarget.USER_LOCAL;
|
||||
}
|
||||
}
|
||||
@@ -1065,7 +1065,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
this.searchInProgress = null;
|
||||
}
|
||||
|
||||
this.viewState.filterToCategory = undefined;
|
||||
this.tocTree.setFocus([]);
|
||||
this.tocTreeModel.currentSearchModel = this.searchResultModel;
|
||||
this.onSearchModeToggled();
|
||||
|
||||
@@ -1206,8 +1206,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
this.tocTreeModel.update();
|
||||
}
|
||||
|
||||
this.tocTree.setSelection([]);
|
||||
this.viewState.filterToCategory = undefined;
|
||||
this.tocTree.setFocus([]);
|
||||
this.tocTree.expandAll();
|
||||
|
||||
this.renderTree(undefined, true);
|
||||
|
||||
Reference in New Issue
Block a user