MCPcopy Index your code
hub / github.com/benfry/processing4 / save

Method save

app/src/processing/app/ui/Recent.java:100–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers 2

appendMethod · 0.95
renameMethod · 0.95

Calls 5

createWriterMethod · 0.95
updateMenuMethod · 0.95
printlnMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected