Merge from vscode 2e5312cd61ff99c570299ecc122c52584265eda2

This commit is contained in:
ADS Merger
2020-04-23 02:50:35 +00:00
committed by Anthony Dresser
parent 3603f55d97
commit 7f1d8fc32f
659 changed files with 22709 additions and 12497 deletions

View File

@@ -35,7 +35,7 @@ import { ICommandHandler } from 'vs/platform/commands/common/commands';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { normalizeDriveLetter } from 'vs/base/common/labels';
import { SaveReason } from 'vs/workbench/common/editor';
import { IRemotePathService } from 'vs/workbench/services/path/common/remotePathService';
import { IPathService } from 'vs/workbench/services/path/common/pathService';
export namespace OpenLocalFileCommand {
export const ID = 'workbench.action.files.openLocalFile';
@@ -108,7 +108,7 @@ export class SimpleFileDialog {
private remoteAuthority: string | undefined;
private requiresTrailing: boolean = false;
private trailing: string | undefined;
private scheme: string = REMOTE_HOST_SCHEME;
protected scheme: string = REMOTE_HOST_SCHEME;
private contextKey: IContextKey<boolean>;
private userEnteredPathSegment: string = '';
private autoCompletePathSegment: string = '';
@@ -133,9 +133,9 @@ export class SimpleFileDialog {
@IFileDialogService private readonly fileDialogService: IFileDialogService,
@IModelService private readonly modelService: IModelService,
@IModeService private readonly modeService: IModeService,
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
@IWorkbenchEnvironmentService protected readonly environmentService: IWorkbenchEnvironmentService,
@IRemoteAgentService private readonly remoteAgentService: IRemoteAgentService,
@IRemotePathService private readonly remotePathService: IRemotePathService,
@IPathService protected readonly pathService: IPathService,
@IKeybindingService private readonly keybindingService: IKeybindingService,
@IContextKeyService contextKeyService: IContextKeyService,
) {
@@ -231,11 +231,8 @@ export class SimpleFileDialog {
return this.remoteAgentEnvironment;
}
private async getUserHome(): Promise<URI> {
if (this.scheme !== Schemas.file) {
return this.remotePathService.userHome;
}
return this.environmentService.userHome!;
protected async getUserHome(): Promise<URI> {
return (await this.pathService.userHome) ?? URI.from({ scheme: this.scheme, authority: this.remoteAuthority, path: '/' });
}
private async pickResource(isSave: boolean = false): Promise<URI | undefined> {