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 75144 - "Reformat code" breaks BP annotations
Summary: "Reformat code" breaks BP annotations
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 6.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords: UI
: 56991 78582 88395 90414 99808 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-18 09:36 UTC by Max Sauer
Modified: 2010-11-02 13:43 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (13.96 KB, image/png)
2006-04-18 09:39 UTC, Max Sauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2006-04-18 09:36:37 UTC
Using "Reformat code" during debug session of a jsp breaks breakpoint annotation
-- sometimes the emphasizes lines are shifted, sometimes they do no appear
anymore. See attached screenshot. This does not happen when debugging a j2se
project or a servlet. I have tried both SJSAS and bundeled Tomcat and it does
not make any difference.

Steps to reproduce:
-------------------
1) Create a WebApplication project
2) Inside created index.jsp file, uncomment the c:if statement
3) Place two breakpoints: One on the header, one on the c:if
4) Press F5 to debug the project
5) Hit "Continue"
6) Invoke "reformat code" from editor's pop-up menu
--> BP annotation is broken

-----------
NetBeans IDE Dev (Build 200604171800)
1.6.0-beta2; Java HotSpot(TM) Client VM 1.6.0-beta2-b76
SunOS version 5.10 running on sparc
en (nb); ISO646-US
Comment 1 Max Sauer 2006-04-18 09:39:02 UTC
Created attachment 29889 [details]
screenshot
Comment 2 Max Sauer 2006-04-18 09:44:43 UTC
This issue is valid also inside NB Enterprise Pack (TPR) b200604171800.
Comment 3 Libor Kotouc 2006-09-01 13:04:49 UTC
Simpler sequence for Java files:
1. create J2SE project
2. add BP to the line 26 (//TODO...)
3. place cursor to the beginning of the line 26 and paste some text (it must be
a line, i.e. terminated by the end line character) from the clipboard

The pasted text replaces the line 26, the line 26 is moved down to the line 27,
the 'text' part of the annotation is left above the line 26 and the BP mark on
the margin is moved down.

Reassigning to the 
Comment 4 Libor Kotouc 2006-09-01 13:05:40 UTC
debuggerjpda.
Comment 5 Martin Entlicher 2006-09-07 15:06:32 UTC
Since this is a UI problem, it's IMHO a problem in the annotation painting. Both
gutter mark and the highlight should be in sync all the time.
Moving to Editor for evaluation.
Comment 6 Vitezslav Stejskal 2006-12-18 22:32:40 UTC
The steps from lkotouc are still reproducible in the main trunk. I haven't tried
the web project steps. The annotation seems to be at the line where the gutter
icon is painted (e.g. look in the debugers breakpoint window to see the line
number of the breakpoint).
Comment 7 Vitezslav Stejskal 2006-12-18 22:51:32 UTC
*** Issue 78582 has been marked as a duplicate of this issue. ***
Comment 8 Vitezslav Stejskal 2006-12-18 23:47:26 UTC
*** Issue 90414 has been marked as a duplicate of this issue. ***
Comment 9 Vitezslav Stejskal 2006-12-20 03:53:46 UTC
*** Issue 88395 has been marked as a duplicate of this issue. ***
Comment 10 Vitezslav Stejskal 2007-06-25 17:19:32 UTC
*** Issue 99808 has been marked as a duplicate of this issue. ***
Comment 11 Vitezslav Stejskal 2007-09-24 12:22:20 UTC
*** Issue 56991 has been marked as a duplicate of this issue. ***
Comment 12 Jiri Prox 2008-04-11 00:43:35 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 13 Sergey Petrov 2009-04-10 10:33:53 UTC
What is bp annotation and how I can find text part of the annotation? tried  lkotouc steps and see no problems, may be
because don't see "bp annotation".
Initial steps recomment to uncomment "c:if" but in 6.7 I don't anything like "c:if" in index.jsp, can steps be
corrected, is it valid issue?
Comment 14 Martin Entlicher 2009-04-10 11:11:20 UTC
"bp annotation" is "breakpoint annotation".
Please see the attached screenshot to see what "c:if" is.
Considering the number of duplicates I do not think this can be marked as incomplete. See e.g.
http://www.netbeans.org/nonav/issues/showattachment.cgi/21138/Screenshot.png

If this was already fixed and works correctly now, mark this as fixed and someone from QE should verify...
Comment 15 Jan Lahoda 2010-11-02 13:43:22 UTC
Annotations highlights has been rewritten (by vstejskal) for 6.8 or 6.9. I tried to reproduce in a trunk build by pressing enter at the very beginning of the line with breakpoint, and the highlight was moved correct alongside with the breakpoint icon, so presumably fixed.