The following forum message was posted by fabioz at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4021200:
Yes, you can use the python parser for that (the only thing is that it's not safe to do those changes if there's some syntax error). Take a look at: org.python.pydev.parser.PyParser.reparseDocument to parse the document (which will give you an AST and the errors it found during parsing) org.python.pydev.refactoring.ast.factory.PyAstFactory: some helpers to deal with the node (it's currently very raw, but that's where the functions for creating an AST should be) org.python.pydev.parser.visitors.NodeUtils: Some utilitaries for dealing with nodes org.python.pydev.refactoring.tests.ast.factory.PyAstFactoryWithPrettyPrinting: A test that will parse a document and pretty-print it. Cheers, Fabio ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users