Examples of accept()


Examples of org.powermock.objectweb.asm.ClassReader.accept()

        if (loader == null || shouldIgnore(className)) {
            return null;
        }
        final ClassReader reader = new ClassReader(classfileBuffer);
        final ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
        reader.accept(new PowerMockClassVisitor(writer),
                ClassReader.SKIP_FRAMES);
        return writer.toByteArray();
    }

}
View Full Code Here

Examples of org.python.antlr.ast.Name.accept()

            Name n = in.get(i);
            if (end == -1) {
                end = n.getCharStopIndex();
            }
            @SuppressWarnings("unchecked")
            NName nn = (NName)n.accept(this);
            out = new NQname(out, nn, n.getCharStartIndex(), end);
        }
        return out;
    }
View Full Code Here

Examples of org.python.pydev.parser.jython.SimpleNode.accept()

                                Log.log("Found node with beginLine <= 0:" + node + " line: " + node.beginLine);
                            }
                            return this;
                        }
                    };
                    lastNodeBeforePassedLine.accept(v);
                } catch (Exception e) {
                    Log.log(e);
                }
                if (line[0] != Integer.MAX_VALUE) {
                    lineForLocal = line[0];
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.ClassDef.accept()

                                    ClassDef classDef = (ClassDef) d.scope.getClassDef();
                                    if (classDef != null) {
                                        FindDefinitionModelVisitor visitor = new FindDefinitionModelVisitor(
                                                actToks.get(actToksLen - 1), d.line, d.col, d.module);
                                        try {
                                            classDef.accept(visitor);
                                        } catch (StopVisitingException e) {
                                            //expected exception
                                        }
                                        if (visitor.definitions.size() == 0) {
                                            return EMPTY_ITOKEN_ARRAY;
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.Comprehension.accept()

    private void visitListCompGenerators(ListComp node, List<exprType> eltsToVisit) throws Exception {
        for (comprehensionType c : node.generators) {
            Comprehension comp = (Comprehension) c;
            if (node.elt instanceof ListComp) {
                visitListCompGenerators((ListComp) node.elt, eltsToVisit);
                comp.accept(this);
            } else {
                comp.accept(this);
                eltsToVisit.add(node.elt);
            }
        }
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.Import.accept()

        }
        if (v instanceof Import) {
            Import f = (Import) v;
            FindLastLineVisitor findLastLineVisitor = new FindLastLineVisitor();
            try {
                f.accept(findLastLineVisitor);
                SimpleNode lastNode = findLastLineVisitor.getLastNode();
                return lastNode.beginLine;
            } catch (Exception e) {
                Log.log(e);
            }
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.ImportFrom.accept()

        }
        if (v instanceof ImportFrom) {
            ImportFrom f = (ImportFrom) v;
            FindLastLineVisitor findLastLineVisitor = new FindLastLineVisitor();
            try {
                f.accept(findLastLineVisitor);
                SimpleNode lastNode = findLastLineVisitor.getLastNode();
                ISpecialStr lastSpecialStr = findLastLineVisitor.getLastSpecialStr();
                if (lastSpecialStr != null && lastSpecialStr.toString().equals(")")) {
                    //it was an from xxx import (euheon, utehon)
                    return lastSpecialStr.getBeginLine();
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.Module.accept()

            SimpleNode currentScope = module;

            try {
                FindScopeVisitor scopeVisitor = new FindScopeVisitor(startLineIndexInASTCoords,
                        selection.getCursorColumn() + 1);
                module.accept(scopeVisitor);
                ILocalScope scope = scopeVisitor.scope;
                FastStack scopeStack = scope.getScopeStack();
                currentScope = (SimpleNode) scopeStack.peek(); //at least the module should be there if we don't have anything.
            } catch (Exception e1) {
                Log.log(e1);
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.WithItem.accept()

            for (int i = 0; i < node.with_item.length; i++) {
                if (i > 0) {
                    doc.addRequire(",", lastNode);
                }
                WithItem withItem = (WithItem) node.with_item[i];
                withItem.accept(this);
            }
        }

        doc.addRequire(":", lastNode);
        this.doc.addRequireIndent(":", lastNode);
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.exprType.accept()

            if (i >= 1) { //more than one assign
                doc.add(lowerAndHigher.o2.getLine(), lowerAndHigher.o2.getBeginCol(),
                        this.prefs.getAssignPunctuation(), node);
            }
            id = this.doc.pushRecordChanges();
            target.accept(this);
            recordChanges = this.doc.popRecordChanges(id);
            lowerAndHigher = doc.getLowerAndHigerFound(recordChanges);
        }
        doc.add(lowerAndHigher.o2.getLine(), lowerAndHigher.o2.getBeginCol(), this.prefs.getAssignPunctuation(), node);
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.