setInstancesFromFile(ConverterUtils.getLoaderForFile(m_tempUndoFiles[m_tempUndoIndex]));
AbstractFileLoader loader = ConverterUtils.getLoaderForFile(m_tempUndoFiles[m_tempUndoIndex]); try { loader.setFile(m_tempUndoFiles[m_tempUndoIndex]); setInstancesFromFile(loader); } catch (Exception e) { e.printStackTrace(); m_Log.logMessage(e.toString()); JOptionPane.showMessageDialog(PreprocessPanel.this, "Cannot perform undo operation!\n" + e.toString(), "Undo", JOptionPane.ERROR_MESSAGE); }
  public void undo() {    if (--m_tempUndoIndex < 0) {      // wrap pointer around      m_tempUndoIndex = m_tempUndoFiles.length-1;    }        if (m_tempUndoFiles[m_tempUndoIndex] != null) {      // load instances from the temporary file      setInstancesFromFile(ConverterUtils.getLoaderForFile(m_tempUndoFiles[m_tempUndoIndex]));      // update undo file list      m_tempUndoFiles[m_tempUndoIndex] = null;    }        // update undo button    int temp = m_tempUndoIndex-1;    if (temp < 0) {      temp = m_tempUndoFiles.length-1;    }    m_UndoBut.setEnabled(m_tempUndoFiles[temp] != null);  }