Changeset 2855 in josm
- Timestamp:
- 2010-01-14T10:26:13+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r2817 r2855 96 96 private PluginPreferencesModel model; 97 97 private JScrollPane spPluginPreferences; 98 /** 99 * is set to true if this preference pane has been selected 100 * by the user 101 */ 102 private boolean pluginPreferencesActivated = false; 98 103 99 104 protected JPanel buildSearchFieldPanel() { … … 247 252 248 253 public boolean ok() { 254 if (! pluginPreferencesActivated) 255 return false; 249 256 if (model.isActivePluginsChanged()) { 250 257 Main.pref.putCollection("plugins", model.getSelectedPluginNames()); … … 254 261 } 255 262 263 /** 264 * Reads locally available information about plugins from the local file system. 265 * Scans cached plugin lists from plugin download sites and locally available 266 * plugin jar files. 267 * 268 */ 256 269 public void readLocalPluginInformation() { 257 270 final ReadLocalPluginInformationTask task = new ReadLocalPluginInformationTask(); … … 363 376 putValue(NAME,tr("Configure sites...")); 364 377 putValue(SHORT_DESCRIPTION, tr("Configure the list of sites where plugins are downloaded from")); 378 putValue(SMALL_ICON, ImageProvider.get("dialogs", "propertiesdialog")); 365 379 } 366 380 … … 385 399 if (tp.getSelectedComponent() == pane) { 386 400 readLocalPluginInformation(); 401 pluginPreferencesActivated = true; 387 402 } 388 403 } -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r2853 r2855 657 657 } 658 658 659 if (plugin == null) 660 { 659 if (plugin == null) { 661 660 /** 662 661 * Analyze the stack of the argument and find a name of a plugin, if 663 662 * some known problem pattern has been found. 664 663 */ 665 for (PluginProxy p : pluginList) 666 { 664 for (PluginProxy p : pluginList) { 667 665 String baseClass = p.getPluginInformation().className; 668 666 int i = baseClass.lastIndexOf("."); 669 667 baseClass = baseClass.substring(0, i); 670 for (StackTraceElement element : e.getStackTrace()) 671 { 668 for (StackTraceElement element : e.getStackTrace()) { 672 669 String c = element.getClassName(); 673 if(c.startsWith(baseClass)) 674 { 670 if (c.startsWith(baseClass)) { 675 671 plugin = p; 676 672 break; 677 673 } 678 674 } 679 if (plugin != null) {675 if (plugin != null) { 680 676 break; 681 677 }
Note:
See TracChangeset
for help on using the changeset viewer.