pydev-cvs Mailing List for PyDev for Eclipse (Page 19)
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-10 00:45:24
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27110 Modified Files: Changes.txt Log Message: <strong>Code-completion</strong>: Working for attributes found in a superclass imported with a relative import bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1961017&group_id=85796&atid=577329 Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.389 retrieving revision 1.390 diff -C2 -d -r1.389 -r1.390 *** Changes.txt 9 May 2008 22:22:13 -0000 1.389 --- Changes.txt 10 May 2008 00:45:30 -0000 1.390 *************** *** 5,8 **** --- 5,9 ---- <li><strong>Debugger</strong>: Disable all works. Patch from: Oldrich Jedlicka</li> <li><strong>Debugger</strong>: Problem when making a step return</li> + <li><strong>Code-completion</strong>: Working for attributes found in a superclass imported with a relative import</li> after 1.3.15 |
From: Fabio Z. <fa...@us...> - 2008-05-10 00:45:24
|
Update of /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27110/tests_completions/org/python/pydev/editor/codecompletion Modified Files: PythonCompletionWithoutBuiltinsTest.java Log Message: <strong>Code-completion</strong>: Working for attributes found in a superclass imported with a relative import bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1961017&group_id=85796&atid=577329 Index: PythonCompletionWithoutBuiltinsTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/PythonCompletionWithoutBuiltinsTest.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** PythonCompletionWithoutBuiltinsTest.java 2 May 2008 13:42:01 -0000 1.19 --- PythonCompletionWithoutBuiltinsTest.java 10 May 2008 00:45:30 -0000 1.20 *************** *** 41,45 **** PythonCompletionWithoutBuiltinsTest test = new PythonCompletionWithoutBuiltinsTest(); test.setUp(); ! // test.testImportMultipleFromImport2(); test.tearDown(); System.out.println("Finished"); --- 41,45 ---- PythonCompletionWithoutBuiltinsTest test = new PythonCompletionWithoutBuiltinsTest(); test.setUp(); ! test.testRelativeImportWithSubclass(); test.tearDown(); System.out.println("Finished"); *************** *** 461,464 **** --- 461,470 ---- } + public void testRelativeImportWithSubclass() throws FileNotFoundException, CoreException, BadLocationException{ + String file = TestDependent.TEST_PYSRC_LOC+"extendable/relative_with_sub/bb.py"; + String strDoc = REF.getFileContents(new File(file)); + requestCompl(new File(file), strDoc, strDoc.length(), -1, new String[]{"yyy()"}); + } + public void testWildImportRecursive() throws BadLocationException, IOException, Exception{ String s; |
From: Fabio Z. <fa...@us...> - 2008-05-10 00:44:57
|
Update of /cvsroot/pydev/org.python.pydev/tests/pysrc/extendable/relative_with_sub In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26842/tests/pysrc/extendable/relative_with_sub Log Message: Directory /cvsroot/pydev/org.python.pydev/tests/pysrc/extendable/relative_with_sub added to the repository |
From: Fabio Z. <fa...@us...> - 2008-05-09 22:22:08
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6916 Modified Files: Changes.txt Log Message: Fixed problem when making a step-return. Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.388 retrieving revision 1.389 diff -C2 -d -r1.388 -r1.389 *** Changes.txt 9 May 2008 22:01:05 -0000 1.388 --- Changes.txt 9 May 2008 22:22:13 -0000 1.389 *************** *** 4,7 **** --- 4,8 ---- <li><strong>Pydev Package Explorer</strong>: projects that had the project folder in the pythonpath did not show children.</li> <li><strong>Debugger</strong>: Disable all works. Patch from: Oldrich Jedlicka</li> + <li><strong>Debugger</strong>: Problem when making a step return</li> after 1.3.15 |
From: Fabio Z. <fa...@us...> - 2008-05-09 22:21:59
|
Update of /cvsroot/pydev/org.python.pydev.debug/pysrc/tests_python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6612/pysrc/tests_python Modified Files: test_debugger.py Added Files: _debugger_case10.py Log Message: Fixed problem when making a step-return. --- NEW FILE: _debugger_case10.py --- def Method1(): print 'm1' print 'm1' def Method1a(): print 'm1a' print 'm1a' def Method2(): print 'm2 before' Method1() Method1a() print 'm2 after' if __name__ == '__main__': Method2() print 'TEST SUCEEDED!' Index: test_debugger.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/pysrc/tests_python/test_debugger.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** test_debugger.py 12 Apr 2008 18:09:10 -0000 1.13 --- test_debugger.py 9 May 2008 22:22:05 -0000 1.14 *************** *** 168,171 **** --- 168,174 ---- def WriteAddBreakpoint(self, line, func): + ''' + @param line: starts at 1 + ''' if func is not None: self.Write("111\t%s\t%s\t%s\t**FUNC**%s\tNone" % (self.NextSeq(), self.TEST_FILE, line, func)) *************** *** 200,203 **** --- 203,240 ---- #======================================================================================================================= + # WriterThreadCase10 + #====================================================================================================================== + class WriterThreadCase10(AbstractWriterThread): + + TEST_FILE = NormFile('_debugger_case10.py') + + def run(self): + self.StartSocket() + self.WriteAddBreakpoint(2, 'Method1') + self.WriteMakeInitialRun() + + threadId, frameId = self.WaitForBreakpointHit('111') + + self.WriteStepReturn(threadId) + + threadId, frameId, line = self.WaitForBreakpointHit('109', True) + + assert line == 11, 'Expected return to be in line 11, was: %s' % line + + self.WriteStepOver(threadId) + + threadId, frameId, line = self.WaitForBreakpointHit('108', True) + + assert line == 12, 'Expected return to be in line 12, was: %s' % line + + self.WriteRunThread(threadId) + + assert 11 == self._sequence, 'Expected 11. Had: %s' % self._sequence + + self.finishedOk = True + + + + #======================================================================================================================= # WriterThreadCase9 #====================================================================================================================== *************** *** 603,606 **** --- 640,646 ---- def testCase9(self): self.CheckCase(WriterThreadCase9) + + def testCase10(self): + self.CheckCase(WriterThreadCase10) *************** *** 632,635 **** --- 672,678 ---- self.CheckCase(WriterThreadCase9, False) + def testCase10a(self): + self.CheckCase(WriterThreadCase10, False) + *************** *** 641,645 **** # suite = unittest.TestSuite() ! # suite.addTest(Test('testCase1')) unittest.TextTestRunner(verbosity=1).run(suite) --- 684,688 ---- # suite = unittest.TestSuite() ! # suite.addTest(Test('testCase10')) unittest.TextTestRunner(verbosity=1).run(suite) |
From: Fabio Z. <fa...@us...> - 2008-05-09 22:21:59
|
Update of /cvsroot/pydev/org.python.pydev.debug/pysrc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6612/pysrc Modified Files: pydevd.py Log Message: Fixed problem when making a step-return. Index: pydevd.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/pysrc/pydevd.py,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** pydevd.py 1 May 2008 18:21:06 -0000 1.94 --- pydevd.py 9 May 2008 22:22:05 -0000 1.95 *************** *** 540,543 **** --- 540,545 ---- #steps back to the same frame (in a return call it will stop in the 'back frame' for the user) info.pydev_step_stop = frame + frame.f_trace = self.trace_dispatch + SetTraceForParents(frame, self.trace_dispatch) else: #No back frame?!? -- this happens in jython when we have some frame created from an awt event |
From: Fabio Z. <fa...@us...> - 2008-05-09 22:01:02
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31140 Modified Files: Changes.txt Log Message: Disable all breakpoints is working. patch from Oldrich Jedlicka: http://sourceforge.net/tracker/index.php?func=detail&aid=1960983&group_id=85796&atid=577329 Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.387 retrieving revision 1.388 diff -C2 -d -r1.387 -r1.388 *** Changes.txt 7 May 2008 13:57:42 -0000 1.387 --- Changes.txt 9 May 2008 22:01:05 -0000 1.388 *************** *** 1,2 **** --- 1,8 ---- + after 1.3.16 + + Pydev + <li><strong>Pydev Package Explorer</strong>: projects that had the project folder in the pythonpath did not show children.</li> + <li><strong>Debugger</strong>: Disable all works. Patch from: Oldrich Jedlicka</li> + after 1.3.15 |
From: Fabio Z. <fa...@us...> - 2008-05-09 22:00:53
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31028/src/org/python/pydev/debug/model Modified Files: AbstractDebugTarget.java Log Message: Disable all breakpoints is working. patch from Oldrich Jedlicka: http://sourceforge.net/tracker/index.php?func=detail&aid=1960983&group_id=85796&atid=577329 Index: AbstractDebugTarget.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/AbstractDebugTarget.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AbstractDebugTarget.java 10 Apr 2008 16:16:00 -0000 1.14 --- AbstractDebugTarget.java 9 May 2008 22:00:58 -0000 1.15 *************** *** 47,58 **** --- 47,87 ---- import org.python.pydev.debug.model.remote.ThreadListCommand; import org.python.pydev.debug.model.remote.VersionCommand; + import org.python.pydev.plugin.PydevPlugin; + /** + * This is the target for the debug ( + * + * @author Fabio + */ public abstract class AbstractDebugTarget extends PlatformObject implements IDebugTarget, ILaunchListener { + /** + * Path pointing to the file that started the debug (e.g.: file with __name__ == '__main__') + */ protected IPath file; + + /** + * The threads found in the debugger. + */ protected PyThread[] threads; + + /** + * Indicates whether we've already disconnected from the debugger. + */ protected boolean disconnected = false; + + /** + * This is the instance used to pass messages to the debugger. + */ protected AbstractRemoteDebugger debugger; + + /** + * Launch that triggered the debug session. + */ protected ILaunch launch; + + /** + * Class used to check for modifications in the values already found. + */ private ValueModificationChecker modificationChecker; *************** *** 154,173 **** //Breakpoints ------------------------------------------------------------------------------------------------------ public boolean supportsBreakpoint(IBreakpoint breakpoint) { return breakpoint instanceof PyBreakpoint; } public void breakpointAdded(IBreakpoint breakpoint) { try { ! if (breakpoint instanceof PyBreakpoint && ((PyBreakpoint)breakpoint).isEnabled()) { PyBreakpoint b = (PyBreakpoint)breakpoint; ! SetBreakpointCommand cmd = new SetBreakpointCommand(debugger, b.getFile(), b.getLine(), b.getCondition(), b.getFunctionName()); ! debugger.postCommand(cmd); } } catch (CoreException e) { ! e.printStackTrace(); } } public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) { if (breakpoint instanceof PyBreakpoint) { --- 183,222 ---- //Breakpoints ------------------------------------------------------------------------------------------------------ + /** + * @return true if the given breakpoint is supported by this target + */ public boolean supportsBreakpoint(IBreakpoint breakpoint) { return breakpoint instanceof PyBreakpoint; } + /** + * @return true if all the breakpoints should be skipped. Patch from bug: + * http://sourceforge.net/tracker/index.php?func=detail&aid=1960983&group_id=85796&atid=577329 + */ + private boolean shouldSkipBreakpoints() { + DebugPlugin manager= DebugPlugin.getDefault(); + return manager != null && !manager.getBreakpointManager().isEnabled(); + } + + /** + * Adds a breakpoint if it's enabled. + */ public void breakpointAdded(IBreakpoint breakpoint) { try { ! if (breakpoint instanceof PyBreakpoint) { PyBreakpoint b = (PyBreakpoint)breakpoint; ! if (b.isEnabled() && !shouldSkipBreakpoints()) { ! SetBreakpointCommand cmd = new SetBreakpointCommand(debugger, b.getFile(), b.getLine(), b.getCondition(), b.getFunctionName()); ! debugger.postCommand(cmd); ! } } } catch (CoreException e) { ! PydevPlugin.log(e); } } + /** + * Removes an existing breakpoint from the debug target. + */ public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) { if (breakpoint instanceof PyBreakpoint) { *************** *** 178,181 **** --- 227,237 ---- } + /** + * Called when a breakpoint is changed. + * E.g.: + * - When line numbers change in the file + * - When the manager decides to enable/disable all existing markers + * - When the breakpoint properties (hit condition) are edited + */ public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) { if (breakpoint instanceof PyBreakpoint) { *************** *** 184,187 **** --- 240,245 ---- } } + + //End Breakpoints -------------------------------------------------------------------------------------------------- *************** *** 447,463 **** for (IMarker marker : markers) { PyBreakpoint brk = (PyBreakpoint) breakpointManager.getBreakpoint(marker); ! ! if (brk.isEnabled()) { ! SetBreakpointCommand cmd = new SetBreakpointCommand(debugger, brk.getFile(), brk.getLine(), brk.getCondition(), brk.getFunctionName()); ! debugger.postCommand(cmd); ! } } for (IMarker marker: condMarkers) { PyBreakpoint brk = (PyBreakpoint) breakpointManager.getBreakpoint(marker); ! if (brk.isEnabled()) { ! SetBreakpointCommand cmd = new SetBreakpointCommand(debugger, brk.getFile(), brk.getLine(), brk.getCondition(), brk.getFunctionName()); ! debugger.postCommand(cmd); ! } } } catch (Throwable t) { --- 505,514 ---- for (IMarker marker : markers) { PyBreakpoint brk = (PyBreakpoint) breakpointManager.getBreakpoint(marker); ! breakpointAdded(brk); } for (IMarker marker: condMarkers) { PyBreakpoint brk = (PyBreakpoint) breakpointManager.getBreakpoint(marker); ! breakpointAdded(brk); } } catch (Throwable t) { |
From: Fabio Z. <fa...@us...> - 2008-05-09 01:10:09
|
Update of /cvsroot/pydev/org.python.pydev/src_navigator/org/python/pydev/navigator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17414/src_navigator/org/python/pydev/navigator Modified Files: PythonModelProvider.java Log Message: When the project root is in the pythonpath, the pydev project explorer is not able to gather its children. bug: https://sourceforge.net/tracker/index.php?func=detail&aid=1960119&group_id=85796&atid=577329 Index: PythonModelProvider.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_navigator/org/python/pydev/navigator/PythonModelProvider.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PythonModelProvider.java 9 May 2008 00:42:32 -0000 1.12 --- PythonModelProvider.java 9 May 2008 01:10:13 -0000 1.13 *************** *** 5,8 **** --- 5,9 ---- package org.python.pydev.navigator; + import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; *************** *** 60,63 **** --- 61,72 ---- System.out.println("getPipelinedChildren"); } + + if(parent instanceof IWrappedResource){ + Object[] children = getChildren(parent); + currentElements.clear(); + currentElements.addAll(Arrays.asList(children)); + return; + } + PipelinedShapeModification modification = new PipelinedShapeModification(parent, currentElements); convertToPythonElementsAddOrRemove(modification, true); |
From: Fabio Z. <fa...@us...> - 2008-05-09 01:10:07
|
Update of /cvsroot/pydev/org.python.pydev/tests_navigator/org/python/pydev/navigator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17414/tests_navigator/org/python/pydev/navigator Modified Files: PythonModelProviderTest.java WorkspaceRootStub.java Log Message: When the project root is in the pythonpath, the pydev project explorer is not able to gather its children. bug: https://sourceforge.net/tracker/index.php?func=detail&aid=1960119&group_id=85796&atid=577329 Index: PythonModelProviderTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests_navigator/org/python/pydev/navigator/PythonModelProviderTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PythonModelProviderTest.java 27 Apr 2008 17:28:05 -0000 1.8 --- PythonModelProviderTest.java 9 May 2008 01:10:13 -0000 1.9 *************** *** 17,20 **** --- 17,21 ---- import org.python.pydev.core.TestDependent; import org.python.pydev.navigator.elements.IWrappedResource; + import org.python.pydev.navigator.elements.PythonProjectSourceFolder; import org.python.pydev.navigator.elements.PythonSourceFolder; import org.python.pydev.plugin.nature.PythonNature; *************** *** 27,31 **** PythonModelProviderTest test = new PythonModelProviderTest(); test.setUp(); ! test.testDontRemoveOtherPluginElements(); test.tearDown(); --- 28,32 ---- PythonModelProviderTest test = new PythonModelProviderTest(); test.setUp(); ! test.testCreateChildrenInWrappedResource(); test.tearDown(); *************** *** 210,215 **** fail("Could not find generated child"); } ! } } --- 211,243 ---- fail("Could not find generated child"); } + } + + + public void testCreateChildrenInWrappedResource() throws Exception { + final HashSet<String> pythonPathSet = new HashSet<String>(); + pythonPathSet.add(TestDependent.TEST_PYSRC_NAVIGATOR_LOC+"projroot"); //root is the source + PythonNature nature = createNature(pythonPathSet); ! WorkspaceRootStub workspaceRootStub = new WorkspaceRootStub(); ! project = new ProjectStub(new File(TestDependent.TEST_PYSRC_NAVIGATOR_LOC+"projroot"), nature); ! workspaceRootStub.addChild(project); ! project.setParent(workspaceRootStub); ! ! ! provider = new PythonModelProvider(); ! ! HashSet<Object> currentChildren = new HashSet<Object>(); ! currentChildren.add(project); ! provider.getPipelinedChildren(workspaceRootStub, currentChildren); ! ! assertEquals(1, currentChildren.size()); ! PythonProjectSourceFolder projectSourceFolder = (PythonProjectSourceFolder) currentChildren.iterator().next(); ! ! currentChildren = new HashSet<Object>(); ! provider.getPipelinedChildren(projectSourceFolder, currentChildren); ! ! assertEquals(1, currentChildren.size()); ! } ! } Index: WorkspaceRootStub.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests_navigator/org/python/pydev/navigator/WorkspaceRootStub.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WorkspaceRootStub.java 8 Sep 2007 16:36:12 -0000 1.1 --- WorkspaceRootStub.java 9 May 2008 01:10:13 -0000 1.2 *************** *** 229,233 **** public IContainer getParent() { ! throw new RuntimeException("Not implemented"); } --- 229,233 ---- public IContainer getParent() { ! return null; } |
From: Fabio Z. <fa...@us...> - 2008-05-09 00:42:27
|
Update of /cvsroot/pydev/org.python.pydev/src_navigator/org/python/pydev/navigator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6699/src_navigator/org/python/pydev/navigator Modified Files: PythonModelProvider.java Log Message: Index: PythonModelProvider.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_navigator/org/python/pydev/navigator/PythonModelProvider.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PythonModelProvider.java 27 Apr 2008 17:28:05 -0000 1.11 --- PythonModelProvider.java 9 May 2008 00:42:32 -0000 1.12 *************** *** 89,98 **** } if (object instanceof IWrappedResource){ ! return getParent(object); ! }else{ ! return aSuggestedParent; } ! } /** --- 89,101 ---- } if (object instanceof IWrappedResource){ ! IWrappedResource resource = (IWrappedResource) object; ! Object parentElement = resource.getParentElement(); ! if(parentElement != null){ ! return parentElement; ! } } ! return aSuggestedParent; } + /** |
From: Fabio Z. <fa...@us...> - 2008-05-09 00:42:27
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6699/src/org/python/pydev/plugin/nature Modified Files: PythonPathNature.java Log Message: Index: PythonPathNature.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature/PythonPathNature.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** PythonPathNature.java 27 Oct 2007 11:07:56 -0000 1.25 --- PythonPathNature.java 9 May 2008 00:42:32 -0000 1.26 *************** *** 148,152 **** //not in workspace?... maybe it was removed, so, do nothing, but let the user know about it PydevPlugin.log("Unable to find the path "+strings[i]+" in the project were it's \n" + ! "added as a source folder for pydev (project: "+project.getName()+")"); } } --- 148,152 ---- //not in workspace?... maybe it was removed, so, do nothing, but let the user know about it PydevPlugin.log("Unable to find the path "+strings[i]+" in the project were it's \n" + ! "added as a source folder for pydev (project: "+project.getName()+") member:"+r); } } |
From: Fabio Z. <fa...@us...> - 2008-05-07 13:58:08
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv624 Modified Files: Changes.txt Log Message: Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.386 retrieving revision 1.387 diff -C2 -d -r1.386 -r1.387 *** Changes.txt 5 May 2008 16:31:17 -0000 1.386 --- Changes.txt 7 May 2008 13:57:42 -0000 1.387 *************** *** 3,7 **** Pydev Extensions <ul> ! <li><strong>__path__</strong>: Not correctly found on some situations.</li> <li><strong>Local rename (ctrl+2+r)</strong>: Positions correctly ordered for tabbing.</li> </ul> --- 3,7 ---- Pydev Extensions <ul> ! <li><strong>Code Analysis</strong>: __path__ Not correctly found on some situations.</li> <li><strong>Local rename (ctrl+2+r)</strong>: Positions correctly ordered for tabbing.</li> </ul> *************** *** 9,31 **** Pydev ! <li>Bug fix for pydev package explorer when refreshed element parent was null</li> ! <li>Interactive console: help() works</li> ! <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> ! <li>Code completion: can be requested for external files (containing system info)</li> ! <li>Code completion: fixed recursion condition</li> ! <li>Code completion: egg file distributed with dll that have a source module with the same name only with a __bootstrap__ now loads the dll instead of the source module (e.g.: numpy egg)</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> ! <li>Launching: F9 will reuse an existing launch instead of creating a new one every time</li> ! <li>Launching: The default launch with Ctrl+F11 will not ask again for the launch associated with a file (for new launches)</li> ! <li>Project Explorer: fixed integration problems with CDT (and others)</li> ! <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> <li>Outline: Assign with multiple targets is recognized</li> after 1.3.14 --- 9,31 ---- Pydev ! <li><strong>Interactive console</strong>: help() works</li> ! <li><strong>Interactive console</strong>: context information showing in completions</li> ! <li><strong>Interactive console</strong>: backspace will also delete the selected text</li> ! <li><strong>Interactive console</strong>: ESC does not close the console when in floating mode anymore</li> ! <li><strong>Code completion</strong>: calltips context info correctly made 'bold'</li> ! <li><strong>Code completion</strong>: variables starting with '_' do not come in import *</li> ! <li><strong>Code completion</strong>: can be requested for external files (containing system info)</li> ! <li><strong>Code completion</strong>: fixed recursion condition</li> ! <li><strong>Code completion</strong>: egg file distributed with dll that has a source module with the same name only with a __bootstrap__ method now loads the dll instead of the source module (e.g.: numpy egg)</li> ! <li><strong>Debugger</strong>: Step over/Step return can now execute with untraced frames (much faster)</li> ! <li><strong>Debugger</strong>: Problem when handling thread that had no context traced and was directly removed.</li> ! <li><strong>Launching</strong>: F9 will reuse an existing launch instead of creating a new one every time</li> ! <li><strong>Launching</strong>: The default launch with Ctrl+F11 will not ask again for the launch associated with a file (for new launches -- old launches should be deleted)</li> ! <li><strong>Project Explorer</strong>: fixed integration problems with CDT (and others)</li> ! <li><strong>Launch</strong>: console encoding passed as environment variable (no longer written to the install location)</li> ! <li>More templates for "surround with" (Ctrl+1)</li> <li>Previous/next method could match 'class' and 'def' on invalid location</li> <li>Outline: Assign with multiple targets is recognized</li> + <li>Bug fix for pydev package explorer when refreshed element parent was null</li> after 1.3.14 |
From: Fabio Z. <fa...@us...> - 2008-05-07 13:58:07
|
Update of /cvsroot/pydev/org.python.pydev.site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv633 Modified Files: site.xml Log Message: Index: site.xml =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.site/site.xml,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** site.xml 9 Apr 2008 17:35:23 -0000 1.71 --- site.xml 7 May 2008 13:57:47 -0000 1.72 *************** *** 10,13 **** --- 10,14 ---- </feature> + <!-- Mylar is outdated and no longer distributed. <feature url="features/org.python.pydev.mylar.feature_0.2.0.jar" id="org.python.pydev.mylar.feature" version="0.2.0"> <category name="Optional"/> *************** *** 17,20 **** --- 18,28 ---- <category name="Optional"/> </feature> + --> + + + <feature url="features/org.python.pydev.feature_1.3.16.jar" id="org.python.pydev.feature" version="1.3.16"> + <category name="Pydev"/> + </feature> + *************** *** 257,261 **** <category-def name="Optional" label="Pydev Optional Extensions"> <description> ! Optional extensions to pydev (requires mylar) </description> </category-def> --- 265,269 ---- <category-def name="Optional" label="Pydev Optional Extensions"> <description> ! Optional extensions to pydev (requires mylyn) </description> </category-def> |
From: Fabio Z. <fa...@us...> - 2008-05-05 16:31:15
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12746 Modified Files: Changes.txt Log Message: Local rename (ctrl+2+r)</strong>: Positions correctly ordered for tabbing. Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.385 retrieving revision 1.386 diff -C2 -d -r1.385 -r1.386 *** Changes.txt 5 May 2008 01:31:22 -0000 1.385 --- Changes.txt 5 May 2008 16:31:17 -0000 1.386 *************** *** 4,7 **** --- 4,8 ---- <ul> <li><strong>__path__</strong>: Not correctly found on some situations.</li> + <li><strong>Local rename (ctrl+2+r)</strong>: Positions correctly ordered for tabbing.</li> </ul> |
From: Fabio Z. <fa...@us...> - 2008-05-05 01:31:21
|
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-serv1588/src_completions/org/python/pydev/editor/codecompletion/revisited/modules Modified Files: SourceModule.java Log Message: Handling __bootstrap__ module (loads compiled module instead of source module). Index: SourceModule.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/modules/SourceModule.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** SourceModule.java 21 Feb 2008 01:34:21 -0000 1.17 --- SourceModule.java 5 May 2008 01:31:22 -0000 1.18 *************** *** 7,10 **** --- 7,11 ---- import java.io.File; + import java.io.FilenameFilter; import java.util.ArrayList; import java.util.Arrays; *************** *** 46,56 **** --- 47,61 ---- import org.python.pydev.parser.jython.ast.Assign; import org.python.pydev.parser.jython.ast.Attribute; + import org.python.pydev.parser.jython.ast.Call; import org.python.pydev.parser.jython.ast.ClassDef; + import org.python.pydev.parser.jython.ast.Expr; import org.python.pydev.parser.jython.ast.FunctionDef; import org.python.pydev.parser.jython.ast.ImportFrom; + import org.python.pydev.parser.jython.ast.Module; import org.python.pydev.parser.jython.ast.Name; import org.python.pydev.parser.jython.ast.Str; import org.python.pydev.parser.visitors.NodeUtils; import org.python.pydev.plugin.PydevPlugin; + import org.python.pydev.ui.filetypes.FileTypesPreferencesPage; /** *************** *** 87,90 **** --- 92,100 ---- /** + * Is bootstrap? + */ + private Boolean bootstrap; + + /** * Path for this module within the zip file (only used if file is actually a file... otherwise it is null). */ *************** *** 988,990 **** --- 998,1079 ---- } + /** + * @return true if this is a bootstrap module (i.e.: a module that's only used to load a compiled module with the + * same name -- that used in eggs) + * + * A bootstrapped module is the way that egg handles pyd files: + * it'll create a file with the same name of the dll (e.g.: + * + * for having a umath.pyd, it'll create a umath.py file with the contents below + * + * File for boostrap + * def __bootstrap__(): + * global __bootstrap__, __loader__, __file__ + * import sys, pkg_resources, imp + * __file__ = pkg_resources.resource_filename(__name__,'umath.pyd') + * del __bootstrap__, __loader__ + * imp.load_dynamic(__name__,__file__) + * __bootstrap__() + * + */ + public boolean isBootstrapModule() { + if(bootstrap == null){ + IToken[] ret = getGlobalTokens(); + if(ret != null && ret.length == 1 && this.file != null){ + IToken tok = ret[0]; + + if("__bootstrap__".equals(tok.getRepresentation())){ + //if we get here, we already know that it defined a __bootstrap__, so, let's see if it was also called + SimpleNode ast = this.getAst(); + if(ast instanceof Module){ + Module module = (Module) ast; + if(module.body != null && module.body.length > 0){ + ast = module.body[module.body.length-1]; + if(ast instanceof Expr){ + Expr expr = (Expr) ast; + ast = expr.value; + if(ast instanceof Call){ + Call call = (Call) ast; + String callRep = NodeUtils.getRepresentationString(call); + if(callRep != null && callRep.equals("__bootstrap__")){ + //ok, and now , the last thing is checking if there's a dll with the same name... + final String modName = FullRepIterable.getLastPart(this.getName()); + + File folder = file.getParentFile(); + File[] validBootsrappedDlls = folder.listFiles(new FilenameFilter(){ + + public boolean accept(File dir, String name) { + int i = name.lastIndexOf('.'); + if(i > 0){ + String namePart = name.substring(0, i); + if(namePart.equals(modName)){ + String extension = name.substring(i+1); + if(extension.length() > 0 && FileTypesPreferencesPage.isValidDllExtension(extension)){ + return true; + } + } + } + return false; + }} + ); + + if(validBootsrappedDlls.length > 0){ + bootstrap = Boolean.TRUE; + } + } + } + } + } + } + } + } + if(bootstrap == null){ + //if still not set, it's not a bootstrap. + bootstrap = Boolean.FALSE; + } + } + + return bootstrap; + } + } \ No newline at end of file |
Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1588/src_completions/org/python/pydev/editor/codecompletion/revisited Modified Files: ProjectModulesManager.java AbstractASTManager.java ModulesManager.java SystemModulesManager.java Log Message: Handling __bootstrap__ module (loads compiled module instead of source module). Index: SystemModulesManager.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/SystemModulesManager.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SystemModulesManager.java 2 Nov 2007 13:26:29 -0000 1.8 --- SystemModulesManager.java 5 May 2008 01:31:22 -0000 1.9 *************** *** 13,20 **** --- 13,22 ---- import org.python.pydev.core.IInterpreterManager; import org.python.pydev.core.IModule; + import org.python.pydev.core.IModulesManager; import org.python.pydev.core.IPythonNature; import org.python.pydev.core.ISystemModulesManager; import org.python.pydev.core.IToken; import org.python.pydev.core.ModulesKey; + import org.python.pydev.core.Tuple; import org.python.pydev.core.cache.LRUCache; import org.python.pydev.editor.codecompletion.revisited.modules.AbstractModule; *************** *** 182,186 **** } ! if(n instanceof EmptyModule || n instanceof SourceModule){ //it is actually found as a source module, so, we have to 'coerce' it to a compiled module n = new CompiledModule(name, IToken.TYPE_BUILTIN, nature.getAstManager()); doAddSingleModule(new ModulesKey(n.getName(), null), n); --- 184,189 ---- } ! if(n instanceof EmptyModule || n instanceof SourceModule){ ! //it is actually found as a source module, so, we have to 'coerce' it to a compiled module n = new CompiledModule(name, IToken.TYPE_BUILTIN, nature.getAstManager()); doAddSingleModule(new ModulesKey(n.getName(), null), n); *************** *** 194,198 **** n = cache.getObj(keyForCacheAccess, this); ! if(n == null || n instanceof EmptyModule || n instanceof SourceModule){ //still not created or not defined as compiled module (as it should be) n = new CompiledModule(name, IToken.TYPE_BUILTIN, nature.getAstManager()); doAddSingleModule(new ModulesKey(n.getName(), null), n); --- 197,202 ---- n = cache.getObj(keyForCacheAccess, this); ! if(n == null || n instanceof EmptyModule || n instanceof SourceModule){ ! //still not created or not defined as compiled module (as it should be) n = new CompiledModule(name, IToken.TYPE_BUILTIN, nature.getAstManager()); doAddSingleModule(new ModulesKey(n.getName(), null), n); *************** *** 249,252 **** --- 253,264 ---- + public Tuple<IModule, IModulesManager> getModuleAndRelatedModulesManager(String name, IPythonNature nature, + boolean checkSystemManager, boolean dontSearchInit) { + IModule module = this.getModule(name, nature, checkSystemManager, dontSearchInit); + if(module != null){ + return new Tuple<IModule, IModulesManager>(module, this); + } + return null; + } Index: ProjectModulesManager.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/ProjectModulesManager.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ProjectModulesManager.java 13 Apr 2008 16:55:23 -0000 1.14 --- ProjectModulesManager.java 5 May 2008 01:31:21 -0000 1.15 *************** *** 35,38 **** --- 35,39 ---- import org.python.pydev.core.ModulesKeyForZip; import org.python.pydev.core.REF; + import org.python.pydev.core.Tuple; import org.python.pydev.editor.codecompletion.revisited.javaintegration.JavaProjectModulesManagerCreator; import org.python.pydev.editor.codecompletion.revisited.javaintegration.ModulesKeyForJava; *************** *** 246,249 **** --- 247,264 ---- */ public IModule getModule(String name, IPythonNature nature, boolean checkSystemManager, boolean dontSearchInit) { + Tuple<IModule, IModulesManager> ret = getModuleAndRelatedModulesManager(name, nature, checkSystemManager, dontSearchInit); + if(ret != null){ + return ret.o1; + } + return null; + } + + + /** + * @return a tuple with the IModule requested and the IModulesManager that contained that module. + */ + public Tuple<IModule, IModulesManager> getModuleAndRelatedModulesManager(String name, IPythonNature nature, + boolean checkSystemManager, boolean dontSearchInit) { + IModule module = null; *************** *** 257,261 **** System.out.println("Trying to get:"+name+" - "+" returned builtin:"+module+" - "+m.getClass()); } ! return module; } } --- 272,276 ---- System.out.println("Trying to get:"+name+" - "+" returned builtin:"+module+" - "+m.getClass()); } ! return new Tuple<IModule, IModulesManager>(module, m); } } *************** *** 279,283 **** System.out.println("Trying to get:"+name+" - "+" returned:"+module+" - "+m.getClass()); } ! return module; } } --- 294,298 ---- System.out.println("Trying to get:"+name+" - "+" returned:"+module+" - "+m.getClass()); } ! return new Tuple<IModule, IModulesManager>(module, m); } } *************** *** 288,291 **** --- 303,309 ---- } + /** + * Only searches the modules contained in the direct modules manager. + */ public IModule getModuleInDirectManager(String name, IPythonNature nature, boolean dontSearchInit) { return super.getModule(name, nature, dontSearchInit); Index: ModulesManager.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/ModulesManager.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ModulesManager.java 11 Nov 2007 08:47:49 -0000 1.21 --- ModulesManager.java 5 May 2008 01:31:21 -0000 1.22 *************** *** 516,521 **** --- 516,531 ---- throw new RuntimeException("Should not be an empty module anymore!"); } + if(n instanceof SourceModule){ + SourceModule sourceModule = (SourceModule) n; + //now, here's a catch... it may be a bootstrap module... + if(sourceModule.isBootstrapModule()){ + //if it's a bootstrap module, we must replace it for the related compiled module. + n = new CompiledModule(name, IToken.TYPE_BUILTIN, nature.getAstManager()); + } + } return n; } + + private ModulesKey createModulesKey(String name, File f) { Index: AbstractASTManager.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/AbstractASTManager.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AbstractASTManager.java 2 May 2008 13:42:00 -0000 1.14 --- AbstractASTManager.java 5 May 2008 01:31:21 -0000 1.15 *************** *** 689,692 **** --- 689,696 ---- */ protected IToken[] searchOnSameLevelMods(Set<IToken> initial, ICompletionState state) throws CompletionRecursionException { + IToken[] ret = null; + Tuple<IModule, IModulesManager> modUsed = null; + String actTokUsed = null; + for (IToken token : initial) { //ok, maybe it was from the set that is in the same level as this one (this will only happen if we are on an __init__ module) *************** *** 695,699 **** if(state.getActivationToken().startsWith(rep)){ String absoluteImport = token.getAsAbsoluteImport(); ! IModule sameLevelMod = getModule(absoluteImport, state.getNature(), true); if(sameLevelMod == null){ return null; --- 699,709 ---- if(state.getActivationToken().startsWith(rep)){ String absoluteImport = token.getAsAbsoluteImport(); ! modUsed = modulesManager.getModuleAndRelatedModulesManager(absoluteImport, state.getNature(), true, false); ! ! IModule sameLevelMod = null; ! if(modUsed != null){ ! sameLevelMod = modUsed.o1; ! } ! if(sameLevelMod == null){ return null; *************** *** 702,719 **** String qualifier = state.getActivationToken().substring(rep.length()); - ICompletionState copy = state.getCopy(); - copy.setBuiltinsGotten (true); //we don't want builtins... ! if(state.getActivationToken().equals(rep)){ ! copy.setActivationToken (""); ! return getCompletionsForModule(sameLevelMod, copy); ! } else if(qualifier.startsWith(".")){ ! copy.setActivationToken (qualifier.substring(1)); ! return getCompletionsForModule(sameLevelMod, copy); } } } ! return null; } --- 712,732 ---- String qualifier = state.getActivationToken().substring(rep.length()); ! if(state.getActivationToken().equals(rep)){ ! actTokUsed = ""; } else if(qualifier.startsWith(".")){ ! actTokUsed = qualifier.substring(1); } + + if(actTokUsed != null){ + ICompletionState copy = state.getCopyWithActTok(actTokUsed); + copy.setBuiltinsGotten (true); //we don't want builtins... + ret = getCompletionsForModule(sameLevelMod, copy); + break; + } } } ! ! return ret; } *************** *** 721,725 **** * @see ICodeCompletionASTManager#getGlobalCompletions */ ! public List<IToken> getGlobalCompletions(IToken[] globalTokens, IToken[] importedModules, IToken[] wildImportedModules, ICompletionState state, IModule current) { if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ Log.toLogFile(this, "getGlobalCompletions"); --- 734,739 ---- * @see ICodeCompletionASTManager#getGlobalCompletions */ ! public List<IToken> getGlobalCompletions(IToken[] globalTokens, IToken[] importedModules, IToken[] wildImportedModules, ! ICompletionState state, IModule current) { if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ Log.toLogFile(this, "getGlobalCompletions"); *************** *** 990,994 **** * @throws CompletionRecursionException */ ! public Tuple3<IModule, String, IToken> findOnImportedMods( IToken[] importedModules, ICompletionState state, String currentModuleName) throws CompletionRecursionException { FullRepIterable iterable = new FullRepIterable(state.getActivationToken(), true); for(String tok : iterable){ --- 1004,1010 ---- * @throws CompletionRecursionException */ ! public Tuple3<IModule, String, IToken> findOnImportedMods( IToken[] importedModules, ICompletionState state, ! String currentModuleName) throws CompletionRecursionException { ! FullRepIterable iterable = new FullRepIterable(state.getActivationToken(), true); for(String tok : iterable){ |
From: Fabio Z. <fa...@us...> - 2008-05-05 01:31:16
|
Update of /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1588/tests_completions/org/python/pydev/editor/codecompletion Modified Files: PythonCompletionWithBuiltinsTest.java Log Message: Handling __bootstrap__ module (loads compiled module instead of source module). Index: PythonCompletionWithBuiltinsTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/PythonCompletionWithBuiltinsTest.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PythonCompletionWithBuiltinsTest.java 4 May 2008 16:49:31 -0000 1.13 --- PythonCompletionWithBuiltinsTest.java 5 May 2008 01:31:22 -0000 1.14 *************** *** 28,32 **** PythonCompletionWithBuiltinsTest builtins = new PythonCompletionWithBuiltinsTest(); builtins.setUp(); ! builtins.testNumpy(); builtins.tearDown(); --- 28,32 ---- PythonCompletionWithBuiltinsTest builtins = new PythonCompletionWithBuiltinsTest(); builtins.setUp(); ! builtins.testPreferCompiledOnBootstrap2(); builtins.tearDown(); *************** *** 240,243 **** --- 240,256 ---- } + public void testPreferCompiledOnBootstrap() throws BadLocationException, IOException, Exception{ + String s = ""+ + "from extendable.bootstrap_dll import umath\n"+ + "umath."; + requestCompl(s, s.length(), -1, new String[]{"less"}); + } + + public void testPreferCompiledOnBootstrap2() throws BadLocationException, IOException, Exception{ + String s = ""+ + "from extendable.bootstrap_dll.umath import "; + requestCompl(s, s.length(), -1, new String[]{"less"}); + } + public void testWxPython1() throws BadLocationException, IOException, Exception{ if(TestDependent.HAS_WXPYTHON_INSTALLED){ //we can only test what we have |
From: Fabio Z. <fa...@us...> - 2008-05-05 01:31:16
|
Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/javaintegration In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1588/src_completions/org/python/pydev/editor/codecompletion/revisited/javaintegration Modified Files: JavaProjectModulesManager.java Log Message: Handling __bootstrap__ module (loads compiled module instead of source module). Index: JavaProjectModulesManager.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/revisited/javaintegration/JavaProjectModulesManager.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JavaProjectModulesManager.java 14 Jan 2008 15:00:25 -0000 1.9 --- JavaProjectModulesManager.java 5 May 2008 01:31:22 -0000 1.10 *************** *** 29,32 **** --- 29,33 ---- import org.python.pydev.core.ISystemModulesManager; import org.python.pydev.core.ModulesKey; + import org.python.pydev.core.Tuple; /** *************** *** 246,249 **** --- 247,259 ---- return null; } + + public Tuple<IModule, IModulesManager> getModuleAndRelatedModulesManager(String name, IPythonNature nature, + boolean checkSystemManager, boolean dontSearchInit) { + IModule module = this.getModule(name, nature, checkSystemManager, dontSearchInit); + if(module != null){ + return new Tuple<IModule, IModulesManager>(module, this); + } + return null; + } |
From: Fabio Z. <fa...@us...> - 2008-05-05 01:31:16
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/ui/filetypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1588/src/org/python/pydev/ui/filetypes Modified Files: FileTypesPreferencesPage.java Log Message: Handling __bootstrap__ module (loads compiled module instead of source module). Index: FileTypesPreferencesPage.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/ui/filetypes/FileTypesPreferencesPage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileTypesPreferencesPage.java 22 Oct 2007 00:28:51 -0000 1.1 --- FileTypesPreferencesPage.java 5 May 2008 01:31:22 -0000 1.2 *************** *** 167,171 **** */ public static boolean isValidDll(String path) { ! if (path.endsWith(".pyd") || path.endsWith(".so") || path.endsWith(".dll")) { return true; } --- 167,181 ---- */ public static boolean isValidDll(String path) { ! if (path.endsWith(".pyd") || path.endsWith(".so") || path.endsWith(".dll") || path.endsWith(".a")) { ! return true; ! } ! return false; ! } ! /** ! * @param extension extension we want to analyze ! * @return if the extension passed belongs to a valid python compiled extension ! */ ! public static boolean isValidDllExtension(String extension) { ! if (extension.equals("pyd") || extension.equals("so") || extension.equals("dll") || extension.equals("a")) { return true; } |
From: Fabio Z. <fa...@us...> - 2008-05-05 01:31:16
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1588 Modified Files: Changes.txt Log Message: Handling __bootstrap__ module (loads compiled module instead of source module). Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.384 retrieving revision 1.385 diff -C2 -d -r1.384 -r1.385 *** Changes.txt 4 May 2008 16:48:46 -0000 1.384 --- Changes.txt 5 May 2008 01:31:22 -0000 1.385 *************** *** 17,20 **** --- 17,21 ---- <li>Code completion: can be requested for external files (containing system info)</li> <li>Code completion: fixed recursion condition</li> + <li>Code completion: egg file distributed with dll that have a source module with the same name only with a __bootstrap__ now loads the dll instead of the source module (e.g.: numpy egg)</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-05 01:31:16
|
Update of /cvsroot/pydev/org.python.pydev/tests/pysrc/extendable/bootstrap_dll In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1588/tests/pysrc/extendable/bootstrap_dll Added Files: umath.pyd __init__.py umath.py Log Message: Handling __bootstrap__ module (loads compiled module instead of source module). --- NEW FILE: __init__.py --- --- NEW FILE: umath.py --- def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__,'umath.pyd') del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__() --- NEW FILE: umath.pyd --- (This appears to be a binary file; contents omitted.) |
From: Fabio Z. <fa...@us...> - 2008-05-05 01:30:58
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1364/src/org/python/pydev/core Modified Files: IModulesManager.java Log Message: Handling __bootstrap__ module (loads compiled module instead of source module). Index: IModulesManager.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/IModulesManager.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** IModulesManager.java 24 Mar 2008 01:53:35 -0000 1.15 --- IModulesManager.java 5 May 2008 01:31:03 -0000 1.16 *************** *** 141,143 **** --- 141,151 ---- public abstract IModule addModule(ModulesKey key); + /** + * @return a tuple with the IModule requested and the IModulesManager that contained that module. + * May return null if not found. + */ + public Tuple<IModule, IModulesManager> getModuleAndRelatedModulesManager(String name, IPythonNature nature, + boolean checkSystemManager, boolean dontSearchInit); + + } |
From: Fabio Z. <fa...@us...> - 2008-05-05 01:30:52
|
Update of /cvsroot/pydev/org.python.pydev/tests/pysrc/extendable/bootstrap_dll In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1217/tests/pysrc/extendable/bootstrap_dll Log Message: Directory /cvsroot/pydev/org.python.pydev/tests/pysrc/extendable/bootstrap_dll added to the repository |
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 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29846/tests_completions/org/python/pydev/editor/codecompletion Modified Files: PythonCompletionWithBuiltinsTest.java Log Message: Fixed recursion while completing in numpy situation where compiled file needed a later reference to a source. Index: PythonCompletionWithBuiltinsTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/PythonCompletionWithBuiltinsTest.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PythonCompletionWithBuiltinsTest.java 2 May 2008 13:42:01 -0000 1.12 --- PythonCompletionWithBuiltinsTest.java 4 May 2008 16:49:31 -0000 1.13 *************** *** 28,32 **** PythonCompletionWithBuiltinsTest builtins = new PythonCompletionWithBuiltinsTest(); builtins.setUp(); ! builtins.testInstanceCompletion(); builtins.tearDown(); --- 28,32 ---- PythonCompletionWithBuiltinsTest builtins = new PythonCompletionWithBuiltinsTest(); builtins.setUp(); ! builtins.testNumpy(); builtins.tearDown(); *************** *** 51,55 **** CompiledModule.COMPILED_MODULES_ENABLED = true; this.restorePythonPath(TestDependent.GetCompletePythonLib(true)+"|"+ ! TestDependent.PYTHON_WXPYTHON_PACKAGES+"|"+TestDependent.PYTHON_MX_PACKAGES, false); codeCompletion = new PyCodeCompletion(); --- 51,57 ---- CompiledModule.COMPILED_MODULES_ENABLED = true; this.restorePythonPath(TestDependent.GetCompletePythonLib(true)+"|"+ ! TestDependent.PYTHON_WXPYTHON_PACKAGES+"|"+ ! TestDependent.PYTHON_MX_PACKAGES+"|"+ ! TestDependent.PYTHON_NUMPY_PACKAGES, false); codeCompletion = new PyCodeCompletion(); *************** *** 158,161 **** --- 160,174 ---- } + + public void testNumpy() throws BadLocationException, IOException, Exception{ + if(TestDependent.HAS_NUMPY_INSTALLED){ + String s = ""+ + "from numpy import less\n"+ + "less."; + requestCompl(new File(TestDependent.TEST_PYSRC_LOC+"extendable/not_existent.py"), + s, s.length(), -1, new String[]{"types", "ntypes", "nout", "nargs", "nin"}); + } + } + public void testDeepNested6() throws CoreException, BadLocationException{ String s; |