You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "sdedic (via GitHub)" <gi...@apache.org> on 2023/01/27 12:24:37 UTC

[GitHub] [netbeans] sdedic commented on a diff in pull request #5361: Various database fixes

sdedic commented on code in PR #5361:
URL: https://github.com/apache/netbeans/pull/5361#discussion_r1088904193


##########
ide/db/src/org/netbeans/modules/db/explorer/action/ConnectAction.java:
##########
@@ -62,63 +63,63 @@
 import org.openide.awt.ActionReference;
 import org.openide.awt.ActionRegistration;
 import org.openide.awt.ActionState;
-import org.openide.awt.StatusDisplayer;
+import org.openide.util.ContextAwareAction;
 import org.openide.util.HelpCtx;
 import org.openide.util.Lookup;
 import org.openide.util.Mutex;
 import org.openide.util.NbBundle;
+import org.openide.util.RequestProcessor;
+import org.openide.util.WeakListeners;
 
 @ActionRegistration(
         displayName = "#Connect", 
-        lazy = false,
+        lazy = true,
+        asynchronous = true,
         enabledOn = @ActionState(type = DatabaseConnection.class, useActionInstance = true)
 )
 @ActionID(category = "Database", id = "netbeans.db.explorer.action.Connect")
 @ActionReference(path = "Databases/Explorer/Connection/Actions", position = 100)
-public class ConnectAction extends BaseAction {
+// Note: the action ought to be asynchronous=true, but that does not work well with lazy = true (and with lazy = false does not work at all)

Review Comment:
   Eh, thanks for catching the comment leftovers ... There was an 'interim' state when the 'asynchronous' seem NOT to work, but it was all because I've left the default parameter-less constructor in there, and the Annotation Processor ignored lazy attribute completely (I'll fix that in another PR, this time for NB18 ... some warning message from AP)



-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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