public void actionPerformed(ActionEvent e) { if (holder.getPropertyCount() == 0) { UISupport.showErrorMessage("No properties to save!"); return; } File file = UISupport.getFileDialogs().saveAs(this, "Save Properties"); if (file != null) { try { int cnt = TestPropertyUtils.saveTo(holder, file.getAbsolutePath()); UISupport.showInfoMessage( "Saved " + cnt + " propert" + ((cnt == 1) ? "y" : "ies") + " to file"); } catch (IOException e1) { UISupport.showErrorMessage(e1); } } }
public int saveTo(String fileName) throws IOException { return TestPropertyUtils.saveTo(this, fileName); }