Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 228188 - Code folding occasionally stops working
Code folding occasionally stops working
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure)
PC Linux
: P2 (vote)
: 7.3.1
Assigned To: Svata Dedic
Depends on:
  Show dependency treegraph
Reported: 2013-04-03 07:17 UTC by Vladimir Riha
Modified: 2013-05-09 14:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

IDE log (33.21 KB, text/x-log)
2013-04-03 07:17 UTC, Vladimir Riha
screenshot (144.98 KB, image/png)
2013-04-03 07:18 UTC, Vladimir Riha
IDE log with more logging (37.99 KB, text/x-log)
2013-04-04 11:19 UTC, Vladimir Riha

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-04-03 07:17:42 UTC
Created attachment 133272 [details]
IDE log

Please try following (I did to reproduce it several times):

- start IDE with fresh user dir
- create new PHP project
- declare simple function (see screenshot) - not necessary
- restart IDE (step 4)

=> code folding in this file is not working. If I create another PHP file, it has code folding, but the first one still doesn't. It seems to happen only with PHP Web page, at least I didn't reproduce it using PHP file

Interesting is, if you create another project after step 4 and restart IDE, the same issue happens all over again. Also please notice that there are the "folding line indicators" but not folding marks as such (and Ctrl+- is not working)

Highly visible, only workaround is restarting IDE and I think it worked in 7.3 => imo P2

Product Version: NetBeans IDE Dev (Build web-main-10228-on-20130403)
Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b32
System: Linux version 3.2.0-39-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2013-04-03 07:18:05 UTC
Created attachment 133273 [details]
Comment 2 Ondrej Brejla 2013-04-03 08:34:21 UTC
Reproducible (randomly), but FoldingScanner.folds() is not called by CSL infrastructure. Reassigning. Svato, can you evaluate? Thanks in advance.
Comment 3 Vladimir Riha 2013-04-04 11:19:30 UTC
Created attachment 133301 [details]
IDE log with more logging

Here is IDE log with the better logging. Once I saw no code folding, these 2 lines were the last one in log (the rest was appended during IDE shutdown - including the unrelated exception)

FINER [org.netbeans.modules.csl.editor.fold.GsfFoldManager]: GSF fold task called for: org.netbeans.modules.parsing.api.Source@ac6f04[mimeType=text/x-php5, fileObject=/var/www/PhpProject16/index.php@ba0bd6f3:cfb8b3, document=null
FINE [org.netbeans.modules.csl.editor.fold.GsfFoldManager]: No live FoldManagers found for org.netbeans.modules.parsing.api.Source@ac6f04[mimeType=text/x-php5, fileObject=/var/www/PhpProject16/index.php@ba0bd6f3:cfb8b3, document=null
Comment 4 Svata Dedic 2013-04-04 15:40:25 UTC
Fixed in

except the logging, the fix is pretty safe; it should be considered for backport to 7.3.x, since the unsynchronized Map is both in Java and in CSL from the dawn of their days.
Comment 5 Vladimir Riha 2013-04-04 16:15:36 UTC
Thanks Svato. If this is safe, I'm for patch candidate as well. I'll wait with verification for trunk build, just to be sure
Comment 6 Vladimir Riha 2013-04-17 08:23:42 UTC
I tried it couple of times and can't reproduce it anymore, thanks. Verified

Product Version: NetBeans IDE Dev (Build 201304162301)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-40-generic-pae running on i386; UTF-8; en_US (nb)
Comment 7 Svata Dedic 2013-05-06 08:49:08 UTC
transplanted as
Comment 8 Quality Engineering 2013-05-07 00:19:43 UTC
Integrated into 'releases', will be available in build *201305062200* or newer. Wait for official and publicly available build.
User: Svata Dedic <>
Log: #228188: file-to-task map synchronized; transplanted from trunk
Comment 9 Vladimir Riha 2013-05-09 14:45:02 UTC
patch2 verified

Product Version: NetBeans IDE 7.3.1 (Build 201302132200)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-41-generic-pae running on i386; UTF-8; en_US (nb)

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo