Skip to content

Commit

Permalink
補完入力の自動生成テーブル修正に伴う、Hover表示処理の修正
Browse files Browse the repository at this point in the history
  • Loading branch information
r-koubou committed Aug 12, 2019
1 parent bd5725c commit ffe98e3
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 34 deletions.
Binary file removed data/KSP.xlsx
Binary file not shown.
Binary file modified data/KSP_Completion.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion data/VerifyExtractedManualData.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

REPORT_TITLE = "#---------------- {title} ----------------"

book = xlrd.open_workbook( 'KSP.xlsx' )
book = xlrd.open_workbook( 'KSP_Completion.xlsx' )
sheetNames = book.sheet_names()

wordList = []
Expand Down
2 changes: 1 addition & 1 deletion snippets/ksp.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,5 +468,5 @@
"${1:a} or ${2:b}"
],
"description": "Boolean Operator: true if a is true or b is true"
},
}
}
6 changes: 3 additions & 3 deletions src/features/KSPHoverProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import vscode = require( 'vscode' );

var kspBuiltinVariables = require( './generated/KSPBuiltinVariableInfo' );
var kspCommands = require( './generated/KSPCommandsInfo' );
var kspBuiltinVariables = require( './generated/KSPCompletionVariable' );
var kspCommands = require( './generated/KSPCompletionCommand' );

export class KSPHoverProvider implements vscode.HoverProvider
{
Expand All @@ -37,7 +37,7 @@ export class KSPHoverProvider implements vscode.HoverProvider
}

let name: string = textDocument.getText( wordRange );
let entry : any = kspCommands.commands[ name ] || kspBuiltinVariables.builtinVariables[ name ];
let entry : any = kspCommands.CompletionList[ name ] || kspBuiltinVariables.CompletionList[ name ];

