Created attachment 100856 [details]
Thread dump while the UI war frozen
Right-clicked a Java file in the Favorites view (this was a versioned file and I wanted to see the history), and the UI froze for a few seconds. Looks like it is waiting for network access.
Thread dump is attached.
Waiting for HTTP javadoc is a consequence of bug #41443. But, action's isEnabled should be as quick as possible and should not require access to parsing infrastructure, as that may block under many circumstances.
Agreed that DefaultReplaceTokenProvider is at fault for waiting for SourceUtils.getMainClasses. But independently of that, couldn't ElementScanningTask be running in parallel with other source model tasks? Does it need to know parameter names immediately?
It does in fact call SourceUtils.isScanInProgress(), but this returns false. I suppose it should use SourceUtils.isMainClass instead of SourceUtils.getMainClasses?
Integrated into 'main-golden', will be available in build *201008040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jesse Glick <firstname.lastname@example.org>
Log: #188700: UI frozen for several seconds after right-clicking a file in Favorites
*** Bug 177709 has been marked as a duplicate of this bug. ***