Skip to content

Commit 6865ffb

Browse files
author
Benjamin Pasero
committed
debt - fix some layer breakers
1 parent 4fa0890 commit 6865ffb

15 files changed

Lines changed: 22 additions & 18 deletions

File tree

src/vs/workbench/browser/dnd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function extractResources(e: DragEvent, externalOnly?: boolean): Array<ID
113113
if (e.dataTransfer && e.dataTransfer.files) {
114114
for (let i = 0; i < e.dataTransfer.files.length; i++) {
115115
const file = e.dataTransfer.files[i];
116-
if (file && file.path && !resources.some(r => r.resource.fsPath === file.path) /* prevent duplicates */) {
116+
if (file && file.path /* Electron only */ && !resources.some(r => r.resource.fsPath === file.path) /* prevent duplicates */) {
117117
try {
118118
resources.push({ resource: URI.file(file.path), isExternal: true });
119119
} catch (error) {

src/vs/workbench/contrib/terminal/browser/terminalPanel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export class TerminalPanel extends Panel {
276276
const resources = e.dataTransfer.getData(DataTransfers.RESOURCES);
277277
if (resources) {
278278
path = URI.parse(JSON.parse(resources)[0]).fsPath;
279-
} else if (e.dataTransfer.files.length > 0) {
279+
} else if (e.dataTransfer.files.length > 0 && e.dataTransfer.files[0].path /* Electron only */) {
280280
// Check if the file was dragged from the filesystem
281281
path = URI.file(e.dataTransfer.files[0].path).fsPath;
282282
}

src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function addTerminalEnvironmentKeys(env: platform.IProcessEnvironment, ve
6262
env['COLORTERM'] = 'truecolor';
6363
}
6464

65-
function mergeNonNullKeys(env: platform.IProcessEnvironment, other: ITerminalEnvironment | NodeJS.ProcessEnv | undefined) {
65+
function mergeNonNullKeys(env: platform.IProcessEnvironment, other: ITerminalEnvironment | undefined) {
6666
if (!other) {
6767
return;
6868
}

src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { URI } from 'vs/base/common/uri';
88
import * as strings from 'vs/base/common/strings';
99
import { ICommandService } from 'vs/platform/commands/common/commands';
1010
import * as arrays from 'vs/base/common/arrays';
11-
import { WalkThroughInput } from 'vs/workbench/contrib/welcome/walkThrough/common/walkThroughInput';
11+
import { WalkThroughInput } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput';
1212
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
1313
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
1414
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';

src/vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
88
import { Action } from 'vs/base/common/actions';
99
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
1010
import { URI } from 'vs/base/common/uri';
11-
import { WalkThroughInput, WalkThroughInputOptions } from 'vs/workbench/contrib/welcome/walkThrough/common/walkThroughInput';
11+
import { WalkThroughInput, WalkThroughInputOptions } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput';
1212
import { Schemas } from 'vs/base/common/network';
1313
import { IEditorInputFactory, EditorInput } from 'vs/workbench/common/editor';
1414

src/vs/workbench/contrib/welcome/walkThrough/browser/walkThrough.contribution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { localize } from 'vs/nls';
7-
import { WalkThroughInput } from 'vs/workbench/contrib/welcome/walkThrough/common/walkThroughInput';
7+
import { WalkThroughInput } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput';
88
import { WalkThroughPart } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart';
99
import { WalkThroughArrowUp, WalkThroughArrowDown, WalkThroughPageUp, WalkThroughPageDown } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughActions';
1010
import { WalkThroughContentProvider, WalkThroughSnippetContentProvider } from 'vs/workbench/contrib/welcome/walkThrough/common/walkThroughContentProvider';
@@ -55,4 +55,4 @@ MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
5555
title: localize({ key: 'miInteractivePlayground', comment: ['&& denotes a mnemonic'] }, "I&&nteractive Playground")
5656
},
5757
order: 2
58-
});
58+
});

src/vs/workbench/contrib/welcome/walkThrough/common/walkThroughInput.ts renamed to src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput.ts

File renamed without changes.

src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { IDisposable, dispose, toDisposable, DisposableStore } from 'vs/base/com
1212
import { EditorOptions, IEditorMemento } from 'vs/workbench/common/editor';
1313
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
1414
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
15-
import { WalkThroughInput } from 'vs/workbench/contrib/welcome/walkThrough/common/walkThroughInput';
15+
import { WalkThroughInput } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput';
1616
import { IOpenerService } from 'vs/platform/opener/common/opener';
1717
import * as marked from 'vs/base/common/marked/marked';
1818
import { IModelService } from 'vs/editor/common/services/modelService';

src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ function patchProcess(allowExit: boolean) {
6262
}
6363
} as (code?: number) => never;
6464

65+
// override Electron's process.crash() method
6566
process.crash = function () {
6667
const err = new Error('An extension called process.crash() and this was prevented.');
6768
console.warn(err.stack);

src/vs/workbench/services/files/common/workspaceWatcher.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { onUnexpectedError } from 'vs/base/common/errors';
1616
import { INotificationService, Severity, NeverShowAgainScope } from 'vs/platform/notification/common/notification';
1717
import { localize } from 'vs/nls';
1818
import { FileService } from 'vs/platform/files/common/fileService';
19+
import { IOpenerService } from 'vs/platform/opener/common/opener';
1920

2021
export class WorkspaceWatcher extends Disposable {
2122

@@ -25,7 +26,8 @@ export class WorkspaceWatcher extends Disposable {
2526
@IFileService private readonly fileService: FileService,
2627
@IConfigurationService private readonly configurationService: IConfigurationService,
2728
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
28-
@INotificationService private readonly notificationService: INotificationService
29+
@INotificationService private readonly notificationService: INotificationService,
30+
@IOpenerService private readonly openerService: IOpenerService
2931
) {
3032
super();
3133

@@ -77,7 +79,7 @@ export class WorkspaceWatcher extends Disposable {
7779
localize('netVersionError', "The Microsoft .NET Framework 4.5 is required. Please follow the link to install it."),
7880
[{
7981
label: localize('installNet', "Download .NET Framework 4.5"),
80-
run: () => window.open('https://go.microsoft.com/fwlink/?LinkId=786533')
82+
run: () => this.openerService.openExternal(URI.parse('https://go.microsoft.com/fwlink/?LinkId=786533'))
8183
}],
8284
{
8385
sticky: true,
@@ -93,7 +95,7 @@ export class WorkspaceWatcher extends Disposable {
9395
localize('enospcError', "Unable to watch for file changes in this large workspace. Please follow the instructions link to resolve this issue."),
9496
[{
9597
label: localize('learnMore', "Instructions"),
96-
run: () => window.open('https://go.microsoft.com/fwlink/?linkid=867693')
98+
run: () => this.openerService.openExternal(URI.parse('https://go.microsoft.com/fwlink/?linkid=867693'))
9799
}],
98100
{
99101
sticky: true,

0 commit comments

Comments
 (0)