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


##########
ide/db/src/org/netbeans/modules/db/explorer/action/ConnectAction.java:
##########
@@ -161,10 +162,18 @@ public void exceptionOccurred(Exception exc) {
 
         private static HelpCtx CONNECT_ACTION_HELPCTX = new 
HelpCtx(ConnectAction.class);
 
+        /*
         public void showDialog(final ConnectionNode model, boolean showDialog) 
{
             DatabaseConnection dbcon = 
model.getLookup().lookup(DatabaseConnection.class);
-            showDialog(dbcon, showDialog);
+            // in headless mode EDT makes no sense; but we should not block 
the main thread.
+            // in EDT, the nested dialog will make a nested event loop, so OK.
+            if (GraphicsEnvironment.isHeadless()) {
+                RequestProcessor.getDefault().post(() -> showDialog(dbcon, 
showDialog));
+            } else {
+                showDialog(dbcon, showDialog);
+            }
         }
+        */

Review Comment:
   Addressed in 73d57201fd3c



-- 
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-unsubscr...@netbeans.apache.org

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


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

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

Reply via email to