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 267304 - Navigate positioning difference in 8.2
Summary: Navigate positioning difference in 8.2
Status: RESOLVED DUPLICATE of bug 270172
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 8.2
Hardware: PC Linux
: P2 normal with 1 vote (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-25 15:53 UTC by mclaborn
Modified: 2017-05-18 11:39 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (916.73 KB, text/plain)
2016-07-25 15:53 UTC, mclaborn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mclaborn 2016-07-25 15:53:23 UTC
Product Version = NetBeans IDE Dev (Build 201607210002)
Operating System = Linux version 4.4.0-31-generic running on amd64
Java; VM; Vendor = 1.8.0_102
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.102-b14

Reproducibility: Happens every time

Various navigation functions that position the Java editor at a particular line seem to be working differently than in 8.1.  In 8.1 both double clicking a method name in the Navigator view or going to a bookmark in the file would position the target line near the middle of the editor window.

In 8.2, the target lines seem to be near the top or the bottom of the window.

The 8.1 behavior is much preferred.
Comment 1 mclaborn 2016-07-25 15:53:26 UTC
Created attachment 161431 [details]
IDE log
Comment 2 mclaborn 2016-08-15 16:08:15 UTC
This is quite annoying.
Still a problem in 201608150002.
Comment 3 AlexFalappa 2016-10-09 17:34:18 UTC
I too have faced the behavior you have described.

If you too have "Collapse by default" turned on for initial comment and import section this could be caused by https://netbeans.org/bugzilla/show_bug.cgi?id=259118 which is marked fixed but I think it's not.
Comment 4 mclaborn 2016-11-12 16:35:48 UTC
This is the most annoying bug in 8.2 for me. I hope it gets some attention soon. 

It happens to me every time I double click a method in the Navigator view.
Comment 5 Milutin Kristofic 2016-11-15 13:58:46 UTC
I am sorry, I cannot reproduce this on Netbeans 8.2, both bookmarks and navigator is showing a line in the middle of window.


Maybe fixed in Bug #268088, Bug #267327, Bug #259023, or Bug #267326
Comment 6 mclaborn 2016-11-16 21:42:38 UTC
I am on

Product Version = NetBeans IDE 8.2 (Build 201609300101)

so I think that all the mentioned fixes are included.

This problem is very repeatable for me in this situation:
1. Right click on project in the Projects view, Find
2. Search for a string that appears in a java file that is not currently open
3. Double click on the line in the search results to navigate to that point in the source file. 
4. The file is initially positioned correctly but then moves to an incorrect position.  I think this happens about the same time that the Navigator view finishes its parsing and shows the method list.
Comment 7 mclaborn 2016-11-29 19:02:47 UTC
I also get this frequently in this situation:
- GUI form editor open
- Right click on a form widget (e.g. jButton) -> Events -> Actions -> Action Performed
- NB switches to the source view. The cursor is positioned at the correct method, but the screen frequently is not.
Comment 8 mclaborn 2016-12-20 20:04:49 UTC
This is still a problem for me in 
Product Version = NetBeans IDE 8.2 (Build 201609300101)

What can I provide to help narrow this down?
Comment 9 AlexFalappa 2017-01-31 09:54:54 UTC
This bug is most likely caused by the fact that code folding is applied to the editor *after* navigation rather than *before*.

Disabling code folding altogether I do not have wrong navigation.
Comment 10 Milutin Kristofic 2017-01-31 15:13:15 UTC
Mila can you look at this. This could be caused by changes in caret.
Comment 11 mclaborn 2017-04-06 17:52:18 UTC
Any ideas on this? This is one of my biggest problems with NB 8.2.
Comment 12 Svata Dedic 2017-05-18 11:39:15 UTC
Generally this is an issue with autofolded sections, such as initial comment or autogenerated code. Will be tracked in issue #270172

*** This bug has been marked as a duplicate of bug 270172 ***