Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)

This commit is contained in:
Anthony Dresser
2019-08-12 21:31:51 -07:00
committed by GitHub
parent 00250839fc
commit 7eba8c4c03
616 changed files with 9472 additions and 7087 deletions

View File

@@ -24,9 +24,6 @@
<body aria-label="">
</body>
<!-- Application insights telemetry library -->
<script src="https://az416426.vo.msecnd.net/scripts/a/ai.0.js"></script>
<!-- Require our AMD loader -->
<script src="./out/vs/loader.js"></script>

View File

@@ -16,6 +16,7 @@
'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
'semver-umd': `${window.location.origin}/node_modules/semver-umd/lib/semver-umd.js`,
'@microsoft/applicationinsights-web': `${window.location.origin}/node_modules/@microsoft/applicationinsights-web/dist/applicationinsights-web.js`,
}
});
@@ -24,4 +25,4 @@
api.create(document.body, options);
});
})();
})();

View File

@@ -64,9 +64,9 @@ export function startup(configuration: IssueReporterConfiguration) {
}
export class IssueReporter extends Disposable {
private environmentService: IEnvironmentService;
private telemetryService: ITelemetryService;
private logService: ILogService;
private environmentService!: IEnvironmentService;
private telemetryService!: ITelemetryService;
private logService!: ILogService;
private readonly issueReporterModel: IssueReporterModel;
private numberOfSearchResultsDisplayed = 0;
private receivedSystemInfo = false;
@@ -74,7 +74,7 @@ export class IssueReporter extends Disposable {
private shouldQueueSearch = false;
private hasBeenSubmitted = false;
private readonly previewButton: Button;
private readonly previewButton!: Button;
constructor(configuration: IssueReporterConfiguration) {
super();

View File

@@ -77,7 +77,7 @@ const eventPrefix = 'monacoworkbench';
class MainProcessService implements IMainProcessService {
constructor(private server: Server, private mainRouter: StaticRouter) { }
_serviceBrand: ServiceIdentifier<any>;
_serviceBrand!: ServiceIdentifier<any>;
getChannel(channelName: string): IChannel {
return this.server.getChannel(channelName, this.mainRouter);

View File

@@ -16,9 +16,9 @@ process['lazyEnv'] = getLazyEnv();
// Load workbench main
bootstrapWindow.load([
'vs/workbench/workbench.main',
'vs/nls!vs/workbench/workbench.main',
'vs/css!vs/workbench/workbench.main'
'vs/workbench/workbench.desktop.main',
'vs/nls!vs/workbench/workbench.desktop.main',
'vs/css!vs/workbench/workbench.desktop.main'
],
function (workbench, configuration) {
perf.mark('didLoadWorkbenchMain');

View File

@@ -18,7 +18,7 @@ export class SharedProcess implements ISharedProcess {
private barrier = new Barrier();
private window: Electron.BrowserWindow | null;
private window: Electron.BrowserWindow | null = null;
constructor(
private readonly machineId: string,

View File

@@ -360,17 +360,6 @@ export class CodeWindow extends Disposable implements ICodeWindow {
this.pendingLoadConfig = undefined;
}
// To prevent flashing, we set the window visible after the page has finished to load but before Code is loaded
if (this._win && !this._win.isVisible()) {
if (this.windowState.mode === WindowMode.Maximized) {
this._win.maximize();
}
if (!this._win.isVisible()) { // maximize also makes visible
this._win.show();
}
}
});
// Window Focus
@@ -838,17 +827,16 @@ export class CodeWindow extends Disposable implements ICodeWindow {
}
private useNativeFullScreen(): boolean {
return true; // TODO@ben enable simple fullscreen again (https://github.com/microsoft/vscode/issues/75054)
// const windowConfig = this.configurationService.getValue<IWindowSettings>('window');
// if (!windowConfig || typeof windowConfig.nativeFullScreen !== 'boolean') {
// return true; // default
// }
const windowConfig = this.configurationService.getValue<IWindowSettings>('window');
if (!windowConfig || typeof windowConfig.nativeFullScreen !== 'boolean') {
return true; // default
}
// if (windowConfig.nativeTabs) {
// return true; // https://github.com/electron/electron/issues/16142
// }
if (windowConfig.nativeTabs) {
return true; // https://github.com/electron/electron/issues/16142
}
// return windowConfig.nativeFullScreen !== false;
return windowConfig.nativeFullScreen !== false;
}
isMinimized(): boolean {

View File

@@ -1149,9 +1149,10 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
}
}
// Linux/Windows: by default we open files in the new window unless triggered via DIALOG or MENU context
// Linux/Windows: by default we open files in the new window unless triggered via DIALOG / MENU context
// or from the integrated terminal where we assume the user prefers to open in the current window
else {
if (openConfig.context !== OpenContext.DIALOG && openConfig.context !== OpenContext.MENU) {
if (openConfig.context !== OpenContext.DIALOG && openConfig.context !== OpenContext.MENU && !(openConfig.userEnv && openConfig.userEnv['TERM_PROGRAM'] === 'vscode')) {
openFilesInNewWindow = true;
}
}
@@ -1255,10 +1256,9 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
openConfig.cli['file-uri'] = fileUris;
// if there are no files or folders cli args left, use the "remote" cli argument
if (!cliArgs.length && !folderUris.length && !fileUris.length) {
if (authority) {
openConfig.cli.remote = authority;
}
const noFilesOrFolders = !cliArgs.length && !folderUris.length && !fileUris.length;
if (noFilesOrFolders && authority) {
openConfig.cli.remote = authority;
}
// Open it
@@ -1266,7 +1266,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
context: openConfig.context,
cli: openConfig.cli,
forceNewWindow: true,
forceEmpty: !cliArgs.length && !folderUris.length && !fileUris.length,
forceEmpty: noFilesOrFolders,
userEnv: openConfig.userEnv,
noRecentEntry: true,
waitMarkerFileURI: openConfig.waitMarkerFileURI
@@ -2116,4 +2116,4 @@ function resourceFromURIToOpen(u: IURIToOpen): URI {
}
return u.fileUri;
}
}

View File

@@ -7,22 +7,33 @@ import * as assert from 'assert';
import { isWindows } from 'vs/base/common/platform';
suite('Windows Native Helpers', () => {
test('windows-mutex', async () => {
if (!isWindows) {
return;
}
if (!isWindows) {
return;
}
test('windows-mutex', async () => {
const mutex = await import('windows-mutex');
assert.ok(mutex, 'Unable to load windows-mutex dependency.');
assert.ok(mutex && typeof mutex.isActive === 'function', 'Unable to load windows-mutex dependency.');
assert.ok(typeof mutex.isActive === 'function', 'Unable to load windows-mutex dependency.');
});
test('windows-foreground-love', async () => {
if (!isWindows) {
return;
}
const foregroundLove = await import('windows-foreground-love');
assert.ok(foregroundLove, 'Unable to load windows-foreground-love dependency.');
assert.ok(foregroundLove && typeof foregroundLove.allowSetForegroundWindow === 'function', 'Unable to load windows-foreground-love dependency.');
});
});
test('windows-process-tree', async () => {
const processTree = await import('windows-process-tree');
assert.ok(processTree && typeof processTree.getProcessTree === 'function', 'Unable to load windows-process-tree dependency.');
});
test('vscode-windows-ca-certs', async () => {
const windowsCerts = await import('vscode-windows-ca-certs');
assert.ok(windowsCerts, 'Unable to load vscode-windows-ca-certs dependency.');
});
test('vscode-windows-registry', async () => {
const windowsRegistry = await import('vscode-windows-registry');
assert.ok(windowsRegistry && typeof windowsRegistry.GetStringRegKey === 'function', 'Unable to load vscode-windows-registry dependency.');
});
});