This repository has been archived on 2024-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
cosmos-sql-language-service/dist/providers/SqlCompletionItemProvider.js

23 lines
1.1 KiB
JavaScript
Raw Normal View History

2018-11-26 15:46:04 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SqlCompletionItemProvider = void 0;
2018-11-26 15:46:04 +00:00
var LanguageServiceFacade_1 = require("../facade/LanguageServiceFacade");
var SqlCompletionItemProvider = /** @class */ (function () {
function SqlCompletionItemProvider() {
this.triggerCharacters = [" ", "."];
}
SqlCompletionItemProvider.prototype.provideCompletionItems = function (model, position, context, token) {
2018-11-26 15:46:04 +00:00
var range = {
startLineNumber: 1,
startColumn: 1,
endLineNumber: position.lineNumber,
endColumn: position.column
};
var text = model.getValueInRange(range);
text = this.triggerCharacters.indexOf(text.charAt(text.length - 1)) < 0 ? text.substring(0, text.length - 1) : text;
return LanguageServiceFacade_1.LanguageServiceFacade.GetLanguageServiceParseResult(text, LanguageServiceFacade_1.ParseReason.GetCompletionWords);
};
return SqlCompletionItemProvider;
}());
exports.SqlCompletionItemProvider = SqlCompletionItemProvider;
//# sourceMappingURL=SqlCompletionItemProvider.js.map