mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 31e03b8ffbb218a87e3941f2b63a249f061fe0e4 (#4986)
This commit is contained in:
@@ -13,8 +13,8 @@ import * as nls from 'vs/nls';
|
||||
import { MenuId, MenuRegistry, SyncActionDescriptor } from 'vs/platform/actions/common/actions';
|
||||
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { WorkbenchStateContext, IsRemoteContext } from 'vs/workbench/common/contextkeys';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { WorkbenchStateContext, RemoteAuthorityContext } from 'vs/workbench/common/contextkeys';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -40,7 +40,6 @@ import { DefaultPreferencesEditorInput, KeybindingsEditorInput, PreferencesEdito
|
||||
import { ExplorerRootContext, ExplorerFolderContext } from 'vs/workbench/contrib/files/common/files';
|
||||
import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { IWindowService } from 'vs/platform/windows/common/windows';
|
||||
import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
|
||||
|
||||
registerSingleton(IPreferencesSearchService, PreferencesSearchService, true);
|
||||
@@ -387,12 +386,11 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
class PreferencesActionsContribution extends Disposable implements IWorkbenchContribution {
|
||||
|
||||
constructor(
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
|
||||
@IPreferencesService private readonly preferencesService: IPreferencesService,
|
||||
@IWorkspaceContextService private readonly workpsaceContextService: IWorkspaceContextService,
|
||||
@ILabelService labelService: ILabelService,
|
||||
@IExtensionService extensionService: IExtensionService,
|
||||
@IWindowService windowService: IWindowService
|
||||
) {
|
||||
super();
|
||||
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
||||
@@ -431,7 +429,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
|
||||
extensionService.whenInstalledExtensionsRegistered()
|
||||
.then(() => {
|
||||
const remoteAuthority = windowService.getConfiguration().remoteAuthority;
|
||||
const remoteAuthority = environmentService.configuration.remoteAuthority;
|
||||
const hostLabel = labelService.getHostLabel(REMOTE_HOST_SCHEME, remoteAuthority) || remoteAuthority;
|
||||
const label = nls.localize('openRemoteSettings', "Open User Settings ({0})", hostLabel);
|
||||
CommandsRegistry.registerCommand(OpenRemoteSettingsAction.ID, serviceAccessor => {
|
||||
@@ -443,7 +441,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
title: { value: label, original: `Preferences: Open User Settings (${hostLabel})` },
|
||||
category: nls.localize('preferencesCategory', "Preferences")
|
||||
},
|
||||
when: IsRemoteContext
|
||||
when: RemoteAuthorityContext.notEqualsTo('')
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1211,7 +1211,8 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
}
|
||||
|
||||
private renderResultCountMessages() {
|
||||
if (!this.currentSettingsModel) {
|
||||
if (!this.currentSettingsModel || !this.searchResultModel) {
|
||||
this.countElement.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user