Bug 52385 - Toggle Breakpoint adds duplicate breakpoint in inner class
Summary: Toggle Breakpoint adds duplicate breakpoint in inner class
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-18 12:12 EST by Nick Edgar CLA
Modified: 2004-03-08 15:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2004-02-18 12:12:11 EST
3.0 M7 build

- UI in source, rest imported as binary
- set breakpoint in Workbench.startPlugins on line:
  for (int i = 0; i < extensions.length; i++) {
- debug target eclipse
- breakpoint is hit
- show Breakpoints view
- Run > Toggle Breakpoint (or Ctrl+Shift+B)
- the breakpoint is not removed, and the Breakpoints view indicates that a 
duplicate one has been created
Comment 1 Nick Edgar CLA 2004-02-18 12:13:56 EST
Nothing of interest in either log.
Comment 2 Luc Bourlier CLA 2004-02-25 23:40:04 EST
Fixed.
Was a side effect of bug 22610.
When a breakpoint set in an anonymous or local class is installed in a java
debug target, getTypeName return the compiled name of the class (with the extra
$...). Checking if there is a breakpoint at the position was failing because the
names doesn't match.
Modified JDIDebugModel#lineBreakpointExists(..) to handle this case.
Comment 3 Luc Bourlier CLA 2004-02-25 23:40:26 EST
Please verify, Darin W.
Comment 4 Darin Wright CLA 2004-03-01 10:16:12 EST
Fixed compare ordering bug.
Comment 5 Darin Wright CLA 2004-03-01 10:16:46 EST
Name compare was in wrong oder. Please verify change to JDIDebugModel, Luc.
Comment 6 Darin Wright CLA 2004-03-01 10:17:49 EST
(fixed)
Comment 7 Luc Bourlier CLA 2004-03-04 02:44:06 EST
Errr ... no, my compare order was right, the breakpoint type name can be more
precise (because having more information when installed) than the name of the
type we want to compare to (which should be only a 'well-know' type name, not
from a local or an anonymous type).

My fix solved only the problem when the breakpoint is in a binary type, in
source type, there was still some problem.
I think that JDT became more precise on the elements they return from
ICompilationUnit#getElementAt() and IClassFile#getElementAt(), and we are now
getting local types when using this methods (I think that before, they were
returning only return the non-local types in which the local type were define).
The problem for us is the fact that they return names for this local type that
are not garanty to the right one (see bug 53555).
Comment 8 Luc Bourlier CLA 2004-03-04 02:46:13 EST
Fixed the problem with source types.
When getting the type where to set the breakpoint, it now check that it's not
local type in a source type.
Comment 9 Luc Bourlier CLA 2004-03-04 02:46:30 EST
Please verify, Darin W.
Comment 10 Darin Wright CLA 2004-03-08 15:55:38 EST
Verified