MCPcopy Index your code
hub / github.com/processing/processing / handleNewCode

Method handleNewCode

app/src/processing/app/Sketch.java:301–316  ·  view source on GitHub ↗

Handler for the New Code menu option.

()

Source from the content-addressed store, hash-verified

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

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