"Build Output for " + options.getModuleNames(), 800, 600, true);
// Eager AWT initialization for OS X to ensure safe coexistence with SWT.
BootStrapPlatform.initGui();
final AbstractTreeLogger logger = loggerWindow.getLogger();
logger.setMaxDetail(options.getLogLevel());
final boolean[] success = new boolean[1];
// Compiler will be spawned onto a second thread, UI thread for tree
// logger will remain on the main.
Thread compilerThread = new Thread(new Runnable() {
public void run() {
success[0] = doRun(logger, task);
}
});
compilerThread.setName("GWTCompiler Thread");
compilerThread.start();
loggerWindow.run();
// Even if the tree logger window is closed, we wait for the compiler
// to finish.
waitForThreadToTerminate(compilerThread);
return success[0];
} else {
// Compile tasks without -treeLogger should run headless.
if (System.getProperty("java.awt.headless") == null) {
System.setProperty("java.awt.headless", "true");
}
PrintWriterTreeLogger logger = new PrintWriterTreeLogger();
logger.setMaxDetail(options.getLogLevel());
return doRun(logger, task);
}
}