Handler for the New Code menu option.
()
| 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 | /** |
no test coverage detected