use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BAnnotationSymbol in project ballerina by ballerina-lang.
the class AbstractItemResolver method populateCompletionItemList.
/**
* Populate the completion item list by considering the.
* @param symbolInfoList - list of symbol information
* @param completionItems - completion item list to populate
*/
protected void populateCompletionItemList(List<SymbolInfo> symbolInfoList, List<CompletionItem> completionItems) {
symbolInfoList.forEach(symbolInfo -> {
CompletionItem completionItem = null;
BSymbol bSymbol = symbolInfo.getScopeEntry() != null ? symbolInfo.getScopeEntry().symbol : null;
if ((bSymbol instanceof BInvokableSymbol && ((BInvokableSymbol) bSymbol).kind != null && !((BInvokableSymbol) bSymbol).kind.equals(SymbolKind.WORKER)) || symbolInfo.isIterableOperation()) {
completionItem = this.populateBallerinaFunctionCompletionItem(symbolInfo);
} else if (!(bSymbol instanceof BInvokableSymbol) && bSymbol instanceof BVarSymbol) {
completionItem = this.populateVariableDefCompletionItem(symbolInfo);
} else if (bSymbol instanceof BTypeSymbol && !bSymbol.getName().getValue().equals(UtilSymbolKeys.NOT_FOUND_TYPE) && !(bSymbol instanceof BAnnotationSymbol)) {
completionItem = this.populateBTypeCompletionItem(symbolInfo);
}
if (completionItem != null) {
completionItems.add(completionItem);
}
});
}
Aggregations