public class CompletionUtil extends Object
Constructor and Description |
---|
CompletionUtil() |
Modifier and Type | Method and Description |
---|---|
static List<org.eclipse.lsp4j.CompletionItem> |
getCompletionItems(LSServiceOperationContext completionContext)
Get the completion Items for the context.
|
static String |
getDelimiterTokenFromLineSegment(LSServiceOperationContext context,
String lineSegment)
Get the token at cursor column for the given line segment.
|
static int |
getDelimiterTokenIndexFromLineSegment(LSServiceOperationContext context,
String lineSegment)
Get the delimiter index from the line segment given.
|
static String |
getPreviousTokenFromLineSegment(String lineSegment,
int pivotIndex)
Get the previous token from the line segment.
|
static void |
resolveSymbols(LSServiceOperationContext completionContext,
BLangPackage bLangPackage)
Resolve the visible symbols from the given BLang Package and the current context.
|
public static void resolveSymbols(LSServiceOperationContext completionContext, BLangPackage bLangPackage)
completionContext
- Completion Service ContextbLangPackage
- BLang Packagepublic static List<org.eclipse.lsp4j.CompletionItem> getCompletionItems(LSServiceOperationContext completionContext)
completionContext
- Completion contextList
List of resolved completion Itemspublic static String getDelimiterTokenFromLineSegment(LSServiceOperationContext context, String lineSegment)
context
- Service Operation contextlineSegment
- Line segmentString
token extracted from line segmentpublic static int getDelimiterTokenIndexFromLineSegment(LSServiceOperationContext context, String lineSegment)
context
- Service operation contextlineSegment
- line segmentInteger
delimiter indexCopyright © 2018 WSO2. All rights reserved.