- Timestamp:
- 2019-03-18T09:47:08+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
r14892 r14899 153 153 buildTree(true); 154 154 } 155 155 156 /** 156 157 * Builds the errors tree … … 171 172 int selRow = selPath == null ? -1 : getRowForPath(selPath); 172 173 173 // Remember the currently expanded rows 174 Set<Object> oldExpandedRows = new HashSet<>(); 175 if (expandAgain) { 176 Enumeration<TreePath> expanded = getExpandedDescendants(new TreePath(getRoot())); 177 if (expanded != null) { 178 while (expanded.hasMoreElements()) { 179 TreePath path = expanded.nextElement(); 180 DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent(); 181 Object userObject = node.getUserObject(); 182 if (userObject instanceof Severity) { 183 oldExpandedRows.add(userObject); 184 } else if (userObject instanceof String) { 185 String msg = (String) userObject; 186 int index = msg.lastIndexOf(" ("); 187 if (index > 0) { 188 msg = msg.substring(0, index); 189 } 190 oldExpandedRows.add(msg); 174 // Remember the currently expanded rows 175 Set<Object> oldExpandedRows = new HashSet<>(); 176 if (expandAgain) { 177 Enumeration<TreePath> expanded = getExpandedDescendants(new TreePath(getRoot())); 178 if (expanded != null) { 179 while (expanded.hasMoreElements()) { 180 TreePath path = expanded.nextElement(); 181 DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent(); 182 Object userObject = node.getUserObject(); 183 if (userObject instanceof Severity) { 184 oldExpandedRows.add(userObject); 185 } else if (userObject instanceof String) { 186 String msg = (String) userObject; 187 int index = msg.lastIndexOf(" ("); 188 if (index > 0) { 189 msg = msg.substring(0, index); 191 190 } 191 oldExpandedRows.add(msg); 192 192 } 193 193 } 194 194 } 195 } 195 196 196 197 Predicate<TestError> filterToUse = e -> !e.isIgnored();
Note:
See TracChangeset
for help on using the changeset viewer.