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 76619 - Wrong line displayed when jumping into file
Summary: Wrong line displayed when jumping into file
Status: RESOLVED DUPLICATE of bug 70915
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 5.x
Hardware: Other Windows XP
: P2 blocker with 4 votes (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: RELNOTE
: 76646 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-19 17:35 UTC by tkellerer
Modified: 2008-10-13 12:53 UTC (History)
1 user (show)

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 tkellerer 2006-05-19 17:35:13 UTC
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)
Comment 1 tkellerer 2006-05-20 00:29:19 UTC
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.
Comment 2 tkellerer 2006-05-28 10:38:37 UTC
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>
Comment 3 Jiri Prox 2006-06-05 09:15:31 UTC
*** Issue 76646 has been marked as a duplicate of this issue. ***
Comment 4 Miloslav Metelka 2006-06-05 16:12:13 UTC
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.
Comment 5 Vitezslav Stejskal 2007-01-11 03:15:08 UTC

*** This issue has been marked as a duplicate of 70915 ***
Comment 6 tkellerer 2008-10-11 10:45:52 UTC
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

Comment 7 Vitezslav Stejskal 2008-10-13 11:52:51 UTC
I'm looking into this.
Comment 8 Vitezslav Stejskal 2008-10-13 12:53:10 UTC
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 ***