Examples of GoPsiTypeName


Examples of ro.redeul.google.go.lang.psi.types.GoPsiTypeName

        }
        return packageMap;
    }

    private static boolean isTypeNameInDeclaration(PsiElement element) {
        GoPsiTypeName typeName = GoPsiUtils.findParentOfType(element, GoPsiTypeName.class);
        return typeName != null && typeName.getParent() instanceof GoTypeSpec;

    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.GoPsiTypeName

        for (GoTypeStructAnonymousField field : struct.getAnonymousFields()) {
            GoPsiType type = field.getType();

            if (type instanceof GoPsiTypeName) {
                GoPsiTypeName typeName = (GoPsiTypeName) type;

                if (typeContainsStruct(type, struct)) {
                    result.addProblem(field, GoBundle.message(
                        "error.invalid.recursive.type", struct.getName()));
                }

                GoLiteralIdentifier identifier = typeName.getIdentifier();
                String name = identifier.getName();
                if (fields.contains(name)) {
                    result.addProblem(identifier, GoBundle.message(
                        "error.duplicate.field", name));
                } else {
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.GoPsiTypeName

        if (!(type instanceof GoPsiTypeName)) {
            return type;
        }

        GoPsiTypeName typeName = (GoPsiTypeName) type;
        if (typeName.isReference() || typeName.isPrimitive()) {
            return type;
        }

        GoTypeSpec typeSpec = GoPsiUtils.resolveTypeSpec(typeName);
        if (typeSpec != null) {
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.GoPsiTypeName

            // we check if the builtin type is defined as type name name and we only process them as a declarations
            GoPsiType type = getType();

            if ( type != null && type instanceof GoPsiTypeName ) {
                GoPsiTypeName typeName = (GoPsiTypeName) type;
                if ( ! typeName.getIdentifier().getText().equals(name)) {
                    return true;
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.