[jira] [Commented] (NETBEANS-5726) Checkmark next to "Show Editor Toolbar" menu item can get out of sync with actual setting

2021-05-28 Thread Eirik Bakke (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17353440#comment-17353440
 ] 

Eirik Bakke commented on NETBEANS-5726:
---

The bug also appears if the "Toggle Toolbar" (="Show Editor Toolbar" in the 
menu) action is assigned a keyboard shortcut and invoked using the shortcut. 
The menu item just doesn't respond to external changes to the preferences.

This is due to the action being lazily initialized, which doesn't work for 
actions which need to track external state. Will submit a PR...

> Checkmark next to "Show Editor Toolbar" menu item can get out of sync with 
> actual setting
> -
>
> Key: NETBEANS-5726
> URL: https://issues.apache.org/jira/browse/NETBEANS-5726
> Project: NetBeans
>  Issue Type: Improvement
>  Components: editor - Options
>Affects Versions: 12.2
> Environment: All OSes.
>Reporter: Eirik Bakke
>Priority: Major
>
> The checkmark next to the "Show Editor Toolbar" menu item can get out of sync 
> with actual setting.
> To reproduce:
> 1) Open a file for editing in the NetBeans editor.
> 2) Click View->"Show Only Editor"
> 3) Click View->"Show Editor Toolbar"
> 4) Click View->"Show Only Editor"
> 5) Click View->"Show Editor Toolbar"
> 6) There's now a checkmark next to View->"Show Editor Toolbar", even though 
> there is no editor toolbar showing.
> It seems the checkbox in the menu is inverted on every click rather than 
> properly being bound to the underlying "toolbarVisible" preference from the 
> java.util.prefs.Preferences system, which is (rightly) modified by the "Show 
> Only Editor" action.
> (This bug report is a copy of the old BugZilla bug 
> https://bz.apache.org/netbeans/show_bug.cgi?id=240513 .)



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

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

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



[jira] [Commented] (NETBEANS-5726) Checkmark next to "Show Editor Toolbar" menu item can get out of sync with actual setting

2021-05-27 Thread Eirik Bakke (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352898#comment-17352898
 ] 

Eirik Bakke commented on NETBEANS-5726:
---

Notes from looking into this:

There are three implementations of this action in the NetBeans sources; only 
the ToggleAction in the editor.actions module is actually in use. The action is 
called toggle-toolbar, and it is an AbstractEditorAction wrapped in a 
WrapperEditorAction. The AbstractEditorAction seems to properly respond to 
external changes in the Preferences, setting Action.SELECTED_KEY to the 
appropriate value. But this is not picked up on by PresenterUpdater, presumably 
because it's listening to a WrapperAction rather than the AbstractEditorAction.

> Checkmark next to "Show Editor Toolbar" menu item can get out of sync with 
> actual setting
> -
>
> Key: NETBEANS-5726
> URL: https://issues.apache.org/jira/browse/NETBEANS-5726
> Project: NetBeans
>  Issue Type: Improvement
>  Components: editor - Options
>Affects Versions: 12.2
> Environment: All OSes.
>Reporter: Eirik Bakke
>Priority: Major
>
> The checkmark next to the "Show Editor Toolbar" menu item can get out of sync 
> with actual setting.
> To reproduce:
> 1) Open a file for editing in the NetBeans editor.
> 2) Click View->"Show Only Editor"
> 3) Click View->"Show Editor Toolbar"
> 4) Click View->"Show Only Editor"
> 5) Click View->"Show Editor Toolbar"
> 6) There's now a checkmark next to View->"Show Editor Toolbar", even though 
> there is no editor toolbar showing.
> It seems the checkbox in the menu is inverted on every click rather than 
> properly being bound to the underlying "toolbarVisible" preference from the 
> java.util.prefs.Preferences system, which is (rightly) modified by the "Show 
> Only Editor" action.
> (This bug report is a copy of the old BugZilla bug 
> https://bz.apache.org/netbeans/show_bug.cgi?id=240513 .)



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

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

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