1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2024-11-28 08:48:48 +02:00

Доработка подсказки параметров пользовательских методов

This commit is contained in:
salexdv 2022-05-31 07:43:31 +03:00
parent 6509b94b12
commit 14a0cfa1f0

View File

@ -5465,24 +5465,18 @@ class bslHelper {
let helper = null;
let word = this.getWordUntilOpenBracket();
if (word) {
for (const [key, value] of Object.entries(customSignatures)) {
if (key.toLowerCase() == word && value) {
let method = context.methodName.toLowerCase();
helper = {
activeParameter: this.getSignatureActiveParameter(),
activeSignature: 0,
signatures: value,
}
for (const [key, value] of Object.entries(customSignatures)) {
if (key.toLowerCase() == method && value) {
helper = {
activeParameter: context.activeParameter,
activeSignature: 0,
signatures: value,
}
}
}
return helper;
@ -5540,7 +5534,7 @@ class bslHelper {
*
* @returns {int} index
*/
getSignatureStringActiveParameter(signatureString) {
getActiveParameterFromSignatureString(signatureString) {
let is_query = (isQueryMode() || isDCSMode());
@ -5593,7 +5587,7 @@ class bslHelper {
let range = new monaco.Range(bracket.startLineNumber, bracket.startColumn + 1, this.lineNumber, this.column);
let params_text = this.model.getValueInRange(range);
context.activeParameter = this.getSignatureActiveParameter1(params_text);
context.activeParameter = this.getActiveParameterFromSignatureString(params_text);
}
context.methodName = method;