Changeset 32174 in osm for applications/editors/josm/plugins
- Timestamp:
- 2016-05-12T01:30:36+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/osmarender
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/osmarender/.project
r29635 r32174 21 21 </arguments> 22 22 </buildCommand> 23 <buildCommand> 24 <name>org.sonarlint.eclipse.core.sonarlintBuilder</name> 25 <arguments> 26 </arguments> 27 </buildCommand> 23 28 </buildSpec> 24 29 <natures> -
applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java
r30738 r32174 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.osmarender; 2 3 … … 67 68 try { 68 69 writeGenerated(b); 69 } catch ( Exception ex) {70 } catch (IOException ex) { 70 71 // how handle the exception? 71 72 Main.error(ex); … … 124 125 Runtime.getRuntime().exec(new String[]{firefox, argument}); 125 126 } catch (IOException e1) { 126 JOptionPane.showMessageDialog(Main.parent, tr("Firefox not found. Please set firefox executable in the Map Settings page of the preferences.")); 127 JOptionPane.showMessageDialog(Main.parent, 128 tr("Firefox not found. Please set firefox executable in the Map Settings page of the preferences.")); 127 129 } 128 130 } … … 131 133 private JMenuItem osmarenderMenu; 132 134 135 /** 136 * Constructs a new {@code OsmarenderPlugin}. 137 * @param info plugin info 138 * @throws IOException if files cannot be copied 139 */ 133 140 public OsmarenderPlugin(PluginInformation info) throws IOException { 134 141 super(info); … … 156 163 } 157 164 158 private class OsmarenderPreferenceSetting implements SubPreferenceSetting {165 private static class OsmarenderPreferenceSetting implements SubPreferenceSetting { 159 166 160 167 private JTextField firefox = new JTextField(10); … … 191 198 192 199 private void writeGenerated(Bounds b) throws IOException { 193 String bounds _tag = "<bounds " +200 String boundsTag = "<bounds " + 194 201 "minlat=\"" + b.getMin().lat() + "\" " + 195 202 "maxlat=\"" + b.getMax().lat() + "\" " + … … 204 211 // osm-map-features.xml contain two placemark 205 212 // (bounds_mkr1 and bounds_mkr2). We write the bounds tag between the two 206 String str = null;213 String str; 207 214 while( (str = reader.readLine()) != null ) { 208 215 if(str.contains("<!--bounds_mkr1-->")) { 209 216 writer.println(str); 210 writer.println(" " + bounds _tag);217 writer.println(" " + boundsTag); 211 218 while(!str.contains("<!--bounds_mkr2-->")) { 212 219 str = reader.readLine();
Note:
See TracChangeset
for help on using the changeset viewer.