*/
public void execute() {
stoppingReverseEngineering = false;
// load schemas...
LongRunningTask loadSchemasTask = new LoadSchemasTask(Application
.getFrame(), "Loading Schemas");
loadSchemasTask.startAndWait();
if (stoppingReverseEngineering) {
return;
}
final DbLoaderOptionsDialog dialog = new DbLoaderOptionsDialog(
schemas,
dbUserName,
false);
try {
// since we are not inside EventDisptahcer Thread, must run it via
// SwingUtilities
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
dialog.setVisible(true);
dialog.dispose();
}
});
}
catch (Throwable th) {
processException(th, "Error Reengineering Database");
return;
}
if (dialog.getChoice() == DbLoaderOptionsDialog.CANCEL) {
return;
}
this.schemaName = dialog.getSelectedSchema();
this.tableNamePattern = dialog.getTableNamePattern();
this.loadProcedures = dialog.isLoadingProcedures();
this.meaningfulPk = dialog.isMeaningfulPk();
this.procedureNamePattern = dialog.getProcedureNamePattern();
this.addedObjEntities = new ArrayList<ObjEntity>();
this.loader.setNamingStrategy(dialog.getNamingStrategy());
// load DataMap...
LongRunningTask loadDataMapTask = new LoadDataMapTask(Application
.getFrame(), "Reengineering DB");
loadDataMapTask.startAndWait();
}