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 268411 - Code folding on some javascript files does not collapse but other yes
Summary: Code folding on some javascript files does not collapse but other yes
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-07 19:30 UTC by xavii4all
Modified: 2017-03-23 13:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
js file on which code cannot be collapsed nor expanded (47.67 KB, application/javascript)
2016-10-11 12:53 UTC, xavii4all
Details
ide log (51.35 KB, application/octet-stream)
2016-10-11 14:45 UTC, xavii4all
Details
screenshot (320.03 KB, image/jpeg)
2016-10-11 14:48 UTC, xavii4all
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xavii4all 2016-10-07 19:30:40 UTC
Hi, as described on summary, I cannot collapse the code, only on some of my js files and inside the same netbeans proyect, neither can I navigate with "ctrl+click" through methods.
The weird thing is that on most of my js files in the proyect I can expand or collapse the code normally as also I can navigate through methods with ctrl+click.

So far I've tried uninstalling and re-installing netbeans ( removing all registry entries and folders under "/user/AppData" directory ) hoping to fix this issue without success so far...

I 've already tried checking/unchecking the "Enable Folding" option under tools, but nothing changed...


If someone have a clue on how to fix this I would appreciate.

thanks and regards
Comment 1 Petr Pisl 2016-10-10 07:02:38 UTC
How big are the files, where it doesn't work? By default file bigger 1MB are not parsed and these features don't work. Or NB can evaluate them as minimized files and then they are not parsed as well. Could you attach an example? Thanks.
Comment 2 jay_l 2016-10-11 00:37:46 UTC
I'm having the same difficulty. Code folding simply fails to work at all in any JavaScript file.

The IDE log is showing me this, which appears relevant:

WARNING [org.netbeans.modules.csl.editor.fold.GsfFoldManager]: Undefined fold types used in org.netbeans.modules.javascript2.editor.parser.JsParserResult@579ce885: [member, code-block, comment, documentation]
WARNING [null]: Last record repeated again.
Comment 3 Petr Pisl 2016-10-11 08:40:42 UTC
Could you attach a file, where it can be reproducible?

Thanks
Comment 4 xavii4all 2016-10-11 12:53:13 UTC
Created attachment 162453 [details]
js file on which code cannot be collapsed nor expanded
Comment 5 xavii4all 2016-10-11 12:57:39 UTC
(In reply to Petr Pisl from comment #1)
> How big are the files, where it doesn't work? By default file bigger 1MB are
> not parsed and these features don't work. Or NB can evaluate them as
> minimized files and then they are not parsed as well. Could you attach an
> example? Thanks.

Thanks for asking, I have 1 example file whose size is 48kb. The thing is that I also have another file about 93kb where I can collapse or expand code and navigate through methods (ctr+click) normally.
I'd like to add also that my co-workers uses the same files as I with netbeans, and they do not have this issue with any file.

So far I've tried uninstalling ( removing every folder and registry entries ) and then re-installing Netbeans, without success.

I'm adding 1 file on which I cannot do the folding.
Comment 6 xavii4all 2016-10-11 13:31:51 UTC
(In reply to jay_l from comment #2)
> I'm having the same difficulty. Code folding simply fails to work at all in
> any JavaScript file.
> 
> The IDE log is showing me this, which appears relevant:
> 
> WARNING [org.netbeans.modules.csl.editor.fold.GsfFoldManager]: Undefined
> fold types used in
> org.netbeans.modules.javascript2.editor.parser.JsParserResult@579ce885:
> [member, code-block, comment, documentation]
> WARNING [null]: Last record repeated again.



My problem only appears on some of my js files. I've also checked the log and looks similar:

WARNING [org.netbeans.modules.csl.editor.fold.GsfFoldManager]: Undefined fold types used in org.netbeans.modules.javascript2.editor.parser.JsParserResult@7947fe74: [member, code-block, comment]
WARNING [org.openide.util.WeakListenerImpl]: Can't remove java.beans.PropertyChangeListener using method org.netbeans.modules.csl.core.GsfDocument.removePropertyChangeListener from org.netbeans.modules.csl.core.GsfDocument@349fe8c, mimeType='text/karmaconf+javascript', kitClass=null, length=3886, version=1, file=org.netbeans.modules.csl.core.GsfDataObject@27f9eaff[C:\wamp\www\repositorios\branches\web_service\sistema_administrativo\clases_js\configuracion_areas.js@ba719af:77d7a98c]
Comment 7 Petr Pisl 2016-10-11 14:09:57 UTC
@xavii4all: The code folding works for me in the attached file. The code folding doesn't work at all for you in the file? Could you attach a screenshot of the open file in editor? And also, could you attach your message.log file? Thanks.
Comment 8 xavii4all 2016-10-11 14:44:04 UTC
(In reply to Petr Pisl from comment #7)
> @xavii4all: The code folding works for me in the attached file. The code
> folding doesn't work at all for you in the file? Could you attach a
> screenshot of the open file in editor? And also, could you attach your
> message.log file? Thanks.


Exactly Petr Pisl, it doesn't work at all... I'm leaving one screenshot and the log file attached.

Thanks a lot for your time
Comment 9 xavii4all 2016-10-11 14:45:12 UTC
Created attachment 162455 [details]
ide log
Comment 10 xavii4all 2016-10-11 14:48:19 UTC
Created attachment 162456 [details]
screenshot

I'm showing 2 files with splitted editor so you can see folding working ok on the left file and on the right, the one that it doesn't.
Comment 11 AngelPR 2016-12-22 15:02:10 UTC
Hello, I have the same problem that describes xavii4all. Folds do not appear in some jScript files.

After some tests I have noticed that this seems to happen when the file name contains the string "config".

For example: "newconfiguser.js" not folds, but renaming the same file from the NetBeans IDE as "newonfiguser.js" folds correctly after closing and reopening the IDE.

Seeing the screenshot sent by xavii4all, this seems coherent, since the file that does not work is called "configuration_user.js" and it is probable that when Petr Pisl copied the code, also sent by xaviia4ll, he did it with a filename Which did not contain the "config" string.

I have tried with several files to rename them and the same thing always happens, no matter what code the file contains.

I hope this helps to resolve this bug.

thank you very much
Comment 12 mccomber 2017-03-23 13:06:51 UTC
As AngelPR says, this happens (no code folding at all) when the Javascript file name has "config" in it.