[josm-dev] questions about plugin loading

Dirk Stöcker openstreetmap at dstoecker.de
Sun Aug 15 18:59:50 BST 2010


On Sun, 15 Aug 2010, Bodo Meissner wrote:

> I started implementing remote control for WMS.
> The remotecontrol plugin will provide an interface to register new handlers for additional commands and the WMS plugin will use this interface.
> That means when the WMS plugin wants to make calls to the remotecontrol plugin, Josm must already have loaded this plugin.
>
> If there is a guarantee that wmsplugin will always be loaded after remotecontrol, wmsplugin can register its remote control handler in its initialization. Otherwise wmsplugin must know when both wmsplugin and remotecontrol are loaded or when all plugins are loaded.
>
> Is there a way to specify a dependency or a loading order? ("wmsplugin requires remotecontrol" or "if remotecontrol is enabled it must be loaded before wmsplugin")
> Does JOSM call a function of a plugin when all enabled plugins are loaded?

http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins#ThemanifestfileforaJOSMplugin

See Plugin-Requires, Plugin-Stage and Plugin-Early.

Thought you can't use Plugin-Requires, as WMS-plugin should not depend on 
remote-control.

Easiest is probably to use "Plugin-Early" in remote-control.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)




More information about the josm-dev mailing list