SwingUtilities.invokeLater(new Runnable() { public void run() { closeDialog(new WindowEvent(RunAnalysisDialog.this, WindowEvent.WINDOW_CLOSING)); } }); } }; }
final FindBugsProgress progress = new RunAnalysisProgress(); final ConsoleLogger logger = ((FindBugsFrame) parent).getLogger();   this.analysisThread = new Thread() { public void run() { try { analysisRun.execute(progress); setCompleted(true); } catch (java.io.IOException e) { setException(e); } catch (InterruptedException e) {    } catch (Exception e) { setException(e); }    SwingUtilities.invokeLater(new Runnable() { public void run() { closeDialog(new WindowEvent(RunAnalysisDialog.this, WindowEvent.WINDOW_CLOSING)); } }); } }; }
    public RunAnalysisDialog(java.awt.Frame parent, AnalysisRun analysisRun_) {        super(parent, true);        initComponents();        this.analysisRun = analysisRun_;        this.completed = false;                // Create a progress callback to give the user feedback        // about how far along we are.        final FindBugsProgress progress = new RunAnalysisProgress();        final ConsoleLogger logger = ((FindBugsFrame)parent).getLogger();                // This is the thread that will actually run the analysis.        this.analysisThread = new Thread() {            public void run() {                try {                    analysisRun.execute(progress);                    setCompleted(true);                } catch (java.io.IOException e) {		    setException(e);                } catch (InterruptedException e) {                    // We don't need to do anything here.                    // The completed flag is not set, so the frame                    // will know that the analysis did not complete.                } catch (Exception e) {		    setException(e);		}                // Send a message to the dialog that it should close                // That way, it goes away without any need for user intervention                SwingUtilities.invokeLater(new Runnable() {                    public void run() {                        closeDialog(new WindowEvent(RunAnalysisDialog.this, WindowEvent.WINDOW_CLOSING));                    }                });            }        };    }