Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32517/src/org/python/pydev/debug/model
Modified Files:
PyDebugTarget.java
Log Message:
seza's patch for this bug:
Pydev debugger cannot start if file is in the folder link. Eclipse doc says
that getFilesForLocation() returns null if file is in linked folder.
Index: PyDebugTarget.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/PyDebugTarget.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PyDebugTarget.java 24 Sep 2004 00:39:05 -0000 1.9
--- PyDebugTarget.java 11 Oct 2004 16:34:50 -0000 1.10
***************
*** 79,97 ****
// now, register all the breakpoints in our project
! IFile launched = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(file);
! IProject project = launched.getProject();
! try {
! IMarker[] markers = project.findMarkers(PyBreakpoint.PY_BREAK_MARKER, true, IResource.DEPTH_INFINITE);
! IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
! for (int i= 0; i < markers.length; i++) {
! PyBreakpoint brk = (PyBreakpoint)breakpointManager.getBreakpoint(markers[i]);
! if (brk.isEnabled()) {
! SetBreakpointCommand cmd = new SetBreakpointCommand(debugger, brk.getFile(), brk.getLine());
! debugger.postCommand(cmd);
}
! }
! } catch (Throwable t) {
! PydevDebugPlugin.errorDialog("Error setting breakpoints", t);
}
// Send the run command, and we are off
RunCommand run = new RunCommand(debugger);
--- 79,108 ----
// now, register all the breakpoints in our project
! IFile launched[];
! IFile temp = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(file);
! if(temp != null) {
! launched = new IFile[1];
! launched[0] = temp;
! }
! else {
! launched = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(file);
! }
! for(int ii = 0; ii != launched.length; ++ii) {
! IProject project = launched[ii].getProject();
! try {
! IMarker[] markers = project.findMarkers(PyBreakpoint.PY_BREAK_MARKER, true, IResource.DEPTH_INFINITE);
! IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
! for (int i= 0; i < markers.length; i++) {
! PyBreakpoint brk = (PyBreakpoint)breakpointManager.getBreakpoint(markers[i]);
! if (brk.isEnabled()) {
! SetBreakpointCommand cmd = new SetBreakpointCommand(debugger, brk.getFile(), brk.getLine());
! debugger.postCommand(cmd);
! }
}
! } catch (Throwable t) {
! PydevDebugPlugin.errorDialog("Error setting breakpoints", t);
! }
}
+
// Send the run command, and we are off
RunCommand run = new RunCommand(debugger);
|