Changes between Version 19 and Version 20 of DevelopersGuide/DevelopingPlugins


Ignore:
Timestamp:
2007-07-19T14:58:07+02:00 (18 years ago)
Author:
imi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersGuide/DevelopingPlugins

    v19 v20  
    9393{{{
    9494#!java
    95 PluginInformation schostakowitsch = PluginInformation.getLoaded("schostakowitsch");
    96 if (schostakowitsch == null || !"2".equals(schostakowitsch.version)) {
    97   JOptionPane.showMessageDialog(Main.parent, tr("Please install plugin 'schostakowitsch' version 2");
    98   return;
     95class SecondWaltz {
     96
     97  // constructor called by JOSM to initialize the plugin
     98  public SecondWaltz() {
     99    PluginInformation schostakowitsch = PluginInformation.getLoaded("schostakowitsch");
     100    if (schostakowitsch == null || !"2".equals(schostakowitsch.version)) {
     101      JOptionPane.showMessageDialog(Main.parent, tr("Please install plugin 'schostakowitsch' version 2");
     102      return;
     103    }
     104   
     105    // initialize the plugin
     106    ...
     107  }
     108
    99109}
    100110}}}