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.
When using features like "Goto source" or stepping through the debugger, clicking on a compiler error and the target file is not yet open in the editor, the display is not correct. The current line is set correctly e.g. to the beginning of the method, but the editor window does not show this line. When clicking on the "current line" indicator the editor will jump to the correct line. This seems to be caused when certain parts of the code are auto-collapsed by default (Tools -> Options -> Editor -> Code folding -> Collapse by default)
To be precise: This is directly related to the "Collapse initial comment" setting (if that is not selected, the editor scrolls to the correct line) "Collapse imports" does not seem to have an impact.
It happens as well when there are customized folding areas in the file that default to collapsed, e.g: // <editor-fold defaultstate="collapsed" desc=" Variables "> // </editor-fold>
*** Issue 76646 has been marked as a duplicate of this issue. ***
We need to revise the algorithm in BaseCaret.foldHierarchyChanged() and the related stuff. Also there is problem of wrong scroll after cutting of a large portion of the text. This should be tested as well after finding the possible fix.
*** This issue has been marked as a duplicate of 70915 ***
This is happening again in the current 6.5 dev builds. Especially if the source code as customized source folds in it or if the source file was not already open in the editor
I'm looking into this.
I can reproduce it in a dev build. It's got something to do with automatically collapsing the initial comment. Therefore I'm again marking this as a duplicate of #70915 and reopening #70915. *** This issue has been marked as a duplicate of 70915 ***