When a file contains some error badges due to a non existent token file, when this file is created (by hand or by build process), NetBeans editor framework launches a new parsing of the file. So error badges inside editor disappear.
Unfortunately, it does not update file error badge (by calling ErrorsCache.setError()), so the file remains with an error badge although editor displays no error badge.
A build process may even validate several files for instance if several grammar file import a generated token file.
The best way to solve that issue is to add a grammar file indexer that will be launched each time new files are created. We do not need to index grammar rules or other stuff but we will use it for updating ErrorsCache that manages file badging.
When a file contains some error badges due to a non existent token file, when this file is created (by hand or by build process), NetBeans editor framework launches a new parsing of the file. So error badges inside editor disappear.
Unfortunately, it does not update file error badge (by calling ErrorsCache.setError()), so the file remains with an error badge although editor displays no error badge.
A build process may even validate several files for instance if several grammar file import a generated token file.
The best way to solve that issue is to add a grammar file indexer that will be launched each time new files are created. We do not need to index grammar rules or other stuff but we will use it for updating ErrorsCache that manages file badging.