matthiasblaesing commented on issue #7490:
URL: https://github.com/apache/netbeans/issues/7490#issuecomment-2185259133

   My reading of the `BeanModelBuilder` is, that properties are reported when:
   
   - there is a setter
   - there is a list/map getter
   - there is a getter with a corresponding `@NamedArg` parameter in the 
constructor with the most parameters
   
   For KeyCodeCombination there are no getters for the individual keys and thus 
the third option does not match.
   
   If I understand this correctly: 
https://github.com/openjdk/jfx/blob/6a586b662592be3eb81670f0c5ce48061c2fc07c/modules/javafx.fxml/src/main/java/com/sun/javafx/fxml/builder/ProxyBuilder.java#L248
   
   - JFX prefers to use an exactly matching constructor for the supplied 
parameters
   - if there is a default constructor and all supplied property values are 
covered by setters, this combination is used
   - else try to find a suitable constructor/setters combination to cover all 
parameters
   
   I think the model needs to be updated to report the constructor parameters 
as a separate list and the use sited of the property need to take this into 
account.
   
   The code for scanning the constructors with `NamedArg`s:
   
   
https://github.com/apache/netbeans/blob/02c66120a8d5c90cde4c706bb15e7121372fd513/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/completion/beans/BeanModelBuilder.java#L336-L357
   
   looks like a good starting point. The name extraction is demonstrated there. 
The code in `registerProperty` for normal setter can be a template for 
extracting the type information.
   
   
https://github.com/apache/netbeans/blob/02c66120a8d5c90cde4c706bb15e7121372fd513/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/completion/beans/BeanModelBuilder.java#L580-L586
   
   @sijskes will you look into this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to