final MessageDialog messageDialog = new MessageDialog();
messageDialog.setTitle("SQL Execution Output");
messageDialog.setLocationRelativeTo(_session.getApplication().getMainFrame());
final VacuumDatabaseSQLExecuterHandler handler = new VacuumDatabaseSQLExecuterHandler(_session, messageDialog, i18n.PROGRESS_DIALOG_TITLE, i18n.COMMAND_PREFIX);
final SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler);
executer.setSchemaCheck(false);
_session.getApplication().getThreadPool().addTask(new Runnable() {
public void run() {
GUIUtils.processOnSwingEventThread(new Runnable() {
public void run() {
_mainDialog.setVisible(false);
messageDialog.setVisible(true);
}
});
executer.run();
}
});
}