Search in sources :

Example 1 with FieldDefinitionNode

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

the class BallerinaPsiImplUtil method getType.

/**
 * Returns the type of the provided identifier.
 *
 * @param identifier an identifier
 * @return the type of the identifier. This can be one of {@link ValueTypeNameNode} (for value types like string),
 * {@link BuiltInReferenceTypeNameNode} (for reference types like json) or {@link TypeNameNode} (for arrays).
 */
@Nullable
public static PsiElement getType(@NotNull IdentifierPSINode identifier) {
    PsiElement parent = identifier.getParent();
    // In case of lambda functions or functions attached to types.
    if (parent instanceof FunctionDefinitionNode) {
        CodeBlockParameterNode codeBlockParameterNode = PsiTreeUtil.getChildOfType(parent, CodeBlockParameterNode.class);
        if (codeBlockParameterNode != null) {
            TypeNameNode typeNameNode = PsiTreeUtil.getChildOfType(codeBlockParameterNode, TypeNameNode.class);
            if (typeNameNode != null) {
                return typeNameNode.getFirstChild();
            }
        }
    }
    PsiReference reference = identifier.findReferenceAt(0);
    if (reference != null) {
    // Todo - Do we need to consider this situation?
    }
    VariableDefinitionNode variableDefinitionNode = PsiTreeUtil.getParentOfType(identifier, VariableDefinitionNode.class);
    if (variableDefinitionNode != null) {
        PsiElement typeNode = getType(variableDefinitionNode);
        if (typeNode != null) {
            return typeNode;
        }
    }
    AssignmentStatementNode assignmentStatementNode = PsiTreeUtil.getParentOfType(identifier, AssignmentStatementNode.class);
    if (assignmentStatementNode != null) {
        PsiElement typeNode = getType(assignmentStatementNode, identifier);
        if (typeNode != null) {
            return typeNode;
        }
    }
    ParameterNode parameterNode = PsiTreeUtil.getParentOfType(identifier, ParameterNode.class);
    if (parameterNode != null) {
        PsiElement typeNode = getType(parameterNode);
        if (typeNode != null) {
            return typeNode;
        }
    }
    FieldDefinitionNode fieldDefinitionNode = PsiTreeUtil.getParentOfType(identifier, FieldDefinitionNode.class);
    if (fieldDefinitionNode != null) {
        PsiElement typeNode = getType(fieldDefinitionNode);
        if (typeNode != null) {
            return typeNode;
        }
    }
    return null;
}
Also used : GlobalVariableDefinitionNode(org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode) VariableDefinitionNode(org.ballerinalang.plugins.idea.psi.VariableDefinitionNode) AssignmentStatementNode(org.ballerinalang.plugins.idea.psi.AssignmentStatementNode) ParameterNode(org.ballerinalang.plugins.idea.psi.ParameterNode) ReturnParameterNode(org.ballerinalang.plugins.idea.psi.ReturnParameterNode) CodeBlockParameterNode(org.ballerinalang.plugins.idea.psi.CodeBlockParameterNode) 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) FieldDefinitionNode(org.ballerinalang.plugins.idea.psi.FieldDefinitionNode) PsiElement(com.intellij.psi.PsiElement) LeafPsiElement(com.intellij.psi.impl.source.tree.LeafPsiElement) CodeBlockParameterNode(org.ballerinalang.plugins.idea.psi.CodeBlockParameterNode) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with FieldDefinitionNode

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

the class AnnotationAttributeReference method resolve.

