VSCode merge (#4610)

* Merge from vscode e388c734f30757875976c7e326d6cfeee77710de

* fix yarn lcoks

* remove small issue
This commit is contained in:
Anthony Dresser
2019-03-20 10:39:09 -07:00
committed by GitHub
parent 87765e8673
commit c814b92557
310 changed files with 6606 additions and 2129 deletions

View File

@@ -25,6 +25,9 @@ import { SupportsWorkspacesContext, IsMacContext, HasMacNativeTabsContext, IsDev
import { NoEditorsVisibleContext, SingleEditorGroupsContext } from 'vs/workbench/common/editor';
import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows';
import { LogStorageAction } from 'vs/platform/storage/node/storageService';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { DiskFileSystemSupport } from 'vs/workbench/services/files2/node/diskFileSystemSupport';
// {{SQL CARBON EDIT}}
import { InstallVSIXAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
@@ -703,3 +706,10 @@ import { InstallVSIXAction } from 'vs/workbench/contrib/extensions/electron-brow
}
});
})();
// Disk File System
(function registerFileSystem(): void {
const registry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
registry.registerWorkbenchContribution(DiskFileSystemSupport, LifecyclePhase.Starting);
})();

View File

@@ -78,7 +78,8 @@ class CodeRendererMain extends Disposable {
this.configuration.workspace = reviveWorkspaceIdentifier(this.configuration.workspace);
}
const filesToWaitPaths = this.configuration.filesToWait && this.configuration.filesToWait.paths;
const filesToWait = this.configuration.filesToWait;
const filesToWaitPaths = filesToWait && filesToWait.paths;
[filesToWaitPaths, this.configuration.filesToOpen, this.configuration.filesToCreate, this.configuration.filesToDiff].forEach(paths => {
if (Array.isArray(paths)) {
paths.forEach(path => {
@@ -88,6 +89,9 @@ class CodeRendererMain extends Disposable {
});
}
});
if (filesToWait) {
filesToWait.waitMarkerFileUri = uri.revive(filesToWait.waitMarkerFileUri);
}
}
open(): Promise<void> {

View File

@@ -229,7 +229,7 @@ export class ElectronWindow extends Disposable {
const filesToWait = this.windowService.getConfiguration().filesToWait;
if (filesToWait) {
const resourcesToWaitFor = coalesce(filesToWait.paths.map(p => p.fileUri));
const waitMarkerFile = URI.file(filesToWait.waitMarkerFilePath);
const waitMarkerFile = filesToWait.waitMarkerFileUri;
const listenerDispose = this.editorService.onDidCloseEditor(() => this.onEditorClosed(listenerDispose, resourcesToWaitFor, waitMarkerFile));
this._register(listenerDispose);
@@ -493,7 +493,7 @@ export class ElectronWindow extends Disposable {
// are closed that the user wants to wait for. When this happens we delete
// the wait marker file to signal to the outside that editing is done.
const resourcesToWaitFor = request.filesToWait.paths.map(p => URI.revive(p.fileUri));
const waitMarkerFile = URI.file(request.filesToWait.waitMarkerFilePath);
const waitMarkerFile = URI.revive(request.filesToWait.waitMarkerFileUri);
const unbind = this.editorService.onDidCloseEditor(() => {
if (resourcesToWaitFor.every(resource => !this.editorService.isOpen({ resource }))) {
unbind.dispose();