()
| 98 | |
| 99 | |
| 100 | static protected void save() { |
| 101 | // Need to check whether file exists and may already be writable. |
| 102 | // Otherwise, setWritable() will actually return false. |
| 103 | if (file.exists() && !file.canWrite()) { |
| 104 | if (!file.setWritable(true, false)) { |
| 105 | System.err.println("Warning: could not set " + file + " to writable"); |
| 106 | } |
| 107 | } |
| 108 | PrintWriter writer = PApplet.createWriter(file); |
| 109 | writer.println(VERSION); |
| 110 | for (Record record : records) { |
| 111 | writer.println(record.path); // + "\t" + record.getState()); |
| 112 | } |
| 113 | writer.flush(); |
| 114 | writer.close(); |
| 115 | updateMenu(mainMenu); |
| 116 | updateMenu(toolbarMenu); |
| 117 | } |
| 118 | |
| 119 | |
| 120 | static public JMenu getMenu() { |
no test coverage detected