提交 5037695b 编写于 作者: S Serge Rider

#7501 Update datasource information on task objects change


Former-commit-id: 1ce76b91
上级 a5ad5e3c
......@@ -174,6 +174,7 @@ public class MySQLExportSettings extends AbstractImportExportSettings<DBSObject>
for (Map.Entry<MySQLCatalog, List<MySQLTableBase>> entry : objMap.entrySet()) {
getExportObjects().add(new MySQLDatabaseExportInfo(entry.getKey(), entry.getValue()));
}
updateDataSourceContainer();
}
@Override
......
......@@ -140,6 +140,8 @@ public class PostgreDatabaseBackupSettings extends PostgreBackupRestoreSettings
}
}
getExportObjects().addAll(objMap.values());
updateDataSourceContainer();
}
@Override
......
......@@ -55,6 +55,13 @@ public abstract class AbstractToolSettings<BASE_OBJECT extends DBSObject> {
this.dataSourceContainer = dataSourceContainer;
}
protected void updateDataSourceContainer() {
if (databaseObjects.isEmpty()) {
dataSourceContainer = null;
} else {
dataSourceContainer = databaseObjects.get(0).getDataSource().getContainer();
}
}
public void loadSettings(DBRRunnableContext runnableContext, DBPPreferenceStore preferenceStore) {
if (dataSourceContainer == null && !CommonUtils.isEmpty(databaseObjects)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册