Package org.python.pydev.refactoring.ast.visitors.position

Examples of org.python.pydev.refactoring.ast.visitors.position.LastLineVisitor


            ClassDef classNode = (ClassDef) node;
            for (stmtType statement : classNode.body) {
                if (nodeHelper.isInit(statement)) {
                    FunctionDef func = (FunctionDef) statement;
                    stmtType lastStmt = func.body[func.body.length - 1];
                    LastLineVisitor visitor = VisitorFactory.createVisitor(LastLineVisitor.class, lastStmt);
                    return visitor.getLastLine();
                }
            }
        }
        return super.getLine();
    }
View Full Code Here


     * (non-Javadoc)
     *
     * @see org.python.pydev.refactoring.ast.adapters.IASTNodeAdapte#getNodeLastLine()
     */
    public int getNodeLastLine() {
        LastLineVisitor visitor = VisitorFactory.createVisitor(LastLineVisitor.class, getASTNode());
        return visitor.getLastLine();
    }
View Full Code Here

TOP

Related Classes of org.python.pydev.refactoring.ast.visitors.position.LastLineVisitor

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.