Changeset 12620 in josm for trunk/src/org/openstreetmap/josm/gui/datatransfer
- Timestamp:
- 2017-08-22T22:26:32+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/datatransfer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/datatransfer/AbstractStackTransferHandler.java
r11746 r12620 15 15 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 16 16 import org.openstreetmap.josm.tools.JosmRuntimeException; 17 import org.openstreetmap.josm.tools.Logging; 17 18 import org.openstreetmap.josm.tools.bugreport.BugReport; 18 19 … … 51 52 if (df.supports(support)) { 52 53 try { 53 if (Main.isDebugEnabled()) { 54 Main.debug("{0} pasting {1} at {2}", df.getClass().getSimpleName(), Arrays.toString(support.getDataFlavors()), center); 54 if (Logging.isDebugEnabled()) { 55 Logging.debug("{0} pasting {1} at {2}", 56 df.getClass().getSimpleName(), Arrays.toString(support.getDataFlavors()), center); 55 57 } 56 58 if (df.importData(support, layer, center)) { … … 58 60 } 59 61 } catch (UnsupportedFlavorException | IOException e) { 60 Main.warn(e);62 Logging.warn(e); 61 63 } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) { 62 64 BugReport.intercept(e).put("paster", df).put("flavors", support::getDataFlavors).warn(); -
trunk/src/org/openstreetmap/josm/gui/datatransfer/ClipboardUtils.java
r11921 r12620 13 13 import java.io.IOException; 14 14 15 import org.openstreetmap.josm.Main;16 15 import org.openstreetmap.josm.gui.util.GuiHelper; 16 import org.openstreetmap.josm.tools.Logging; 17 17 import org.openstreetmap.josm.tools.Utils; 18 18 … … 50 50 clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); 51 51 } catch (HeadlessException e) { 52 Main.warn("Headless. Using fake clipboard.", e);52 Logging.warn("Headless. Using fake clipboard.", e); 53 53 clipboard = new Clipboard("fake"); 54 54 } … … 83 83 } 84 84 } catch (UnsupportedFlavorException | IOException ex) { 85 Main.error(ex);85 Logging.error(ex); 86 86 } 87 87 return null; … … 109 109 // Clipboard currently unavailable. 110 110 // On some platforms, the system clipboard is unavailable while it is accessed by another application. 111 Main.trace("Clipboard unavailable.", e);111 Logging.trace("Clipboard unavailable.", e); 112 112 try { 113 113 Thread.sleep(1); 114 114 } catch (InterruptedException ex) { 115 Main.warn(ex, "InterruptedException in " + Utils.class.getSimpleName()116 + " while getting clipboard content" );115 Logging.log(Logging.LEVEL_WARN, "InterruptedException in " + Utils.class.getSimpleName() 116 + " while getting clipboard content", ex); 117 117 Thread.currentThread().interrupt(); 118 118 } 119 119 } catch (NullPointerException e) { // NOPMD 120 120 // JDK-6322854: On Linux/X11, NPE can happen for unknown reasons, on all versions of Java 121 Main.error(e);121 Logging.error(e); 122 122 } 123 123 } … … 145 145 return Boolean.TRUE; 146 146 } catch (IllegalStateException ex) { 147 Main.error(ex);147 Logging.error(ex); 148 148 return Boolean.FALSE; 149 149 } -
trunk/src/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandler.java
r12125 r12620 21 21 import org.openstreetmap.josm.gui.datatransfer.importers.TextTagPaster; 22 22 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 23 import org.openstreetmap.josm.tools.Logging; 23 24 24 25 /** … … 47 48 } 48 49 } catch (UnsupportedFlavorException | IOException e) { 49 Main.warn(e);50 Logging.warn(e); 50 51 } 51 52 } … … 96 97 } 97 98 } catch (IllegalStateException e) { 98 Main.debug(e);99 Logging.debug(e); 99 100 } catch (NullPointerException e) { // NOPMD 100 101 // JDK-6322854: On Linux/X11, NPE can happen for unknown reasons, on all versions of Java 101 Main.error(e);102 Logging.error(e); 102 103 } 103 104 return false; -
trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/TextTagPaster.java
r12537 r12620 11 11 import javax.swing.TransferHandler.TransferSupport; 12 12 13 import org.openstreetmap.josm. Main;13 import org.openstreetmap.josm.tools.Logging; 14 14 import org.openstreetmap.josm.tools.TextTagParser; 15 15 … … 34 34 return super.supports(support) && containsValidTags(support); 35 35 } catch (UnsupportedFlavorException | IOException e) { 36 Main.warn(e);36 Logging.warn(e); 37 37 return false; 38 38 }
Note:
See TracChangeset
for help on using the changeset viewer.