本文整理汇总了TypeScript中vs/editor/common/services/editorWorkerService.IEditorWorkerService.textualSuggest方法的典型用法代码示例。如果您正苦于以下问题:TypeScript IEditorWorkerService.textualSuggest方法的具体用法?TypeScript IEditorWorkerService.textualSuggest怎么用?TypeScript IEditorWorkerService.textualSuggest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/editor/common/services/editorWorkerService.IEditorWorkerService
的用法示例。
在下文中一共展示了IEditorWorkerService.textualSuggest方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: _addSuggestionsAtPosition
suggest: (resource, position) => {
return editorWorkerService.textualSuggest(resource, position).then((textualSuggestions) => {
let model = modelService.getModel(resource);
let result = _addSuggestionsAtPosition(model, position, predefined, textualSuggestions);
return result;
});
}
示例2: suggest
public suggest(resource: URI, position: IPosition, triggerCharacter?: string): TPromise<ISuggestResult[]> {
return this._editorWorkerService.textualSuggest(resource, position);
}
示例3: provideCompletionItems
public provideCompletionItems(model:IReadOnlyModel, position:Position, token:CancellationToken): Thenable<ISuggestResult> {
let config = this._configurationService.getConfiguration<{ wordBasedSuggestions: boolean }>('editor');
if (!config || config.wordBasedSuggestions) {
return wireCancellationToken(token, this._editorWorkerService.textualSuggest(model.uri, position));
}
}