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 16434 - XML-installed annotation types do not reappear after editor reinstall
Summary: XML-installed annotation types do not reappear after editor reinstall
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on: 16900
Blocks: 16265
  Show dependency tree
 
Reported: 2001-10-10 15:17 UTC by Jesse Glick
Modified: 2008-12-22 23:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-10-10 15:17:23 UTC
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.
Comment 1 David Konecny 2001-10-24 13:51:27 UTC
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.
Comment 2 David Konecny 2001-10-24 14:19:57 UTC
Jesse, I just talked with Jarda and he said he will try to fix it. 
Comment 3 Jesse Glick 2001-10-24 15:56:24 UTC
#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.)
Comment 4 Jesse Glick 2001-10-24 16:12:51 UTC
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.
Comment 5 Jaroslav Tulach 2001-10-25 15:55:47 UTC
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
Comment 6 David Konecny 2001-10-26 09:36:14 UTC
Works fine.
Comment 7 Quality Engineering 2003-07-01 16:22:35 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.