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 199627 - persistence.xml needs better completion/validation support
Summary: persistence.xml needs better completion/validation support
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-22 17:30 UTC by alexismp
Modified: 2016-07-07 08:56 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alexismp 2011-06-22 17:30:29 UTC
NetBeans Dev 201106180600

When editing persistence.xml, invoking code completion after typing "<proper" has the editor complete it with :
   <property name="" value="">

It is a common and somewhat understandable error for a developer to omit the closing "/>" (happened to me multiple times).

Of course if you invoke an additional code completion it'll do the right thing :
   <property name="" value=""></property>
but I'd argue that this is not the best behavior. Instead I'd rather have the completion generate :
   <property name="" value=""/>
If this is considered a hack (some tags do need closing tags), then I'd like persistence.xml to get the XML tools such a validation showing in really time that the document is not well-formed.

Otherwise a missing closing </property> tag (or a missing trailing "/>") is not detected until deployment time which is sub-optimal.
Comment 1 Sergey Petrov 2011-10-12 14:16:18 UTC
there is no persistence.xml completion, it's general xml completion and it's the way it works, it may have sense to enhance it for persistence.xml specifically with known properties behavior etc, but it's clear enhancement for me.
if it's about detection of broken persistence.xml it's enhancement also, and separate one, on other side corrupted web.xml isn't detected online too and I'm not sure if there is any configuration with online detection in ee area. there is also action to valid xml file(general for any xml) and I'm not sure why it wasn't implemented  to detect not well formed xml online, but it's not persistence specific issue/enhancement request also. may be some separate issues/requests can be filed against xml support if necessary.
Comment 2 Martin Balin 2016-07-07 08:56:37 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss