Search in sources :

Example 11 with TypeNameNode

use of org.ballerinalang.plugins.idea.psi.TypeNameNode in project ballerina by ballerina-lang.

the class BallerinaCompletionUtils method createFieldLookupElements.

@NotNull
public static List<LookupElement> createFieldLookupElements(@NotNull Collection<FieldDefinitionNode> fieldDefinitionNodes, @NotNull IdentifierPSINode definitionName, @Nullable InsertHandler<LookupElement> insertHandler) {
    List<LookupElement> lookupElements = new LinkedList<>();
    for (FieldDefinitionNode fieldDefinitionNode : fieldDefinitionNodes) {
        IdentifierPSINode fieldName = PsiTreeUtil.getChildOfType(fieldDefinitionNode, IdentifierPSINode.class);
        TypeNameNode fieldType = PsiTreeUtil.getChildOfType(fieldDefinitionNode, TypeNameNode.class);
        if (fieldName == null || fieldType == null) {
            continue;
        }
        LookupElement lookupElement = BallerinaCompletionUtils.createFieldLookupElement(fieldName, fieldType, definitionName, insertHandler);
        lookupElements.add(lookupElement);
    }
    return lookupElements;
}
Also used : TypeNameNode(org.ballerinalang.plugins.idea.psi.TypeNameNode) IdentifierPSINode(org.ballerinalang.plugins.idea.psi.IdentifierPSINode) FieldDefinitionNode(org.ballerinalang.plugins.idea.psi.FieldDefinitionNode) LookupElement(com.intellij.codeInsight.lookup.LookupElement) PrioritizedLookupElement(com.intellij.codeInsight.completion.PrioritizedLookupElement) LinkedList(java.util.LinkedList) NotNull(org.jetbrains.annotations.NotNull)

Example 12 with TypeNameNode

use of org.ballerinalang.plugins.idea.psi.TypeNameNode in project ballerina by ballerina-lang.

the class BallerinaRunUtil method isMainFunction.

/**
 * Checks whether the given functionDefinitionNode is a main function node.
 *
 * @param functionDefinitionNode FunctionDefinitionNode which needs to be checked
 * @return {@code true} if the provided node is a main function, {@code false} otherwise.
 */
@Contract("null -> false")
static boolean isMainFunction(FunctionDefinitionNode functionDefinitionNode) {
    // Get the function name.
    PsiElement functionName = functionDefinitionNode.getNameIdentifier();
    if (functionName == null) {
        return false;
    }
    // Check whether the function name is "main".
    if (!BallerinaConstants.MAIN.equals(functionName.getText())) {
        return false;
    }
    // Get the ParameterListNode which contains all the parameters in the function.
    FormalParameterListNode parameterListNode = PsiTreeUtil.getChildOfType(functionDefinitionNode, FormalParameterListNode.class);
    if (parameterListNode == null) {
        return false;
    }
    // Get the child nodes. These are objects of ParameterNode.
    PsiElement[] parameterNodes = parameterListNode.getChildren();
    // There should be only one parameter for main function.
    if (parameterNodes.length != 1) {
        return false;
    }
    // Get the TypeNameNode which contains the type of the parameter. In this case, it will be "string[]".
    TypeNameNode arrayTypeNameNode = PsiTreeUtil.findChildOfType(parameterNodes[0], TypeNameNode.class);
    if (arrayTypeNameNode == null) {
        return false;
    }
    // "string", "[", "]" will be in 3 different child nodes.
    PsiElement[] children = arrayTypeNameNode.getChildren();
    if (children.length != 3) {
        return false;
    }
    // First child node will also be a TypeNameNode which contains the type (string).
    if (!(children[0] instanceof TypeNameNode)) {
        return false;
    }
    if (!"[".equals(children[1].getText())) {
        return false;
    }
    if (!"]".equals(children[2].getText())) {
        return false;
    }
    // ValueTypeNameNode will contain the actual value of the type (string).
    ValueTypeNameNode valueTypeNameNode = PsiTreeUtil.findChildOfType(children[0], ValueTypeNameNode.class);
    if (valueTypeNameNode == null) {
        return false;
    }
    // Get the text (string) and check and return the result.
    return valueTypeNameNode.getText() != null && "string".equals(valueTypeNameNode.getText());
}
Also used : TypeNameNode(org.ballerinalang.plugins.idea.psi.TypeNameNode) ValueTypeNameNode(org.ballerinalang.plugins.idea.psi.ValueTypeNameNode) ValueTypeNameNode(org.ballerinalang.plugins.idea.psi.ValueTypeNameNode) PsiElement(com.intellij.psi.PsiElement) FormalParameterListNode(org.ballerinalang.plugins.idea.psi.FormalParameterListNode) Contract(org.jetbrains.annotations.Contract)

