This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 56860 - [41cat] Breakpoints arent updated during editing
Summary: [41cat] Breakpoints arent updated during editing
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 4.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: USABILITY
Depends on:
Blocks:
 
Reported: 2005-03-23 13:19 UTC by filipsky
Modified: 2010-04-29 09:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description filipsky 2005-03-23 13:19:14 UTC
When I edit code with breakpoint, there is some strange behavior:

1) when I delete the line  with the breakpoint, the breakpoint should be
   deleted as well. But it remains there, on the line number, which it was tied
   with. If I delete more lines (selection), the breakpoint is on the first line
   of the selected block.

2) when I delete the line just before the breakpoint and then undo this
   operation, the bvreakpoint is now not on the line it was before, but on the
   previous one.

3) same situation is with pasting: when I paste some code (more lines) with
   cursor on the line with breakpoint, it „moves“ (it remains on the line with
   original number, but its right line was moved down)

4) Pressing enter at the beginning of the line with breakpoint moves the code,
   but not the breakpoint.

5) Breakpoints window isnt updated during these operations and the line numbers
   it shows arent correct
Comment 1 Martin Entlicher 2005-05-13 14:58:15 UTC
This should be repaired into 4.2.
Comment 2 Martin Entlicher 2007-08-17 17:42:10 UTC
This is a defect actually, not an enhancement... ;-)
Comment 3 Martin Entlicher 2007-08-17 17:50:27 UTC
This concerns line breakpoints only.
The line number information needs to be updated after every change.
Just the JDI breakpoint need to keep the original line number and the shifted lines must be translated during stepping.
This translation needs to be reset after application of code changes.
Comment 4 Martin Entlicher 2007-08-17 18:49:51 UTC
After issue #63595 was fixed, this becomes more visible.
Starting to work on this...
Comment 5 Martin Entlicher 2007-08-18 14:08:49 UTC
The updating of line breakpoints is completely rewritten.
It should work as expected now.
I did not implement (1) though - delete the breakpoint when line is deleted. The breakpoint is moved to the preceding
line instead, it can be easily removed if really needed.

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v  <-- 
JPDADebuggerImpl.java
new revision: 1.128; previous revision: 1.127

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/breakpoints/LineBreakpointImpl.java,v 
<--  LineBreakpointImpl.java
new revision: 1.41; previous revision: 1.40

/shared/data/ccvs/repository/debuggerjpda/projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointAnnotationProvider.java,v
 <--  BreakpointAnnotationProvider.java
new revision: 1.3; previous revision: 1.2

/shared/data/ccvs/repository/debuggerjpda/projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextImpl.java,v
 <--  EditorContextImpl.java
new revision: 1.32; previous revision: 1.31

RCS file:
/shared/data/ccvs/repository/debuggerjpda/projects/src/org/netbeans/modules/debugger/jpda/projects/LineTranslations.java,v

/shared/data/ccvs/repository/debuggerjpda/projects/src/org/netbeans/modules/debugger/jpda/projects/LineTranslations.java,v
 <--  LineTranslations.java
initial revision: 1.1

/shared/data/ccvs/repository/debuggerjpda/ui/src/META-INF/debugger/org.netbeans.api.debugger.LazyDebuggerManagerListener,v
 <--  org.netbeans.api.debugger.LazyDebuggerManagerListener
new revision: 1.7; previous revision: 1.6

Removing ui/src/META-INF/debugger/org.netbeans.modules.debugger.jpda.ui.breakpoints.BreakpointAnnotationListener;
/shared/data/ccvs/repository/debuggerjpda/ui/src/META-INF/debugger/org.netbeans.modules.debugger.jpda.ui.breakpoints.BreakpointAnnotationListener,v
 <--  org.netbeans.modules.debugger.jpda.ui.breakpoints.BreakpointAnnotationListener
new revision: delete; previous revision: 1.1

/shared/data/ccvs/repository/debuggerjpda/ui/src/META-INF/debugger/netbeans-JPDASession/Java/org.netbeans.api.debugger.LazyActionsManagerListener,v
 <--  org.netbeans.api.debugger.LazyActionsManagerListener
new revision: 1.4; previous revision: 1.3

/shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/ToggleBreakpointActionProvider.java,v
 <--  ToggleBreakpointActionProvider.java
new revision: 1.16; previous revision: 1.15

/shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/ToggleMethodFieldBreakpointAction.java,v
 <--  ToggleMethodFieldBreakpointAction.java
new revision: 1.7; previous revision: 1.6

Removing ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/BreakpointAnnotationListener.java;
/shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/BreakpointAnnotationListener.java,v
 <--  BreakpointAnnotationListener.java
new revision: delete; previous revision: 1.12

Removing ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/BreakpointsUpdater.java;
/shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/BreakpointsUpdater.java,v
 <--  BreakpointsUpdater.java
new revision: delete; previous revision: 1.4
Comment 6 Quality Engineering 2010-04-29 09:21:47 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.