Changeset 144 in josm for src/org/openstreetmap/josm/Main.java
- Timestamp:
- 2006-10-01T19:45:33+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/Main.java
r142 r144 12 12 import java.net.URISyntaxException; 13 13 import java.util.Collection; 14 import java.util.LinkedList; 14 15 import java.util.Map; 15 16 import java.util.StringTokenizer; … … 55 56 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 56 57 import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener; 58 import org.openstreetmap.josm.plugins.Plugin; 57 59 import org.openstreetmap.josm.tools.ImageProvider; 58 60 … … 88 90 */ 89 91 public static MapFrame map; 92 /** 93 * All installed and loaded plugins (resp. their main classes) 94 */ 95 public final Collection<Plugin> plugins = new LinkedList<Plugin>(); 90 96 91 97 /** … … 118 124 } 119 125 redoUndoListener.commandChanged(0,0); 126 127 for (Plugin plugin : plugins) 128 plugin.mapFrameInitialized(map); 120 129 } 121 130 … … 236 245 237 246 contentPane.updateUI(); 247 248 // Plugins 249 if (pref.hasKey("plugins")) { 250 for (String pluginName : pref.get("plugins").split(",")) { 251 try { 252 plugins.add((Plugin)Class.forName(pluginName).newInstance()); 253 } catch (Exception e) { 254 e.printStackTrace(); 255 JOptionPane.showMessageDialog(parent, tr("Could not load plugin {0}.", pluginName)); 256 } 257 } 258 } 238 259 } 239 260 /**
Note:
See TracChangeset
for help on using the changeset viewer.