public class TextDocumentFormatUtil extends Object
| Constructor and Description |
|---|
TextDocumentFormatUtil() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.gson.JsonElement |
generateJSON(Node node,
Map<String,Node> anonStructs)
Generate json representation for the given node.
|
static com.google.gson.JsonObject |
getAST(org.eclipse.lsp4j.DocumentFormattingParams params,
WorkspaceDocumentManager documentManager,
LSContext context)
Get the AST for the current text document's content.
|
static com.google.gson.JsonArray |
getType(Node node)
Get Type of the node as an Json Array.
|
public static com.google.gson.JsonObject getAST(org.eclipse.lsp4j.DocumentFormattingParams params,
WorkspaceDocumentManager documentManager,
LSContext context)
params - Document Formatting parametersdocumentManager - Workspace document manager instancecontext - Document formatting contextJsonObject AST as a Json Objectpublic static com.google.gson.JsonElement generateJSON(Node node, Map<String,Node> anonStructs)
node - Node to get the json representationanonStructs - Map of anonymous structsJsonElement Json Representation of the nodepublic static com.google.gson.JsonArray getType(Node node)
node - Node to get the typesJsonArray Converted array valueCopyright © 2018 WSO2. All rights reserved.