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 253175 - No code completion for long time
Summary: No code completion for long time
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 8.1
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-25 08:28 UTC by Tomas Zezula
Modified: 2015-09-11 10:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2015-06-25 08:28:42 UTC
Invoking code completion in javascript file (no angular js used) just jQuery.
The code completion shows nothing just "Scanning in progress..." but there is no scanning active (everything is already scanned). There is long running "Loading AngularJS Documentation..." progress which runs twice.
Comment 1 Petr Pisl 2015-09-11 09:44:20 UTC
I looked how it can happen. So you have start ide or open new project. The scanning was started and during the scanning you have called js code completion. So the code completion displayed "Scanning in progress...". When the scan was finished, computing cc items started, but the infrastructure still displays message that scanning is still in progress. 

The js code completion had to be called for the first time for the used userdir or NB could not download the documentation before. Computing Js items asks for the global objects from implemented js frameworks. For creating global angular object, the NetBeans has to download Angular documentation. Unfortunately is done in the same thread as are counted the cc items. The downloaded documentation is cached in ${userdir}/var/ajs-doc. When the download is finished the global angular global is created. The global object is static so is created only once per ide session. If there is already cached the documentation, then is created quickly from the cache, if not, then the documentation is trying to be downloaded and the process is waiting until download is finished.

How it is written now, it doesn't depend, whether angular is used. One of the solution, which I have in my mind, is to create a fake empty angular global object and downloading the documentation separate in a new process and when the documentation will be downloaded, then alter the angular global object. Probably it means that code completion result will not offer the angular properties until the download is finished.
Comment 2 Petr Pisl 2015-09-11 10:05:39 UTC
Fixed in web-main.