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 221784 - Collapse by default->Methods - get lost when navigating to function from one file to another one, unopened
Summary: Collapse by default->Methods - get lost when navigating to function from one ...
Status: RESOLVED DUPLICATE of bug 219580
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 7.2
Hardware: PC All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2012-11-09 07:43 UTC by mariusz_m
Modified: 2013-03-15 10:36 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screencap of NB7.2 showing the issue (2.53 MB, video/avi)
2012-12-05 11:07 UTC, mariusz_m
Details
program settings (3.06 MB, application/x-zip)
2012-12-05 11:25 UTC, mariusz_m
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mariusz_m 2012-11-09 07:43:03 UTC
I have enabled folding Methods.
If I click some function in the code, editor navigate to definition  of this function in another (not yet opened) file. Editor is scrolled to this function, and then all methods are collapsed moving the view to beginning of the file - I must navigate once again or search my function in Navigator.
Comment 1 Alexander Simon 2012-11-27 13:22:22 UTC
Not reproducible in 7.3
Comment 2 mariusz_m 2012-11-27 19:13:54 UTC
Please, describe how it works on Your version (C++, not Java or PHP).
It is nothing new. This issue stops me from using automatic folding as long as I am NB user.
For me, after function/structure is found and shown in the newly opened editor tab, it should stay visible, just like when automatic folding is disabled. Am I right?
Comment 3 Alexander Simon 2012-11-27 19:57:45 UTC
(In reply to comment #2)
> Please, describe how it works on Your version (C++, not Java or PHP).
> It is nothing new. This issue stops me from using automatic folding as long as
> I am NB user.
> For me, after function/structure is found and shown in the newly opened editor
> tab, it should stay visible, just like when automatic folding is disabled. Am I
> right?

Steps:
- NB - development version
- create Freeway simulator C/C++ sample
- set collapsing methods
- open main.cc file
- expand main function
- go to on traffic_init by hyper link
IDE:
- opens trafic.cc
- navigate to beginning of traffic_init function
- collapse all functions in the trafic.cc file
- traffic_init function is visible and collapsed.
- cursor at the beginning of traffic_init function
Comment 4 mariusz_m 2012-11-27 20:17:33 UTC
Thanks
I will compare 7.2, 7.3B and DevBuild tomorrow
Comment 5 mariusz_m 2012-11-28 07:10:45 UTC
7.3b2, 7.3 devbuild - lottery. 
The cursor position is always correct, just before the 'void'. 
The function in 1 of 4 cases (more or less) is correctly visible at the beginning of the editor, but in remaining cases, after functions collapse, editor view is centered at the last line of the code (this differs from 7.2 where editor was on top of the file)
Comment 6 Alexander Simon 2012-11-28 08:26:51 UTC
Editor does not make visible cursor after collapsing functions (randomly).
Reassign to evaluation.
Comment 7 Svata Dedic 2012-11-30 10:23:33 UTC
I don't have C++ handy :) but please - how many collapsible levels do you have above the traffic_init function.
Comment 8 mariusz_m 2012-11-30 14:26:55 UTC
Over 20 function above traffic_init() is collapsed.
Note that only Methods are enabled to collapse, so all the comments are not collapsed.
As before, NB started, firs navigation is correct. When tab was closed and function navigated again, editor is scrolled to the end
Comment 9 Svata Dedic 2012-11-30 14:33:35 UTC
What about nesting above traffic_init() ? I am trying to generate similar environment. Or attach a source, if not confidential :)
Comment 10 mariusz_m 2012-11-30 14:48:37 UTC
It is NB C++ sample project, look at the comment 3
Comment 11 Svata Dedic 2012-12-05 08:48:58 UTC
Cannot reproduce in 7.3dev, on C++ Freeway sample according to steps in comment #3, which are not the steps of the original reporter. 
Please describe exact steps how to reproduce with some reasonable probability. In comment #8, you added step of closing reopening the tab with traffic_init, which was not present before. So please take time to write down actions which you're doing as precisely as possible. Please attach your IDE configuration ($userdir/config). Specify your screen resolution (possibly small editor window height ?)
Comment 12 mariusz_m 2012-12-05 11:07:10 UTC
Created attachment 128880 [details]
screencap of NB7.2 showing the issue
Comment 13 mariusz_m 2012-12-05 11:25:07 UTC
Created attachment 128884 [details]
program settings

The video was made from NB7.2, but it doesn't matter - I tested this issue with NB7.3beta2 and, later, with dev build - no difference
Comment 14 Svata Dedic 2012-12-10 14:11:10 UTC
Still no luck; I resized the NB window to match the video, used the same set of options. Apparently the defect is time-dependent (some threading coincidence). I did fixes that exactly address the issue with caret position disappearing after fold state change(s), but since you insist that 7.3beta2 behaves the same, some hole might still remain.
Comment 15 Alexander Pepin 2012-12-21 13:45:33 UTC
A lot of Solaris Studio customers complain about that bug.
Comment 16 Svata Dedic 2013-03-15 10:36:16 UTC

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