Changeset 2855 in josm


Ignore:
Timestamp:
2010-01-14T10:26:13+01:00 (11 years ago)
Author:
Gubaer
Message:

fixed #4364: editing an "advanced preference" will disable all plugins
fixed #4351: Button sizes in plugin preferences different (last button is smaller)

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java

    r2817 r2855  
    9696    private PluginPreferencesModel model;
    9797    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;
    98103
    99104    protected JPanel buildSearchFieldPanel() {
     
    247252
    248253    public boolean ok() {
     254        if (! pluginPreferencesActivated)
     255            return false;
    249256        if (model.isActivePluginsChanged()) {
    250257            Main.pref.putCollection("plugins", model.getSelectedPluginNames());
     
    254261    }
    255262
     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     */
    256269    public void readLocalPluginInformation() {
    257270        final ReadLocalPluginInformationTask task = new ReadLocalPluginInformationTask();
     
    363376            putValue(NAME,tr("Configure sites..."));
    364377            putValue(SHORT_DESCRIPTION, tr("Configure the list of sites where plugins are downloaded from"));
     378            putValue(SMALL_ICON, ImageProvider.get("dialogs", "propertiesdialog"));
    365379        }
    366380
     
    385399            if (tp.getSelectedComponent() == pane) {
    386400                readLocalPluginInformation();
     401                pluginPreferencesActivated = true;
    387402            }
    388403        }
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r2853 r2855  
    657657        }
    658658
    659         if (plugin == null)
    660         {
     659        if (plugin == null) {
    661660            /**
    662661             * Analyze the stack of the argument and find a name of a plugin, if
    663662             * some known problem pattern has been found.
    664663             */
    665             for (PluginProxy p : pluginList)
    666             {
     664            for (PluginProxy p : pluginList) {
    667665                String baseClass = p.getPluginInformation().className;
    668666                int i = baseClass.lastIndexOf(".");
    669667                baseClass = baseClass.substring(0, i);
    670                 for (StackTraceElement element : e.getStackTrace())
    671                 {
     668                for (StackTraceElement element : e.getStackTrace()) {
    672669                    String c = element.getClassName();
    673                     if(c.startsWith(baseClass))
    674                     {
     670                    if (c.startsWith(baseClass)) {
    675671                        plugin = p;
    676672                        break;
    677673                    }
    678674                }
    679                 if(plugin != null) {
     675                if (plugin != null) {
    680676                    break;
    681677                }
Note: See TracChangeset for help on using the changeset viewer.