(Globals.lang(bes.length > 1 ? "cut entries" : "cut entry"));
// Loop through the array of entries, and delete them.
for (int i=0; i<bes.length; i++) {
database.removeEntry(bes[i].getId());
ensureNotShowing(bes[i]);
ce.addEdit(new UndoableRemoveEntry
(database, bes[i], BasePanel.this));
}
//entryTable.clearSelection();
frame.output(Globals.lang("Cut_pr")+" "+
(bes.length>1 ? bes.length
+" "+ Globals.lang("entries")
: Globals.lang("entry"))+".");
ce.end();
undoManager.addEdit(ce);
markBaseChanged();
// Reselect the entry in the first prev. selected position:
/*if (row0 >= entryTable.getRowCount())
row0 = entryTable.getRowCount()-1;
if (row0 >= 0)
entryTable.addRowSelectionInterval(row0, row0);*/
}
}
});
actions.put("delete", new BaseAction() {
public void action() {
BibtexEntry[] bes = mainTable.getSelectedEntries();
if ((bes != null) && (bes.length > 0)) {
boolean goOn = showDeleteConfirmationDialog(bes.length);
if (!goOn) {
return;
}
else {
// Create a CompoundEdit to make the action undoable.
NamedCompound ce = new NamedCompound
(Globals.lang(bes.length > 1 ? "delete entries" : "delete entry"));
// Loop through the array of entries, and delete them.
for (int i = 0; i < bes.length; i++) {
database.removeEntry(bes[i].getId());
ensureNotShowing(bes[i]);
ce.addEdit(new UndoableRemoveEntry(database, bes[i], BasePanel.this));
}
markBaseChanged();
frame.output(Globals.lang("Deleted") + " " +
(bes.length > 1 ? bes.length
+ " " + Globals.lang("entries")