Skip to content

Commit 928bc13

Browse files
author
Eric Amodio
committed
Adds settings and webview panel to Schemas
1 parent f05a08a commit 928bc13

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/vs/base/common/network.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export namespace Schemas {
5555
export const userData = 'vscode-userdata';
5656

5757
export const vscodeCustomEditor = 'vscode-custom-editor';
58+
59+
export const vscodeSettings = 'vscode-settings';
60+
61+
export const webviewPanel = 'webview-panel';
5862
}
5963

6064
class RemoteAuthoritiesImpl {

src/vs/workbench/contrib/timeline/browser/timelinePane.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import { fromNow } from 'vs/base/common/date';
3838
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
3939
import { escapeRegExpCharacters } from 'vs/base/common/strings';
4040
import { Iterable } from 'vs/base/common/iterator';
41+
import { Schemas } from 'vs/base/common/network';
4142

4243
const PageSize = 20;
4344

@@ -430,7 +431,7 @@ export class TimelinePane extends ViewPane {
430431
}
431432

432433
// TODO@eamodio: Are these the right the list of schemes to exclude? Is there a better way?
433-
if (this.uri?.scheme === 'vscode-settings' || this.uri?.scheme === 'webview-panel' || this.uri?.scheme === 'walkThrough') {
434+
if (this.uri?.scheme === Schemas.vscodeSettings || this.uri?.scheme === Schemas.webviewPanel || this.uri?.scheme === Schemas.walkThrough) {
434435
this.uri = undefined;
435436

436437
this.clear(false);

src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import { Lazy } from 'vs/base/common/lazy';
77
import { URI } from 'vs/base/common/uri';
88
import { EditorInput, GroupIdentifier, IEditorInput, Verbosity } from 'vs/workbench/common/editor';
99
import { IWebviewService, WebviewIcons, WebviewOverlay } from 'vs/workbench/contrib/webview/browser/webview';
10-
11-
const WebviewPanelResourceScheme = 'webview-panel';
10+
import { Schemas } from 'vs/base/common/network';
1211

1312
export class WebviewInput extends EditorInput {
1413

@@ -24,7 +23,7 @@ export class WebviewInput extends EditorInput {
2423

2524
get resource() {
2625
return URI.from({
27-
scheme: WebviewPanelResourceScheme,
26+
scheme: Schemas.webviewPanel,
2827
path: `webview-panel/webview-${this.id}`
2928
});
3029
}

src/vs/workbench/services/preferences/common/preferencesEditorInput.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editor
1919
import { IFileService } from 'vs/platform/files/common/files';
2020
import { ILabelService } from 'vs/platform/label/common/label';
2121
import { IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
22+
import { Schemas } from 'vs/base/common/network';
2223

2324
export class PreferencesEditorInput extends SideBySideEditorInput {
2425
static readonly ID: string = 'workbench.editorinputs.preferencesEditorInput';
@@ -105,7 +106,7 @@ export class SettingsEditor2Input extends EditorInput {
105106
private readonly _settingsModel: Settings2EditorModel;
106107

107108
readonly resource: URI = URI.from({
108-
scheme: 'vscode-settings',
109+
scheme: Schemas.vscodeSettings,
109110
path: `settingseditor`
110111
});
111112

0 commit comments

Comments
 (0)