MCPcopy
hub / github.com/arduino/Arduino / exportApplet

Method exportApplet

app/src/processing/app/SketchController.java:686–706  ·  view source on GitHub ↗

Handle export to applet.

(boolean usingProgrammer)

Source from the content-addressed store, hash-verified

684 * Handle export to applet.
685 */
686 protected boolean exportApplet(boolean usingProgrammer) throws Exception {
687 // build the sketch
688 editor.status.progressNotice(tr("Compiling sketch..."));
689 String foundName = build(false, false);
690 // (already reported) error during export, exit this function
691 if (foundName == null) return false;
692
693// // If name != exportSketchName, then that's weirdness
694// // BUG unfortunately, that can also be a bug in the preproc :(
695// if (!name.equals(foundName)) {
696// Base.showWarning("Error during export",
697// "Sketch name is " + name + " but the sketch\n" +
698// "name in the code was " + foundName, null);
699// return false;
700// }
701
702 editor.status.progressNotice(tr("Uploading..."));
703 boolean success = upload(foundName, usingProgrammer);
704 editor.status.progressUpdate(100);
705 return success;
706 }
707
708 private boolean upload(String suggestedClassName, boolean usingProgrammer) throws Exception {
709

Callers 1

runMethod · 0.80

Calls 5

buildMethod · 0.95
uploadMethod · 0.95
progressNoticeMethod · 0.80
trMethod · 0.80
progressUpdateMethod · 0.80

Tested by

no test coverage detected