Changeset 13332 in osm for applications/editors/josm/plugins/surveyor/src
- Timestamp:
- 2009-01-23T22:36:04+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorPlugin.java
r12778 r13332 22 22 import org.openstreetmap.josm.Main; 23 23 import org.openstreetmap.josm.gui.MainMenu; 24 import org.openstreetmap.josm.plugins.Plugin Proxy;24 import org.openstreetmap.josm.plugins.PluginHandler; 25 25 26 26 /** … … 44 44 super(); 45 45 46 // try to determine if the livegps plugin was already loaded: 47 // PluginInformation pluginInfo = PluginInformation.getLoaded("livegps"); 48 // if (pluginInfo == null) { 49 // JOptionPane.showMessageDialog(null, "Please install wmsplugin"); 50 // return; 51 // } 52 // if (!pluginInfo.version.equals("2")) { 53 // JOptionPane.showMessageDialog(null, "livegps Version 2 required."); 54 // return; 55 // } 56 try { 57 Class.forName("livegps.LiveGpsPlugin"); 58 } catch(ClassNotFoundException cnfe) { 59 String message = 60 tr("SurveyorPlugin depends on LiveGpsPlugin!") + "\n" + 61 tr("LiveGpsPlugin not found, please install and activate.") + "\n" + 62 tr("SurveyorPlugin is disabled for the moment"); 63 JOptionPane.showMessageDialog(Main.parent, message, tr("SurveyorPlugin"), JOptionPane.ERROR_MESSAGE); 64 return; 65 } 66 67 68 LiveGpsPlugin gpsPlugin = null; 69 Iterator<PluginProxy> proxyIter = Main.plugins.iterator(); 70 while(proxyIter.hasNext()) { 71 Object plugin = proxyIter.next().plugin; 72 if(plugin instanceof LiveGpsPlugin) { 73 gpsPlugin = (LiveGpsPlugin) plugin; 74 break; 75 } 76 } 46 LiveGpsPlugin gpsPlugin = (LiveGpsPlugin) PluginHandler.getPlugin("livegps"); 77 47 if(gpsPlugin == null) 78 48 throw new IllegalStateException(tr("SurveyorPlugin needs LiveGpsPlugin, but could not find it!"));
Note:
See TracChangeset
for help on using the changeset viewer.