jtulach commented on code in PR #9776:
URL: https://github.com/apache/netbeans/pull/9776#discussion_r4494044531


##########
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:
   - removing `sync` field in 490bd3c75892ab3979ce45f1255241af66d1255d is a 
good move
   - making `scheduleRefresh` final makes it clear, it is supposed to be 
_called by subclasses_ only



-- 
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