(Editor editor, String oldPath)
| 311 | |
| 312 | |
| 313 | synchronized static public void rename(Editor editor, String oldPath) { |
| 314 | if (records.size() == Preferences.getInteger("recent.count")) { |
| 315 | records.remove(0); // remove the first entry |
| 316 | } |
| 317 | int index = findRecord(oldPath); |
| 318 | //check if record exists |
| 319 | if (index != -1) { |
| 320 | records.remove(index); |
| 321 | } |
| 322 | records.add(new Record(editor)); |
| 323 | save(); |
| 324 | } |
| 325 | |
| 326 | |
| 327 | static int findRecord(String path) { |
no test coverage detected