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.
While testing a fix for #16265 I found that I could correct the problems with nbrescurrloc: but still not all annotations types refreshed. Specifically after reinstalling editor, the Bookmark built-in annotation remained but Compile Errors (from core) was lost. Any module annotations from XML were also lost (unless those modules were themselves reinstalled, in which case they reappear). I suspect a problem in AnnotationTypesFolder, though it could be a core/openide rather than editor bug, needs to be investigated. No errors reported. Did not check whether the annotations actually worked, just saw them not appear in Options | Editing | Annotation Types.
Jesse, I need your help, the problem is (probably) following. Uninstalling editor module uninstalls anno type processor as well. Installing editor module again causes that anno type processor is registered in the layer and afterwards the bookmark anno type XML is installed and is correctly processed by the processor, but all other XML files which are already installed in Editor\AnnotationTypes folder are *not* re-processed by my processor (that's why the Bookmark annotation type appears only). And that's why re-installing debugger causes that debugger's anno types are visible again. Now the problem might be that: * I don't detach processors from XML files. You suggest this to Mato in issue 16342. Should I do it as well? I tried it and it did not help. * it looks like installing new processor does not force refreshing of all databobjects. If new processor is installed, all existing DataObject should be thrown away and recognized again, right? Or do you see any other problem? Thanx for your help.
Jesse, I just talked with Jarda and he said he will try to fix it.
#16900 may be related to this. Is the problem that the instance as provided by your XML processor is not recreated? There is no need to throw away the XMLDataObject's, but IMHO XMLDataObject ought to throw out the old processors and their cookies and fire PROP_COOKIES. That would hopefully cause AnnotationTypesFolder (the folder instance) to refresh. (Ideally this would also happen when any edit was made to the XML file itself BTW--it should change its cookies.)
Take back what I said about automatically changing cookies when the XML file is edited--this is the processor's job, not XMLDataObject's. Ideally if the *public ID* were changed the lookup would switch, but this must be pretty rare and probably there is no efficient way to test for it. Also I think my advice/comment in #16342 was not so helpful: while the processor can in fact detach its cookies during module uninstallation, that does not actually remove the processor from the XMLDataObject, nor does it add any new version of the processor (from a module reload) back to the XMLDataObject if the module is installed again. This has to be handled by XMLDO I guess, hence this bug.
Fixed. core.xml.FileEntityResolver rev. I tested it by starting IDE, opening editor, adding breakpoint, closing editor, uninstalling editor module, installing editor module, opening editor. The annotation has appeared there and also the annotation types folder seemed ok. FileEntityResolver.java,v rev. 1.9 XMLDataObject.java revision: 1.103
Works fine.
Resolved for 3.4.x or earlier, no new info since then -> closing.