if( entry && entry.description )
{
Expand Down
5 changes: 2 additions & 3 deletions src/features/KSPSignatureHelpProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
'use strict';
import vscode = require( 'vscode' );

const kspBuiltinVariables = require( './generated/KSPBuiltinVariableInfo' );
const kspCommands = require( './generated/KSPCommandsInfo' );
const kspCommands = require( './generated/KSPCompletionCommand' );

const _NL = '\n'.charCodeAt( 0 );
const _TAB = '\t'.charCodeAt( 0 );
Expand Down Expand Up @@ -102,7 +101,7 @@ export class KSPSignatureHelpProvider implements vscode.SignatureHelpProvider
{
return null;
}
let entry = kspCommands.commands[ ident ];
let entry = kspCommands.CompletionList[ ident ];
if ( !entry || !entry.signature )
{
return null;
Expand Down
16 changes: 16 additions & 0 deletions src/features/generated/KSPCommandNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// args: __mergeed__.txt ../src/features/generated/KSPCommandNames.ts CommandNames ui_knob ui_label ui_slider ui_table ui_value_edit ui_waveform
//
export var CommandNames : string[] = [
"END_USE_CODE",
"NO_SYS_SCRIPT_GROUP_START",
"NO_SYS_SCRIPT_PEDAL",
"NO_SYS_SCRIPT_RLS_TRIG",
"RESET_CONDITION",
"SET_CONDITION",
"USE_CODE_IF",
Expand Down Expand Up @@ -36,6 +40,9 @@ export var CommandNames : string[] = [
"atan",
"attach_level_meter",
"attach_zone",
"bitwise_and",
"bitwise_not",
"bitwise_or",
"by_marks",
"by_track",
"call",
Expand All @@ -57,6 +64,7 @@ export var CommandNames : string[] = [
"dont_use_machine_mode",
"event_status",
"exit",
"exit",
"exp",
"fade_in",
"fade_out",
Expand Down Expand Up @@ -97,8 +105,10 @@ export var CommandNames : string[] = [
"group_name",
"hide_part",
"ignore_controller",
"ignore_controller",
"ignore_event",
"ignore_midi",
"ignore_midi",
"in_range",
"inc",
"int_to_real",
Expand All @@ -114,6 +124,7 @@ export var CommandNames : string[] = [
"make_instr_persistence",
"make_instr_persistent",
"make_perfview",
"make_perfview",
"make_persistent",
"message",
"mf_get_buffer_size",
Expand All @@ -128,6 +139,7 @@ export var CommandNames : string[] = [
"mf_get_mark",
"mf_get_next",
"mf_get_next_at",
"mf_get_note_length",
"mf_get_num_tracks",
"mf_get_pos",
"mf_get_prev",
Expand All @@ -146,6 +158,7 @@ export var CommandNames : string[] = [
"mf_set_export_area",
"mf_set_mark",
"mf_set_pos",
"mod",
"move_control",
"move_control_px",
"ms_to_ticks",
Expand All @@ -172,6 +185,8 @@ export var CommandNames : string[] = [
"redirect_midi",
"redirect_output",
"remove_keyrange",
"reset_engine",
"reset_ksp_timer",
"reset_ksp_timer",
"reset_rls_trig_counter",
"round",
Expand Down Expand Up @@ -219,6 +234,7 @@ export var CommandNames : string[] = [
"set_voice_limit",
"sh_left",
"sh_right",
"show_library_tab",
"sin",
"slice_idx_loop_end",
"slice_idx_loop_start",
Expand Down
52 changes: 26 additions & 26 deletions src/features/generated/KSPCompletionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@
"int_to_real":
{
"snippet_string": "int_to_real( ${1:integer value} )",
"signature": "int_to_real(${1:integer value})",
"signature": "int_to_real(integer)",
"description": "converts an integer value into a real number"
},
"real_to_int":
{
"snippet_string": "real_to_int( ${1:real value} )",
"signature": "real_to_int(${1:real value})",
"signature": "real_to_int(real)",
"description": "converts a real number into an integer"
},
"msb":
Expand Down Expand Up @@ -209,7 +209,7 @@
"message":
{
"snippet_string": "message( ${1:variable/text} )",
"signature": "message(${1:variable/text})",
"signature": "message(variable/text)",
"description": "display text in the status line of KONTAKT"
},
"note_off":
Expand All @@ -227,7 +227,7 @@
"set_controller":
{
"snippet_string": "set_controller( ${1:MIDI CC number/$VCC_PITCH_BEND/$VCC_MONO}, ${2:value} )",
"signature": "set_controller(${1:MIDI CC number/$VCC_PITCH_BEND/$VCC_MONO},value)",
"signature": "set_controller(MIDI CC number/$VCC_PITCH_BEND/$VCC_MONO,value)",
"description": "send a MIDI CC, pitchbend or channel pressure value"
},
"set_rpn":
Expand Down Expand Up @@ -935,7 +935,7 @@
"mf_insert_event":
{
"snippet_string": "mf_insert_event( ${1:track}, ${2:pos}, ${3:command}, ${4:byte1}, ${5:byte2} )",
"signature": "mf_insert_event(track,pos,command,${4:byte1},${5:byte2})",
"signature": "mf_insert_event(track,pos,command,byte1,byte2)",
"description": "activates an inactive MIDI event in the MIDI object. However, because the command and position are defined in this command, it can be considered as an insertion."
},
"mf_remove_event":
Expand Down Expand Up @@ -1289,7 +1289,7 @@
"set_midi":
{
"snippet_string": "set_midi( ${1:channel}, ${2:command}, ${3:byte-1}, ${4:byte-2} )",
"signature": "set_midi(channel,command,${3:byte-1},${4:byte-2})",
"signature": "set_midi(channel,command,byte1,byte2)",
"description": "create any type of MIDI event. If you simply want to change the MIDI channel and/or any of the MIDI bytes, you can also use set_event_par()."
},
"watch_var":
Expand All @@ -1313,19 +1313,19 @@
"_delay_event_for_loading_slots":
{
"snippet_string": "_delay_event_for_loading_slots( ${1:arg1} )",
"signature": "_delay_event_for_loading_slots(${1:arg1})",
"signature": "_delay_event_for_loading_slots(arg1)",
"description": "Undocumented"
},
"cc_delivery_request":
{
"snippet_string": "cc_delivery_request( ${1:arg1} )",
"signature": "cc_delivery_request(${1:arg1})",
"signature": "cc_delivery_request(arg1)",
"description": "Undocumented"
},
"change_time_with_pitch":
{
"snippet_string": "change_time_with_pitch( ${1:arg1} )",
"signature": "change_time_with_pitch(${1:arg1})",
"signature": "change_time_with_pitch(arg1)",
"description": "Undocumented"
},
"connect_view":
Expand All @@ -1337,37 +1337,37 @@
"get_control_par_arr":
{
"snippet_string": "get_control_par_arr( ${1:arg1}, ${2:arg2}, ${3:arg3} )",
"signature": "get_control_par_arr(${1:arg1},${2:arg2},${3:arg3})",
"signature": "get_control_par_arr(arg1,arg2},arg3)",
"description": "Undocumented"
},
"get_control_par_str":
{
"snippet_string": "get_control_par_str( ${1:arg1}, ${2:arg2} )",
"signature": "get_control_par_str(${1:arg1},${2:arg2})",
"signature": "get_control_par_str(arg1},arg2)",
"description": "Undocumented"
},
"get_engine_par_disp_m":
{
"snippet_string": "get_engine_par_disp_m( ${1:arg1}, ${2:arg2}, ${3:arg3}, ${4:arg4} )",
"signature": "get_engine_par_disp_m(${1:arg1},${2:arg2},${3:arg3},${4:arg4})",
"signature": "get_engine_par_disp_m(arg1,arg2},arg3,arg4)",
"description": "Undocumented"
},
"get_engine_par_m":
{
"snippet_string": "get_engine_par_m( ${1:arg1}, ${2:arg2}, ${3:arg3}, ${4:arg4} )",
"signature": "get_engine_par_m(${1:arg1},${2:arg2},${3:arg3},${4:arg4})",
"signature": "get_engine_par_m(arg1,arg2,arg3,arg4)",
"description": "Undocumented"
},
"load_ir_sample_m":
{
"snippet_string": "load_ir_sample_m( ${1:arg1} )",
"signature": "load_ir_sample_m(${1:arg1})",
"signature": "load_ir_sample_m(arg1)",
"description": "Undocumented"
},
"load_patch":
{
"snippet_string": "load_patch( ${1:arg1}, ${2:arg2} )",
"signature": "load_patch(${1:arg1},${2:arg2})",
"signature": "load_patch(arg1,arg2)",
"description": "Undocumented"
},
"mf_get_byte_one":
Expand Down Expand Up @@ -1421,13 +1421,13 @@
"_num_slices":
{
"snippet_string": "_num_slices( ${1:arg1} )",
"signature": "_num_slices(${1:arg1})",
"signature": "_num_slices(arg1)",
"description": "Undocumented"
},
"num_slices":
{
"snippet_string": "num_slices( ${1:arg1} )",
"signature": "num_slices(${1:arg1})",
"signature": "num_slices(arg1)",
"description": "Undocumented"
},
"pgs_get_str_key_val":
Expand All @@ -1439,13 +1439,13 @@
"redirect_midi":
{
"snippet_string": "redirect_midi( ${1:arg1} )",
"signature": "redirect_midi(${1:arg1})",
"signature": "redirect_midi(arg1)",
"description": "Undocumented"
},
"redirect_output":
{
"snippet_string": "redirect_output( ${1:arg1} )",
"signature": "redirect_output(${1:arg1})",
"signature": "redirect_output(arg1)",
"description": "Undocumented"
},
"reset_engine":
Expand All @@ -1457,7 +1457,7 @@
"set_engine_par_m":
{
"snippet_string": "set_engine_par_m( ${1:arg1}, ${2:arg2}, ${3:arg3}, ${4:arg4}, ${5:arg5} )",
"signature": "set_engine_par_m(${1:arg1},${2:arg2},${3:arg3},${4:arg4},${5:arg5})",
"signature": "set_engine_par_m(arg1,arg2,arg3,arg4,arg5)",
"description": "Undocumented"
},
"show_library_tab":
Expand All @@ -1469,37 +1469,37 @@
"slice_idx_loop_end":
{
"snippet_string": "slice_idx_loop_end( ${1:arg1}, ${2:arg2} )",
"signature": "slice_idx_loop_end(${1:arg1},${2:arg2})",
"signature": "slice_idx_loop_end(arg1,arg2)",
"description": "Undocumented"
},
"slice_idx_loop_start":
{
"snippet_string": "slice_idx_loop_start( ${1:arg1}, ${2:arg2} )",
"signature": "slice_idx_loop_start(${1:arg1},${2:arg2})",
"signature": "slice_idx_loop_start(arg1,arg2)",
"description": "Undocumented"
},
"slice_length":
{
"snippet_string": "slice_length( ${1:arg1}, ${2:arg2} )",
"signature": "slice_length(${1:arg1},${2:arg2})",
"signature": "slice_length(arg1,arg2)",
"description": "Undocumented"
},
"slice_loop_count":
{
"snippet_string": "slice_loop_count( ${1:arg1}, ${2:arg2} )",
"signature": "slice_loop_count(${1:arg1},${2:arg2})",
"signature": "slice_loop_count(arg1,arg2)",
"description": "Undocumented"
},
"slice_start":
{
"snippet_string": "slice_start( ${1:arg1}, ${2:arg2} )",
"signature": "slice_start(${1:arg1},${2:arg2})",
"signature": "slice_start(arg1,arg2)",
"description": "Undocumented"
},
"unload_slot":
{
"snippet_string": "unload_slot( ${1:arg1} )",
"signature": "unload_slot(${1:arg1})",
"signature": "unload_slot(arg1)",
"description": "Undocumented"
},
};

0 comments on commit ffe98e3

Please sign in to comment.