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


##########
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 am a little bit lost in the overrides of various `*refresh` methods
   - why isn't `scheduleReferesh` method `final`?
   - this test action would just set `sync = true`
   - the less overridable methods the less [object-oriented spaghetti 
mess](https://wiki.apidesign.org/wiki/NetBeans_Runtime_Container#Modularity_Manifesto)



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