@Nullable
@Override
public PsiElement resolve() {
    IdentifierPSINode identifier = getElement();
    AnnotationAttachmentNode annotationAttachmentNode = PsiTreeUtil.getParentOfType(identifier, AnnotationAttachmentNode.class);
    if (annotationAttachmentNode == null) {
        return null;
    }
    AnnotationReferenceNode annotationReferenceNode = PsiTreeUtil.getChildOfType(annotationAttachmentNode, AnnotationReferenceNode.class);
    if (annotationReferenceNode == null) {
        return null;
    }
    int textLength = annotationReferenceNode.getTextLength();
    PsiReference reference = annotationReferenceNode.findReferenceAt(textLength);
    if (reference == null) {
        return null;
    }
    PsiElement annotationName = reference.resolve();
    if (annotationName == null || !(annotationName instanceof IdentifierPSINode)) {
        return null;
    }
    PsiElement annotationDefinition = annotationName.getParent();
    Collection<FieldDefinitionNode> fieldDefinitionNodes = PsiTreeUtil.findChildrenOfType(annotationDefinition, FieldDefinitionNode.class);
    return BallerinaPsiImplUtil.resolveReference(fieldDefinitionNodes, identifier);
}
Also used : IdentifierPSINode(org.ballerinalang.plugins.idea.psi.IdentifierPSINode) PsiReference(com.intellij.psi.PsiReference) FieldDefinitionNode(org.ballerinalang.plugins.idea.psi.FieldDefinitionNode) AnnotationReferenceNode(org.ballerinalang.plugins.idea.psi.AnnotationReferenceNode) PsiElement(com.intellij.psi.PsiElement) AnnotationAttachmentNode(org.ballerinalang.plugins.idea.psi.AnnotationAttachmentNode) Nullable(org.jetbrains.annotations.Nullable)

Example 3 with FieldDefinitionNode

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

the class NameReference method getVariantsFromCurrentPackage.

