see #4421: Mechanism to modify JOSM settings and store files, advanced preferences dialog modifications + JavaScript configuration API + Asynchronous file download task DownloadFileTask + Function to export arbitrary preference keys to file