Changeset 774 in josm


Ignore:
Timestamp:
2008-08-12T18:28:04+02:00 (16 years ago)
Author:
stoecker
Message:

no longer shows relation membership header without relation

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r758 r774  
    646646                        membershipData.addRow(new Object[]{e.getKey(), value});
    647647                }
     648                membershipTable.getTableHeader().setVisible(membershipData.getRowCount() > 0);
    648649        }
    649650}
  • trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java

    r742 r774  
    5656                        if (e instanceof PluginException)
    5757                                plugin = ((PluginException)e).plugin;
    58                        
     58
    5959                        if (plugin == null)
    6060                                plugin = guessPlugin(e);
     
    6262                        if (plugin != null) {
    6363                                int answer = JOptionPane.showConfirmDialog(
    64                                                 Main.parent,
    65                                                 tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.", plugin.info.name)+"\n"+
    66                                                 (plugin.info.author != null ? tr("According to the information within the plugin, the author is {0}.", plugin.info.author) : "")+"\n"+
     64                                                Main.parent, tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.",
     65                                                plugin.info.name) + "\n"+ (plugin.info.author != null ?
     66                                                tr("According to the information within the plugin, the author is {0}.",
     67                                                plugin.info.author) : "") + "\n" +
    6768                                                tr("Should the plugin be disabled?"),
    6869                                                tr("Disable plugin"),
     
    7879                                                        p = p.substring(1);
    7980                                                Main.pref.put("plugins", p);
    80                                                 JOptionPane.showMessageDialog(Main.parent, tr("The plugin has been removed from the configuration. Please restart JOSM to unload the plugin."));
     81                                                JOptionPane.showMessageDialog(Main.parent,
     82                                                tr("The plugin has been removed from the configuration. Please restart JOSM to unload the plugin."));
    8183                                        } else {
    82                                                 JOptionPane.showMessageDialog(Main.parent, tr("The plugin could not be removed. Please tell the people you got JOSM from about the problem."));
     84                                                JOptionPane.showMessageDialog(Main.parent,
     85                                                tr("The plugin could not be removed. Please tell the people you got JOSM from about the problem."));
    8386                                        }
    8487                                        return;
     
    8891                        Object[] options = new String[]{tr("Do nothing"), tr("Report Bug")};
    8992                        int answer = JOptionPane.showOptionDialog(Main.parent, tr("An unexpected exception occurred.\n\n" +
    90                                         "This is always a coding error. If you are running the latest\n" +
     93                        "This is always a coding error. If you are running the latest\n" +
    9194                        "version of JOSM, please consider being kind and file a bug report."),
    9295                        tr("Unexpected Exception"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE,
     
    121124
    122125                                        JPanel p = new JPanel(new GridBagLayout());
    123                                         p.add(new JLabel(tr("Please report a ticket at http://josm.openstreetmap.de/newticket, including your steps to get to\n" +
    124                                                                     "the error and be sure to include the following information")), GBC.eol());
     126                                        p.add(new JLabel(tr("<html>Please report a ticket at {0}<br>" +
     127                                        "Include your steps to get to the error (as detailed as possible)!<br>" +
     128                                        "Be sure to include the following information:</html>", "http://josm.openstreetmap.de/newticket")), GBC.eol());
    125129                                        try {
    126                             Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(sb.toString()), new ClipboardOwner(){
    127                                 public void lostOwnership(Clipboard clipboard, Transferable contents) {}
    128                             });
    129                             p.add(new JLabel(tr("The text has already been copied to your clipboard.")), GBC.eop());
    130                     } catch (RuntimeException x) {
    131                     }
     130                                                Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(sb.toString()), new ClipboardOwner(){
     131                                                        public void lostOwnership(Clipboard clipboard, Transferable contents) {}
     132                                                });
     133                                                p.add(new JLabel(tr("The text has already been copied to your clipboard.")), GBC.eop());
     134                                        }
     135                                        catch (RuntimeException x) {}
    132136
    133137                                        JTextArea info = new JTextArea(sb.toString(), 20, 60);
     
    156160         * some known problem pattern has been found or <code>null</code>, if
    157161         * the stack does not contain plugin-code.
    158          * 
     162         *
    159163         * Note: This heuristic is not meant as discrimination against specific
    160164         * plugins, but only to stop the flood of similar bug reports about plugins.
    161          * Of course, plugin writers are free to install their own version of 
    162          * an exception handler with their email address listed to receive 
    163          * bug reports ;-). 
     165         * Of course, plugin writers are free to install their own version of
     166         * an exception handler with their email address listed to receive
     167         * bug reports ;-).
    164168         */
    165169        private String guessPluginName(Throwable e) {
    166170                for (StackTraceElement element : e.getStackTrace()) {
    167171                        String c = element.getClassName();
    168                        
     172
    169173                        if (c.contains("wmsplugin.") || c.contains(".WMSLayer"))
    170174                                return "wmsplugin";
Note: See TracChangeset for help on using the changeset viewer.