[Pydev-cvs] org.python.pydev.parser/src/org/python/pydev/parser/visitors/scope OutlineCreatorVisit
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2007-08-04 23:14:51
|
Update of /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/visitors/scope In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22713/src/org/python/pydev/parser/visitors/scope Modified Files: OutlineCreatorVisitor.java Log Message: Don't show assignments/imports after if __name__ == '__main__': in outline. Index: OutlineCreatorVisitor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/visitors/scope/OutlineCreatorVisitor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OutlineCreatorVisitor.java 19 Jun 2007 00:30:43 -0000 1.3 --- OutlineCreatorVisitor.java 4 Aug 2007 23:14:52 -0000 1.4 *************** *** 10,16 **** --- 10,18 ---- import org.python.pydev.parser.jython.ast.Assign; import org.python.pydev.parser.jython.ast.FunctionDef; + import org.python.pydev.parser.jython.ast.If; import org.python.pydev.parser.jython.ast.Import; import org.python.pydev.parser.jython.ast.ImportFrom; import org.python.pydev.parser.jython.ast.commentType; + import org.python.pydev.parser.visitors.NodeUtils; public class OutlineCreatorVisitor extends EasyASTIteratorWithChildrenVisitor{ *************** *** 78,81 **** --- 80,92 ---- } + + @Override + public Object visitIf(If node) throws Exception { + if(NodeUtils.isIfMAinNode(node)){ + return null; + }else{ + return super.visitIf(node); + } + } |