Changeset 10212 in josm for trunk/src/org/openstreetmap/josm/data/Preferences.java
- Timestamp:
- 2016-05-15T00:51:10+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r10208 r10212 731 731 /* only for preferences */ 732 732 public synchronized String getColorName(String o) { 733 try { 734 Matcher m = Pattern.compile("mappaint\\.(.+?)\\.(.+)").matcher(o); 735 if (m.matches()) { 736 return tr("Paint style {0}: {1}", tr(I18n.escape(m.group(1))), tr(I18n.escape(m.group(2)))); 737 } 738 } catch (Exception e) { 739 Main.warn(e); 740 } 741 try { 742 Matcher m = Pattern.compile("layer (.+)").matcher(o); 743 if (m.matches()) { 744 return tr("Layer: {0}", tr(I18n.escape(m.group(1)))); 745 } 746 } catch (Exception e) { 747 Main.warn(e); 733 Matcher m = Pattern.compile("mappaint\\.(.+?)\\.(.+)").matcher(o); 734 if (m.matches()) { 735 return tr("Paint style {0}: {1}", tr(I18n.escape(m.group(1))), tr(I18n.escape(m.group(2)))); 736 } 737 m = Pattern.compile("layer (.+)").matcher(o); 738 if (m.matches()) { 739 return tr("Layer: {0}", tr(I18n.escape(m.group(1)))); 748 740 } 749 741 return tr(I18n.escape(colornames.containsKey(o) ? colornames.get(o) : o)); … … 1336 1328 field.setAccessible(true); 1337 1329 field.set(null, ResourceBundle.getBundle("sun.awt.resources.awt")); 1338 } catch (Exception | InternalError e) { 1339 // Ignore all exceptions, including internal error raised by Java 9 Jigsaw EA: 1340 // java.lang.InternalError: legacy getBundle can't be used to find sun.awt.resources.awt in module java.desktop 1341 // InternalError catch to remove when https://bugs.openjdk.java.net/browse/JDK-8136804 is resolved 1330 } catch (ReflectiveOperationException e) { 1342 1331 if (Main.isTraceEnabled()) { 1343 1332 Main.trace(e.getMessage());
Note:
See TracChangeset
for help on using the changeset viewer.