mirror of
https://github.com/salexdv/bsl_console.git
synced 2025-02-21 19:19:40 +02:00
Доработка подсказки параметров методов определяемых по ссылке
This commit is contained in:
parent
1553a16631
commit
f0e73d5e89
@ -5487,41 +5487,33 @@ class bslHelper {
|
|||||||
* Fills signatures provided for reference-type object
|
* Fills signatures provided for reference-type object
|
||||||
* if a reference was found in the previous position
|
* if a reference was found in the previous position
|
||||||
*
|
*
|
||||||
|
* @param {SignatureHelpContext} context signature help context
|
||||||
|
*
|
||||||
* @return {SignatureHelp} helper with signatures
|
* @return {SignatureHelp} helper with signatures
|
||||||
*/
|
*/
|
||||||
getRefSigHelp() {
|
getRefSigHelp(context) {
|
||||||
|
|
||||||
let helper = null;
|
let helper = null;
|
||||||
|
|
||||||
let match = Finder.findPreviousMatch(this.model, '\\(', this.position);
|
const position = context.methodPosition;
|
||||||
|
|
||||||
if (match) {
|
let lineContextData = contextData.get(position.lineNumber)
|
||||||
|
let method = context.methodName.split('.').pop(0);
|
||||||
|
let wordContext = null;
|
||||||
|
|
||||||
const position = new monaco.Position(match.range.startLineNumber, match.range.startColumn);
|
if (lineContextData) {
|
||||||
|
|
||||||
if (position.lineNumber = this.lineNumber) {
|
wordContext = lineContextData.get(method.toLowerCase());
|
||||||
|
|
||||||
let lineContextData = contextData.get(position.lineNumber)
|
if (wordContext && wordContext.sig) {
|
||||||
let wordContext = null;
|
|
||||||
|
|
||||||
if (lineContextData) {
|
helper = {
|
||||||
|
activeParameter: context.activeParameter,
|
||||||
let wordUntil = this.model.getWordUntilPosition(position);
|
activeSignature: 0,
|
||||||
wordContext = lineContextData.get(wordUntil.word.toLowerCase());
|
signatures: wordContext.sig,
|
||||||
|
|
||||||
if (wordContext && wordContext.sig) {
|
|
||||||
|
|
||||||
helper = {
|
|
||||||
activeParameter: this.getSignatureActiveParameter(),
|
|
||||||
activeSignature: 0,
|
|
||||||
signatures: wordContext.sig,
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return helper;
|
return helper;
|
||||||
@ -5614,7 +5606,7 @@ class bslHelper {
|
|||||||
if (!editor.disableNativeSignatures) {
|
if (!editor.disableNativeSignatures) {
|
||||||
|
|
||||||
if (!helper)
|
if (!helper)
|
||||||
helper = this.getRefSigHelp();
|
helper = this.getRefSigHelp(context);
|
||||||
|
|
||||||
if (!helper)
|
if (!helper)
|
||||||
helper = this.getMetadataSigHelp(bslMetadata);
|
helper = this.getMetadataSigHelp(bslMetadata);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user