Changeset 31665 in osm for applications


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

[josm_plugins] allow loading in headless mode for jenkins

Location:
applications/editors/josm/plugins
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java

    r31646 r31665  
    2626import java.awt.BorderLayout;
    2727import java.awt.Cursor;
     28import java.awt.GraphicsEnvironment;
    2829import java.awt.event.KeyEvent;
    2930import java.awt.event.MouseEvent;
     
    253254                commands = (new Loader(getPluginDir())).load();
    254255                if (commands.isEmpty()) {
    255                         if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(Main.parent,
     256                        if (!GraphicsEnvironment.isHeadless() && JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(Main.parent,
    256257                                        tr("No command has been found. Would you like to download and install default commands now?"),
    257258                                        tr("No command found"), JOptionPane.YES_NO_CANCEL_OPTION)) {
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java

    r31646 r31665  
    55import static org.openstreetmap.josm.io.session.SessionReader.registerSessionLayerImporter;
    66import static org.openstreetmap.josm.io.session.SessionWriter.registerSessionLayerExporter;
    7 import static org.openstreetmap.josm.tools.I18n.marktr;
    87import static org.openstreetmap.josm.tools.I18n.tr;
    98
     
    283282        }
    284283        refreshLayersURL();
    285 
    286         /* TODO: remove in july 2012 */
    287         if(!Main.pref.getBoolean("cadastregrab.shortcut.warn", false))
    288         {
    289             Main.pref.put("cadastregrab.shortcut.warn", true);
    290             JOptionPane.showMessageDialog(Main.parent,
    291                 tr("Plugin cadastre-fr used the key shortcut F11 for grabbing,\n"+
    292                 "which is now allocated for full-screen switch.\n"+
    293                 "The new grabbing key is F10, but you can change the key\n" +
    294                 "in the shortcut settings if you want."));
    295         }
    296284        refreshMenu();
    297285    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java

    r31646 r31665  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
     6import java.awt.GraphicsEnvironment;
    67import java.awt.event.KeyEvent;
    78import java.io.IOException;
     
    9091        addStatusListener(this);
    9192
    92         ConflictResolver.getInstance();
     93        if (!GraphicsEnvironment.isHeadless()) {
     94                ConflictResolver.getInstance();
     95        }
    9396        SelectionMonitor.getInstance();
    9497        Reasoner.getInstance();
  • 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);
  • applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/NPMPlugin.java

    r26335 r31665  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.plugins.npm;
     3
     4import java.awt.GraphicsEnvironment;
    35
    46import javax.swing.SwingUtilities;
     
    2628                    new NPMCredentialsAgentFactory(sel)
    2729            );
    28         } else {
     30        } else if (!GraphicsEnvironment.isHeadless()) {
    2931            SwingUtilities.invokeLater(new Runnable() {
    3032                @Override
Note: See TracChangeset for help on using the changeset viewer.