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.
Product Version: NetBeans IDE Dev (Build 200803051205) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb) 1. Create a bookmark in the text (for example in the java source code). 2. Select more lines of the text so that the bookmarked line is somewhere in the selection (no matter where, it is better if it is in the middle). 3. Use a keyboard shortcut to move the text on line up/down (it is Alt+Shift+Up/Down in NB6.0). The bookmark "jumps out" of the selection - which is wrong itself - and it cannot be placed back by just an inverse action ("alt+shift+up > alt+shift+down" does not place the bookmark back to the original position). As a bookmark should be associated with the line itself, not with the line number, it should be moved all along with the same line.
Although not surprising - moving lines up/down in fact removes them from the document and puts them back at the different location - the behavior is obviously wrong. I don't think this one is really serious, P4. If you disagree push the prio up again, please.
Well... I don't know... I think we can leave P4, but I also think the fix should be simple (I know you know better). I have never used bookmarks while programming. But if someone places a bookmark in the middle of the class, then he/she attempts to move the class using the shortcut (for example he/she wants to move encapsulated class above some property in the class), the bookmarks just jump away of the class - this might be really confusing if someone is used to the bookmarks...
One more think - suppose that you extend the example from the description 1: 1. Create several bookmarks in the code (i.e. 10-20) 2. Select the code so that it contains all the bookmarks 3. Move the code by one line using Alt+Shift+Up/Down All of the bookmarks are placed out of the moved code and to the same line. So there is 10 bookmarks on a single line. Well, it does not cause any raised exceptions (or can it?), but one might ask a question "Why cannot I remove this bookmark?" or "Why the "jump to the previous/next bookmark" action does not work?" or "Why almost all of my bookmarks have disappeared?". The answer to these questions is always the same: "As the bookmarks were moved wrongly and there is more bookmarks at a single line." I still can agree with the priority (P4), but I also think it would be nice (and also not so hard), if this issue was fixed in the NB6.1 Final.
You are right in some situations several bookmarks may end up at the same line. See for example issue #5342 or issue #60390.
Hmmm, I see. There's a really a "problem" with the bookmarks... Well, I think that the first step might be removing bookmarks from the bookmark container so that there could be only one bookmark on the line. It could be used in combination with a bookmark history (if a bookmark is removed in some point because of another bookmark on the same line, the undo can re-add it in the right moment). Well, it is actually also a good question - should the event "Toogle bookmark" be stored in the "undo" history, or would it be confusing? As I say: I have never used bookmarks myself... An opinion of someone who uses it would be probably helpful.
Resolving all issues with milestone "future" as LATER. If you feel strongly that it should be implemented please reopen and set the target milestone to "next".
NetBeans.org Migration: changing resolution from LATER to WONTFIX
Reopening with low priority. The issue is still there, but it can wait I guess.
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