netbeans
netbeans copied to clipboard
Add code generation for property/getter/setter methods for JavaFX properties
Description
JavaFX has its own naming convention for working with properties. For example, for string property
private StringProperty test = new SimpleStringProperty();
the following methods are required:
public StringProperty testProperty() {
return this.test;
}
public String getTest() {
return this.test.get();
}
public void setTest(String test) {
this.test.set(test);
}
As it is seen getters and setter are different from standard Java getters and setters. Besides, the type of them must be resolved from property (for example, from ReadOnlyObjectWrapper
).
Currently NB doesn't support code generation for JavaFX properties (ALT+INS) so I suggest to add it.
Use case/motivation
It is very boring to write these methods manually for JavaFX projects.
Related issues
No response
Are you willing to submit a pull request?
No
There is https://github.com/rterp/JavaFxPropertyHelperNBPlugin plugin with MIT license, but it is very old.