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

Bug 208105

Summary: [breakpoints] enum breakpoints behave strangely
Product: [Eclipse Project] JDT Reporter: Michael Rennie <Michael_Rennie>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, Michael_Rennie, pawel.1.piech
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Michael Rennie CLA 2007-10-30 15:32:00 EDT
I20071030-0010

setting breakpoints on enums have different behavior depending on the arrangement of the code.

for example if we have 

  eum E1 {FOO, TEST, BAR};

1. the caret is near E1, we get a class load breakpoint (expected)
2. the caret is near one of the entries, say TEST, we get a watchpoint (not expected)

if we change the arrangement to:

  enum E1 {FOO, 
     TEST, 
     BAR
  };

1. the caret is near E1 we get a class load breakpoint (expected)
2. the caret is near FOO we get a watchpoint (unexpected)
3. the caret is near TEST or BAR, we get a line breakpoint on the next valid line location (expected)

Also note, if you happen to get a watchpoint (as described above) and then try to remove it via double clicking in the ruler, you get a class load breakpoint for the enum (unexpected).

A quick look at the location visitor shows that when in-line (typed code-wise) the visitor processes the location as a field (FOO for example), never touching the enum visit methods. But if you have the caret as described in example 2 on TEST or BAR, the enum visit methods are called and you get no watchpoint (as expected)
Comment 1 Michael Rennie CLA 2007-10-31 10:40:01 EDT
investigate for 3.4M4, not a regression
Comment 2 Eclipse Genie CLA 2020-04-04 01:24:45 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.