Skip to content

Commit 37677eb

Browse files
committed
Fixes #921: MetaModel is missing $/setTrace and $/logTrace notification
1 parent 1da58fe commit 37677eb

2 files changed

Lines changed: 89 additions & 0 deletions

File tree

protocol/metaModel.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,20 @@
19531953
"name": "PublishDiagnosticsParams"
19541954
},
19551955
"documentation": "Diagnostics notification are sent from the server to the client to signal\nresults of validation runs."
1956+
},
1957+
{
1958+
"method": "$/setTrace",
1959+
"params": {
1960+
"kind": "reference",
1961+
"name": "SetTraceParams"
1962+
}
1963+
},
1964+
{
1965+
"method": "$/logTrace",
1966+
"params": {
1967+
"kind": "reference",
1968+
"name": "LogTraceParams"
1969+
}
19561970
}
19571971
],
19581972
"structures": [
@@ -5957,6 +5971,38 @@
59575971
"documentation": "The result returned from the apply workspace edit request.\n@since 3.17 renamed from ApplyWorkspaceEditResponse",
59585972
"since": "3.17 renamed from ApplyWorkspaceEditResponse"
59595973
},
5974+
{
5975+
"name": "SetTraceParams",
5976+
"properties": [
5977+
{
5978+
"name": "value",
5979+
"type": {
5980+
"kind": "reference",
5981+
"name": "TraceValues"
5982+
}
5983+
}
5984+
]
5985+
},
5986+
{
5987+
"name": "LogTraceParams",
5988+
"properties": [
5989+
{
5990+
"name": "message",
5991+
"type": {
5992+
"kind": "base",
5993+
"name": "string"
5994+
}
5995+
},
5996+
{
5997+
"name": "verbose",
5998+
"type": {
5999+
"kind": "base",
6000+
"name": "string"
6001+
},
6002+
"optional": true
6003+
}
6004+
]
6005+
},
59606006
{
59616007
"name": "TextDocumentPositionParams",
59626008
"properties": [
@@ -13338,6 +13384,30 @@
1333813384
},
1333913385
"documentation": "The kind of a code action.\nKinds are a hierarchical list of identifiers separated by `.`, e.g. `\"refactor.extract.function\"`.\nThe set of kinds is open and client needs to announce the kinds it supports to the server during\ninitialization."
1334013386
},
13387+
{
13388+
"name": "TraceValues",
13389+
"type": {
13390+
"kind": "or",
13391+
"items": [
13392+
{
13393+
"kind": "stringLiteral",
13394+
"value": "off"
13395+
},
13396+
{
13397+
"kind": "stringLiteral",
13398+
"value": "messages"
13399+
},
13400+
{
13401+
"kind": "stringLiteral",
13402+
"value": "compact"
13403+
},
13404+
{
13405+
"kind": "stringLiteral",
13406+
"value": "verbose"
13407+
}
13408+
]
13409+
}
13410+
},
1334113411
{
1334213412
"name": "DocumentFilter",
1334313413
"type": {

protocol/src/common/protocol.$.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* --------------------------------------------------------------------------------------------
2+
* Copyright (c) TypeFox, Microsoft and others. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
* ------------------------------------------------------------------------------------------ */
5+
6+
import { LogTraceParams, SetTraceParams } from 'vscode-jsonrpc';
7+
8+
import { ProtocolNotificationType } from './messages';
9+
10+
// This file is used to define the $ notification partly specified in JSON-RPC
11+
// so that we generate proper data for them in the meta model.
12+
13+
export namespace SetTraceNotification {
14+
export const type = new ProtocolNotificationType<SetTraceParams, void>('$/setTrace');
15+
}
16+
17+
export namespace LogTraceNotification {
18+
export const type = new ProtocolNotificationType<LogTraceParams, void>('$/logTrace');
19+
}

0 commit comments

Comments
 (0)