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: New project / java class library Add new file / empty files / persistence.xml add xml content. Close the project Reopen the project The persistence.xml file is still linked to the xml editor instead of the persistence visual editor. ---- If the persistence.xml file is created using the New/Entity classes from database then the persistence.xml is linked to a specific visual editor. It seems that there is no way to force netbeans to use this visual editor when the persistence.xml is created manually
The issue can be workaround by forcing UNIX line endings (LF) in persistence.xml. dos2unix src/META-INF/persistence.xml And restarting Netbeans IDE. (Just closing and reopening the project will not work). I'm not 100% sure but I think should recognize persistence.xml with either Windows/Unix line endings.
it's not a problem with newlines, I just copied from one persistence.xml to another manually created on linux and reopening works as described, i.e. no visual editor. restart solve the problem. but it may be not persistence recognizing problem but something more general as the same problem is for manually created web.xml. It doesn't looks like a usual use case, also editor provide access to the file, restart solve the issue.
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