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.
import org.openide.util.Task;
}
/** Ovverrides task creation policy to run tasks always in AWT thread, as
* wizards usually work with swing
*/
protected Task postCreationTask (Runnable run) {
return new AWTTask(run);
/** A special task designed to run in AWT thread.
* It will fire itself immediatelly.
* Copied from openide.awt.AWTTask
private static class AWTTask extends org.openide.util.Task {
private boolean executed;
public AWTTask (Runnable r) {
super (r);
org.openide.util.Mutex.EVENT.readAccess (this);
public void run () {
if (!executed) {
super.run ();
executed = true;
public void waitFinished () {
if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
run ();
} else {
super.waitFinished ();
// don't reset anything if no worspaces are loaded (first start for example)
if (wmi.getWorkspacesNoLoad().length == 0) {
setProjectOpen (true);
return;