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

Examples of org.python.pydev.refactoring.ast.visitors.context.ScopeVariablesVisitor


        ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source),
                new PythonNatureStub(), createVersionProvider());

        for (FunctionDefAdapter func : module.getFunctions()) {

            ScopeVariablesVisitor visitor = VisitorFactory.createContextVisitor(ScopeVariablesVisitor.class,
                    func.getASTNode(), module, func);

            printAttributes(buffer, visitor, func.getName());
        }
        for (IClassDefAdapter clazz : module.getClasses()) {
            ClassDefAdapter c = (ClassDefAdapter) clazz;
            ScopeVariablesVisitor visitor = VisitorFactory.createContextVisitor(ScopeVariablesVisitor.class,
                    c.getASTNode(), module, c);

            printAttributes(buffer, visitor, clazz.getName());
        }
View Full Code Here


        return assignedVariables;
    }

    public List<SimpleAdapter> getUsedVariables() {
        if (usedVariables == null) {
            ScopeVariablesVisitor visitor = VisitorFactory.createContextVisitor(ScopeVariablesVisitor.class,
                    getASTNode(), this.getModule(), this);
            usedVariables = visitor.getAll();
        }
        return usedVariables;
    }
View Full Code Here

TOP

Related Classes of org.python.pydev.refactoring.ast.visitors.context.ScopeVariablesVisitor

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.