public void performAction(ActionEvent e) {
DBConnectionInfo nodeInfo = preferredDataSource();
String nodeKey = preferredDataSourceLabel(nodeInfo);
DataSourceWizard connectWizard = new DataSourceWizard(
getProjectController(),
"Generate DB Schema: Connect to Database",
nodeKey,
nodeInfo);
if (!connectWizard.startupAction()) {
// canceled
return;
}
DataMap map = getProjectController().getCurrentDataMap();
// sanity check
if (map == null) {
throw new IllegalStateException("No current DataMap selected.");
}
// ... show dialog...
new DBGeneratorOptions(
getProjectController(),
"Generate DB Schema: Options",
connectWizard.getConnectionInfo(),
map).startupAction();
}