public void open(File file,AbstractFileLoader loader){
  Instances data;
  try {
    log(null,"Loading: " + file);
    loader.setFile(file);
    data=loader.getDataSet();
    MLUtils.fixRelationName(data);
    log(null,"Loaded successfully: " + file);
  }
 catch (  Exception e) {
    handleException(null,"Failed to load data from '" + file + "':",e);
    JOptionPane.showMessageDialog(this,"Failed to load dataset from '" + file + "':\n"+ e,"Error loading",JOptionPane.ERROR_MESSAGE);
    return;
  }
  try {
    addUndoPoint();
    MLUtils.prepareData(data);
    m_CurrentFile=file;
    notifyTabsDataChanged(null,data);
    m_RecentFilesHandler.addRecentItem(new RecentFilesHandlerWithCommandline.Setup(file,loader));
  }
 catch (  Exception e) {
    handleException(null,"Failed to prepare data from '" + file + "':",e);
    JOptionPane.showMessageDialog(this,"Failed to load prepare data from '" + file + "':\n"+ e,"Error loading",JOptionPane.ERROR_MESSAGE);
    return;
  }
  updateMenu();
}

public void open ( File file , AbstractFileLoader loader ) { Instances data ; try { log ( null , "Loading: " + file ) ; loader . setFile ( file ) ; data = loader . getDataSet ( ) ; MLUtils . fixRelationName ( data ) ; log ( null , "Loaded successfully: " + file ) ; } catch ( Exception e ) { handleException ( null , "Failed to load data from '" + file + "':" , e ) ; JOptionPane . showMessageDialog ( this , "Failed to load dataset from '" + file + "':\n" + e , "Error loading" , JOptionPane . ERROR_MESSAGE ) ; return ; } try { addUndoPoint ( ) ; MLUtils . prepareData ( data ) ; m_CurrentFile = file ; notifyTabsDataChanged ( null , data ) ; m_RecentFilesHandler . addRecentItem ( new RecentFilesHandlerWithCommandline . Setup ( file , loader ) ) ; } catch ( Exception e ) { handleException ( null , "Failed to prepare data from '" + file + "':" , e ) ; JOptionPane . showMessageDialog ( this , "Failed to load prepare data from '" + file + "':\n" + e , "Error loading" , JOptionPane . ERROR_MESSAGE ) ; return ; } updateMenu ( ) ; }
opens the specified file .