@NotNull
private List<LookupElement> getVariantsFromCurrentPackage() {
    List<LookupElement> results = new LinkedList<>();
    IdentifierPSINode identifier = getElement();
    PsiFile containingFile = identifier.getContainingFile();
    PsiFile originalFile = containingFile.getOriginalFile();
    PsiDirectory containingPackage = originalFile.getParent();
    AnnotationAttachmentNode attachmentNode = PsiTreeUtil.getParentOfType(identifier, AnnotationAttachmentNode.class);
    if (attachmentNode != null && containingFile instanceof BallerinaFile) {
        ScopeNode scope = (BallerinaFile) containingFile;
        List<IdentifierPSINode> constants = BallerinaPsiImplUtil.getAllConstantsInResolvableScope(scope);
        results.addAll(BallerinaCompletionUtils.createConstantLookupElements(constants));
    } else if (containingPackage != null) {
        List<LookupElement> packages = BallerinaPsiImplUtil.getPackagesAsLookups(originalFile, true, PackageCompletionInsertHandler.INSTANCE_WITH_AUTO_POPUP, true, AutoImportInsertHandler.INSTANCE_WITH_AUTO_POPUP);
        results.addAll(packages);
        PsiElement prevVisibleLeaf = PsiTreeUtil.prevVisibleLeaf(identifier);
        ANTLRPsiNode definitionParent = PsiTreeUtil.getParentOfType(identifier, CallableUnitBodyNode.class, ServiceBodyNode.class, ResourceDefinitionNode.class, ConnectorBodyNode.class);
        TypeNameNode typeNameNode = PsiTreeUtil.getParentOfType(identifier, TypeNameNode.class);
        if ((definitionParent != null && !(definitionParent instanceof ResourceDefinitionNode)) || prevVisibleLeaf != null && (!";".equals(prevVisibleLeaf.getText()) && typeNameNode == null || prevVisibleLeaf.getText().matches("[{}]"))) {
            List<IdentifierPSINode> functions = BallerinaPsiImplUtil.getAllFunctionsFromPackage(containingPackage, true, true);
            results.addAll(BallerinaCompletionUtils.createFunctionLookupElements(functions));
            // Todo - use a util method
            ScopeNode scope = PsiTreeUtil.getParentOfType(identifier, CodeBlockScope.class, VariableContainer.class, TopLevelDefinition.class, LowerLevelDefinition.class);
            if (scope != null) {
                int caretOffset = identifier.getStartOffset();
                List<IdentifierPSINode> variables = BallerinaPsiImplUtil.getAllLocalVariablesInResolvableScope(scope, caretOffset);
                results.addAll(BallerinaCompletionUtils.createVariableLookupElements(variables));
                List<IdentifierPSINode> parameters = BallerinaPsiImplUtil.getAllParametersInResolvableScope(scope, caretOffset);
                results.addAll(BallerinaCompletionUtils.createParameterLookupElements(parameters));
                List<IdentifierPSINode> globalVariables = BallerinaPsiImplUtil.getAllGlobalVariablesInResolvableScope(scope);
                results.addAll(BallerinaCompletionUtils.createGlobalVariableLookupElements(globalVariables));
                List<IdentifierPSINode> constants = BallerinaPsiImplUtil.getAllConstantsInResolvableScope(scope);
                results.addAll(BallerinaCompletionUtils.createConstantLookupElements(constants));
                List<PsiElement> namespaces = BallerinaPsiImplUtil.getAllXmlNamespacesInResolvableScope(scope, caretOffset);
                results.addAll(BallerinaCompletionUtils.createNamespaceLookupElements(namespaces));
                List<IdentifierPSINode> endpoints = BallerinaPsiImplUtil.getAllEndpointsInResolvableScope(scope, caretOffset);
                results.addAll(BallerinaCompletionUtils.createEndpointLookupElements(endpoints));
            } else {
                ConstantDefinitionNode constantDefinitionNode = PsiTreeUtil.getParentOfType(identifier, ConstantDefinitionNode.class);
                GlobalVariableDefinitionNode globalVariableDefinitionNode = PsiTreeUtil.getParentOfType(identifier, GlobalVariableDefinitionNode.class);
                if (constantDefinitionNode != null || globalVariableDefinitionNode != null) {
                    scope = PsiTreeUtil.getParentOfType(constantDefinitionNode, BallerinaFile.class);
                }
                if (globalVariableDefinitionNode != null) {
                    scope = PsiTreeUtil.getParentOfType(globalVariableDefinitionNode, BallerinaFile.class);
                }
                if (scope != null) {
                    int caretOffset = identifier.getStartOffset();
                    List<IdentifierPSINode> globalVars = BallerinaPsiImplUtil.getAllGlobalVariablesInResolvableScope(scope, caretOffset);
                    results.addAll(BallerinaCompletionUtils.createGlobalVariableLookupElements(globalVars));
                    List<IdentifierPSINode> constants = BallerinaPsiImplUtil.getAllConstantsInResolvableScope(scope, caretOffset);
                    results.addAll(BallerinaCompletionUtils.createConstantLookupElements(constants));
                }
            }
        }
        List<IdentifierPSINode> connectors = BallerinaPsiImplUtil.getAllConnectorsFromPackage(containingPackage, true, true);
        results.addAll(BallerinaCompletionUtils.createConnectorLookupElements(connectors, AddSpaceInsertHandler.INSTANCE));
        List<IdentifierPSINode> structs = BallerinaPsiImplUtil.getAllStructsFromPackage(containingPackage, true, true);
        results.addAll(BallerinaCompletionUtils.createStructLookupElements(structs));
        List<IdentifierPSINode> enums = BallerinaPsiImplUtil.getAllEnumsFromPackage(containingPackage, true, true);
        results.addAll(BallerinaCompletionUtils.createEnumLookupElements(enums, null));
        return results;
    }
    // Try to get fields from an anonymous struct.
    PsiElement structDefinitionNode = BallerinaPsiImplUtil.resolveAnonymousStruct(identifier);
    if (structDefinitionNode == null || !(structDefinitionNode instanceof StructDefinitionNode)) {
        return results;
    }
    IdentifierPSINode structNameNode = PsiTreeUtil.getChildOfType(structDefinitionNode, IdentifierPSINode.class);
    if (structNameNode == null) {
        return results;
    }
    Collection<FieldDefinitionNode> fieldDefinitionNodes = PsiTreeUtil.findChildrenOfType(structDefinitionNode, FieldDefinitionNode.class);
    results = BallerinaCompletionUtils.createFieldLookupElements(fieldDefinitionNodes, structNameNode, PackageCompletionInsertHandler.INSTANCE_WITH_AUTO_POPUP);
    return results;
}
Also used : ConstantDefinitionNode(org.ballerinalang.plugins.idea.psi.ConstantDefinitionNode) BallerinaFile(org.ballerinalang.plugins.idea.psi.BallerinaFile) TopLevelDefinition(org.ballerinalang.plugins.idea.psi.scopes.TopLevelDefinition) VariableContainer(org.ballerinalang.plugins.idea.psi.scopes.VariableContainer) PsiDirectory(com.intellij.psi.PsiDirectory) IdentifierPSINode(org.ballerinalang.plugins.idea.psi.IdentifierPSINode) PsiFile(com.intellij.psi.PsiFile) LinkedList(java.util.LinkedList) List(java.util.List) PsiElement(com.intellij.psi.PsiElement) ServiceBodyNode(org.ballerinalang.plugins.idea.psi.ServiceBodyNode) AnnotationAttachmentNode(org.ballerinalang.plugins.idea.psi.AnnotationAttachmentNode) ConnectorBodyNode(org.ballerinalang.plugins.idea.psi.ConnectorBodyNode) ANTLRPsiNode(org.antlr.jetbrains.adaptor.psi.ANTLRPsiNode) LookupElement(com.intellij.codeInsight.lookup.LookupElement) LinkedList(java.util.LinkedList) ResourceDefinitionNode(org.ballerinalang.plugins.idea.psi.ResourceDefinitionNode) StructDefinitionNode(org.ballerinalang.plugins.idea.psi.StructDefinitionNode) TypeNameNode(org.ballerinalang.plugins.idea.psi.TypeNameNode) FieldDefinitionNode(org.ballerinalang.plugins.idea.psi.FieldDefinitionNode) CallableUnitBodyNode(org.ballerinalang.plugins.idea.psi.CallableUnitBodyNode) ScopeNode(org.antlr.jetbrains.adaptor.psi.ScopeNode) LowerLevelDefinition(org.ballerinalang.plugins.idea.psi.scopes.LowerLevelDefinition) CodeBlockScope(org.ballerinalang.plugins.idea.psi.scopes.CodeBlockScope) GlobalVariableDefinitionNode(org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode) NotNull(org.jetbrains.annotations.NotNull)

