Changes between Version 53 and Version 54 of DevelopersGuide/DevelopingPlugins
- Timestamp:
- 2011-12-20T12:48:31+01:00 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevelopersGuide/DevelopingPlugins
v53 v54 37 37 === A POJO as entry point === 38 38 39 The entry point for a JOSM plugin, the '''plugin main class''' is a Plain Old Java Object (POJO) which provides a constructor with one parameter of type [source:/trunk/src/org/openstreetmap/josm/plugin/PluginInformation.java PluginInformation]. 39 The entry point for a JOSM plugin, the '''plugin main class''' is a Plain Old Java Object (POJO) which provides a constructor with one parameter of type [source:/trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java PluginInformation]. 40 40 41 {{{ 41 42 #!java … … 53 54 }}} 54 55 55 You don't have to derive the plugin main class from a common superclass but currently you are '''recommended''' to derive it from [source:/trunk/src/org/openstreetmap/josm/plugin/Plugin.java org.openstreetmap.josm.plugin.Plugin]. 56 You don't have to derive the plugin main class from a common superclass but currently you are '''recommended''' to derive it from [source:/trunk/src/org/openstreetmap/josm/plugins/Plugin.java org.openstreetmap.josm.plugin.Plugin]. 56 57 57 58 {{{ … … 74 75 }}} 75 76 76 For legacy reasons, JOSM currently also allowsPOJOs with a no-arg constructor as plugin main classes. This approach is '''deprecated''' andwill bedisabled in Q2/2010. New plugins should provide a constructor with one parameter of type [source:/trunk/src/org/openstreetmap/josm/plugin/PluginInformation.java PluginInformation].77 For legacy reasons, JOSM (may) currently also allow POJOs with a no-arg constructor as plugin main classes. This approach is '''deprecated''' and may have been disabled in Q2/2010. (''TODO was it disabled?'') New plugins should provide a constructor with one parameter of type [source:/trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java PluginInformation]. 77 78 78 79 === Naming the plugin ===