public abstract class AbstractItemResolver extends Object
Constructor and Description |
---|
AbstractItemResolver() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isAnnotationContext(LSServiceOperationContext ctx)
Check whether the token stream contains an annotation start (@).
|
protected boolean |
isInvocationOrFieldAccess(LSServiceOperationContext documentServiceContext)
Check whether the token stream corresponds to a action invocation or a function invocation.
|
protected void |
populateBasicTypes(List<org.eclipse.lsp4j.CompletionItem> completionItems,
List<SymbolInfo> visibleSymbols) |
org.eclipse.lsp4j.CompletionItem |
populateBTypeCompletionItem(SymbolInfo symbolInfo)
Populate the BType Completion Item.
|
protected org.eclipse.lsp4j.CompletionItem |
populateCompletionItem(String insertText,
String type,
String label)
Populate a completion item with the given data and return it.
|
protected void |
populateCompletionItemList(List<SymbolInfo> symbolInfoList,
List<org.eclipse.lsp4j.CompletionItem> completionItems)
Populate the completion item list by considering the.
|
protected List<SymbolInfo> |
removeInvalidStatementScopeSymbols(List<SymbolInfo> symbolInfoList)
Remove the invalid symbols such as anon types, injected packages and invokable symbols without receiver.
|
abstract ArrayList<org.eclipse.lsp4j.CompletionItem> |
resolveItems(LSServiceOperationContext completionContext) |
public abstract ArrayList<org.eclipse.lsp4j.CompletionItem> resolveItems(LSServiceOperationContext completionContext)
protected void populateCompletionItemList(List<SymbolInfo> symbolInfoList, List<org.eclipse.lsp4j.CompletionItem> completionItems)
symbolInfoList
- - list of symbol informationcompletionItems
- - completion item list to populatepublic org.eclipse.lsp4j.CompletionItem populateBTypeCompletionItem(SymbolInfo symbolInfo)
symbolInfo
- - symbol informationprotected boolean isInvocationOrFieldAccess(LSServiceOperationContext documentServiceContext)
documentServiceContext
- - Completion operation contextBoolean
protected boolean isAnnotationContext(LSServiceOperationContext ctx)
ctx
- - Completion operation contextBoolean
protected org.eclipse.lsp4j.CompletionItem populateCompletionItem(String insertText, String type, String label)
insertText
- insert texttype
- type of the completion itemlabel
- completion item labelCompletionItem
protected void populateBasicTypes(List<org.eclipse.lsp4j.CompletionItem> completionItems, List<SymbolInfo> visibleSymbols)
protected List<SymbolInfo> removeInvalidStatementScopeSymbols(List<SymbolInfo> symbolInfoList)
symbolInfoList
- Symbol info list to be filteredList
List of filtered symbolsCopyright © 2018 WSO2. All rights reserved.