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 230179

Summary: Java and PHP formatters cannot suspend repository updater
Product: editor Reporter: Svata Dedic <sdedic>
Component: Parsing & IndexingAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 222161    

Description Svata Dedic 2013-05-23 13:29:02 UTC
Java and CSL (= PHP, JS) Formatter now call  org.netbeans.modules.parsing.impl.Utilities.acquireParserLock() in their preparation phase.

This method just acquires the lock, but inlike e.g. posting UserTask into ParsingManager, it does not attempt to suspend the background indexing operation. So unlike UserTasks, these Formatters must wait until the bkg indexing completes. If the updater was suspended, e.g. embedding indexing (= PHP indexer) can be interrupted after each file, which would greatly impact PHP formatter response time - see defect #222161.

Also please make the relevant calls part of [some] API; CSL has now an implementation dependency also because of parsing.impl.Utilities usage.
Comment 1 Tomas Zezula 2013-06-06 18:23:19 UTC
Fixed jet-main 5af2853fd9e6