Skip to content

Commit

Permalink
Added __vscodeVariableMenuContext property
Browse files Browse the repository at this point in the history
  • Loading branch information
hackwaly committed Feb 21, 2021
1 parent 5d52380 commit 34cd793
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.0.6 2021-02-22

### Added

- Added Variable#__vscodeVariableMenuContext property.

## 1.0.5 2021-01-28

### Added
Expand Down
3 changes: 2 additions & 1 deletion scripts/gen_protocol_ml.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
const argv = yargs(hideBin(process.argv)).argv
const _ = require('lodash');
const hackSchema = require('./hack_schema');

const schema = JSON.parse(Fs.readFileSync(argv._[0]));
const schema = hackSchema(JSON.parse(Fs.readFileSync(argv._[0])));

function resolveDef(def) {
if (def != null && def.$ref) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/gen_protocol_mli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
const argv = yargs(hideBin(process.argv)).argv
const _ = require('lodash');
const hackSchema = require('./hack_schema');

const schema = JSON.parse(Fs.readFileSync(argv._[0]));
const schema = hackSchema(JSON.parse(Fs.readFileSync(argv._[0])));

function resolveDef(def) {
if (def != null && def.$ref) {
Expand Down
6 changes: 6 additions & 0 deletions scripts/hack_schema.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = hackSchema;

function hackSchema(schema) {
schema.definitions.Variable.properties.__vscodeVariableMenuContext = { type: 'string' };
return schema;
}
1 change: 1 addition & 0 deletions src/debug_protocol/debug_protocol.ml
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ module Variable = struct
The client can use this optional information to present the children in a paged UI and fetch them in chunks. *)
memory_reference : string option [@key "memoryReference"] [@default None]; (** Optional memory reference for the variable if the variable represents executable code, such as a function pointer.
This attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request. *)
__vscode_variable_menu_context : string option [@key "__vscodeVariableMenuContext"] [@default None];
}
[@@deriving make, yojson {strict = false}]
end
Expand Down
1 change: 1 addition & 0 deletions src/debug_protocol/debug_protocol.mli
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ module Variable : sig
The client can use this optional information to present the children in a paged UI and fetch them in chunks. *)
memory_reference : string option [@key "memoryReference"] [@default None]; (** Optional memory reference for the variable if the variable represents executable code, such as a function pointer.
This attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request. *)
__vscode_variable_menu_context : string option [@key "__vscodeVariableMenuContext"] [@default None];
}
[@@deriving make, yojson {strict = false}]
end
Expand Down

0 comments on commit 34cd793

Please sign in to comment.