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 254504 - Folded code blocks expands automatically
Summary: Folded code blocks expands automatically
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: PC Windows 10 x64
: P2 normal with 1 vote (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-19 11:12 UTC by rafi
Modified: 2015-09-10 06:01 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
List of installed plugins (48.23 KB, image/png)
2015-08-25 04:32 UTC, rafi
Details
The Log File (43.74 KB, text/plain)
2015-09-08 07:38 UTC, rafi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rafi 2015-08-19 11:12:03 UTC
Many times when I fold a block of code it just expands automatically, I fold it and expands automatically again and this happens again and again and again. This is a big problem while I'm writing code. Please fix this bug.
Comment 1 Jiri Kovalsky 2015-08-19 14:18:24 UTC
Can you please provide some useful information about your environment? Go to "Help > About", select the IDE data, copy and paste here.

Did you install some 3rd-party plugin from the NetBeans Update Center? Is this Java SE distro, Java EE distro etc.? Can you reproduce this problem if you run NetBeans with an empty userdir (netbeans.exe --userdir C:\empty_userdir)?
Comment 2 rafi 2015-08-20 03:55:29 UTC
Here is IDE data.

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15
System: Windows 8 version 6.2 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\rafi_\AppData\Roaming\NetBeans\8.0.2
Cache directory: C:\Users\rafi_\AppData\Local\NetBeans\Cache\8.0.2
Comment 3 rafi 2015-08-20 03:58:02 UTC
(In reply to Jiri Kovalsky from comment #1)
> Can you please provide some useful information about your environment? Go to
> "Help > About", select the IDE data, copy and paste here.
> 
> Did you install some 3rd-party plugin from the NetBeans Update Center? Is
> this Java SE distro, Java EE distro etc.? Can you reproduce this problem if
> you run NetBeans with an empty userdir (netbeans.exe --userdir
> C:\empty_userdir)?

Here is IDE data--

Here is IDE data.

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15
System: Windows 8 version 6.2 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\rafi_\AppData\Roaming\NetBeans\8.0.2
Cache directory: C:\Users\rafi_\AppData\Local\NetBeans\Cache\8.0.2

I am using Netbeans for PHP. I have several third party plugins installed, like Auto save module, Zen coding, CSS preprocessors, GIT etc...
Comment 4 Jiri Prox 2015-08-24 13:18:48 UTC
Can you please describe what do you do in editor, before the fold expands?

Now the fold should expand only when the cursor should jump inside the collapsed block (e.g. going to bookmark, go to line, stop at breakpoint etc...).

Have you tried to start NB without additional modules as Jirka asked?
You can try it when you use fresh userdir by specifying the --userdir option. To return back to your current settings just omit the command line switch.


http://wiki.netbeans.org/FaqAlternateUserdir
Comment 5 Svata Dedic 2015-08-24 13:25:05 UTC
In general, folds in PHP work acceptably, so you must be hitting some specific situation - e.g. start writing right after a folded method or something similar. Please describe the reproduction steps as detailed as possible. If possible provide a sample source file to work with.

Not a P1 bug -- no data loss occurs, automatic code folding can be folded off on per-language basis, and you don't need to use manual folds.
Comment 6 rafi 2015-08-25 04:24:11 UTC
(In reply to Jiri Prox from comment #4)
> Can you please describe what do you do in editor, before the fold expands?
> 
> Now the fold should expand only when the cursor should jump inside the
> collapsed block (e.g. going to bookmark, go to line, stop at breakpoint
> etc...).
> 
> Have you tried to start NB without additional modules as Jirka asked?
> You can try it when you use fresh userdir by specifying the --userdir
> option. To return back to your current settings just omit the command line
> switch.
> 
> 
> http://wiki.netbeans.org/FaqAlternateUserdir

I just do nothing, I can't do anything, I fold my code block and i scroll down or up and the code block expands automatically. I will try the --userdir and let you know.

(Thanks for your comment)
Comment 7 rafi 2015-08-25 04:28:21 UTC
(In reply to Svata Dedic from comment #5)
> In general, folds in PHP work acceptably, so you must be hitting some
> specific situation - e.g. start writing right after a folded method or
> something similar. Please describe the reproduction steps as detailed as
> possible. If possible provide a sample source file to work with.
> 
> Not a P1 bug -- no data loss occurs, automatic code folding can be folded
> off on per-language basis, and you don't need to use manual folds.

I've tried to find my specific situation, and i myself have tried many things but couldn't find if any other situation is making this auto expanding.

Sometimes folding block works for a long time and sometimes not. Meaning, sometimes auto expand doesn't happen immediately, it takes long time (10 min may be).
Comment 8 rafi 2015-08-25 04:32:14 UTC
Created attachment 155599 [details]
List of installed plugins
Comment 9 Svata Dedic 2015-08-25 07:15:12 UTC
What kind of folded block gets expanded ? function, if-else, ... ? Consistently one type of construction, [various] block statements within a function, or entire functions ? Just one or a few folds, or all collapsed folds (or all within a certain region, i.e. a within a single function - the one being edited) ?

Please confirm that folds expand just when scrolling/viewing the code, without any modification to the source.
Comment 10 Svata Dedic 2015-08-28 07:14:38 UTC
Discussed offline: XML issue.
Comment 11 rafi 2015-08-28 07:34:25 UTC
(In reply to Svata Dedic from comment #9)
> What kind of folded block gets expanded ? function, if-else, ... ?
> Consistently one type of construction, [various] block statements within a
> function, or entire functions ? Just one or a few folds, or all collapsed
> folds (or all within a certain region, i.e. a within a single function - the
> one being edited) ?
> 
> Please confirm that folds expand just when scrolling/viewing the code,
> without any modification to the source.

All kind of folded block gets auto expanded. It even expands if i just do nothing not even scrolling and not even any modification, just nothing...
Comment 12 Svata Dedic 2015-08-28 07:47:23 UTC
Disregard my last comment, reassinging back :) sorry for confusion, I've messed two bug numbers.
Comment 13 Svata Dedic 2015-08-28 07:48:03 UTC
(In reply to rafi from comment #11)

> All kind of folded block gets auto expanded. It even expands if i just do
> nothing not even scrolling and not even any modification, just nothing...

Did you experience similar folding defect with other files, like (X)html, CSS, JS ?
Comment 14 rafi 2015-08-28 07:49:50 UTC
(In reply to Svata Dedic from comment #13)
> (In reply to rafi from comment #11)
> 
> > All kind of folded block gets auto expanded. It even expands if i just do
> > nothing not even scrolling and not even any modification, just nothing...
> 
> Did you experience similar folding defect with other files, like (X)html,
> CSS, JS ?


Good question. Answer is no, it happens only in php files.
Comment 15 Svata Dedic 2015-08-28 08:20:49 UTC
Tomasi - any idea how the reported defect may be caused ?
Comment 16 Tomas Mysik 2015-08-28 08:25:04 UTC
(In reply to Svata Dedic from comment #15)
> Tomasi - any idea how the reported defect may be caused ?

Ondra knows the editor area, adding him to CC, maybe he will have an idea. Thanks.
(BTW this issue has never happened to me personally.)
Comment 17 Svata Dedic 2015-09-04 08:54:22 UTC
Moving to PHP for further investigation
Comment 18 Tomas Mysik 2015-09-07 09:59:32 UTC
I cannot reproduce this issue and since we have no other report similar to this one, it has to be something related to your setup. So:

- could you please try a clean userdir [1]?
- does it happen for all your PHP files (pure PHP, PHP + HTML) in all your PHP projects?
- reproduce your problem and attach here your IDE log file [2] (BTW it is always a good idea to attach your IDE log file, to any reported issue).
- perhaps you could also try a development version of NetBeans [3] to verify that this issue is still there.

Simply reopen this issue and provide answers/files we asked for. Thanks for your cooperation.
[1] http://wiki.netbeans.org/FaqWhatIsUserdir
[2] http://wiki.netbeans.org/FaqLogMessagesFile
[3] http://bits.netbeans.org/download/trunk/nightly/latest/

Product Version: NetBeans IDE Dev (Build 20150904-e2feafa1bb8a)
Java: 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11
Runtime: Java(TM) SE Runtime Environment 1.7.0_80-b15
System: Linux version 3.19.0-26-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 19 rafi 2015-09-08 07:38:44 UTC
Created attachment 155954 [details]
The Log File

1. It happens for files which have PHP and HTML both.
2. I've attached my log file.

Thanks for your close inspection bro.
Comment 20 Tomas Mysik 2015-09-08 09:11:40 UTC
I cannot see anything suspicious in your IDE log.

(In reply to Tomas Mysik from comment #18)
> - could you please try a clean userdir [1]?
> - does it happen for all your PHP files (pure PHP, PHP + HTML) in all your
> PHP projects?
> - perhaps you could also try a development version of NetBeans [3] to verify
> that this issue is still there.
> 
> Simply reopen this issue and provide answers/files we asked for. Thanks for
> your cooperation.
> [1] http://wiki.netbeans.org/FaqWhatIsUserdir
> [3] http://bits.netbeans.org/download/trunk/nightly/latest/

Could you please try/answer also the other things?

Thanks.
Comment 21 rafi 2015-09-10 05:50:03 UTC
This was mistakenly closed by some other member.
Comment 22 Tomas Mysik 2015-09-10 06:01:34 UTC
(In reply to rafi from comment #21)
> This was mistakenly closed by some other member.

No, it wasn't. You did not respond to our questions, see comment #20. Without that, we are hardly able to help you, sorry. Of course, the best would be if you could provide a sample file and/or project so we can investigate it.

Thanks.