JavaFX read only property wrappers and getter / setter generation.

Is there a way I can customize the getter / setter generation IDEA does so it's a bit smarter when dealing with JavaFX properties? Right now, it doesn't work well with read only property wrappers.  For example, the current getter generation looks like this:

private final ReadOnlyLongWrapper id = new ReadOnlyLongWrapper();

public long getId() {     return id.get(); } public ReadOnlyLongWrapper idProperty() {     return id; }


I can't think of a case where I'd want to expose the wrapper like that.  I'd prefer to have the getter generated like this:

private final ReadOnlyLongWrapper id = new ReadOnlyLongWrapper();

public long getId() {     return id.get(); } public ReadOnlyLongProperty idProperty() {     return id.getReadOnlyProperty(); }


I also don't want setters to be generated for any of the ReadOnlyXxxxxWrapper properties.

Thanks for the help,
Ryan

Please sign in to leave a comment.