mirror of
https://github.com/salexdv/bsl_console.git
synced 2025-02-01 13:08:06 +02:00
Начало работы над подсказками для полей таблиц в запросе
This commit is contained in:
parent
14fcde21d6
commit
05a9d27403
@ -1613,6 +1613,23 @@ class bslHelper {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills array of completition for fields of querie's table
|
||||
*
|
||||
* @param {array} suggestions array of suggestions for provideCompletionItems
|
||||
*/
|
||||
getQueryFieldsCompletition(suggestions) {
|
||||
|
||||
if (this.lastExpression.endsWith('.')) {
|
||||
|
||||
// Let's find start of current query
|
||||
let match = this.model.findPreviousMatch('(?:выбрать|select)', this.position, true);
|
||||
console.log(match.range);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Completition provider for query language
|
||||
*
|
||||
@ -1631,7 +1648,7 @@ class bslHelper {
|
||||
|
||||
this.getQueryCommonCompletition(suggestions, langDef, monaco.languages.CompletionItemKind.Module);
|
||||
this.getQueryParamsCompletition(suggestions, monaco.languages.CompletionItemKind.Enum);
|
||||
|
||||
this.getQueryFieldsCompletition(suggestions);
|
||||
this.getSnippets(suggestions, querySnippets);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user