()
| 213 | |
| 214 | |
| 215 | public JMenu buildFileMenu() { |
| 216 | //String appTitle = JavaToolbar.getTitle(JavaToolbar.EXPORT, false); |
| 217 | String appTitle = Language.text("menu.file.export_application"); |
| 218 | JMenuItem exportApplication = Toolkit.newJMenuItemShift(appTitle, 'E'); |
| 219 | exportApplication.addActionListener(e -> { |
| 220 | if (sketch.isUntitled() || sketch.isReadOnly()) { |
| 221 | // Exporting to application will open the sketch folder, which is |
| 222 | // weird for untitled sketches (that live in a temp folder) and |
| 223 | // read-only sketches (that live in the examples folder). |
| 224 | // TODO Better explanation? And some localization too. |
| 225 | Messages.showMessage("Save First", "Please first save the sketch."); |
| 226 | } else { |
| 227 | handleExportApplication(); |
| 228 | } |
| 229 | }); |
| 230 | |
| 231 | return buildFileMenu(new JMenuItem[] { exportApplication }); |
| 232 | } |
| 233 | |
| 234 | |
| 235 | public JMenu buildSketchMenu() { |
nothing calls this directly
no test coverage detected