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.
The http javadoc block editor features. The http access is done under the parser lock, the lock block other threads doing code completion and scheduler tasks. For more details see http://netbeans.org/bugzilla/show_bug.cgi?id=187919#c11.
Sounds like using Future<String> will be quite difficult. Simpler proposal is to just disable remote Javadoc for the editor; it would still be displayed in the Javadoc window if open. People who really need the popup are, as usual, encouraged to download Javadoc for offline use. Could also set up a persistent cache (using JavaIndex.getCacheFolder) for downloaded Javadoc, with an expiry policy based on Last-Modified, rather than the current transient cache; this would permit cached remote Javadoc to be displayed in the editor too (especially if the first attempt triggered an asynch download).
Created attachment 105622 [details] Improved patch of asynchronous ElementJavadoc
Dusan found a way how to cancel the JavaCompletionProvider.query() method. So I've added it into the diff. The diff also depends on the fixes of AE (#194743), changesets: http://hg.netbeans.org/jet-main/rev/c4fa36c181db http://hg.netbeans.org/jet-main/rev/5d6cf6d73fb8 The patch needs an API change (added asynchronous method ElementJavadoc.getFutureText returning Future<String> in addition to synchronous String getText)
Maybe we can join it with Jesse's cache. In case of local or cached pages it will be handled as today. The remote pages will be done asynchronously. They will still be shown in the editor for those who has fast enough connection. For people having slow connection the http request will not block the editor infrastructure and when the page is downloaded it will be put into the cache => it will be fast in next call.
*** Bug 195507 has been marked as a duplicate of this bug. ***
looks like P2 to me.
I will probably integrate the patch. After clean up it works fine. It does not block code completion and javadoc for non http URLs. For HTTP URL it blocks all successive HTTP request until the current is done (RequestProcessor with throughput 1). Probably we may add a Progress into IDE to show it to user.
The patch exceeds my understanding of the editor so I am not going to commit it myself; if left assigned to me I would follow the ideas in comment #1.
OK, I am going to commit it. The ideas in comment #1 improve the current patch, so if you have a time for it the caching is welcomed. It will improve the latency of getting the http javadoc for successive calls.
The attached patch looks OK.
Fixed jet-main 906582f76431
Integrated into 'main-golden', will be available in build *201102250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/906582f76431 User: Tomas Zezula <tzezula@netbeans.org> Log: #194969:Http Javadoc blocks editor
*** Bug 196641 has been marked as a duplicate of this bug. ***
*** Bug 200640 has been marked as a duplicate of this bug. ***