[josm-dev] Two patches for the Validator plugin

Dirk Stöcker openstreetmap at dstoecker.de
Sat Oct 10 21:35:37 BST 2009


On Sat, 10 Oct 2009, MP wrote:

> Only things that would need to be resolved for that would be enforcing
> plugin dependencies (that could be done at runtime in worst case) and
> allowing plugins to interact with each other, so the new check could
> add itself in validator. Something like:
>
> Validator v=(Validator)Main.getPlugin("validator");
> if (v=null) error("validator required");
> if (v.getVersion()<12345) error("too old validator version");
> v.addCheck(VerySpecialCheck.class);
> v.addCheck(AnotherSpecialCheck.class);
>
> Perhaps the dependency checking could be done in plugin manifest:
>
> Plugin-name: validator-extra-check
> Depends: validator>=12345
>
> What is the oppinion on this?

We already have a way for Plugin dependencies (e.g. surveyor uses this):
<attribute name="Plugin-Requires" value="livegps"/>

The version test does not yet exist, but could be added when required.

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





More information about the josm-dev mailing list