mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
protocol: refactor to use enum for marshalled object ids
This commit is contained in:
@@ -23,6 +23,7 @@ import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneCont
|
||||
import { Codicon } from 'vs/base/common/codicons';
|
||||
import { registerIcon } from 'vs/platform/theme/common/iconRegistry';
|
||||
import { localize } from 'vs/nls';
|
||||
import { MarshalledId } from 'vs/base/common/marshalling';
|
||||
|
||||
|
||||
export class MainThreadCommentThread implements modes.CommentThread {
|
||||
@@ -154,7 +155,7 @@ export class MainThreadCommentThread implements modes.CommentThread {
|
||||
|
||||
toJSON(): any {
|
||||
return {
|
||||
$mid: 7,
|
||||
$mid: MarshalledId.CommentThread,
|
||||
commentControlHandle: this.controllerHandle,
|
||||
commentThreadHandle: this.commentThreadHandle,
|
||||
};
|
||||
@@ -347,7 +348,7 @@ export class MainThreadCommentController {
|
||||
|
||||
toJSON(): any {
|
||||
return {
|
||||
$mid: 6,
|
||||
$mid: MarshalledId.CommentController,
|
||||
handle: this.handle
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Command } from 'vs/editor/common/modes';
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { ISplice, Sequence } from 'vs/base/common/sequence';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { MarshalledId } from 'vs/base/common/marshalling';
|
||||
|
||||
class MainThreadSCMResourceGroup implements ISCMResourceGroup {
|
||||
|
||||
@@ -36,7 +37,7 @@ class MainThreadSCMResourceGroup implements ISCMResourceGroup {
|
||||
|
||||
toJSON(): any {
|
||||
return {
|
||||
$mid: 4,
|
||||
$mid: MarshalledId.ScmResourceGroup,
|
||||
sourceControlHandle: this.sourceControlHandle,
|
||||
groupHandle: this.handle
|
||||
};
|
||||
@@ -78,7 +79,7 @@ class MainThreadSCMResource implements ISCMResource {
|
||||
|
||||
toJSON(): any {
|
||||
return {
|
||||
$mid: 3,
|
||||
$mid: MarshalledId.ScmResource,
|
||||
sourceControlHandle: this.sourceControlHandle,
|
||||
groupHandle: this.groupHandle,
|
||||
handle: this.handle
|
||||
@@ -256,7 +257,7 @@ class MainThreadSCMProvider implements ISCMProvider {
|
||||
|
||||
toJSON(): any {
|
||||
return {
|
||||
$mid: 5,
|
||||
$mid: MarshalledId.ScmProvider,
|
||||
handle: this.handle
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user