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.
Created attachment 151090 [details] Full source of project Steps to reproduce: 1) Create new Cordova App or Html5 App (choose no Site Template or choose any template you like it does not matter) 2) In project Properties - Javascript Files add any (phaser in my case) to js/libs 3) In index.html write <!DOCTYPE html> <html> <head> <title>TODO supply a title</title> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <script src="js/libs/phaser/phaser.js" type="text/javascript"></script> <script type="text/javascript"> //Try Autocomplete here var game = new Ph//Nothing at all here </script> </head> <body> <div>TODO write content</div> </body> </html> (you can either try to reopen project or IDE, wait for background scan but nothing helps) Full project is attached
Thank you for the project. The problem is that the JS file phaser.js has 2.7 MB and afaik editor does not parse files larger then 1MB due to performance.
Thank you for the information, Vladimir. Maybe it is an easy workaround? Like setting in netbeans.conf, or something I could do to make this work? I do really appreciate any help.
There are three options how you can influence the parsing of big files. nb.js.parse.big.files - if you use this option, then the big files will be always parsed, the default value is false. nb.js.big.file.size - the size of js file, when the file is not parsed. The default value is 1048576 (1024x1024) nb.js.big.minimize.file.size - the size of minimized file that is not parsed. The default value is 0, which means that the minimized files are not parsed at all. You can add these properties to the netbeans.conf or run netbeans from a command line with -J-Dpropertyname=propertyvalue. For example if you run NB from commandline on linux throgh the command ./netbeans -J-Dnb.js.big.file.size=3145728 , NetBeans will not parsed js files bigger then 3 MB. Let me know, if it's work for you. You can probably run in some performance problem, if you will edit such big file.
I'm closing this issue as wont fix. I think that the default vales of these options works well.
Thank you so much Petr for taking your time and kindly helping me! And sorry for creating this Issue. I've tried -J-Dnb.js.big.file.size=3145728 and -J-Dnb.js.parse.big.files=true each by adding them to netbeans_default_options in netbeans.conf (System data is: Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18 System: Windows 8 version 6.2 running on amd64; UTF-8; en_US (nb) ) In IDE log i saw each argument in: Input arguments: ... -Dnb.js.parse.big.files=true -Dnb.js.big.file.size=3145728 Project opening time did not increase, I mean background scanning time. Finally I enabled both setting and reopened a project few times, even recreated it (as HTML5 application with existing sources) but unfortunately nothing helped.
Could you try to delete the index cache? The cache is located in your userdir and how to find your userdir is write up here: http://wiki.netbeans.org/FaqWhatIsUserdir . The index cache should be in the folder index. After deleting the cache, start NB again. It will parsed all the file again. Or when you open the big file, does it have the semantic coloring? If yes, then it's parsed. You can create small change (add a space to the comment). This invokes reindexing the file. Thanks.
Thank you once again Petr! So, I've: 1) closed Netbeans 2) deleted content of C:\Users\{MyUsername}\AppData\Local\NetBeans\Cache\8.0.1\index (please don't be confused about 8.0.1 folder name, i've updated netbeans to 8.0.2) 3) Opened Netbeans and checked color scheme on phaser.js Background Scanning of projects took about 3 minutes :) Autocomplete search takes 1-2+ minutes after hitting Ctrl+ each time :) But it worked! I See the docs now! Thank you! So all the suggestions you gave me do work. Even that 1Mb is quite a good limit for JS file scan. Thanks once again, for your king help and explanations!
You are welcome, but if you have to wait 1 or 2 minutes for cc, then it's unusable.:(
It is, Petr. So the only way I've figured out is to put sources of the library in any folder of my project, while developing, and deleting it for release. Second solution I see, is to add to Netbeans' CC ability to make suggestions(autocompletes) from another open projects (At least if there is a bower dependency between two projects or if they both are simply open). If you like this suggestion, I could make an enhancement issue for this. Anyway, thank you very much for your kindness.
There is a workaround. You can define some types through the @typedef annotation in your project and get the cc for it. So have one js file, where are defined most used types from the library.