()
| 78 | |
| 79 | |
| 80 | static protected void load() throws IOException { |
| 81 | records = new ArrayList<>(); |
| 82 | if (file.exists()) { |
| 83 | BufferedReader reader = PApplet.createReader(file); |
| 84 | String version = reader.readLine(); |
| 85 | if (version != null && version.equals(VERSION)) { |
| 86 | String line = null; |
| 87 | while ((line = reader.readLine()) != null) { |
| 88 | // String[] pieces = PApplet.split(line, '\t'); |
| 89 | // Record record = new Record(pieces[0], new EditorState(pieces[1])); |
| 90 | // Record record = new Record(pieces[0]); //, new EditorState(pieces[1])); |
| 91 | // records.add(record); |
| 92 | if (new File(line).exists()) { // don't add ghost entries |
| 93 | records.add(new Record(line)); |
| 94 | } else { |
| 95 | Messages.log("ghost file: " + line); |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | reader.close(); |
| 100 | } |
| 101 | updateMenu(mainMenu); |
| 102 | updateMenu(toolbarMenu); |
| 103 | } |
| 104 | |
| 105 | |
| 106 | static protected void save() { |
no test coverage detected