Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 7012

Summary: AddBreakpointAction not correctly updated when breakpoint added by other action
Product: [Eclipse Project] JDT Reporter: Darin Swanson <Darin_Swanson>
Component: DebugAssignee: Jared Burns <jared_burns>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: darin.eclipse
Version: 2.0   
Target Milestone: 2.0 M3   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on: 7010, 7235    
Bug Blocks:    

Description Darin Swanson CLA 2001-12-17 13:33:10 EST
If the selection does not changed in the editor, the action is not updated when 
a breakpoint is added by another action.

Test Case
Select some code in the editor
Use the context menu Add Breakpoint to create a breakpoint
Remove the breakpoint by double clicking in the ruler.
Without changing the selection in the ruler, realize the context menu.

The action is disabled.

Logged bug 7010.  If this truly is a bug, this action could be added and 
removed as a breakpoint listener to correctly update.

Current workaround is for the action always to be enabled and just fail when 
trying to create the duplicate breakpoint.
Comment 1 Darin Wright CLA 2002-01-21 12:04:42 EST
Could not reproduce, however, I can add multiple breakpoint with the context 
Java editor's context menu "add -> breakpoint".
Comment 2 Darin Swanson CLA 2002-01-21 12:11:27 EST
This bug reflects that the current code does not update the state of the action.
Even when a breakpoint exists at that line number, the action is enabled.

You have discovered another (and I believe new) bug where you are allowed to 
created the multiple breakpoints.
Comment 3 Darin Swanson CLA 2002-01-21 12:39:24 EST
Logged bug 7947.
I believe this bug is still outstanding.
Comment 4 Darin Swanson CLA 2002-01-21 12:42:00 EST
Still waiting on bug 7010 or bug 7235.  
Likely should change the milestone as cannot be resolved until the dependancies 
are resolved.
Comment 5 Darin Swanson CLA 2002-01-21 12:43:13 EST
Can we change milestones to later dates?
Comment 6 Darin Wright CLA 2002-01-21 12:51:33 EST
Changed to M3. Dependent bugs have no milstone dates, so may not be able to fix.
Comment 7 Darin Swanson CLA 2002-02-05 14:49:45 EST
Fixed in AddBreakpointAction.  Added support to listen to the editors lifecycle.
Comment 8 Darin Swanson CLA 2002-02-05 14:50:04 EST
Please verify.
Comment 9 Jared Burns CLA 2002-02-11 11:19:27 EST
Verified.