Changeset 9616 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-01-24T16:25:58+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
r9611 r9616 7 7 import java.awt.BorderLayout; 8 8 import java.awt.Component; 9 import java.awt.GraphicsEnvironment; 9 10 import java.awt.GridBagConstraints; 10 11 import java.awt.GridBagLayout; … … 143 144 } 144 145 sb.append("</html>"); 145 GuiHelper.runInEDTAndWait(new Runnable() { 146 @Override 147 public void run() { 148 HelpAwareOptionPane.showOptionDialog( 149 parent, 150 sb.toString(), 151 tr("Update plugins"), 152 !failed.isEmpty() ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE, 153 HelpUtil.ht("/Preferences/Plugins") 154 ); 155 } 156 }); 146 if (!GraphicsEnvironment.isHeadless()) { 147 GuiHelper.runInEDTAndWait(new Runnable() { 148 @Override 149 public void run() { 150 HelpAwareOptionPane.showOptionDialog( 151 parent, 152 sb.toString(), 153 tr("Update plugins"), 154 !failed.isEmpty() ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE, 155 HelpUtil.ht("/Preferences/Plugins") 156 ); 157 } 158 }); 159 } 157 160 } 158 161 -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r9141 r9616 1205 1205 /** 1206 1206 * Determines if the specified file is a valid and accessible JAR file. 1207 * @param jar The fil to check1207 * @param jar The file to check 1208 1208 * @return true if file can be opened as a JAR file. 1209 1209 * @since 5723 … … 1214 1214 new JarFile(jar).close(); 1215 1215 } catch (Exception e) { 1216 Main.warn(e); 1216 1217 return false; 1217 1218 } 1218 1219 return true; 1220 } else if (jar != null) { 1221 Main.warn("Invalid jar file ''"+jar+"'' (exists: "+jar.exists()+", canRead: "+jar.canRead()+")"); 1219 1222 } 1220 1223 return false;
Note:
See TracChangeset
for help on using the changeset viewer.