This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 21433
Collapse All | Expand All

(-)ui/WizardFolder.java (+36 lines)
Line 31 Link Here
31
import org.openide.util.Task;
Line 125 Link Here
126
    }
127
128
    /** Ovverrides task creation policy to run tasks always in AWT thread, as
129
     * wizards usually work with swing
130
     */
131
    protected Task postCreationTask (Runnable run) {
132
        return new AWTTask(run);
133
    }
134
    
135
    /** A special task designed to run in AWT thread.
136
     * It will fire itself immediatelly.
137
     * Copied from openide.awt.AWTTask
138
     */
139
    private static class AWTTask extends org.openide.util.Task {
140
        private boolean executed;
141
142
        public AWTTask (Runnable r) {
143
            super (r);
144
            org.openide.util.Mutex.EVENT.readAccess (this);
145
        }
146
147
        public void run () {
148
            if (!executed) {
149
                super.run ();
150
                executed = true;
151
            }
152
        }
153
154
        public void waitFinished () {
155
            if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
156
                run ();
157
            } else {
158
                super.waitFinished ();
159
            }
160
        }
(-)windows/WindowManagerImpl.java (+5 lines)
Line 1272 Link Here
1272
                // don't reset anything if no worspaces are loaded (first start for example)
1273
                if (wmi.getWorkspacesNoLoad().length == 0) {
1274
                    setProjectOpen (true);
1275
                    return;
1276
                }

Return to bug 21433