[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/model LengthEstimator.java,1.2,1.3 ModelUti
Brought to you by:
fabioz
From: Aleksandar T. <at...@us...> - 2004-05-05 02:05:47
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17997/src/org/python/pydev/editor/model Modified Files: LengthEstimator.java ModelUtils.java Scope.java Log Message: Minor tweaks: - removed some debug printfs - hyperlinks show up only when there is something to jump to - OydevPlugin got an error dialog Index: Scope.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model/Scope.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Scope.java 27 Apr 2004 01:06:58 -0000 1.4 --- Scope.java 5 May 2004 02:05:08 -0000 1.5 *************** *** 129,133 **** } } ! if (start != null && start instanceof ClassNode) // class name can also be a function call retVal.add(start); --- 129,133 ---- } } ! if (start != null && start instanceof ClassNode && c.compare(token, start) == 0) // class name can also be a function call retVal.add(start); Index: LengthEstimator.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model/LengthEstimator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LengthEstimator.java 15 Apr 2004 23:19:21 -0000 1.2 --- LengthEstimator.java 5 May 2004 02:05:08 -0000 1.3 *************** *** 51,55 **** public Object visitAssert(Assert node) throws Exception { ! System.out.println("lenVisitAssert:" + node.toString("")); return null; } --- 51,55 ---- public Object visitAssert(Assert node) throws Exception { ! // System.out.println("lenVisitAssert:" + node.toString("")); return null; } *************** *** 57,66 **** public Object visitAssign(Assign node) throws Exception { ! System.out.println("lenVisitAssign:" + node.toString("")); return null; } public Object visitAugAssign(AugAssign node) throws Exception { ! System.out.println("lenVisitAugAssign:" + node.toString("")); return null; } --- 57,66 ---- public Object visitAssign(Assign node) throws Exception { ! // System.out.println("lenVisitAssign:" + node.toString("")); return null; } public Object visitAugAssign(AugAssign node) throws Exception { ! // System.out.println("lenVisitAugAssign:" + node.toString("")); return null; } *************** *** 74,78 **** public Object visitBoolOp(BoolOp node) throws Exception { ! System.out.println("lenVisitBoolOp:" + node.toString("")); return null; } --- 74,78 ---- public Object visitBoolOp(BoolOp node) throws Exception { ! // System.out.println("lenVisitBoolOp:" + node.toString("")); return null; } *************** *** 80,89 **** public Object visitBreak(Break node) throws Exception { ! System.out.println("lenVisitBreak:" + node.toString("")); return null; } public Object visitClassDef(ClassDef node) throws Exception { ! System.out.println("lenVisitClassDef:" + node.name); return null; } --- 80,89 ---- public Object visitBreak(Break node) throws Exception { ! // System.out.println("lenVisitBreak:" + node.toString("")); return null; } public Object visitClassDef(ClassDef node) throws Exception { ! // System.out.println("lenVisitClassDef:" + node.name); return null; } *************** *** 91,95 **** public Object visitCompare(Compare node) throws Exception { ! System.out.println("lenVisitCompare:" + node.toString("")); return null; } --- 91,95 ---- public Object visitCompare(Compare node) throws Exception { ! // System.out.println("lenVisitCompare:" + node.toString("")); return null; } *************** *** 97,101 **** public Object visitContinue(Continue node) throws Exception { ! System.out.println("lenVisitContinue:" + node.toString("")); return null; } --- 97,101 ---- public Object visitContinue(Continue node) throws Exception { ! // System.out.println("lenVisitContinue:" + node.toString("")); return null; } *************** *** 103,107 **** public Object visitDelete(Delete node) throws Exception { ! System.out.println("lenVisitDelete:" + node.toString("")); return null; } --- 103,107 ---- public Object visitDelete(Delete node) throws Exception { ! // System.out.println("lenVisitDelete:" + node.toString("")); return null; } *************** *** 109,113 **** public Object visitDict(Dict node) throws Exception { ! System.out.println("lenVisitDict:" + node.toString("")); return null; } --- 109,113 ---- public Object visitDict(Dict node) throws Exception { ! // System.out.println("lenVisitDict:" + node.toString("")); return null; } *************** *** 115,119 **** public Object visitEllipsis(Ellipsis node) throws Exception { ! System.out.println("lenVisitEllipsis:" + node.toString("")); return null; } --- 115,119 ---- public Object visitEllipsis(Ellipsis node) throws Exception { ! // System.out.println("lenVisitEllipsis:" + node.toString("")); return null; } *************** *** 121,125 **** public Object visitExec(Exec node) throws Exception { ! System.out.println("lenVisitExec:" + node.toString("")); return null; } --- 121,125 ---- public Object visitExec(Exec node) throws Exception { ! // System.out.println("lenVisitExec:" + node.toString("")); return null; } *************** *** 127,131 **** public Object visitExpr(Expr node) throws Exception { ! System.out.println("lenVisitExpr:" + node.toString("")); return null; } --- 127,131 ---- public Object visitExpr(Expr node) throws Exception { ! // System.out.println("lenVisitExpr:" + node.toString("")); return null; } *************** *** 133,137 **** public Object visitExpression(Expression node) throws Exception { ! System.out.println("lenVisitExpression:" + node.toString("")); return null; } --- 133,137 ---- public Object visitExpression(Expression node) throws Exception { ! // System.out.println("lenVisitExpression:" + node.toString("")); return null; } *************** *** 139,143 **** public Object visitExtSlice(ExtSlice node) throws Exception { ! System.out.println("lenVisitExtSlice:" + node.toString("")); return null; } --- 139,143 ---- public Object visitExtSlice(ExtSlice node) throws Exception { ! // System.out.println("lenVisitExtSlice:" + node.toString("")); return null; } *************** *** 145,149 **** public Object visitFor(For node) throws Exception { ! System.out.println("lenVisitFor:" + node.toString("")); return null; } --- 145,149 ---- public Object visitFor(For node) throws Exception { ! // System.out.println("lenVisitFor:" + node.toString("")); return null; } *************** *** 151,155 **** public Object visitFunctionDef(FunctionDef node) throws Exception { ! System.out.println("lenVisitFunctionDef:" + node.toString("")); return null; } --- 151,155 ---- public Object visitFunctionDef(FunctionDef node) throws Exception { ! // System.out.println("lenVisitFunctionDef:" + node.toString("")); return null; } *************** *** 157,161 **** public Object visitGlobal(Global node) throws Exception { ! System.out.println("lenVisitGlobal:" + node.toString("")); return null; } --- 157,161 ---- public Object visitGlobal(Global node) throws Exception { ! // System.out.println("lenVisitGlobal:" + node.toString("")); return null; } *************** *** 163,167 **** public Object visitIf(If node) throws Exception { ! System.out.println("lenVisitIf:" + node.toString("")); return null; } --- 163,167 ---- public Object visitIf(If node) throws Exception { ! // System.out.println("lenVisitIf:" + node.toString("")); return null; } *************** *** 169,173 **** public Object visitImport(Import node) throws Exception { ! System.out.println("lenVisitImport:" + node.toString("")); return null; } --- 169,173 ---- public Object visitImport(Import node) throws Exception { ! // System.out.println("lenVisitImport:" + node.toString("")); return null; } *************** *** 175,179 **** public Object visitImportFrom(ImportFrom node) throws Exception { ! System.out.println("lenVisitImportFrom:" + node.toString("")); return null; } --- 175,179 ---- public Object visitImportFrom(ImportFrom node) throws Exception { ! // System.out.println("lenVisitImportFrom:" + node.toString("")); return null; } *************** *** 181,185 **** public Object visitIndex(Index node) throws Exception { ! System.out.println("lenVisitIndex:" + node.toString("")); return null; } --- 181,185 ---- public Object visitIndex(Index node) throws Exception { ! // System.out.println("lenVisitIndex:" + node.toString("")); return null; } *************** *** 187,191 **** public Object visitInteractive(Interactive node) throws Exception { ! System.out.println("lenVisitInteractive:" + node.toString("")); return null; } --- 187,191 ---- public Object visitInteractive(Interactive node) throws Exception { ! // System.out.println("lenVisitInteractive:" + node.toString("")); return null; } *************** *** 193,197 **** public Object visitLambda(Lambda node) throws Exception { ! System.out.println("lenVisitLambda:" + node.toString("")); return null; } --- 193,197 ---- public Object visitLambda(Lambda node) throws Exception { ! // System.out.println("lenVisitLambda:" + node.toString("")); return null; } *************** *** 199,203 **** public Object visitList(List node) throws Exception { ! System.out.println("lenVisitList:" + node.toString("")); return null; } --- 199,203 ---- public Object visitList(List node) throws Exception { ! // System.out.println("lenVisitList:" + node.toString("")); return null; } *************** *** 205,209 **** public Object visitListComp(ListComp node) throws Exception { ! System.out.println("lenVisitListComp:" + node.toString("")); return null; } --- 205,209 ---- public Object visitListComp(ListComp node) throws Exception { ! // System.out.println("lenVisitListComp:" + node.toString("")); return null; } *************** *** 211,215 **** public Object visitModule(Module node) throws Exception { ! System.out.println("lenVisitModule:" + node.toString("")); return null; } --- 211,215 ---- public Object visitModule(Module node) throws Exception { ! // System.out.println("lenVisitModule:" + node.toString("")); return null; } *************** *** 222,226 **** public Object visitPass(Pass node) throws Exception { ! System.out.println("lenVisitPass:" + node.toString("")); return null; } --- 222,226 ---- public Object visitPass(Pass node) throws Exception { ! // System.out.println("lenVisitPass:" + node.toString("")); return null; } *************** *** 228,232 **** public Object visitPrint(Print node) throws Exception { ! System.out.println("lenVisitPrint:" + node.toString("")); return null; } --- 228,232 ---- public Object visitPrint(Print node) throws Exception { ! // System.out.println("lenVisitPrint:" + node.toString("")); return null; } *************** *** 234,238 **** public Object visitRaise(Raise node) throws Exception { ! System.out.println("lenVisitRaise:" + node.toString("")); return null; } --- 234,238 ---- public Object visitRaise(Raise node) throws Exception { ! // System.out.println("lenVisitRaise:" + node.toString("")); return null; } *************** *** 240,244 **** public Object visitRepr(Repr node) throws Exception { ! System.out.println("lenVisitRepr:" + node.toString("")); return null; } --- 240,244 ---- public Object visitRepr(Repr node) throws Exception { ! // System.out.println("lenVisitRepr:" + node.toString("")); return null; } *************** *** 246,250 **** public Object visitReturn(Return node) throws Exception { ! System.out.println("lenVisitReturn:" + node.toString("")); return null; } --- 246,250 ---- public Object visitReturn(Return node) throws Exception { ! // System.out.println("lenVisitReturn:" + node.toString("")); return null; } *************** *** 252,256 **** public Object visitSlice(Slice node) throws Exception { ! System.out.println("lenVisitSlice:" + node.toString("")); return null; } --- 252,256 ---- public Object visitSlice(Slice node) throws Exception { ! // System.out.println("lenVisitSlice:" + node.toString("")); return null; } *************** *** 270,274 **** public Object visitSuite(Suite node) throws Exception { ! System.out.println("lenVisitSuite:" + node.toString("")); return null; } --- 270,274 ---- public Object visitSuite(Suite node) throws Exception { ! // System.out.println("lenVisitSuite:" + node.toString("")); return null; } *************** *** 276,280 **** public Object visitTryExcept(TryExcept node) throws Exception { ! System.out.println("lenVisitTryExcept:" + node.toString("")); return null; } --- 276,280 ---- public Object visitTryExcept(TryExcept node) throws Exception { ! // System.out.println("lenVisitTryExcept:" + node.toString("")); return null; } *************** *** 282,286 **** public Object visitTryFinally(TryFinally node) throws Exception { ! System.out.println("lenVisitTryFinally:" + node.toString("")); return null; } --- 282,286 ---- public Object visitTryFinally(TryFinally node) throws Exception { ! // System.out.println("lenVisitTryFinally:" + node.toString("")); return null; } *************** *** 294,298 **** public Object visitUnaryOp(UnaryOp node) throws Exception { ! System.out.println("lenVisitUnaryOp:" + node.toString("")); return null; } --- 294,298 ---- public Object visitUnaryOp(UnaryOp node) throws Exception { ! // System.out.println("lenVisitUnaryOp:" + node.toString("")); return null; } *************** *** 300,304 **** public Object visitWhile(While node) throws Exception { ! System.out.println("lenVisitWhile:" + node.toString("")); return null; } --- 300,304 ---- public Object visitWhile(While node) throws Exception { ! // System.out.println("lenVisitWhile:" + node.toString("")); return null; } *************** *** 306,310 **** public Object visitYield(Yield node) throws Exception { ! System.out.println("lenVisitYield:" + node.toString("")); return null; } --- 306,310 ---- public Object visitYield(Yield node) throws Exception { ! // System.out.println("lenVisitYield:" + node.toString("")); return null; } Index: ModelUtils.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model/ModelUtils.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ModelUtils.java 27 Apr 2004 01:06:58 -0000 1.4 --- ModelUtils.java 5 May 2004 02:05:08 -0000 1.5 *************** *** 68,72 **** if (loc.contained(root.getStart(), root.getEnd()) && ((root.getProperties() & properties) == properties)) { ! System.out.println(root.toString()); return root; } --- 68,73 ---- if (loc.contained(root.getStart(), root.getEnd()) && ((root.getProperties() & properties) == properties)) { ! // LAM Uncomment this to see all items you are hovering over ! // System.out.println(root.toString()); return root; } *************** *** 203,207 **** }); for (Iterator i = funcCalls.iterator(); i.hasNext();) { ! FunctionNode funcNode = (FunctionNode)i.next(); retVal.add(new ItemPointer(funcNode.getPath(), funcNode.getStart(), funcNode.getEnd())); } --- 204,208 ---- }); for (Iterator i = funcCalls.iterator(); i.hasNext();) { ! AbstractNode funcNode = (AbstractNode)i.next(); retVal.add(new ItemPointer(funcNode.getPath(), funcNode.getStart(), funcNode.getEnd())); } *************** *** 231,235 **** ); for (Iterator i = funcCalls.iterator(); i.hasNext();) { ! FunctionNode funcNode = (FunctionNode)i.next(); retVal.add(new ItemPointer(funcNode.getPath(), funcNode.getStart(), funcNode.getEnd())); } --- 232,236 ---- ); for (Iterator i = funcCalls.iterator(); i.hasNext();) { ! AbstractNode funcNode = (AbstractNode)i.next(); retVal.add(new ItemPointer(funcNode.getPath(), funcNode.getStart(), funcNode.getEnd())); } |