[hg] main-silver: Issue #232992 - EDT violation in bugzilla

  • From: Tomas Stupka < >
  • To:
  • Subject: [hg] main-silver: Issue #232992 - EDT violation in bugzilla
  • Date: Fri, 02 Aug 2013 10:55:12 -0700

changeset 25cb2688ed48 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/25cb2688ed48
description:
        Issue #232992 - EDT violation in bugzilla

diffstat:

 
bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepositoryController.java
 |  20 +++++-----
 jira/src/org/netbeans/modules/jira/repository/JiraRepositoryController.java  
           |  13 ++++++-
 2 files changed, 22 insertions(+), 11 deletions(-)

diffs (105 lines):

diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepositoryController.java
 
b/bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepositoryController.java
--- 
a/bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepositoryController.java
+++ 
b/bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepositoryController.java
@@ -388,12 +388,22 @@
 
         @Override
         final public void run() {
+            BugzillaUtil.runInAWT(new Runnable() {
+                @Override
+                public void run() {
             preRun();
+                }
+            });
             try {
                 execute();
             } finally {
+                BugzillaUtil.runInAWT(new Runnable() {
+                    @Override
+                    public void run() {                
                 postRun();
             }
+                });
+            }
         }
 
         abstract void execute();
@@ -406,9 +416,6 @@
             panel.cancelButton.addActionListener(this);
             panel.connectionLabel.setVisible(false);
             handle.start();
-            BugzillaUtil.runInAWT(new Runnable() {
-                @Override
-                public void run() {
                     panel.progressPanel.setVisible(true);
                     panel.cancelButton.setVisible(true);
                     panel.validateButton.setVisible(false);
@@ -416,25 +423,18 @@
                     panel.enableFields(false);
                     panel.validateLabel.setText(labelText); // NOI18N
                 }
-            });
-        }
 
         protected void postRun() {
             if(handle != null) {
                 handle.finish();
             }
             panel.cancelButton.removeActionListener(this);
-            BugzillaUtil.runInAWT(new Runnable() {
-                @Override
-                public void run() {            
                     panel.progressPanel.setVisible(false);
                     panel.validateLabel.setVisible(false);
                     panel.validateButton.setVisible(true);
                     panel.cancelButton.setVisible(false);
                     panel.enableFields(true);
                 }
-            });
-        }
 
         @Override
         public boolean cancel() {
diff --git 
a/jira/src/org/netbeans/modules/jira/repository/JiraRepositoryController.java 
b/jira/src/org/netbeans/modules/jira/repository/JiraRepositoryController.java
--- 
a/jira/src/org/netbeans/modules/jira/repository/JiraRepositoryController.java
+++ 
b/jira/src/org/netbeans/modules/jira/repository/JiraRepositoryController.java
@@ -217,6 +217,7 @@
             getHttpPassword());
     }
 
+    @Override
     public void populate() {
         taskRunner = new 
TaskRunner(NbBundle.getMessage(RepositoryPanel.class, "LBL_ReadingRepoData")) 
{  // NOI18N
             @Override
@@ -359,7 +360,7 @@
     private abstract class TaskRunner implements Runnable, Cancellable, 
ActionListener {
         private Task task;
         private ProgressHandle handle;
-        private String labelText;
+        private final String labelText;
 
         public TaskRunner(String labelText) {
             this.labelText = labelText;
@@ -373,12 +374,22 @@
 
         @Override
         final public void run() {
+            JiraUtils.runInAWT(new Runnable() {
+                @Override
+                public void run() {
             preRun();
+                }
+            });
             try {
                 execute();
             } finally {
+                JiraUtils.runInAWT(new Runnable() {
+                    @Override
+                    public void run() {                
                 postRun();
             }
+                });
+            }
         }
 
         abstract void execute();

[hg] main-silver: Issue #232992 - EDT violation in bugzilla

Tomas Stupka 08/02/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close