Ignore:
Timestamp:
2015-10-24T17:33:58+02:00 (9 years ago)
Author:
donvip
Message:

[josm_plugins] allow loading in headless mode for jenkins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatPlugin.java

    r30532 r31665  
    44import gnu.io.CommPortIdentifier;
    55
     6import java.awt.GraphicsEnvironment;
    67import java.awt.event.ActionEvent;
    78import java.awt.event.KeyEvent;
     
    8990        super(info);
    9091        boolean error = false;
    91         try{
     92        try {
    9293            CommPortIdentifier.getPortIdentifiers();
    93         }catch(java.lang.UnsatisfiedLinkError e){
     94        } catch (UnsatisfiedLinkError e) {
    9495            error = true;
    95             JOptionPane.showMessageDialog(Main.parent, "<html>" + tr("Cannot load library rxtxSerial. If you need support to install it try Globalsat homepage at http://www.raphael-mack.de/josm-globalsat-gpx-import-plugin/") + "</html>");
     96            String msg = tr("Cannot load library rxtxSerial. If you need support to install it try Globalsat homepage at http://www.raphael-mack.de/josm-globalsat-gpx-import-plugin/");
     97            Main.error(msg);
     98            if (!GraphicsEnvironment.isHeadless()) {
     99                JOptionPane.showMessageDialog(Main.parent, "<html>" + msg + "</html>");
     100            }
    96101        }
    97         if(!error){
     102        if (!error) {
    98103            importAction = new GlobalsatImportAction();
    99104            Main.main.menu.toolsMenu.add(importAction);
Note: See TracChangeset for help on using the changeset viewer.