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

Method buildFileMenu

java/src/processing/mode/java/JavaEditor.java:215–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 6

textMethod · 0.95
newJMenuItemShiftMethod · 0.95
showMessageMethod · 0.95
isUntitledMethod · 0.80
isReadOnlyMethod · 0.80

Tested by

no test coverage detected