Search in sources :

Example 6 with Symbols

use of org.wso2.ballerinalang.compiler.semantics.model.symbols.Symbols in project siddhi by wso2.

the class DefineTableTestCase method testQuery3.

@Test(expectedExceptions = DuplicateDefinitionException.class)
public void testQuery3() throws InterruptedException {
    log.info("testTableDefinition3 - OUT 0");
    SiddhiManager siddhiManager = new SiddhiManager();
    String tables = "define table TestTable(symbol string, price int, volume float); " + "define table TestTable(symbols string, price int, volume float); ";
    SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(tables);
    siddhiAppRuntime.shutdown();
}
Also used : SiddhiAppRuntime(org.wso2.siddhi.core.SiddhiAppRuntime) SiddhiManager(org.wso2.siddhi.core.SiddhiManager) Test(org.testng.annotations.Test)

Example 7 with Symbols

use of org.wso2.ballerinalang.compiler.semantics.model.symbols.Symbols in project ballerina by ballerina-lang.

the class Desugar method createInvocationNode.

private BLangInvocation createInvocationNode(String functionName, List<BLangExpression> args, List<BType> retTypes) {
    BLangInvocation invocationNode = (BLangInvocation) TreeBuilder.createInvocationNode();
    BLangIdentifier name = (BLangIdentifier) TreeBuilder.createIdentifierNode();
    name.setLiteral(false);
    name.setValue(functionName);
    invocationNode.name = name;
    invocationNode.pkgAlias = (BLangIdentifier) TreeBuilder.createIdentifierNode();
    // TODO: 2/28/18 need to find a good way to refer to symbols
    invocationNode.symbol = symTable.rootScope.lookup(new Name(functionName)).symbol;
    invocationNode.types = retTypes;
    invocationNode.requiredArgs = args;
    return invocationNode;
}
Also used : BLangIdentifier(org.wso2.ballerinalang.compiler.tree.BLangIdentifier) BLangInvocation(org.wso2.ballerinalang.compiler.tree.expressions.BLangInvocation) BLangXMLQName(org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLQName) Name(org.wso2.ballerinalang.compiler.util.Name)

Example 8 with Symbols

use of org.wso2.ballerinalang.compiler.semantics.model.symbols.Symbols in project ballerina by ballerina-lang.

the class PackageActionFunctionAndTypesFilter method getActionsFunctionsAndTypes.

/**
 * Get the actions, functions and types.
 * @param completionContext     Text Document Service context (Completion Context)
 * @param delimiterIndex        delimiter index (index of either . or :)
 * @return {@link ArrayList}    List of filtered symbol info
 */
private ArrayList<SymbolInfo> getActionsFunctionsAndTypes(TextDocumentServiceContext completionContext, int delimiterIndex) {
    ArrayList<SymbolInfo> actionFunctionList = new ArrayList<>();
    TokenStream tokenStream = completionContext.get(DocumentServiceKeys.TOKEN_STREAM_KEY);
    List<SymbolInfo> symbols = completionContext.get(CompletionKeys.VISIBLE_SYMBOLS_KEY);
    String packageName = tokenStream.get(delimiterIndex - 1).getText();
    // Extract the package symbol
    SymbolInfo packageSymbolInfo = symbols.stream().filter(item -> {
        Scope.ScopeEntry scopeEntry = item.getScopeEntry();
        return item.getSymbolName().equals(packageName) && scopeEntry.symbol instanceof BPackageSymbol;
    }).findFirst().orElse(null);
    if (packageSymbolInfo != null) {
        Scope.ScopeEntry packageEntry = packageSymbolInfo.getScopeEntry();
        SymbolInfo symbolInfo = new SymbolInfo(packageSymbolInfo.getSymbolName(), packageEntry);
        symbolInfo.getScopeEntry().symbol.scope.entries.forEach((name, value) -> {
            if ((value.symbol instanceof BInvokableSymbol && ((BInvokableSymbol) value.symbol).receiverSymbol == null) || (value.symbol instanceof BTypeSymbol && !(value.symbol instanceof BPackageSymbol))) {
                actionFunctionList.add(new SymbolInfo(name.toString(), value));
            }
        });
    }
    return actionFunctionList;
}
Also used : BPackageSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol) TokenStream(org.antlr.v4.runtime.TokenStream) Scope(org.wso2.ballerinalang.compiler.semantics.model.Scope) ArrayList(java.util.ArrayList) BInvokableSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BInvokableSymbol) BTypeSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BTypeSymbol) SymbolInfo(org.ballerinalang.langserver.completions.SymbolInfo)

