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

Method handleNewCode

app/src/processing/app/Sketch.java:306–321  ·  view source on GitHub ↗

Handler for the New Code menu option.

()

Source from the content-addressed store, hash-verified

304 * Handler for the New Code menu option.
305 */
306 public void handleNewCode() {
307 // make sure the user didn't hide the sketch folder
308 ensureExistence();
309
310 // if read-only, give an error
311 if (isReadOnly()) {
312 // if the files are read-only, need to first do a "save as".
313 Messages.showMessage(Language.text("new.messages.is_read_only"),
314 Language.text("new.messages.is_read_only.description"));
315 return;
316 }
317
318 renamingCode = false;
319 // editor.status.edit("Name for new file:", "");
320 promptForTabName(Language.text("editor.tab.rename.description")+":", "");
321 }
322
323
324 /**

Callers 1

actionPerformedMethod · 0.80

Calls 5

ensureExistenceMethod · 0.95
isReadOnlyMethod · 0.95
showMessageMethod · 0.95
textMethod · 0.95
promptForTabNameMethod · 0.95

Tested by

no test coverage detected