use of org.apache.cayenne.modeler.dialog.db.merge.MergerOptions in project cayenne by apache.
the class MigrateAction method performAction.
public void performAction(ActionEvent e) {
DataSourceWizard connectWizard = dataSourceWizardDialog("Migrate DB Schema: Connect to Database");
if (connectWizard == null) {
return;
}
DataMap map = getProjectController().getCurrentDataMap();
if (map == null) {
throw new IllegalStateException("No current DataMap selected.");
}
dialogShown = false;
DbActionOptionsDialog optionsDialog = loaderOptionDialog(connectWizard);
if (dialogShown && optionsDialog == null) {
return;
}
String selectedCatalog = optionsDialog == null ? null : optionsDialog.getSelectedCatalog();
String selectedSchema = optionsDialog == null ? null : optionsDialog.getSelectedSchema();
MergerTokenFactoryProvider mergerTokenFactoryProvider = getApplication().getInjector().getInstance(MergerTokenFactoryProvider.class);
// ... show dialog...
new MergerOptions(getProjectController(), "Migrate DB Schema: Options", connectWizard.getConnectionInfo(), map, selectedCatalog, selectedSchema, mergerTokenFactoryProvider).startupAction();
}
Aggregations