You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/10/18 15:13:00 UTC

[jira] [Updated] (NETBEANS-1985) Stateful context action does not initialize properly

     [ https://issues.apache.org/jira/browse/NETBEANS-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated NETBEANS-1985:
-------------------------------------
    Labels: pull-request-available  (was: )

> Stateful context action does not initialize properly
> ----------------------------------------------------
>
>                 Key: NETBEANS-1985
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1985
>             Project: NetBeans
>          Issue Type: Bug
>          Components: platform - Actions
>    Affects Versions: 10.0
>            Reporter: Svatopluk Dedic
>            Assignee: Svatopluk Dedic
>            Priority: Major
>              Labels: pull-request-available
>
> Consider an action like
> {code:java}
> @ActionRegistration(displayName = "My toggle action", 
>    checkedOn = @ActionState(property = "myProperty")
> ) 
> public final class MyToggleAction implements ActionListener { 
>   BeanModel model; 
>   public PredSuccAction(BeanModel model) { this.model = model; }
> ...
> {code}
> This action is *context-aware* and will be bound to the context Lookup. However, its initial state will initialize according to last-seen *global* model.
> During debugging I've found code in *GeneralAction* (lines 473+), which replaces delegate's attributes (including "selected") with the global values. Just values which are not defined, i.e. come from the layer definitions should be replaced. Not the enabled, or selected state, if already present in the attrs.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

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