Example 9 with Symbols

use of org.wso2.ballerinalang.compiler.semantics.model.symbols.Symbols in project ballerina by ballerina-lang.

the class PackageActionFunctionAndTypesFilter method invocationsAndFieldsOnIdentifier.

/**
 * Get the invocations and fields against an identifier (functions, struct fields and types including the enums).
 * @param context     Text Document Service context (Completion Context)
 * @param delimiterIndex        delimiter index (index of either . or :)
 * @return {@link ArrayList}    List of filtered symbol info
 */
private ArrayList<SymbolInfo> invocationsAndFieldsOnIdentifier(TextDocumentServiceContext context, int delimiterIndex) {
    ArrayList<SymbolInfo> actionFunctionList = new ArrayList<>();
    TokenStream tokenStream = context.get(DocumentServiceKeys.TOKEN_STREAM_KEY);
    List<SymbolInfo> symbols = context.get(CompletionKeys.VISIBLE_SYMBOLS_KEY);
    SymbolTable symbolTable = context.get(DocumentServiceKeys.SYMBOL_TABLE_KEY);
    String variableName = CommonUtil.getPreviousDefaultToken(tokenStream, delimiterIndex).getText();
    SymbolInfo variable = this.getVariableByName(variableName, symbols);
    String builtinPkgName = symbolTable.builtInPackageSymbol.name.getValue();
    Map<Name, Scope.ScopeEntry> entries = new HashMap<>();
    String currentPkgName = context.get(DocumentServiceKeys.CURRENT_PACKAGE_NAME_KEY);
    if (variable == null) {
        return actionFunctionList;
    }
    String packageID;
    BType bType = variable.getScopeEntry().symbol.getType();
    String bTypeValue;
    if (variable.getScopeEntry().symbol instanceof BEndpointVarSymbol) {
        BType getClientFuncType = ((BEndpointVarSymbol) variable.getScopeEntry().symbol).getClientFunction.type;
        if (!UtilSymbolKeys.ACTION_INVOCATION_SYMBOL_KEY.equals(tokenStream.get(delimiterIndex).getText()) || !(getClientFuncType instanceof BInvokableType)) {
            return actionFunctionList;
        }
        BType boundType = ((BInvokableType) getClientFuncType).retTypes.get(0);
        packageID = boundType.tsymbol.pkgID.toString();
        bTypeValue = boundType.toString();
    } else if (bType instanceof BArrayType) {
        packageID = ((BArrayType) bType).eType.tsymbol.pkgID.toString();
        bTypeValue = bType.toString();
    } else {
        packageID = bType.tsymbol.pkgID.toString();
        bTypeValue = bType.toString();
    }
    // Extract the package symbol. This is used to extract the entries of the particular package
    SymbolInfo packageSymbolInfo = symbols.stream().filter(item -> {
        Scope.ScopeEntry scopeEntry = item.getScopeEntry();
        return (scopeEntry.symbol instanceof BPackageSymbol) && scopeEntry.symbol.pkgID.toString().equals(packageID);
    }).findFirst().orElse(null);
    if (packageSymbolInfo == null && packageID.equals(builtinPkgName)) {
        // If the packageID is ballerina.builtin, we extract entries of builtin package
        entries = symbolTable.builtInPackageSymbol.scope.entries;
    } else if (packageSymbolInfo == null && packageID.equals(currentPkgName)) {
        entries = this.getScopeEntries(bType, context);
    } else if (packageSymbolInfo != null) {
        // If the package exist, we extract particular entries from package
        entries = packageSymbolInfo.getScopeEntry().symbol.scope.entries;
    }
    entries.forEach((name, scopeEntry) -> {
        if (scopeEntry.symbol instanceof BInvokableSymbol && ((BInvokableSymbol) scopeEntry.symbol).receiverSymbol != null) {
            String symbolBoundedName = ((BInvokableSymbol) scopeEntry.symbol).receiverSymbol.getType().toString();
            if (symbolBoundedName.equals(bTypeValue)) {
                // TODO: Need to handle the name in a proper manner
                String[] nameComponents = name.toString().split("\\.");
                SymbolInfo actionFunctionSymbol = new SymbolInfo(nameComponents[nameComponents.length - 1], scopeEntry);
                actionFunctionList.add(actionFunctionSymbol);
            }
        } else if ((scopeEntry.symbol instanceof BTypeSymbol) && bTypeValue.equals(scopeEntry.symbol.type.toString())) {
            // Get the struct fields
            Map<Name, Scope.ScopeEntry> fields = scopeEntry.symbol.scope.entries;
            fields.forEach((fieldName, fieldScopeEntry) -> {
                actionFunctionList.add(new SymbolInfo(fieldName.getValue(), fieldScopeEntry));
            });
        }
    });
    // Populate possible iterable operators over the variable
    populateIterableOperations(variable, actionFunctionList);
    return actionFunctionList;
}
Also used : CommonUtil(org.ballerinalang.langserver.common.utils.CommonUtil) BInvokableType(org.wso2.ballerinalang.compiler.semantics.model.types.BInvokableType) Arrays(java.util.Arrays) BMapType(org.wso2.ballerinalang.compiler.semantics.model.types.BMapType) TokenStream(org.antlr.v4.runtime.TokenStream) Token(org.antlr.v4.runtime.Token) BIntermediateCollectionType(org.wso2.ballerinalang.compiler.semantics.model.types.BIntermediateCollectionType) ItemResolverConstants(org.ballerinalang.langserver.completions.util.ItemResolverConstants) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) BTypeSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BTypeSymbol) BXMLType(org.wso2.ballerinalang.compiler.semantics.model.types.BXMLType) SymbolInfo(org.ballerinalang.langserver.completions.SymbolInfo) Map(java.util.Map) Snippet(org.ballerinalang.langserver.completions.util.Snippet) SymbolKind(org.ballerinalang.model.symbols.SymbolKind) BType(org.wso2.ballerinalang.compiler.semantics.model.types.BType) CompletionKeys(org.ballerinalang.langserver.completions.CompletionKeys) BInvokableSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BInvokableSymbol) BArrayType(org.wso2.ballerinalang.compiler.semantics.model.types.BArrayType) DocumentServiceKeys(org.ballerinalang.langserver.DocumentServiceKeys) TextDocumentServiceContext(org.ballerinalang.langserver.TextDocumentServiceContext) BJSONType(org.wso2.ballerinalang.compiler.semantics.model.types.BJSONType) BPackageSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol) Collectors(java.util.stream.Collectors) Name(org.wso2.ballerinalang.compiler.util.Name) List(java.util.List) Scope(org.wso2.ballerinalang.compiler.semantics.model.Scope) BTableType(org.wso2.ballerinalang.compiler.semantics.model.types.BTableType) BEndpointVarSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BEndpointVarSymbol) UtilSymbolKeys(org.ballerinalang.langserver.common.UtilSymbolKeys) SymbolTable(org.wso2.ballerinalang.compiler.semantics.model.SymbolTable) TokenStream(org.antlr.v4.runtime.TokenStream) BArrayType(org.wso2.ballerinalang.compiler.semantics.model.types.BArrayType) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) SymbolTable(org.wso2.ballerinalang.compiler.semantics.model.SymbolTable) BInvokableSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BInvokableSymbol) BInvokableType(org.wso2.ballerinalang.compiler.semantics.model.types.BInvokableType) BTypeSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BTypeSymbol) SymbolInfo(org.ballerinalang.langserver.completions.SymbolInfo) Name(org.wso2.ballerinalang.compiler.util.Name) BPackageSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol) BEndpointVarSymbol(org.wso2.ballerinalang.compiler.semantics.model.symbols.BEndpointVarSymbol) Scope(org.wso2.ballerinalang.compiler.semantics.model.Scope) BType(org.wso2.ballerinalang.compiler.semantics.model.types.BType) HashMap(java.util.HashMap) Map(java.util.Map)

