mbien commented on code in PR #9776:
URL: https://github.com/apache/netbeans/pull/9776#discussion_r4493659814
##########
ide/projectui/src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java:
##########
@@ -80,7 +81,13 @@ private SelectNodeAction(String icon, String name, String
findIn, Lookup lookup)
protected @Override void refresh(Lookup context, boolean immediate) {
FileObject fo = getFileFromLookup( context );
- setEnabled( fo != null );
+ boolean enabled = fo != null;
+ Mutex.EVENT.writeAccess(() -> setEnabled(enabled));
+ }
+
+ @Override
+ protected void scheduleRefresh(Lookup context) {
Review Comment:
i did the opposite: `sync` boolean is now gone since tests can force a sync
by simply calling `isEnabled()`
further: `scheduleReferesh` is now final which is possible after making the
`SelectNodeAction` async too. So the mechanism of custom scheduling is no
longer needed.
changes are in extra commit, will squash before merge
--
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