Example 4 with FieldDefinitionNode

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

the class RecordKeyReference method resolve.

@Nullable
@Override
public PsiElement resolve() {
    IdentifierPSINode identifier = getElement();
    VariableDefinitionNode variableDefinitionNode = PsiTreeUtil.getParentOfType(identifier, VariableDefinitionNode.class);
    if (variableDefinitionNode != null) {
        return resolve(variableDefinitionNode);
    }
    GlobalVariableDefinitionNode globalVariableDefinitionNode = PsiTreeUtil.getParentOfType(identifier, GlobalVariableDefinitionNode.class);
    if (globalVariableDefinitionNode != null) {
        return resolve(globalVariableDefinitionNode);
    }
    AssignmentStatementNode assignmentStatementNode = PsiTreeUtil.getParentOfType(identifier, AssignmentStatementNode.class);
    if (assignmentStatementNode != null) {
        PsiElement resolvedElement = resolve(assignmentStatementNode);
        if (resolvedElement != null) {
            return resolvedElement;
        }
    }
    // Try to resolve to fields in anonymous struct.
    PsiElement definitionNode = BallerinaPsiImplUtil.resolveAnonymousStruct(identifier);
    if (definitionNode == null) {
        return null;
    }
    if (definitionNode instanceof AnonStructTypeNameNode) {
        StructBodyNode structBodyNode = PsiTreeUtil.findChildOfType(definitionNode, StructBodyNode.class);
        if (structBodyNode == null) {
            return null;
        }
        List<FieldDefinitionNode> fieldDefinitionNodes = PsiTreeUtil.getChildrenOfTypeAsList(structBodyNode, FieldDefinitionNode.class);
        for (FieldDefinitionNode fieldDefinitionNode : fieldDefinitionNodes) {
            if (fieldDefinitionNode == null) {
                continue;
            }
            IdentifierPSINode fieldName = PsiTreeUtil.getChildOfType(fieldDefinitionNode, IdentifierPSINode.class);
            if (fieldName == null) {
                continue;
            }
            if (fieldName.getText().equals(identifier.getText())) {
                return fieldName;
            }
        }
    }
    if (!(definitionNode instanceof StructDefinitionNode)) {
        return null;
    }
    StructDefinitionNode structDefinitionNode = ((StructDefinitionNode) definitionNode);
    IdentifierPSINode structNameNode = PsiTreeUtil.getChildOfType(structDefinitionNode, IdentifierPSINode.class);
    if (structNameNode == null) {
        return null;
    }
    Collection<FieldDefinitionNode> fieldDefinitionNodes = PsiTreeUtil.findChildrenOfType(structDefinitionNode, FieldDefinitionNode.class);
    for (FieldDefinitionNode fieldDefinitionNode : fieldDefinitionNodes) {
        IdentifierPSINode fieldName = PsiTreeUtil.getChildOfType(fieldDefinitionNode, IdentifierPSINode.class);
        if (fieldName != null && identifier.getText().equals(fieldName.getText())) {
            return fieldName;
        }
    }
    return null;
}
Also used : VariableDefinitionNode(org.ballerinalang.plugins.idea.psi.VariableDefinitionNode) GlobalVariableDefinitionNode(org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode) AssignmentStatementNode(org.ballerinalang.plugins.idea.psi.AssignmentStatementNode) StructDefinitionNode(org.ballerinalang.plugins.idea.psi.StructDefinitionNode) IdentifierPSINode(org.ballerinalang.plugins.idea.psi.IdentifierPSINode) FieldDefinitionNode(org.ballerinalang.plugins.idea.psi.FieldDefinitionNode) StructBodyNode(org.ballerinalang.plugins.idea.psi.StructBodyNode) AnonStructTypeNameNode(org.ballerinalang.plugins.idea.psi.AnonStructTypeNameNode) GlobalVariableDefinitionNode(org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode) PsiElement(com.intellij.psi.PsiElement) Nullable(org.jetbrains.annotations.Nullable)

