Package ro.redeul.google.go.lang.psi.declarations

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


    }

    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

        }

        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

            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

Related Classes of ro.redeul.google.go.lang.psi.declarations.GoVarDeclaration

Copyright © 2018 www.massapicom. 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.