pydev-cvs Mailing List for PyDev for Eclipse (Page 20)
Brought to you by:
fabioz
You can subscribe to this list here.
2004 |
Jan
|
Feb
(4) |
Mar
(48) |
Apr
(56) |
May
(64) |
Jun
(27) |
Jul
(66) |
Aug
(81) |
Sep
(148) |
Oct
(194) |
Nov
(78) |
Dec
(46) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(125) |
Feb
(126) |
Mar
(163) |
Apr
(133) |
May
(115) |
Jun
(307) |
Jul
(387) |
Aug
(417) |
Sep
(283) |
Oct
(148) |
Nov
(45) |
Dec
(53) |
2006 |
Jan
(240) |
Feb
(200) |
Mar
(267) |
Apr
(231) |
May
(245) |
Jun
(361) |
Jul
(142) |
Aug
(12) |
Sep
(210) |
Oct
(99) |
Nov
(7) |
Dec
(30) |
2007 |
Jan
(161) |
Feb
(511) |
Mar
(265) |
Apr
(74) |
May
(147) |
Jun
(151) |
Jul
(94) |
Aug
(68) |
Sep
(98) |
Oct
(144) |
Nov
(26) |
Dec
(36) |
2008 |
Jan
(98) |
Feb
(107) |
Mar
(199) |
Apr
(113) |
May
(119) |
Jun
(112) |
Jul
(92) |
Aug
(71) |
Sep
(101) |
Oct
(16) |
Nov
|
Dec
|
From: Fabio Z. <fa...@us...> - 2008-05-04 16:49:26
|
Update of /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/revisited In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29846/tests_completions/org/python/pydev/editor/codecompletion/revisited Modified Files: CodeCompletionTestsBase.java Log Message: Fixed recursion while completing in numpy situation where compiled file needed a later reference to a source. Index: CodeCompletionTestsBase.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/revisited/CodeCompletionTestsBase.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CodeCompletionTestsBase.java 29 Feb 2008 19:19:21 -0000 1.10 --- CodeCompletionTestsBase.java 4 May 2008 16:49:31 -0000 1.11 *************** *** 89,92 **** --- 89,93 ---- protected boolean ADD_MX_TO_FORCED_BUILTINS = true; + protected boolean ADD_NUMPY_TO_FORCED_BUILTINS = true; /** *************** *** 259,262 **** --- 260,266 ---- info.addForcedLib("mx"); } + if(ADD_NUMPY_TO_FORCED_BUILTINS){ + info.addForcedLib("numpy"); + } info.restorePythonpath(path, getProgressMonitor()); //here |
From: Fabio Z. <fa...@us...> - 2008-05-04 16:48:53
|
Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29460/src_completions/org/python/pydev/editor/codecompletion/revisited/modules Modified Files: CompiledModule.java Log Message: Fixed recursion while completing in numpy situation where compiled file needed a later reference to a source. Index: CompiledModule.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/modules/CompiledModule.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CompiledModule.java 25 Jan 2008 01:53:38 -0000 1.7 --- CompiledModule.java 4 May 2008 16:48:46 -0000 1.8 *************** *** 343,347 **** } int foundLine = def.o2[0]; ! if(foundLine == 0 && foundAs.length() > 0 && mod != null){ IModule sourceMod = AbstractModule.createModuleFromDoc(mod.getName(), f, new Document(REF.getFileContents(f)), nature, 0); if(sourceMod instanceof SourceModule){ --- 343,347 ---- } int foundLine = def.o2[0]; ! if(foundLine == 0 && foundAs.length() > 0 && mod != null && state.canStillCheckFindSourceFromCompiled(mod, foundAs)){ IModule sourceMod = AbstractModule.createModuleFromDoc(mod.getName(), f, new Document(REF.getFileContents(f)), nature, 0); if(sourceMod instanceof SourceModule){ |
From: Fabio Z. <fa...@us...> - 2008-05-04 16:48:53
|
Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29460/src_completions/org/python/pydev/editor/codecompletion/revisited Modified Files: CompletionStateWrapper.java CompletionState.java Log Message: Fixed recursion while completing in numpy situation where compiled file needed a later reference to a source. Index: CompletionState.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/CompletionState.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CompletionState.java 25 Feb 2008 11:21:34 -0000 1.7 --- CompletionState.java 4 May 2008 16:48:46 -0000 1.8 *************** *** 43,46 **** --- 43,47 ---- public Stack<Memo<IToken>> findResolveImportMemory = new Stack<Memo<IToken>>(); public Memo<String> findModuleCompletionsMemory = new Memo<String>(); + public Memo<String> findSourceFromCompiledMemory = new Memo<String>(1); //max is 1 for this one! public boolean builtinsGotten=false; *************** *** 215,218 **** --- 216,227 ---- } + + public boolean canStillCheckFindSourceFromCompiled(IModule mod, String tok) { + if(!findSourceFromCompiledMemory.isInRecursion(mod, tok)){ + return true; + } + return false; + } + /** * This check is a bit different from the others because of the context it will work in... Index: CompletionStateWrapper.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/CompletionStateWrapper.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CompletionStateWrapper.java 25 Jan 2008 01:53:38 -0000 1.6 --- CompletionStateWrapper.java 4 May 2008 16:48:46 -0000 1.7 *************** *** 91,94 **** --- 91,98 ---- wrapped.checkWildImportInMemory(current, mod); } + + public boolean canStillCheckFindSourceFromCompiled(IModule mod, String tok) { + return wrapped.canStillCheckFindSourceFromCompiled(mod, tok); + } |
From: Fabio Z. <fa...@us...> - 2008-05-04 16:48:53
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29460 Modified Files: Changes.txt Log Message: Fixed recursion while completing in numpy situation where compiled file needed a later reference to a source. Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.383 retrieving revision 1.384 diff -C2 -d -r1.383 -r1.384 *** Changes.txt 3 May 2008 16:19:59 -0000 1.383 --- Changes.txt 4 May 2008 16:48:46 -0000 1.384 *************** *** 16,19 **** --- 16,20 ---- <li>Code completion: variables starting with '_' do not come in a wild import</li> <li>Code completion: can be requested for external files (containing system info)</li> + <li>Code completion: fixed recursion condition</li> <li>Debugger: Step over/Step return can now execute with untraced frames (much faster)</li> <li>Debugger: Problem when handling thread that had no context traced and was directly removed.</li> |
From: Fabio Z. <fa...@us...> - 2008-05-04 16:48:35
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29450/src/org/python/pydev/core Modified Files: ICompletionState.java Log Message: Fixed recursion while completing in numpy situation where compiled file needed a later reference to a source. Index: ICompletionState.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/ICompletionState.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ICompletionState.java 25 Jan 2008 01:53:49 -0000 1.20 --- ICompletionState.java 4 May 2008 16:48:39 -0000 1.21 *************** *** 68,71 **** --- 68,80 ---- void checkFindResolveImportMemory(IToken tok) throws CompletionRecursionException; + + /** + * Unlike other checks, it won't throw an exception, but'll see if the given module was already checked for + * a given token (this happens when we're looking for a token that has been found in a compiled module and + * we want to translate to an actual position... but if we loop for some reason, it has to be stopped and + * the actual compiled module is the source of the definition). + */ + boolean canStillCheckFindSourceFromCompiled(IModule mod, String tok); + boolean getIsInCalltip(); |
From: Fabio Z. <fa...@us...> - 2008-05-03 16:20:03
|
Update of /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/visitors/scope In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10107/src/org/python/pydev/parser/visitors/scope Modified Files: DefinitionsASTIteratorVisitor.java Log Message: Outline: Assign with multiple targets is recognized Index: DefinitionsASTIteratorVisitor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/visitors/scope/DefinitionsASTIteratorVisitor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DefinitionsASTIteratorVisitor.java 10 Jun 2006 18:43:19 -0000 1.7 --- DefinitionsASTIteratorVisitor.java 3 May 2008 16:20:07 -0000 1.8 *************** *** 8,11 **** --- 8,12 ---- import org.python.pydev.parser.jython.ast.Attribute; import org.python.pydev.parser.jython.ast.Name; + import org.python.pydev.parser.jython.ast.Tuple; import org.python.pydev.parser.jython.ast.exprType; *************** *** 39,73 **** */ public static Object visitAssign(EasyAstIteratorBase visitor, Assign node, boolean visitUnhandledAndTraverse) throws Exception { ! exprType[] targets = node.targets; ! for (int i = 0; i < targets.length; i++) { ! exprType t = targets[i]; ! ! if(t instanceof Name){ ! //we are in the class declaration ! if(visitor.isInClassDecl() || visitor.isInGlobal()){ ! //add the attribute for the class ! visitor.atomic(t); ! } ! ! }else if(t instanceof Attribute){ ! ! //we are in a method from the class ! if(visitor.isInClassMethodDecl()){ ! Attribute a = (Attribute) t; ! if(a.value instanceof Name){ ! ! //it is an instance variable attribute ! Name n = (Name) a.value; ! if (n.id.equals("self")){ ! visitor.atomic(t); ! } ! } ! ! }else if(visitor.isInClassDecl() || visitor.isInGlobal()){ ! //add the attribute for the class ! visitor.atomic(t); ! } ! } ! } if(visitUnhandledAndTraverse){ Object ret = visitor.unhandled_node(node); --- 40,45 ---- */ public static Object visitAssign(EasyAstIteratorBase visitor, Assign node, boolean visitUnhandledAndTraverse) throws Exception { ! visitTargetsInAssign(visitor, node.targets); ! if(visitUnhandledAndTraverse){ Object ret = visitor.unhandled_node(node); *************** *** 81,84 **** --- 53,110 ---- /** + * Given a visitor and the targets found in an assign, visit them to find class attributes / instance variables. + * + * @param visitor the visitor + * @param targets the expressions in the target + */ + private static void visitTargetsInAssign(EasyAstIteratorBase visitor, exprType[] targets) { + if(targets == null){ + return; + } + for (int i = 0; i < targets.length; i++) { + exprType t = targets[i]; + if(t instanceof Tuple){ + Tuple tuple = (Tuple) t; + visitTargetsInAssign(visitor, tuple.elts); + } + visitTargetInAssign(visitor, t); + } + } + + /** + * Visit a single target found in an assign to create a class attributes / instance variables if possible. + * @param visitor the visitor + * @param t the expression to visit + */ + private static void visitTargetInAssign(EasyAstIteratorBase visitor, exprType t) { + if(t instanceof Name){ + //we are in the class declaration + if(visitor.isInClassDecl() || visitor.isInGlobal()){ + //add the attribute for the class + visitor.atomic(t); + } + + }else if(t instanceof Attribute){ + + //we are in a method from the class + if(visitor.isInClassMethodDecl()){ + Attribute a = (Attribute) t; + if(a.value instanceof Name){ + + //it is an instance variable attribute + Name n = (Name) a.value; + if (n.id.equals("self")){ + visitor.atomic(t); + } + } + + }else if(visitor.isInClassDecl() || visitor.isInGlobal()){ + //add the attribute for the class + visitor.atomic(t); + } + } + } + + /** * Creates the iterator and transverses the passed root so that the results can be gotten. */ |
From: Fabio Z. <fa...@us...> - 2008-05-03 16:19:54
|
Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/outline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9974/tests/org/python/pydev/outline Modified Files: ParsedItemTest.java Log Message: Outline: Assign with multiple targets is recognized Index: ParsedItemTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/outline/ParsedItemTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ParsedItemTest.java 16 Dec 2007 21:53:33 -0000 1.4 --- ParsedItemTest.java 3 May 2008 16:19:59 -0000 1.5 *************** *** 8,11 **** --- 8,25 ---- public class ParsedItemTest extends PyParserTestBase { + + public static void main(String[] args) { + try { + ParsedItemTest analyzer2 = new ParsedItemTest(); + analyzer2.setUp(); + analyzer2.testParsedItemCreation3(); + analyzer2.tearDown(); + System.out.println("finished"); + + junit.textui.TestRunner.run(ParsedItemTest.class); + } catch (Throwable e) { + e.printStackTrace(); + } + } public void testParsedItemCreation() throws Exception { *************** *** 40,43 **** --- 54,83 ---- } + public void testParsedItemCreation3() throws Exception { + setDefaultVersion(IGrammarVersionProvider.GRAMMAR_PYTHON_VERSION_2_5); + String str = "" + + "class Test:\n" + + " def __init__(self):\n" + + " self.foo, self.bar = 1, 2\n" + + ""; + + SimpleNode node = parseLegalDocStr(str); + + OutlineCreatorVisitor visitor = OutlineCreatorVisitor.create(node); + ParsedItem item = new ParsedItem(visitor.getAll().toArray(new ASTEntryWithChildren[0]), null); + + //module level: Test + assertEquals(1, item.getAstChildrenEntries().length); + + //class level: __init__ + ASTEntryWithChildren classEntry = item.getAstChildrenEntries()[0]; + assertEquals(1, classEntry.children.size()); + + // method level: 2 attributes + ASTEntryWithChildren functionEntry = classEntry.children.get(0); + assertEquals(2, functionEntry.children.size()); + + } + public void testParsedItemCreation2() throws Exception { setDefaultVersion(IGrammarVersionProvider.GRAMMAR_PYTHON_VERSION_2_5); |
From: Fabio Z. <fa...@us...> - 2008-05-03 16:19:54
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9974 Modified Files: Changes.txt Log Message: Outline: Assign with multiple targets is recognized Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.382 retrieving revision 1.383 diff -C2 -d -r1.382 -r1.383 *** Changes.txt 3 May 2008 13:37:35 -0000 1.382 --- Changes.txt 3 May 2008 16:19:59 -0000 1.383 *************** *** 24,27 **** --- 24,28 ---- <li>More templates for "surround with" (Ctrl+1 with selected code)</li> <li>Previous/next method could match 'class' and 'def' on invalid location</li> + <li>Outline: Assign with multiple targets is recognized</li> after 1.3.14 |
From: Fabio Z. <fa...@us...> - 2008-05-03 16:19:54
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editorinput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9974/src/org/python/pydev/editorinput Modified Files: PydevFileEditorInput.java Log Message: Outline: Assign with multiple targets is recognized Index: PydevFileEditorInput.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editorinput/PydevFileEditorInput.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PydevFileEditorInput.java 16 Sep 2007 17:15:53 -0000 1.1 --- PydevFileEditorInput.java 3 May 2008 16:19:59 -0000 1.2 *************** *** 10,17 **** --- 10,19 ---- import org.eclipse.core.runtime.Platform; import org.eclipse.jface.resource.ImageDescriptor; + import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IPathEditorInput; import org.eclipse.ui.IPersistableElement; import org.eclipse.ui.editors.text.ILocationProvider; import org.eclipse.ui.model.IWorkbenchAdapter; + import org.python.pydev.plugin.PydevPlugin; /** *************** *** 133,138 **** */ public boolean equals(Object o) { ! if (o == this) return true; if (o instanceof PydevFileEditorInput) { --- 135,141 ---- */ public boolean equals(Object o) { ! if (o == this){ return true; + } if (o instanceof PydevFileEditorInput) { *************** *** 141,144 **** --- 144,153 ---- } + if (o instanceof IFileEditorInput) { + IFileEditorInput input = (IFileEditorInput) o; + File otherFile = new File(PydevPlugin.getIResourceOSString(input.getFile())); + return fFile.equals(otherFile); + } + if (o instanceof IPathEditorInput) { IPathEditorInput input= (IPathEditorInput)o; |
From: Fabio Z. <fa...@us...> - 2008-05-03 14:07:33
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25545 Modified Files: TODO.txt Log Message: Index: TODO.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/TODO.txt,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** TODO.txt 3 May 2008 13:37:35 -0000 1.66 --- TODO.txt 3 May 2008 14:07:38 -0000 1.67 *************** *** 19,23 **** - ModulesManager: else if(PythonPathHelper.isValidDll(emptyModuleForZip.pathInZip)){ - - Change the stdout/stderr for unicode - CNF: Go into / up in pydev package explorer: http://richclientplatform.blogspot.com/2007/07/adding-go-into-and-go-up-to-cnf.html - Option to add line at end of file --- 19,22 ---- *************** *** 29,39 **** - - occurrences case: - def m1(): - _expr, attr = 1, 3 - def filter(): - return attr <-- mark occurrences here! - - static analysis case: import os --- 28,32 ---- *************** *** 41,53 **** - - debugger - class env: - pass - - if __name__ == '__main__': - print 'step 1\n' #set break here - - #comment <-- removing this comments makes break work (see breakpoint context) - console: - getpass: echo mode --- 34,37 ---- |
From: Fabio Z. <fa...@us...> - 2008-05-03 13:37:34
|
Update of /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/fastparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12840/src/org/python/pydev/parser/fastparser Modified Files: FastParser.java Log Message: Previous/next method could match 'class' and 'def' on invalid location Index: FastParser.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FastParser.java 23 Feb 2008 18:58:16 -0000 1.1 --- FastParser.java 3 May 2008 13:37:39 -0000 1.2 *************** *** 34,41 **** //spaces* 'def' space+ identifier ! private static final Pattern FUNCTION_PATTERN = Pattern.compile("(\\s*)(def\\s+)(\\w*)"); //spaces* 'class' space+ identifier ! private static final Pattern CLASS_PATTERN = Pattern.compile("(\\s*)(class\\s+)(\\w*)"); --- 34,41 ---- //spaces* 'def' space+ identifier ! private static final Pattern FUNCTION_PATTERN = Pattern.compile("(\\s+|^)(def\\s+)(\\w*)"); //spaces* 'class' space+ identifier ! private static final Pattern CLASS_PATTERN = Pattern.compile("(\\s+|^)(class\\s+)(\\w*)"); |
From: Fabio Z. <fa...@us...> - 2008-05-03 13:37:34
|
Update of /cvsroot/pydev/org.python.pydev.parser/tests/org/python/pydev/parser/fastparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12840/tests/org/python/pydev/parser/fastparser Modified Files: FastParserTest.java Log Message: Previous/next method could match 'class' and 'def' on invalid location Index: FastParserTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.parser/tests/org/python/pydev/parser/fastparser/FastParserTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FastParserTest.java 23 Feb 2008 18:58:15 -0000 1.1 --- FastParserTest.java 3 May 2008 13:37:39 -0000 1.2 *************** *** 18,21 **** --- 18,34 ---- public class FastParserTest extends TestCase { + public static void main(String[] args) { + try { + FastParserTest test = new FastParserTest(); + test.setUp(); + test.testGettingClass3(); + test.tearDown(); + junit.textui.TestRunner.run(FastParserTest.class); + + } catch (Throwable e) { + e.printStackTrace(); + } + } + public void testGettingClassOrFunc() throws Exception { Document doc = new Document(); *************** *** 82,85 **** --- 95,146 ---- } + + public void testGettingClass2() throws Exception { + Document doc = new Document(); + doc.set("def GetClassesAndData():\n" + + " curr_widget_class = 10\n" + + "\n" + + "" + + ""); + + List<stmtType> all = FastParser.parseClassesAndFunctions(doc); + assertEquals(1, all.size()); + } + + public void testGettingClass3() throws Exception { + Document doc = new Document(); + doc.set("class A(object):\n" + + " curr_widget_class = 10\n" + + "\n" + + "" + + ""); + + List<stmtType> all = FastParser.parseClassesAndFunctions(doc); + assertEquals(1, all.size()); + } + + public void testGettingClass4() throws Exception { + Document doc = new Document(); + doc.set("\nclass A(object):\n" + + " curr_widget_class = 10\n" + + "\n" + + "" + + ""); + + List<stmtType> all = FastParser.parseClassesAndFunctions(doc); + assertEquals(1, all.size()); + } + + public void testGettingMethod() throws Exception { + Document doc = new Document(); + doc.set("def a():\n" + + " curr_widget_def = 10\n" + + "\n" + + "" + + ""); + + List<stmtType> all = FastParser.parseClassesAndFunctions(doc); + assertEquals(1, all.size()); + } private void check(List<stmtType> all, int position, int classBeginLine, int classBeginCol, int nameBeginLine, int nameBeginCol) { |
From: Fabio Z. <fa...@us...> - 2008-05-03 13:37:30
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/correctionassist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12820/src/org/python/pydev/editor/correctionassist Modified Files: PythonCorrectionProcessor.java Log Message: Previous/next method could match 'class' and 'def' on invalid location Index: PythonCorrectionProcessor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/correctionassist/PythonCorrectionProcessor.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** PythonCorrectionProcessor.java 1 May 2008 14:26:00 -0000 1.37 --- PythonCorrectionProcessor.java 3 May 2008 13:37:35 -0000 1.38 *************** *** 24,28 **** import org.eclipse.ui.texteditor.spelling.SpellingProblem; import org.python.pydev.core.ExtensionHelper; - import org.python.pydev.core.bundle.ImageCache; import org.python.pydev.core.docutils.PySelection; import org.python.pydev.editor.PyEdit; --- 24,27 ---- *************** *** 78,83 **** private PyEdit edit; - private ImageCache imageCache; - /** * Contains additional assists (used from the jython scripting: pyedit_assign_params_to_attributes.py to add new assists) --- 77,80 ---- *************** *** 125,129 **** public PythonCorrectionProcessor(PyEdit edit) { this.edit = edit; - this.imageCache = new ImageCache(PydevPlugin.getDefault().getBundle().getEntry("/")); } --- 122,125 ---- *************** *** 162,166 **** if (assist.isValid(ps, sel, edit, offset)) { try { ! results.addAll(assist.getProps(ps, imageCache, edit.getEditorFile(), edit.getPythonNature(), edit, offset)); } catch (BadLocationException e) { PydevPlugin.log(e); --- 158,162 ---- if (assist.isValid(ps, sel, edit, offset)) { try { ! results.addAll(assist.getProps(ps, PydevPlugin.getImageCache(), edit.getEditorFile(), edit.getPythonNature(), edit, offset)); } catch (BadLocationException e) { PydevPlugin.log(e); |
From: Fabio Z. <fa...@us...> - 2008-05-03 13:37:30
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12820 Modified Files: TODO.txt Changes.txt Log Message: Previous/next method could match 'class' and 'def' on invalid location Index: TODO.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/TODO.txt,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** TODO.txt 25 Apr 2008 00:49:11 -0000 1.65 --- TODO.txt 3 May 2008 13:37:35 -0000 1.66 *************** *** 1,9 **** - check: - PythonCorrectionProcessor: ImageCache should be gotten from the plugin - - ctrl+shift+up/down stops at the end of curr_widget_class - def GetClassesAndData(): - curr_widget_class = 10 - - hierarchy view: show with f4 / close / open view / f4 (will not work) --- 1,2 ---- Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.381 retrieving revision 1.382 diff -C2 -d -r1.381 -r1.382 *** Changes.txt 3 May 2008 13:20:11 -0000 1.381 --- Changes.txt 3 May 2008 13:37:35 -0000 1.382 *************** *** 23,26 **** --- 23,27 ---- <li>Launch: console encoding passed as environment variable (no longer written to the install location)</li> <li>More templates for "surround with" (Ctrl+1 with selected code)</li> + <li>Previous/next method could match 'class' and 'def' on invalid location</li> after 1.3.14 |
From: Fabio Z. <fa...@us...> - 2008-05-03 13:20:08
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5960 Modified Files: Changes.txt Log Message: Interactive console: ESC does not close the console when in floating mode anymore Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.380 retrieving revision 1.381 diff -C2 -d -r1.380 -r1.381 *** Changes.txt 2 May 2008 23:24:14 -0000 1.380 --- Changes.txt 3 May 2008 13:20:11 -0000 1.381 *************** *** 12,15 **** --- 12,16 ---- <li>Interactive console: context information showing in completions</li> <li>Interactive console: backspace will also delete the selected text</li> + <li>Interactive console: ESC does not close the console when in floating mode anymore</li> <li>Code completion: calltips context info correctly made 'bold'</li> <li>Code completion: variables starting with '_' do not come in a wild import</li> |
From: Fabio Z. <fa...@us...> - 2008-05-03 13:20:07
|
Update of /cvsroot/pydev/org.python.pydev/src_dltk_console/org/python/pydev/dltk/console/ui/internal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5960/src_dltk_console/org/python/pydev/dltk/console/ui/internal Modified Files: ScriptConsoleViewer.java ScriptConsoleDocumentListener.java Log Message: Interactive console: ESC does not close the console when in floating mode anymore Index: ScriptConsoleDocumentListener.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_dltk_console/org/python/pydev/dltk/console/ui/internal/ScriptConsoleDocumentListener.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ScriptConsoleDocumentListener.java 4 Apr 2008 02:54:50 -0000 1.10 --- ScriptConsoleDocumentListener.java 3 May 2008 13:20:11 -0000 1.11 *************** *** 325,329 **** */ private void addToPartitioner(ScriptStyleRange style) { ! IDocumentPartitioner partitioner = viewer.getDocument().getDocumentPartitioner(); if (partitioner instanceof ScriptConsolePartitioner) { ScriptConsolePartitioner scriptConsolePartitioner = (ScriptConsolePartitioner) partitioner; --- 325,329 ---- */ private void addToPartitioner(ScriptStyleRange style) { ! IDocumentPartitioner partitioner = this.doc.getDocumentPartitioner(); if (partitioner instanceof ScriptConsolePartitioner) { ScriptConsolePartitioner scriptConsolePartitioner = (ScriptConsolePartitioner) partitioner; Index: ScriptConsoleViewer.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_dltk_console/org/python/pydev/dltk/console/ui/internal/ScriptConsoleViewer.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ScriptConsoleViewer.java 12 Apr 2008 15:40:10 -0000 1.19 --- ScriptConsoleViewer.java 3 May 2008 13:20:11 -0000 1.20 *************** *** 33,36 **** --- 33,38 ---- import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener; + import org.eclipse.swt.events.TraverseEvent; + import org.eclipse.swt.events.TraverseListener; import org.eclipse.swt.events.VerifyEvent; import org.eclipse.swt.events.VerifyListener; *************** *** 512,515 **** --- 514,531 ---- final StyledText styledText = getTextWidget(); + + //Added because we don't want the console to close when the user presses ESC + //(as it would when it's on a floating window) + //we do that because ESC is meant to clear the current line (and as such, + //should do that action and not close the console). + styledText.addTraverseListener(new TraverseListener(){ + + public void keyTraversed(TraverseEvent e) { + if(e.detail == SWT.TRAVERSE_ESCAPE){ + e.doit = false; + } + }}); + + getDocument().addDocumentListener(new IDocumentListener(){ |
From: Fabio Z. <fa...@us...> - 2008-05-02 23:24:16
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20166/src/org/python/pydev/core Modified Files: IPythonNature.java Log Message: Code-completion for external files. https://sourceforge.net/tracker/index.php?func=detail&aid=1951796&group_id=85796&atid=577332 Index: IPythonNature.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/IPythonNature.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** IPythonNature.java 28 Feb 2008 01:44:56 -0000 1.17 --- IPythonNature.java 2 May 2008 23:24:18 -0000 1.18 *************** *** 24,27 **** --- 24,30 ---- public static final String JYTHON_VERSION_2_1 = "jython 2.1"; + public static final String JYTHON_VERSION_LATEST = JYTHON_VERSION_2_1; + public static final String PYTHON_VERSION_LATEST = PYTHON_VERSION_2_5; + /** * this id is provided so that we can have an identifier for python-related things (independent of its version) *************** *** 48,51 **** --- 51,60 ---- /** * set the project version given the constants provided + * + * @see PYTHON_VERSION_2_3 + * @see PYTHON_VERSION_2_4 + * @see PYTHON_VERSION_2_5 + * @see JYTHON_VERSION_2_1 + * * @throws CoreException */ |
From: Fabio Z. <fa...@us...> - 2008-05-02 23:24:13
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20136 Modified Files: Changes.txt Log Message: Code-completion for external files. https://sourceforge.net/tracker/index.php?func=detail&aid=1951796&group_id=85796&atid=577332 Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.379 retrieving revision 1.380 diff -C2 -d -r1.379 -r1.380 *** Changes.txt 2 May 2008 19:18:36 -0000 1.379 --- Changes.txt 2 May 2008 23:24:14 -0000 1.380 *************** *** 14,17 **** --- 14,18 ---- <li>Code completion: calltips context info correctly made 'bold'</li> <li>Code completion: variables starting with '_' do not come in a wild import</li> + <li>Code completion: can be requested for external files (containing system info)</li> <li>Debugger: Step over/Step return can now execute with untraced frames (much faster)</li> <li>Debugger: Problem when handling thread that had no context traced and was directly removed.</li> |
From: Fabio Z. <fa...@us...> - 2008-05-02 23:24:13
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20136/src/org/python/pydev/plugin/nature Modified Files: SystemPythonNature.java Log Message: Code-completion for external files. https://sourceforge.net/tracker/index.php?func=detail&aid=1951796&group_id=85796&atid=577332 Index: SystemPythonNature.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature/SystemPythonNature.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SystemPythonNature.java 28 Feb 2008 01:44:48 -0000 1.11 --- SystemPythonNature.java 2 May 2008 23:24:14 -0000 1.12 *************** *** 27,39 **** public String getVersion() throws CoreException { ! throw new RuntimeException("Not Implemented"); } public String getDefaultVersion() { ! throw new RuntimeException("Not Implemented"); } public void setVersion(String version) throws CoreException { ! throw new RuntimeException("Not Implemented"); } --- 27,49 ---- public String getVersion() throws CoreException { ! if(this.manager.isPython()){ ! return IPythonNature.PYTHON_VERSION_LATEST; ! }else if(this.manager.isJython()){ ! return IPythonNature.JYTHON_VERSION_LATEST; ! }else{ ! throw new RuntimeException("Not python nor jython?"); ! } } public String getDefaultVersion() { ! try { ! return getVersion(); ! } catch (CoreException e) { ! throw new RuntimeException(e); ! } } public void setVersion(String version) throws CoreException { ! throw new RuntimeException("Not Implemented: the system nature is read-only."); } *************** *** 55,59 **** public void saveAstManager() { ! throw new RuntimeException("Not Implemented"); } --- 65,69 ---- public void saveAstManager() { ! throw new RuntimeException("Not Implemented: system nature is only transient."); } *************** *** 102,119 **** } public IToken[] getBuiltinCompletions() { ! return null; } public void setBuiltinCompletions(IToken[] toks) { } public IModule getBuiltinMod() { ! return null; } public void setBuiltinMod(IModule mod) { } public int getGrammarVersion() { IInterpreterInfo info = manager.getDefaultInterpreterInfo(new NullProgressMonitor()); --- 112,140 ---- } + + //builtin completions + private IToken[] builtinCompletions; + public IToken[] getBuiltinCompletions() { ! return builtinCompletions; } public void setBuiltinCompletions(IToken[] toks) { + this.builtinCompletions = toks; } + + + //builtin mod + private IModule builtinMod; public IModule getBuiltinMod() { ! return builtinMod; } public void setBuiltinMod(IModule mod) { + this.builtinMod = mod; } + public int getGrammarVersion() { IInterpreterInfo info = manager.getDefaultInterpreterInfo(new NullProgressMonitor()); |
From: Fabio Z. <fa...@us...> - 2008-05-02 23:24:13
|
Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20136/src_completions/org/python/pydev/editor/codecompletion Modified Files: PythonCompletionProcessor.java Log Message: Code-completion for external files. https://sourceforge.net/tracker/index.php?func=detail&aid=1951796&group_id=85796&atid=577332 Index: PythonCompletionProcessor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/PythonCompletionProcessor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PythonCompletionProcessor.java 4 Apr 2008 02:54:50 -0000 1.5 --- PythonCompletionProcessor.java 2 May 2008 23:24:14 -0000 1.6 *************** *** 20,23 **** --- 20,24 ---- import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; + import org.python.pydev.core.IInterpreterManager; import org.python.pydev.core.IPythonNature; import org.python.pydev.core.docutils.PySelection; *************** *** 25,28 **** --- 26,31 ---- import org.python.pydev.editor.codecompletion.templates.PyTemplateCompletionProcessor; import org.python.pydev.plugin.PydevPlugin; + import org.python.pydev.plugin.nature.SystemPythonNature; + import org.python.pydev.ui.interpreters.ChooseInterpreterManager; /** *************** *** 121,124 **** --- 124,135 ---- IPythonNature nature = edit.getPythonNature(); + + if(nature == null){ + IInterpreterManager manager = ChooseInterpreterManager.chooseInterpreterManager(); + if(manager != null){ + nature = new SystemPythonNature(manager); + } + } + if(nature == null || !nature.startRequests()){ return new ICompletionProposal[0]; |
From: Fabio Z. <fa...@us...> - 2008-05-02 23:24:13
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/ui/interpreters In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20136/src/org/python/pydev/ui/interpreters Added Files: ChooseInterpreterManager.java Log Message: Code-completion for external files. https://sourceforge.net/tracker/index.php?func=detail&aid=1951796&group_id=85796&atid=577332 --- NEW FILE: ChooseInterpreterManager.java --- package org.python.pydev.ui.interpreters; import org.eclipse.jface.dialogs.MessageDialog; import org.python.pydev.core.IInterpreterManager; import org.python.pydev.core.uiutils.RunInUiThread; import org.python.pydev.editor.actions.PyAction; import org.python.pydev.plugin.PydevPlugin; /** * On a number of cases, we may want to do some action that relies on the python nature, but we are uncertain * on which should actually be used (python or jython). * * So, this class helps in giving a choice for the user. * * @author Fabio */ public class ChooseInterpreterManager { public static IInterpreterManager chooseInterpreterManager(){ return chooseInterpreterManager(true); } /** * * @param showWarningIfNotConfigured if true, a warning will be shown to the user * @return an interpreter manager for the only configured manager (either python or jython) or if both are available, * it chooses for python. * * May return null if unable to choose an interpreter. * * TODO: Instead of choosing always python as default if both are available, ask the user (and save that info). */ public static IInterpreterManager chooseInterpreterManager(boolean showWarningIfNotConfigured){ IInterpreterManager pyManager = PydevPlugin.getPythonInterpreterManager(); IInterpreterManager jyManager = PydevPlugin.getJythonInterpreterManager(); IInterpreterManager useManager = null; if(pyManager.isConfigured()){ //default is python, so that's it useManager = pyManager; }else if(jyManager.isConfigured()){ //ok, no python... go for jython useManager = jyManager; } if(useManager == null && showWarningIfNotConfigured){ RunInUiThread.async(new Runnable(){ public void run() { MessageDialog.openError(PyAction.getShell(), "No configured manager", "Neither the python nor the jython\ninterpreter is configured."); }}); } return useManager; } } |
From: Fabio Z. <fa...@us...> - 2008-05-02 19:18:33
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25407 Modified Files: Changes.txt Log Message: Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.378 retrieving revision 1.379 diff -C2 -d -r1.378 -r1.379 *** Changes.txt 2 May 2008 13:42:00 -0000 1.378 --- Changes.txt 2 May 2008 19:18:36 -0000 1.379 *************** *** 13,16 **** --- 13,17 ---- <li>Interactive console: backspace will also delete the selected text</li> <li>Code completion: calltips context info correctly made 'bold'</li> + <li>Code completion: variables starting with '_' do not come in a wild import</li> <li>Debugger: Step over/Step return can now execute with untraced frames (much faster)</li> <li>Debugger: Problem when handling thread that had no context traced and was directly removed.</li> |
From: Fabio Z. <fa...@us...> - 2008-05-02 13:42:01
|
Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29973/src_completions/org/python/pydev/editor/codecompletion/revisited/modules Modified Files: AbstractModule.java Log Message: __path__ not correctly found on some situations Index: AbstractModule.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/modules/AbstractModule.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AbstractModule.java 2 Feb 2008 22:29:30 -0000 1.14 --- AbstractModule.java 2 May 2008 13:42:01 -0000 1.15 *************** *** 107,116 **** ICompletionCache completionCache) throws CompletionRecursionException{ - if("__path__".equals(tok) && this.name != null && this.name.endsWith(".__init__")){ - //__init__.py modules have the __path__ always defined... it doesn't come in a from xxx import *, but - //is there when a from xxx import __path__ is used (or in some other access). - return IModule.FOUND_TOKEN; - } - //it's worth checking it if it is not dotted... (much faster as it's in a map already) if(tok.indexOf(".") == -1){ --- 107,110 ---- |
From: Fabio Z. <fa...@us...> - 2008-05-02 13:41:59
|
Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/visitors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29973/src_completions/org/python/pydev/editor/codecompletion/revisited/visitors Modified Files: GlobalModelVisitor.java Log Message: __path__ not correctly found on some situations Index: GlobalModelVisitor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/visitors/GlobalModelVisitor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GlobalModelVisitor.java 20 Apr 2007 02:16:13 -0000 1.2 --- GlobalModelVisitor.java 2 May 2008 13:42:00 -0000 1.3 *************** *** 32,35 **** --- 32,39 ---- this.visitWhat = visitWhat; this.moduleName = moduleName; + + if(moduleName != null && moduleName.endsWith("__init__")){ + this.tokens.add(new SourceToken(new Name("__path__", Name.Load), "__path__", "", "", moduleName)); + } } |
From: Fabio Z. <fa...@us...> - 2008-05-02 13:41:57
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29973 Modified Files: Changes.txt Log Message: __path__ not correctly found on some situations Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.377 retrieving revision 1.378 diff -C2 -d -r1.377 -r1.378 *** Changes.txt 1 May 2008 18:21:12 -0000 1.377 --- Changes.txt 2 May 2008 13:42:00 -0000 1.378 *************** *** 1,4 **** --- 1,10 ---- after 1.3.15 + Pydev Extensions + <ul> + <li><strong>__path__</strong>: Not correctly found on some situations.</li> + </ul> + + Pydev <li>Bug fix for pydev package explorer when refreshed element parent was null</li> |