private void runCommandOnSelectedFile(String command) {
// If a table cell is being edited, we must cancel the editing before
// deleting the row
if (table.isEditing()) {
TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
cellEditor.cancelCellEditing();
}
int rowSelected = table.getSelectedRow();
if (rowSelected >= 0) {
runCommandOnRow(command, rowSelected);
tableModel.fireTableDataChanged();