Example 13 with TypeNameNode

use of org.ballerinalang.plugins.idea.psi.TypeNameNode in project ballerina by ballerina-lang.

the class BallerinaCompletionUtils method createFieldLookupElements.

@NotNull
public static List<LookupElement> createFieldLookupElements(@NotNull Collection<FieldDefinitionNode> fieldDefinitionNodes, @Nullable InsertHandler<LookupElement> insertHandler) {
    List<LookupElement> lookupElements = new LinkedList<>();
    for (FieldDefinitionNode fieldDefinitionNode : fieldDefinitionNodes) {
        IdentifierPSINode fieldName = PsiTreeUtil.getChildOfType(fieldDefinitionNode, IdentifierPSINode.class);
        TypeNameNode fieldType = PsiTreeUtil.getChildOfType(fieldDefinitionNode, TypeNameNode.class);
        if (fieldName == null || fieldType == null) {
            continue;
        }
        LookupElement lookupElement = BallerinaCompletionUtils.createFieldLookupElement(fieldName, fieldType, insertHandler);
        lookupElements.add(lookupElement);
    }
    return lookupElements;
}
Also used : TypeNameNode(org.ballerinalang.plugins.idea.psi.TypeNameNode) IdentifierPSINode(org.ballerinalang.plugins.idea.psi.IdentifierPSINode) FieldDefinitionNode(org.ballerinalang.plugins.idea.psi.FieldDefinitionNode) LookupElement(com.intellij.codeInsight.lookup.LookupElement) PrioritizedLookupElement(com.intellij.codeInsight.completion.PrioritizedLookupElement) LinkedList(java.util.LinkedList) NotNull(org.jetbrains.annotations.NotNull)

Example 14 with TypeNameNode

use of org.ballerinalang.plugins.idea.psi.TypeNameNode in project ballerina by ballerina-lang.

the class BallerinaKeywordsCompletionContributor method fillCompletionVariants.

