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 127758 - Glyph gutter Breakopints menu has multiple Enable/Customize
Summary: Glyph gutter Breakopints menu has multiple Enable/Customize
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: API, API_REVIEW_FAST
Depends on: 128479
Blocks: 130873 131135 131136
  Show dependency tree
 
Reported: 2008-02-19 16:06 UTC by _ gordonp
Modified: 2008-04-09 15:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The API change for the review. (8.63 KB, text/plain)
2008-03-20 20:26 UTC, Martin Entlicher
Details
All changes associated with this. Moving the Enable and Customize actions into spi.debugger.ui module. (78.57 KB, text/plain)
2008-03-20 20:30 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2008-02-19 16:06:51 UTC
I think a better API is required here. I implemented Enable and Customize in the glyph gutter's
Breakpoints menu and now have 3 Enabled/Customized labels (one for JPDA, one for Ruby, and one
for GDB).

I've rename gdb's to "GDB Breakpoint Enabled" and "Customise GDB Breakpoint" but from a UI
point-of-view there is no reason why 3 sets should be displayed. Only 1 debugger is going to
manage the breakpoint!
Comment 1 Martin Entlicher 2008-02-19 17:04:32 UTC
Right, we need to assure somehow that the Enable and Customize actions are added only to the appropriate breakpoints.
Comment 2 Martin Entlicher 2008-02-22 16:59:10 UTC
The bad thing is, that the actions folder 'BreakpointActions' is defined in spi.debugger.ui module, but the actions
themselves come from debugger.jpda.ui module.

As a workaround you may create your own xml for breakpoint definitions and your own actions folder.
But a better solution would be to create some simple APIs which would allow us to move the Enabled and Customize actions
into spi.debugger.ui module and thus have them automatically for all other debuggers that use breakpoint types from
spi.debugger.ui.
Comment 3 Martin Entlicher 2008-02-26 18:20:59 UTC
For the APIs we need to have the access to the current Annotation object from the action. See issue #128479.
Comment 4 Martin Entlicher 2008-03-20 20:22:46 UTC
We also need to have a class that represent the Annotation from which we can retrieve the Breakpoint.
This is necessary for Enable and Customize actions, which can be moved to spi.debugger.ui module so that they can work
for all kinds of breakpoints.

I'm going to attach a patch with a new BreakpointAnnotation class...
Comment 5 Martin Entlicher 2008-03-20 20:26:30 UTC
Created attachment 58790 [details]
The API change for the review.
Comment 6 Martin Entlicher 2008-03-20 20:28:42 UTC
Please review this simple API change - addition of BreakpointAnnotation class.
Comment 7 Martin Entlicher 2008-03-20 20:30:49 UTC
Created attachment 58791 [details]
All changes associated with this. Moving the Enable and Customize actions into spi.debugger.ui module.
Comment 8 Martin Entlicher 2008-03-25 17:36:48 UTC
I'll commit this API change - BreakpointAnnotation class - tomorrow evening CET so that QE has enough time to test this
change.
Comment 9 Martin Entlicher 2008-03-26 16:43:28 UTC
The API change is in:
http://hg.netbeans.org/main/rev/1618fceca432

The shared actions and their JPDA implementation are there as well:
http://hg.netbeans.org/main/rev/bc64b96ca6e1

Please verify that Enable/Customize actions work fine.
Comment 10 Martin Entlicher 2008-03-27 11:25:43 UTC
Also, we assure that Customize action is disabled when there is no customizer available:
http://hg.netbeans.org/main/rev/c681fe890ced
Comment 11 pribyl 2008-04-09 15:42:43 UTC
Verified

I tested on
NB 6.1 RC1 (Build 200804082140)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

Enable/Customize of a breakpoint from the gutter works fine.