Example 5 with FieldDefinitionNode

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

the class RecordKeyReference method getVariantsFromCurrentPackage.

@NotNull
private List<LookupElement> getVariantsFromCurrentPackage() {
    List<LookupElement> results = new LinkedList<>();
    IdentifierPSINode identifier = getElement();
    VariableDefinitionNode variableDefinitionNode = PsiTreeUtil.getParentOfType(identifier, VariableDefinitionNode.class);
    InvocationNode invocationNode = PsiTreeUtil.getParentOfType(identifier, InvocationNode.class);
    if (variableDefinitionNode == null || invocationNode != null) {
        StructDefinitionNode structDefinitionNode = resolveStructDefinition(identifier);
        if (structDefinitionNode == null) {
            // Todo - Check for enclosing {} since the parse errors might cause issues when identifying
            // RecordLiteralNode element
            // RecordLiteralNode mapStructLiteralNode = PsiTreeUtil.getParentOfType(identifier,
            // RecordLiteralNode.class);
            // if (mapStructLiteralNode == null) {
            // return results;
            // }
            // Try to get fields from an anonymous struct.
            PsiElement definitionNode = BallerinaPsiImplUtil.resolveAnonymousStruct(identifier);
            if (definitionNode == null) {
                return results;
            }
            if (definitionNode instanceof AnonStructTypeNameNode) {
                StructBodyNode structBodyNode = PsiTreeUtil.findChildOfType(definitionNode, StructBodyNode.class);
                if (structBodyNode == null) {
                    return results;
                }
                List<FieldDefinitionNode> fieldDefinitionNodes = PsiTreeUtil.getChildrenOfTypeAsList(structBodyNode, FieldDefinitionNode.class);
                results = BallerinaCompletionUtils.createFieldLookupElements(fieldDefinitionNodes, PackageCompletionInsertHandler.INSTANCE_WITH_AUTO_POPUP);
                return results;
            }
            structDefinitionNode = ((StructDefinitionNode) definitionNode);
            IdentifierPSINode structNameNode = PsiTreeUtil.getChildOfType(structDefinitionNode, IdentifierPSINode.class);
            if (structNameNode == null) {
                return results;
            }
            Collection<FieldDefinitionNode> fieldDefinitionNodes = PsiTreeUtil.findChildrenOfType(structDefinitionNode, FieldDefinitionNode.class);
            results = BallerinaCompletionUtils.createFieldLookupElements(fieldDefinitionNodes, structNameNode, PackageCompletionInsertHandler.INSTANCE_WITH_AUTO_POPUP);
            return results;
        }
        IdentifierPSINode structNameNode = PsiTreeUtil.getChildOfType(structDefinitionNode, IdentifierPSINode.class);
        if (structNameNode == null) {
            return results;
        }
        Collection<FieldDefinitionNode> fieldDefinitionNodes = PsiTreeUtil.findChildrenOfType(structDefinitionNode, FieldDefinitionNode.class);
        results = BallerinaCompletionUtils.createFieldLookupElements(fieldDefinitionNodes, structNameNode, PackageCompletionInsertHandler.INSTANCE_WITH_AUTO_POPUP);
    } else {
        TypeNameNode typeNameNode = PsiTreeUtil.getChildOfType(variableDefinitionNode, TypeNameNode.class);
        if (typeNameNode == null) {
            return results;
        } else {
            PsiReference reference = typeNameNode.findReferenceAt(typeNameNode.getTextLength());
            if (reference == null) {
                return results;
            }
            PsiElement resolvedElement = reference.resolve();
            if (resolvedElement == null) {
                return results;
            }
            PsiElement resolvedElementParent = resolvedElement.getParent();
            if (!(resolvedElementParent instanceof StructDefinitionNode)) {
                return results;
            }
            StructBodyNode structBodyNode = PsiTreeUtil.getChildOfType(resolvedElementParent, StructBodyNode.class);
            if (structBodyNode == null) {
                return results;
            }
            Collection<FieldDefinitionNode> fieldDefinitionNodes;
            if (isInSamePackage(identifier, resolvedElement)) {
                fieldDefinitionNodes = PsiTreeUtil.findChildrenOfType(structBodyNode, FieldDefinitionNode.class);
            } else {
                fieldDefinitionNodes = PsiTreeUtil.getChildrenOfTypeAsList(structBodyNode, FieldDefinitionNode.class);
            }
            results = BallerinaCompletionUtils.createFieldLookupElements(fieldDefinitionNodes, (IdentifierPSINode) resolvedElement, PackageCompletionInsertHandler.INSTANCE_WITH_AUTO_POPUP);
        }
    }
    return results;
}
Also used : PsiReference(com.intellij.psi.PsiReference) LookupElement(com.intellij.codeInsight.lookup.LookupElement) InvocationNode(org.ballerinalang.plugins.idea.psi.InvocationNode) AnonStructTypeNameNode(org.ballerinalang.plugins.idea.psi.AnonStructTypeNameNode) LinkedList(java.util.LinkedList) VariableDefinitionNode(org.ballerinalang.plugins.idea.psi.VariableDefinitionNode) GlobalVariableDefinitionNode(org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode) StructDefinitionNode(org.ballerinalang.plugins.idea.psi.StructDefinitionNode) TypeNameNode(org.ballerinalang.plugins.idea.psi.TypeNameNode) AnonStructTypeNameNode(org.ballerinalang.plugins.idea.psi.AnonStructTypeNameNode) IdentifierPSINode(org.ballerinalang.plugins.idea.psi.IdentifierPSINode) FieldDefinitionNode(org.ballerinalang.plugins.idea.psi.FieldDefinitionNode) StructBodyNode(org.ballerinalang.plugins.idea.psi.StructBodyNode) PsiElement(com.intellij.psi.PsiElement) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

