public static File[] saveAs(Saveable saveable) {
		if (saveable == null) {
			return new File[0];
		}
		String path = saveable.getPreferredSavePath();
		File result = StdFileDialog.choose(UIUtilities.getComponentForDialog(saveable), false, SAVE_AS, PathUtils.getParent(path), PathUtils.getLeafName(path), saveable.getAllowedExtensions());
		File[] files = result != null ? saveable.saveTo(result) : new File[0];
		for (File file : files) {
			RecentFilesMenu.addRecent(file);
		}
		return files;
	}