Example 10 with Symbols

use of org.wso2.ballerinalang.compiler.semantics.model.symbols.Symbols in project ballerina by ballerina-lang.

the class BallerinaParserService method generateJSON.

public static JsonElement generateJSON(Node node, Map<String, Node> anonStructs) throws InvocationTargetException, IllegalAccessException {
    if (node == null) {
        return JsonNull.INSTANCE;
    }
    Set<Method> methods = ClassUtils.getAllInterfaces(node.getClass()).stream().flatMap(aClass -> Arrays.stream(aClass.getMethods())).collect(Collectors.toSet());
    JsonObject nodeJson = new JsonObject();
    JsonArray wsJsonArray = new JsonArray();
    Set<Whitespace> ws = node.getWS();
    if (ws != null && !ws.isEmpty()) {
        for (Whitespace whitespace : ws) {
            JsonObject wsJson = new JsonObject();
            wsJson.addProperty("ws", whitespace.getWs());
            wsJson.addProperty("i", whitespace.getIndex());
            wsJson.addProperty("text", whitespace.getPrevious());
            wsJson.addProperty("static", whitespace.isStatic());
            wsJsonArray.add(wsJson);
        }
        nodeJson.add("ws", wsJsonArray);
    }
    Diagnostic.DiagnosticPosition position = node.getPosition();
    if (position != null) {
        JsonObject positionJson = new JsonObject();
        positionJson.addProperty("startColumn", position.getStartColumn());
        positionJson.addProperty("startLine", position.getStartLine());
        positionJson.addProperty("endColumn", position.getEndColumn());
        positionJson.addProperty("endLine", position.getEndLine());
        nodeJson.add("position", positionJson);
    }
    /* Virtual props */
    JsonArray type = getType(node);
    if (type != null) {
        nodeJson.add(SYMBOL_TYPE, type);
    }
    if (node.getKind() == NodeKind.INVOCATION) {
        assert node instanceof BLangInvocation : node.getClass();
        BLangInvocation invocation = (BLangInvocation) node;
        if (invocation.symbol != null && invocation.symbol.kind != null) {
            nodeJson.addProperty(INVOCATION_TYPE, invocation.symbol.kind.toString());
        }
    }
    for (Method m : methods) {
        String name = m.getName();
        if (name.equals("getWS") || name.equals("getPosition")) {
            continue;
        }
        String jsonName;
        if (name.startsWith("get")) {
            jsonName = toJsonName(name, 3);
        } else if (name.startsWith("is")) {
            jsonName = toJsonName(name, 2);
        } else {
            continue;
        }
        Object prop = m.invoke(node);
        /* Literal class - This class is escaped in backend to address cases like "ss\"" and 8.0 and null */
        if (node.getKind() == NodeKind.LITERAL && "value".equals(jsonName)) {
            if (prop instanceof String) {
                nodeJson.addProperty(jsonName, '"' + StringEscapeUtils.escapeJava((String) prop) + '"');
                nodeJson.addProperty(UNESCAPED_VALUE, String.valueOf(prop));
            } else {
                nodeJson.addProperty(jsonName, String.valueOf(prop));
            }
            continue;
        }
        if (node.getKind() == NodeKind.ANNOTATION && node instanceof BLangAnnotation) {
            JsonArray attachmentPoints = new JsonArray();
            ((BLangAnnotation) node).getAttachmentPoints().stream().map(BLangAnnotationAttachmentPoint::getAttachmentPoint).map(BLangAnnotationAttachmentPoint.AttachmentPoint::getValue).map(JsonPrimitive::new).forEach(attachmentPoints::add);
            nodeJson.add("attachmentPoints", attachmentPoints);
        }
        if (node.getKind() == NodeKind.USER_DEFINED_TYPE && jsonName.equals("typeName")) {
            IdentifierNode typeNode = (IdentifierNode) prop;
            Node structNode;
            if (typeNode.getValue().startsWith("$anonStruct$") && (structNode = anonStructs.remove(typeNode.getValue())) != null) {
                JsonObject anonStruct = generateJSON(structNode, anonStructs).getAsJsonObject();
                anonStruct.addProperty("anonStruct", true);
                nodeJson.add("anonStruct", anonStruct);
                continue;
            }
        }
        if (prop instanceof List && jsonName.equals("types")) {
            // Currently we don't need any Symbols for the UI. So skipping for now.
            continue;
        }
        /* Node classes */
        if (prop instanceof Node) {
            nodeJson.add(jsonName, generateJSON((Node) prop, anonStructs));
        } else if (prop instanceof List) {
            List listProp = (List) prop;
            JsonArray listPropJson = new JsonArray();
            nodeJson.add(jsonName, listPropJson);
            for (Object listPropItem : listProp) {
                if (listPropItem instanceof Node) {
                    /* Remove top level anon func and struct */
                    if (node.getKind() == NodeKind.COMPILATION_UNIT) {
                        if (listPropItem instanceof BLangStruct && ((BLangStruct) listPropItem).isAnonymous) {
                            anonStructs.put(((BLangStruct) listPropItem).getName().getValue(), ((BLangStruct) listPropItem));
                            continue;
                        }
                        if (listPropItem instanceof BLangFunction && (((BLangFunction) listPropItem)).name.value.startsWith("$lambda$")) {
                            continue;
                        }
                    }
                    listPropJson.add(generateJSON((Node) listPropItem, anonStructs));
                } else {
                    logger.debug("Can't serialize " + jsonName + ", has a an array of " + listPropItem);
                }
            }
        /* Runtime model classes */
        } else if (prop instanceof Set && jsonName.equals("flags")) {
            Set flags = (Set) prop;
            for (Flag flag : Flag.values()) {
                nodeJson.addProperty(StringUtils.lowerCase(flag.toString()), flags.contains(flag));
            }
        } else if (prop instanceof Set) {
            // TODO : limit this else if to getInputs getOutputs of transform.
            Set vars = (Set) prop;
            JsonArray listVarJson = new JsonArray();
            nodeJson.add(jsonName, listVarJson);
            for (Object obj : vars) {
                listVarJson.add(obj.toString());
            }
        } else if (prop instanceof NodeKind) {
            String kindName = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, prop.toString());
            nodeJson.addProperty(jsonName, kindName);
        } else if (prop instanceof OperatorKind) {
            nodeJson.addProperty(jsonName, prop.toString());
        /* Generic classes */
        } else if (prop instanceof String) {
            nodeJson.addProperty(jsonName, (String) prop);
        } else if (prop instanceof Number) {
            nodeJson.addProperty(jsonName, (Number) prop);
        } else if (prop instanceof Boolean) {
            nodeJson.addProperty(jsonName, (Boolean) prop);
        } else if (prop instanceof Enum) {
            nodeJson.addProperty(jsonName, StringUtils.lowerCase(((Enum) prop).name()));
        } else if (prop != null) {
            nodeJson.addProperty(jsonName, prop.toString());
            String message = "Node " + node.getClass().getSimpleName() + " contains unknown type prop: " + jsonName + " of type " + prop.getClass();
            logger.error(message);
        }
    }
    return nodeJson;
}
Also used : JsonObject(com.google.gson.JsonObject) Arrays(java.util.Arrays) Produces(javax.ws.rs.Produces) LoggerFactory(org.slf4j.LoggerFactory) Path(javax.ws.rs.Path) StringUtils(org.apache.commons.lang3.StringUtils) ClassUtils(org.apache.commons.lang3.ClassUtils) Diagnostic(org.ballerinalang.util.diagnostic.Diagnostic) MediaType(javax.ws.rs.core.MediaType) OperatorKind(org.ballerinalang.model.tree.OperatorKind) Flag(org.ballerinalang.model.elements.Flag) IdentifierNode(org.ballerinalang.model.tree.IdentifierNode) Consumes(javax.ws.rs.Consumes) Gson(com.google.gson.Gson) Map(java.util.Map) BLangCompilationUnit(org.wso2.ballerinalang.compiler.tree.BLangCompilationUnit) StringEscapeUtils(org.apache.commons.lang3.StringEscapeUtils) BLangAnnotationAttachmentPoint(org.wso2.ballerinalang.compiler.tree.BLangAnnotationAttachmentPoint) Method(java.lang.reflect.Method) BLangFragmentParser(org.ballerinalang.composer.service.ballerina.parser.service.util.BLangFragmentParser) ServiceType(org.ballerinalang.composer.server.spi.ServiceType) Set(java.util.Set) Collectors(java.util.stream.Collectors) InvocationTargetException(java.lang.reflect.InvocationTargetException) TextDocumentServiceUtil(org.ballerinalang.langserver.TextDocumentServiceUtil) BLangNode(org.wso2.ballerinalang.compiler.tree.BLangNode) Whitespace(org.ballerinalang.model.Whitespace) JsonArray(com.google.gson.JsonArray) List(java.util.List) ServerConstants(org.ballerinalang.composer.server.core.ServerConstants) NodeKind(org.ballerinalang.model.tree.NodeKind) Response(javax.ws.rs.core.Response) BLangSourceFragment(org.ballerinalang.composer.service.ballerina.parser.service.model.BLangSourceFragment) Optional(java.util.Optional) ServiceInfo(org.ballerinalang.composer.server.spi.ServiceInfo) BallerinaFile(org.ballerinalang.composer.service.ballerina.parser.service.model.BallerinaFile) GET(javax.ws.rs.GET) BLangAnnotation(org.wso2.ballerinalang.compiler.tree.BLangAnnotation) BFile(org.ballerinalang.composer.service.ballerina.parser.service.model.BFile) HashMap(java.util.HashMap) JsonParser(com.google.gson.JsonParser) ParserUtils(org.ballerinalang.composer.service.ballerina.parser.service.util.ParserUtils) JsonElement(com.google.gson.JsonElement) ComposerService(org.ballerinalang.composer.server.spi.ComposerService) BType(org.wso2.ballerinalang.compiler.semantics.model.types.BType) Constants(org.ballerinalang.composer.service.ballerina.parser.Constants) JsonPrimitive(com.google.gson.JsonPrimitive) BLangPackage(org.wso2.ballerinalang.compiler.tree.BLangPackage) Logger(org.slf4j.Logger) POST(javax.ws.rs.POST) CaseFormat(com.google.common.base.CaseFormat) ModelPackage(org.ballerinalang.composer.service.ballerina.parser.service.model.lang.ModelPackage) IOException(java.io.IOException) OPTIONS(javax.ws.rs.OPTIONS) BLangFunction(org.wso2.ballerinalang.compiler.tree.BLangFunction) Paths(java.nio.file.Paths) Node(org.ballerinalang.model.tree.Node) BLangInvocation(org.wso2.ballerinalang.compiler.tree.expressions.BLangInvocation) JsonNull(com.google.gson.JsonNull) HttpHeaderNames(io.netty.handler.codec.http.HttpHeaderNames) BLangStruct(org.wso2.ballerinalang.compiler.tree.BLangStruct) Set(java.util.Set) IdentifierNode(org.ballerinalang.model.tree.IdentifierNode) BLangNode(org.wso2.ballerinalang.compiler.tree.BLangNode) Node(org.ballerinalang.model.tree.Node) JsonObject(com.google.gson.JsonObject) Diagnostic(org.ballerinalang.util.diagnostic.Diagnostic) BLangStruct(org.wso2.ballerinalang.compiler.tree.BLangStruct) Whitespace(org.ballerinalang.model.Whitespace) NodeKind(org.ballerinalang.model.tree.NodeKind) BLangAnnotation(org.wso2.ballerinalang.compiler.tree.BLangAnnotation) List(java.util.List) BLangInvocation(org.wso2.ballerinalang.compiler.tree.expressions.BLangInvocation) BLangFunction(org.wso2.ballerinalang.compiler.tree.BLangFunction) IdentifierNode(org.ballerinalang.model.tree.IdentifierNode) Method(java.lang.reflect.Method) BLangAnnotationAttachmentPoint(org.wso2.ballerinalang.compiler.tree.BLangAnnotationAttachmentPoint) Flag(org.ballerinalang.model.elements.Flag) JsonArray(com.google.gson.JsonArray) OperatorKind(org.ballerinalang.model.tree.OperatorKind) JsonObject(com.google.gson.JsonObject)