FieldDefinitionNode (org.ballerinalang.plugins.idea.psi.FieldDefinitionNode)14 IdentifierPSINode (org.ballerinalang.plugins.idea.psi.IdentifierPSINode)12 PsiElement (com.intellij.psi.PsiElement)11 PsiReference (com.intellij.psi.PsiReference)9 StructDefinitionNode (org.ballerinalang.plugins.idea.psi.StructDefinitionNode)9 TypeNameNode (org.ballerinalang.plugins.idea.psi.TypeNameNode)8 VariableDefinitionNode (org.ballerinalang.plugins.idea.psi.VariableDefinitionNode)8 NotNull (org.jetbrains.annotations.NotNull)8 LookupElement (com.intellij.codeInsight.lookup.LookupElement)7 LinkedList (java.util.LinkedList)6 GlobalVariableDefinitionNode (org.ballerinalang.plugins.idea.psi.GlobalVariableDefinitionNode)6 AnonStructTypeNameNode (org.ballerinalang.plugins.idea.psi.AnonStructTypeNameNode)5 AssignmentStatementNode (org.ballerinalang.plugins.idea.psi.AssignmentStatementNode)5 ParameterNode (org.ballerinalang.plugins.idea.psi.ParameterNode)5 Nullable (org.jetbrains.annotations.Nullable)5 AnnotationAttachmentNode (org.ballerinalang.plugins.idea.psi.AnnotationAttachmentNode)4 CodeBlockParameterNode (org.ballerinalang.plugins.idea.psi.CodeBlockParameterNode)4 NameReferenceNode (org.ballerinalang.plugins.idea.psi.NameReferenceNode)4 Collection (java.util.Collection)3 EnumDefinitionNode (org.ballerinalang.plugins.idea.psi.EnumDefinitionNode)3