(Editor editor, String oldPath)
| 252 | |
| 253 | |
| 254 | synchronized static public void rename(Editor editor, String oldPath) { |
| 255 | if (records.size() == Preferences.getInteger("recent.count")) { |
| 256 | records.remove(0); // remove the first entry |
| 257 | } |
| 258 | int index = findRecord(oldPath); |
| 259 | //check if record exists |
| 260 | if (index != -1) { |
| 261 | records.remove(index); |
| 262 | } |
| 263 | records.add(new Record(editor)); |
| 264 | save(); |
| 265 | } |
| 266 | |
| 267 | |
| 268 | static int findRecord(String path) { |
no test coverage detected