@Override
public void fillCompletionVariants(@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) {
    PsiElement element = parameters.getPosition();
    PsiElement parent = element.getParent();
    if (element instanceof LeafPsiElement) {
        IElementType elementType = ((LeafPsiElement) element).getElementType();
        if (elementType == BallerinaTypes.FLOATING_POINT) {
            return;
        }
    }
    if (parent instanceof NameReferenceNode) {
        PsiElement prevVisibleLeaf = PsiTreeUtil.prevVisibleLeaf(element);
        if (prevVisibleLeaf != null && "public".equals(prevVisibleLeaf.getText())) {
            result.addAllElements(getFileLevelKeywordsAsLookups(false, true, true));
        }
        if (prevVisibleLeaf instanceof IdentifierPSINode) {
            result.addElement(getAttachKeyword());
            return;
        }
        ANTLRPsiNode definitionParent = PsiTreeUtil.getParentOfType(parent, CallableUnitBodyNode.class, ServiceBodyNode.class, ConnectorBodyNode.class);
        if (definitionParent != null && prevVisibleLeaf != null && "=".equals(prevVisibleLeaf.getText())) {
            result.addElement(getCreateKeyword());
            result.addElement(getTypeOfKeyword());
            result.addElement(getLengthOfKeyword());
            result.addAllElements(getValueKeywords());
        }
        ExpressionNode expressionNode = PsiTreeUtil.getParentOfType(parent, ExpressionNode.class);
        if (expressionNode != null && expressionNode.getChildren().length == 1) {
            PsiReference referenceAt = parent.findReferenceAt(0);
            if (referenceAt == null || referenceAt instanceof NameReference) {
                result.addAllElements(getValueKeywords());
            }
            PsiElement nextVisibleLeaf = PsiTreeUtil.nextVisibleLeaf(element);
            if ((prevVisibleLeaf != null && "(".equals(prevVisibleLeaf.getText())) || (nextVisibleLeaf != null && ")".equals(nextVisibleLeaf.getText()) && !":".equals(prevVisibleLeaf.getText()))) {
                addOtherTypeAsLookup(result);
                addValueTypesAsLookups(result);
                addReferenceTypesAsLookups(result);
            }
        }
        AnnotationAttachmentNode attachmentNode = PsiTreeUtil.getParentOfType(parent, AnnotationAttachmentNode.class);
        if (attachmentNode != null) {
            result.addAllElements(getValueKeywords());
        }
        TypeNameNode typeNameNode = PsiTreeUtil.getParentOfType(parent, TypeNameNode.class);
        if (typeNameNode != null && prevVisibleLeaf != null && !prevVisibleLeaf.getText().matches("[:.=]")) {
            AnnotationDefinitionNode annotationDefinitionNode = PsiTreeUtil.getParentOfType(typeNameNode, AnnotationDefinitionNode.class);
            if (annotationDefinitionNode == null) {
                addOtherTypeAsLookup(result);
                addXmlnsAsLookup(result);
                addValueTypesAsLookups(result);
                addReferenceTypesAsLookups(result);
            }
        }
    }
    if (parent instanceof StatementNode) {
        PsiElement prevVisibleSibling = PsiTreeUtil.prevVisibleLeaf(element);
        if (prevVisibleSibling != null && "=".equals(prevVisibleSibling.getText())) {
            result.addElement(getCreateKeyword());
            result.addElement(getTypeOfKeyword());
            result.addElement(getLengthOfKeyword());
        }
    }
    if (parent instanceof ConstantDefinitionNode || parent instanceof PsiErrorElement) {
        PsiElement prevVisibleSibling = PsiTreeUtil.prevVisibleLeaf(element);
        if (prevVisibleSibling != null && "const".equals(prevVisibleSibling.getText())) {
            addValueTypesAsLookups(result);
            return;
        }
    }
    if (parent instanceof PsiErrorElement) {
        PsiElement prevVisibleSibling = PsiTreeUtil.prevVisibleLeaf(element);
        PsiElement definitionNode = PsiTreeUtil.getParentOfType(element, FunctionDefinitionNode.class, ServiceDefinitionNode.class, ConnectorDefinitionNode.class, ResourceDefinitionNode.class);
        if (definitionNode != null) {
            if (prevVisibleSibling != null && "=".equals(prevVisibleSibling.getText())) {
                result.addElement(getCreateKeyword());
                result.addAllElements(getValueKeywords());
                result.addElement(getTypeOfKeyword());
                result.addElement(getLengthOfKeyword());
            }
            if (prevVisibleSibling != null && prevVisibleSibling.getText().matches("[;{}]") && !(prevVisibleSibling.getParent() instanceof AnnotationAttachmentNode)) {
                // Todo - change method
                addOtherTypeAsLookup(result);
                addXmlnsAsLookup(result);
                addValueTypesAsLookups(result);
                addReferenceTypesAsLookups(result);
                if (definitionNode instanceof FunctionDefinitionNode) {
                    result.addAllElements(getFunctionSpecificKeywords());
                }
                if (definitionNode instanceof ResourceDefinitionNode) {
                    result.addAllElements(getResourceSpecificKeywords());
                }
                if (definitionNode instanceof ServiceDefinitionNode) {
                    result.addAllElements(getServiceSpecificKeywords());
                }
                if (definitionNode instanceof ConnectorDefinitionNode) {
                    result.addAllElements(getConnectorSpecificKeywords());
                }
                if (!(definitionNode instanceof ServiceDefinitionNode || definitionNode instanceof ConnectorDefinitionNode)) {
                    result.addAllElements(getCommonKeywords());
                }
            }
            if (prevVisibleSibling != null && !prevVisibleSibling.getText().matches("[{}]")) /*|| !(prevVisibleSibling.getParent() instanceof AnnotationAttachmentNode)*/
            {
                result.addAllElements(getValueKeywords());
            }
        }
        ConnectorBodyNode connectorBodyNode = PsiTreeUtil.getParentOfType(element, ConnectorBodyNode.class);
        if (connectorBodyNode != null) {
            result.addAllElements(getConnectorSpecificKeywords());
        }
        ConnectorDefinitionNode connectorDefinitionNode = PsiTreeUtil.getParentOfType(element, ConnectorDefinitionNode.class);
        if (connectorDefinitionNode != null) {
            result.addAllElements(getConnectorSpecificKeywords());
        }
        return;
    }
    if (parent instanceof NameReferenceNode) {
        RecordKeyValueNode recordKeyValueNode = PsiTreeUtil.getParentOfType(parent, RecordKeyValueNode.class);
        if (recordKeyValueNode == null) {
            PsiElement prevVisibleSibling = PsiTreeUtil.prevVisibleLeaf(element);
            if (prevVisibleSibling != null && "{".equals(prevVisibleSibling.getText())) {
                FunctionDefinitionNode functionDefinitionNode = PsiTreeUtil.getParentOfType(element, FunctionDefinitionNode.class);
                if (functionDefinitionNode != null) {
                    // Todo - change method
                    addOtherTypeAsLookup(result);
                    addXmlnsAsLookup(result);
                    addValueTypesAsLookups(result);
                    addReferenceTypesAsLookups(result);
                    result.addAllElements(getFunctionSpecificKeywords());
                    result.addAllElements(getCommonKeywords());
                    result.addAllElements(getValueKeywords());
                }
                ServiceBodyNode serviceBodyNode = PsiTreeUtil.getParentOfType(element, ServiceBodyNode.class);
                if (serviceBodyNode != null) {
                    result.addAllElements(getServiceSpecificKeywords());
                }
                ConnectorBodyNode connectorBodyNode = PsiTreeUtil.getParentOfType(element, ConnectorBodyNode.class);
                if (connectorBodyNode != null) {
                    result.addAllElements(getConnectorSpecificKeywords());
                }
            } else if (prevVisibleSibling != null && "}".equals(prevVisibleSibling.getText())) {
                result.addAllElements(getFileLevelKeywordsAsLookups(true, false, false));
            }
        }
    }
    if (parent instanceof ResourceDefinitionNode) {
        result.addAllElements(getServiceSpecificKeywords());
    }
    if (parent.getPrevSibling() == null) {
        GlobalVariableDefinitionNode globalVariableDefinitionNode = PsiTreeUtil.getParentOfType(element, GlobalVariableDefinitionNode.class);
        if (globalVariableDefinitionNode != null) {
            PsiElement prevVisibleSibling = PsiTreeUtil.prevVisibleLeaf(element);
            if (prevVisibleSibling != null && !(";".equals(prevVisibleSibling.getText()))) {
                if (!(prevVisibleSibling.getText().matches("[:=]") || prevVisibleSibling instanceof IdentifierPSINode || "create".equals(prevVisibleSibling.getText()))) {
                    if (prevVisibleSibling instanceof LeafPsiElement) {
                        IElementType elementType = ((LeafPsiElement) prevVisibleSibling).getElementType();
                        if (BallerinaParserDefinition.KEYWORDS.contains(elementType)) {
                            return;
                        }
                    }
                    result.addAllElements(getCommonKeywords());
                }
                return;
            }
            PsiElement definitionNode = globalVariableDefinitionNode.getParent();
            PackageDeclarationNode prevPackageDeclarationNode = PsiTreeUtil.getPrevSiblingOfType(definitionNode, PackageDeclarationNode.class);
            ImportDeclarationNode prevImportDeclarationNode = PsiTreeUtil.getPrevSiblingOfType(definitionNode, ImportDeclarationNode.class);
            ConstantDefinitionNode prevConstantDefinitionNode = PsiTreeUtil.getPrevSiblingOfType(definitionNode, ConstantDefinitionNode.class);
            DefinitionNode prevDefinitionNode = PsiTreeUtil.getPrevSiblingOfType(definitionNode, DefinitionNode.class);
            GlobalVariableDefinitionNode prevGlobalVariableDefinition = PsiTreeUtil.findChildOfType(prevDefinitionNode, GlobalVariableDefinitionNode.class);
            if (prevPackageDeclarationNode == null && prevImportDeclarationNode == null && prevConstantDefinitionNode == null && prevGlobalVariableDefinition == null) {
                result.addAllElements(getFileLevelKeywordsAsLookups(true, true, true));
            } else if ((prevPackageDeclarationNode != null || prevImportDeclarationNode != null) && prevConstantDefinitionNode == null && prevGlobalVariableDefinition == null) {
                result.addAllElements(getFileLevelKeywordsAsLookups(true, false, true));
            } else {
                result.addAllElements(getFileLevelKeywordsAsLookups(true, false, false));
            }
            addTypeNamesAsLookups(result);
        }
    }
    if (element instanceof IdentifierPSINode) {
        PsiReference reference = element.findReferenceAt(element.getTextLength());
        if (reference instanceof WorkerReference) {
            result.addAllElements(getWorkerInteractionKeywords());
        }
    }
}
Also used : RecordKeyValueNode(org.ballerinalang.plugins.idea.psi.RecordKeyValueNode) NameReference(org.ballerinalang.plugins.idea.psi.references.NameReference) ConstantDefinitionNode(org.ballerinalang.plugins.idea.psi.ConstantDefinitionNode) ImportDeclarationNode(org.ballerinalang.plugins.idea.psi.ImportDeclarationNode) LeafPsiElement(com.intellij.psi.impl.source.tree.LeafPsiElement) FunctionDefinitionNode(org.ballerinalang.plugins.idea.psi.FunctionDefinitionNode) IdentifierPSINode(org.ballerinalang.plugins.idea.psi.IdentifierPSINode) WorkerReference(org.ballerinalang.plugins.idea.psi.references.WorkerReference) PsiElement(com.intellij.psi.PsiElement) LeafPsiElement(com.intellij.psi.impl.source.tree.LeafPsiElement) ServiceBodyNode(org.ballerinalang.plugins.idea.psi.ServiceBodyNode) AnnotationAttachmentNode(org.ballerinalang.plugins.idea.psi.AnnotationAttachmentNode) ConnectorBodyNode(org.ballerinalang.plugins.idea.psi.ConnectorBodyNode) PsiReference(com.intellij.psi.PsiReference) StatementNode(org.ballerinalang.plugins.idea.psi.StatementNode) ANTLRPsiNode(org.antlr.jetbrains.adaptor.psi.ANTLRPsiNode) ConnectorDefinitionNode(org.ballerinalang.plugins.idea.psi.ConnectorDefinitionNode) PackageDeclarationNode(org.ballerinalang.plugins.idea.psi.PackageDeclarationNode) IElementType(com.intellij.psi.tree.IElementType) PsiErrorElement(com.intellij.psi.PsiErrorElement) ResourceDefinitionNode(org.ballerinalang.plugins.idea.psi.ResourceDefinitionNode) AnnotationDefinitionNode(org.ballerinalang.plugins.idea.psi.AnnotationDefinitionNode) ServiceDefinitionNode(org.ballerinalang.plugins.idea.psi.ServiceDefinitionNode) DefinitionNode(org.ballerinalang.plugins.idea.psi.DefinitionNode) ConstantDefinitionNode(org.ballerinalang.plugins.idea.psi.ConstantDefinitionNode) ConnectorDefinitionNode(org.ballerinalang.plugins.idea.psi.ConnectorDefinitionNode) FunctionDefinitionNode(org.ballerinalang.plugins.idea.psi.FunctionDefinitionNode) GlobalVariableDefinitionNode(org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode) ResourceDefinitionNode(org.ballerinalang.plugins.idea.psi.ResourceDefinitionNode) ServiceDefinitionNode(org.ballerinalang.plugins.idea.psi.ServiceDefinitionNode) ExpressionNode(org.ballerinalang.plugins.idea.psi.ExpressionNode) TypeNameNode(org.ballerinalang.plugins.idea.psi.TypeNameNode) AnnotationDefinitionNode(org.ballerinalang.plugins.idea.psi.AnnotationDefinitionNode) NameReferenceNode(org.ballerinalang.plugins.idea.psi.NameReferenceNode) GlobalVariableDefinitionNode(org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode)

