Class LSPLibrary
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.library.Library
org.graalvm.tools.api.lsp.LSPLibrary
- All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable
public abstract class LSPLibrary
extends com.oracle.truffle.api.library.Library
LSP-specific message library.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.Children -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDocumentation(Object object) Get the documentation information about an object.static com.oracle.truffle.api.library.LibraryFactory<LSPLibrary> getSignature(Object object) Get the signature information about object representing a callable.Methods inherited from class com.oracle.truffle.api.library.Library
acceptsMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString
-
Constructor Details
-
LSPLibrary
protected LSPLibrary()
-
-
Method Details
-
getDocumentation
public Object getDocumentation(Object object) throws com.oracle.truffle.api.interop.UnsupportedMessageException Get the documentation information about an object. The returned object is either a String, or an object providingMarkupContentprotocol interface, with two memberskindandvalue. Thekindis a String literal of the markup kind, eitherplaintext, ormarkdown. Thevalueis the documentation String. If the kind ismarkdown, then the value can contain fenced code blocks like in GitHub issues. When just a String is returned,plaintextkind is assumed.- Throws:
com.oracle.truffle.api.interop.UnsupportedMessageException
-
getSignature
public Object getSignature(Object object) throws com.oracle.truffle.api.interop.UnsupportedMessageException Get the signature information about object representing a callable. The returned object has a structure that corresponds toSignatureInformationprotocol interface. TheTruffleLanguage.toString(Object, Object)should provide the String representation of the signature, displayed as a label.Description of properties of the returned object:
documentation- Either a String providing the callable documentation, or an object providingMarkupContent, seegetDocumentation(Object)for details.parameters- An array of objects representing theParameterInformationprotocol interface describing parameters of the callable signature. EveryParameterInformationobject has following properties:label- String label of this parameter (a substring of its containing signature label), or an integer array of size 2 providing inclusive start and exclusive end offsets within its containing signature label. The intended use case is to highlight the parameter label part in the signature label.documentation- Either a String providing the parameter documentation, or an object providingMarkupContent, seegetDocumentation(Object)for details.
- Throws:
com.oracle.truffle.api.interop.UnsupportedMessageException
-
getFactory
-