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 41392

Summary: TLD Editor rewrites unparsable elements and surrounding comments
Product: javaee Reporter: Martin Schovanek <mschovanek>
Component: CodeAssignee: Milan Kuchtiak <mkuchtiak>
Status: VERIFIED FIXED    
Severity: blocker CC: ckutler, non_migrated_user, pkeegan
Priority: P2 Keywords: RELNOTE
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Martin Schovanek 2004-03-26 09:52:53 UTC
[Nb 3.6 RC1, jdk1.4.2]

Steps to reproduce:
-------------------
1) create new .tld
2) add a tag with a attribute
3) rename the <tag> element into e.g. <tagg> in
the text editor
4) safe the document
5) right-click the .tld node and chose "Add Tag"
6) only close the Add New Tag dilaog
ERROR: the <tagg> element was removed

WORKARROUND: you can undo it (e.g. Ctrl+Z)

The document which is not valid we should modify
only by the text editor. Not by custommizers,
tre-editors, etc.
Comment 1 Milan Kuchtiak 2004-03-26 16:03:18 UTC
Invalid entries are lost when TLD customizer modifies the tld file.
As no all entries are lost and there is a workaround - I am asking for
a waiver for this bug.
Comment 2 Jan Chalupa 2004-03-30 07:47:09 UTC
Waiver for 3.6 approved.
Comment 3 Patrick Keegan 2004-04-01 17:33:26 UTC
Marking as relnote. Chris, is this one of the ones you said you'd be
providing a release note for?
Comment 4 Chris Kutler 2004-04-06 23:33:13 UTC
Note, the workaround Ctrl-Z does not work. 

Using the Customizer on an Invalid TLD Document Can Cause Loss of Data.

If a TLD document has invalid tags, the customizers might delete or
overwrite text in the TLD document. Even opening and closing a
customizer without applying the changes can cause loss of data. As the
changes occur from outside the Source Editor, Ctrl-Z (undo) might not
restore the lost data. If you edit the TLD in the Source Editor, be
careful to not use the customizers if there is a possibility of
invalid tags.
Comment 5 Chris Kutler 2004-04-08 00:46:16 UTC
P.S. the last 2 paragraphs from my last post were meant to be put in
the release notes. Sorry about that.
Comment 6 Milan Kuchtiak 2004-05-31 15:30:25 UTC
The issue isn't relevant to promo-D any more.
The functionality was replaced by tag handler wizard.
The tag handler wizard doesn't remove the code in tld file now.
It either ignores the invalid elements or writes a message that TLD is
unparsable.
Comment 7 Martin Schovanek 2004-07-15 16:32:14 UTC
Verified