Example 15 with TypeNameNode

use of org.ballerinalang.plugins.idea.psi.TypeNameNode in project ballerina by ballerina-lang.

the class BallerinaPsiImplUtil method getTypeFromVariableReference.

@Nullable
private static PsiElement getTypeFromVariableReference(@NotNull AssignmentStatementNode assignmentStatementNode, @NotNull IdentifierPSINode identifier, PsiElement expressionNodeFirstChild) {
    int index = getVariableIndexFromVarAssignment(assignmentStatementNode, identifier);
    if (index < 0) {
        return null;
    }
    FunctionInvocationNode functionInvocationNode = PsiTreeUtil.getChildOfType(expressionNodeFirstChild, FunctionInvocationNode.class);
    if (functionInvocationNode == null) {
        return null;
    }
    FunctionReferenceNode functionReferenceNode = PsiTreeUtil.getChildOfType(functionInvocationNode, FunctionReferenceNode.class);
    if (functionReferenceNode == null) {
        return null;
    }
    PsiReference functionReference = functionReferenceNode.findReferenceAt(functionReferenceNode.getTextLength());
    if (functionReference == null) {
        return null;
    }
    PsiElement resolvedElement = functionReference.resolve();
    if (resolvedElement == null || !(resolvedElement.getParent() instanceof FunctionDefinitionNode)) {
        return null;
    }
    List<TypeNameNode> returnTypes = getReturnTypes(((FunctionDefinitionNode) resolvedElement.getParent()));
    // index is 0, size should be at least 1, etc.
    if (returnTypes.size() <= index) {
        return null;
    }
    TypeNameNode typeNameNode = returnTypes.get(index);
    PsiElement typeNode = getType(typeNameNode, true);
    if (typeNode == null) {
        return null;
    }
    return typeNode;
}
Also used : FunctionDefinitionNode(org.ballerinalang.plugins.idea.psi.FunctionDefinitionNode) BuiltInReferenceTypeNameNode(org.ballerinalang.plugins.idea.psi.BuiltInReferenceTypeNameNode) FunctionTypeNameNode(org.ballerinalang.plugins.idea.psi.FunctionTypeNameNode) TypeNameNode(org.ballerinalang.plugins.idea.psi.TypeNameNode) ValueTypeNameNode(org.ballerinalang.plugins.idea.psi.ValueTypeNameNode) AnonStructTypeNameNode(org.ballerinalang.plugins.idea.psi.AnonStructTypeNameNode) PsiReference(com.intellij.psi.PsiReference) FunctionReferenceNode(org.ballerinalang.plugins.idea.psi.FunctionReferenceNode) FunctionInvocationNode(org.ballerinalang.plugins.idea.psi.FunctionInvocationNode) PsiElement(com.intellij.psi.PsiElement) LeafPsiElement(com.intellij.psi.impl.source.tree.LeafPsiElement) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

