Bug 23171 - Method entry breakpoints on abstract methods
Summary: Method entry breakpoints on abstract methods
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC other
: P3 enhancement (vote)
Target Milestone: 2.1   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-04 14:01 EDT by Darin Swanson CLA
Modified: 2015-10-07 03:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2002-09-04 14:01:55 EDT
Currently you can set method entry breakpoints on abstract methods (in 
interfaces or otherwise).

The breakpoints are installed but never appear to be hit in the manner I would 
expect: the concrete implementation is entered, the breakpoint is hit.

What is the intended behavior here?
Comment 1 Darin Wright CLA 2002-09-04 14:29:41 EDT
There was no intended behavior - the action can either be disabled for 
interfaces, or we have to spec/implement the behavior. For now, disabling the 
action is easiest (I think), and then defer the feature request for later.
Comment 2 Darin Wright CLA 2002-09-04 15:01:48 EDT
Disable the method breakpoint action for interfaces. The behavior is currently 
unspecified. We would need to track type hierarchies as they change, and keep a 
1:N mapping of underlying breakpoints in concrete types.
Comment 3 Darin Swanson CLA 2002-09-04 16:14:25 EDT
The action is no longer visible for abstract methods.
Changes to MethodActionFilter.
Comment 4 Darin Swanson CLA 2002-09-04 16:14:40 EDT
Please verify Darin.
Comment 5 Darin Wright CLA 2002-09-05 10:05:46 EDT
The action is still enabled for in the "Run" menu.
Comment 6 Darin Swanson CLA 2002-09-05 10:48:58 EDT
I have improved this but the action will sometimes be enabled but will beep 
when attempted.
If the current selection is from the outliner, the Run menu action will be 
disabled.  If the current selection is from the editor, the Run menu action 
will be enabled but will beep and not create a breakpoint.  The reason for the 
differences: from the outliner we have the method to deal with.  From the 
editor we may need to do a reconcile to correctly resolve the java element (not 
yet in this case but soon see bug 1552).  The reconcile is expensive and is 
only performed when the user has explicitly asked to run the action.

Should I create an error dialog for the failure case?
Comment 7 Darin Swanson CLA 2002-09-05 10:51:46 EDT
Note that this is not a regression...the same behavior has existed for the Add 
Watchpoint action for some time.
Comment 8 Darin Wright CLA 2002-09-05 10:58:25 EDT
An error dialog woulld be good - i.e. explaining that a method breakpoint 
cannot be placed on an abstract method.
Comment 9 Darin Swanson CLA 2002-09-05 11:57:45 EDT
Error dialogs have been added for both watchpoints and method entry breakpoints.
Comment 10 Darin Swanson CLA 2002-09-05 11:58:19 EDT
Please verify.
Comment 11 Darin Wright CLA 2002-09-09 15:25:50 EDT
Verified.