keep meta data tree up to date.

This commit is contained in:
Wisser
2018-10-10 13:51:37 +02:00
parent 7d46adae18
commit cd4d94c5fd
2 changed files with 14 additions and 2 deletions
@@ -473,7 +473,7 @@ public class StringSearchPanel extends javax.swing.JPanel {
public void run() {
cancelLoading.set(false);
for (MDSchema schema: toLoad) {
schema.loadTables(false);
schema.loadTables(false, null);
setCheckboxState(checkboxPerSchema.get(schema), schema, true, false);
while (!schema.isLoaded() && !cancelLoading.get()) {
try {
@@ -3277,7 +3277,19 @@ public class DataBrowser extends javax.swing.JFrame {
final MDSchema defaultSchema = metaDataSource.getDefaultSchema();
if (defaultSchema != null) {
// tigger reading meta data asynchronously
defaultSchema.loadTables(true);
defaultSchema.loadTables(true, new Runnable() {
@Override
public void run() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (metaDataPanel != null) {
metaDataPanel.refresh();
}
}
});
}
});
}
metaDataPanel = null;
}