[josm-dev] Hooking into shutdown process

Toby Murray toby.murray at gmail.com
Tue Jul 22 01:25:31 UTC 2014


Is there something I am overlooking that would let plugins hook into the
JOSM shutdown process?

In the notes plugin, I would like to prompt for upload if JOSM is closed
with un-uploaded note actions in the queue. JOSM handles this in
Main.saveUnsavedModifications where it cycles through all layers and checks
if they have unsaved/unuploaded changes - but only if the layer is an
instance of OsmDataLayer.

Since the notes plugin layer only extends Layer, it is ignored. I might be
able to turn the notes layer into an instance of OsmDataLayer but this
doesn't seem very clean at the moment. In the future, if notes can be
integrated more into josm-core this might not be an issue I suppose.

Toby


More information about the josm-dev mailing list