mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 17:23:45 -05:00
Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)
* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 * fix config changes * fix strictnull checks
This commit is contained in:
@@ -94,7 +94,7 @@ export interface IDevToolsOptions {
|
||||
|
||||
export interface IWindowsService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
readonly onWindowOpen: Event<number>;
|
||||
readonly onWindowFocus: Event<number>;
|
||||
@@ -221,7 +221,7 @@ export function isFileToOpen(uriToOpen: IURIToOpen): uriToOpen is IFileToOpen {
|
||||
|
||||
export interface IWindowService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
readonly onDidChangeFocus: Event<boolean>;
|
||||
readonly onDidChangeMaximize: Event<boolean>;
|
||||
|
||||
@@ -13,11 +13,10 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class WindowsService implements IWindowsService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private channel: IChannel;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ export interface IWindowsCountChangedEvent {
|
||||
}
|
||||
|
||||
export interface IWindowsMainService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
// events
|
||||
readonly onWindowReady: Event<ICodeWindow>;
|
||||
@@ -96,7 +96,7 @@ export interface IWindowsMainService {
|
||||
enterWorkspace(win: ICodeWindow, path: URI): Promise<IEnterWorkspaceResult | undefined>;
|
||||
closeWorkspace(win: ICodeWindow): void;
|
||||
open(openConfig: IOpenConfiguration): ICodeWindow[];
|
||||
openExtensionDevelopmentHostWindow(extensionDevelopmentPath: string | string[], openConfig: IOpenConfiguration): void;
|
||||
openExtensionDevelopmentHostWindow(extensionDevelopmentPath: string[], openConfig: IOpenConfiguration): void;
|
||||
pickFileFolderAndOpen(options: INativeOpenDialogOptions): Promise<void>;
|
||||
pickFolderAndOpen(options: INativeOpenDialogOptions): Promise<void>;
|
||||
pickFileAndOpen(options: INativeOpenDialogOptions): Promise<void>;
|
||||
@@ -140,4 +140,4 @@ export interface IOpenConfiguration {
|
||||
export interface ISharedProcess {
|
||||
whenReady(): Promise<void>;
|
||||
toggle(): void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,11 +23,10 @@ import { Schemas } from 'vs/base/common/network';
|
||||
import { mnemonicButtonLabel } from 'vs/base/common/labels';
|
||||
import { isMacintosh, isLinux, IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class WindowsService extends Disposable implements IWindowsService, IURLHandler {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly disposables = this._register(new DisposableStore());
|
||||
|
||||
@@ -310,8 +309,9 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
||||
async openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void> {
|
||||
this.logService.trace('windowsService#openExtensionDevelopmentHostWindow ' + JSON.stringify(args));
|
||||
|
||||
if (args.extensionDevelopmentPath) {
|
||||
this.windowsMainService.openExtensionDevelopmentHostWindow(args.extensionDevelopmentPath, {
|
||||
const extDevPaths = args.extensionDevelopmentPath;
|
||||
if (extDevPaths) {
|
||||
this.windowsMainService.openExtensionDevelopmentHostWindow(extDevPaths, {
|
||||
context: OpenContext.API,
|
||||
cli: args,
|
||||
userEnv: Object.keys(env).length > 0 ? env : undefined
|
||||
@@ -323,9 +323,14 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
||||
this.logService.trace('windowsService#getWindows');
|
||||
|
||||
const windows = this.windowsMainService.getWindows();
|
||||
const result = windows.map(w => ({ id: w.id, workspace: w.openedWorkspace, folderUri: w.openedFolderUri, title: w.win.getTitle(), filename: w.getRepresentedFilename() }));
|
||||
|
||||
return result;
|
||||
return windows.map(window => ({
|
||||
id: window.id,
|
||||
workspace: window.openedWorkspace,
|
||||
folderUri: window.openedFolderUri,
|
||||
title: window.win.getTitle(),
|
||||
filename: window.getRepresentedFilename()
|
||||
}));
|
||||
}
|
||||
|
||||
async getWindowCount(): Promise<number> {
|
||||
|
||||
Reference in New Issue
Block a user