Examples of GoRecursiveElementVisitor


Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

    @Override
    protected void doCheckFile(@NotNull GoFile file,
                               @NotNull final InspectionResult result) {

        new GoRecursiveElementVisitor() {
            @Override
            public void visitConstDeclarations(GoConstDeclarations declarations) {
                checkConstDeclarations(declarations, result);
                visitElement(declarations);
            }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

public class FunctionWithResultButWihtoutReturnInspection extends AbstractWholeGoFileInspection
{
    @Override
    protected void doCheckFile(@NotNull GoFile file, @NotNull final InspectionResult result) {

        new GoRecursiveElementVisitor() {
            @Override
            public void visitFunctionDeclaration(GoFunctionDeclaration declaration) {
                checkFunction(result, declaration);
            }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

        return "Label usage";
    }

    @Override
    protected void doCheckFile(@NotNull GoFile file, @NotNull final InspectionResult result) {
        new GoRecursiveElementVisitor() {
            @Override
            public void visitFunctionDeclaration(GoFunctionDeclaration declaration) {
                checkFunction(result, declaration);
            }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

    }

    private static void checkFunction(final InspectionResult result, GoFunctionDeclaration function) {
        final Map<String, GoLiteralIdentifier> labelDeclarations = new HashMap<String, GoLiteralIdentifier>();
        final List<GoLiteralIdentifier> labelUsages = new ArrayList<GoLiteralIdentifier>();
        new GoRecursiveElementVisitor() {
            @Override
            public void visitLabeledStatement(GoLabeledStatement statement) {
                GoLiteralIdentifier label = statement.getLabel();
                String name = label.getName();
                if (labelDeclarations.containsKey(name)) {
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

        return "Fmt usage";
    }

    @Override
    protected void doCheckFile(@NotNull GoFile file, @NotNull final InspectionResult result) {
        new GoRecursiveElementVisitor() {
            @Override
            public void visitCallOrConvExpression(GoCallOrConvExpression expression) {
                checkFmtCall(result, expression);
            }
        }.visitFile(file);
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

public class FunctionReturnParameterInspection extends AbstractWholeGoFileInspection {
    @Override
    protected void doCheckFile(@NotNull GoFile file, @NotNull final InspectionResult result) {

        new GoRecursiveElementVisitor() {
            @Override
            public void visitFunctionDeclaration(GoFunctionDeclaration declaration) {
                visitElement(declaration);
                checkFunction(result, declaration);
            }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

        return goExprs;
    }

    private void setIotaValue(GoExpr expr, final Integer iotaValue) {
        expr.accept(new GoRecursiveElementVisitor() {
            @Override
            public void visitLiteralIdentifier(GoLiteralIdentifier identifier) {
                if (identifier.isIota())
                    identifier.setIotaValue(iotaValue);
            }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

public class ConstantExpressionsInConstDeclarationsInspection
        extends AbstractWholeGoFileInspection {

    @Override
    protected void doCheckFile(@NotNull GoFile file, @NotNull final InspectionResult result) {
        new GoRecursiveElementVisitor() {
            @Override
            public void visitConstDeclaration(GoConstDeclaration declaration) {
                checkConstDeclaration(declaration, result);
            }
        }.visitFile(file);
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

        if (function == null) {
            return new Object[0];
        }

        final TreeSet<String> labels = new TreeSet<String>();
        new GoRecursiveElementVisitor() {
            @Override
            public void visitLabeledStatement(GoLabeledStatement statement) {
                super.visitLabeledStatement(statement);

                GoLiteralIdentifier label = statement.getLabel();
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor

    private static List<GoIfStatement> findAllDependentIfs(GoIfStatement ifStatement,
                                                           GoSimpleStatement simpleStatement) {
        final List<GoIfStatement> dependentIfs = new ArrayList<GoIfStatement>();
        final Set<GoIfStatement> outerIfs = findAllOuterIfs(ifStatement);

        new GoRecursiveElementVisitor() {
            @Override
            public void visitLiteralIdentifier(GoLiteralIdentifier identifier) {
                PsiElement resolve = resolveSafely(identifier, PsiElement.class);
                if (resolve == null) {
                    return;
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.