mbien commented on code in PR #9772:
URL: https://github.com/apache/netbeans/pull/9772#discussion_r4434950585


##########
platform/openide.explorer/src/org/netbeans/modules/openide/explorer/ExplorerActionsImpl.java:
##########
@@ -869,7 +858,9 @@ private void schedule() {
             cutActionPerformer.toEnabled(false);
             deleteActionPerformerConfirm.toEnabled(false);
             deleteActionPerformerNoConfirm.toEnabled(false);
-            pasteActionPerformer.toEnabled(false);
+            // paste types are unknown until the update runs, so drop the
+            // stale ones as well; setPasteTypes(null) also force-disables
+            pasteActionPerformer.setPasteTypes(null);

Review Comment:
   `actionPerformed` has a blocking wait, no?
   
   ```java
               // Make sure the paste types are up to date before pasting. This
               // may briefly wait for a pending update, but only on the
               // user-initiated paste path, not on every selection change.
               ActionStateUpdater asu = actionStateUpdater;
               if (asu != null) {
                   asu.update();
               }
   ```
   and `update()` calls `timer.waitFinished(100)`
   
   as the comment says, blocking there is far less critical than during simple 
selection change since this would be actually the action activation. A small 
delay there is not noticeable + there is no event burst problem.



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