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 64518 - Breakpoints are sorted in wrong order
Summary: Breakpoints are sorted in wrong order
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on: 65137
Blocks:
  Show dependency tree
 
Reported: 2005-09-16 12:33 UTC by _ lcincura
Modified: 2005-10-31 12:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ lcincura 2005-09-16 12:33:56 UTC
NetBeans IDE 5.0 [200509131800] on jdk 1.5.0_05

When breakpoints are on lines 90, 200 and 1000, the breakpoints are sorted in
breakpoints view in order 1000, 200, 90 (based on first characten, not actual
line number).
This is hoghly visible bug, even if it does not make any harm, it looks
unprofessional.
Comment 1 Roman Ondruska 2005-09-20 15:14:44 UTC
Currently, lexicographical order is used. Will be discussed ;-)
Comment 2 Martin Entlicher 2005-09-27 14:16:50 UTC
I'll try to use the similar approach to issue #55226.
Issue #65137 would help us to solve this more cleanly.
Comment 3 Martin Entlicher 2005-09-27 16:45:21 UTC
The correct numerical sorting is there now:

/cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/BreakpointsTreeModel.java,v
 <--  BreakpointsTreeModel.java
new revision: 1.7; previous revision: 1.6

/cvs/debuggerjpda/api/src/org/netbeans/api/debugger/jpda/LineBreakpoint.java,v 
<--  LineBreakpoint.java
new revision: 1.11; previous revision: 1.10

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/BreakpointsNodeModel.java,v
 <--  BreakpointsNodeModel.java
new revision: 1.10; previous revision: 1.9

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/BreakpointsTreeModelFilter.java,v
 <--  BreakpointsTreeModelFilter.java
new revision: 1.9; previous revision: 1.8
Comment 4 Martin Entlicher 2005-09-29 11:30:46 UTC
This fix has caused an unintentional API change:

ALL API changes made in org.netbeans.api since the build 200509262200.

Added Superclasses or Superinterfaces
-------------------------------------

org.netbeans.api.debugger.jpda.LineBreakpoint:              interface
java.lang.Comparable

Added Methods
-------------

org.netbeans.api.debugger.jpda.LineBreakpoint:              method public int
org.netbeans.api.debugger.jpda.LineBreakpoint.compareTo(java.lang.Object)

STATUS:Failed.2 errors

---

The unintentional API change was removed. Just the class is made not final
(it can not be subclassed anyway due to the private constructor).
Comparable interface is implemented in it's subclass only:

/cvs/debuggerjpda/api/src/org/netbeans/api/debugger/jpda/LineBreakpoint.java,v 
<--  LineBreakpoint.java
new revision: 1.12; previous revision: 1.11
Comment 5 _ lcincura 2005-10-31 12:27:51 UTC
Verified in build 200510301900