Plugins: deprecated API to be removed

Paul Hartmann phaaurlt at
Thu Oct 19 13:22:19 UTC 2017

Dear plugin developers,

Recently we have started an effort to make the JOSM source code more 
modular. [1] This requires a lot of refactoring and many of the original 
methods and classes have been deprecated. The work is not finished by 
any means, but we would like to make a cut and remove currently 
deprecated API at the end of 2017. [2]

Please update any plugins that you are maintaining! The majority of 
fixes should be not more than replacing one method by another, as 
indicated in the deprecation JavaDoc comment.

Some notable API changes:
* So far, plugins place all their files in one directory, namely 
Plugin.getPluginDir(). Now there are separate directories for plugin 
user data, preferences, and cache. (The old directory is the same as the 
new plugin user data directory.) Among other things, this allows backup 
processes to ignore possibly large amounts of non-essential data 
(cache). [3]
* The preference interface has been reworked: The field Main.pref is not 
technically deprecated yet, but should be replaced by Config.getPref(). 
The new interface is more restrictive, but sufficient for getting and 
setting preference values.

As most plugin developers are aware, the plugin "Mainversion" needs to 
be updated whenever older versions of JOSM will become incompatible with 
the updated plugin binary (as is usually the case for deprecation 
fixes). [4]

[1] (Standalone JOSM validator), (modular structure for JOSM core)
[2] (The Great Deprecation 
[3] (Store cache data of 
plugins in cache location)


More information about the josm-dev mailing list