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