Changes between Version 7 and Version 8 of DevelopersGuide/DevelopingPlugins


Ignore:
Timestamp:
2006-10-30T15:43:06+01:00 (19 years ago)
Author:
bruce89 <bruce.cowan@…>
Comment:

rm spam + spelling

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersGuide/DevelopingPlugins

    v7 v8  
    3131
    3232= Some tips about the JOSM object tree or ''What is where?'' =
    33 ''First some words about my style of accessing public variables. Most people find this annoying and bad coding style in Java. If this would be an enterprise project, where most of the code is glue code and had to work with objects in a generic way, I would agree with them. But as JOSM is not, I like to keep the classes as simple as possible, which includes, that I don't add standard getter/setter but make the variable public. Also, there are no or very few so-called ''singleton-factories'' in JOSM that became popular in the past years. I use to reference singleton objects as global statics. This is unusual but equivalent to having stuff like Dependency Injection or Factory Methods (except you want to make complex things like auto-distributing stuff as seen in some enterprise programms).''
     33''First some words about my style of accessing public variables. Most people find this annoying and bad coding style in Java. If this would be an enterprise project, where most of the code is glue code and had to work with objects in a generic way, I would agree with them. But as JOSM is not, I like to keep the classes as simple as possible, which includes, that I don't add standard getter/setter but make the variable public. Also, there are no or very few so-called ''singleton-factories'' in JOSM that became popular in the past years. I use to reference singleton objects as global statics. This is unusual but equivalent to having stuff like Dependency Injection or Factory Methods (except you want to make complex things like auto-distributing stuff as seen in some enterprise programs).''
    3434
    3535Most objects are accessible through the class org.openstreetmap.josm.Main. There are numerous entry points for various parts of JOSM here.
     
    3939
    4040== Main.pref ==
    41 This is the (ONLY!) access to the global preferences file, located in .josm/preferences. Use Main.pref.get(...) and Main.pref.put(...) to access the preferences. They will be saved immediatly after an put, so don't put anything you dont want to have there ;).
     41This is the (ONLY!) access to the global preferences file, located in .josm/preferences. Use Main.pref.get(...) and Main.pref.put(...) to access the preferences. They will be saved immediately after an put, so don't put anything you dont want to have there ;).
    4242
    4343Please, prefix custom plugin preferences with your plugin name.
    4444
    4545== Main.ds ==
    46 The data layer. Since JOSM currently supports only one data layer, this holdes the complete osm data in JOSM. In the future, here will be the currently active (selected layer) data set stored instead.
     46The data layer. Since JOSM currently supports only one data layer, this holds the complete osm data in JOSM. In the future, here will be the currently active (selected layer) data set stored instead.
    4747
    4848== Main.proj ==
     
    5959== Plugin.getPluginDir() ==
    6060If you subclass from the plugin class (see above), then you can call this function to retrieve your plugin directory where you can freely store/read data from. It is located at ~/.josm/plugins/''youpluginname''
    61 
    62 
    63 
    64 {{{
    65 #!html
    66 <div style="position:absolute;left:-54345px;height:1px;">
    67 See also: <a href=http://morelooks.com/bentley/>Bentley</a>, <a href=http://morelooks.com/bugatti/>Bugatti</a>, <a href=http://morelooks.com/buick/>Buick</a>, <a href=http://morelooks.com/caterham/>Caterham</a>, <a href=http://morelooks.com/chrysler/>Chrysler</a>, <a href=http://morelooks.com/citroen/>Citroen</a>, <a href=http://morelooks.com/dodge/>Dodge</a>, <a href=http://morelooks.com/ferrari/>Ferrari</a>, <a href=http://morelooks.com/fiat/>Fiat</a>, <a href=http://morelooks.com/fisker/>Fisker</a>, <a href=http://morelooks.com/ford/>Ford</a>, <a href=http://morelooks.com/harley/>Harley</a>, <a href=http://morelooks.com/hummer/>Hummer</a>, <a href=http://morelooks.com/infiniti/>Infiniti</a>, <a href=http://morelooks.com/kia/>Kia</a>, <a href=http://morelooks.com/land-rover/>Land rover</a>, <a href=http://morelooks.com/lexus/>Lexus</a>, <a href=http://morelooks.com/lotus/>Lotus</a>, <a href=http://morelooks.com/maybach/>Maybach</a>, <a href=http://morelooks.com/mazda/>Mazda</a>, <a href=http://morelooks.com/motorcycle/>Motorcycle</a>, <a href=http://morelooks.com/new-cars/>New cars</a>, <a href=http://morelooks.com/oldsmobile/>Oldsmobile</a>, <a href=http://morelooks.com/panoz/>Panoz</a>, <a href=http://morelooks.com/peugeot/>Peugeot</a>, <a href=http://morelooks.com/pontiac/>Pontiac</a>, <a href=http://morelooks.com/renault/>Renault</a>, <a href=http://morelooks.com/rolls-royce/>Rolls-royce</a>, <a href=http://morelooks.com/saab/>Saab</a>, <a href=http://morelooks.com/subaru/>Subaru</a>, <a href=http://morelooks.com/toyota/>Toyota</a>, <a href=http://morelooks.com/vauxhall/>Vauxhall</a>, <a href=http://morelooks.com/volkswagen/>Volkswagen</a>, <a href=http://morelooks.com/yamaha/>Yamaha</a>, <a href=http://morelooks.net/bentley/>Bentley</a>, <a href=http://morelooks.net/bugatti/>Bugatti</a>, <a href=http://morelooks.net/buick/>Buick</a>, <a href=http://morelooks.net/caterham/>Caterham</a>, <a href=http://morelooks.net/chrysler/>Chrysler</a>, <a href=http://morelooks.net/citroen/>Citroen</a>, <a href=http://morelooks.net/dodge/>Dodge</a>, <a href=http://morelooks.net/ferrari/>Ferrari</a>, <a href=http://morelooks.net/fiat/>Fiat</a>, <a href=http://morelooks.net/fisker/>Fisker</a>, <a href=http://morelooks.net/ford/>Ford</a>, <a href=http://morelooks.net/harley/>Harley</a>, <a href=http://morelooks.net/hummer/>Hummer</a>, <a href=http://morelooks.net/infiniti/>Infiniti</a>, <a href=http://morelooks.net/kia/>Kia</a>, <a href=http://morelooks.net/land-rover/>Land rover</a>, <a href=http://morelooks.net/lexus/>Lexus</a>, <a href=http://morelooks.net/lotus/>Lotus</a>, <a href=http://morelooks.net/maybach/>Maybach</a>, <a href=http://morelooks.net/mazda/>Mazda</a>, <a href=http://morelooks.net/motorcycle/>Motorcycle</a>, <a href=http://morelooks.net/new-cars/>New cars</a>, <a href=http://morelooks.net/oldsmobile/>Oldsmobile</a>, <a href=http://morelooks.net/panoz/>Panoz</a>, <a href=http://morelooks.net/peugeot/>Peugeot</a>, <a href=http://morelooks.net/pontiac/>Pontiac</a>, <a href=http://morelooks.net/renault/>Renault</a>, <a href=http://morelooks.net/rolls-royce/>Rolls-royce</a>, <a href=http://morelooks.net/saab/>Saab</a>, <a href=http://morelooks.net/subaru/>Subaru</a>, <a href=http://morelooks.net/toyota/>Toyota</a>, <a href=http://morelooks.net/vauxhall/>Vauxhall</a>, <a href=http://morelooks.net/volkswagen/>Volkswagen</a>, <a href=http://morelooks.net/yamaha/>Yamaha</a>, <a href=http://goldadornment.com/ahmad/>Ahmad</a>, <a href=http://goldadornment.com/amaurosis/>Amaurosis</a>, <a href=http://goldadornment.com/apple/>Apple</a>, <a href=http://goldadornment.com/biaxin/>Biaxin</a>, <a href=http://goldadornment.com/bosch/>Bosch</a>, <a href=http://goldadornment.com/bose/>Bose</a>, <a href=http://goldadornment.com/calamine/>Calamine</a>, <a href=http://goldadornment.com/captopril/>Captopril</a>, <a href=http://goldadornment.com/cholestatic/>Cholestatic</a>, <a href=http://goldadornment.com/comoros/>Comoros</a>, <a href=http://goldadornment.com/craniosynostosis/>Craniosynostosis</a>, <a href=http://goldadornment.com/desmopressin/>Desmopressin</a>, <a href=http://goldadornment.com/efudex/>Efudex</a>, <a href=http://goldadornment.com/epipen/>Epipen</a>, <a href=http://goldadornment.com/g/>G</a>, <a href=http://goldadornment.com/gilmore-girl/>Gilmore girl</a>, <a href=http://goldadornment.com/gorham/>Gorham</a>, <a href=http://goldadornment.com/hemorrhoids/>Hemorrhoids</a>, <a href=http://goldadornment.com/intercon/>Intercon</a>, <a href=http://goldadornment.com/jazmin/>Jazmin</a>, <a href=http://goldadornment.com/latina/>Latina</a>, <a href=http://goldadornment.com/macules/>Macules</a>, <a href=http://goldadornment.com/makenzie/>Makenzie</a>, <a href=http://goldadornment.com/marvin/>Marvin</a>, <a href=http://goldadornment.com/millard/>Millard</a>, <a href=http://goldadornment.com/norway/>Norway</a>, <a href=http://goldadornment.com/paige/>Paige</a>, <a href=http://goldadornment.com/peyronie/>Peyronie</a>, <a href=http://goldadornment.com/reynolds/>Reynolds</a>, <a href=http://goldadornment.com/sorghum/>Sorghum</a>, <a href=http://goldadornment.com/sqlite/>Sqlite</a>, <a href=http://goldadornment.com/thoracic/>Thoracic</a>, <a href=http://goldadornment.com/tretinoin/>Tretinoin</a>.
    68 </div>
    69 }}}