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.
Here is a snipped from an entity class generated using Entities from Database: @Id @Basic(optional = false) @NotNull @Column(name = "CUSTOMER_ID") private Integer customerId; @Basic(optional = false) @NotNull @Size(min = 1, max = 10) @Column(name = "ZIP") private String zip; @Size(max = 30) @Column(name = "NAME") private String name; This code is hard to read - it would be useful if there was an empty line after each field.
It's the way our java api generate class from class tree, if I extract superclass with refactor action, there will be no newlines also, but may be I can add empty lines to class model, I'm not sure, requires more evaluation. Also generated code in forms have fields on each line, it may be too custom for persistence фкуф to have newline between ашудвы also it may be user preference dependent.
after brief investigation I found option Editor|Formatting Language: Java Category: blank lines option "after field". it's 0 by default and if changes to 1 entity class will be generated with newlines after each field. if there is no request to override this option for persistence of have separate configuration for entities from db looks like the issue isn't valid. feel free to reopen if persistence need something special.
*** Bug 191331 has been marked as a duplicate of this bug. ***
Even though there is an option to override the field manually but the generated code still looks ugly. I'd recommend finding a way to exposing it programmatically and then overriding in the JPA entity generators. I always have to add a blank line to show the fields clearly.
It's unclear why it should be specific to persistence? May it be better to request other defaults in general class format configuration? Also why you can't change these defaults?
Actually, thinking more about the general format should be changed itself. Will that be a separate bug ? I can change my preferences but when I'm teaching Java EE 6 labs using NetBeans, its cumbersome if everybody has to change it. And its anyway more readable :-)
Any generator works this way, as mentioned above "extract super class" and firms but even more simple like "new|Java beans|Java bean" will create java bean with members on each line (yet it may be less fields then usually in an entity). It it's specific to support customization in place(i.e. wizard step) it's more like enhancment for persistence area, but you can try also to file more general issue.
any progress on general issue? as I said having general functionality to configure newlines, it's more like enhancement to extend some specific wizard to support customization in place so if you don't mind -> enhancement. it may have sense to review also in genral for ide if it's good to have this for most generator's wizards.
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