public void saveFile(){
  DataPanel panel;
  String filename;
  AbstractSaver saver;
  panel=getCurrentPanel();
  if (panel == null) {
    return;
  }
  filename=panel.getFilename();
  if (filename.equals(DataPanel.TAB_INSTANCES)) {
    saveFileAs();
  }
 else {
    saver=ConverterUtils.getSaverForFile(filename);
    try {
      saver.setFile(new File(filename));
      saver.setInstances(panel.getInstances());
      saver.writeBatch();
      panel.setChanged(false);
      setCurrentFilename(filename);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

public void saveFile ( ) { DataPanel panel ; String filename ; AbstractSaver saver ; panel = getCurrentPanel ( ) ; if ( panel == null ) { return ; } filename = panel . getFilename ( ) ; if ( filename . equals ( DataPanel . TAB_INSTANCES ) ) { saveFileAs ( ) ; } else { saver = ConverterUtils . getSaverForFile ( filename ) ; try { saver . setFile ( new File ( filename ) ) ; saver . setInstances ( panel . getInstances ( ) ) ; saver . writeBatch ( ) ; panel . setChanged ( false ) ; setCurrentFilename ( filename ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } }
saves the current data into a file
