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 270667

Summary: The java index is not updated when new module-info is created
Product: java Reporter: Tomas Zezula <tzezula>
Component: SourceAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: Dev   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Tomas Zezula 2017-05-17 14:38:29 UTC
The java index is not updated when new module-info is created in the source root.
The error badges are not updated, etc.

Steps to reproduce:
1) Create JFX project - no module-info
2) Project has no error badges
3) New Module-Info
4) Project should get error badges as the newly created module-info does not contain javafx.base nor javafx.controls.

The problem is that there are 2 events: FileListWorks caused by creating the module-info and RootsWork caused by the change of classpath. They come in this order as the classpath is computed from the module-info. For the first Work the JavaCustomIndexer votes to reindex whole root as classpath has changed but the FileListWork is not able to provide allResources. The following RootsWork has allResources but the JavaCustomIndexer is already updated to new classpaths so it votes not to reindex whole root.
Comment 1 Tomas Zezula 2017-05-17 14:55:44 UTC
Fixed jet-main http://hg.netbeans.org/jet-main/rev/a872c99d19b3
Comment 2 Quality Engineering 2017-05-19 01:51:51 UTC
Integrated into 'main-silver', will be available in build *201705190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a872c99d19b3
User: Tomas Zezula <tzezula@netbeans.org>
Log: #270667: The java index is not updated when new module-info is created