Changes between Version 110 and Version 111 of DevelopersGuide/DevelopingPlugins
- Timestamp:
- 2022-01-13T21:23:19+01:00 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevelopersGuide/DevelopingPlugins
v110 v111 185 185 * ''' preference change listener''' \\ 186 186 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 === 189 The 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 191 To avoid collision with core, choose numbers above 10000. 187 192 188 193 === Accessing the local file system ===