[hg] main-silver: #229741: DerbyActivator.activate() shouldn't b...

  • From: Jaroslav Havlin < >
  • To:
  • Subject: [hg] main-silver: #229741: DerbyActivator.activate() shouldn't b...
  • Date: Fri, 26 Jul 2013 06:33:36 -0700

changeset 2e9fef4526e9 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/2e9fef4526e9
description:
        #229741: DerbyActivator.activate() shouldn't be invoked in EDT

diffstat:

 derby/src/org/netbeans/modules/derby/RegisterDerby.java |  12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diffs (38 lines):

diff --git a/derby/src/org/netbeans/modules/derby/RegisterDerby.java 
b/derby/src/org/netbeans/modules/derby/RegisterDerby.java
--- a/derby/src/org/netbeans/modules/derby/RegisterDerby.java
+++ b/derby/src/org/netbeans/modules/derby/RegisterDerby.java
@@ -44,6 +44,7 @@
 
 package org.netbeans.modules.derby;
 
+import java.awt.EventQueue;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -57,6 +58,7 @@
 import org.netbeans.api.db.explorer.JDBCDriverManager;
 import org.netbeans.api.progress.ProgressHandle;
 import org.netbeans.api.progress.ProgressHandleFactory;
+import org.netbeans.api.progress.ProgressUtils;
 import org.netbeans.modules.derby.api.DerbyDatabases;
 import org.netbeans.spi.db.explorer.DatabaseRuntime;
 import org.openide.DialogDisplayer;
@@ -98,8 +100,18 @@
     public static synchronized RegisterDerby getDefault(){
         if (reg==null) {
             reg= new RegisterDerby();
+            if (EventQueue.isDispatchThread()) { // #229741
+                RequestProcessor.getDefault().post(new Runnable() {
+
+                    @Override
+                    public void run() {
             DerbyActivator.activate();
         }
+                });
+            } else {
+                DerbyActivator.activate();
+            }
+        }
         return reg;
     }
     

[hg] main-silver: #229741: DerbyActivator.activate() shouldn't b...

Jaroslav Havlin 07/26/2013

Project Features

About this Project

DB was started in November 2009, is owned by Antonin Nebuzelsky, and has 113 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close