Aggregations

ArrayList (java.util.ArrayList)6 BPackageSymbol (org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol)5 BLangNode (org.wso2.ballerinalang.compiler.tree.BLangNode)5 BLangPackage (org.wso2.ballerinalang.compiler.tree.BLangPackage)5 List (java.util.List)4 Map (java.util.Map)4 JsonObject (com.google.gson.JsonObject)3 Paths (java.nio.file.Paths)3 Arrays (java.util.Arrays)3 HashMap (java.util.HashMap)3 Collectors (java.util.stream.Collectors)3 TokenStream (org.antlr.v4.runtime.TokenStream)3 TextDocumentServiceContext (org.ballerinalang.langserver.TextDocumentServiceContext)3 CompletionCustomErrorStrategy (org.ballerinalang.langserver.completions.CompletionCustomErrorStrategy)3 SymbolInfo (org.ballerinalang.langserver.completions.SymbolInfo)3 TreeVisitor (org.ballerinalang.langserver.completions.TreeVisitor)3 BInvokableSymbol (org.wso2.ballerinalang.compiler.semantics.model.symbols.BInvokableSymbol)3 BType (org.wso2.ballerinalang.compiler.semantics.model.types.BType)3 BLangCompilationUnit (org.wso2.ballerinalang.compiler.tree.BLangCompilationUnit)3 BLangInvocation (org.wso2.ballerinalang.compiler.tree.expressions.BLangInvocation)3