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 196836 - Annotations in the glyph gutter don't maintain their order after newline
Summary: Annotations in the glyph gutter don't maintain their order after newline
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P4 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-18 09:02 UTC by emi
Modified: 2016-07-07 07:28 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 emi 2011-03-18 09:02:40 UTC
Steps to reproduce:

1. Have an @Override line in a Java source file where get the 'Implements method from...' annotation
2. Add a bookmark on that line -- which becomes the new active annotation
3. Go at the beginning of the line and press Enter
4. Note how the annotations follow you on the next line, but the order has changed now: the 'Implements' annotation becomes the active one.

PS: This also has a side-bug that Undo does the same thing: it moves the annotations back but without respecting the original order.

I haven't looked very much in the code but it seems to me the annotations are entirely independent upon how to react on newline (I assume an AnnotationListener just deletes/re-adds an annotation) so there is no 'synchronization' when multiple annotations jump all to a new line to respect ordering.

If this is so, it seems quite hard to fix this issue.

Of course, I would say the priority is low on this bug, but I am curious about the technical solution.
Comment 1 Jan Lahoda 2011-04-14 10:02:35 UTC
The implements annotation is most likely removed and re-added anyway, making any attempt to keep order (different than priority order) extremely hard.
Comment 2 Martin Balin 2016-07-07 07:28:27 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss