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.
NetBeans IDE Dev (Build 070327) 1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b99 Windows XP version 5.1 running on x86 en_US (nb); Cp1252 + fresh build of ruby1 cluster --------------------------------------------- have code some code, put somewhere breakpoint, and invoke C-S-f. Breakpoint is moved to first line (just in editor, not in breakpoints window).
Not sure if this is bug in debugger or reformatting. Seems to me that during reformatting all source-code is removed and then readded again. If so, should behave atomically?
Right now the formatting replaces the entire document with a reformatted version. It could be improved in two ways: (1) Only replace the middle section of the document that has been replaced. This means comparing from the beginning and the end of the document the old content versus the new content, and only replacing that part. This is easy, and will work for not only reindenting a document but fully reformatting (pretty printing) it. However, it will not correctly handle breakpoints in the changed section. (2) When we are only reindenting (not actually reformatting) a document, rather than replace the whole document, go and adjust every single line with inserts and deletes to adjust the whitespace. Since this is done at line granularity, I suspect annotation positions will be preserved. This is a bit more work (because the formatter currently just builds up a new document buffer in a StringBuilder and does a single replace; it would now have to compute effective offsets in the document as it's mutating it). I might start with (1) (because it's easy) and leave the issue open until I address (2).
This should be fixed now; I've implemented approach #2 which seems to work well
Yup, breakpoints keep theirs positions. Thanks. v/c
Reassigning this issue to newly created 'ruby' component.
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.