Changes between Version 110 and Version 111 of DevelopersGuide/DevelopingPlugins


Ignore:
Timestamp:
2022-01-13T21:23:19+01:00 (2 years ago)
Author:
gaben
Comment:

note about validator plugin test identification codes, see #21423

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersGuide/DevelopingPlugins

    v110 v111  
    185185 * ''' preference change listener''' \\
    186186 If your plugin needs to respond to general changes in the JOSM preferences it can implement a [source:/trunk/src/org/openstreetmap/josm/data/Preferences.java org.openstreetmap.josm.data.Preferences.PreferenceChangedListener]. Invoke {{{addPreferenceChangedListener(PreferenceChangedListener listener)}}} on {{{Main.pref}}}. You are encouraged to use a property object like [source:/trunk/src/org/openstreetmap/josm/data/preferences/IntegerProperty.java IntegerProperty] to access preferences. You can register a listener to that single preference there.
     187
     188=== Validator plugins ===
     189The core validator uses numbers for individual test identification. The reserved ranges documented in the [source:trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java OsmValidator.java] file, but validator plugins also can have one.
     190
     191To avoid collision with core, choose numbers above 10000.
    187192
    188193=== Accessing the local file system ===