[hg] main-silver: #241958 - StackOverflowError at javax.swing.So...

  • From: Ralph Benjamin Ruijs < >
  • To: ,
  • Subject: [hg] main-silver: #241958 - StackOverflowError at javax.swing.So...
  • Date: Thu, 03 Apr 2014 22:22:27 +0000

changeset 19703d3f80d4 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/19703d3f80d4
description:
        #241958 - StackOverflowError at 
javax.swing.SortingFocusTraversalPolicy.enumerateCycle

diffstat:

 
refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java
          |  30 ++++++---
 
refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanelContainer.java
 |   2 +-
 2 files changed, 21 insertions(+), 11 deletions(-)

diffs (77 lines):

diff --git 
a/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java
 
b/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java
--- 
a/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java
+++ 
b/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java
@@ -545,7 +545,7 @@
             return;
             }
         }
-        disableComponents(RefactoringPanel.this);
+        disableComponents();
         progressListener = new ProgressL();
         RP.post(new Runnable() {
             @Override
@@ -1052,17 +1052,25 @@
     }
 
     // disables all components in a given container
-    private static void disableComponents(Container c) {
-        checkEventThread();
-        Component children[] = c.getComponents();
-        for (int i = 0; i < children.length; i++) {
-            if (children[i].isEnabled()) {
-                children[i].setEnabled(false);
+    private void disableComponent(JComponent jc) {
+        if(jc != null) {
+            jc.setEnabled(false);
             }
-            if (children[i] instanceof Container) {
-                disableComponents((Container) children[i]);
             }
-        }
+        
+    private void disableComponents() {
+        disableComponent(cancelButton);
+        disableComponent(expandButton);
+        disableComponent(filterBar);
+        disableComponent(logicalViewButton);
+        disableComponent(nextMatch);
+        disableComponent(physicalViewButton);
+        disableComponent(prevMatch);
+        disableComponent(refactorButton);
+        disableComponent(refreshButton);
+        disableComponent(rerunButton);
+        disableComponent(stopButton);
+        disableComponent(tree);
     }
     
     void selectNextUsage() {
@@ -1175,9 +1183,11 @@
     
////////////////////////////////////////////////////////////////////////////
 
     private void stopSearch() {
+        if(isVisible) {
         stopButton.setEnabled(false);
         stopButton.setVisible(false);
         refreshButton.setVisible(true);
+        }
         cancelRequest.set(true);
         ui.getRefactoring().cancelRequest();
     }
diff --git 
a/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanelContainer.java
 
b/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanelContainer.java
--- 
a/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanelContainer.java
+++ 
b/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanelContainer.java
@@ -158,13 +158,13 @@
                 remove(tabs);
                 add(c, BorderLayout.CENTER);
             }
+            validate();
         } else {
             if (comp != null)
                 remove(comp);
             isVisible = false;
             close();
         }
-        validate();
     }
     
     void closeAllButCurrent() {

[hg] main-silver: #241958 - StackOverflowError at javax.swing.So...

Ralph Benjamin Ruijs 04/03/2014

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 185 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20150226.965aeb8). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close