TypeNameNode (org.ballerinalang.plugins.idea.psi.TypeNameNode)25 PsiElement (com.intellij.psi.PsiElement)18 AnonStructTypeNameNode (org.ballerinalang.plugins.idea.psi.AnonStructTypeNameNode)16 ValueTypeNameNode (org.ballerinalang.plugins.idea.psi.ValueTypeNameNode)15 BuiltInReferenceTypeNameNode (org.ballerinalang.plugins.idea.psi.BuiltInReferenceTypeNameNode)14 FunctionTypeNameNode (org.ballerinalang.plugins.idea.psi.FunctionTypeNameNode)14 PsiReference (com.intellij.psi.PsiReference)13 LeafPsiElement (com.intellij.psi.impl.source.tree.LeafPsiElement)12 StructDefinitionNode (org.ballerinalang.plugins.idea.psi.StructDefinitionNode)11 Nullable (org.jetbrains.annotations.Nullable)11 LinkedList (java.util.LinkedList)9 IdentifierPSINode (org.ballerinalang.plugins.idea.psi.IdentifierPSINode)9 FieldDefinitionNode (org.ballerinalang.plugins.idea.psi.FieldDefinitionNode)8 NotNull (org.jetbrains.annotations.NotNull)7 CodeBlockParameterNode (org.ballerinalang.plugins.idea.psi.CodeBlockParameterNode)6 FunctionDefinitionNode (org.ballerinalang.plugins.idea.psi.FunctionDefinitionNode)6 LookupElement (com.intellij.codeInsight.lookup.LookupElement)5 ParameterNode (org.ballerinalang.plugins.idea.psi.ParameterNode)5 ReturnParameterNode (org.ballerinalang.plugins.idea.psi.ReturnParameterNode)5 GlobalVariableDefinitionNode (org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode)4