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.
Steps to reproduce: - Consider an xml file and its DTD - Open both files in NB - Modify DTD somehow, save it - Click File > Refresh All Files - Try to use autocomplete. You could ensure that the updated DTD isn't re-load To reload DTD user needs to perform Validate XML action. The best solution is to automatically re-load DTD just when it is modified.
Not easy to fix... there is no direct glue between the edited XML document and the declared DTD. The DTD is parsed via SAX parser with DTD handler so the XMLCompletion code has no idea where the DTD comes from :-(. This could probably be fixed by attaching listeners to files in the SAX Handler's resolveEntity(...) method and listen on their changes, but this seems to be dangerous three weeks before HR => setting TM to next version.
I'll try to implement the proposed solution.
fixed - the GrammarManager now listens on all external DTDs and reloads the grammar if any of the files changes (and is saved). checking in core/src/org/netbeans/modules/xml/dtd/grammar/DTDGrammar.java; /cvs/xml/core/src/org/netbeans/modules/xml/dtd/grammar/DTDGrammar.java,v <-- DTDGrammar.java new revision: 1.19.54.2.2.2; previous revision: 1.19.54.2.2.1 done Checking in core/src/org/netbeans/modules/xml/dtd/grammar/DTDParser.java; /cvs/xml/core/src/org/netbeans/modules/xml/dtd/grammar/DTDParser.java,v <-- DTDParser.java new revision: 1.7.54.1.2.2; previous revision: 1.7.54.1.2.1 done Checking in text-edit/src/org/netbeans/modules/xml/text/completion/GrammarManager.java; /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/completion/GrammarManager.java,v <-- GrammarManager.java new revision: 1.8.42.1.2.2; previous revision: 1.8.42.1.2.1 done