mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
💄
This commit is contained in:
parent
f865f66c91
commit
36ed074f8f
|
@ -18,6 +18,15 @@ export namespace WebFileSystemAccess {
|
|||
return false;
|
||||
}
|
||||
|
||||
export function isFileSystemHandle(handle: unknown): handle is FileSystemHandle {
|
||||
const candidate = handle as FileSystemHandle | undefined;
|
||||
if (!candidate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return typeof candidate.kind === 'string' && typeof candidate.queryPermission === 'function' && typeof candidate.requestPermission === 'function';
|
||||
}
|
||||
|
||||
export function isFileSystemFileHandle(handle: FileSystemHandle): handle is FileSystemFileHandle {
|
||||
return handle.kind === 'file';
|
||||
}
|
||||
|
|
|
@ -598,7 +598,7 @@ export class LifecycleMainService extends Disposable implements ILifecycleMainSe
|
|||
async kill(code?: number): Promise<void> {
|
||||
this.logService.trace('Lifecycle#kill()');
|
||||
|
||||
// Give main process participants a chance to oderly shutdown
|
||||
// Give main process participants a chance to orderly shutdown
|
||||
await this.fireOnWillShutdown();
|
||||
|
||||
// From extension tests we have seen issues where calling app.exit()
|
||||
|
|
|
@ -459,12 +459,12 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
|||
const windowInitializationState: IWorkbenchLayoutWindowInitializationState = {
|
||||
editor: {
|
||||
restoreEditors: this.shouldRestoreEditors(this.contextService, initialFilesToOpen),
|
||||
editorsToOpen: this.resolveEditorsToOpen(fileService, this.contextService, initialFilesToOpen),
|
||||
editorsToOpen: this.resolveEditorsToOpen(fileService, initialFilesToOpen)
|
||||
},
|
||||
views: {
|
||||
defaults: this.getDefaultLayoutViews(this.environmentService, this.storageService),
|
||||
containerToRestore: {}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
// Window Runtime State
|
||||
|
@ -567,7 +567,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
|||
return this.windowState.initialization.editor.restoreEditors;
|
||||
}
|
||||
|
||||
private resolveEditorsToOpen(fileService: IFileService, contextService: IWorkspaceContextService, initialFilesToOpen: IInitialFilesToOpen | undefined): Promise<IUntypedEditorInput[]> | IUntypedEditorInput[] {
|
||||
private resolveEditorsToOpen(fileService: IFileService, initialFilesToOpen: IInitialFilesToOpen | undefined): Promise<IUntypedEditorInput[]> | IUntypedEditorInput[] {
|
||||
|
||||
// Files to open, diff or create
|
||||
if (initialFilesToOpen) {
|
||||
|
|
|
@ -225,6 +225,9 @@ export class DesktopMain extends Disposable {
|
|||
const diskFileSystemProvider = this._register(new DiskFileSystemProvider(mainProcessService, sharedProcessWorkerWorkbenchService, logService));
|
||||
fileService.registerProvider(Schemas.file, diskFileSystemProvider);
|
||||
|
||||
// Remote Files
|
||||
this._register(RemoteFileSystemProviderClient.register(remoteAgentService, fileService, logService));
|
||||
|
||||
// User Data Provider
|
||||
fileService.registerProvider(Schemas.userData, this._register(new FileUserDataProvider(Schemas.file, diskFileSystemProvider, Schemas.userData, logService)));
|
||||
|
||||
|
@ -246,9 +249,6 @@ export class DesktopMain extends Disposable {
|
|||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
||||
// Remote file system
|
||||
this._register(RemoteFileSystemProviderClient.register(remoteAgentService, fileService, logService));
|
||||
|
||||
const payload = this.resolveWorkspaceInitializationPayload(environmentService);
|
||||
|
||||
const [configurationService, storageService] = await Promise.all([
|
||||
|
|
Loading…
Reference in a new issue