Changeset 31866 in osm for applications/editors/josm/plugins/wikipedia
- Timestamp:
- 2015-12-26T22:15:37+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikidataTagCellRenderer.java
r31858 r31866 41 41 public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { 42 42 if (column != 1 43 || !(value instanceof Map<?, ?> && ((Map<?, ?>) value).size() == 1) 44 || !"wikidata".equals(table.getValueAt(row, 0).toString())) { 43 || !(value instanceof Map<?, ?> && ((Map<?, ?>) value).size() == 1)) { 45 44 return null; 46 45 } 46 final String key = table.getValueAt(row, 0).toString(); 47 if (!("wikidata".equals(key) || key != null && key.endsWith(":wikidata"))) { 48 return null; 49 } 50 47 51 final String id = ((Map<?, ?>) value).keySet().iterator().next().toString(); 48 52 if (!WikipediaApp.WIKIDATA_PATTERN.matcher(id).matches()) {
Note:
See TracChangeset
for help on using the changeset viewer.