import static net.argius.stew.ui.window.AnyActionKey.refresh;
import static net.argius.stew.ui.window.DatabaseInfoTree.ActionKey.*;
import static net.argius.stew.ui.window.WindowOutputProcessor.showInformationMessageDialog;
-
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import java.util.Map.Entry;
import java.util.List;
-
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;
-
import net.argius.stew.*;
/**
@Override
public void anyActionPerformed(AnyActionEvent ev) {
log.atEnter("anyActionPerformed", ev);
- if (ev.isAnyOf(copySimpleName)) {
+ if (ev.isAnyOf(copy)) {
+ final String cmd = ev.getActionCommand();
+ Action action = getActionMap().get(cmd);
+ if (action != null) {
+ action.actionPerformed(new ActionEvent(this, 1001, cmd));
+ }
+ } else if (ev.isAnyOf(copySimpleName)) {
copySimpleName();
} else if (ev.isAnyOf(copyFullName)) {
copyFullName();
++c;
}
}
- if (c >= 2) {
- return String.format("%s;%s", phrase, join(",", nCopies(c, "")));
+ if (c >= 1) {
+ return String.format("%s;%s", phrase, join("", nCopies(c - 1, ",")));
}
return phrase;
}
}
});
} catch (SQLException ex) {
+ try {
+ if (dbmeta.getConnection().isClosed())
+ return;
+ } catch (SQLException exx) {
+ ex.setNextException(exx);
+ }
throw new RuntimeException(ex);
}
}