Plugin/Studio Boilerplate code generation

Hello, community! How do i suggest or contribute any fixes (ideas?) to a Jmix plugin/studio? For example, when generating boilerplate code for entities:

  1. i want newlines to be added (Java static code analysis),
  2. furthermore, enumerations, used as entity fields fire up Java static code analysis it could be easily fixed by generating
this.severity = severity == null ? "" : severity.getId();

instead of

this.severity = severity == null ? null : severity.getId();

in setter (i.e public void setSeverity(final Severity severity) in this case)
3. also, there is a final that could be added to an every getter. it costs plugin nothing, but saves a couple of developer hours at the project start))
4. enum fields are created with @Column(name = "SEVERITY", nullable = false, length = 50) which is a magical number. maybe some constant could be added to make that code more reliable.

Hi

Thanks for your feedback. This category is a perfect place for such suggestions.

1 - newline at the end of file. The issue created for, will be delivered in some of the futute releases.
2 - empty string for enum id. Attribute value should correspond to some enum id, and empty string does not. Also it is definitely not worth adding additional logic to Studio to handle such case for mandatory enum attribute only to satisfy static code analysis tool.
3 - Could you please reveal the meaning? We didn’t get the point. Are you talking about setter parameter? public void setSeverity(final Severity severity
4 - “50” is an attribute length you specified, it is not a magic number. By default attributes generated with length 255, which is default, so no length attribute added to the annotations.

  1. thank you))
  2. i’m talking about auto generated code, which translates enum objects to database entries. i double checked, there’s no difference for database in this particular case, if it’s null or empty string written, and the context of notnull enum becomes more clear and maintainable. my setSeverity example is an example of a standard setter, made by plugin.
  3. yes, it’s about parameters (actually, all auto generated parameters). cos it’s more reliable to create final parameters, rather than non final.
  4. yes, i know. it is my hand made parameter, but if i’d make it somewhere by myself, i’d make a private static final int WHATEVER_LENGTH = 50;