public class HoverUtil extends Object
Constructor and Description |
---|
HoverUtil() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.lsp4j.Hover |
getHoverContent(LSServiceOperationContext hoverContext,
BLangPackage currentBLangPackage)
get current hover content.
|
static DiagnosticPos |
getIdentifierPosition(BLangEndpoint endpointNode)
Calculate and returns identifier position of this BLangEndpoint.
|
static DiagnosticPos |
getIdentifierPosition(BLangFunction bLangFunction)
Calculate and returns identifier position of this BLangFunction.
|
static DiagnosticPos |
getIdentifierPosition(BLangResource resource)
Calculate and returns identifier position of this BLangResource.
|
static DiagnosticPos |
getIdentifierPosition(BLangService serviceNode)
Calculate and returns identifier position of this BLangService.
|
static DiagnosticPos |
getIdentifierPosition(BLangSimpleVariable varNode)
Calculate and returns identifier position of this BlangVariable.
|
static boolean |
isMatchingPosition(DiagnosticPos nodePosition,
org.eclipse.lsp4j.Position textPosition)
check whether given position matches the given node's position.
|
public static boolean isMatchingPosition(DiagnosticPos nodePosition, org.eclipse.lsp4j.Position textPosition)
nodePosition
- position of the current node.textPosition
- position to be matched.Boolean
return true if position are a match else return false.public static org.eclipse.lsp4j.Hover getHoverContent(LSServiceOperationContext hoverContext, BLangPackage currentBLangPackage)
hoverContext
- text document context for the hover provider.currentBLangPackage
- package which currently user working on.Hover
return Hover object.public static DiagnosticPos getIdentifierPosition(BLangEndpoint endpointNode)
endpointNode
- BLangEndpoint
public static DiagnosticPos getIdentifierPosition(BLangFunction bLangFunction)
bLangFunction
- BLangFunction
public static DiagnosticPos getIdentifierPosition(BLangService serviceNode)
serviceNode
- BLangService
public static DiagnosticPos getIdentifierPosition(BLangResource resource)
resource
- BLangResource
public static DiagnosticPos getIdentifierPosition(BLangSimpleVariable varNode)
varNode
- BLangSimpleVariableCopyright © 2019 WSO2. All rights reserved.