mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 18:46:36 -05:00
VSCode merge (#4610)
* Merge from vscode e388c734f30757875976c7e326d6cfeee77710de * fix yarn lcoks * remove small issue
This commit is contained in:
@@ -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);
|
||||
})();
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user