Skip to content

Commit daf029d

Browse files
committed
extract marshalling id into its own file and untable uri from it, #142476
1 parent de157c9 commit daf029d

File tree

24 files changed

+47
-39
lines changed

24 files changed

+47
-39
lines changed

src/vs/base/common/marshalling.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { VSBuffer } from 'vs/base/common/buffer';
77
import { regExpFlags } from 'vs/base/common/strings';
88
import { URI, UriComponents } from 'vs/base/common/uri';
9+
import { MarshalledId } from './marshallingIds';
910

1011
export function stringify(obj: any): string {
1112
return JSON.stringify(obj, replacer);
@@ -17,23 +18,6 @@ export function parse(text: string): any {
1718
return data;
1819
}
1920

20-
export const enum MarshalledId {
21-
Uri = 1,
22-
Regexp,
23-
ScmResource,
24-
ScmResourceGroup,
25-
ScmProvider,
26-
CommentController,
27-
CommentThread,
28-
CommentThreadReply,
29-
CommentNode,
30-
CommentThreadNode,
31-
TimelineActionContext,
32-
NotebookCellActionContext,
33-
TestItemContext,
34-
Date,
35-
}
36-
3721
export interface MarshalledObject {
3822
$mid: MarshalledId;
3923
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
7+
export const enum MarshalledId {
8+
Uri = 1,
9+
Regexp,
10+
ScmResource,
11+
ScmResourceGroup,
12+
ScmProvider,
13+
CommentController,
14+
CommentThread,
15+
CommentThreadReply,
16+
CommentNode,
17+
CommentThreadNode,
18+
TimelineActionContext,
19+
NotebookCellActionContext,
20+
TestItemContext,
21+
Date
22+
}

src/vs/base/common/uri.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { CharCode } from 'vs/base/common/charCode';
7-
import { MarshalledId } from 'vs/base/common/marshalling';
7+
import { MarshalledId } from 'vs/base/common/marshallingIds';
88
import * as paths from 'vs/base/common/path';
99
import { isWindows } from 'vs/base/common/platform';
1010

src/vs/base/common/uriIpc.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { MarshalledId, MarshalledObject } from 'vs/base/common/marshalling';
6+
import { MarshalledObject } from 'vs/base/common/marshalling';
7+
import { MarshalledId } from 'vs/base/common/marshallingIds';
78
import { URI, UriComponents } from 'vs/base/common/uri';
89

910
export interface IURITransformer {

src/vs/workbench/api/browser/mainThreadComments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneCont
2323
import { Codicon } from 'vs/base/common/codicons';
2424
import { registerIcon } from 'vs/platform/theme/common/iconRegistry';
2525
import { localize } from 'vs/nls';
26-
import { MarshalledId, } from 'vs/base/common/marshalling';
26+
import { MarshalledId } from 'vs/base/common/marshallingIds';
2727

2828

2929
export class MainThreadCommentThread implements languages.CommentThread {

src/vs/workbench/api/browser/mainThreadSCM.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Command } from 'vs/editor/common/languages';
1212
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
1313
import { ISplice, Sequence } from 'vs/base/common/sequence';
1414
import { CancellationToken } from 'vs/base/common/cancellation';
15-
import { MarshalledId } from 'vs/base/common/marshalling';
15+
import { MarshalledId } from 'vs/base/common/marshallingIds';
1616
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
1717
import { IMarkdownString } from 'vs/base/common/htmlContent';
1818

src/vs/workbench/api/common/extHostComments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { CancellationToken } from 'vs/base/common/cancellation';
88
import { debounce } from 'vs/base/common/decorators';
99
import { Emitter } from 'vs/base/common/event';
1010
import { DisposableStore, IDisposable, MutableDisposable } from 'vs/base/common/lifecycle';
11-
import { MarshalledId } from 'vs/base/common/marshalling';
11+
import { MarshalledId } from 'vs/base/common/marshallingIds';
1212
import { URI, UriComponents } from 'vs/base/common/uri';
1313
import { IRange } from 'vs/editor/common/core/range';
1414
import * as languages from 'vs/editor/common/languages';

src/vs/workbench/api/common/extHostNotebook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { IRelativePattern } from 'vs/base/common/glob';
1010
import { hash } from 'vs/base/common/hash';
1111
import { DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
1212
import { ResourceMap } from 'vs/base/common/map';
13-
import { MarshalledId } from 'vs/base/common/marshalling';
13+
import { MarshalledId } from 'vs/base/common/marshallingIds';
1414
import { isFalsyOrWhitespace } from 'vs/base/common/strings';
1515
import { assertIsDefined } from 'vs/base/common/types';
1616
import { URI, UriComponents } from 'vs/base/common/uri';

src/vs/workbench/api/common/extHostSCM.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { ISplice } from 'vs/base/common/sequence';
1717
import { ILogService } from 'vs/platform/log/common/log';
1818
import { CancellationToken } from 'vs/base/common/cancellation';
1919
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
20-
import { MarshalledId } from 'vs/base/common/marshalling';
20+
import { MarshalledId } from 'vs/base/common/marshallingIds';
2121
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
2222
import { IMarkdownString } from 'vs/base/common/htmlContent';
2323
import { MarkdownString } from 'vs/workbench/api/common/extHostTypeConverters';

src/vs/workbench/api/common/extHostTesting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Emitter, Event } from 'vs/base/common/event';
1010
import { once } from 'vs/base/common/functional';
1111
import { hash } from 'vs/base/common/hash';
1212
import { Disposable, DisposableStore, toDisposable } from 'vs/base/common/lifecycle';
13-
import { MarshalledId } from 'vs/base/common/marshalling';
13+
import { MarshalledId } from 'vs/base/common/marshallingIds';
1414
import { deepFreeze } from 'vs/base/common/objects';
1515
import { isDefined } from 'vs/base/common/types';
1616
import { generateUuid } from 'vs/base/common/uuid';

0 commit comments

Comments
 (0)