Examples of GoTypeStructAnonymousField


Examples of ro.redeul.google.go.lang.psi.types.struct.GoTypeStructAnonymousField

        assertEquals(0, structType.getFields().length);
        assertEquals(1, structType.getAnonymousFields().length);


        GoTypeStructAnonymousField anonymousField =
            childAt(0, structType.getAnonymousFields());


        assertEquals("Reader", anonymousField.getFieldName());

        getAs(GoPsiTypeName.class, anonymousField.getType());
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.struct.GoTypeStructAnonymousField

            );

        assertEquals(0, structType.getFields().length);
        assertEquals(1, structType.getAnonymousFields().length);

        GoTypeStructAnonymousField field =
            childAt(0, structType.getAnonymousFields());

        assertEquals("Reader", field.getFieldName());
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.struct.GoTypeStructAnonymousField

                        if (field.getTag() != null) {
                            data.append(" ").append(field.getTag());
                        }
                    } else if (element instanceof GoTypeStructAnonymousField) {
                        GoTypeStructAnonymousField field = (GoTypeStructAnonymousField) element;
                        GoTypes.fromPsi(field.getType()).accept(visitor);

                        if (field.getTag() != null) {
                            data.append(" ").append(field.getTag());
                        }
                    }
                }

                data.append("}");
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.struct.GoTypeStructAnonymousField

                }
            } else {
                //Check anonymous fields
                if (!(otherStructAllFields[i] instanceof GoTypeStructAnonymousField))
                    return false;
                GoTypeStructAnonymousField field = (GoTypeStructAnonymousField) allFields[i];
                GoTypeStructAnonymousField otherField = (GoTypeStructAnonymousField) otherStructAllFields[i];
                if (!field.getFieldName().equals(otherField.getFieldName()))
                    return false;
                if (!field.getType().isIdentical(otherField.getType()))
                    return false;
                PsiElementBase tag = field.getTag();
                PsiElementBase otherTag = otherField.getTag();
                if ((tag == null && otherTag != null) || (otherTag == null && tag != null))
                    return false;
                if (tag != null && !tag.getText().equals(otherTag.getText()))
                    return false;
            }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.struct.GoTypeStructAnonymousField

            return new GoType[]{types().fromPsiType(structField.getType())};
        }

        if (target instanceof GoTypeStructAnonymousField) {
            GoTypeStructAnonymousField structField =
                    (GoTypeStructAnonymousField) target;

            return new GoType[]{
                    types().fromPsiType(structField.getType())
            };
        }

        if (target instanceof GoLiteralIdentifier) {
            GoFunctionDeclaration functionDeclaration = GoIdentifierUtils.getFunctionDeclaration(target);
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.