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());
}