Examples of GoTypeSpec


Examples of ro.redeul.google.go.lang.psi.toplevel.GoTypeSpec

    }

    @NotNull
    @Override
    public GoType underlyingType() {
        GoTypeSpec definition = getDefinition();
        return definition == null ? this : GoTypes.fromPsi(definition.getType()).underlyingType();
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.toplevel.GoTypeSpec

    private static boolean typeContainsStruct(GoPsiType type, GoPsiTypeStruct struct) {
        if (!(type instanceof GoPsiTypeName)) {
            return false;
        }

        GoTypeSpec resolve = resolveTypeSpec((GoPsiTypeName) type);
        if (resolve == null) {
            return false;
        }

        GoPsiType typeDefinition = resolve.getType();
        if (!(typeDefinition instanceof GoPsiTypeStruct)) {
            return false;
        }

        if (struct.isEquivalentTo(typeDefinition)) {
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.toplevel.GoTypeSpec

            if (!getName().equals(goType.getName()))
                return false;

            if (isPrimitive())
                return true;
            GoTypeSpec goTypeSpec = GoPsiUtils.resolveTypeSpec(this);
            GoTypeSpec goTypeSpec1 = GoPsiUtils.resolveTypeSpec((GoPsiTypeName) goType);

            if (goTypeSpec == null || goTypeSpec1 == null) {
                return false;
            }

            if (!goTypeSpec.getContainingFile().getContainingDirectory().equals(goTypeSpec1.getContainingFile().getContainingDirectory()))
                return false;

            return true;
        }
        else {
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.toplevel.GoTypeSpec

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

        GoTypeSpec typeSpec = GoPsiUtils.resolveTypeSpec(typeName);
        if (typeSpec != null) {
            return resolveToFinalType(typeSpec.getType(), level + 1);
        }
        return type;
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.toplevel.GoTypeSpec

    private boolean tryTypeDeclaration(PsiElement element) {
        if ( !(element instanceof GoTypeSpec) ) {
            return true;
        }

        GoTypeSpec typeSpec = (GoTypeSpec) element;

        GoTypeNameDeclaration typeNameDeclaration = typeSpec.getTypeNameDeclaration();

        if (typeNameDeclaration != null ) {
            String typeName = typeNameDeclaration.getName();

            if ( typeName != null && Character.isUpperCase(typeName.charAt(0)) ) {
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.