Examples of GoVarDeclaration


Examples of ro.redeul.google.go.lang.psi.declarations.GoVarDeclaration

            CommonRefactoringUtil.showErrorHint(project, editor, message, "Refactoring error!", null);
            return;
        }

        GoLiteralIdentifier identifier = (GoLiteralIdentifier) element;
        GoVarDeclaration declaration = (GoVarDeclaration) statement;
        try {
            inlineElement(new InlineContext(project, editor, identifier, declaration, (GoPsiElement) scope));
        } catch (GoRefactoringException e) {
            if (ApplicationManager.getApplication().isUnitTestMode()) {
                throw new RuntimeException(e);
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.declarations.GoVarDeclaration

    }

    private PsiElement getInitializer(GoLiteralIdentifier identifier) {
        PsiElement parent = identifier.getParent();
        if (parent instanceof GoVarDeclaration) {
            GoVarDeclaration declaration = (GoVarDeclaration) parent;
            GoLiteralIdentifier[] identifiers = declaration.getIdentifiers();
            GoExpr[] expressions = declaration.getExpressions();
            if (expressions.length != identifiers.length) {
                return null;
            }

            for (int i = 0; i < expressions.length; i++) {
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.declarations.GoVarDeclaration

        }

        GoLiteralIdentifier id = (GoLiteralIdentifier) element;
        PsiElement parent = id.getParent();
        if (parent instanceof GoVarDeclaration) {
            GoVarDeclaration gsvd = (GoVarDeclaration) parent;
            removeIdentifier(id, parent, gsvd.getIdentifiers(), gsvd.getExpressions());
        } else if (parent instanceof GoConstDeclaration) {
            GoConstDeclaration gcd = (GoConstDeclaration) parent;
            removeIdentifier(id, parent, gcd.getIdentifiers(), gcd.getExpressions());
        }
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.declarations.GoVarDeclaration

            PsiElement parent = element.getParent();
            GoPsiType type = null;
            GoLiteralIdentifier[] identifiers = GoLiteralIdentifier.EMPTY_ARRAY;
            GoExpr[] expressions = GoExpr.EMPTY_ARRAY;
            if (parent instanceof GoVarDeclaration) {
                GoVarDeclaration vd = (GoVarDeclaration) parent;
                type = vd.getIdentifiersType();
                identifiers = vd.getIdentifiers();
                expressions = vd.getExpressions();
            } else if (parent instanceof GoConstDeclaration) {
                GoConstDeclaration cd = (GoConstDeclaration) parent;
                type = cd.getIdentifiersType();
                identifiers = cd.getIdentifiers();
                expressions = cd.getExpressions();
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.