2019-02-26 18:01:14 +00:00
diff --git a/src/vs/base/browser/browser.ts b/src/vs/base/browser/browser.ts
2019-03-13 18:59:51 +00:00
index c092106..66f1934 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/browser/browser.ts
+++ b/src/vs/base/browser/browser.ts
2019-03-08 16:37:03 +00:00
@@ -125,0 +126,4 @@ export const isEdgeWebView = isEdge && (userAgent.indexOf('WebView/') >= 0);
2019-02-26 18:01:14 +00:00
+export const isMacintosh = userAgent.indexOf("Macintosh") >= 0;
+export const isWindows = userAgent.indexOf("Windows") >= 0;
+export const isLinux = userAgent.indexOf("Linux") >= 0;
+
diff --git a/src/vs/base/browser/keyboardEvent.ts b/src/vs/base/browser/keyboardEvent.ts
2019-03-13 18:59:51 +00:00
index 03bdffc..d72c168 100644
2019-02-26 18:01:14 +00:00
--- 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);
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -159 +159 @@ let INVERSE_KEY_CODE_MAP: KeyCode[] = new Array(KeyCode.MAX_VALUE);
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
2019-03-08 16:37:03 +00:00
@@ -205 +205 @@ export interface IKeyboardEvent {
2019-02-26 18:01:14 +00:00
-const ctrlKeyMod = (platform.isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd);
+const ctrlKeyMod = (browser.isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd);
2019-03-08 16:37:03 +00:00
@@ -208 +208 @@ const shiftKeyMod = KeyMod.Shift;
2019-02-26 18:01:14 +00:00
-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
2019-03-13 18:59:51 +00:00
index 1922450..9900776 100644
2019-02-26 18:01:14 +00:00
--- 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
2019-03-13 18:59:51 +00:00
index cd73128..b1246de 100644
2019-02-26 18:01:14 +00:00
--- 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';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -253 +253 @@ class KeyboardController<T> implements IDisposable {
2019-02-26 18:01:14 +00:00
- onKeyDown.filter(e => (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KEY_A).on(this.onCtrlA, this, this.disposables);
+ onKeyDown.filter(e => (browser.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KEY_A).on(this.onCtrlA, this, this.disposables);
2019-03-08 16:37:03 +00:00
@@ -491 +491 @@ export function isSelectionSingleChangeEvent(event: IListMouseEvent<any> | IList
2019-02-26 18:01:14 +00:00
- return platform.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;
+ return browser.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;
2019-03-08 16:37:03 +00:00
@@ -553 +553 @@ export class MouseController<T> implements IDisposable {
2019-02-26 18:01:14 +00:00
- return platform.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;
+ return browser.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts
2019-03-13 18:59:51 +00:00
index 47da5e4..fbf7e22 100644
2019-03-08 16:37:03 +00:00
--- 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';
-export const MENU_MNEMONIC_REGEX: RegExp = /\(&([^\s&])\)|(?<!&)&([^\s&])/;
-export const MENU_ESCAPED_MNEMONIC_REGEX: RegExp = /(?<!&)(?:&)([^\s&])/;
+// Not all browsers support negative lookbehinds. We don't support mnemonics currently anyway.
+export const MENU_MNEMONIC_REGEX: RegExp = /&([^\s&])/; ///\(&([^\s&])\)|(?<!&)&([^\s&])/;
+export const MENU_ESCAPED_MNEMONIC_REGEX: RegExp = /&([^\s&])/; // /(?<!&)(?:&)([^\s&])/;
2019-02-26 18:01:14 +00:00
diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts
2019-03-13 18:59:51 +00:00
index 8c7168b..8bbea63 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/browser/ui/sash/sash.ts
+++ b/src/vs/base/browser/ui/sash/sash.ts
@@ -9 +9 @@ import { isIPad } from 'vs/base/browser/browser';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
2019-03-13 18:59:51 +00:00
index 9b31c84..51de0ea 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
+++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
@@ -18 +18 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -269 +269 @@ export abstract class AbstractScrollableElement extends Widget {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -338 +338 @@ export abstract class AbstractScrollableElement extends Widget {
- const shiftConvert = !platform.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;
+ const shiftConvert = !browser.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;
@@ -571 +571 @@ function resolveOptions(opts: ScrollableElementCreationOptions): ScrollableEleme
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/base/browser/ui/selectBox/selectBox.ts b/src/vs/base/browser/ui/selectBox/selectBox.ts
2019-03-13 18:59:51 +00:00
index 0e7314f..814fb0a 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/browser/ui/selectBox/selectBox.ts
+++ b/src/vs/base/browser/ui/selectBox/selectBox.ts
@@ -16 +16 @@ import { SelectBoxList } from 'vs/base/browser/ui/selectBox/selectBoxCustom';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
2019-03-13 18:59:51 +00:00
index 0ddce2d..cc2fd1b 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
+++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
@@ -20 +20 @@ import { ISelectBoxDelegate, ISelectOptionItem, ISelectBoxOptions, ISelectBoxSty
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/selectBox/selectBoxNative.ts b/src/vs/base/browser/ui/selectBox/selectBoxNative.ts
2019-03-13 18:59:51 +00:00
index 01f59d4..453d5c4 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/browser/ui/selectBox/selectBoxNative.ts
+++ b/src/vs/base/browser/ui/selectBox/selectBoxNative.ts
@@ -12 +12 @@ import { ISelectBoxDelegate, ISelectOptionItem, ISelectBoxOptions, ISelectBoxSty
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/tree/abstractTree.ts b/src/vs/base/browser/ui/tree/abstractTree.ts
2019-03-13 18:59:51 +00:00
index 2283978..26c2dee 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/browser/ui/tree/abstractTree.ts
+++ b/src/vs/base/browser/ui/tree/abstractTree.ts
@@ -24 +24 @@ import { disposableTimeout } from 'vs/base/common/async';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
2019-03-13 18:59:51 +00:00
index 74148e4..041205b 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
+++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
@@ -8 +8 @@ import * as nls from 'vs/nls';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -66 +66 @@ export class QuickOpenController extends DefaultController {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/base/parts/tree/browser/treeDefaults.ts b/src/vs/base/parts/tree/browser/treeDefaults.ts
2019-03-13 18:59:51 +00:00
index f91ca2b..ef6fce9 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/base/parts/tree/browser/treeDefaults.ts
+++ b/src/vs/base/parts/tree/browser/treeDefaults.ts
@@ -8,0 +9 @@ import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -113 +114 @@ export class DefaultController implements _.IController {
2019-02-26 18:01:14 +00:00
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
2019-03-08 16:37:03 +00:00
@@ -155 +156 @@ export class DefaultController implements _.IController {
2019-02-26 18:01:14 +00:00
- const isMac = platform.isMacintosh;
+ const isMac = browser.isMacintosh;
diff --git a/src/vs/code/electron-browser/issue/issueReporterMain.ts b/src/vs/code/electron-browser/issue/issueReporterMain.ts
2019-03-13 18:59:51 +00:00
index ca5ed69..945b281 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/code/electron-browser/issue/issueReporterMain.ts
+++ b/src/vs/code/electron-browser/issue/issueReporterMain.ts
2019-03-08 16:37:03 +00:00
@@ -423 +423 @@ export class IssueReporter extends Disposable {
2019-02-26 18:01:14 +00:00
- const cmdOrCtrlKey = platform.isMacintosh ? e.metaKey : e.ctrlKey;
+ const cmdOrCtrlKey = browser.isMacintosh ? e.metaKey : e.ctrlKey;
2019-03-08 16:37:03 +00:00
@@ -457 +457 @@ export class IssueReporter extends Disposable {
2019-02-26 18:01:14 +00:00
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/code/electron-browser/processExplorer/processExplorerMain.ts b/src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
2019-03-13 18:59:51 +00:00
index ce8c65f..c31a6d3 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
+++ b/src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
@@ -304 +304 @@ export function startup(data: ProcessExplorerData): void {
- const cmdOrCtrlKey = platform.isMacintosh ? e.metaKey : e.ctrlKey;
+ const cmdOrCtrlKey = browser.isMacintosh ? e.metaKey : e.ctrlKey;
2019-01-19 00:04:24 +00:00
diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
2019-03-13 18:59:51 +00:00
index 25de96d..66e732e 100644
2019-01-19 00:04:24 +00:00
--- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
+++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
2019-02-21 17:55:42 +00:00
@@ -195,0 +196,2 @@ async function handshake(configuration: ISharedProcessConfiguration): Promise<vo
2019-01-19 00:04:24 +00:00
+
+startup({ machineId: "1" });
2019-02-26 18:01:14 +00:00
diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts
2019-03-26 18:01:25 +00:00
index f4a579b..aa3c6d9 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/browser/config/configuration.ts
+++ b/src/vs/editor/browser/config/configuration.ts
2019-03-26 18:01:25 +00:00
@@ -10 +9,0 @@ import { Disposable } from 'vs/base/common/lifecycle';
-import * as platform from 'vs/base/common/platform';
@@ -17 +15,0 @@ import { IDimension } from 'vs/editor/common/editorCommon';
-import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
@@ -18,0 +17 @@ import { IAccessibilityService } from 'vs/platform/accessibility/common/accessib
+import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
@@ -353 +352 @@ export class Configuration extends CommonEditorConfiguration {
2019-02-26 18:01:14 +00:00
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
2019-03-26 18:01:25 +00:00
@@ -364 +363 @@ export class Configuration extends CommonEditorConfiguration {
- emptySelectionClipboard: browser.isWebKit || browser.isFirefox,
+ emptySelectionClipboard: false, // browser.isWebKit || browser.isFirefox,
2019-02-26 18:01:14 +00:00
diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts
2019-03-13 18:59:51 +00:00
index 1a8af35..fe56af9 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/browser/controller/mouseHandler.ts
+++ b/src/vs/editor/browser/controller/mouseHandler.ts
@@ -222 +222 @@ export class MouseHandler extends ViewEventHandler {
- if (platform.isMacintosh && e.leftButton && e.ctrlKey) {
+ if (browser.isMacintosh && e.leftButton && e.ctrlKey) {
diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts
2019-03-13 18:59:51 +00:00
index be5583d..c0e4f2e 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/browser/controller/textAreaHandler.ts
+++ b/src/vs/editor/browser/controller/textAreaHandler.ts
2019-03-08 16:37:03 +00:00
@@ -214 +214 @@ export class TextAreaHandler extends ViewPart {
2019-02-26 18:01:14 +00:00
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts
2019-03-13 18:59:51 +00:00
index 7ccf0e9..8c30ca2 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/browser/controller/textAreaInput.ts
+++ b/src/vs/editor/browser/controller/textAreaInput.ts
@@ -262 +262 @@ export class TextAreaInput extends Disposable {
- const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/platform.isMacintosh, /*couldBeTypingAtOffset0*/previousEventWasFocus && platform.isMacintosh);
+ const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/browser.isMacintosh, /*couldBeTypingAtOffset0*/previousEventWasFocus && browser.isMacintosh);
diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts
2019-03-13 18:59:51 +00:00
index fa004fb..6420078 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/common/config/commonEditorConfig.ts
+++ b/src/vs/editor/common/config/commonEditorConfig.ts
2019-03-08 16:37:03 +00:00
@@ -392 +392 @@ const editorConfiguration: IConfigurationNode = {
2019-02-26 18:01:14 +00:00
- 'included': platform.isMacintosh
2019-03-08 16:37:03 +00:00
+ 'included': platform.isNative && platform.isMacintosh
2019-02-26 18:01:14 +00:00
diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts
2019-03-26 18:01:25 +00:00
index 934e908..bd6fd88 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/common/config/editorOptions.ts
+++ b/src/vs/editor/common/config/editorOptions.ts
2019-03-26 18:01:25 +00:00
@@ -6 +6 @@
-import * as nls from 'vs/nls';
2019-02-26 18:01:14 +00:00
+import * as browser from 'vs/base/browser/browser';
2019-03-26 18:01:25 +00:00
@@ -13,0 +14 @@ import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper';
+import * as nls from 'vs/nls';
2019-03-08 16:37:03 +00:00
@@ -1765 +1766 @@ export class EditorOptionsValidator {
2019-02-26 18:01:14 +00:00
- configuredMulticursorModifier = platform.isMacintosh ? 'metaKey' : 'ctrlKey';
+ configuredMulticursorModifier = browser.isMacintosh ? 'metaKey' : 'ctrlKey';
2019-03-08 16:37:03 +00:00
@@ -2530 +2531 @@ export const EDITOR_FONT_DEFAULTS = {
2019-02-26 18:01:14 +00:00
- platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)
+ browser.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)
2019-03-08 16:37:03 +00:00
@@ -2534 +2535 @@ export const EDITOR_FONT_DEFAULTS = {
2019-02-26 18:01:14 +00:00
- platform.isMacintosh ? 12 : 14
+ browser.isMacintosh ? 12 : 14
2019-03-26 18:01:25 +00:00
@@ -2640 +2641 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
- selectionClipboard: true,
+ selectionClipboard: false,
2019-02-26 18:01:14 +00:00
diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts
2019-03-13 18:59:51 +00:00
index 88cb52a..c4a1be9 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/common/config/fontInfo.ts
+++ b/src/vs/editor/common/config/fontInfo.ts
@@ -6 +6 @@
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -14 +14 @@ import { EditorZoom } from 'vs/editor/common/config/editorZoom';
-const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35;
+const GOLDEN_LINE_HEIGHT_RATIO = browser.isMacintosh ? 1.5 : 1.35;
2019-01-30 22:57:22 +00:00
diff --git a/src/vs/editor/contrib/clipboard/clipboard.ts b/src/vs/editor/contrib/clipboard/clipboard.ts
2019-03-13 18:59:51 +00:00
index 5e43f1b..2244391 100644
2019-01-30 22:57:22 +00:00
--- a/src/vs/editor/contrib/clipboard/clipboard.ts
+++ b/src/vs/editor/contrib/clipboard/clipboard.ts
2019-02-06 19:20:40 +00:00
@@ -29 +29,2 @@ const supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeOrIE)
2019-01-30 22:57:22 +00:00
-const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
+// const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
+const supportsPaste = true;
2019-02-06 19:20:40 +00:00
@@ -176,0 +178 @@ class ExecCommandPasteAction extends ExecCommandAction {
2019-02-26 18:01:14 +00:00
+ const { workbench } = require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench');
2019-02-06 19:20:40 +00:00
@@ -181 +183 @@ class ExecCommandPasteAction extends ExecCommandAction {
2019-01-30 22:57:22 +00:00
- precondition: EditorContextKeys.writable,
2019-02-26 18:01:14 +00:00
+ precondition: (require('vs/platform/contextkey/common/contextkey') as typeof import('vs/platform/contextkey/common/contextkey')).ContextKeyExpr.and(EditorContextKeys.writable, workbench.clipboardContextKey),
2019-02-06 19:20:40 +00:00
@@ -191 +193,2 @@ class ExecCommandPasteAction extends ExecCommandAction {
2019-01-30 22:57:22 +00:00
- order: 3
+ order: 3,
2019-02-26 18:01:14 +00:00
+ when: workbench.clipboardContextKey,
2019-02-06 19:20:40 +00:00
@@ -194,0 +198,14 @@ class ExecCommandPasteAction extends ExecCommandAction {
2019-01-30 22:57:22 +00:00
+
+ public async run(accessor, editor: ICodeEditor): Promise<void> {
2019-02-06 18:59:03 +00:00
+ if (editor instanceof (require('vs/editor/browser/widget/codeEditorWidget') as typeof import('vs/editor/browser/widget/codeEditorWidget')).CodeEditorWidget) {
2019-01-30 22:57:22 +00:00
+ try {
2019-02-06 18:59:03 +00:00
+ editor.trigger('', (require('vs/editor/common/editorCommon') as typeof import ('vs/editor/common/editorCommon')).Handler.Paste, {
2019-02-26 18:01:14 +00:00
+ text: await (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.clipboardText,
2019-01-30 22:57:22 +00:00
+ });
+ } catch (ex) {
+ super.run(accessor, editor);
+ }
+ } else {
+ super.run(accessor, editor);
+ }
+ }
2019-02-26 18:01:14 +00:00
diff --git a/src/vs/editor/contrib/dnd/dnd.ts b/src/vs/editor/contrib/dnd/dnd.ts
2019-03-13 18:59:51 +00:00
index caa3ea7..e32371f 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/contrib/dnd/dnd.ts
+++ b/src/vs/editor/contrib/dnd/dnd.ts
@@ -9 +9 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/editor/contrib/goToDefinition/clickLinkGesture.ts b/src/vs/editor/contrib/goToDefinition/clickLinkGesture.ts
2019-03-13 18:59:51 +00:00
index 3b72a01..0d723f5 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/contrib/goToDefinition/clickLinkGesture.ts
+++ b/src/vs/editor/contrib/goToDefinition/clickLinkGesture.ts
@@ -86 +86 @@ function createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): C
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -92 +92 @@ function createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): C
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/editor/contrib/links/links.ts b/src/vs/editor/contrib/links/links.ts
2019-03-13 18:59:51 +00:00
index 972a60c..453ad61 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/contrib/links/links.ts
+++ b/src/vs/editor/contrib/links/links.ts
@@ -13 +13 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -29 +29 @@ const HOVER_MESSAGE_GENERAL_META = new MarkdownString().appendText(
- platform.isMacintosh
+ browser.isMacintosh
@@ -35 +35 @@ const HOVER_MESSAGE_COMMAND_META = new MarkdownString().appendText(
- platform.isMacintosh
+ browser.isMacintosh
@@ -41 +41 @@ const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText(
- platform.isMacintosh
+ browser.isMacintosh
@@ -47 +47 @@ const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText(
- platform.isMacintosh
+ browser.isMacintosh
diff --git a/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts b/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts
2019-03-13 18:59:51 +00:00
index cacc646..459fedd 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts
+++ b/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts
2019-03-08 16:37:03 +00:00
@@ -262 +262 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
2019-02-26 18:01:14 +00:00
- platform.isMacintosh
+ browser.isMacintosh
2019-03-08 16:37:03 +00:00
@@ -291 +291 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
2019-02-26 18:01:14 +00:00
- platform.isMacintosh
+ browser.isMacintosh
2019-01-19 00:04:24 +00:00
diff --git a/src/vs/loader.js b/src/vs/loader.js
2019-03-13 18:59:51 +00:00
index 4eddcab..2badfc3 100644
2019-01-19 00:04:24 +00:00
--- a/src/vs/loader.js
+++ b/src/vs/loader.js
2019-02-21 17:55:42 +00:00
@@ -671,4 +671,4 @@ var AMDLoader;
2019-01-19 00:04:24 +00:00
- this._fs = nodeRequire('fs');
- this._vm = nodeRequire('vm');
- this._path = nodeRequire('path');
- this._crypto = nodeRequire('crypto');
+ this._fs = require('fs');
+ this._vm = require('vm');
+ this._path = require('path');
+ this._crypto = require('crypto');
2019-02-28 20:04:19 +00:00
@@ -736,0 +737,12 @@ var AMDLoader;
2019-01-19 00:04:24 +00:00
+ const context = require.context("../", true, /.*/);
+ if (scriptSrc.indexOf("file:///") !== -1) {
2019-03-08 16:37:03 +00:00
+ let vsSrc = scriptSrc.split("file:///")[1].split(".js")[0];
+ if (this._env.isWindows) {
+ const vsSrcSplit = vsSrc.split(":/");
+ vsSrcSplit.shift();
+ vsSrc = vsSrcSplit.join(":/");
+ }
+ if (vsSrc && vsSrc.startsWith("vs/")) {
2019-01-19 00:04:24 +00:00
+ scriptSrc = `node|./${vsSrc}`;
+ }
+ }
2019-02-28 20:04:19 +00:00
@@ -741 +753 @@ var AMDLoader;
2019-01-19 00:04:24 +00:00
- moduleExports_1 = nodeRequire(pieces[1]);
+ moduleExports_1 = context(pieces[1]);
2019-02-26 18:01:14 +00:00
diff --git a/src/vs/platform/clipboard/electron-browser/clipboardService.ts b/src/vs/platform/clipboard/electron-browser/clipboardService.ts
2019-03-13 18:59:51 +00:00
index 9952574..908a9ae 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/platform/clipboard/electron-browser/clipboardService.ts
+++ b/src/vs/platform/clipboard/electron-browser/clipboardService.ts
@@ -9 +9 @@ import { 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/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts
2019-03-13 18:59:51 +00:00
index e28ca55..e8a4cd0 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/platform/windows/common/windows.ts
+++ b/src/vs/platform/windows/common/windows.ts
2019-03-08 16:37:03 +00:00
@@ -9 +9 @@ import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry';
-import { IProcessEnvironment, isMacintosh, isLinux } from 'vs/base/common/platform';
+import { IProcessEnvironment, isMacintosh, isLinux, isWeb } from 'vs/base/common/platform';
@@ -260,0 +261 @@ export function getTitleBarStyle(configurationService: IConfigurationService, en
+ if (isWeb) { return 'custom'; }
2019-01-31 22:19:12 +00:00
diff --git a/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
2019-03-13 18:59:51 +00:00
index 1b5d15e..f0ce325 100644
2019-01-31 22:19:12 +00:00
--- a/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
+++ b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
2019-03-08 16:37:03 +00:00
@@ -49,0 +50 @@ export class HeapService implements IHeapService {
+ return; // Cannot control GC in the browser.
2019-02-06 19:04:54 +00:00
diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts
2019-03-13 18:59:51 +00:00
index 58ba2e5..4fb6272 100644
2019-02-06 19:04:54 +00:00
--- a/src/vs/workbench/api/node/extHostExtensionService.ts
+++ b/src/vs/workbench/api/node/extHostExtensionService.ts
2019-03-08 16:37:03 +00:00
@@ -774 +774 @@ function loadCommonJSModule<T>(logService: ILogService, modulePath: string, acti
2019-02-06 19:04:54 +00:00
- r = require.__$__nodeRequire<T>(modulePath);
+ r = (global as any).nativeNodeRequire(modulePath);
2019-03-15 04:48:39 +00:00
diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts
2019-03-19 01:05:21 +00:00
index a445750..c64712b 100644
2019-03-15 04:48:39 +00:00
--- a/src/vs/workbench/api/node/extHostTypeConverters.ts
+++ b/src/vs/workbench/api/node/extHostTypeConverters.ts
@@ -26 +25,0 @@ import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumen
-import { isString, isNumber } from 'vs/base/common/types';
2019-03-19 01:05:21 +00:00
@@ -31 +29,0 @@ import { LogLevel as _MainLogLevel } from 'vs/platform/log/common/log';
-import { coalesce } from 'vs/base/common/arrays';
@@ -116,0 +115,2 @@ export namespace Diagnostic {
2019-03-15 04:48:39 +00:00
+ const { isString, isNumber } = require('vs/base/common/types');
2019-03-19 01:05:21 +00:00
+ const { coalesce } = require('vs/base/common/arrays');
2019-01-30 21:40:01 +00:00
diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts
2019-03-13 18:59:51 +00:00
index 5897ab9..57b926e 100644
2019-01-30 21:40:01 +00:00
--- a/src/vs/workbench/browser/dnd.ts
+++ b/src/vs/workbench/browser/dnd.ts
2019-03-08 16:37:03 +00:00
@@ -168 +168 @@ export class ResourcesDropHandler {
2019-01-30 21:40:01 +00:00
- return;
2019-02-26 18:01:14 +00:00
+ 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
2019-03-13 18:59:51 +00:00
index 819bb31..de69133 100644
2019-02-26 18:01:14 +00:00
--- a/src/vs/workbench/browser/layout.ts
+++ b/src/vs/workbench/browser/layout.ts
2019-03-08 16:37:03 +00:00
@@ -15 +15 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isNative, isMacintosh } from 'vs/base/common/platform';
2019-02-26 18:01:14 +00:00
@@ -29 +29 @@ import { getZoomFactor } from 'vs/base/browser/browser';
-const TITLE_BAR_HEIGHT = isMacintosh ? 22 : 30;
2019-03-08 16:37:03 +00:00
+const TITLE_BAR_HEIGHT = isNative && isMacintosh ? 22 : 30;
2019-02-26 18:01:14 +00:00
diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts
2019-03-13 18:59:51 +00:00
index 5c1e6ef..dd79592 100644
2019-02-26 18:01:14 +00:00
--- 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
2019-03-13 18:59:51 +00:00
index 52272c0..77d447d 100644
2019-02-26 18:01:14 +00:00
--- 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
2019-03-13 18:59:51 +00:00
index 73446c7..90330a2 100644
2019-02-26 18:01:14 +00:00
--- 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';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -444 +444 @@ class InlineImageView {
- if (platform.isMacintosh ? altPressed : ctrlPressed) {
+ if (browser.isMacintosh ? altPressed : ctrlPressed) {
@@ -458 +458 @@ class InlineImageView {
- if (!(platform.isMacintosh ? altPressed : ctrlPressed)) {
+ if (!(browser.isMacintosh ? altPressed : ctrlPressed)) {
@@ -478 +478 @@ class InlineImageView {
- if (!(platform.isMacintosh ? altPressed : ctrlPressed)) { // zoom in
+ if (!(browser.isMacintosh ? altPressed : ctrlPressed)) { // zoom in
@@ -502 +502 @@ class InlineImageView {
- 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
2019-03-13 18:59:51 +00:00
index e2bfb8d..3f6ae26 100644
2019-02-26 18:01:14 +00:00
--- 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
2019-03-13 18:59:51 +00:00
index 7478274..aa55946 100644
2019-02-26 18:01:14 +00:00
--- 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';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -264 +264 @@ export class QuickInputList {
2019-02-26 18:01:14 +00:00
- 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
2019-03-13 18:59:51 +00:00
index a215bde..df7562b 100644
2019-02-26 18:01:14 +00:00
--- 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
2019-03-13 18:59:51 +00:00
index 254ae28..4f2e217 100644
2019-02-26 18:01:14 +00:00
--- 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';
-import { isMacintosh, isLinux } from 'vs/base/common/platform';
+import { isNative } from 'vs/base/common/platform';
+import { isMacintosh, isLinux } from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -117 +118 @@ export class MenubarControl extends Disposable {
2019-02-26 18:01:14 +00:00
- if (isMacintosh) {
+ if (isNative && isMacintosh) {
2019-03-08 16:37:03 +00:00
@@ -123 +124 @@ export class MenubarControl extends Disposable {
2019-02-26 18:01:14 +00:00
- if (isMacintosh || this.currentTitlebarStyleSetting !== 'custom') {
+ if ((isNative && isMacintosh) || this.currentTitlebarStyleSetting !== 'custom') {
2019-03-08 16:37:03 +00:00
@@ -283 +284 @@ export class MenubarControl extends Disposable {
2019-02-26 18:01:14 +00:00
- if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') {
+ if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') {
2019-03-08 16:37:03 +00:00
@@ -299 +300 @@ export class MenubarControl extends Disposable {
2019-02-26 18:01:14 +00:00
- if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') {
+ if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') {
2019-03-08 16:37:03 +00:00
@@ -470 +471 @@ export class MenubarControl extends Disposable {
2019-02-26 18:01:14 +00:00
- if (!isMacintosh) {
+ if (!(isNative && isMacintosh)) {
2019-03-08 16:37:03 +00:00
@@ -692 +693 @@ export class MenubarControl extends Disposable {
2019-02-26 18:01:14 +00:00
- 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
2019-03-13 18:59:51 +00:00
index 3ab509f..5c76d17 100644
2019-02-26 18:01:14 +00:00
--- 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
-import { isMacintosh, isWindows, isLinux } from 'vs/base/common/platform';
+import { isNative } from 'vs/base/common/platform';
+import { isMacintosh, isWindows, isLinux } from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -327 +328 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
2019-02-26 18:01:14 +00:00
- if (!isMacintosh) {
+ if (!(isNative && isMacintosh)) {
2019-03-08 16:37:03 +00:00
@@ -343 +344 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
2019-02-26 18:01:14 +00:00
- if (!isMacintosh) {
+ if (!(isNative && isMacintosh)) {
2019-03-08 16:37:03 +00:00
@@ -550 +551 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
2019-02-26 18:01:14 +00:00
- if (!isMacintosh &&
+ if (!(isNative && isMacintosh) &&
2019-03-08 16:37:03 +00:00
@@ -568 +569 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
2019-02-26 18:01:14 +00:00
- if (isMacintosh || this.configurationService.getValue<MenuBarVisibility>('window.menuBarVisibility') === 'hidden') {
+ if ((isNative && isMacintosh) || this.configurationService.getValue<MenuBarVisibility>('window.menuBarVisibility') === 'hidden') {
diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts
2019-03-13 18:59:51 +00:00
index 1eb763e..ad509f8 100644
2019-02-26 18:01:14 +00:00
--- 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';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/common/contextkeys.ts b/src/vs/workbench/common/contextkeys.ts
2019-03-13 18:59:51 +00:00
index a0921a0..ed5ba1e 100644
2019-03-08 16:37:03 +00:00
--- 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
2019-03-13 18:59:51 +00:00
index 787c9ef..bd50c14 100644
2019-03-08 16:37:03 +00:00
--- 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';
-import * as platform from 'vs/base/common/platform';
2019-02-26 18:01:14 +00:00
+import * as browser from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -197 +197 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
2019-02-26 18:01:14 +00:00
- platform.isMacintosh
+ browser.isMacintosh
2019-03-08 16:37:03 +00:00
@@ -239 +239 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
2019-02-26 18:01:14 +00:00
- platform.isMacintosh
+ browser.isMacintosh
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts b/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts
2019-03-13 18:59:51 +00:00
index 1d338f1..4f13736 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts
+++ b/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts
2019-02-26 18:01:14 +00:00
@@ -14 +14 @@ import { mixin } from 'vs/base/common/objects';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts
2019-03-13 18:59:51 +00:00
index 5e1b6da..f8643d2 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts
+++ b/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts
2019-02-26 18:01:14 +00:00
@@ -8 +8 @@ import { Action } from 'vs/base/common/actions';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -84 +84 @@ MenuRegistry.appendMenuItem(MenuId.MenubarSelectionMenu, {
- platform.isMacintosh
+ browser.isMacintosh
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts b/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts
2019-03-13 18:59:51 +00:00
index 1ece57b..cf9505e 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts
+++ b/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts
2019-02-26 18:01:14 +00:00
@@ -26 +26 @@ import { KeyCode } from 'vs/base/common/keyCodes';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts
2019-03-13 18:59:51 +00:00
index 973dd5a..6c54854 100644
2019-03-08 16:37:03 +00:00
--- 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';
2019-02-26 18:01:14 +00:00
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -742 +742 @@ export class ReviewZoneWidget extends ZoneWidget {
2019-02-26 18:01:14 +00:00
- let keybinding = platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter';
+ let keybinding = browser.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/debug/browser/linkDetector.ts b/src/vs/workbench/contrib/debug/browser/linkDetector.ts
2019-03-13 18:59:51 +00:00
index 1b6f41c..0c9bf68 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/debug/browser/linkDetector.ts
+++ b/src/vs/workbench/contrib/debug/browser/linkDetector.ts
2019-02-26 18:01:14 +00:00
@@ -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';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts
2019-03-13 18:59:51 +00:00
index fde17ef..6010faa 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts
+++ b/src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts
2019-02-26 18:01:14 +00:00
@@ -45 +45 @@ import { ViewsRegistry } from 'vs/workbench/common/views';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts
2019-03-13 18:59:51 +00:00
index 89c1311..e803b6f 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts
+++ b/src/vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts
2019-02-26 18:01:14 +00:00
@@ -9,0 +10 @@ import * as env from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -180 +181 @@ export class DebugEditorContribution implements IDebugEditorContribution {
- if (e.event.rightButton || (env.isMacintosh && e.event.leftButton && e.event.ctrlKey)) {
+ if (e.event.rightButton || (browser.isMacintosh && e.event.leftButton && e.event.ctrlKey)) {
@@ -429 +430 @@ export class DebugEditorContribution implements IDebugEditorContribution {
- const stopKey = env.isMacintosh ? 'metaKey' : 'ctrlKey';
+ const stopKey = browser.isMacintosh ? 'metaKey' : 'ctrlKey';
@@ -447 +448 @@ export class DebugEditorContribution implements IDebugEditorContribution {
- const stopKey = env.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl;
+ const stopKey = browser.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl;
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/debug/node/debugAdapter.ts b/src/vs/workbench/contrib/debug/node/debugAdapter.ts
2019-03-13 18:59:51 +00:00
index b5f6da9..6e6ff4b 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/debug/node/debugAdapter.ts
+++ b/src/vs/workbench/contrib/debug/node/debugAdapter.ts
2019-02-19 16:17:03 +00:00
@@ -315 +315 @@ export class ExecutableDebugAdapter extends StreamDebugAdapter {
- return new Promise<void>((resolve, reject) => {
+ return new Promise<void>(async (resolve, reject) => {
@@ -320 +320 @@ export class ExecutableDebugAdapter extends StreamDebugAdapter {
- if (!fs.existsSync(this.adapterExecutable.command)) {
+ if (!(await require("util").promisify(fs.exists)(this.adapterExecutable.command))) {
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
2019-03-13 18:59:51 +00:00
index 67c0c41..956c3a6 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
+++ b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
2019-03-01 21:51:11 +00:00
@@ -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}`;
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts b/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
2019-03-13 18:59:51 +00:00
index f83842f..bca184e 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
+++ b/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
2019-02-26 18:01:14 +00:00
@@ -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';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/files/browser/fileCommands.ts b/src/vs/workbench/contrib/files/browser/fileCommands.ts
2019-03-13 18:59:51 +00:00
index 136bbc9..6766894 100644
2019-03-08 16:37:03 +00:00
--- 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';
2019-02-26 18:01:14 +00:00
-import { isWindows, isMacintosh } from 'vs/base/common/platform';
+import { isWindows, isMacintosh } from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
2019-03-13 18:59:51 +00:00
index e944612..e638513 100644
2019-03-08 16:37:03 +00:00
--- 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
2019-02-26 18:01:14 +00:00
-import { isMacintosh, isLinux } from 'vs/base/common/platform';
+import { isMacintosh, isLinux } from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -592,0 +593 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
2019-02-26 18:01:14 +00:00
+ return (require('vs/../../../../packages/vscode/src/workbench') as typeof import('vs/../../../../packages/vscode/src/workbench')).workbench.handleExternalDrop(target, originalEvent);
2019-03-13 18:59:51 +00:00
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()) {
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/logs/common/logs.contribution.ts b/src/vs/workbench/contrib/logs/common/logs.contribution.ts
2019-03-13 18:59:51 +00:00
index a14a280..af264a8 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/logs/common/logs.contribution.ts
+++ b/src/vs/workbench/contrib/logs/common/logs.contribution.ts
2019-02-19 16:17:03 +00:00
@@ -31 +31,2 @@ class LogOutputChannels extends Disposable implements IWorkbenchContribution {
- outputChannelRegistry.registerChannel({ id: Constants.mainLogChannelId, label: nls.localize('mainLog', "Main"), file: URI.file(join(environmentService.logsPath, `main.log`)), log: true });
+ // 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 });
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/output/common/outputLinkProvider.ts b/src/vs/workbench/contrib/output/common/outputLinkProvider.ts
2019-03-13 18:59:51 +00:00
index efa955e..e72f41d 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/output/common/outputLinkProvider.ts
+++ b/src/vs/workbench/contrib/output/common/outputLinkProvider.ts
2019-02-26 18:01:14 +00:00
@@ -77,0 +78 @@ export class OutputLinkProvider {
2019-02-19 16:17:03 +00:00
+ return Promise.resolve([]);
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts
2019-03-13 18:59:51 +00:00
index 92f9b7c..b8300c6 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts
+++ b/src/vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts
2019-02-26 18:01:14 +00:00
@@ -6 +6 @@
-import * as env from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -94 +94 @@ Registry.as<IQuickOpenRegistry>(QuickOpenExtensions.Quickopen).registerQuickOpen
- 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")
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts
2019-03-13 18:59:51 +00:00
index e3c9552..a64fda2 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts
+++ b/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts
2019-02-26 18:01:14 +00:00
@@ -18 +18,2 @@ import { isEqual } from 'vs/base/common/resources';
-import { isLinux, isMacintosh } from 'vs/base/common/platform';
+import { isNative, isLinux } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
@@ -69 +70 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
- if (isMacintosh && config.window && typeof config.window.nativeTabs === 'boolean' && config.window.nativeTabs !== this.nativeTabs) {
+ if (isNative && isMacintosh && config.window && typeof config.window.nativeTabs === 'boolean' && config.window.nativeTabs !== this.nativeTabs) {
@@ -75 +76 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
- 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) {
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/contrib/scm/electron-browser/scmViewlet.ts
2019-03-13 18:59:51 +00:00
index 077334b..b215ede 100644
2019-03-08 16:37:03 +00:00
--- 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
2019-02-26 18:01:14 +00:00
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -816 +816 @@ export class RepositoryPanel extends ViewletPanel {
2019-02-26 18:01:14 +00:00
- const label = binding ? binding.getLabel() : (platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter');
+ const label = binding ? binding.getLabel() : (browser.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter');
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/search/browser/search.contribution.ts b/src/vs/workbench/contrib/search/browser/search.contribution.ts
2019-03-13 18:59:51 +00:00
index c60cccd..257cd31 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/search/browser/search.contribution.ts
+++ b/src/vs/workbench/contrib/search/browser/search.contribution.ts
@@ -665 +665 @@ configurationRegistry.registerConfiguration({
2019-02-26 18:01:14 +00:00
- included: platform.isMacintosh
+ included: platform.isNative && platform.isMacintosh
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/tasks/common/problemMatcher.ts b/src/vs/workbench/contrib/tasks/common/problemMatcher.ts
2019-03-13 18:59:51 +00:00
index 57ece42..91bc82a 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/tasks/common/problemMatcher.ts
+++ b/src/vs/workbench/contrib/tasks/common/problemMatcher.ts
2019-02-26 18:01:14 +00:00
@@ -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';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts
2019-03-13 18:59:51 +00:00
index b15ee85..4a577b3 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts
+++ b/src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts
2019-02-26 18:01:14 +00:00
@@ -12,0 +13 @@ import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -219 +220 @@ configurationRegistry.registerConfiguration({
- default: platform.isMacintosh ? 'selectWord' : platform.isWindows ? 'copyPaste' : 'default',
+ default: browser.isMacintosh ? 'selectWord' : browser.isWindows ? 'copyPaste' : 'default',
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminalLinkHandler.ts
2019-03-13 18:59:51 +00:00
index 734d13f..efba861 100644
2019-03-08 16:37:03 +00:00
--- 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';
2019-02-26 18:01:14 +00:00
+import * as browser from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
@@ -235 +236 @@ export class TerminalLinkHandler {
2019-02-26 18:01:14 +00:00
- return platform.isMacintosh ? event.metaKey : event.ctrlKey;
+ return browser.isMacintosh ? event.metaKey : event.ctrlKey;
2019-03-08 16:37:03 +00:00
@@ -243 +244 @@ export class TerminalLinkHandler {
2019-02-26 18:01:14 +00:00
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts
2019-03-13 18:59:51 +00:00
index bfde146..6c3391e 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts
+++ b/src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts
2019-02-26 18:01:14 +00:00
@@ -8,0 +9 @@ import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -232 +233 @@ export class TerminalPanel extends Panel {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js b/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
2019-03-13 18:59:51 +00:00
index a239f09..3f68547 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
+++ b/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
2019-02-21 17:55:42 +00:00
@@ -10 +10,19 @@
- const ipcRenderer = require('electron').ipcRenderer;
+ const ipcRenderer = {
+ on: (channel, callback) => {
+ window.addEventListener("message", (event) => {
+ if (event.data.channel === channel) {
+ callback(event.data.channel, ...event.data.data);
+ }
+ });
+ },
+ sendToHost: (channel, ...args) => {
+ window.parent.postMessage({
+ channel,
+ data: args,
+ id: document.body.id,
+ }, "*");
+ },
+ };
+ const process = {
+ pid: undefined,
+ };
@@ -22,7 +40,7 @@
- require('electron').webFrame.registerURLSchemeAsPrivileged('vscode-resource', {
- secure: true,
- bypassCSP: false,
- allowServiceWorkers: false,
- supportFetchAPI: true,
- corsEnabled: true
- });
+ // require('electron').webFrame.registerURLSchemeAsPrivileged('vscode-resource', {
+ // secure: true,
+ // bypassCSP: false,
+ // allowServiceWorkers: false,
+ // supportFetchAPI: true,
+ // corsEnabled: true
+ // });
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts b/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts
2019-03-13 18:59:51 +00:00
index 8e2b9e0..c06da1c 100644
2019-03-08 16:37:03 +00:00
--- 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
2019-02-26 18:01:14 +00:00
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
2019-03-13 18:59:51 +00:00
index 5a28744..9d6f38c 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
+++ b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
2019-03-11 21:19:52 +00:00
@@ -19 +19,2 @@ import { endsWith } from 'vs/base/common/strings';
2019-02-26 18:01:14 +00:00
-import { isMacintosh } from 'vs/base/common/platform';
2019-03-11 21:19:52 +00:00
+import { isWeb } from 'vs/base/common/platform';
2019-02-26 18:01:14 +00:00
+import { isMacintosh } from 'vs/base/browser/browser';
2019-03-11 21:19:52 +00:00
@@ -254 +255 @@ export class WebviewElement extends Disposable {
- this._webview.src = this._options.useSameOriginForRoot ? require.toUrl('./webview.html') : 'data:text/html;charset=utf-8,%3C%21DOCTYPE%20html%3E%0D%0A%3Chtml%20lang%3D%22en%22%20style%3D%22width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3Chead%3E%0D%0A%09%3Ctitle%3EVirtual%20Document%3C%2Ftitle%3E%0D%0A%3C%2Fhead%3E%0D%0A%3Cbody%20style%3D%22margin%3A%200%3B%20overflow%3A%20hidden%3B%20width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E';
+ this._webview.src = isWeb || this._options.useSameOriginForRoot ? require.toUrl('./webview.html') : 'data:text/html;charset=utf-8,%3C%21DOCTYPE%20html%3E%0D%0A%3Chtml%20lang%3D%22en%22%20style%3D%22width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3Chead%3E%0D%0A%09%3Ctitle%3EVirtual%20Document%3C%2Ftitle%3E%0D%0A%3C%2Fhead%3E%0D%0A%3Cbody%20style%3D%22margin%3A%200%3B%20overflow%3A%20hidden%3B%20width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E';
@@ -265,0 +267,3 @@ export class WebviewElement extends Disposable {
2019-03-08 16:37:03 +00:00
+ Object.defineProperty(this._options, 'useSameOriginForRoot', {
+ value: true,
+ });
diff --git a/src/vs/workbench/contrib/welcome/walkThrough/node/walkThroughContentProvider.ts b/src/vs/workbench/contrib/welcome/walkThrough/node/walkThroughContentProvider.ts
2019-03-13 18:59:51 +00:00
index 147f05b..a36fad0 100644
2019-03-08 16:37:03 +00:00
--- 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
+ /*
@@ -38 +39,11 @@ export class WalkThroughContentProvider implements ITextModelContentProvider, IW
- }) : this.textFileService.resolveTextContent(URI.file(resource.fsPath)).then(content => content.value));
+ */
2019-02-02 01:55:32 +00:00
+ // This works because the only walkthrough that is a module is the welcome page.
+ // We have to explicitly import it or Webpack won't pick it up.
2019-03-08 16:37:03 +00:00
+ import("vs/workbench/contrib/welcome/page/electron-browser/vs_code_welcome_page").then((content) => {
2019-02-02 01:55:32 +00:00
+ resolve(content.default());
+ }).catch((err) => {
+ reject(err);
2019-03-08 16:37:03 +00:00
+ });
2019-02-02 01:55:32 +00:00
+ }) : (resource.scheme !== "file"
+ ? fetch(resource.path).then((res) => res.text())
+ : this.textFileService.resolveTextContent(URI.file(resource.fsPath)).then(content => content.value)));
2019-03-08 16:37:03 +00:00
@@ -64 +75 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi
2019-02-02 01:55:32 +00:00
- return this.textFileService.resolveTextContent(URI.file(resource.fsPath)).then(content => {
+ return fetch(resource.path).then((res) => res.text()).then((content) => {
2019-03-08 16:37:03 +00:00
@@ -80,0 +92 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi
+ /*
@@ -85 +97,2 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi
2019-02-02 01:55:32 +00:00
- marked(markdown, { renderer });
2019-03-08 16:37:03 +00:00
+ */
2019-02-02 01:55:32 +00:00
+ marked(content, { renderer });
2019-03-08 16:37:03 +00:00
@@ -91 +104 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi
2019-02-02 01:55:32 +00:00
- this.modelService.updateModel(codeEditorModel, content.value);
+ this.modelService.updateModel(codeEditorModel, content);
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/electron-browser/actions/helpActions.ts b/src/vs/workbench/electron-browser/actions/helpActions.ts
2019-03-13 18:59:51 +00:00
index 79e2ba2..8c1b21b 100644
2019-03-08 16:37:03 +00:00
--- 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';
-import { isMacintosh, isLinux, language } from 'vs/base/common/platform';
+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
2019-03-13 18:59:51 +00:00
index ef64015..689487d 100644
2019-03-08 16:37:03 +00:00
--- 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
2019-03-13 18:59:51 +00:00
index 0d9d443..f0e30f7 100644
2019-03-08 16:37:03 +00:00
--- 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';
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
+import { isNative, isWeb } from 'vs/base/common/platform';
+import { isWindows, isLinux, isMacintosh } from 'vs/base/browser/browser';
@@ -535 +536 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- isMacintosh ?
+ isNative && isMacintosh ?
@@ -542 +543 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- isMacintosh ?
+ isNative && isMacintosh ?
@@ -629 +630 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- 'included': isWindows || isLinux
+ 'included': isWeb || isWindows || isLinux
@@ -636 +637 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- 'included': isWindows || isLinux
+ 'included': isWeb || isWindows || isLinux
@@ -662 +663 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- 'included': isMacintosh && parseFloat(os.release()) >= 16 // Minimum: macOS Sierra (10.12.x = darwin 16.x)
+ 'included': isNative && isMacintosh && parseFloat(os.release()) >= 16 // Minimum: macOS Sierra (10.12.x = darwin 16.x)
@@ -668 +669 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- 'included': isMacintosh
+ 'included': isNative && isMacintosh
diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts
2019-03-13 18:59:51 +00:00
index acb68c8..bee143a 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/electron-browser/window.ts
+++ b/src/vs/workbench/electron-browser/window.ts
@@ -53 +53 @@ const TextInputActions: IAction[] = [
- new Action('editor.action.clipboardPasteAction', nls.localize('paste', "Paste"), undefined, true, () => Promise.resolve(document.execCommand('paste'))),
+ (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.pasteAction,
@@ -319 +319 @@ export class ElectronWindow extends Disposable {
- (<any>window).open = function (url: string, target: string, features: string, replace: boolean): any {
+ (<any>window).openInvalid = function (url: string, target: string, features: string, replace: boolean): any {
@@ -365 +365 @@ export class ElectronWindow extends Disposable {
- !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
2019-03-13 18:59:51 +00:00
index 7445d7b..0291dee 100644
2019-03-08 16:37:03 +00:00
--- 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';
-import { isWindows, isLinux, isMacintosh, language } from 'vs/base/common/platform';
+import { isWeb, isNative, language } from 'vs/base/common/platform';
+import { isWindows, isLinux, isMacintosh } from 'vs/base/browser/browser';
@@ -321,0 +323 @@ export class Workbench extends Disposable implements IPartService {
+ (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.serviceCollection = serviceCollection;
@@ -345,0 +348 @@ export class Workbench extends Disposable implements IPartService {
+ /*
@@ -353,0 +357 @@ export class Workbench extends Disposable implements IPartService {
+ */
2019-03-08 18:45:20 +00:00
@@ -458 +462 @@ export class Workbench extends Disposable implements IPartService {
- addClasses(document.body, platformClass); // used by our fonts
+ addClasses(document.body, platformClass, isWeb ? 'web' : 'native'); // used by our fonts
2019-03-08 16:37:03 +00:00
@@ -633 +637 @@ export class Workbench extends Disposable implements IPartService {
- if (!isMacintosh && this.useCustomTitleBarStyle()) {
+ if (isWeb || (!isMacintosh && this.useCustomTitleBarStyle())) {
@@ -1241 +1245 @@ export class Workbench extends Disposable implements IPartService {
- if ((isWindows || isLinux) && this.useCustomTitleBarStyle()) {
+ if ((isWeb || isWindows || isLinux) && this.useCustomTitleBarStyle()) {
@@ -1397 +1401 @@ export class Workbench extends Disposable implements IPartService {
- } else if (isMacintosh) {
+ } else if (isNative && isMacintosh) {
2019-02-06 17:01:15 +00:00
diff --git a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
2019-03-13 18:59:51 +00:00
index 0592910..0ce7e35 100644
2019-02-06 17:01:15 +00:00
--- a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
+++ b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
2019-02-06 19:20:40 +00:00
@@ -33,0 +34 @@ function getSystemExtensionsRoot(): string {
2019-02-26 18:01:14 +00:00
+ return (require('vs/../../../../packages/vscode/src/fill/paths') as typeof import ('vs/../../../../packages/vscode/src/fill/paths')).getBuiltInExtensionsDirectory();
2019-02-21 17:55:42 +00:00
diff --git a/src/vs/workbench/services/extensions/node/extensionHostProcess.ts b/src/vs/workbench/services/extensions/node/extensionHostProcess.ts
2019-03-13 18:59:51 +00:00
index 484cef9..f728fc8 100644
2019-02-21 17:55:42 +00:00
--- a/src/vs/workbench/services/extensions/node/extensionHostProcess.ts
+++ b/src/vs/workbench/services/extensions/node/extensionHostProcess.ts
2019-03-08 16:37:03 +00:00
@@ -137 +137 @@ function connectToRenderer(protocol: IMessagePassingProtocol): Promise<IRenderer
2019-02-21 17:55:42 +00:00
- process.kill(initData.parentPid, 0); // throws an exception if the main process doesn't exist anymore.
+ // process.kill(initData.parentPid, 0); // throws an exception if the main process doesn't exist anymore.
2019-03-01 23:35:41 +00:00
diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
2019-03-13 18:59:51 +00:00
index 3c78990..545d91a 100644
2019-03-01 23:35:41 +00:00
--- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
+++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
@@ -16 +16 @@ import { KeybindingParser } from 'vs/base/common/keybindingParser';
-import { OS, OperatingSystem } from 'vs/base/common/platform';
+import { OS, OperatingSystem, isNative } from 'vs/base/common/platform';
2019-03-08 16:37:03 +00:00
@@ -130 +130 @@ export class KeyboardMapperFactory {
2019-03-01 23:35:41 +00:00
- if (OS === OperatingSystem.Windows) {
+ if (isNative && OS === OperatingSystem.Windows) {
2019-03-08 16:37:03 +00:00
diff --git a/src/vs/workbench/services/timer/electron-browser/timerService.ts b/src/vs/workbench/services/timer/electron-browser/timerService.ts
2019-03-13 18:59:51 +00:00
index 6e6fbcc..645bd72 100644
2019-03-08 16:37:03 +00:00
--- a/src/vs/workbench/services/timer/electron-browser/timerService.ts
+++ b/src/vs/workbench/services/timer/electron-browser/timerService.ts
@@ -426,0 +427 @@ export function didUseCachedData(): boolean {
+ return false;
2019-02-21 17:55:42 +00:00
diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts
2019-03-13 18:59:51 +00:00
index 368fffe..8c172db 100644
2019-02-21 17:55:42 +00:00
--- a/src/vs/workbench/workbench.main.ts
+++ b/src/vs/workbench/workbench.main.ts
@@ -25 +25 @@ import 'vs/workbench/browser/actions/navigationActions';
-import 'vs/workbench/browser/parts/quickopen/quickopenActions';
+import 'vs/workbench/browser/parts/quickopen/quickOpenActions';