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.
Summary: | Auto-generated parameterized JavaFX properties | ||
---|---|---|---|
Product: | javafx | Reporter: | Richard-Degenne |
Component: | Editor | Assignee: | Svata Dedic <sdedic> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | Example 1 |
Created attachment 164736 [details] Example 1 When adding a parameterized JavaFX property (such as `ObjectProperty<?>` or `ListProperty<?>`), the wizard should ask for the type(s) it is applied to, for better consistency in the generated code. Example: When filling the wizard as shown in `Example_1.png`, the generated code will look like this. private final ListProperty<?> users = new SimpleListProperty<>(); public ObservableList getUsers() { return users.get(); } public void setUsers(ObservableList value) { users.set(value); } public ListProperty usersProperty() { return users; } Here, `getUsers()` will return an `ObservableList<Object>`, forcing a cast in the client code. Instead, the generated code should look like this. private final ListProperty<User> users = new SimpleListProperty<>(); public ObservableList<User> getUsers() { return users.get(); } public void setUsers(ObservableList<User> value) { users.set(value); } public ListProperty<User> usersProperty() { return users; }