From e4ff7238951f3c424c6caa06d4c23a9310063f4e Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 13 Mar 2019 13:59:51 -0500 Subject: [PATCH] Fix race with watcher & stat There is a window between when the stat is made and the result makes it back to the client where a file is created or deleted and it won't be a part of that stat. To fix it, I added a new property signaling that we got some changes since starting the stat and should run the stat again because we have no way of knowing whether the currently running stat will include the new changes or not. --- scripts/vscode.patch | 183 ++++++++++++++++++++++++------------------- 1 file changed, 101 insertions(+), 82 deletions(-) diff --git a/scripts/vscode.patch b/scripts/vscode.patch index 904166c8..69837676 100644 --- a/scripts/vscode.patch +++ b/scripts/vscode.patch @@ -1,5 +1,5 @@ diff --git a/src/vs/base/browser/browser.ts b/src/vs/base/browser/browser.ts -index c09210608f..66f1934539 100644 +index c092106..66f1934 100644 --- a/src/vs/base/browser/browser.ts +++ b/src/vs/base/browser/browser.ts @@ -125,0 +126,4 @@ export const isEdgeWebView = isEdge && (userAgent.indexOf('WebView/') >= 0); @@ -8,7 +8,7 @@ index c09210608f..66f1934539 100644 +export const isLinux = userAgent.indexOf("Linux") >= 0; + diff --git a/src/vs/base/browser/keyboardEvent.ts b/src/vs/base/browser/keyboardEvent.ts -index 03bdffc95e..d72c1681ef 100644 +index 03bdffc..d72c168 100644 --- a/src/vs/base/browser/keyboardEvent.ts +++ b/src/vs/base/browser/keyboardEvent.ts @@ -154 +154 @@ let INVERSE_KEY_CODE_MAP: KeyCode[] = new Array(KeyCode.MAX_VALUE); @@ -24,14 +24,14 @@ index 03bdffc95e..d72c1681ef 100644 -const metaKeyMod = (platform.isMacintosh ? KeyMod.CtrlCmd : KeyMod.WinCtrl); +const metaKeyMod = (browser.isMacintosh ? KeyMod.CtrlCmd : KeyMod.WinCtrl); diff --git a/src/vs/base/browser/ui/aria/aria.ts b/src/vs/base/browser/ui/aria/aria.ts -index 1922450144..9900776aa2 100644 +index 1922450..9900776 100644 --- a/src/vs/base/browser/ui/aria/aria.ts +++ b/src/vs/base/browser/ui/aria/aria.ts @@ -8 +8 @@ import * as nls from 'vs/nls'; -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts -index cd7312809c..b1246de1ee 100644 +index cd73128..b1246de 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -13 +13 @@ import * as DOM from 'vs/base/browser/dom'; @@ -47,7 +47,7 @@ index cd7312809c..b1246de1ee 100644 - return platform.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey; + return browser.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey; diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts -index 47da5e4277..fbf7e22aed 100644 +index 47da5e4..fbf7e22 100644 --- a/src/vs/base/browser/ui/menu/menu.ts +++ b/src/vs/base/browser/ui/menu/menu.ts @@ -23,2 +23,3 @@ import { isLinux } from 'vs/base/common/platform'; @@ -57,14 +57,14 @@ index 47da5e4277..fbf7e22aed 100644 +export const MENU_MNEMONIC_REGEX: RegExp = /&([^\s&])/; ///\(&([^\s&])\)|(?(logService: ILogService, modulePath: string, acti - r = require.__$__nodeRequire(modulePath); + r = (global as any).nativeNodeRequire(modulePath); diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts -index 5897ab9e71..57b926e9ee 100644 +index 5897ab9..57b926e 100644 --- a/src/vs/workbench/browser/dnd.ts +++ b/src/vs/workbench/browser/dnd.ts @@ -168 +168 @@ export class ResourcesDropHandler { - return; + return (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.handleDrop(event, resolveTargetGroup, afterDrop, targetIndex); diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts -index 819bb31534..de691330df 100644 +index 819bb31..de69133 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -15 +15 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -367,21 +367,21 @@ index 819bb31534..de691330df 100644 -const TITLE_BAR_HEIGHT = isMacintosh ? 22 : 30; +const TITLE_BAR_HEIGHT = isNative && isMacintosh ? 22 : 30; diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts -index 5c1e6ef0f8..dd795924d8 100644 +index 5c1e6ef..dd79592 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -48 +48 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts -index 52272c0d2f..77d447dbc7 100644 +index 52272c0..77d447d 100644 --- a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts +++ b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts @@ -14 +14 @@ import { IEditorIdentifier, EditorInput, EditorOptions } from 'vs/workbench/comm -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/browser/parts/editor/resourceViewer.ts b/src/vs/workbench/browser/parts/editor/resourceViewer.ts -index 73446c7b5c..90330a25a4 100644 +index 73446c7..90330a2 100644 --- a/src/vs/workbench/browser/parts/editor/resourceViewer.ts +++ b/src/vs/workbench/browser/parts/editor/resourceViewer.ts @@ -23 +23 @@ import { memoize } from 'vs/base/common/decorators'; @@ -400,14 +400,14 @@ index 73446c7b5c..90330a25a4 100644 - const isScrollWhellKeyPressed = platform.isMacintosh ? altPressed : ctrlPressed; + const isScrollWhellKeyPressed = browser.isMacintosh ? altPressed : ctrlPressed; diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts -index e2bfb8d2cd..3f6ae265f2 100644 +index e2bfb8d..3f6ae26 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -7 +7 @@ import 'vs/css!./media/tabstitlecontrol'; -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts -index 74782740c7..aa55946135 100644 +index 7478274..aa55946 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts @@ -24 +24 @@ import { range } from 'vs/base/common/arrays'; @@ -417,13 +417,13 @@ index 74782740c7..aa55946135 100644 - if (platform.isMacintosh ? e.metaKey : e.ctrlKey) { + if (browser.isMacintosh ? e.metaKey : e.ctrlKey) { diff --git a/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css b/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css -index a215bde753..df7562b177 100644 +index a215bde..df7562b 100644 --- a/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css +++ b/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css @@ -44,0 +45 @@ +.web > .monaco-workbench .part.titlebar, diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts -index 254ae28877..4f2e21768b 100644 +index 254ae28..4f2e217 100644 --- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts +++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts @@ -16 +16,2 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; @@ -449,7 +449,7 @@ index 254ae28877..4f2e21768b 100644 - if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') { + if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') { diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts -index 3ab509fad9..5c76d17e39 100644 +index 3ab509f..5c76d17 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -25 +25,2 @@ import { TITLE_BAR_ACTIVE_BACKGROUND, TITLE_BAR_ACTIVE_FOREGROUND, TITLE_BAR_INA @@ -469,21 +469,21 @@ index 3ab509fad9..5c76d17e39 100644 - if (isMacintosh || this.configurationService.getValue('window.menuBarVisibility') === 'hidden') { + if ((isNative && isMacintosh) || this.configurationService.getValue('window.menuBarVisibility') === 'hidden') { diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts -index 1eb763e002..ad509f8b47 100644 +index 1eb763e..ad509f8 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -9 +9 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions, Configur -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/common/contextkeys.ts b/src/vs/workbench/common/contextkeys.ts -index a0921a04c8..ed5ba1ef33 100644 +index a0921a0..ed5ba1e 100644 --- a/src/vs/workbench/common/contextkeys.ts +++ b/src/vs/workbench/common/contextkeys.ts @@ -7 +7 @@ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { isMacintosh, isLinux, isWindows } from 'vs/base/common/platform'; +import { isMacintosh, isLinux, isWindows } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts b/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts -index 787c9ef03f..bd50c14467 100644 +index 787c9ef..bd50c14 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts @@ -15 +15 @@ import { Disposable } from 'vs/base/common/lifecycle'; @@ -496,14 +496,14 @@ index 787c9ef03f..bd50c14467 100644 - platform.isMacintosh + browser.isMacintosh diff --git a/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts b/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts -index 1d338f165b..4f1373689b 100644 +index 1d338f1..4f13736 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts @@ -14 +14 @@ import { mixin } from 'vs/base/common/objects'; -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts -index 5e1b6da216..f8643d2e18 100644 +index 5e1b6da..f8643d2 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts @@ -8 +8 @@ import { Action } from 'vs/base/common/actions'; @@ -513,14 +513,14 @@ index 5e1b6da216..f8643d2e18 100644 - platform.isMacintosh + browser.isMacintosh diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts b/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts -index 1ece57bc8d..cf9505e42c 100644 +index 1ece57b..cf9505e 100644 --- a/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts +++ b/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts @@ -26 +26 @@ import { KeyCode } from 'vs/base/common/keyCodes'; -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts -index 973dd5a329..6c5485442c 100644 +index 973dd5a..6c54854 100644 --- a/src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts @@ -15 +15 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -530,21 +530,21 @@ index 973dd5a329..6c5485442c 100644 - let keybinding = platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter'; + let keybinding = browser.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter'; diff --git a/src/vs/workbench/contrib/debug/browser/linkDetector.ts b/src/vs/workbench/contrib/debug/browser/linkDetector.ts -index 1b6f41c628..0c9bf681bc 100644 +index 1b6f41c..0c9bf68 100644 --- a/src/vs/workbench/contrib/debug/browser/linkDetector.ts +++ b/src/vs/workbench/contrib/debug/browser/linkDetector.ts @@ -9 +9 @@ import { URI as uri } from 'vs/base/common/uri'; -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts -index fde17ef683..6010faa8f2 100644 +index fde17ef..6010faa 100644 --- a/src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts @@ -45 +45 @@ import { ViewsRegistry } from 'vs/workbench/common/views'; -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts -index 89c131188a..e803b6f185 100644 +index 89c1311..e803b6f 100644 --- a/src/vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts @@ -9,0 +10 @@ import * as env from 'vs/base/common/platform'; @@ -559,7 +559,7 @@ index 89c131188a..e803b6f185 100644 - const stopKey = env.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; + const stopKey = browser.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; diff --git a/src/vs/workbench/contrib/debug/node/debugAdapter.ts b/src/vs/workbench/contrib/debug/node/debugAdapter.ts -index b5f6da93cb..6e6ff4bd7f 100644 +index b5f6da9..6e6ff4b 100644 --- a/src/vs/workbench/contrib/debug/node/debugAdapter.ts +++ b/src/vs/workbench/contrib/debug/node/debugAdapter.ts @@ -315 +315 @@ export class ExecutableDebugAdapter extends StreamDebugAdapter { @@ -569,28 +569,28 @@ index b5f6da93cb..6e6ff4bd7f 100644 - if (!fs.existsSync(this.adapterExecutable.command)) { + if (!(await require("util").promisify(fs.exists)(this.adapterExecutable.command))) { diff --git a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts -index 67c0c41748..956c3a6a2e 100644 +index 67c0c41..956c3a6 100644 --- a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts @@ -118 +118 @@ class Extension implements IExtension { - return `${product.extensionsGallery.itemUrl}?itemName=${this.publisher}.${this.name}`; + return undefined; // `${product.extensionsGallery.itemUrl}?itemName=${this.publisher}.${this.name}`; diff --git a/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts b/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts -index f83842f985..bca184ec2f 100644 +index f83842f..bca184e 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts @@ -17 +17 @@ import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/co -import { isWindows, isMacintosh } from 'vs/base/common/platform'; +import { isWindows, isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/contrib/files/browser/fileCommands.ts b/src/vs/workbench/contrib/files/browser/fileCommands.ts -index 136bbc9d38..6766894918 100644 +index 136bbc9..6766894 100644 --- a/src/vs/workbench/contrib/files/browser/fileCommands.ts +++ b/src/vs/workbench/contrib/files/browser/fileCommands.ts @@ -28 +28 @@ import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; -import { isWindows, isMacintosh } from 'vs/base/common/platform'; +import { isWindows, isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts -index e9446128a1..e63851320b 100644 +index e944612..e638513 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts @@ -38 +38 @@ import { DesktopDragAndDropData, ExternalElementsDragAndDropData, ElementsDragAn @@ -598,8 +598,27 @@ index e9446128a1..e63851320b 100644 +import { isMacintosh, isLinux } from 'vs/base/browser/browser'; @@ -592,0 +593 @@ export class FileDragAndDrop implements ITreeDragAndDrop { + return (require('vs/../../../../packages/vscode/src/workbench') as typeof import('vs/../../../../packages/vscode/src/workbench')).workbench.handleExternalDrop(target, originalEvent); +diff --git a/src/vs/workbench/contrib/files/common/explorerModel.ts b/src/vs/workbench/contrib/files/common/explorerModel.ts +index 4ddf707..5e51b38 100644 +--- a/src/vs/workbench/contrib/files/common/explorerModel.ts ++++ b/src/vs/workbench/contrib/files/common/explorerModel.ts +@@ -77,0 +78 @@ export class ExplorerItem { ++ private forgotChildren: boolean = false; +@@ -252 +253,2 @@ export class ExplorerItem { +- if (!this._isDirectoryResolved) { ++ if (!this._isDirectoryResolved || this.forgotChildren) { ++ this.forgotChildren = false; +@@ -277,0 +280 @@ export class ExplorerItem { ++ this.forgotChildren = true; +diff --git a/src/vs/workbench/contrib/files/common/explorerService.ts b/src/vs/workbench/contrib/files/common/explorerService.ts +index 980c9b1..a692900 100644 +--- a/src/vs/workbench/contrib/files/common/explorerService.ts ++++ b/src/vs/workbench/contrib/files/common/explorerService.ts +@@ -333 +333 @@ export class ExplorerService implements IExplorerService { +- if (shouldRefresh()) { ++ if (true || shouldRefresh()) { diff --git a/src/vs/workbench/contrib/logs/common/logs.contribution.ts b/src/vs/workbench/contrib/logs/common/logs.contribution.ts -index a14a2800ef..af264a8eff 100644 +index a14a280..af264a8 100644 --- a/src/vs/workbench/contrib/logs/common/logs.contribution.ts +++ b/src/vs/workbench/contrib/logs/common/logs.contribution.ts @@ -31 +31,2 @@ class LogOutputChannels extends Disposable implements IWorkbenchContribution { @@ -607,13 +626,13 @@ index a14a2800ef..af264a8eff 100644 + // This channel only seems to be used when loading the app and we skip all of that, so it is never actually created or written to. + // outputChannelRegistry.registerChannel({ id: Constants.mainLogChannelId, label: nls.localize('mainLog', "Main"), file: URI.file(join(environmentService.logsPath, `main.log`)), log: true }); diff --git a/src/vs/workbench/contrib/output/common/outputLinkProvider.ts b/src/vs/workbench/contrib/output/common/outputLinkProvider.ts -index efa955eb5c..e72f41ddaa 100644 +index efa955e..e72f41d 100644 --- a/src/vs/workbench/contrib/output/common/outputLinkProvider.ts +++ b/src/vs/workbench/contrib/output/common/outputLinkProvider.ts @@ -77,0 +78 @@ export class OutputLinkProvider { + return Promise.resolve([]); diff --git a/src/vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts -index 92f9b7cd86..b8300c6c0d 100644 +index 92f9b7c..b8300c6 100644 --- a/src/vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts +++ b/src/vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts @@ -6 +6 @@ @@ -623,7 +642,7 @@ index 92f9b7cd86..b8300c6c0d 100644 - description: env.isMacintosh ? nls.localize('gotoLineDescriptionMac', "Go to Line") : nls.localize('gotoLineDescriptionWin', "Go to Line") + description: browser.isMacintosh ? nls.localize('gotoLineDescriptionMac', "Go to Line") : nls.localize('gotoLineDescriptionWin', "Go to Line") diff --git a/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts -index e3c95526bd..a64fda2c2e 100644 +index e3c9552..a64fda2 100644 --- a/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts +++ b/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts @@ -18 +18,2 @@ import { isEqual } from 'vs/base/common/resources'; @@ -637,7 +656,7 @@ index e3c95526bd..a64fda2c2e 100644 - if (isMacintosh && config.window && typeof config.window.nativeFullScreen === 'boolean' && config.window.nativeFullScreen !== this.nativeFullScreen) { + if (isNative && isMacintosh && config.window && typeof config.window.nativeFullScreen === 'boolean' && config.window.nativeFullScreen !== this.nativeFullScreen) { diff --git a/src/vs/workbench/contrib/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/contrib/scm/electron-browser/scmViewlet.ts -index 077334bb5c..b215ede37e 100644 +index 077334b..b215ede 100644 --- a/src/vs/workbench/contrib/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/contrib/scm/electron-browser/scmViewlet.ts @@ -50 +50 @@ import { IPanelDndController, Panel } from 'vs/base/browser/ui/splitview/panelvi @@ -647,21 +666,21 @@ index 077334bb5c..b215ede37e 100644 - const label = binding ? binding.getLabel() : (platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter'); + const label = binding ? binding.getLabel() : (browser.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter'); diff --git a/src/vs/workbench/contrib/search/browser/search.contribution.ts b/src/vs/workbench/contrib/search/browser/search.contribution.ts -index c60cccd845..257cd319c8 100644 +index c60cccd..257cd31 100644 --- a/src/vs/workbench/contrib/search/browser/search.contribution.ts +++ b/src/vs/workbench/contrib/search/browser/search.contribution.ts @@ -665 +665 @@ configurationRegistry.registerConfiguration({ - included: platform.isMacintosh + included: platform.isNative && platform.isMacintosh diff --git a/src/vs/workbench/contrib/tasks/common/problemMatcher.ts b/src/vs/workbench/contrib/tasks/common/problemMatcher.ts -index 57ece428c2..91bc82a845 100644 +index 57ece42..91bc82a 100644 --- a/src/vs/workbench/contrib/tasks/common/problemMatcher.ts +++ b/src/vs/workbench/contrib/tasks/common/problemMatcher.ts @@ -222 +222 @@ export function createLineMatcher(matcher: ProblemMatcher): ILineMatcher { -const endOfLine: string = Platform.OS === Platform.OperatingSystem.Windows ? '\r\n' : '\n'; +const endOfLine: string = Platform.isWindows ? '\r\n' : '\n'; diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts -index b15ee85b95..4a577b3d02 100644 +index b15ee85..4a577b3 100644 --- a/src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts @@ -12,0 +13 @@ import * as platform from 'vs/base/common/platform'; @@ -670,7 +689,7 @@ index b15ee85b95..4a577b3d02 100644 - default: platform.isMacintosh ? 'selectWord' : platform.isWindows ? 'copyPaste' : 'default', + default: browser.isMacintosh ? 'selectWord' : browser.isWindows ? 'copyPaste' : 'default', diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminalLinkHandler.ts -index 734d13fd45..efba861367 100644 +index 734d13f..efba861 100644 --- a/src/vs/workbench/contrib/terminal/electron-browser/terminalLinkHandler.ts +++ b/src/vs/workbench/contrib/terminal/electron-browser/terminalLinkHandler.ts @@ -7,0 +8 @@ import * as path from 'vs/base/common/path'; @@ -682,7 +701,7 @@ index 734d13fd45..efba861367 100644 - if (platform.isMacintosh) { + if (browser.isMacintosh) { diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts -index bfde146007..6c3391ee38 100644 +index bfde146..6c3391e 100644 --- a/src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts @@ -8,0 +9 @@ import * as platform from 'vs/base/common/platform'; @@ -691,7 +710,7 @@ index bfde146007..6c3391ee38 100644 - if (platform.isMacintosh) { + if (browser.isMacintosh) { diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js b/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js -index a239f09f03..3f68547467 100644 +index a239f09..3f68547 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js +++ b/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js @@ -10 +10,19 @@ @@ -731,14 +750,14 @@ index a239f09f03..3f68547467 100644 + // corsEnabled: true + // }); diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts b/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts -index 8e2b9e03bc..c06da1c7d1 100644 +index 8e2b9e0..c06da1c 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts @@ -24 +24 @@ import { InputFocusedContextKey } from 'vs/platform/contextkey/common/contextkey -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts -index 5a28744889..9d6f38ca7d 100644 +index 5a28744..9d6f38c 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts @@ -19 +19,2 @@ import { endsWith } from 'vs/base/common/strings'; @@ -753,7 +772,7 @@ index 5a28744889..9d6f38ca7d 100644 + value: true, + }); diff --git a/src/vs/workbench/contrib/welcome/walkThrough/node/walkThroughContentProvider.ts b/src/vs/workbench/contrib/welcome/walkThrough/node/walkThroughContentProvider.ts -index 147f05b246..a36fad0f2a 100644 +index 147f05b..a36fad0 100644 --- a/src/vs/workbench/contrib/welcome/walkThrough/node/walkThroughContentProvider.ts +++ b/src/vs/workbench/contrib/welcome/walkThrough/node/walkThroughContentProvider.ts @@ -30,0 +31 @@ export class WalkThroughContentProvider implements ITextModelContentProvider, IW @@ -784,7 +803,7 @@ index 147f05b246..a36fad0f2a 100644 - this.modelService.updateModel(codeEditorModel, content.value); + this.modelService.updateModel(codeEditorModel, content); diff --git a/src/vs/workbench/electron-browser/actions/helpActions.ts b/src/vs/workbench/electron-browser/actions/helpActions.ts -index 79e2ba2981..8c1b21bd65 100644 +index 79e2ba2..8c1b21b 100644 --- a/src/vs/workbench/electron-browser/actions/helpActions.ts +++ b/src/vs/workbench/electron-browser/actions/helpActions.ts @@ -9 +9,2 @@ import product from 'vs/platform/product/node/product'; @@ -792,14 +811,14 @@ index 79e2ba2981..8c1b21bd65 100644 +import { language } from 'vs/base/common/platform'; +import { isMacintosh, isLinux } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/electron-browser/actions/windowActions.ts b/src/vs/workbench/electron-browser/actions/windowActions.ts -index ef640150e1..689487d3ce 100644 +index ef64015..689487d 100644 --- a/src/vs/workbench/electron-browser/actions/windowActions.ts +++ b/src/vs/workbench/electron-browser/actions/windowActions.ts @@ -14 +14 @@ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configurat -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/browser/browser'; diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts -index 0d9d443dc1..f0e30f7175 100644 +index 0d9d443..f0e30f7 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -13 +13,2 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; @@ -825,7 +844,7 @@ index 0d9d443dc1..f0e30f7175 100644 - 'included': isMacintosh + 'included': isNative && isMacintosh diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts -index acb68c8ad7..bee143a0d7 100644 +index acb68c8..bee143a 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -53 +53 @@ const TextInputActions: IAction[] = [ @@ -838,7 +857,7 @@ index acb68c8ad7..bee143a0d7 100644 - !isMacintosh || // macOS only + !browser.isMacintosh || // macOS only diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts -index 7445d7b664..0291deeebf 100644 +index 7445d7b..0291dee 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -19 +19,2 @@ import { Registry } from 'vs/platform/registry/common/platform'; @@ -864,20 +883,20 @@ index 7445d7b664..0291deeebf 100644 - } else if (isMacintosh) { + } else if (isNative && isMacintosh) { diff --git a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts -index 059291079f..0ce7e352e1 100644 +index 0592910..0ce7e35 100644 --- a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts +++ b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts @@ -33,0 +34 @@ function getSystemExtensionsRoot(): string { + return (require('vs/../../../../packages/vscode/src/fill/paths') as typeof import ('vs/../../../../packages/vscode/src/fill/paths')).getBuiltInExtensionsDirectory(); diff --git a/src/vs/workbench/services/extensions/node/extensionHostProcess.ts b/src/vs/workbench/services/extensions/node/extensionHostProcess.ts -index 484cef96b1..f728fc85f9 100644 +index 484cef9..f728fc8 100644 --- a/src/vs/workbench/services/extensions/node/extensionHostProcess.ts +++ b/src/vs/workbench/services/extensions/node/extensionHostProcess.ts @@ -137 +137 @@ function connectToRenderer(protocol: IMessagePassingProtocol): Promise