You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/08/16 14:36:42 UTC

[GitHub] sdedic opened a new pull request #701: Fixed enable evaluation for cloned PropertyMonitors. Defined default …

sdedic opened a new pull request #701: Fixed enable evaluation for cloned PropertyMonitors. Defined default …
URL: https://github.com/apache/incubator-netbeans/pull/701
 
 
   …behaviour for collections and numbers
   
   I have found a subtle bug in the `@ActionState` implementation: when an action was cloned as `ContextAwareAction` (i.e. into a toolbar or menu,...), it did not completely clone the `PropertyMonitor` watching for property changes.
   So after initial inspection for `enable` and `checked` status, the context-bound action state never changed.
   
   This is fixed by `PropertyMonitor:564` one-liner.
   
   It's ugly, but I have also incorporated slight convenience improvement for most common data types: if no equal value is specified using `@ActionState.checkedValue`, the enable/checked state will evaluate to true for non-empty Collections/Maps and positive numbers. See change `PropertyMonitor:524-531`.
   
   Relevant test cases added.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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