mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 18:46:36 -05:00
Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 (#12295)
* Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 * Fix test build break * Update distro * Fix build errors * Update distro * Update REH build file * Update build task names for REL * Fix product build yaml * Fix product REH task name * Fix type in task name * Update linux build step * Update windows build tasks * Turn off server publish * Disable REH * Fix typo * Bump distro * Update vscode tests * Bump distro * Fix type in disto * Bump distro * Turn off docker build * Remove docker step from release Co-authored-by: ADS Merger <andresse@microsoft.com> Co-authored-by: Karl Burtram <karlb@microsoft.com>
This commit is contained in:
@@ -3,11 +3,15 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { isMacintosh, isLinux, isWeb } from 'vs/base/common/platform';
|
||||
import { isMacintosh, isLinux, isWeb, IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
|
||||
import { LogLevel } from 'vs/platform/log/common/log';
|
||||
import { ExportData } from 'vs/base/common/performance';
|
||||
import { ColorScheme } from 'vs/platform/theme/common/theme';
|
||||
|
||||
export interface IBaseOpenWindowsOptions {
|
||||
forceReuseWindow?: boolean;
|
||||
@@ -208,13 +212,41 @@ export interface IWindowConfiguration {
|
||||
|
||||
remoteAuthority?: string;
|
||||
|
||||
highContrast?: boolean;
|
||||
colorScheme: ColorScheme;
|
||||
autoDetectHighContrast?: boolean;
|
||||
|
||||
filesToOpenOrCreate?: IPath[];
|
||||
filesToDiff?: IPath[];
|
||||
}
|
||||
|
||||
export interface INativeWindowConfiguration extends IWindowConfiguration, NativeParsedArgs {
|
||||
mainPid: number;
|
||||
|
||||
windowId: number;
|
||||
machineId: string;
|
||||
|
||||
appRoot: string;
|
||||
execPath: string;
|
||||
backupPath?: string;
|
||||
|
||||
nodeCachedDataDir?: string;
|
||||
partsSplashPath: string;
|
||||
|
||||
workspace?: IWorkspaceIdentifier;
|
||||
folderUri?: ISingleFolderWorkspaceIdentifier;
|
||||
|
||||
isInitialStartup?: boolean;
|
||||
logLevel: LogLevel;
|
||||
zoomLevel?: number;
|
||||
fullscreen?: boolean;
|
||||
maximized?: boolean;
|
||||
accessibilitySupport?: boolean;
|
||||
perfEntries: ExportData;
|
||||
|
||||
userEnv: IProcessEnvironment;
|
||||
filesToWait?: IPathsToWaitFor;
|
||||
}
|
||||
|
||||
/**
|
||||
* According to Electron docs: `scale := 1.2 ^ level`.
|
||||
* https://github.com/electron/electron/blob/master/docs/api/web-contents.md#contentssetzoomlevellevel
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IWindowOpenable, IOpenEmptyWindowOptions } from 'vs/platform/windows/common/windows';
|
||||
import { INativeWindowConfiguration, OpenContext } from 'vs/platform/windows/node/window';
|
||||
import { ParsedArgs } from 'vs/platform/environment/node/argv';
|
||||
import { IWindowOpenable, IOpenEmptyWindowOptions, INativeWindowConfiguration } from 'vs/platform/windows/common/windows';
|
||||
import { OpenContext } from 'vs/platform/windows/node/window';
|
||||
import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
@@ -59,7 +59,7 @@ export interface ICodeWindow extends IDisposable {
|
||||
addTabbedWindow(window: ICodeWindow): void;
|
||||
|
||||
load(config: INativeWindowConfiguration, isReload?: boolean): void;
|
||||
reload(configuration?: INativeWindowConfiguration, cli?: ParsedArgs): void;
|
||||
reload(configuration?: INativeWindowConfiguration, cli?: NativeParsedArgs): void;
|
||||
|
||||
focus(options?: { force: boolean }): void;
|
||||
close(): void;
|
||||
@@ -121,7 +121,7 @@ export interface IBaseOpenConfiguration {
|
||||
}
|
||||
|
||||
export interface IOpenConfiguration extends IBaseOpenConfiguration {
|
||||
readonly cli: ParsedArgs;
|
||||
readonly cli: NativeParsedArgs;
|
||||
readonly userEnv?: IProcessEnvironment;
|
||||
readonly urisToOpen?: IWindowOpenable[];
|
||||
readonly waitMarkerFileURI?: URI;
|
||||
|
||||
@@ -10,17 +10,16 @@ import * as arrays from 'vs/base/common/arrays';
|
||||
import { mixin } from 'vs/base/common/objects';
|
||||
import { IBackupMainService } from 'vs/platform/backup/electron-main/backup';
|
||||
import { IEmptyWindowBackupInfo } from 'vs/platform/backup/node/backup';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { ParsedArgs } from 'vs/platform/environment/node/argv';
|
||||
import { INativeEnvironmentService } from 'vs/platform/environment/node/environmentService';
|
||||
import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
|
||||
import { IStateService } from 'vs/platform/state/node/state';
|
||||
import { CodeWindow, defaultWindowState } from 'vs/code/electron-main/window';
|
||||
import { screen, BrowserWindow, MessageBoxOptions, Display, app, nativeTheme } from 'electron';
|
||||
import { screen, BrowserWindow, MessageBoxOptions, Display, app } from 'electron';
|
||||
import { ILifecycleMainService, UnloadReason, LifecycleMainService, LifecycleMainPhase } from 'vs/platform/lifecycle/electron-main/lifecycleMainService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWindowSettings, IPath, isFileToOpen, isWorkspaceToOpen, isFolderToOpen, IWindowOpenable, IOpenEmptyWindowOptions, IAddFoldersRequest, IPathsToWaitFor } from 'vs/platform/windows/common/windows';
|
||||
import { getLastActiveWindow, findBestWindowOrFolderForFile, findWindowOnWorkspace, findWindowOnExtensionDevelopmentPath, findWindowOnWorkspaceOrFolderUri, INativeWindowConfiguration, OpenContext } from 'vs/platform/windows/node/window';
|
||||
import { IWindowSettings, IPath, isFileToOpen, isWorkspaceToOpen, isFolderToOpen, IWindowOpenable, IOpenEmptyWindowOptions, IAddFoldersRequest, IPathsToWaitFor, INativeWindowConfiguration } from 'vs/platform/windows/common/windows';
|
||||
import { getLastActiveWindow, findBestWindowOrFolderForFile, findWindowOnWorkspace, findWindowOnExtensionDevelopmentPath, findWindowOnWorkspaceOrFolderUri, OpenContext } from 'vs/platform/windows/node/window';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { IWindowsMainService, IOpenConfiguration, IWindowsCountChangedEvent, ICodeWindow, IWindowState as ISingleWindowState, WindowMode, IOpenEmptyConfiguration } from 'vs/platform/windows/electron-main/windows';
|
||||
@@ -64,7 +63,7 @@ type RestoreWindowsSetting = 'all' | 'folders' | 'one' | 'none';
|
||||
|
||||
interface IOpenBrowserWindowOptions {
|
||||
userEnv?: IProcessEnvironment;
|
||||
cli?: ParsedArgs;
|
||||
cli?: NativeParsedArgs;
|
||||
|
||||
workspace?: IWorkspaceIdentifier;
|
||||
folderUri?: URI;
|
||||
@@ -210,17 +209,6 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic
|
||||
|
||||
private registerListeners(): void {
|
||||
|
||||
// React to HC color scheme changes (Windows, macOS)
|
||||
if (isWindows || isMacintosh) {
|
||||
nativeTheme.on('updated', () => {
|
||||
if (nativeTheme.shouldUseInvertedColorScheme || nativeTheme.shouldUseHighContrastColors) {
|
||||
this.sendToAll('vscode:enterHighContrast');
|
||||
} else {
|
||||
this.sendToAll('vscode:leaveHighContrast');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// When a window looses focus, save all windows state. This allows to
|
||||
// prevent loss of window-state data when OS is restarted without properly
|
||||
// shutting down the application (https://github.com/microsoft/vscode/issues/87171)
|
||||
@@ -899,7 +887,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic
|
||||
return pathsToOpen;
|
||||
}
|
||||
|
||||
private doExtractPathsFromCLI(cli: ParsedArgs): IPath[] {
|
||||
private doExtractPathsFromCLI(cli: NativeParsedArgs): IPath[] {
|
||||
const pathsToOpen: IPathToOpen[] = [];
|
||||
const parseOptions: IPathParseOptions = { ignoreFileNotFound: true, gotoLineMode: cli.goto, remoteAuthority: cli.remote || undefined };
|
||||
|
||||
@@ -1370,7 +1358,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic
|
||||
// For all other cases we first call into registerEmptyWindowBackupSync() to set it before
|
||||
// loading the window.
|
||||
if (options.emptyWindowBackupInfo) {
|
||||
configuration.backupPath = join(this.environmentService.backupHome.fsPath, options.emptyWindowBackupInfo.backupFolder);
|
||||
configuration.backupPath = join(this.environmentService.backupHome, options.emptyWindowBackupInfo.backupFolder);
|
||||
}
|
||||
|
||||
let window: ICodeWindow | undefined;
|
||||
|
||||
@@ -3,15 +3,11 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IWindowConfiguration, IPathsToWaitFor } from 'vs/platform/windows/common/windows';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import * as extpath from 'vs/base/common/extpath';
|
||||
import { IWorkspaceIdentifier, IResolvedWorkspace, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier, isWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { extUriBiasedIgnorePathCase } from 'vs/base/common/resources';
|
||||
import { LogLevel } from 'vs/platform/log/common/log';
|
||||
import { ExportData } from 'vs/base/common/performance';
|
||||
import { ParsedArgs } from 'vs/platform/environment/node/argv';
|
||||
|
||||
export const enum OpenContext {
|
||||
|
||||
@@ -34,34 +30,6 @@ export const enum OpenContext {
|
||||
API
|
||||
}
|
||||
|
||||
export interface INativeWindowConfiguration extends IWindowConfiguration, ParsedArgs {
|
||||
mainPid: number;
|
||||
|
||||
windowId: number;
|
||||
machineId: string;
|
||||
|
||||
appRoot: string;
|
||||
execPath: string;
|
||||
backupPath?: string;
|
||||
|
||||
nodeCachedDataDir?: string;
|
||||
partsSplashPath: string;
|
||||
|
||||
workspace?: IWorkspaceIdentifier;
|
||||
folderUri?: ISingleFolderWorkspaceIdentifier;
|
||||
|
||||
isInitialStartup?: boolean;
|
||||
logLevel: LogLevel;
|
||||
zoomLevel?: number;
|
||||
fullscreen?: boolean;
|
||||
maximized?: boolean;
|
||||
accessibilitySupport?: boolean;
|
||||
perfEntries: ExportData;
|
||||
|
||||
userEnv: platform.IProcessEnvironment;
|
||||
filesToWait?: IPathsToWaitFor;
|
||||
}
|
||||
|
||||
export interface IWindowContext {
|
||||
openedWorkspace?: IWorkspaceIdentifier;
|
||||
openedFolderUri?: URI;
|
||||
@@ -75,7 +43,6 @@ export interface IBestWindowOrFolderOptions<W extends IWindowContext> {
|
||||
newWindow: boolean;
|
||||
context: OpenContext;
|
||||
fileUri?: URI;
|
||||
userHome?: string;
|
||||
codeSettingsFolder?: string;
|
||||
localWorkspaceResolver: (workspace: IWorkspaceIdentifier) => IResolvedWorkspace | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user